Hacker News new | ask | show | jobs
by amelius 1432 days ago
I think the point with LaTeX is that you can automate the document generation process to a great extent. For example, if you have some data, some python scripts that process the data, and some other scripts that generate figures, you can put all of that in a pipeline and build a new version of your document automatically after the data changes.
1 comments

Oh man, I completely forgot that wouldn't even be possible (presumably) in Word. What a pain!
The equivalent would be OLE, I think. Yes, Word can't trivially use the text output of a Python program, but then LaTeX can't trivially embed a chunk of an Excel document and have it updated automatically. Both systems make assumptions about what they will integrate with.
Thanks for the info. I still consider LaTeX more modular since the only assumption it makes is the name of file you want to include.
That carries quite a few assumptions - for instance that it is a file that you are including. As the name implies, with OLE you are not including a file, but an object provided by another actively running program. Let's say you wanted a text document which contained a live video view from an IP camera. That would be feasible in OLE. Obviously you would not want to print such a document, but it's not an outlandish thing to want to make for viewing on screen.

It's not really obvious which is "better" as the two mechanisms work in very different ways. If anything, I would say that OLE can be more general, but the complexity of a minimal program to supply OLE objects is quite high compared with LaTeX.

This is possible in Word (and Excel).

You can link word tables to excel and, provided your analysis updates your spreadsheet, can refresh all data instantly.

You can also refer to values in tables in the body of the text.

I know this because I worked in an environment where Word was the only option!

I’ve also programmatically programmed generation of word documents using CPAN modules in a past life. I’m sure there’s better packages these days.