[Mac OS X TeX] can i make references invisible?
Radhakrishnan CV
cvr at river-valley.org
Fri Jan 18 22:51:12 EST 2002
On 18 Jan 2002 at 20:35, tom keyes wrote:
NSF wants the body of a proposal in one pdf file, references
in another. With TeX I only know how to make a single file
containing both. From asking around I understand some people
do this by editing the dvi file. Is that what you have to do?
Seems it would be nice if there was a way to declare part of a
document 'invisible', ie, 'don't put the references in the
pdf'. TIA for any hints....Tom
The best way will be to use the pdfpages.sty available at CTAN. Here
is the step by step procedure:
1. Generate your pdf document in full that includes the references.
Please start your references in a new page.
2. Create a dummy tex document, say foo.tex and include the
pdfpages.sty. After \begin{document} provide the command
to extract the required pages. It might look like:
\documentclass{article}
\usepackage[final]{pdfpages}
\begin{document}
\includepages[pages={<start_pageno>-<end_pageno>]{pdf_filename}
\end{document}
3. Run pdfLaTeX over foo.tex, you will get foo.pdf which has only
the pages you have specified. Rename this to text.pdf or whatever.
4. Repeat the job for reference pages.
If you know how to run a Makefile, you get everything in a single
go painlessly. Here is one that might help you:
#------------ cut here --------------
# Makefile to extract pages
#
PDFDOC=dummy.pdf
# provide your composite document name
TEXTNAME=text.pdf
# name to be assigned to the textual part
REFNAME=ref.pdf
# name to be assigned to the ref part
TEXTSTART=1
# start page of text
TEXTEND=3
# end page of text
REFSTART=4
# start page of references
REFEND=5
# end page of references
all: text references
text:
echo "\\documentclass{article}" > tmp.tex;
echo "\\pagestyle{empty}" >> tmp.tex;
echo "\\usepackage[final]{pdfpages}" >> tmp.tex;
echo "\\begin{document}" >> tmp.tex;
echo "\\includepdf[pages=$(TEXTSTART)- \
$(TEXTEND)]{$(PDFDOC)}" >> tmp.tex;
echo "\\end{document}" >> tmp.tex;
pdflatex tmp.tex;
pdflatex tmp.tex;
mv tmp.pdf $(TEXTNAME);
references:
echo "\\documentclass{article}" > tmp.tex;
echo "\\pagestyle{empty}" >> tmp.tex;
echo "\\usepackage[final]{pdfpages}" >> tmp.tex;
echo "\\begin{document}" >> tmp.tex;
echo "\\includepdf[pages=$(REFSTART)- \
$(REFEND)]{$(PDFDOC)}" >> tmp.tex;
echo "\\end{document}" >> tmp.tex;
pdflatex tmp.tex;
pdflatex tmp.tex;
mv tmp.pdf $(REFNAME);
clean:
rm -f *.log *.aux *. tmp.tex
#------------ cut here ------------
make all at the command prompt will give you the text.pdf and
ref.pdf. You can provide any name you like for your output files at
the top of the Makefile.
While cutting and pasting this to your editor and saving it as
Makefile, you run the risk of changing the tab character into 8
spaces. Make needs a tab character as the first character in all the
lines except the target. Make is very sensitive to this.
--
Radhakrishnan
-----------------------------------------------------------------
To UNSUBSCRIBE, send email to <info at email.esm.psu.edu> with
"unsubscribe macosx-tex" (no quotes) in the body.
For additional HELP, send email to <info at email.esm.psu.edu> with
"help" (no quotes) in the body.
This list is not moderated, and I am not responsible for
messages posted by third parties.
-----------------------------------------------------------------
More information about the MacOSX-TeX
mailing list