<newsletter:port_old_newsletter_to_new_system> Arrange images in rst2latex generated newsletters
Colomban Wendling
git-noreply at xxxxx
Fri Jun 10 23:36:14 UTC 2011
Updating branch refs/heads/port_old_newsletter_to_new_system
to 45faa66a66cced087fc0b46ef45a78333b12cd5d (commit)
from c5af486f6eca2c890c0961617d30f6f6d7726595 (commit)
commit 45faa66a66cced087fc0b46ef45a78333b12cd5d
Author: Jonathan Michalon <jonathan at michalon.eu>
Date: Thu May 26 18:24:13 2011 +0200
Arrange images in rst2latex generated newsletters
Signed-off-by: Jonathan Michalon <jonathan at michalon.eu>
Signed-off-by: Colomban Wendling <ban at herbesfolles.org>
Makefile | 2 +-
rst2latex.sed | 4 ++++
2 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/Makefile b/Makefile
index b793d10..e391b35 100644
--- a/Makefile
+++ b/Makefile
@@ -51,7 +51,7 @@ clean:
.rst.tex:
rst2latex $(RST2LATEX_FLAGS) $< > $@ || rm -f $@
- sed -f rst2latex.sed -i $@ || rm -f $@
+ sed -r -f rst2latex.sed -i $@ || rm -f $@
.rst.odt:
rst2odt $< > $@
diff --git a/rst2latex.sed b/rst2latex.sed
index f89d428..6509a5f 100644
--- a/rst2latex.sed
+++ b/rst2latex.sed
@@ -9,3 +9,7 @@
n
i \\\newpage
}
+
+# 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)(.*)/~\\\\\\centerline{\1[width=\\textwidth,height=0.30\\textheight,keepaspectratio=true]\2}/
More information about the Newsletter-Commits
mailing list