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

Alain Schremmer schremmer.alain at gmail.com
Wed May 26 14:03:26 EDT 2010


On May 26, 2010, at 12:47 PM, Themis Matsoukas wrote:

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

I think that what I am doing is pretty much along the above lines:  
Each one of the commands to be commented/uncommented sets a number of  
booleans elsewhere. The commands themselves make up what I call a  
control file that then calls a content file that then calls a number  
of item files in a question base folder which are handled according  
to the way the booleans were set by the command.

In other words, the user sees only the short control file and it  
works absolutely like a charm. I will upload the whole system for  
other LaTeX conscious people to use and play with.

However, while a lot of non-LaTeX-conscious people might possibly be  
willing to make a one-click LaTeX installation on their machine, it  
is a lot more than likely that that will be where they draw the line:  
these people are not about to be willing to do anything INSIDE a  
LaTeX file.

So, the idea was to have the control file look like, say,

%%%===========================1
%		\QuestionsOnly
%%%===========================2
%		\QuestionsWithSpaceForOpenResponses
%%%===========================3
%		\QuestionsWithDiscussions

and then have a FrontEnd,app looking something like

-------------- next part --------------
A non-text attachment was scrubbed...
Name: AssessmentDocMaker2d.pdf
Type: application/applefile
Size: 29351 bytes
Desc: not available
URL: <http://email.esm.psu.edu/pipermail/macosx-tex/attachments/20100526/d04e7591/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: AssessmentDocMaker2d.pdf
Type: application/pdf
Size: 28684 bytes
Desc: not available
URL: <http://email.esm.psu.edu/pipermail/macosx-tex/attachments/20100526/d04e7591/attachment.pdf>
-------------- next part --------------


so that pulling down "Assessment Document is to be ..."  to, say,  
"Questions With Discussions" would let the FrontEnd.app find, in the  
control file selected by the user in the first step, the string

%%%===========================3
%

and replace it with the string (with a carriage return at the end)

%%%===========================3

so that now the following line which was commented:

%		\QuestionsWithDiscussions

would now be uncommented:

		\QuestionsWithDiscussions

(Actually, it's a bit more complicated because FrontEnd.app will also  
have to make sure that

  		\QuestionsWithDiscussions

is the only uncommented line and, if not, will have to comment any  
other uncommented line.)

Thus, the user would never even SEE the control file selected in the  
first step and only the FrontEnd.app and, hopefully, the typeset pdf  
file.

But, while I think I might eventually be able to figure out how to  
let TeXShop do the work, like talking to LaTeX, I don't have the  
first clue as to what to do outside the Mac world and this is where I  
need to find information.

Grateful regards
--schremmer




More information about the MacOSX-TeX mailing list