{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}.

learn more… | top users | synonyms

3
votes
1answer
597 views

automatically to apply \enlargethispage{\baselineskip} when single-word-widow occurs

Sometimes I encounter this single word widows instance very often, please find the right hand page, topline scoundrel. My design strategy is to leave enough white space at the bottom margin, so when ...
4
votes
1answer
410 views

Getting TextMate to call biber

I've recently made the switch to biblatex from natbib but one problem I've been unable to resolve is how to make TextMate (which is my preferred editor) call biber instead of bibtex. I've installed ...
11
votes
4answers
2k 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 ...
2
votes
1answer
186 views

Automatic new directory for new files

I am looking for some way to have a tidy folder system. My idea is, when I create a new file for latex to automatically create a new folder under the same name inside my working directory and put all ...
15
votes
3answers
707 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 ...
1
vote
0answers
61 views

Building LaTeX files by one command [duplicate]

Possible Duplicate: Tools for automating document compilation Is there a single command which would run bibtex, makeglossary (pdflatex x N ...) etc. automatically? I could create Makefile ...
10
votes
2answers
838 views

tikz External: \tikzsetnextfilename and \tikzpicturedependsonfile

Consider the following MWE. If \tikzpicturedependsonfile is commented out, the code runs as expected. A.dep is created stating the dependency of A.pdf on A.dat. Now, lets try to add the tikz source ...
5
votes
1answer
198 views

Tool to handle “precompiling the preamble” automatically

On Windows there is a nice little tool called latexdaemon that can handle "precompiling the preamble" (and thus speeding up compilation) automatically. It doesn't require any additional setup: one ...
8
votes
1answer
191 views

Is there a macro telling which OS we're using?

I got some LaTeX documents that I have to compile them under different TeX Live, such as MacTeX or TeX Live. But in different OS, the font seems different too, for example, while in Windows, I prefer ...
13
votes
2answers
250 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 ...
7
votes
2answers
405 views

Auto-generating tables using etoolbox

I have a particular problem which I am trying to solve using etoolbox, but I can't figure out how. What I'm trying to do is to auto-generate a table based on information from a previous table. This is ...
7
votes
2answers
222 views

latexmk endless loop when non-PDF outputs are specified

My source file is based on the standalone package. The \documentclass command specifically looks like this: \documentclass[preview, convert={density=300}]{standalone} If the source file is named ...
19
votes
1answer
1k 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 ...
5
votes
1answer
419 views

Iterating over files in a directory and including them

I have a folder called diary which contains a series of files: 20120101.tex 20120105.tex 20120304.tex etc. How can I create a single LaTeX document that includes each of these files, in ...
10
votes
1answer
209 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 ...
15
votes
3answers
578 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 | ------------------------------------- | | | | ...
5
votes
5answers
1k views

Automation: static array for the sieve of Eratosthenes

I would like to produce one simple array of numbers from 1 to 100 of dimension 10*10, where 1 will not be displayed. In Sieve of Eratosthenes in tikz there are pretty animations, but what I need is ...
18
votes
2answers
2k 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 ...
5
votes
0answers
201 views

Dynamically applying formatting to regular expressions [closed]

One useful tool I find in InDesign are the Grep styles. With them, one can define character styles (e.g., boldface in small caps) for whatever expression matches the grep pattern. I know this is ...
7
votes
1answer
761 views

Timeline with automatized hours and minutes

Some time ago I've asked a question about Timelines, many solutions were given, but in the end I decided to go with TikZ and also presented my solution. But I couldn't have done it without Torbjørn ...
5
votes
0answers
439 views

Trying to make an automatic histogram (in pgfplots?) [closed]

How can I convert the automatic table generated by the macro, to an automatic histogram? Is the best way do it using pgfplots? \documentclass{article} \RequirePackage{ifthen} ...
2
votes
1answer
154 views

Recover TeX source from automatically generated LaTeX files

Maybe the question can not be exactly understood from the title. So, to automate things a bit, instead of rewriting everything when adding different pictures and tables, code was made to add ...
22
votes
4answers
776 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 ...
0
votes
0answers
45 views

Creating tables from files [duplicate]

Possible Duplicate: How typeset a numeric table from a CSV file I use the pgfplots package to add graphics to my LaTeX documents. Usually I have a data set in a .dat (plain text) document ...
3
votes
1answer
194 views

Check if non-empty subsection exists under another section

