summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Dominik <carsten.dominik@gmail.com>2010-03-05 08:28:01 +0100
committerCarsten Dominik <carsten.dominik@gmail.com>2010-03-05 08:28:01 +0100
commit9178620128cd410f478d20dddbc4f0e93f159d53 (patch)
tree0be8e367644f44f24d050a102535328394c5896e
parent9d0740d0fa8d5b1896c7934bd5504ddd628d7270 (diff)
downloadorg-mode-9178620128cd410f478d20dddbc4f0e93f159d53.tar.gz
Change refcard processing to pdftex, using pdflayout.sty
-rw-r--r--ChangeLog5
-rw-r--r--Makefile30
-rw-r--r--doc/ChangeLog4
-rw-r--r--doc/orgcard.tex9
-rw-r--r--doc/pdflayout.sty47
5 files changed, 69 insertions, 26 deletions
diff --git a/ChangeLog b/ChangeLog
index 6c4c758..4149623 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2010-03-05 Carsten Dominik <carsten.dominik@gmail.com>
+
+ * Makefile: Process reference card using pdflayout.sty. Change
+ processing to use direct PDF processing with pdftex.
+
2009-12-03 Carsten Dominik <carsten.dominik@gmail.com>
* Makefile: Add org-docview.el
diff --git a/Makefile b/Makefile
index 4ec5048..c94de13 100644
--- a/Makefile
+++ b/Makefile
@@ -149,9 +149,6 @@ doc: doc/org.html doc/org.pdf doc/orgcard.pdf doc/orgcard_letter.pdf
p:
${MAKE} pdf && open doc/org.pdf
-c:
- ${MAKE} card && gv doc/orgcard.ps
-
install-lisp: $(LISPFILES) $(ELCFILES)
if [ ! -d $(lispdir) ]; then $(MKDIR) $(lispdir); else true; fi ;
$(CP) $(LISPFILES) $(lispdir)
@@ -192,24 +189,15 @@ doc/org.html: doc/org.texi
(cd doc; $(TEXI2HTML) --no-split -o org.html org.texi)
UTILITIES/manfull.pl doc/org.html
-doc/orgcard.dvi: doc/orgcard.tex
- (cd doc; tex orgcard.tex)
-
-doc/orgcard.pdf: doc/orgcard.dvi
- dvips -q -f -t landscape doc/orgcard.dvi | gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=doc/orgcard.pdf -c .setpdfwrite -
-
-doc/orgcard.ps: doc/orgcard.dvi
- dvips -t landscape -o doc/orgcard.ps doc/orgcard.dvi
-
-doc/orgcard_letter.dvi: doc/orgcard.tex
- perl -pe 's/letterpaper=0/letterpaper=1/' doc/orgcard.tex > doc/orgcard_letter.tex
- (cd doc; tex orgcard_letter.tex)
+doc/orgcard.pdf: doc/orgcard.tex
+ (cd doc; pdftex orgcard.tex)
-doc/orgcard_letter.pdf: doc/orgcard_letter.dvi
- dvips -q -f -t landscape doc/orgcard_letter.dvi | gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=doc/orgcard_letter.pdf -c .setpdfwrite -
+doc/orgcard_letter.tex: doc/orgcard.tex
+ perl -pe 's/\\pdflayout=\(0l\)/\\pdflayout=(1l)/' \
+ doc/orgcard.tex > doc/orgcard_letter.tex
-doc/orgcard_letter.ps: doc/orgcard_letter.dvi
- dvips -t landscape -o doc/orgcard_letter.ps doc/orgcard_letter.dvi
+doc/orgcard_letter.pdf: doc/orgcard_letter.tex
+ (cd doc; pdftex orgcard_letter.tex)
# Below here are special targets for maintenance only
@@ -228,7 +216,7 @@ info: doc/org
pdf: doc/org.pdf
-card: doc/orgcard.pdf doc/orgcard.ps doc/orgcard_letter.pdf doc/orgcard_letter.ps
+card: doc/orgcard.pdf doc/orgcard_letter.pdf
distfile:
@if [ "X$(TAG)" = "X" ]; then echo "*** No tag ***"; exit 1; fi
@@ -288,7 +276,7 @@ cleancontrib:
cleanelc:
rm -f $(ELCFILES)
cleandoc:
- (cd doc; rm -f org.pdf org org.html orgcard.pdf orgcard.ps)
+ (cd doc; rm -f org.pdf org org.html orgcard.pdf)
(cd doc; rm -f *.aux *.cp *.cps *.dvi *.fn *.fns *.ky *.kys *.pg *.pgs)
(cd doc; rm -f *.toc *.tp *.tps *.vr *.vrs *.log *.html *.ps)
(cd doc; rm -f orgcard_letter.tex orgcard_letter.pdf)
diff --git a/doc/ChangeLog b/doc/ChangeLog
index cc8109f..feddb77 100644
--- a/doc/ChangeLog
+++ b/doc/ChangeLog
@@ -1,3 +1,7 @@
+2010-03-05 Carsten Dominik <carsten.dominik@gmail.com>
+
+ * pdflayout.sty: New file.
+
2010-03-01 Carsten Dominik <carsten.dominik@gmail.com>
* org.texi (Publishing action): Correct the documentation for the
diff --git a/doc/orgcard.tex b/doc/orgcard.tex
index ac82789..ec1a551 100644
--- a/doc/orgcard.tex
+++ b/doc/orgcard.tex
@@ -9,13 +9,12 @@
% This file can be printed with 1, 2, or 3 columns per page (see below).
% Specify how many you want here.
-
\columnsperpage=3
-% Set letterpaper to 0 for A4 paper, 1 for letter (US) paper. Useful
-% only when columnsperpage is 2 or 3.
-
-\letterpaper=0
+% PDF output layout. 0 for A4, 1 for letter (US), a `l' is added for
+% a landscape layout.
+\input pdflayout.sty
+\pdflayout=(0l)
% Nothing else needs to be changed below this line.
% Copyright (C) 1987, 1993, 1996, 1997, 2001, 2002, 2003, 2004, 2005,
diff --git a/doc/pdflayout.sty b/doc/pdflayout.sty
new file mode 100644
index 0000000..114f9aa
--- /dev/null
+++ b/doc/pdflayout.sty
@@ -0,0 +1,47 @@
+% Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc.
+
+% This file is part of GNU Emacs.
+
+% GNU Emacs is free software: you can redistribute it and/or modify
+% it under the terms of the GNU General Public License as published by
+% the Free Software Foundation, either version 3 of the License, or
+% (at your option) any later version.
+
+% GNU Emacs is distributed in the hope that it will be useful,
+% but WITHOUT ANY WARRANTY; without even the implied warranty of
+% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+% GNU General Public License for more details.
+
+% You should have received a copy of the GNU General Public License
+% along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
+
+% This file defines `\pdflayout':
+% - \pdflayout=(0) is A4 portrait,
+% - \pdflayout=(1) is letter (US) portrait,
+% - \pdflayout=(0l) is A4 landscape.
+% - \pdflayout=(1l) is letter (US) landscape,
+
+\input ifpdf.sty
+
+\ifpdf
+ \def\pdflayout=(#1#2){
+ \if0#1 % A4
+ \pdfpagewidth=21cm
+ \pdfpageheight=29.7cm
+ \else\if1#1 % Letter
+ \pdfpagewidth=8.5in
+ \pdfpageheight=11in
+ \fi\fi
+ \if l#2 % Landscape
+ \edef\oldwidth{\the\pdfpagewidth}
+ \pdfpagewidth=\pdfpageheight
+ \pdfpageheight=\oldwidth
+ \fi
+ }
+\else
+ \def\pdflayout=(#1#2){}
+\fi
+
+% archtag: 63c938a5-cc78-4964-962d-603c90d34afc
+
+% arch-tag: 3464d27c-1439-473a-bc47-a7c501e8c156