31 votes

Can LaTeX automatically itemize a list?

You can use \read to read a text file line by line wordlist.txt red orange yellow green blue indigo violet file.tex \documentclass{article} \newread\wordlist \openin\wordlist=wordlist.txt \begin{...
30 votes
Accepted

Automatically generate graphics which shows light diffusion on a rough surface

Here's an attempt in Metapost. Using the direction x of y macro to find the required angle of reflection. Here's what you get with r=0: And with r=0.33: prologues := 3; outputtemplate := "%j%c....
  • 36.7k
25 votes

Automatically generate graphics which shows light diffusion on a rough surface

Our TikZers getting lazy I guess. This can't get away without a TikZ answer :P Same idea but using decorations (over and over again). \documentclass[tikz]{standalone} \usetikzlibrary{decorations....
  • 155k
25 votes
Accepted

How to make these boxes?

Update After new requirement in comments, now theres just one environment coolbox with a mandatory argument (the file image to be used) and two optional ones: \begin{coolbox}[<options for the box&...
24 votes

How to make these boxes?

\documentclass[border=2pt]{standalone} \usepackage{tikz,xcolor} \usetikzlibrary{calc} \definecolor{skyblue}{HTML}{B9E1FD} \begin{document} \begin{tikzpicture}[line width=.7pt, ...
  • 45.1k
23 votes

Ultrafast PDFLaTeX with precompiling

For the benefit of people using a search engine arriving here looking for how to convert a never-changing but slow-loading preamble into a super-quick "precompiled" format. The instructions here take ...
  • 3,822
21 votes

Compiling (La)TeX files automatically with GitLab CI

Backstory I maintain a huge repository of lecture notes written in LaTeX, once hosted on GitHub. Now it can be found HERE on GitLab.com. I use Continuous Integration to automatically compile all ...
  • 2,071
20 votes

Auto generate an Index

I know this is an old thread, but I want to mention that I have just released a piece of software to address this problem. It isn't perfect, but as a "semi-automatic" solution it is a lot faster than ...
18 votes
Accepted

Automatic document generation based on a database

Following Jim's suggestion, I wrote down an Python-code that does what I wanted to do. Even if it is more Python oriented, I think it might be interesting to post the answer here. (Since we're TeXer ...
  • 11k
18 votes
Accepted

Can LaTeX automatically itemize a list?

I propose a solution using the csvsimple package. \documentclass{article} \usepackage{csvsimple} \begin{filecontents}{list.csv} religion religious rely remain \end{filecontents} \begin{document} \...
  • 2,748
16 votes
Accepted

Automatically validate and format ISBNs

Please try biber 2.2 (along with biblatex 3.1). The --validate-datamodel option will report on invalid ISBNs. The new options --isbn10 will force ISBNs to 10-digit format and --isbn13 to 13-digit. --...
  • 21.8k
15 votes
Accepted

Automatically include a sequence of images

Here is an option using multido: \documentclass{beamer} \usepackage{multido} \begin{document} \multido{\i=1+1}{9}{% \begin{frame} \frametitle{Title: \i} \framesubtitle{Subtitle: \i} \...
  • 572k
14 votes

Can Texmaker, as I'm typing, automatically create a preview of the document's PDF output?

Try Gummi, the lightweight and very efficient alternative to Texmaker. It can do the automatic compilation as described. If you are on Ubuntu, Gummi is included in the official repository, so just do ...
  • 251
13 votes
Accepted

Appending an empty row after every 5 or 10 rows in LaTeX table

The following solution sets up an environment blocktable derived from longtable that provides the desired functionality using LaTeX only. Implementation notes First, a few counters are needed: \...
  • 13.1k
12 votes

Combination of arrows with and without label

Substantially REVISED to achieve what was missing on the earlier post. Namely, all desired arrow types are supported (albeit with wavy, rather than jagged, squiggle), uniform arrow lengths are ...
11 votes

How to make Latexmk use makeglossaries?

My sources and generated files are in separated directories. Running mhp's solution I got the error: (require "doc.xdy") ERROR: Could not find file "doc.xdy". Then I extended the solution to: file: ...
  • 211
11 votes
Accepted

Automating extraction of Markdown-formatted tables from an (incomplete) LaTeX document

The following command may surprise you, because it achieves in a single pipeline what you want (or at least, it achieves what I think that you want). The command fits into a single Tweet even :) &...
  • 3,581
11 votes

TexStudio: Compile and Preview on File Save

To add to gusbrs's answer. Because Ctrl+S is in my muscle memory, I chose to bind Build & View as Ctrl+S which works great for me.
  • 153
11 votes
Accepted

Make a holiday calendar with automatic "school week numbering" in tikz

I think this addresses all the issues... For the School week thing, I used two conditionals: \ifWeekStarted, and \ifPrintSW. The first one is triggered every Monday to signal a week has started. ...
11 votes

Compiling (La)TeX files automatically with GitLab CI

Beware: This is a post about ConTeXt Apart from LaTeX you may want to compile ConTeXt documents using Gitlab CI. That's very easy as well. Simply use the install script provided by ConTeXt standalone ...
  • 32.3k
10 votes

using AutoHotKey to streamline LaTeX document authoring

Here is a script I created over time and improve occasionally for my personal use. Features: Instant completion for single brackets (,[,{. You can also delete surrounding characters with [Shift] + [...
  • 131
10 votes

draw colored world/US map in LaTeX

I know this thread is a bit stale, but I really liked Bordaigorl's answer above. Yet I am lazy, so I wrote a little perl script that translates the Inkscape-output into a nice macro source, along the ...
10 votes
Accepted

How would you typeset this type of programming documentation?

You write [...] would you do it in a different, maybe better, way? [...] better might mean by defining an environment (e.g. a list) with a parameter for the code and items which generate the ...
  • 56.9k
10 votes

Appending an empty row after every 5 or 10 rows in LaTeX table

Since you are using knitr, the simplest thing is to add \\ every tenth row using add.to.row parameter of print.xtable. This is a very rough code; in the general case you need also to check that ...
  • 36.7k
10 votes
Accepted

What packages provide text/command substitution for LaTeX, XeTeX and LuaLaTeX?

LuaLaTeX embeds the Lua scripting language, which provides a powerful and flexible set of string manipulation functions. Via the \directlua macro and the environments provided by the luacode package, ...
  • 449k
10 votes

How can I use multiple non-entry-disjoint .bib files, unmerged?

You can use as many .bib files as you want. Duplicate entries will result in a BibTeX error which has no consequence and keeps only the first found entry. \begin{filecontents*}{\jobname-cats.bib} @...
  • 1.0m
10 votes

Can LaTeX automatically itemize a list?

Since I've wanted to learn this for a while now, here a version of Sam's answer using LuaLaTeX. What I like about it is its being totally embedded in LaTeX, compiling in one shot with lualatex \...
  • 536
10 votes

Can LaTeX automatically itemize a list?

LaTeX3 excels here in terms of elegance and brevity, I would say 😉: \documentclass{article} \usepackage{expl3} \begin{filecontents*}{list.csv} religion religious rely remain \end{filecontents*} \...
  • 51.8k
9 votes

Replace \input{fileX} by the content of fileX automatically

I developed FLaP, a python script which replaces \input, \include and other inclusion directives by the file they refer to while supporting \includeonly. In addition it move graphic files around and ...
  • 191

Only top scored, non community-wiki answers of a minimum length are eligible