[OS X TeX] Help for Windows users of MacTex files?

Themis Matsoukas tmatsoukas at gmail.com
Wed May 26 12:47:35 EDT 2010


On May 24, 2010, at 3:38 PM, Alain Schremmer wrote:

> (2) I would like to make a Front End that would allow the user:
> 
> 	(a) to open Lalala.tex–––but hopefully NOT display it,
> 	(b) to choose which in the list of commands is to be uncommented (Even I know how to do that.)
> 	(c) to typeset Lalala.tex and display Lalala.pdf

Instead of commenting/uncommenting individual commands I would use logical variables to switch on and off various features. I would put all of these switches in a master file that sets the switches and then calls lalala.tex. This file now becomes the "interface" and would look something like this:

%++++++++++++++++++++++++
%! program = pdflatex
\documentclass{...}
\usepackage {ifthen}
...load other packages...

% define action of booleans
\newcommand{\ActivateFeatures}{
   \ifthenelse{\boolean{ShowProblem}}
      {...define action if ShowProblem=true...} 
      {...define action if ShowProblem=false...} 
   ...continue with other booleans... 
}

\begin{document}

\setboolean{ShowProblemStatement}{false} % sets value of boolean ShowProblemStatement
\setboolean{ShowSolution{true} % sets value of boolean ShowSolution
...
\ActivateFeatures % activates features 
\input{lalala}

\end{document}
%++++++++++++++++++++++++

I do something similar with my homework collection to choose whether I want the solution to be typeset or not when I make handouts.

Themis


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://email.esm.psu.edu/pipermail/macosx-tex/attachments/20100526/47ccb8fd/attachment.html>


More information about the MacOSX-TeX mailing list