Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Best practices to use LaTeX as a document format

238 views
Skip to first unread message

Leo Liu

unread,
Apr 21, 2013, 11:32:54 PM4/21/13
to
Hi there,

I have been thinking about this after quite a few troubles of getting
documents written long ago to compile cleanly under TeX live 2012 due to
the new releases of packages the documents depend on. I haven't been
able to make them all compile cleanly again.

My conclusion is using LaTeX as a document format is a nightmare.

What is your experience and what are the best practices that you follow
to ensure the document you write today will compile any day later?

(for example, it would seem useful if I can easily freeze the list of
packages my document depends on).

Thanks.
Leo

Nasser M. Abbasi

unread,
Apr 22, 2013, 1:06:57 AM4/22/13
to
On 4/21/2013 10:32 PM, Leo Liu wrote:
> Hi there,
>
> I have been thinking about this after quite a few troubles of getting
> documents written long ago to compile cleanly under TeX live 2012 due to
> the new releases of packages the documents depend on. I haven't been
> able to make them all compile cleanly again.
>
> My conclusion is using LaTeX as a document format is a nightmare.
>

But isn't still better than using closed source binary format, where
one day you'll find you have 100's of binary files that can not
be read any more when you upgrade something? remember corel wordperfect?
lotus 123? chiwriter? etc...

But what else is better than Latex? not MSword surely?

> What is your experience and what are the best practices that you follow
> to ensure the document you write today will compile any day later?
>
> (for example, it would seem useful if I can easily freeze the list of
> packages my document depends on).
>

How about this: Make a virtual machine just for your latex
setup, and do not change it. The nice thing about virtual machines,
is that you can have many of them and they do not cost anything. VBox
is free. disk space is cheap.

This is what I do. I have a Linux VM to use just for my latex,
and I do not change it, if everything is working fine on it.
If I want to try something, I try that first on different VM
first. So if a new version of Latex is out, try it first on a new
VM, make sure it works for you. If not, just delete that VM
and you still have the stable one.

You can access all your shared data from the VM easily by
mounting disks into it. So your data still lives where it is,
but your application is saved in its own VM. This way you
know any changes you make in one VM do not affect the
other. The VM is just a file. So just make sure you back up
your disk where the VM is created on ofcourse.

--Nasser

unruh

unread,
Apr 22, 2013, 1:18:45 AM4/22/13
to
On 2013-04-22, Leo Liu <sdl...@gmail.com> wrote:
> Hi there,
>
> I have been thinking about this after quite a few troubles of getting
> documents written long ago to compile cleanly under TeX live 2012 due to
> the new releases of packages the documents depend on. I haven't been
> able to make them all compile cleanly again.

How long ago? And what were the problems.

>
> My conclusion is using LaTeX as a document format is a nightmare.

Since we have no idea what your problems were we have no idea whether
this is an overreaction or not (it sure sounds like it).

>
> What is your experience and what are the best practices that you follow
> to ensure the document you write today will compile any day later?

No such assurance ever.

>
> (for example, it would seem useful if I can easily freeze the list of
> packages my document depends on).

???
I would seem to me that the list was frozen when you created the
document long ago.


Robert Heller

unread,
Apr 22, 2013, 8:02:00 AM4/22/13
to
At Mon, 22 Apr 2013 05:18:45 GMT unruh <un...@invalid.ca> wrote:

>
> On 2013-04-22, Leo Liu <sdl...@gmail.com> wrote:
> > Hi there,
> >
> > I have been thinking about this after quite a few troubles of getting
> > documents written long ago to compile cleanly under TeX live 2012 due to
> > the new releases of packages the documents depend on. I haven't been
> > able to make them all compile cleanly again.
>
> How long ago? And what were the problems.
>
> >
> > My conclusion is using LaTeX as a document format is a nightmare.
>
> Since we have no idea what your problems were we have no idea whether
> this is an overreaction or not (it sure sounds like it).
>
> >
> > What is your experience and what are the best practices that you follow
> > to ensure the document you write today will compile any day later?
>
> No such assurance ever.

*I* had no trouble compiling a document from the late 1980s / early 1990s
(created on a VAX/VMS machine and restored from a backup of the long shutdown
machine) with a modern version a LaTeX on a Linux box in the early 2000s. It
compiled without any problems. The OP must be doing strange things and/or
using non-standard packages or something.

>
> >
> > (for example, it would seem useful if I can easily freeze the list of
> > packages my document depends on).
>
> ???
> I would seem to me that the list was frozen when you created the
> document long ago.
>
>
>

--
Robert Heller -- 978-544-6933 / hel...@deepsoft.com
Deepwoods Software -- http://www.deepsoft.com/
() ascii ribbon campaign -- against html e-mail
/\ www.asciiribbon.org -- against proprietary attachments



