[OS X TeX] Extracting portions of a LaTeX document to a file

J. McKenzie Alexander jalex at lse.ac.uk
Wed Aug 18 12:48:39 EDT 2010


Hello,

I'm attempting to extract portions of a LaTeX document to a separate file. Apparently the 'extract' package can do this, but I'm having some difficulty in getting it to work.  Consider the following minimal file:

%-----------
\documentclass{article}
\usepackage[active=true,
  generate=foobar
]{extract}

\begin{document}

This is some text
 
\extractline \title{A title which shouldn't appear}
\extractline \author{Me}
\extractline \date\today 
\extractline \maketitle

This is some other text.

\end{document}
%-----------

When I run this through pdflatex I get the following error message (actually much longer, but very similar in style - a whole bunch of "undefined control sequence" messages):

This is pdfTeX, Version 3.1415926-1.40.10 (TeX Live 2009)
 \write18 enabled.
entering extended mode
(./TSWLatexianTemp_000394.tex
LaTeX2e <2009/09/24>
Babel <v3.8l> and hyphenation patterns for english, usenglishmax, dumylang, nohyphenation, german-x-2009-06-19, ngerman-x-2009-06-19, ancientgreek, ibycus, arabic, basque, bulgarian, catalan, pinyin, coptic, croatian, czech, danish, dutch, esperanto, estonian, farsi, finnish, french, galician, german, ngerman, monogreek, greek, hungarian, icelandic, assamese, bengali, gujarati, hindi, kannada, malayalam, marathi, oriya, panjabi, tamil, telugu, indonesian, interlingua, irish, italian, kurmanji, latin, latvian, lithuanian, mongolian, mongolianlmc, bokmal, nynorsk, polish, portuguese, romanian, russian, sanskrit, serbian, slovak, slovenian, spanish, swedish, turkish, turkmen, ukenglish, ukrainian, uppersorbian, welsh, loaded.
(/usr/local/texlive/2009/texmf-dist/tex/latex/base/article.cls
Document Class: article 2007/10/19 v1.4h Standard LaTeX document class
(/usr/local/texlive/2009/texmf-dist/tex/latex/base/size10.clo)) (/usr/local/texlive/2009/texmf-dist/tex/latex/extract/extract.sty (/usr/local/texlive/2009/texmf-dist/tex/latex/tools/verbatim.sty) (/usr/local/texlive/2009/texmf-dist/tex/latex/xkeyval/xkeyval.sty (/usr/local/texlive/2009/texmf-dist/tex/generic/xkeyval/xkeyval.tex (/usr/local/texlive/2009/texmf-dist/tex/generic/xkeyval/keyval.tex))) (./TSWLatexianTemp_000394.xtr)) (./TSWLatexianTemp_000394.aux)
./TSWLatexianTemp_000394.tex:10: Undefined control sequence.
\GenericError  ...                                
                                                    #4  \errhelp \@err@                                                                  \let \@err@                                                                  \@empty \def \MessageBreak  
#1 \def  ...
l.10 ...ine \title{A title which shouldn't appear}


Any suggestions how this problem might be solved? I've looked around CTAN for other solutions, but it really seems like 'extract' is the only game in town for saving a number of disconnected portions of a document to a single file.

Cheers,

Jason

--
Dr J. McKenzie Alexander
Department of Philosophy, Logic and Scientific Method
London School of Economics and Political Science
Houghton Street, London WC2A 2AE




Please access the attached hyperlink for an important electronic communications disclaimer: http://www.lse.ac.uk/collections/planningAndCorporatePolicy/legalandComplianceTeam/legal/disclaimer.htm



More information about the MacOSX-TeX mailing list