From 0eed33113e65e1004f0a19bce03271dbd506ab28 Mon Sep 17 00:00:00 2001 From: Colomban Wendling Date: Thu, 1 Dec 2011 18:14:34 +0100 Subject: [PATCH] Fix post-processing of LaTeX if an image has a forced size Fix LaTeX post-process if \includegraphics has any option in the input. For now, simply ignore such options completely. --- rst2latex.sed | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rst2latex.sed b/rst2latex.sed index ebee787..05e2402 100644 --- a/rst2latex.sed +++ b/rst2latex.sed @@ -12,4 +12,5 @@ # center images and reduce them to something moderated fitting the page # also force an empty line before: fixes placement after \paragraph and with previous text -s/(.*\\includegraphics)(.*)/\\begin{center}\\begin{minipage}[c]{\\linewidth}\\begin{center}\1[width=\\textwidth,height=0.25\\textheight,keepaspectratio=true]\2\\end{center}\\end{minipage}\\end{center}/ +# we ignore any option the input may have for \includegraphics +s/(.*\\includegraphics)(\[.*\])?(.*)/\\begin{center}\\begin{minipage}[c]{\\linewidth}\\begin{center}\1[width=\\textwidth,height=0.25\\textheight,keepaspectratio=true]\3\\end{center}\\end{minipage}\\end{center}/