Questions tagged [automation]
{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}.
591
questions
0
votes
0
answers
20
views
How do I get auto indentation of text that is after MLA sections?
I'm trying to make an MLA template that can automatically have text that goes after sections be indented .5 inches, but even when I manually indent, nothing works.
\documentclass[12pt, letterpaper]{...
0
votes
1
answer
59
views
Compilation error: Input index file not found, and biber failed
I am trying to compile a LaTeX document using a Windows batch file that includes creating an index and glossary. However, I encounter the following error messages:
Compiling test.tex...
Input index ...
0
votes
1
answer
44
views
Help with automatic text formatting in class files!
I'm relatively new to LaTeX (within a year or so). I found an attempt at a legal document file online, and have been modifying it to work as I'd like, and attempting to change the functionality around....
0
votes
0
answers
21
views
How can I adjust the spacing between the number and the title of each level in TOC to create automatically a nested list?
In this code, I have defined custom sectioning formats using the titlesec package. However, I'm having trouble adjusting the spacing between the section numbers and titles, especially when the section ...
3
votes
2
answers
120
views
Best Practices for Integrating Computer Algebra Systems (CAS) into LaTeX Documents
I am currently working on enhancing my LaTeX documents to involve complex mathematical equations. Managing these equations manually often leads to errors, especially when changing dependent equations ...
1
vote
1
answer
53
views
Getting Date from week number automatically for a specific year
Is there a way to automatically output the date based on the week number?
More precisely: I enter the week number for a specific year and as an output I get the date from Monday to Sunday?
There are ...
0
votes
0
answers
51
views
Custom table of contents for Theorems in LaTeX Document
I'm creating a LaTeX document (on Overleaf) filled with mathematical theorems and proofs. To quickly overview which theorems have been proven, I need a custom table of contents (TOC) that organizes ...
1
vote
1
answer
68
views
Custom .bib file (fields, data types) with different styling (bibliography style)
I have wanted to start quite an ambitious project, namely a custom resume template that can easily be adapted. I want to automate the following:
As such, I thought it would be nice to have a custom ....
2
votes
1
answer
148
views
Cooking Recipe with a timeline
I love cooking large menus whenever we have family or friends visiting us but I tend to struggle with my time management in terms of preparation for different courses.
This is why I thought of ...
0
votes
0
answers
31
views
Autogenerate cwl file from sty using cli in Windows
I want to automatically generate .cwl files anytime the .sty package content changes, without any IDE opened.
I know how to create a folder monitor using FolderChangesView, but I have a problem with ...
0
votes
0
answers
32
views
TikZ: collecting defined coordinates in a list
I want to collect previously defined coordinates in a list and print them later in a \foreach-loop for debugging purposes.
The following MWE shows the list \points which ideally should be defined and ...
0
votes
1
answer
25
views
How to replace section/chapter/subsection depending on the current location? [duplicate]
I would like to refer to the current 'unit' in a section/subsection agnostic way. In other words, I'd like to use \unitname in the following way:
\section{Foo}
In this \unitname...
\subsection{Bar}
In ...
0
votes
1
answer
38
views
Collapsing appendices chapters automatically in Texmaker
I'm wondering if it's possible to collapse automatically the appendices chapters in Texmaker when I open the software.
Example: I'd like to start Texmaker from the state in the second figure belove ...
2
votes
0
answers
40
views
When generating files with docstrip, can I insert the output file name anywhere besides preamble and postamble?
I'm generating source files from a .dtx file using docstrip. I would like the literal file name to be placed in the argument to a \ProvidesFile command.
Right now I'm doing it something like this:
%&...
0
votes
0
answers
127
views
Python from LaTeX: Strange Networkx/Graphviz error
It is hard to give a minimal example, because Python3 with some packages is needed. I want to call Python from LaTeX, here is an example how I want to do it (--shell-escape is needed):
\documentclass[]...
5
votes
2
answers
116
views
Writing a tex package for better auto brackets
The automatic brackets sizing provided by \left ... \right really often produces too large brackets. I want some package that for a given formula finds the right bracket size selected from \big, \Big, ...
3
votes
1
answer
97
views
Automated labelling and references in enumerate list
I am preparing a syllabus book containing a number of courses. For each course, I have an enumerated list of course objectives. Then I have units/modules under the course that addresses those ...
5
votes
2
answers
351
views
Generate the hyphenation of a given list of words
I'm new to LaTeX; is there a way to tell the TeX engine to generate the hyphenation of a given list of words as a text output file? For example:
abdomen
abduction
aberrance
...
What I want is ...
0
votes
0
answers
55
views
How do I make the brackets $\{\}$ appear automatically in a function that I personally defined?
I'm currently writing a big paper and I defined a lot of function to save time, most function are in the math mode (I don't really know if that's important).
My question, that while using overleaf, ...
1
vote
1
answer
69
views
Enumerate Environment with Item Numbers in Left Margin and Item Textwidth = Page Textwidth
MWE---
\documentclass[12pt]{book}
\usepackage{enumitem,lipsum}
\begin{document}
\thispagestyle{empty}
\lipsum[3]
\begin{enumerate}[wide,labelwidth=6pt,labelindent=-15pt]
\item \lipsum[13]
\item \...
0
votes
0
answers
159
views
Automated BFS drawing with Lua
I tried to learn Lua with TeX. To do so, I tried to implement BFS in such a way, that it can automatically create Tikz pictures. Here is a short example of what I did:
\documentclass{article}
\...
3
votes
1
answer
803
views
Automated Dijkstra Visualization
I want to visualize the Dijkstra algorithm for finding the shortest path. I am inspired by this post. Sadly, I am way too bad at LaTeX. My initial idea was doing it with LuaLaTeX using Lua and I was ...
1
vote
0
answers
178
views
Automatically detect acronyms without \ac or \gls around them
My Situation:
I am using glossaries package to manage my acronyms.
They are all neatly defined in one file with a list generated automatically.
But I have to confess: I was very inconsistent in using \...
6
votes
3
answers
556
views
Automatically Display the First Word of Every Quotation in Small Caps
Consider the code
\documentclass[12pt]{book}
\usepackage[T1]{fontenc}
%\usepackage[sfdefault]{cabin}
\newcommand{\longemdash}{{\fontfamily{cmss}\selectfont---}}
\newcommand{\emdash}{\nobreak---\...
3
votes
0
answers
52
views
Numerical precision issues within PFGplotstable
I am creating a table which automatically generates outputs of various quantities of interest for compressible flow.
The first column contains Mach numbers, which are used to calculate the quantities ...
0
votes
1
answer
89
views
Cross out a transition of automaton
I have the following automaton.
\begin{tikzpicture}[>=latex, >=stealth', auto, node distance=0.5cm and 1.5cm, semithick, initial text=]
\node[state, initial] (q0) {$q_{0}$};
\node[state] (...
0
votes
1
answer
36
views
Automatically customizing the front cover of different memoirs
I need to create several memoirs with the same format. For each document I want to customize several features of the front cover, for example the background color. I'm trying to automate the ...
1
vote
1
answer
164
views
postscript hyperlink url auto-open
I'm trying to add a hyperlink to a PDF by modifying the PostScript.
Any possible to open this action link automated or opening postscript or pdf. it will be executed the link.
[/Rect [ 0 425 295 445 ]
...
2
votes
2
answers
129
views
How to draw a border around a subset of nodes?
I need diagrams like this:
I've automated the "black" part but could not figure out how to do it with the red border; my current version is this:
Here are latex ""code""...
4
votes
1
answer
164
views
Auto-capitalise lone "i" in LaTeX
Is there a package or pre-amble command which would auto-capitalise all lone 'i's within the text of a LaTeX document (i use overleaf to compile)?
I find it easier to write text without manually ...
2
votes
1
answer
109
views
Study materials for automatic impagination with Context?
Here is the thing, I am working with a lot of catalogs but we are doing it, in my opinion, the wrong way! It is a mix of ancient catalogs made in Photoshop and newer ones made wrongly in InDesign.
In ...
1
vote
0
answers
36
views
Is there a program that automates the use of a standardized Tex document?
I have a standardized LaTex document that contains two letters and several pages of documentation. This is to be sent to each and every customer we have, for every order we deliver. The document stays ...
0
votes
1
answer
258
views
Read metadata from a file
Say all homework files: hw1.tex, hw2.tex, ... use some common homework.cls. Problem is that in every hw*.tex file these variables have to be set manually.
\documentclass{homework}
\author{John Smith}
\...
1
vote
1
answer
60
views
Automatic upright subscripts in pdflatex
For some time I used Micos solution to the problem of automatically typesetting subscripts upright based on lualatex. Now I want to switch back to pdflatex (because of compile times and the better ...
0
votes
0
answers
108
views
is there a way to autofill tables in latex like in excel with equations [duplicate]
i would like to be able to auto calculate simple values based on other values already present in the tabular environment or a similar environment
i have tried looking on google but couldn't find ...
0
votes
1
answer
66
views
Automation hyperlink from title to relevant Wikipedia page
I would like to hyperlink any subsection to a relevant Wikipedia page while clicking on it. let's say that the name of the subsection is:
" Row and column vectors (wiki) "
when clicking on (...
2
votes
2
answers
165
views
Define categorized, changeable variables for use throughout a document
TL;DR
How do I print categorized and subcategorized values declared in a JSON file (or in some similar type of file) inside of a LaTeX document?
In my document, I am assigning a bunch of values to ...
1
vote
1
answer
45
views
Automatically generate two-page index entries
I'm writing a text where there will be several index entries for short biographies. The index entries for persons are supposed to be in small caps and the biography entries will get page numbers in ...
3
votes
1
answer
71
views
Automatically suppress claim number if there's only one claim
When writing a proof, I often need to include a claim, for which I've defined a separate environment. In my current set up, claims are numbered successively, with the numbering resetting within every ...
0
votes
0
answers
201
views
Automating the Build and View (F5)
Is there a way to automate the Build and View (F5) function such that it knows which command to use amongst latex, pdflatex, xetex and lualatex? For example, if I load the fontspec, I want my ...
0
votes
1
answer
261
views
Loop through directory structure and include all *.pdf files
I have a document that is constructed from a number of *.tex files stored in a directory organized as follows:
-2022
-07
-01
-note.tex
-file1.pdf
-differentfilename....
1
vote
2
answers
109
views
How do I know, whether I need to run BibTeX or not?
If I have an unknown *.tex file and want to know, whether I need to run BiBTeX afterwards or not, what is the simplest way to find out in a script?
Consider this file:
\documentclass{article}
\begin{...
2
votes
0
answers
233
views
Polynomial long division with complex numbers
I heard of the polynom LaTeX package, which can be used to do polynomial long division in LaTeX documents; I have even used it myself before for normal polynomials with real coefficients.
However, now ...
0
votes
2
answers
533
views
Change vertex and edge style
I wanted the larger circle to be an ellipse, and the loop on the right to be smaller (as the below drawing shows). Does anyone know how to do it?
this is my .TEX document:
\documentclass[12pt]{...
5
votes
3
answers
1k
views
LaTeX software to evaluate expressions
I am looking for a latex package that can evaluate symbolic expressions by substituting the values of symbols declared in some header. For example, in these set of equations, as you can see, I get ...
2
votes
3
answers
5k
views
Get number of pages in document [duplicate]
When writing reports it is common to have a page of meta-information at the start, written by, checked by, client, date etc. One of the fields I need is number of pages. Since I'm going to be ...
2
votes
0
answers
28
views
Margin when using auto-scaling of parenthesis: Is there a better way than adjusting for it with "\!"?
Whenever I need larger parenthesis I use \left( \right) which automatically adjusts the size as needed. I know that the optimum would be to always manually choose from \big, \bigg, \Big, ... but for ...
0
votes
1
answer
34
views
Priority based removal of optional sentences to fit page
I am wasting days of my life rewriting rejected papers for other conferences with different page limits. Also it would be nice to extract parts for a website without a page limit.
Is there a way to ...
3
votes
1
answer
969
views
lua code inside directlua throws an invalid escape sequence error
I'm trying to make use of lualatex to automate generation of some part of a pdf. The directory tree for my minimal working example looks like the following:
│ lua_escaping_issue.tex
│
└───a_folder
...
0
votes
3
answers
327
views
Create a function that generates a letter?
I have to write many letters where each time I have to modify just the names, dates and address, but it is always the same content.
A short version would be something like "Dear [name], from [...