[texhax] creating a summary document

Steve Schwartz s.schwartz at imperial.ac.uk
Sun Feb 19 19:34:31 CET 2012


On Sat, 2012-02-18 at 14:35 +0100, Neal H. Walfield wrote:
> Hi,
> I'm working on my thesis.  A common pattern has emerged: I make a
> claim, I support the claim, repeat.  I'd like to create a summary
> document, which includes the claims and an enumeration of the
> arguments, but without all of the rationale.  I want to develop this
> document inline, so it is easy to keep both consistent, if I, e.g.,
> move text around.  I could imagine using a macro to indicate what text
> is for the summary document, but I don't want to use a macro for the
> rest of the text, because this will clutter the document.  I guess
> this is possible, because it is essentially what the "List of Figures"
> is.  Is there a package to help me with this?

I once wrote a tiny .sty file that would write text out to a file of my
choosing. There is a similar capability in the moreverb package (an
environment called verbatimwrite), but I think that doesn't accumulate
text as it closes the output file immediately. Mine will keep it open
until the latex job is complete.

I attach my outfile.sty, which is a hack of a colleague's code which was
a hack of something else, probably the toc code in latex. In your case,
if I've understood what you want to do, you'll need a command that will
both typeset your material and also write it out to a file. Here's the
idea (untested). If what you write into the summary has lots of commands
or other things, you may need to \protect the contents or modify
the .sty and your usage. I'm sure this could be developed to be a lot
better and more robust.

To use, in mythesis.tex:
\addtocontents{mysummary}{#1}%  writes out argument
#1%    and typesets it as well
\outfile{mysummary}   % will create and open a file mythesis.mysummary
blah blah
\addtocontents{mysummary}{Summary of Claims}  %for summary file only
\summarybits{This will get copied into mythesis.mysummary AND typeset
more blah blah

I guess you could use \outfile{mysummary.tex} and use
\addtocontents{mysummary.tex} to write out a preamble and other
formatting for mythesis.mysummary.tex, which would then be a standalone
latex document derived from your mythesis.tex. [I used outfile.sty to
write out an html document.]


Professor Steven J Schwartz        Phone: +44-(0)20-7594-7660
Head, Space & Atmospheric Physics  Fax:   +44-(0)20-7594-7772
The Blackett Laboratory            E-mail: s.schwartz at imperial.ac.uk
Imperial College London            Office: Huxley 6M67A 
London SW7 2AZ, U.K.               Web: www.sp.ph.ic.ac.uk/~sjs
-------------- next part --------------
A non-text attachment was scrubbed...
Name: outfile.sty
Type: text/x-tex
Size: 1021 bytes
Desc: not available
URL: <http://tug.org/pipermail/texhax/attachments/20120219/90f30891/attachment.bin>

More information about the texhax mailing list