I'd like to try to make a LaTeX class which enforces a number of (non-empty) sections to exist-- if the user doesn't define them manually, then some default section content will be created. ...
5
votes
2answers
152 views

Automatic linebreaking inside displaymath

Yes, I know of the existence of breqn, and I am very excited about this package. I am trying to write a mathematics paper, that will be typeset in two different styles (different page sizes, and ...
2
votes
0answers
195 views

Large block diagrams with auto positioning [closed]

I need to make some (large) maintainable block diagrams. Some small diagrams I already made using Tikz, but I always need to specify the placement of every block. Now for large diagrams this could be ...
6
votes
1answer
1k views

Include figure (from macro) with underscore in filename

I have a system of where a .tex is generated from a program. The final .tex file has a (simplified) structure like this: \newcommand{\PlotFrame}[1]{% \begin{frame} \frametitle{...} ... ... ...
7
votes
1answer
113 views

How to avoid the need to declare already declared items in \index?

Code: \documentclass{article} \usepackage{index} \usepackage{lipsum} \makeindex \begin{document} \section{\index*{Hello World}} Hello World Some text about \index*{foo}. \lipsum[1-15] Hello ...
5
votes
1answer
172 views

How do I make future equations renumber as extensions of previous equations?

I'm looking to do the following automatically rather than manually \documentclass{article} \usepackage{amsmath} \begin{document} These equations are pretty important. \begin{align} ...
34
votes
1answer
841 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 ...
4
votes
2answers
1k views

Automatically run Latex command after saving .tex file in Emacs

How can I have Emacs call the Latex command every time after I save my .tex file? Thanks A solution: while playing with ELisp and looking around, I added this to .emacs and it seems to work quite ...
15
votes
2answers
935 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 ...
10
votes
1answer
832 views

Create a “yearbook-style” multi-page layout of photos

I would like to create a "yearbook-style" layout of photos in LaTeX. Each photo would have a caption and the objective would be to automatically layout the differently sized rectangular photos to ...
5
votes
1answer
293 views

Automatically capitalize macro output if used after a period [duplicate]

Possible Duplicate: Detect beginning of a sentence in a macro for capitalization Is it possible to write a macro that is able to determine if it is used at the beginning of a sentence? For ...
2
votes
3answers
364 views

using AutoHotKey to streamline LaTeX document authoring

Is it possible to use AutoHotKey to facilitate LaTeX document authoring? In which ways? Is there any off the shelf AutoHotKey script for this purpose?
20
votes
1answer
899 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 ...
4
votes
0answers
44 views

makebbx - program similar to makebst? [duplicate]

Possible Duplicate: Is there a style definition helper for creating biblatex citation styles, like makebst for biblatex? There is a "program" called makebst that allows creating of ...
1
vote
0answers
167 views

Script to import .bib and output HTML based on a style [closed]

I'm able to use various tools (such as pyP2B.py) to generate a BibTex database. I've also successfully created a AMA styled RTF of the database using JabRef and the APAish extension, although this ...
14
votes
1answer
4k views

Auto generate an Index

Is there any way to auto-gererate an index for the makeidx package? I've written ~270 pages and didn't think of adding \index{} everywhere. Do I really need to go over everything and add \index{}?
3
votes
1answer
151 views

How to automatize the creation of arrows in TikZ?

I'm creating yet another graph and I don't have particular problems. I can easily create the nodes, assign IDs and create arrows/paths using these IDs. But when there is a lot of content and there is ...
17
votes
1answer
144 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 ...
7
votes
3answers
411 views

How to define a key=value that has an equivalent boolean value key

Assume you're defining a key=value align for some environment realign that you'll use in the following way: \usepackage{xkeyval}% http://ctan.org/pkg/xkeyval \newenvironment{realign}[1][] ...
44
votes
3answers
5k 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 ...
16
votes
2answers
515 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 ...
11
votes
1answer
539 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 ...
10
votes
1answer
527 views

Label automatically positioned so that it doesn't overlap anything

I produce automatically generated LaTeX-files with nodes and links. Is it possible to put the label of the node outside of the node and it is automatically positioned somewhere, such that there is no ...
12
votes
1answer
333 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 ...
1
vote
0answers
134 views

How to treat specific words formatting (ie. API names to wrap inside texttt command)? [closed]

I would like to know if there is any elegant way to treat specific words as symbols, and automatically wrap them with a \texttt command. This would come handy with API names for instance, so \texttt ...
16
votes
1answer
1k 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})} ...