Skip to content

Commit

Permalink
Fix post-processing of LaTeX if an image has a forced size
Browse files Browse the repository at this point in the history
Fix LaTeX post-process if \includegraphics has any option in the
input.  For now, simply ignore such options completely.
  • Loading branch information
b4n committed Dec 1, 2011
1 parent 8c6075d commit 0eed331
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion rst2latex.sed
Expand Up @@ -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}/

0 comments on commit 0eed331

Please sign in to comment.