Most active questions
90 questions from the last 7 days
14
votes
4
answers
810
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 ...
19
votes
3
answers
653
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 ...
9
votes
6
answers
299
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....
5
votes
5
answers
234
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}
\...
4
votes
3
answers
290
views
Diagonal Arrows Under an Equation
I need to put diagonal arrows under an equation (the red ones in the picture).
I tried using \swarrow \qquad \searrow, but they are not positioned where I need them.
I would prefer not to use tikzmark....
8
votes
2
answers
158
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 ...
6
votes
3
answers
305
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 ...
2
votes
3
answers
263
views
is it possible to keep the space when using url in latex
when facing the text in latex:
Receiver class org.springframework.cloud.netflix.ribbon.RibbonLoadBalancerClient does not define or inherit an implementation of the resolved method 'abstract org....
8
votes
1
answer
202
views
TikZ word search diagram v2
As a continuation of TikZ word search diagram here is the problem I'm facing. I did what Explorer suggested and it worked fine except that my rounded rectangles look like sausages or like Hieroglyphic ...
5
votes
3
answers
99
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 ...
6
votes
3
answers
99
views
Vertical text with multicolumn and tabularx looks weird
I have the following snippet
\documentclass{article}
\usepackage{tabularx}
\usepackage{rotating}
\usepackage{multirow}
\newcolumntype{C}{>{\centering\arraybackslash}X}
\newcolumntype{V}{>{\...
7
votes
1
answer
188
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 ...
4
votes
1
answer
217
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 ...
5
votes
1
answer
187
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{...
5
votes
2
answers
104
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
3
answers
96
views
Vertical alignment of equations inside tabularx
I'm trying to put multiple numbered equations into one line to save space. One way to do this is to put the equations inside a tabularx table. However, when I try to put an equation environment inside ...
7
votes
1
answer
176
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 ...
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://...
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 ...
3
votes
2
answers
107
views
The defined date command doesn't work before \today when invoking babel
A MWS is as follows.
\documentclass{ctexart}
\usepackage[main=chinese, provide=*]{babel}%
\babelprovide{greek}
\babelfont[greek]{rm}[Scale=MatchUppercase, ItalicFont={GFSArtemisiaIt.otf}, BoldFont={...
2
votes
3
answers
115
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
166
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
2
answers
117
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 ...
1
vote
3
answers
83
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: ...
5
votes
2
answers
98
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},
}
\...
1
vote
3
answers
108
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} ...
0
votes
4
answers
82
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 ...
3
votes
2
answers
91
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 ...
2
votes
3
answers
74
views
Float too large with minipage of \textheight
I sometimes want to put the content of a float on a page by itself and control the alignment in the usual type area. To do this, I use a minipage that has exactly the size \textwidth x \textheight. ...
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 ...
-2
votes
1
answer
45
views
Conspicuous deficiency of the longdivision package
This manual seems to say that this package does the arithmetic for you and only gives results that are correct and complete. I don't know how anyone who teaches mathematics fails to see what's wrong ...
2
votes
1
answer
122
views
How to use Bézier curves in `TikZ` to draw a quotation mark?
In a previous question (i.e., How to align the visual bottom of a large quotation mark with the cap height of the text?) I was looking for a solution for how to properly align a quotation mark. As cfr ...
3
votes
1
answer
90
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 ...
1
vote
1
answer
66
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 ...
5
votes
1
answer
67
views
During (expl3) *-map_inline, get the index of the considered item without any auxiliary integer
In the following MCE, I apply to every item stored within the \l_tmpa_clist clist an inline function that displays this item preceded by its index (its position in the list). For this index, an ...
4
votes
1
answer
93
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}
$...
0
votes
1
answer
73
views
What is math mode used for? [closed]
Do people creatively use math mode for things other than math? If so, when and why?
1
vote
1
answer
85
views
Better font for epigraphs [closed]
I'm still really a noob with fonts in LaTeX. I'm looking for a better font display than the one used in the code below. What other nice font codes should I try on line marked with a comment, to get ...
0
votes
3
answers
48
views
How to both use and pass on an option in a package
I can't figure out how to both use an option in a package and pass it to a second package.
This will store to \cmdA in mwe_pkgA, but will not pass to mwe_pkgB:
% --------------------------------
% ...
2
votes
2
answers
160
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: ...
2
votes
1
answer
92
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 ...
2
votes
1
answer
61
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}...
5
votes
1
answer
62
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 ...
1
vote
1
answer
111
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 ...
1
vote
2
answers
36
views
Compatibility issues between ibrackets and \underset/\overset/\substack
The ibrackets package doesn't seem to work when I use \underset or \overset.
\[
]-\infty\underset{\substack{\uparrow \\ \frac{\pi}{2n}}}{,} a] \text { oppure } [a\underset{\substack{\uparrow \\ \frac{\...
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 ...
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?
3
votes
1
answer
109
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:
\...
2
votes
1
answer
48
views
Difference between \begin{align*}...\end{align*} and \align* ...\endalign*
I thought that \begin{env}...\end{env} is essentially equivalent to \env ...\endenv. However, in the case of align*, the first example below compiles without issue, while the second gives a runaway ...
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{...