<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div>On May 24, 2010, at 3:38 PM, Alain Schremmer wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>(2) I would like to make a Front End that would allow the user:<br><br><span class="Apple-tab-span" style="white-space:pre"> </span>(a) to open Lalala.tex–––but hopefully NOT display it,<br><span class="Apple-tab-span" style="white-space:pre"> </span>(b) to choose which in the list of commands is to be uncommented (Even I know how to do that.)<br><span class="Apple-tab-span" style="white-space:pre"> </span>(c) to typeset Lalala.tex and display Lalala.pdf<font class="Apple-style-span" color="#000000"><font class="Apple-style-span" color="#144FAE"><br></font></font></div></blockquote><br></div><div>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:</div><div><br></div><div><div>%++++++++++++++++++++++++</div><div>%! program = pdflatex</div><div>\documentclass{...}</div><div>\usepackage {ifthen}</div><div>...load other packages...</div><div><br></div><div>% define action of booleans</div><div>\newcommand{\ActivateFeatures}{</div><div> \ifthenelse{\boolean{ShowProblem}}</div><div> {...define action if ShowProblem=true...} </div><div> {...define action if ShowProblem=false...} </div><div> ...continue with other booleans... </div><div>}</div><div><br></div><div>\begin{document}</div><div><br></div><div>\setboolean{ShowProblemStatement}{false} % sets value of boolean ShowProblemStatement</div><div>\setboolean{ShowSolution{true} % sets value of boolean ShowSolution</div><div>...</div><div>\ActivateFeatures % activates features </div><div>\input{lalala}</div><div><br></div><div>\end{document}</div><div>%++++++++++++++++++++++++</div><div><br></div></div><div>I do something similar with my homework collection to choose whether I want the solution to be typeset or not when I make handouts.</div><div><br></div><div>Themis</div><div><br></div><div><br></div></body></html>