Newest Questions
272,190 questions
3
votes
1
answer
9
views
Citations with the changes package
I am using the packages changes for tracking updates to a shared .tex document, but I get errors caused by the \cite command.
Consider this .tex file:
\documentclass{article}
\usepackage{cite}
\...
2
votes
0
answers
25
views
nicematrix - Auto fill subblocks
I would like to factorize the code to avoid to manually type the a's, b's and m's. Is it possible?
\documentclass{standalone}
\usepackage{nicematrix}
\usepackage[svgnames]{xcolor}
\begin{document}
$...
2
votes
2
answers
64
views
How to create PDF/X with latex
I try to compile the following with lualatex, TeXLive 2025 current,
{pdfmanagement-testphase}{2025-11-12}{0.96x}
\DocumentMetadata{lang=en-US,pdfversion=2.0,pdfstandard=x-6n}
...
but this yields
! ...
4
votes
1
answer
49
views
Gradients in TikZ
Based on the documentation, I would expect the two rectangles generated by this code to look identical:
\documentclass{article}
\usepackage{tikz}
\begin{document}
\pgfdeclarehorizontalshading{...
2
votes
1
answer
18
views
Unwanted extra space in biblatex's prenote
My straightforward implementation of the solution for referring to a biblatex citation note creates an unwanted extra space before the referenced citation as seen in the example below. How do I avoid ...
0
votes
1
answer
13
views
Exempt certain entry type from the short-form citation
In my document, a newspaper article should be cited without the author(s) or title, which I've implemented successfully. The problem is, except for citations to the same article that immediately ...
0
votes
0
answers
69
views
How many expl3 code lines are in the LaTeX kernel?
I was courious to know how many line of expl3 code is in the LaTeX kernel.
I run a python script (code below) to count the number of lines in each dtx file in the base directory of the LaTeX2e ...
0
votes
0
answers
20
views
Footnote within newkeytheorem [duplicate]
EDIT: When used within a keytheorem environment, footnote label counter is different ('a', 'b',...) than
\documentclass[11pt]{book}
\usepackage{amsmath,amssymb,amsthm,mathtools}
\usepackage{...
1
vote
1
answer
28
views
Overlining with titlo Cyrillic text
NewComputerModern is adding support for more diacritics including titlo (UFE2E+UFE2F). When titlo is placed above two consecutive letters of the same height then everything works as expected. For ...
5
votes
1
answer
50
views
Environment that conditionally collects its content
Disclaimer: This is a bit a XY problem, or rather: I have a problem X and I have a solution Y which works but does not really make me happy.
Background: I have an environment, say {foo}, which I use ...
0
votes
0
answers
29
views
Adding a style to biblatex makes my beamer document crash
I am using biblatex on Overleaf to cite in my Beamer document. When I don't specify any styles,
\usepackage{biblatex}
\addbibresource{references.bib}
works just fine. But I want the citations to look ...
1
vote
1
answer
55
views
Tikz comma shape
I am using tikz to make a PA Dutch hex sign-like image. How can I make the comma-like shape that is seen below? I will ultimately be replicating it and rotating it around a center point, but I don't ...
4
votes
2
answers
58
views
drawing arc using intersection with triangle
I've been trying to adapt the answer https://tex.stackexchange.com/a/239471 to the drawing I've been attempting, but I'm getting a strange result.
I want draw an arc that begins and ends where it ...
0
votes
3
answers
78
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: ...
0
votes
0
answers
23
views
Problem with CharisSIL (charssil) Font on Fedora
A journal with which I'm associated is considering moving to CharisSIL for the font. So I've been trying to experiment with it. This is for a maths journal, so we're using Greek and small caps and ...
1
vote
1
answer
49
views
Parnote repeating itself inside tabularray package
Good afternoon, so I found about parnotes which work quite good, till I was in the search of a little annoyance in vertical lines in my table to look as booktabs. As suggested I tried the ...
5
votes
2
answers
97
views
Strange output using AMSmath's \operatorname and fontsetup
I have the following document
\documentclass{article}
\usepackage{fontsetup}
\usepackage{amsmath}
\newcommand{\coordRng}{\operatorname{\Gamma}}
\begin{document}
\(\coordRng (X)\) \(\Gamma\)
\end{...
4
votes
1
answer
206
views
What is the proper way to demonstrate tagged PDFs
What is the best way to demonstrate a tagged PDF vs untagged. I don't mean a verification mark. I am looking for a, preferably Linux, screen reader that can read a tagged pdf and its formulas ...
0
votes
0
answers
36
views
LaTeX: How to set different geometry margins for different pages based on PDF background images?
I'm creating example papers in LaTeX with different PDF backgrounds for different pages, and demo PDFs are given as follows:
First page: example-image-a.pdf
Odd pages (except first): example-image-b....
2
votes
3
answers
114
views
Checking the current page against the last page in a shipout hook
I meant to restrict the overlay to all but the last page, but this setup fails due to \zref@extractdefault{abspage}{abspage}{0} stuck at 0. Is there a solution to this specific issue, and a better ...
3
votes
2
answers
83
views
How to customize the quote environment?
I'm trying to customize the quote environment for a novel (citations at the beginning of each chapter), and I'm having troubles in setting custom vertical line spacing, horizontal line length, the ...
1
vote
1
answer
31
views
TexStudio: Is there a way to make autocomplete suggestions less rigid
I switched to TexStudio from Overleaf recently. I do miss the autocomplete suggestions in Overleaf where you don't have to get the cases or even the order of the words in the label right for the ...
3
votes
1
answer
99
views
One colored structure combining amsart, amsthm, mdframed and thmtools
I am working with the amsart class and I would like to define two new environments to create a sort of structured dialogue with que (question), ris (answer).
I would have with this MWE:
\...
4
votes
2
answers
114
views
tikz-cd: Put brackets/parentheses around one column of diagram?
I would like to put parentheses around one column of a tikz-cd diagram — something like the diagram in the example below, but with the second set of parens around just the left-hand vertical of the ...
8
votes
2
answers
149
views
How to avoid `\phantom{}` and empty groups in this array, while maintaining the same alignment?
I'm working on creating a specific two-column table in \LaTeX. The second column, $f(n)$, contains expressions that are linear combinations of $\alpha$, $\beta$, and $\gamma$, but not all terms are ...
2
votes
1
answer
29
views
wrapfig introducing whitespace when next to text divided by sections
I'm trying to have text wrap around other text or a figure as is supposed to be done with wrapfigure. However I'm encountering an issue where there is a lot of whitespace under the wrapfig when the ...
5
votes
2
answers
96
views
NewDocumentCommand with keyword arguments: how to prevent evaluation of keyword default values?
Consider the following MWE:
\documentclass{article}
\DeclareKeys [ myKeys ]{
a .store = \whereA,
b .store = \whereB,
}
\SetKeys [ myKeys ] {
a = AAA,
b = \pageref{#2},
}
\...
2
votes
1
answer
137
views
How to distribute items (cards) evenly on a A4 page in Latex?
I need to print cards (bussiness for example) on both sides of A4 paper so they must match exactly.I was trying to do some calculations and search for hidden margin, but none of those worked.
code: ...
0
votes
4
answers
81
views
Boxed text + figure on the left
I would like to have a framed box that contains some (justified) text and, on the side, a figure with its label and caption, something like this:
I think/I read on other threads that some starting ...
8
votes
5
answers
207
views
How to layout the two-side notes using Latex
The following is an example from an English book. I'm planning to rewrite it in latex.
The layout is with an itemize of points in the middle, and with "CONNECTIONS" notes along the two sides....
17
votes
3
answers
554
views
Drawing a sphere and ellipsoid together
I would like to draw a sphere, of radius 3, and an ellipsoid of semi-axis 2, 3 and 4 together. They intersect at two great circles on the sphere (marked in red).
I started out with the sphere and the ...
13
votes
4
answers
704
views
How to add a mirror like shadow effect to a title?
I would like to add a reversed gray shadow under a title to mimmic a mirror effect. How can we do that with standard pdflatex (the live tex distribution)?
Currtently, the code below only add a dull ...
2
votes
1
answer
92
views
Center a table in a list
How do I get the table to respect the “new” left margin/indent in a list so it centres correctly, rather than the full-page text width?
\documentclass[10pt]{book}
\usepackage{booktabs}
\usepackage{...
2
votes
1
answer
58
views
Section Number Alignment and Wrapping a Figure with Text [closed]
\documentclass[11pt,a4paper]{article}
% Use XeLaTeX to compile
% Go to Menu > Compiler and set it to XeLaTeX
\usepackage{wrapfig}
\usepackage{fontspec}
\usepackage{polyglossia}
\usepackage{siunitx}...
0
votes
3
answers
104
views
How to use OT3 encoding? Does it redefine existing macros?
Please help. OT3 is a very old encoding and I want to use it for stylistic reasons to make my document look old.
EDIT: I figured out how, but I have a new question: does OT3 and \usepackage{ipa} ...
1
vote
2
answers
79
views
Vertical continues line, no \cmidrule gap, in table with booktabs looks [duplicate]
Good morning, I would like to know if there is a tweak, or better an other package that would let me have a continues vertical line in table IF it doesn't intersect any horizontal line.
As I know ...
1
vote
1
answer
110
views
tex.print(value) fails with "Missing $" Error
This LuaLaTeX code tries to process key-value pairs from a Lua string. The Lua function parse_kv_pairs takes a string containing comma-separated key-value pairs, removes whitespace, and splits the ...
3
votes
2
answers
158
views
Get the height of the first line of a paragraph
Suppose I have a paragraph, and the first line of it may or may not contain an inline picture or a big character with the height greater than that of normal characters. Something like this:
Lorem ...
7
votes
1
answer
172
views
How to set font family in `minted` style to an arbitrary font?
I'm trying to set up tcolorbox blocks using minted engine. I want to use a font of my choice in those, not the default monospaced one (or tt or helvetica, per minted manual). Let's say I want 'Code ...
7
votes
1
answer
186
views
Accented character type \e`
Sometimes I see the accented è written in LaTeX sources as a command like this:
\`e
I've always wondered the reason.
On my laptop (a modern machine), I can type è directly using the keyboard, and the ...
2
votes
1
answer
66
views
Font encodings vs verbatim?
I heard verbatim fonts have extra characters for stuff you can type on a keyboard. How are they stored internally? Is it a secret? Is it hacked?
0
votes
1
answer
178
views
Using Perl from Git installation for latexdiff
Problem
I am encountering a problem which has already been raised in this site:
Can't locate Algorithm/Diff.pm in @INC (you may need to install the Algorithm::Diff module)
Can't locate Algorithm/Diff....
2
votes
0
answers
63
views
index sorting for non-english language [duplicate]
Alphabetical list in my index is not sorted properly. Letters like č and š appear at the end, instead of after c and s.
Now, I've tried solutions from previous similar posts, and they don't work. In ...
6
votes
3
answers
304
views
How to draw cone with infinitely many extremal rays
Suppose we are working in the three-dimensional real vector space V. A cone is a subset C of V such that if an element v of V lies in C, then all of its nonnegative multiples also lie in C. I would ...
4
votes
1
answer
120
views
TikZ: Generate a pixelated (Minecraft-style) circle by filling unit grid squares [duplicate]
I'm trying to draw a pixelated (blocky) circle in TikZ where each filled 1×1 square corresponds exactly to an integer grid cell (think Minecraft blocks). Given a center and radius, I want a compact ...
3
votes
1
answer
87
views
Inserting a Graphical Image as a Cover Page in Latex Thesis
I am compiling my thesis using Latex, which eventually generates a PDF file. In addition to its textual content, I want to insert a graphical image (.png) as its cover page. This is what I am doing ...
2
votes
2
answers
181
views
The method of marching cubes (for implicit surfaces) is very slow, and does not reach the level of accuracy of existing pictures. How to improve?
I was inspired by some of the illustrations in https://math.stackexchange.com/a/46222.
I wanted to try graphing implicit surfaces myself, and came across the method of marching cubes. See https://...
5
votes
5
answers
233
views
\ifthenelse and modulo
I have a list of numbers from 1 to 12. I want to print the numbers 3,6,9 and 12 in purple, the others in blue.
With my code:
\documentclass{standalone}
\usepackage{tikz,ifthen}
\begin{document}
\...
5
votes
0
answers
75
views
What is the meaning of tagpdf Warning: Destination ... has no related structure.?
What is the meaning of
Package tagpdf Warning: Destination 'section*.2' has no related structure.
(tagpdf) /Ref not updated.
It appears to be caused by:
\DocumentMetadata{lang=en-US,...
0
votes
3
answers
56
views
expl3 function not expand inside \tl_set:Nx?
Every now and then I need a refresher on LaTeX logic. In the example below I expected either an error or at least a different result — certainly not the value 2, which is the behavior I would have ...