1
0
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2025-01-10 15:56:42 +00:00

Change refcard processing to pdftex, using pdflayout.sty

This commit is contained in:
Carsten Dominik 2010-03-05 08:28:01 +01:00
parent 9d0740d0fa
commit 9178620128
5 changed files with 69 additions and 26 deletions

View File

@ -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

View File

@ -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.tex
(cd doc; pdftex 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_letter.tex: doc/orgcard.tex
perl -pe 's/\\pdflayout=\(0l\)/\\pdflayout=(1l)/' \
doc/orgcard.tex > doc/orgcard_letter.tex
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_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.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)

View File

@ -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

View File

@ -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,

47
doc/pdflayout.sty Normal file
View File

@ -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