{automation} is about automating certain tasks when creating a (La)TeX document, e.g., with the help of {packages}, custom {macros} or {tools} for {compiling}.
83
votes
11answers
5k views
LaTeX packages for use with revision control
I use revision control (Subversion, to be exact) to keep track of the edits to my LaTeX documents. Is there a LaTeX package that interfaces with revision control? Specifically, it would be nice to see ...
76
votes
22answers
6k views
Tools for automating document compilation
A lot of people write makefiles that say something like
paper.pdf: paper.tex
pdflatex paper
bibtex paper
pdflatex paper
pdflatex paper
To handle re-running TeX to ...
31
votes
3answers
2k views
Detecting all pages which contain color
In an larger LaTeX document there are often only some pages with color content (mainly figures) and the remaining ones are only black and white.
Because printing costs for color pages are much higher ...
30
votes
1answer
519 views
TeX as the basis for data driven document generation system?
I am in the early stages of trying to replace an existing document generation system based on Microsoft Office apps (Word and Excel).
The system runs once a year to generate over 300,000 individual ...
26
votes
2answers
2k views
What's the advantage of using csquotes over using an editor's auto-replacement for "?
Many editors (TeXnicCenter, Texmaker, TeXworks, ...) offer auto-replacement of " by the desired form of quotation marks, be it `` and '' for English, "` and "' for German, or whatnot. Usually, I know ...
25
votes
2answers
974 views
Meta-question: Automated Newspaper Layout
This question might well be off topic, so feel free to close. But I hope some people reading here possess the relevant meta-knowledge.
I'm thinking (from a professional point of view) about fully ...
24
votes
10answers
3k views
Passing parameters to a document
I compile most of my documents via Makefiles which take care of the bibliography, indexes, etc. Often I'd like to compile different versions from the same TeX file changing only small things (e.g. a ...
23
votes
4answers
457 views
Smart parentheses?
Is there a way of smartly nesting parentheses and square brackets (in text mode), so that LaTeX detects nesting relations and typesets them accordingly? I'm thinking in something like csquotes does ...
23
votes
4answers
2k views
How to make Latexmk use makeglossaries?
Is there a way to make Latexmk invoke makeglossaries (part of the glossaries package)?
Specifically I want to use latexmk to compile a LaTeX document that uses the glossaries package to produce a ...
22
votes
0answers
381 views
Questions on designing a dynamic database of exercises
Almost all packages to handle exercises allow us to attach/retrieve meta-data to/from each exercise.
Some things one might want when handling exercises are:
Filter exercises according to their ...
21
votes
4answers
369 views
Count and use the number of items in advance
When writing LaTeX code, I often successively make changes like adding or removing items. I'd like to have TeX count and update the number of items in the list automatically, as in
There are ...
20
votes
4answers
3k views
Script to automate externalizing tikz graphics
Is there a script to automate externalizing tikz graphics?
(As suggested by Scott here)
20
votes
2answers
2k views
Intelligent paragraph reflowing in vim?
I'm not sure whether this is an appropriate question for tex.SE. If you think questions like this should not be asked here, please voice you concern. If necessary I'll open a question on meta.
For ...
19
votes
3answers
1k views
Replace \input{fileX} by the content of fileX automatically
Suppose I have a document with multiple include or input statements
\input{fileA}
\input{fileB}
etc.
Is there an easy way to generate a single .tex file where \input{fileA} is replaced by the ...
18
votes
2answers
645 views
Repeated slides in beamer
I have about 200 JPEG files that I need to include in a PDF document, one JPEG per page (i.e. 200 pages + intro slide). The following code successfully does this with one JPEG.
...
18
votes
2answers
334 views
How to compute the remaining space on the current page
Is there a way to compute the remaining space on the current page and issue an optional command?
17
votes
1answer
667 views
ultrafast pdflatex with precompiling
I try to improve the time pdflatex needs to compile my book.
Really working example
book.tex
%&preamble
\begin{document}
Hi
\end{document}
and
preamble.tex
\documentclass{article}
I run ...
17
votes
1answer
707 views
How to automatically arrange an unknown number of images?
I have several compilable LaTeX input files and their corresponding PDF files. Each PDF file contains any number of pages. I want to import each LaTeX input file with \lstinputlisting followed by its ...
16
votes
2answers
368 views
Automatically numbering constants
I would like to somehow use LaTeX to automatically number constants.
Some background
As a mathematician, in my daily work there are a lot of throw-away constants which are not extremely important ...
16
votes
2answers
583 views
Find optimal figure size to fit two images on one page
I often encounter a situation where I would like to fit two or three figures on one page.
I define my figures as follows:
\begin{figure}[htpb]
\centering
...
16
votes
2answers
553 views
Is there any package to automatically select font size and margins to optimize pages?
Suppose I am preparing multi-page handouts using LaTeX.
I don't care much about the font and margins size (while they are reasonable), but I would like all the pages to be filled, ie. avoid the ...
15
votes
3answers
409 views
Shortcuts for code in latex
I am tired of writing \frac{\partial something}{\partial something_else}. Can I automate it by defining some sort of shortcut to it, so that when I write \p(x)(y) it will transform to \frac{\partial ...
15
votes
3answers
362 views
Mathematical functions inside LaTeX tables
I have several tables where I have tables which may look like this:
-------------------------------------
| X | Y | X + Y | X - Y | (X + Y)/2 |
-------------------------------------
| | | | ...
15
votes
3answers
2k views
How can I avoid compiling twice?
Sometimes I need to run compile twice (eg when I use lastpage). Is there a way to set things so TeX knows that there is need for second run and do it automatically? I use Texmaker.
15
votes
2answers
621 views
Create a LibreOffice spreadsheet from luatex
After reading this amazing answer, I'm wondering if it possible to do the same thing but the other way round, that is create a LibreOffice spreadsheet from luatex, exporting data from the tex file to ...
15
votes
4answers
295 views
Using the filename in the document?
I have a bunch of documents called wk01.tex wk02.tex and so on up to (eventually) 20. These are weekly handouts for a course I TA. Currently, each document starts with a \def\classweek{5} or whatever. ...
15
votes
2answers
529 views
Predictive mode: Only auto-complete LaTeX keywords
I typeset documents in French, and I don't really need auto-completion of the words that I type. I do, however, love the completions features that Predictive mode offers for LaTeX commands.
Is there ...
14
votes
7answers
433 views
Automatic generation of pages with variable fields
I need to produce dozens of same pages, except for the part that each page has to have a different person's name on it. Imagine it as an exam, where the content is equal for every page, except that I ...
14
votes
1answer
685 views
Automatic line break in alignat
Consider the following example from http://tex.stackexchange.com/a/12782/4011
\documentclass{article}
\usepackage{amsmath}
\newcounter{eqn}
\renewcommand*{\theeqn}{\alph{eqn})}
...
14
votes
1answer
1k views
Automatic newspaper creation in LaTeX
This is a very general question about LaTeX, asked by a 100% newbie!
I'm trying to figure out if it's feasible to build an automatic newspaper creation engine, and if LaTeX can help in this field.
...
14
votes
1answer
113 views
Floats shortly after they have been \ref-erenced; Warn otherwise
In my thesis I have a many floating figures which I then reference using \ref. I use flafter to ensure that they do not appear before they are defined in the source code (See Force floats to be ...
13
votes
4answers
2k views
How to automatically skip leading white spaces in listings
This question led to a new package:
lstautogobble (lstaddons bundle)
For my programming lecture slides I heavily use the listings package with \lstnewenvironment to typeset source code. It's a ...
13
votes
2answers
298 views
Avoid linebreaks in LaTeX console / log output
Is it possible to tell the LaTeX command not to use line breaks in its console / log output?
This would make it easier to automate the processing of the log file, e.g. extracting the names of missing ...
13
votes
2answers
208 views
Persuading (la)tex “silently to go beyond the envelope of 'good taste' ” to avoid an overfull hbox
My understanding, based on reading this website, is that (la)tex performs at most three passes when trying to typeset a paragraph: one based on \pretolerance, one based on \tolerance, and one based on ...
13
votes
2answers
3k views
Inputting multiple files in LaTeX
Suppose I have a directory containing a bunch of LaTeX source files, and I want to input all of them into a single main file. I could do this by saying
\input{dir/file1.tex}
\input{dir/file2.tex}
...
12
votes
2answers
614 views
Automatically Locate Included Images
Do you think it's possible to include images into LaTeX without specifying the exact path to them. So instead of:
\includegraphics{path/to/image/myfig.pdf}
It would be:
\includegraphics{myfig.pdf}
...
12
votes
2answers
527 views
Automatically avoid more than one node when drawing a path
Background
Andrew Stacey's answer to Automatically connect nodes without overlapping other nodes or connections presents code to make a path avoid a node by going through a corner of that node ...
12
votes
6answers
598 views
Custom format file: How to automate the generation of the “precompiled preamble” whenever one of the files that are used there are changed
I would like to speed up compilation of my LaTeX documents using the precompiled preamble approach, and I was wondering whether any of the Tools for automating document compilation have support for ...
12
votes
1answer
827 views
Automatically connect nodes without overlapping other nodes or connections
In making a tree diagram with TikZ. Say that I've got the following nodes
\node(a) {\(A\)};
\node(b1) at ($(a)+(4,1)$){\(B_1\)};
\node(b2) at ($(b1)+(0,-1)$){\(B_2\)};
\node(c) at ...
12
votes
1answer
648 views
texify or latexmk?
MiKTeX 2.9 comes with both and they apparently do the same thing. I was wondering what the difference between them is (if any) and which one is preferable for large documents.
11
votes
4answers
704 views
Can small-caps be automated for abbreviations and acronyms?
Is there a way to force LaTeX to automatically use small-caps for abbreviations and acronyms (or more specifically, strings of two or more uppercase letters)?
11
votes
1answer
227 views
Automatic deletion of unused macros
The following scenario occurs quite often to me: I have a couple of input files where I have my own macros, mainly math-related stuff like definitions for \esssup and so on which are not available in ...
10
votes
3answers
688 views
Generating a table of glyphs with XeTeX
I am trying to get XeTeX to generate a table of all the possible glyphs of a given font, but can not figure out how to make XeTeX know how many glyphs the font has, so I have to specify an exact ...
10
votes
6answers
2k views
Is there an automatic process to create index creation?
Certainly, there must be some way to somewhat create a list of words suggested to be included in an index.
10
votes
4answers
517 views
Automating the creation of name badges for an event
We are organizing an event. There will be around 60 participants and I need to prepare name badges (tags) for them.
The badge will involve, name surname and affiliation fields which is different for ...
10
votes
3answers
847 views
Cross Platform LaTeX Build System
I am on Windows 7 Professional (64 bit) and would like to be able to execute one command to completely compile a PDF from source .tex files (including all required runs to get the table of contents, ...
10
votes
1answer
184 views
Automatically convert “…” to “\ldots”
Is there a way to automatically convert a basic string into a command, for example converting instances of ... to \ldots? I have to work with a large number of plaintext files, and doing a dozen ...
10
votes
1answer
544 views
Images off the page in multicols environment
Before my question, some background information.
I’ve created an algorithm (not latex) which will generate a catalog for a collection of books dynamically. A user supplies information to query an SQL ...
10
votes
1answer
389 views
Running several latex processes in parallel
I am working on an experiment running LaTeX on server to compile some documents on the fly. Assuming I want to have several workers waiting for documents to be compiled, are there any access issues in ...
9
votes
2answers
1k views
Replacement for MiKTeX's texify in TeX Live
I used to use the texify command in MiKTeX on Windows.
I would, for example, run a command like:
texify --pdf --run-viewer file.tex
which, as I understand it, would produce a pdf, automatically ...