Dr Engelbert Buxbaum

unread,
Apr 22, 2013, 12:47:59 PM4/22/13
to
In article <m11ua32...@gmail.com>, sdl...@gmail.com says...
Most packages are backward-compatible, that is, you may get warnings
about outdated syntax, but your document will still compile, and in
exactly the look as it did previously. At least, that has been my
experience over the last 25 years.

This is very much different from systems with binary document formats.
Who still remembers Wordstar2000, a program that was "standard" when I
wrote my master- and PhD theses. Had I used it, I could no longer access
them. The LaTeX209 code still compiles.

Unless you tell us what specific problems you ran into, it is impossible
to advice.

--
Car (noun): erratically moving obstacle on the road

Scott Pakin

unread,
Apr 22, 2013, 3:41:10 PM4/22/13
to
On 04/21/2013 09:32 PM, Leo Liu wrote:
> (for example, it would seem useful if I can easily freeze the list of
> packages my document depends on).

You might be interested in my bundledoc script:

http://www.ctan.org/tex-archive/support/bundledoc

-- Scott

jon

unread,
Apr 23, 2013, 1:08:36 AM4/23/13
to
On Apr 22, 8:02 am, Robert Heller <hel...@deepsoft.com> wrote:
> At Mon, 22 Apr 2013 05:18:45 GMT unruh <un...@invalid.ca> wrote:
>
>
>
>
>
>
>
>
>
>
>
> > On 2013-04-22, Leo Liu <sdl....@gmail.com> wrote:
> > > Hi there,
>
> > > I have been thinking about this after quite a few troubles of getting
> > > documents written long ago to compile cleanly under TeX live 2012 due to
> > > the new releases of packages the documents depend on. I haven't been
> > > able to make them all compile cleanly again.
>
> > How long ago? And what were the problems.
>
> > > My conclusion is using LaTeX as a document format is a nightmare.
>
> > Since we have no idea what your problems were we have no idea whether
> > this is an overreaction or not (it sure sounds like it).
>
> > > What is your experience and what are the best practices that you follow
> > > to ensure the document you write today will compile any day later?
>
> > No such assurance ever.
>
> *I* had no trouble compiling a document from the late 1980s / early 1990s
> (created on a VAX/VMS machine and restored from a backup of the long shutdown
> machine) with a modern version a LaTeX on a Linux box in the early 2000s. It
> compiled without any problems. The OP must be doing strange things and/or
> using non-standard packages or something.

i think the o.p. typesets a lot of documents in chinese; it may be
that the (surely)
complex packages involved in that process are not as 'stable' as, say,
longtable
or multicols, etc.

(but i really have no idea what the situation is for non european
languages, or
indeed many european languages!)

cheers,
jon.

Leo Liu

unread,
Apr 23, 2013, 2:53:10 AM4/23/13
to
On 2013-04-23 13:08 +0800, jon wrote:
> i think the o.p. typesets a lot of documents in chinese; it may be
> that the (surely)
> complex packages involved in that process are not as 'stable' as, say,
> longtable
> or multicols, etc.
>
> (but i really have no idea what the situation is for non european
> languages, or
> indeed many european languages!)
>
> cheers,
> jon.

Not really. Although Chinese is my second language I hardly ever used it
in the last 7 years and certainly haven't written anything in Chinese
using LaTeX.

Leo

Martin Heller

unread,
Apr 23, 2013, 3:30:21 AM4/23/13
to
Scott Pakin wrote, on 22-04-2013 21:41:
> You might be interested in my bundledoc script:
>
> http://www.ctan.org/tex-archive/support/bundledoc
>

Or Heiko Oberdiek's mkjobtexmf script

http://www.ctan.org/pkg/mkjobtexmf

which generates a texmf tree containing the files used in a particular job.


jon

unread,
Apr 23, 2013, 11:46:54 AM4/23/13
to
ah, sorry! i confused you with someone of the same name at the
stackexchange site. my apologies.

cheers,
jon.

unruh

unread,
Apr 23, 2013, 11:49:07 AM4/23/13
to
So you are willing to tell us what you do NOT do, but unwilling to tell
us what it is that your latex IS having problems with.


>
> Leo

Joris Pinkse

unread,
Apr 23, 2013, 2:42:11 PM4/23/13
to
Hello,

I've had similar experiences, but thankfully most could be fixed fairly
easily and were caused by packages that were not fully
backward-compatible. I don't recall all cases nor the exact
circumstances, but cleveref and pgf come to mind. Hope my recollection
is accurate.

Best,

J.

Dan Luecking

