47
votes
What is the status of generating LaTeX from handwriting (i.e., OCR)?
The Mathpix app (for iOS only, Android coming soon) actually does this all on your phone via the camera.
Just take pictures, and you can export as Latex, PDF, or you can get an Overleaf link (they ...
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{...
28
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 ...
24
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 ...
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}
\...
14
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 ...
13
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 ...
12
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] + [...
11
votes
How to make Latexmk use makeglossaries?
The current version of the glossary/glossaries sample latexmkrc file on CTAN http://mirrors.ctan.org/support/latexmk/example_rcfiles/glossaries_latexmkrc contains
# This shows how to use the ...
11
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 ...
11
votes
Automatically set different colors for matching brackets?
How about this:
\documentclass{article}
\usepackage{xcolor}
\makeatletter
\newcount\bracketnum
\newcommand\makecolorlist[1]{%
\bracketnum0\relax
\makecolorlist@#1,.%
\bracketnum0\relax
}
\...
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.
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
This answer provides examples for CI files that I use to compile LaTeX documents on Gitlab CI. They use the latest TeX Live image from the Island of TeX to provide a basic TeX Live installation ...
11
votes
Accepted
Automated Dijkstra Visualization
Here's the Dijkstra algorithm in TeX.
It uses the PGFFor (the .list handler) and PGFMath (the \pgfmathloop) for looping:
The .list handler gets used to store the weights of each edge and to do all ...
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}
@...
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
\...
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*}
\...
9
votes
Replace \input{fileX} by the content of fileX automatically
I've recently discovered TexSoup, a Python module to parse Latex files inspired by BeatifulSoup. It makes really easy to work with .tex files in a very straightforward way. For instance it allows to ...
9
votes
Accepted
Sanitize U+301 infection and others in references
To remove this question of the increasing unanswered list and hopefully help novices to deal with these problemas, I answer myself explaining how to use and test uconv but I left as a community wiki ...
9
votes
Define numeric variable in terms of another variable
You can use xparse and xfp (the latter allows computations on the fly):
\documentclass{article}
\usepackage{xparse,xfp}
\ExplSyntaxOn
\NewDocumentCommand{\defineconstant}{mm}
{
\cs_new:Npx #1 { \...
9
votes
How to draw a border around a subset of nodes
You could use the fit library. If you want a more sophisticated outline shape, use backgrounds maybe:
\documentclass[border=1mm,tikz,preview]{standalone}
\usetikzlibrary{fit,backgrounds}
\newcount\...
8
votes
Accepted
Prohibit LaTeX in an automatic way of breaking lines before \ref
The following will probably work:
\let\realref=\ref
\def\ref{\unskip~\realref}
For example, this document shows the difference:
\documentclass{article}
\begin{document}
\section{Study}
\label{sec: ...
8
votes
TexStudio: Compile and Preview on File Save
I'm using the setting "Auto-recompile document on changes" in the configuration tab "Internal PDF Viewer" to update the internal preview after saving the file.
8
votes
Accepted
Misunderstanding tikz foreach loop
You have four nested loops, while you only want two, but you need to have more than one loop variable. That can be done with e.g.
\foreach \x/\perc in {1.5/30,4/50,6.5/70,9/90}
i.e. each item in ...
8
votes
Accepted
Overhanging vertical bars in tabular
The last \\\hline shouldn't be inside the the loop but after it, so that the code of the loop doesn't triggers the creation of a new row:
\documentclass{article}
\usepackage{datatool}
\usepackage{...
8
votes
Accepted
Generate the hyphenation of a given list of words
\showhyphens writes this to the terminal and log:
\documentclass{article}
\showhyphens{
abdomen
abduction
aberrance
}
\begin{document}
\end{document}
Produces a log file with
[] \OT1/cmr/m/n/10 ...
7
votes
automatically connect horizontal same color lines
Your main problem is the automatic connection to the nearest horizontal step. This is mainly an algorithmic problem.
1) Create a list L of all start and end points of steps of one kind (X or K).
2) ...
7
votes
Accepted
Psalm-like indentation
\documentclass[12pt,a4paper,oneside]{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\begin{document}
\begingroup
\setlength\parskip{0pt}
\def\par{...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
automation × 592tikz-pgf × 49
macros × 47
compiling × 45
tables × 44
graphics × 22
cross-referencing × 22
beamer × 15
formatting × 15
programming × 15
sectioning × 14
luatex × 14
latexmk × 14
math-mode × 13
floats × 13
bibtex × 13
input × 13
scripts × 13
packages × 12
counters × 12
biblatex × 11
spacing × 11
pdftex × 11
hyperref × 11
tools × 11