Questions tagged [debugging]

is about finding the cause of errors or wrong results in (La)TeX code/documents using a methodical approach.

Filter by
Sorted by
Tagged with
2 votes
1 answer
110 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 ...
Fredrik P's user avatar
  • 1,154
1 vote
2 answers
41 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\...
rdx73735's user avatar
1 vote
0 answers
28 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{...
sidyll's user avatar
  • 285
0 votes
0 answers
202 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 ...
user402525's user avatar
2 votes
1 answer
52 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 \...
Flowt's user avatar
  • 181
1 vote
1 answer
38 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: %...
user84207's user avatar
  • 145
0 votes
0 answers
27 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 ...
Balansoire's user avatar
1 vote
0 answers
47 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} \...
Sheila's user avatar
  • 11
0 votes
0 answers
33 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 ...
Mattachoo's user avatar
0 votes
1 answer
57 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 ...
Karl's user avatar
  • 273
-1 votes
1 answer
324 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 ...
wanderer's user avatar
  • 141
0 votes
1 answer
44 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 ...
Keelan's user avatar
  • 5,373
2 votes
1 answer
79 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{...
hau2643's user avatar
  • 21
3 votes
1 answer
83 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, ...
NairD's user avatar
  • 31
1 vote
1 answer
45 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 \...
anderstood's user avatar
  • 2,186
2 votes
1 answer
115 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 ...
hana's user avatar
  • 759
4 votes
2 answers
423 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....
sion35725's user avatar
2 votes
0 answers
47 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 ...
Andrew15_5's user avatar
2 votes
1 answer
47 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 ...
Bordaigorl's user avatar
2 votes
0 answers
147 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 ...
ring5259's user avatar
0 votes
1 answer
38 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{...
supsd72184's user avatar
0 votes
1 answer
64 views

Debugging "Illegal unit of measure" evidently caused by hyperref

While compiling a large and complex document, I have suddenly started receiving this error: ) (./articles/mental-connections.tex ! Illegal unit of measure (pt inserted). <to be read again> ...
scorchgeek's user avatar
0 votes
2 answers
290 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{...
Vedant Rana's user avatar
0 votes
1 answer
53 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{\...
Jinwen's user avatar
  • 7,816
1 vote
2 answers
120 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, ...
Wallflower's user avatar
0 votes
0 answers
17 views

Figure and its environment only appears when added in certain chapters or sections

This is the weirdest behavior I have ever had. The figure file is inside of a folder called "fig", which is set with \graphicspath{{./fig/}}. My document consists of a main .tex document ...
ebernardes's user avatar
3 votes
1 answer
135 views

begin/end form makes textfield inputs unfillable

I noticed a weird behavior on Latex using Overleaf. The below code produces this result, according to overleaf output: But if I download and open the pdf using acrobat reader I see that some ...
Christianidis Vasilis's user avatar
1 vote
1 answer
79 views

cleveref conflicts with polyglossia when required in a class

When I run the following MWE (with xelatex): % File myclass.cls \NeedsTeXFormat{LaTeX2e} \ProvidesClass{myclass} \LoadClass[12pt]{article} \RequirePackage{polyglossia} \RequirePackage{cleveref} % ...
sparusaurata's user avatar
2 votes
2 answers
165 views

concmath-OTF and eulervm lead to problems in math mode

I'm trying to use the recently-released concmath-otf package in a combination with eulervm, instead of the concrete package. My goal was to replace concrete roman with the more modern opentype version,...
cosum's user avatar
  • 35
1 vote
1 answer
162 views

Lyx with \graphicspath BAD, identical LaTeX with \graphicspath GOOD. Possible bug?

Consider the following MWE: I have a LyX file /home/user/latex_files/main.lyx, where I have used \graphicspath{{./img/}} to set the (relative) path for all my images that I want to include in my file ...
l7ll7's user avatar
  • 2,247
0 votes
0 answers
209 views

Latex Equals Symbols Greyed Out... Bug?

Every equals (=) symbol looks like a minus (-) because the lower half is greyed out. Does anyone know why this happens? Very confusing to look at and have no idea why it's doing this?
Crimson's user avatar
  • 21
3 votes
0 answers
2k views

Debug LaTeX in Visual Studio Code (with LaTeX-Workshop)

Visual Studio Code seems to be very useful with LaTeX-Workshop plugin. In comparison to TeXStudio, TeXMaker, etc. it is able to autoformat code. It is very useful when I search for an unmatched ...
Janko's user avatar
  • 33
0 votes
1 answer
390 views

LuaLaTeX 64 bit does not finish compilation

Setup: Windows 11, all updates, texlive 2021, all updates, win64 from CTAN. The files that were previously compiling flawlessly with LuaLaTeX stopped compiling now (I cannot check when exactly, as I ...
Alexander Z.'s user avatar
0 votes
0 answers
25 views

Equivalent to Source Maps or Providing Source Location Hints to Compiler

I'm using Pandoc and LuaLaTeX and have organized my project into several dozen LaTeX embedded Markdown documents into a final output document. Effectively, each chapter is a document and combined with ...
hohle's user avatar
  • 13
3 votes
1 answer
484 views

Show definition of \NewDocumentEnvironment

xparse provides \GetDocumentEnvironmentArgSpec to examine the argument specification of a defined environment (and similarly for commands and showing on the terminal). However, I would like to be able ...
Maximilian Keßler's user avatar
1 vote
0 answers
239 views

How to debug and fix error: Use of \label@optarg doesn't match its definition

I've been having a very bad time lately with the errors produced by this main.tex MWE: \documentclass{report} \usepackage{ctable} \usepackage{sectsty} \usepackage[spanish]{babel} \usepackage{hyperref}...
Mateo de Mayo's user avatar
2 votes
1 answer
384 views

How to exit from a latexmk build?

In the following example, I don't know how to exit from the build process: ? ! Interruption. ^Cl.1917347403 ? ! Interruption. ^Cl.1931472264 ? x ! Interruption. ^Cl....
nowox's user avatar
  • 1,335
3 votes
1 answer
96 views

Error `Display math should end with $$. $$$\backslash` [Bibliography]

While adding references in my thesis paper, I copied the following bibtex from google scholar: @article{bhattacharya2017fuzzy, title={Fuzzy independent topological spaces generated by fuzzy $$$\...
Usual_Learner's user avatar
2 votes
1 answer
475 views

Error `Missing \endcsname inserted` (Bibliography, bibtex)

While adding references in my thesis paper, I copied the following BibTex from google scholar: @article{aygunoǧlu2009introduction, title={Introduction to fuzzy soft groups}, author={Ayg{\"...
Usual_Learner's user avatar
0 votes
1 answer
159 views

Automatically bisect latex file for debugging

If I have hard to interpret error messages in a latex file, I comment out half of the file, compile, see if it works or not and so on and find the problematic part by successive bisections. Is there ...
student's user avatar
  • 28.8k
1 vote
0 answers
40 views

Print macros call stack [duplicate]

Can one print call stack of latex macros? I want to know from where my macro is called.
Yola's user avatar
  • 491
0 votes
0 answers
60 views

Strange ```tableofcontents```error in XeTeX

I am currently typesetting a book with XeTeX and there's a strange error in overleaf: \alloc@ ...else \errmessage {No room for a new #2} \fi \fi l.41 ...
pahohu's user avatar
  • 227
1 vote
1 answer
132 views

Conflict between microtype and syntax packages

While using the syntax package together with microtype, I stumbled on a strange error: Missing font identifier.<to be read again>\chardef <TEST> ::= ` Missing number, treated as zero.<...
Safron's user avatar
  • 350
1 vote
0 answers
120 views

Why does my pdf image cause a bug only after printing the document?

So I have a page that looks normal on screen. It looks like this on the screen; Near the top of that page a figure is displayed. This figure is a pdf, created in inkscape. In the .tex the figure ...
Clumsy cat's user avatar
1 vote
0 answers
142 views

Why does this Tikz-picture lead into an infinite loop? [closed]

Somehow the following Latex-Code does not finish compiling in TexStudio, at least on my PC. (It leads to an infinite building-process, I hope it is clear what I mean.) Could you please explain me what ...
3nondatur's user avatar
  • 471
0 votes
0 answers
354 views

Overleaf, where to find missing { or output.gls?

I am working on a document in LaTex with overleaf when I noticed this error: <to be read again> \let l.21 ...entrycounter[]{page}\glsnumberformat{18}}} ...
Frostyant's user avatar
6 votes
1 answer
159 views

Tikz: Showing all node names (for debugging)?

Is there an easy way to show the name of all nodes, say, in a scope? Without having to assign explicit styles to the nodes? (Context: complex figure, broken down in lots of subcommands, not feasible ...
Holger Karl's user avatar
0 votes
0 answers
33 views

Texstudio failure to view TikZ output compiled by XeLaTeX

Texsudio successfully shows the result of the following MWE compiled by pdfLaTeX or LuaLaTeX. \documentclass[tikz, border = 3pt]{standalone} \begin{document} \begin{tikzpicture} \node[draw] (...
User's user avatar
  • 2,996
2 votes
1 answer
261 views

Cannot make the columns evenly distributed. What's the reason?

Dear experienced friends, I met a strange bug when I tried to draw a table. As shown in the picture, I wish I can make all the columns 4,5,6,1,2,3 evenly distributed. However, the width of 6 is always ...
Nick Nick Nick's user avatar
0 votes
0 answers
43 views

afterpage package and verse environment cause troubleshooting

I use both afterpage package and verse environment in my document. So, when a verse environment comes just after an \afterpage command rendering, an unwanted linebreak occurs after the first verse. As ...
fauve's user avatar
  • 2,437

1
2 3 4 5
8