unread,
Apr 23, 2013, 7:36:33 PM4/23/13
to
On Mon, 22 Apr 2013 11:32:54 +0800, Leo Liu <sdl...@gmail.com> wrote:

>Hi there,
>
>I have been thinking about this after quite a few troubles of getting
>documents written long ago

How long ago?

> to compile cleanly under TeX live 2012

What errors?

>due to
>the new releases of packages the documents depend on.

What packages?

>I haven't been
>able to make them all compile cleanly again.
>
>My conclusion is using LaTeX as a document format is a nightmare.
>
>What is your experience and what are the best practices that you follow
>to ensure the document you write today will compile any day later?

This has never been an issue for me. I have always been able
to edit the old document rather easily and get a clean compile.
Except if the file is so old that it used LaTeX2.09 (almost
19 years out of date now). I've still been able to do it, but
not so easily.

One thing you can do is bundle all old .sty files that were
used with your document when you archive it. Unless the document
was written for LaTeX 2.09, then you may need a complete backup
copy of LaTeX 2.09. I used to keep one around, but used it only
once so it's now gone.


Dan
To reply by email, change LookInSig to luecking

Axel Berger

unread,
Apr 24, 2013, 1:43:34 AM4/24/13
to
Dan Luecking wrote:
> This has never been an issue for me. I have always been able
> to edit the old document rather easily

After an update beamer class and microtype became incompatible and made
pdflatex crash without writing a meaningful error message. Of course at
that time the old pdf has already been deleted and overwritten.
I still shudder at the thought of finding a typo less than half an hour
before giving a talk ...
(Yes, I always carry several backups, but still.)

Axel

Leo Liu

unread,
Apr 24, 2013, 4:53:17 AM4/24/13
to
On 2013-04-23 23:49 +0800, unruh wrote:
> So you are willing to tell us what you do NOT do, but unwilling to tell
> us what it is that your latex IS having problems with.

See my recent post on this group: <m1ppye2...@gmail.com>

and http://goo.gl/fTJcV on tex.stackexchange.com.

I tend to use a lot of packages and they often bave bad interplay. If I
take the minimal approach i.e. using just the standard document-style it
would probably be compatible for a long while but the document wouldn't
be in the good shape I want it to be.

Leo

Peter Flynn

unread,
Apr 24, 2013, 4:54:25 PM4/24/13
to
I also deal with documents using a lot of packages: 30 or more is not
uncommon, and I don't have the problems you mention except on very rare
occasions.

The problems of incompatibility in the documents I deal with arise far
more often when a client is trying to process them on an *older* LaTeX
installation, when the packages/classes I have used for them assume a
current distribution.

One thing you could do is specify the release date of each class and
package you use, eg \RequirePackage[utf8x]{inputenc}[2008/03/30] (using
the date you will find as the first token in the optional argument to
the \ProvidesPackage in the .sty file. At least this will enable
error-reporting when you try to run it on an older version (I *think*
the date argument means "works with this version at earliest" rather
than "works only with this version").

///Peter

Guenter Milde

unread,
Apr 25, 2013, 3:12:11 AM4/25/13
to
On 2013-04-24, Leo Liu wrote:

> I tend to use a lot of packages and they often bave bad interplay. If I
> take the minimal approach i.e. using just the standard document-style it
> would probably be compatible for a long while but the document wouldn't
> be in the good shape I want it to be.

Generally, you have to compromise between a stable document format that
compiles everywhere (using just "base" packages) or convenient use of
advanced features via contributed packages.

While the base LaTeX2e format is stable and fully backwards compatible, this
cannot be enforced for contributed packages. There are many experimental
packages on CTAN that can and will evolve over time.

As a rule of thumb: the more magic a package is capable to do, the more
fragile it is. Fortunately, there are also advanced packages with a
proven record for stability and maintainers actively working on fixing
problems.

Maybe the LaTeX FAQ has (or could have) an page with "recommended" packages.
In Debian, the TeXLive distribution comes in "base", "recommended"
and "extra" packages.

Günter

Robin Fairbairns

unread,
Apr 25, 2013, 2:39:13 PM4/25/13
to
Guenter Milde <mi...@users.sf.net> writes:

> On 2013-04-24, Leo Liu wrote:
>
>> I tend to use a lot of packages and they often bave bad interplay. If I
>> take the minimal approach i.e. using just the standard document-style it
>> would probably be compatible for a long while but the document wouldn't
>> be in the good shape I want it to be.
>
> Generally, you have to compromise between a stable document format that
> compiles everywhere (using just "base" packages) or convenient use of
> advanced features via contributed packages.
>
> While the base LaTeX2e format is stable and fully backwards compatible, this
> cannot be enforced for contributed packages. There are many experimental
> packages on CTAN that can and will evolve over time.
>
> As a rule of thumb: the more magic a package is capable to do, the more
> fragile it is. Fortunately, there are also advanced packages with a
> proven record for stability and maintainers actively working on fixing
> problems.

the problem comes with packages like geometry whose interface proves
"just wrong" and a complete reimplementation is done. it doesn't matter
(much) if it's an obscure oddity, but geometry (for one) gave me a fair
bit of hassle at work.

> Maybe the LaTeX FAQ has (or could have) an page with "recommended"
> packages.

do you a convenient army of volunteers to deal with the >>4000 packages
on ctan? i'm certainly not doing any such thing.

> In Debian, the TeXLive distribution comes in "base", "recommended"
> and "extra" packages.

and? whose classification is that?

i've given up on debian's classification (i use ubuntu), and use a
complete tex live. most rational people wouldn't want that...
--
Robin Fairbairns, Cambridge

Wolfgang Jeltsch

unread,
Apr 26, 2013, 12:27:08 PM4/26/13
to
Am Wed, 24 Apr 2013 21:54:25 +0100 schrieb Peter Flynn:

> One thing you could do is specify the release date of each class and
> package you use, eg \RequirePackage[utf8x]{inputenc}[2008/03/30].

Note that also \usepackage accepts such an optional argument after the
package argument.

> I *think* the date argument means "works with this version at earliest"
> rather than "works only with this version".

Yes, this is what it means.

Best wishes,
Wolfgang

Didier Verna

unread,
Apr 26, 2013, 3:24:10 PM4/26/13
to

These are mostly shameless plugs, but anyway... ;-)

