Questions tagged [debugging]
is about finding the cause of errors or wrong results in (La)TeX code/documents using a methodical approach.
409 questions
0
votes
3
answers
77
views
Tracing command silently alters pdf
The desired output is with an overlay; but \tl_show:N prevents inhibits it. Though I found a workaround for this, \tl_log:N, it has cost me time so I thought I'd post it for insights. The question is: ...
1
vote
1
answer
58
views
Using includecomment and include causes runaway fragile frames
I customized my Beamer files to have:
different backgrounds depending on the programming language (from Changing the background color of a listing depending on the language)
some frames shown ...
5
votes
2
answers
240
views
XeLaTeX PDF image duplication issue
I found that loading images works fine under pdflatex,
but under xelatex it shows images I had deleted long ago. It can be seen that, in addition to the five images, several more images have appeared....
2
votes
2
answers
849
views
Best order of packages, according to Claude AI [duplicate]
I'm trying to polish a typical template that I frequently use to write books on maths and physics (so I usually load a large set of packages!). Some packages may be old and obsolete, others may clash ...
1
vote
0
answers
52
views
glossaries-extra style topic breaks paragraph in description of \newlineglossaryentry
I have been experimenting with using glossaries-extra for a project and have found it very useful, except I have encountered an issue that I have been unable to overcome.
I have narrowed it down to ...
2
votes
2
answers
120
views
How do I define tags that help me to keep track of concept definitions?
When I edit a LaTeX document, it often happens that I need to move a section or a paragraph to another place inside the same document. If this happens several times, it can become difficult to confirm ...
1
vote
1
answer
62
views
Debugging (tracing) pgfplots sample point coordinates
Is there a way to debug (trace to the log file) coordinates of sample points or any intermediate calculations. For example, \addplot3 used below uses 3 points (0,0,2), (1,0,1) and (2,0,0) to draw the ...
1
vote
2
answers
195
views
Analysis of a `log` file [duplicate]
Is there a tool to help analyze the log files produced by (La)TeX? For example, this type of tool should be able to list all warnings issued.
1
vote
1
answer
54
views
Writing functions horizontally error
I have been trying to define two functions horizontally in latex using align*, flalign*, aligned etc. All manner of permutations of these. I can't seem to get it to work or rid myself of an error. ...
1
vote
0
answers
45
views
MWE works, but quiz doesn't. How is a difference in environment changing the outcome?
I have two files, was going to post an MWE but made it work.
I have tried to find the difference between the MWE and the original, and all I can see is that I created a new (ultra-simple) quiz ...
0
votes
1
answer
100
views
How to debug "Missing $ inserted"
I have a large LaTeX document that was compiling without warnings in Ubuntu 22.04. Now I had to move to Fedora 40 and, when I try to compile it, it produces hundreds of ! Missing $ inserted., ! ...
1
vote
1
answer
61
views
LaTeX not numbering theorems consecutively
I have a LaTeX document with a weird bug - the numbering of the theorems is not continuous. Theorem 0.0.1 is followed by Theorem 0.0.5 instead of 0.0.2. I have attached the MWE and the screenshot from ...
1
vote
0
answers
50
views
beforesecskip occasionally failing in memoir
I'm typesetting a long and complex book with memoir class. In two cases, \beforesecskip seems to be ignored, in a rather random way which wonders me (I have been using memoir for a couple of years now,...
2
votes
1
answer
142
views
Invalid arara error when running YAML directive from TeXShop
I'm using arara to play a Waves.mp3 sound file when TeXShop starts, and completes, typesetting my LuaLaTeX project file (~20 minutes), mainly as a gentle alert that the typesetting is complete.
The ...
0
votes
1
answer
124
views
TeX processor version check/assertion?
I want to make sure my document (or document class) is being processed by a recent-enough XeLaTeX. Is this at all possible?
I know there's a \IfPackageAtLeast LaTeX kernel command, apparently; what ...
0
votes
0
answers
61
views
Latex installation or workspace configuration breaking \begin{enumerate}
Task Description: I am writing my thesis with latex in vscode. Sometimes I write using my desktop PC and other times using my laptop when I am travelling. I have setup git version control for this ...
0
votes
0
answers
76
views
Bug with knowledge.sty, argument of \@fifthoffive has an extra }
I encounter a surprising bug as soon as I try to use the knowledge package:
% !TeX TS-program = xelatex
\documentclass{article}
\usepackage[
hyperref,
notion,
]{knowledge}
\knowledge{notion}...
3
votes
0
answers
89
views
What causes calign=fixed edge angles to behave inconsistently when grow is not equal to 270?
[EDIT: copy on GitHub.]
I would like to understand what causes the following behaviour in forest.
MWE [Note that most of the code isn't code necessary to reproduce the problem but rather annotations I'...
2
votes
0
answers
925
views
Odd warning aboud \label nameref
I have absolutely no idea how this happened, but it is annoying me so much that I need to ask. Why does the message
Package nameref Warning: The definition of \label has changed! Check your packages! ...
1
vote
0
answers
111
views
TeX capacity exceeded due to misuse of \l_tmpa_clist
I am trying to improve my package multifootnote, hoping that it could correctly place the footnote text on the corresponding pages when the footnote marks are distributed over several pages. For this, ...
1
vote
1
answer
83
views
animate and pgfplots, variable in domain leads to "TeX capacity exceeded"
I'd love to animate a plot but the problem even appears on this simple minimum example.
It would be kind if someone could check if there is a programming error on my side or perhaps a bug involved.
I ...
0
votes
0
answers
139
views
How do you fix underfull hbox warning?
I am trying to write my thesis proposal paper in Latex. Here's the summarized code since most of it is all about the paper I wrote:
\documentclass[a4paper,12pt]{report}
\usepackage{indentfirst}
\...
1
vote
0
answers
79
views
Moved code from overleaf to local latexmx, how to debug? [closed]
I have files that I moved from overleaf, which is set to be very permissive. And better, to have "tex" support whenever I needed it.
I compiled using:
latexmk -pdf -pv ...
1
vote
1
answer
9k
views
Generating Citation Keys with Zotero and Better BibTex Plugin
EDIT: The issue was something completely different. The Better BibTex plugin for Zotero changes the way citation keys are generated. This can be changed in Preferences -> Better BibTex -> Open ...
3
votes
2
answers
232
views
How to figure out which package a command is from at any particular time?
I know there are some posts on this but I don't understand. So for instance I want to know which package contains \restatable.
I've tried \show\restatable but I don't understand what the relevant part ...
0
votes
1
answer
332
views
LuaLatex with VS Code + Local Lua Debugger: Breakpoints ignored in lua scripts that lie in parent folder
In short: When debugging my lualatex files in VS Code with Local Lua Debugger, breakpoints in lua files are ignored if they lie outside the current working directory; for example, if they lie in the ...
2
votes
1
answer
131
views
Help finding strange space
I have faked my way through writing a Swedish language file (see bottom) for fmtcount. It has served me well, but now I have started noticing strange spaces appearing before numbers. I am a bit out of ...
1
vote
2
answers
99
views
How to control expansion order to define variables from a prefix and a command?
The following is a command that does basic arithmetic with nine variables.
\documentclass{article}
\usepackage{xfp}
\newcommand\functesta[9]{
\edef\myvara{#1}
\edef\myvarb{#2}
\edef\...
1
vote
0
answers
48
views
Why is tcolorbox preventing noindentafter from working properly?
I just discovered that the tcolorbox package prevents
noindentafter from doing its job:
\documentclass[12pt,a4paper]{report}
\usepackage{noindentafter}
\NoIndentAfterEnv{verbatim}
\usepackage{...
0
votes
0
answers
2k
views
Error when using LaTeX in Visual Studio Code: You don't have an extension for debugging LaTeX. Should we find a LaTeX extension in the Marketplace?
When I try to run a tex file in VS Code, I get the error 'You don't have an extension for debugging LaTeX. Should we find a LaTeX extension in the Marketplace?' and cannot run the file. But when I try ...
2
votes
1
answer
135
views
Undefined control sequence but everything is defined
Minimal not working example:
\documentclass{article}
\usepackage{amsmath,amsthm,amssymb,varwidth,xstring,environ}
\newsavebox{\tempbox} %Allows to use fbox in newenvironment
\makeatletter
\...
1
vote
1
answer
105
views
Piping shell command output to another command
I'm trying to write a command that wraps \href with a QR code to the given URL. For this I need to generate a temp file and reuse it later, so I wrote a \mktemp command that wraps the mktemp utility:
%...
0
votes
0
answers
116
views
Can I show the raw generated text from a command in my document?
I am trying to debug my code and I keep running into the same problem so I would like to see what the command that causes the problem is giving to the compiler.
I have looked for this and I can't seem ...
1
vote
0
answers
61
views
Error: Argument of � has an extra }. marked in /newpage [duplicate]
I was given with the following template in LaTex and I got directly the error 'Argument of � has an extra }.' in line 43 (where the first /newpage is).
\documentclass[12pt]{article}
\usepackage{ucs}
\...
0
votes
0
answers
107
views
Latex Template Gets Stuck when generating PDF
I am working on my thesis and need to convert my paper to a different format. I'm new to using latex, only having started using it for this project, and am struggling to get the base version of this ...
0
votes
1
answer
149
views
Paragraph ended before align* was complete - can't find the typo
This is the code in question
\end{align*}
These correspond to translations $z \mapsto z + \lambda$
\begin{align*}
M \text{ is elliptic } &\iff M \text{ has exactly 2 complex conjugate fixed ...
-1
votes
1
answer
756
views
Undefined control sequence errors in overleaf
I am getting " Undefined control sequence. " errors in 3-4 parts of my latex code when using overleaf. I have loaded amsmath in my preamble. I am unable to understand what is the cause or ...
0
votes
1
answer
67
views
Main language not reselected correctly if previous section ends with other language and section title starts with other language
I have an issue with XeLaTeX with a document with two languages, Hebrew and English. I use a different font for Hebrew (here DejaVu Sans, but any font will do).
The problem is that when (1) a section ...
2
votes
1
answer
104
views
ifcase eats up letters
I created a command that switches between GCD and LCM. However it has a side effect of erasing everything before the second visible character after the command. How can I fix this bug?
\documentclass{...
3
votes
1
answer
130
views
Problem with the alignment in systeme package
When I type this:
\usepackage{systeme}
\begin{document}
\systeme[xyzt]{x-iy+3t=0,ix-z-(2-i)t=0,(1+i)x+(2-i)y+(3i-5)t=0,-ix+(1+i)y+z-it=0}
\end{document}
I'm ending up with this:
Which, as you see, ...
1
vote
1
answer
69
views
Problem when extracting string from argument to call another function
In my program below, I defined a function \checklist that takes to optional arguments and one compulsory argument. The function works as expected.
Then, I would like to define another function \...
2
votes
1
answer
251
views
The lua-visual-debug package documentation
The documentation is kind of lacking.
Could anyone explain the meaning of blue solid/dotted lines and red solid lines between words here?
How are they different from the dotted versions?
Looking ...
4
votes
2
answers
491
views
Is it bad practice to use tabs to indicate indentation in LaTeX? [closed]
Should I make it a habit to use spaces instead of tabs when indenting? Casual use of tabs didn't cause problems but so far I experienced a few niche cases where using tabs leads to unexpected behavior....
2
votes
0
answers
85
views
Duplicated glyphs (except last one) in clipboard when copying ligatures with Fira Code font (lualatex)
I tried to make Fira Code with minted copy-friendly, but it just doesn't work, and I don't know why. Other mono fonts like Ubuntu Mono and all regular non-mono fonts (that I have tried) are copying ...
3
votes
1
answer
202
views
Incompatibility between `acmart` and `standalone`
I am trying to use the standalone class together with the acmart class (I am using v1.86).
I can use it fine with 1 tikzpicture but it outputs an extraneous glyph with 2 tikzpictures and it throws an ...
2
votes
0
answers
358
views
Latex debugger? [duplicate]
Are there any debugging capabilities in latex or any gui editors? That is, is there a way I can view the value of variables, commands, memory etc during compiling and at the exact moment compilation ...
0
votes
1
answer
50
views
Enumerate exhibits unexpected behavior when renamed
Enumerate exhibits unexpected behavior when renamed
In the example below I renamed enumerate to enum for brevity.
\documentclass{article}
\usepackage{enumerate}
\newcommand{\enum}{\enumerate}
\title{...
0
votes
2
answers
1k
views
Latex code for table not working
I'm trying this table -
Here's my latex code -
\documentclass{article}
\usepackage[utf8]{inputenc}
\title{test}
\author{Ved}
\date{September 2022}
\begin{document}
\maketitle
\section{...
1
vote
1
answer
190
views
Strange extra space when \cref something defined with create-theorem with empty names
Consider the following example, where I copied some code from this answer.
\documentclass{article}
\usepackage{etoolbox}
\makeatletter
\newskip\nonfill@parfillskip
\AtBeginDocument{%
\setlength{\...
2
votes
2
answers
170
views
Problems in my Tex files when compiling tikzcircuit
I have been trying to compile my file that contains a tikzcircuit for few hours now (>6hours), on overleaf. The file compiles with no problem whatsoever when the circuitikz is commented. However, ...