[Mac OS X TeX] collecting tutorial files (for TeXShop users?)

Radhakrishnan CV cvr at river-valley.org
Mon Nov 26 10:09:13 EST 2001



On Mon, 26 Nov 2001 at 15:03, Jerome Laurens wrote:

   Someone who uses a makefile might help us creating a tutorial
   for a (tiny) book mixing say latex and metapost

I dont know what sort of Makefile you need. However, I give below a 
Makefile that I use to create various types of output from same TeX 
source:

#--------- Makefile ------------   

dvi:
	latex '\def\Status{0}\input foo.tex';
	latex '\def\Status{0}\input foo.tex;

screenpdf:
	pdflatex '\def\Status{1}\input foo.tex';
	pdflatex '\def\Status{1}\input foo.tex';
	mv foo.pdf foo-scr.pdf;

printpdf:
	pdflatex '\def\Status{2}\input foo.tex';
	pdflatex '\def\Status{2}\input foo.tex';
	mv foo.pdf foo-prn.pdf;

html:
	latex '\def\Status{3} \input foo.tex';
	latex '\def\status{3} \input foo.tex:
	mkhtml foo ; # mkhtml is a script that does an
                     # extraction job at the end
                     # of a tex4ht run

clean:
	rm *.log *.dvi *.ps *.idv *.aux *.xref *.out;

# ---------------- end of Makefile -----------

You need another file called variable.tex which will be input in 
your source document. Here it goes.

% variable.tex 

\ifcase\Status % ==> 0 for norma dvi
 \documentclass{article}
 % here goes all your other packages
 % required to generate your normal dvi
 %
\or            % ==> 1 for screen pdf
 \documentclass{article}
 \usepackage[screen,leftpanel,nocfg]{pdfscreen}
 \margins{.5in}{.5in}{.5in}{.5in}
 \screensice{6.25in}{8in}
 \overlay{overlay4.pdf}
%
%
\or            % ==> 2 for print pdf
 \documentclass{article}
 \usepackage[print]{pdfscreen}
%
%
\or            % ==> 3 for html
 \documentclass{article}
 \usepackage[html]{tex4ht]
%
%
\fi
----------------end of variable.tex ---------

Here is the source TeX document (foo.tex):

\input variable

\begin{document}

here goes your document

\end{document}

--------------------------

`make screenpdf' will generate foo-scr.pdf while `make printpdf' 
will create foo-prn.pdf for me. Similarly the other targets will do 
whatever output has been specified.

If you want metapost code embedded in your TeX sources which might 
be written to external files (as done in ConTeXt), you can include a 
line for processing the metapost files by calling mpost, in the 
relevant location of the target.

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