Leo Liu <sdl...@gmail.com> wrote:

> I have been thinking about this after quite a few troubles of getting
> documents written long ago to compile cleanly under TeX live 2012 due
> to the new releases of packages the documents depend on. I haven't
> been able to make them all compile cleanly again.
>
> My conclusion is using LaTeX as a document format is a nightmare.

It is, and there is nothing you can do about it, because LaTeX is like
a living organism. See

http://www.lrde.epita.fr/~didier/research/publis.php#verna.10.tug

and perhaps

http://www.lrde.epita.fr/~didier/research/publis.php#verna.11.onward


> What is your experience and what are the best practices that you follow
> to ensure the document you write today will compile any day later?

Not exactly what you're looking for, but you may find a couple if
ideas here as well:

http://www.lrde.epita.fr/~didier/research/publis.php#verna.11.tug

--
ELS 2013, June 3/4, Madrid, Spain: http://els2013.european-lisp-symposium.org

Scientific site: http://www.lrde.epita.fr/~didier
Music (Jazz) site: http://www.didierverna.com

Peter Flynn

unread,
Apr 26, 2013, 3:45:13 PM4/26/13
to
On 04/22/2013 04:32 AM, Leo Liu wrote:
> Hi there,
>
> I have been thinking about this after quite a few troubles of
> getting documents written long ago to compile cleanly under TeX live
> 2012 due to the new releases of packages the documents depend on. I
> haven't been able to make them all compile cleanly again.

Could you please post the original document somewhere (minimised to omit
any private or irrelevant content) so that we can see what the problem is?

> My conclusion is using LaTeX as a document format is a nightmare.

If you are talking about upgrading a document from LaTeX 2.09 to
LaTeX2e, then yes. But that's a once-off event, and the same applies to
most systems where a document has lain fallow for decades.

> What is your experience and what are the best practices that you
> follow to ensure the document you write today will compile any day
> later?

Construct it with care and document how it was done and why. Or use a
more robust file format like XML, and only transform to LaTeX (or HTML,
or whatever) when you want output.

///Peter

Philipp Stephani

unread,
May 11, 2013, 2:55:12 PM5/11/13
to

Lupo

unread,
May 16, 2013, 8:45:46 AM5/16/13
to
My experience:

use simple tags

use a SQL DB for your text blocks

enrich for example program-sources (i.e. PHP, C, DELPHI etc.) with LaTeX

use a little programm that brings all together in a tex-file, so special
builds can be queried by SQL

use LaTex, pdfLaTex or other

and you have the very best!

Turgut Durduran

unread,
Jul 24, 2013, 2:51:14 AM7/24/13
to
On 2013-04-22, Leo Liu <sdl...@gmail.com> wrote:
> (for example, it would seem useful if I can easily freeze the list of
> packages my document depends on).


Look into packages like "bundledoc". It will search for everything that
your document depends on and make a compressed archive containing all the
parts. You will have copies of everything as they were installed on your
computer on the day of compilation. I believe if you then unzip it in a
new folder and compile your document it will use the local copies rather
than the system ones.
0 new messages