0

I have extracted the documentation of the longtable package and I want to compile it alone. By extracting the documentation I mean that I have copied the .dtx file from the \maketitle to the end and I've pasted it in a tex file, so I have something like:

\documentclass{ltxdoc}
\usepackage{longtable}
\begin{document}

\title{The \textsf{longtable}...
...
\end{document}

I have a minimal scheme tlmgr installation with the packages:

latex latex-bin koma-script tools amsmath babel carlisle ec geometry graphics hyperref lm marvosym oberdiek parskip pdftex-def url hyphen-spanish

Right know I'm getting the error:

! Undefined control sequence \fileversion

I want to know what to do to compile it without errors. The reason is I want to give just the source of the translated documentation attached to it.

  • 1
    why? But anyway you must be doing something wrong and you haven't provided a usable log. longtable uses the doc package for documentation and that defines \fileversion – David Carlisle Feb 14 '15 at 23:56
  • 2
    what do you mean by "extracted" longtable.dtx is distributed in that form, there is nothing to extract, just process it with pdflatex. (or in any modern tex distribution just use texdoc longtable and the documentation will be displayed) – David Carlisle Feb 14 '15 at 23:59
  • Why aren't installing packages the sane way using tlmgr? – cfr Feb 15 '15 at 0:31
  • 1
    Also, you have already installed longtable. It is included in the list of packages you posted in the question. (It is part of tools.) Unless you have set things up very non-standardly, you therefore already have a compiled copy of the documentation. – cfr Feb 15 '15 at 0:33
  • 2
    In your edited question you have shown a file that isn't the longtable documentation. Just do pdflatex longtable.dtx – David Carlisle Feb 15 '15 at 11:22
5

ltxdoc is designed to be used as an extension of doc with source files in doc format written as comments on the source file. If used in that way, doc arranges for \fileversion to be defined based on the \ProvidesPackage argument in the documented sources.

In comments it is clear that the intention is to produce translated documentation. For that I think it is better to make a normal (say article class) document that translates/paraphrases the documentation as necessary and doesn't aim to look like a documented source and in particular is distributed without copying the original package.

While TeX systems can cope with multiple files of the same name, and by managing TEXINPUTS you can arrange for the correct version to be included in each context, it is a complication that most users never have to deal with and so it would be unfortunate if teh distribution of an introductory guide caused that complication.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.