Hot
- latexml: How to subimport child document with optional arguments in its document class?by Nasser on July 17, 2026 at 5:45 am
I have index.tex which does \subimport on child.tex. All in same folder. This compiles fine in lualatex but gives error in latexml. Here is MWE %index.tex \documentclass[12pt]{book} \usepackage{import} \usepackage{standalone} \begin{document} this is a test \subimport*{./}{child.tex} \end{document} and %child.tex \documentclass[12pt]{article} \begin{document} this is a test in child document \end{document} Compiling gives latexml --dest=index.xml index.tex latexml (LaTeXML version 0.8.8) processing index.tex Warning:missing_file:12pt Can't find binding for package 12pt at child.tex; line 1 col 1 Conversion complete: 1 warning; 1 missing file[12pt.sty] A work around is to change \documentclass[12pt]{article} to \documentclass{article} in child.tex. Now it compiles OK. But this means if I want to compile child.tex on its own, and want 12pt, I have to edit the file, add [12pt] compile, edit the file again, remove the [12pt] and then compile index.tex. Is there a way to make latexml accept optional arguments to \documentclass in the subimported files? latexml --VERSION latexml (LaTeXML version 0.8.8) On Linux mint. Using github latest version of latexml.
- How unicode accents combining character convert to LaTeX accent commands?by mathrm alpha on July 17, 2026 at 4:18 am
Although the newcomputermodern usepackages in LaTeX offer more Unicode accents, when I tried to convert them to (like \Vecbelow{a}), I found that Unicode accents must be placed after the letter, while LaTeX accents are placed before the letter and enclose it. It cannot directly enclose letters like the native LaTeX accents command to this letter here: . \documentclass{article} \usepackage{newcomputermodern} \begin{document} \t{a} a\symbol{"0362} \symbol{"0362}a \end{document}
- Calculation number leak out with `businessman` in `tikzpeople`?by Explorer on July 17, 2026 at 1:48 am
With the following MWE: \documentclass[tikz,border=5pt]{standalone} \usepackage{tikzpeople} \begin{document} \begin{tikzpicture} \node[businessman, minimum size=1.5cm] {}; \end{tikzpicture} \end{document} However, in the terminal output, we know that: Missing character: There is no * in font nullfont! Missing character: There is no 4 in font nullfont! Missing character: There is no . in font nullfont! Missing character: There is no 7 in font nullfont! Missing character: There is no 0 in font nullfont! Missing character: There is no 2 in font nullfont! Missing character: There is no 9 in font nullfont! Missing character: There is no 4 in font nullfont! Missing character: There is no p in font nullfont! Missing character: There is no t in font nullfont! Is that a bug with tikzpeople? Any quick fix to prevent this?
- How to clip at the edge of a *drawn* line?by karlh on July 17, 2026 at 1:01 am
I am attempting to do a faded (partially-transparent) picture that is "outlined" at three different levels of opacity/color mixing. These should form the "convex boundary" (similar to that called for in "padded boundary of convex hull") of the original path with several different values of the "padding." The shape will, in general, be very complex (i.e., composed of many, many segments). Essentially, I want (almost) the inverse of this: \documentclass[tikz]{standalone} \usepackage{worldflags} \begin{document} \begin{tikzpicture} \pic [country=PT,length=4cm,width=4.5cm,framewidth=0pt] at (0.5,1.25) {worldflag}; \path [save path=\mypath] (0,0) -- (1,0.5) -- (1.5,1) -- (1,2) -- (0.5,1.5) -- (-0.25,2.5) -- (-0.5,0.5) -- cycle; \path [use path=\mypath,draw=black,line width=1.5cm,line join=round,opacity=0.05]; \path [use path=\mypath,draw=black,line width=0.4cm,line join=round,opacity=0.2]; \path [use path=\mypath,draw=black,line width=0.1cm,line join=round,opacity=0.4]; \path [use path=\mypath,fill=black,opacity=1]; \end{tikzpicture} \end{document} By "inverse" I mean that everywhere that is black in this image should be transparent, everything that is gray should be that % transparent, and everything outside the outermost boundary (the very slightly shaded region around the outside) should be clipped away or be filled with a background color. Note that I used the flag of Portugal as my picture here, but it can be any arbitrary image or drawing (assuming what I want to do is possible). I have tried using the nfold library (technically the offsetpath PGF library), but it has issues with concave shapes that are offset: \documentclass[tikz]{standalone} \usetikzlibrary{nfold} \usepackage{worldflags} \begin{document} \begin{tikzpicture} \coordinate (a) at (2,1); \coordinate (b) at (2.5,0.25); \coordinate (c) at (3,0.75); \coordinate (d) at (3.5,0); \coordinate (e) at (4,1); \coordinate (f) at (3,2); \path [save path=\island] (a) -- (b) -- (c) -- (d) -- (e) -- (f) -- cycle; \begin{scope} \pgfsetroundjoin \pgfoffsetpath{\island}{-5cm} \pgfpathclose \pgfusepath{clip} \pic [country=PT,width=12cm,at={(5cm,1cm)}] {worldflag}; \end{scope} \end{tikzpicture} I have also tried using the soft path (via spath3 and a subroutine I wrote myself using it), and that has similar issues with self-intersecting/overlapping offsets that occur with concave paths. Is there some way to say "use this drawing as a transparency mask" in TikZ? If not, I would appreciate referrals to libraries for which I should look through documentation. The final result should look something like this (without having to draw the outer path by hand, which I did to make this one):
- Why placing the tikzpeople node in vertical order creates a large vertical space below the 3rd level?by Raja on July 16, 2026 at 6:26 pm
I am trying to create a 3 hierarchy levels using maninblack at level 1, businessman at level 2 and dave at level 3, create empty vertical space below the 3rd level, which pushes the caption out of page. I want to know why this is happening and how to resolve it? \documentclass{article} \usepackage{tikz} \usepackage{tikzpeople} \usetikzlibrary{patterns} \usepgflibrary{patterns.meta} \usetikzlibrary{shapes,arrows, shadows, fadings} \usetikzlibrary{calc} \usetikzlibrary{decorations.text} \usetikzlibrary{intersections,backgrounds} \usetikzlibrary{decorations.pathreplacing} \begin{document} Introduction\\ \begin{figure}[htbp] \centering \begin{tikzpicture}[transform shape, scale=1] \draw (0,4.5)node[maninblack, anchor=center, minimum size=1.5cm](da){} (da.south)++(0,-0.01)node[below, align=center, fill=white](m){\small \texttt{CreditDefinitions.tex}} (da.south)++(0,-1.5)node[businessman, anchor=north, minimum size=1.5cm](hod2){} (hod2.south)++(0,-0.01)node[below, align=center](m) {\small Compile: Main.tex $\rightarrow$ $<$course-code1$>$, $<$course-code2$>$, $\cdots$, $<$course-codeN$>$} ++(0.05,-0.06)node(r){}++(-0.1,-0.045)node(t){} (hod2.east)++(0.5,0)node[businessman, fill opacity=0.8, anchor=west, minimum size=1.5cm](hod3){} (hod2.west)++(-0.5,0)node[businessman, fill opacity=0.8, anchor=east, minimum size=1.5cm](hod1){} ; \foreach \x in {1,2,3}{ \ifnum\x=2 \draw[-stealth] (da.south)++(0,-0.1)to($(hod\x.north)+(0,0.1)$); \else \draw [dashed, -stealth] (da.south)++(0,-0.1)to($(hod\x.north)+(0,0.1)$); \fi } \foreach \x in {1,...,5}{ \pgfmathparse{(2*\x-6)}\xdef\res{\pgfmathresult} \pgfmathparse{int(\x==3 || \x==4)} \ifnum\pgfmathresult=1 \draw (m.center)++(\res,-1)node[circle, fill=black, scale=0.2](d\x){}; \else \draw(m.center)++(\res,-1)node[dave, anchor=north, minimum size=1.2cm](exp\x){} ; \ifnum\x=5 \draw (exp\x.south)++(0,-0.25)node[below, align=center]{\small Expert N}; \pgfmathparse{(0.5+0.25)} \draw[-stealth]($(m.center)+(0,-0.1)$) to node[pos=\pgfmathresult, align=center, fill=white](ab\x){}(exp\x.north); \draw[-stealth, dashed](exp\x.north)++(-0.1,-0.1) to node[pos=\pgfmathresult, align=center, fill=white](ba\x){}($(m.center)+(0,-0.2)$); \draw[magenta, rounded corners, -stealth] (ab\x.center)node[circle, fill=magenta, scale=0.2]{}|-(r.center); \draw[violet, rounded corners, dashed, -stealth] (ab\x.center)++(0,-0.15)node[circle, fill=violet, scale=0.2]{}|-(t.center); \draw (ab\x-|r)++(0,0.2)node[right, color=magenta!80!black]{\small$<$course-codeN.tex$+$.bib$>$ $+$ Main.aux}; \draw (ab\x-|t)++(0,-0.4)node[left, color=violet!90!black]{\small$<$course-codeN.tex$+$.bib$>$}; \else \draw (exp\x.south)++(0,-0.25)node[below, align=center]{\small Expert \x}; \pgfmathparse{((\x*0.2)+0.2)} \draw[-stealth]($(m.center)+(0,-0.1)$) to node[pos=\pgfmathresult, align=center, fill=white](ab\x){} (exp\x.north); \draw[-stealth, dashed](exp\x.north)++(0.1,-0.1) to ($(m.center)+(0,-0.2)$); \draw[magenta, rounded corners, -stealth] (ab\x.center)node[circle, fill=magenta, scale=0.2]{}|-(r.center); \draw[violet, rounded corners, dashed, -stealth] (ab\x.center)++(0,-0.1)node[circle, fill=violet, scale=0.2]{}|-(t.center); \draw (ab\x.center-|r)++(0,0.5)node[right, color=magenta!80!black]{\small$<$course-code\x.tex$+$.bib$>$}; \draw (ab\x.center-|t)++(0,-0.1)node[left, color=violet!90!black]{\small$<$course-code\x.tex$+$.bib$>$}; \fi \fi } \end{tikzpicture} \caption{Illustration of Syllabus.cls Usage between HOD and subject experts}\label{fig:usage-illustration} \end{figure} \end{document}
- PGFplot ybar stacked with meta databy Paul on July 16, 2026 at 4:11 pm
I want to use ybar stacked to plot data for multiple series. I first tried to organise my data.dat file like that : { config; value1; value2; value3 config1; 3; 4.2; 1 config2; 3.25; 6; 0.758 } with for each row the series symbolic name and all the values. I then used a for loop to plot each column. This worked fine and all the data were stacked correctly. But I also need for each data point to have specific label and color meta data like in my MWE : \documentclass[class=article, crop=true,varwidth=false]{standalone} \usepackage{tikz,pgfplots} \pgfplotsset{compat=1.18,width=15cm,height = 5.5cm} \begin{document} \begin{tikzpicture} \begin{axis}[ axis y line* = left,axis x line* = bottom, ybar stacked, table/col sep=semicolon, symbolic x coords={config1,config2}, xtick = data, ] \addplot+[nodes near coords,point meta=explicit symbolic,] table [trim cells=true,y expr=\thisrow{value}, x=config,meta = label ] { config; value; type; label config1; 3; L; $W_{L1}$ config1; 4.2; C; $W_{C1}$ config1; 1; L; $W_{L2}$ config2; 3.25; L; $W_{L1}$ config2; 6; C; $W_{C1}$ config2; 0.758; L; $W_{C2}$ }; \end{axis} \end{tikzpicture} \end{document} This is compiling but data are not stacked. PGFplog interprets each row as a new serie and plot the bar from 0. What would be the easiest way to plot the stacked bar with meta data for each point ? Thank for your help !
- Drawing and defining functions in tikzby Medulla Oblongata on July 16, 2026 at 2:48 pm
I am trying to draw a graph (function of the form sin()*exp(-x^2)) inside an ellipse. How do I fit the graph inside the ellipse? I don't know how to scale and position it correctly. \documentclass[tikz]{standalone} \usepackage{tikz} \begin{document} \begin{tikzpicture} \draw[line width=1.2,fill=white] (1.5,0.5) ellipse (1.5 and 0.5); \draw[scale=0.1, domain=-20:20, samples=500, smooth, variable=\x, blue] (1.5,0.5) plot ({\x}, {0.5*sin(\x) * exp(-0.02*(\x)*(\x))}); \end{tikzpicture} \end{document} I want to produce something like:
- A little mystery about array and math modeby invictus on July 16, 2026 at 1:05 pm
As far as I know, the array environment needs to be in math mode. Not surprisingly, the following code fails on TeXlive 2025 on Overleaf with the error message "missing $ inserted". \documentclass{article} \begin{document} \begin{array}{c} x \end{array} \end{document} However, the same code compiles without any errors on my local TeXlive 2026. I haven't found any documentation on the change of the behavior of array from 2025 to 2026, so I am curious how it is able to run outside of math mode here. kpsewhich latex.ltx returns /usr/local/texlive/2026basic/texmf-dist/tex/latex/base/latex.ltx and kpsewhich array.sty returns /usr/local/texlive/2026basic/texmf-dist/tex/latex/tools/array.sty The file resides alone in a separate folder of its own. So, it seems that the standard texlive distribution is used and nothing else. Any ideas?
- Problem with correct float placement [duplicate]by kacper on July 16, 2026 at 10:33 am
I have a couple of floats that, in the final compiled PDF, should wind up exactly where they are entered in TEX. I use the standard formula: \begin{figure}[h] \begin{center} \includegraphics[width = 0.4 \textwidth]{some.pdf} \end{center} \caption{Some caption} \label{some_label} \end{figure} I tried replacing [h] with [htbp], [h!], [!h] and even [H], [H!] (using the float package) but none of this has any effect on the placement of the image. Currently using a workaround with \FloatBarrier from the placeins package ... but the results don't look great. Is there a way to fix this? Suggestions would be greatly appreciated. PS I'm using OverLeaf with the pdflatex compiler and the single column style package downloaded from Computer Physics Communications (edit: \documentclass[a4paper,fleqn]{cas-sc}).
- Custom link text with cleverefby Namal on July 16, 2026 at 9:53 am
I am referencing a table with label = {tblr:reference1} and \cref{tblr:reference1}. With nameinlink in options I have a link: Table 1. How can I set a custom link text, like you do it with hypertarget: \hypertarget{pointsto}{Actual text.} \documentclass[ngerman]{article} \usepackage[T1]{fontenc} \usepackage{lmodern} \usepackage{babel} \usepackage[landscape, margin=0.5cm]{geometry} \usepackage{xcolor} \usepackage{hyperref} \hypersetup{ colorlinks=true, linkcolor=red } \usepackage{tabularray, tblr-extras} %% the longtable that we neeed %% \UseTblrLibrary{babel,amsmath,varwidth} %% load these modules for tabularray %% \usepackage[]{cleveref} \begin{document} \centering \begin{longtblr}[ caption = {Caption}, label = {tblr:reference1} ] { colspec={Q[l,m] Q[l,m] X[l,m] X[3,c] l l X[l,m]}, vlines, cell{1}{1-Z}={bg=azure8, font=\sffamily}, cell{2}{1-Z}={red9}, rowhead = 2, measure=vbox, vspan=even } \hline 1 & 2 & 3 & 4 & 5 & 6 & 7 \\ \hline 1 & 2 & 3 & 4 & 5 & 6 & 7 \\ \hline 1 & 2 & 3 & 4 & 5 & 6 & 7 \\ \hline 1 & 2 & 3 & 4 & 5 & 6 & 7 \\ \hline 1 & 2 & 3 & 4 & 5 & 6 & 7 \\ \hline \end{longtblr} \newpage This is a text, this is a link to \cref{tblr:reference1}. \end{document}
- Styling Headings in Chineseby Climber of Mount. LaTeX on July 16, 2026 at 3:11 am
Is there a macro or something out there to convert the style of headings into Chinese? By which I mean, to make something like \documentclass{article} \usepackage{xeCJK} \setCJKmainfont{Noto Sans CJK TC} \begin{document} \section{甲章} \subsection{甲節} \subsection{乙節} \end{document} display 壹、甲章 一、甲節 二、乙節 Preferably, the numberings should be customizable between 壹貳, 一二, 甲乙, (一)(二), 1 2, and so on. For reference, I am using XeLaTeX and the xeCJK package on the Overleaf platform.
- IEEETran is not giving me the correct format for multiple citationsby ali bab613 on July 16, 2026 at 1:21 am
I have this MWE I extracted from my document on Overleaf (compiled in LuaLaTeX, which is necessary for my project): \documentclass[]{report} \begin{document} see here \cite{ref1,ref2} \bibliographystyle{IEEEtran} \bibliography{references} \end{document} and its giving me the citations as "see here [1,2]", instead of "see here [1], [2]". This is the exact opposite of the problem found in this question, though it seems both of us have our packages at their default. Thanks in advance for any suggestions EDIT: The original question had it written that I wanted no brackets. This was due to shoddy editing of the question on my part. I've updated my required citation format is of the form [1], [2], i.e., with square brackets around each and every citation call-out. Thank you.
- Canvas 3D effect for vectors flattened along an axis or planeby Sebastiano on July 15, 2026 at 7:39 pm
I would like to realize the following image in TikZ, which I had created very roughly in Adobe Illustrator. I am interested in understanding how to use TikZ 3d canvas to squash vectors along planes or lines. I would also like to see how it is used for labels. Here my attempt. See after the missing pieces. \documentclass{article} \usepackage{amsmath} \usepackage{bm} \usepackage{tikz} \usetikzlibrary{arrows.meta, angles, calc} \tikzset{rhtip/.tip={Triangle[line width=1pt, fill=white, length=9pt, width=9pt]}} \definecolor{vectorgreen}{RGB}{76, 181, 93} \definecolor{vectororange}{RGB}{235, 104, 38} \definecolor{vectorbrown}{RGB}{175, 110, 52} \definecolor{ellipseblue}{RGB}{112, 196, 172} \definecolor{spherepurple}{RGB}{155, 120, 200} \begin{document} \begin{tikzpicture}[>=latex] \coordinate (O) at (0,0); \draw[thin, black!70] (O) -- (0, 4.2) node[right, font=\Large] {$z$}; \draw[thin, black!70] (O) -- (5.5, -1.0) node[below right, font=\Large] {$y$}; \draw[thin, black!70] (O) -- (-4.8, -1.9) node[left, font=\Large] {$x$}; \coordinate (C) at (-2.2, -0.88); \fill[black] (C) circle (3.5pt) node[below=8pt, font=\Large] {$C$}; \begin{scope}[shift={(C)}, rotate=12] \draw[ellipseblue, line width=1.5pt] (0,0) ellipse (1.1 and 2.5); \draw[ellipseblue, line width=1.5pt, ->, >=latex] (131:1.1 and 2.5) -- (130:1.1 and 2.5); \draw[thin, black!60] (0,0) -- (225:1.1 and 2.5) node[midway, below right, font=\Large] {$r$}; \shade[ball color=spherepurple] (155:1.1 and 2.5) circle (0.18); \end{scope} \coordinate (P) at (4.0, 2.3); \coordinate (P_proj) at (4.0, -1.6); \draw[dashed, thick, black!80] (P) -- (P_proj); \draw[dashed, thick, black!80] (O) -- (P_proj); \draw[-rhtip, vectororange, line width=2pt] (O) -- (0, 1.9); \node[above right=2pt, font=\Large] at (0, 1.9) {$\bm{\beta}$}; \draw[-rhtip, vectorbrown, line width=2pt] (O) -- (-1.4, -0.56); \node[above=6pt, font=\Large] at (-0.7, -0.15) {$\mathbf{a}$}; \draw[-rhtip, vectorgreen, line width=2pt] (O) -- (3.9, 2.2); \node[below right=4pt, font=\Large] at (1.8, 1.1) {$\mathbf{R}$}; \fill[black] (P) circle (3.5pt) node[above right=4pt, font=\Large] {$P$}; \shade[ball color=spherepurple] (O) circle (0.22); \node[above left=6pt, font=\Large] at (O) {$q$}; \draw[<->, >=latex, semithick, black!80] (30:1.3) arc (30:90:1.3); \node[font=\Large] at (60:1.65) {$\theta$}; \node[font=\Large, below left=6pt] at (1, 0, 1) {$\varphi$}; \end{tikzpicture} \end{document}
- Displaying an Elliptical Ring of Segments with Angular Adjustmentsby DDS on July 15, 2026 at 5:37 pm
Consider the code: \documentclass{book} \usepackage{graphicx} \usepackage{tikz} \usetikzlibrary{decorations.markings} \begin{document} \thispagestyle{empty} \begin{center} \begin{tikzpicture} \fill[red!55!black] rectangle (6,8); \draw[ decoration={markings, mark=between positions 0 and 1 step 1/12 with { \node {\textcolor{yellow}{\rule{0.35in}{.65mm}}}; } }, decorate ] (3,4) ellipse (2cm and 3cm); \end{tikzpicture} \end{center} \end{document} which produces QUESTION: How may I display each of these twelve line segments so that they are pointed in their relative angular direction from the center? In other words, if we call the line segment farthest to the right the first line segment---it will be displayed as is. The second line segment (being the one immediately above it) will be pointed in a direction 30 degrees above the horizontal. Proceeding in a counterclockwise direction, the next angle will be pointed 60 degrees ... and so forth. I compile the code with xelatex. Thank you.
- "Continued" text odd page only using tcolorboxby MadyYuvi on July 15, 2026 at 1:27 pm
From my previous post: "(Continued)" text should come at the end of page tcolorbox thanks to Sam Carter \documentclass{book} \usepackage[most,skins,breakable]{tcolorbox}% \tcbuselibrary{skins,breakable}% \tcbset{enhanced,breakable}% \usepackage{lipsum} \begin{document} \begin{tcolorbox}[ colback=white, colframe=black!80, arc=9pt, skin first=enhanced, skin middle=enhanced, skin last=enhanced, overlay first and middle={ \node[anchor=south east] at (frame.south east) {(continued)}; }, bottom=15pt ]% \sffamily\normalsize% \lipsum[1-15] \end{tcolorbox} \end{document} But I need the text Continued text only on Odd pages, for this, I've tried with: \begin{tcolorbox}[ colback=white, colframe=black!80, arc=9pt, skin first=enhanced, skin middle=enhanced, skin last=enhanced, if odd page={ overlay first and middle={ \node[anchor=south east] at ([yshift=4pt]frame.south east) {(continued)}; }}{}, bottom=15pt ]% But nothing happens, please suggest what mistake I did, please
- List of theorems in HTML using tex4ht + thmtoolsby Stephen Powell on July 15, 2026 at 12:19 pm
The following (listoftheorems.tex) uses the command \listoftheorems provided by the thmtools package: \documentclass{article} \usepackage{hyperref} \usepackage{amsthm} \usepackage{thmtools} \declaretheorem{theorem} \begin{document} \begin{theorem}[Euclid] For every prime $p$, there is a prime $p'>p$. \end{theorem} \listoftheorems \end{document} Compiled to PDF, it gives a \section* containing a numbered list of theorems. But when I compile the document to HTML (make4ht listoftheorems.tex), the list of theorems is empty.
- Inconsistent font feature rendering with plain luatexby niru on July 15, 2026 at 11:08 am
For some reasons, I have to work with plain LuaTeX. All this while, I have used LuaLaTeX with fontspec and moving to LuaTeX is not exactly easy. I am getting surprised by LuaTeX's behaviour. For example, let's have a look at the following code: \input luaotfload.sty \font\main={NewCM10-Book:+onum,+cv06,+liga} \font\deva={Mukta-Light:Language=Marathi,Script=Devanagari} \main hello world 1234567890 {\deva निरंजन ल श} \bye When I run the exact same code multiple times (with the same terminal command, i.e., luatex test.tex), I sometimes get: which is incorrect. Sometimes I get: which is partly correct (the special linguistic forms of Marathi are not rendered). Sometimes, with the same code, I have gotten the following which is fully correct: I mean, what? I chose this particular MWE because this is a typical setup in most of my PDF files. NewCM10-Book with old style numbers and old style one (provided by +cv06) and Mukta-Light for Marathi text. I added the features on purpose to show that in both the screenshots, multiple features are working correctly for NewCM10, but in some compilations, it is breaking for Mukta. I compared the log of both correct and incorrect output and the only difference was in the byte size reported by "Output written on test.pdf (1 page, 17621 bytes)". Rest everything was okay. What exactly could be happening? Note that this is happening with a fully updated TeX Live 2026 on a GNU Linux machine.
- "(Continued)" text should come at the end of page tcolorboxby MadyYuvi on July 15, 2026 at 9:50 am
I need a breaking box with all side frames even it breaks, I tried with \documentclass{book} \usepackage[most,skins,breakable]{tcolorbox}% \tcbuselibrary{skins,breakable}% \tcbset{enhanced,breakable}% \usepackage{lipsum} \begin{document} \begin{tcolorbox}[enhanced,colback=white,colframe=black!80,arc=9pt, skin first=enhanced, skin middle=enhanced, skin last=enhanced, ]% \sffamily\normalsize% \lipsum[1-5] \end{tcolorbox} \end{document} This produced the output as: But, need to add the text (Continued) at the end of page when the box breaks
- Question About Running Headers with Multiple Indexesby test on July 15, 2026 at 8:56 am
I have another question regarding the index. I have two indexes, and the second one begins on the same page on which the previous index ends. As a result, the running header on that page remains blank. Instead, I would like the header to display the title of the index that is ending (in this case, "Wirr"). How can I achieve this? I considered using headers={\leftmark}{\rightmark} together with firstpagestyle=headings, but that would also produce a running header on the first page of the index, which I would prefer to avoid. Here is my MWE: % Source - https://tex.stackexchange.com/a/764587 % Posted by David Carlisle, modified by community. See post 'Timeline' for change history % Retrieved 2026-07-15, License - CC BY-SA 4.0 % Source - https://tex.stackexchange.com/q/764586 % Posted by test % Retrieved 2026-07-10, License - CC BY-SA 4.0 % Notes: % - delim_0 is the separator between entry and page number of level 0 % we use it to add insert a fix space of 1cm % - delim_1 is the same for level 1 % - delim_2 is the same for level 2 \begin{filecontents}[overwrite]{\jobname.ist} delim_0 " \\foo" delim_1 " \\foo" delim_2 " \\foo" \end{filecontents} \def\foo{ \nobreak \hskip 3pt plus 1 fill minus 1pt % \begin{minipage}[t]{2cm}\raggedright \foox} \long\def\foox#1#2#3{% \ifx,#3% #1{#2}#3 % \expandafter\foox\else #1{#2} \end{minipage}\par #3% \fi} \documentclass{scrbook} \usepackage[automark]{scrlayer-scrpage} \clearpairofpagestyles \ohead{\pagemark} \chead{\headmark} \setkomafont{pagehead}{\fontsize{8.5pt}{10pt}\selectfont\slshape} \setkomafont{pagenumber}{\normalfont\fontsize{10pt}{12pt}\selectfont} \renewcommand{\chaptermark}[1]{% \markboth{\thechapter.\ #1}{}} \renewcommand{\sectionmark}[1]{% \markright{\thesection.\ #1}} \usepackage{scrlayer} \DeclareNewLayer[ background, rightmargin, contents={% \parbox[b][\layerheight][c]{\dimexpr\footskip+\footheight\relax}{% \hfill\rotatebox{90}{\pagemark}}} ]{lscape.foot} \DeclareNewLayer[ background, textarea, addhoffset=\dimexpr-\headsep-\headheight\relax, width=\dimexpr\headsep+\headheight\relax, contents={\hfill\rotatebox{90}{\headmark}\hspace*{\headsep}} ]{lscape.head} \DeclareNewPageStyleByLayers{lscape}{} \usepackage{imakeidx} \usepackage{hyperref} \makeindex[options={-s \jobname.ist}, title={1. Wirrwarr}] \makeindex[options={-s \jobname.ist}, name=Bibel,title={2. Bibelstellen}] \makeatletter \renewcommand*{\@idxitem}{\par\hangindent 0.4cm}% use a hanging indent of 0.4cm on all levels \makeatother \indexsetup{level=\section*} \indexsetup{level=\section*,toclevel=section,noclearpage} %\indexsetup{level=\chapter*} %\makeatletter %\renewcommand*{\idx@@heading}{\section} %\makeatother \makeatletter \patchcmd{\idx@@heading}{\section*}{\chapter*}{}{} \makeatother \begin{document} \section{First section} Lorem ipsum dolor sit amet, consectetur adipiscing elit. \index{0@Genesis!1} Aliquam rutrum aliquet elit in pellentesque. Proin nulla eros, consequat nec\index{1@pu} convallis vel, vulputate vitae purus\index{0@purusu rusuru surus Schönheitswahnsinn}. Pellentesque consequat euismod sapien, ac porttitor diam laoreet id. Pellentesque habitant morbi tristique senectus\index{senectus} et netus et malesuada fames ac turpis egestas. Sed vehicula magna orci, nec congue sem congue ac. Sed fringilla aliquam interdum. Nullam quis commodo massa.\index{Schönheitswahnsinn abc def ghi jklmnopq} \newpage A \index{senectus} \index[Bibel]{Genesis} \newpage TEST \index{senectus} \index{1@pu}\index{senectus} \newpage Test \index{0@Exodus!2, 100} \index{0@Genesis!1} \index{1@pu} \index{k} \index{aj} \index{aq} \index{ah} \index{aw} \index{ga} \index{ae} \index{fa} \index{ar} \index{j} \index{q} \index{h} \index{w} \index{g} \index{e} \index{f} \index{r} \index{dd} \index{t} \index{d} \index{z} \index{rr} \index{u} \index{s} \index{i} \index{sv} \index{o} \index{a} \index{p} \index{y} \index{ü} \index{x} \index{n} \index{c} \index{öä} \index{v} \index{l} \index{b} \index{ll} \newpage Test \newpage B \index{0@Genesis!1} \newpage C \newpage Test \index{dd2} \index{t1} \index{d2} \index{z2} \index{r2r} \index{u2} \index{s2} \index{i4} \index{sv2} \index{o4} \index{a2} \index{p4} \index{y2} \index{ü4} \index{x2} \index{n4} \index{c2} \index{ö4ä} \index{v2} \index{l4} \index{b1} \index{ll4} \newpage Test \index{1@pu}\index{senectus} \newpage Test \index{0@Exodus!2, 100} \index{0@Genesis!1} \index{1@pu} \newpage xxx \index{1@pu}\index{senectus} \newpage Test \index{0@Exodus!2, 100} \index{0@Genesis!1} \index{1@pu} \newpage Test \index{1@pu}\index{senectus} \newpage Test \index{0@Exodus!2, 100} \index{0@Genesis!1} \index{1@pu} \newpage xxx \index{1@pu}\index{senectus} \newpage Test \index{0@Exodus!2, 100} \index{0@Genesis!1} \index{1@pu} \newpage Test \index{1@pu}\index{senectus} \newpage Test \index{0@Exodus!2, 100} \index{0@Genesis!1} \index{1@pu} \newpage \pagestyle{scrheadings} \manualmark \markboth{Wirr}{Register} \printindex \pagestyle{scrheadings} \manualmark \markboth{Quellenregister}{Register} \printindex[Bibel] \end{document}
- force text into one lineby Nate on July 15, 2026 at 4:52 am
I have a line of text that LaTeX refuses to group into one line even though it fits. I used \thinspace the whole way which has worked every one of the hundreds of other times I've tried it, but not this time. \documentclass{book} \usepackage[margin=1in]{geometry} \begin{document} \noindent \begin{minipage}{3.5in} (other text in other rows) angle\thinspace into\thinspace two\thinspace congruent\thinspace $30^\circ\!-60^\circ\!-90^\circ$\thinspace right\thinspace triangles ($\triangle$s\thinspace BMA\thinspace and\thinspace BMC),\thinspace the \end{minipage} \end{document} which the program breaks in weird ways: Is there another way to further force text into a given space (especially as one line, i.e. a "line minipage") that can be implemented cleanly as part of a larger paragraph? (I'm using the book class and, if it matters, TeXstudio).
- preferred representation of the square of the arctangent of 1/2 in LaTeX math mode [closed]by Michael Aramini on July 14, 2026 at 9:57 pm
I'm seeking advice as to the preferred representation of the square of the arctangent of 1/2 in LaTeX in math mode. Here are the alternatives I can think of: {\tan^{-1}\,\left(\frac{1}{2}\right)}^2 {\arctan\left(\frac{1}{2}\right)}^2 {\mathrm{atan}\left(\frac{1}{2}\right)}^2 {\operatorname{atan}\left(\frac{1}{2}\right)}^2 \left[\tan^{-1}\,\left(\frac{1}{2}\right)\right]^2 \left[\arctan\left(\frac{1}{2}\right)\right]^2 \left[\mathrm{atan}\left(\frac{1}{2}\right)\right]^2 \left[\operatorname{atan}\left(\frac{1}{2}\right)\right]^2 \left(\tan^{-1}\,\left(\frac{1}{2}\right)\right)^2 \left(\arctan\left(\frac{1}{2}\right)\right)^2 \left(\mathrm{atan}\left(\frac{1}{2}\right)\right)^2 \left(\operatorname{atan}\left(\frac{1}{2}\right)\right)^2 \left(\tan^{-1}\,\frac{1}{2}\right)^2 \left(\arctan\,\frac{1}{2}\right)^2 \left(\mathrm{atan}\,\frac{1}{2}\right)^2 \left(\operatorname{atan}\,\frac{1}{2}\right)^2 \arctan^2\,\left(\frac{1}{2}\right) \mathrm{atan}^2\,\left(\frac{1}{2}\right) \operatorname{atan}^2\,\left(\frac{1}{2}\right) \arctan^2\,\frac{1}{2} \mathrm{atan}^2\,\frac{1}{2} \operatorname{atan}^2\,\frac{1}{2}
- Using expl3 syntax in my command. How to fix my code that uses a command to set fonts for foreign scripts in math mode in LuaLaTeX?by Sageof6Paths on July 14, 2026 at 4:59 pm
From my previous question here, I wanted a way to be able to write foreign scripts directly in math mode in LuaLaTeX while having different fonts for rm, sf, and tt. niru's answer provided what I wanted, but I wanted to wrap it all in a command like egreg's answer. When I rewrote niru's answer in the style of egreg's, foreign fonts don't render in text mode. I believe the problem lies here: \babelfont[#1]{rm}[NFSSFamily = {#1rm},#3]{#2} \babelfont[#1]{sf}[NFSSFamily = {#1sf},#5]{#4} \babelfont[#1]{tt}[NFSSFamily = {#1tt},#7]{#6} Anyhow, here is the code I'm using: \documentclass{article} \usepackage{babel} \usepackage{unicode-math} \usepackage{xcolor} \ExplSyntaxOn % Resetting math fonts with \rmfamily \hook_gput_code:nnn { cmd / rmfamily / before } { . } { % English \mathversion { rm } } % Resetting math fonts with \sffamily \hook_gput_code:nnn { cmd / sffamily / before } { . } { % English \mathversion { sf } } % Resetting math fonts with \ttfamily \hook_gput_code:nnn { cmd / ttfamily / before } { . } { % English \mathversion { tt } } \hook_gput_code:nnn { begindocument / end } { . } { \mathversion { rm } } % \enableblockformath{symbolic name}{rm font}[rm further options]{sf font}[sf further options]{tt font}[tt further options]{blocks} \NewDocumentCommand{\enableblockformath}{mmO{}mO{}mO{}m} {% #1 = symbolic name % #2 = rm font % #3 = rm further options % #4 = sf font % #5 = sf further options % #6 = tt font % #7 = tt further options % #8 = blocks % Loading language \babelprovide[import,onchar={ids fonts}]{#1} % Loading fonts \babelfont[#1]{rm}[NFSSFamily = {#1rm},#3]{#2} \babelfont[#1]{sf}[NFSSFamily = {#1sf},#5]{#4} \babelfont[#1]{tt}[NFSSFamily = {#1tt},#7]{#6} % Resetting math fonts with \rmfamily \hook_gput_code:nnn { cmd / rmfamily / before } { . } { \clist_map_inline:nn {#8} { \__egreg_blocksformath:nnn {#1} {##1} {rm} } } % Resetting math fonts with \sffamily \hook_gput_code:nnn { cmd / sffamily / before } { . } { \clist_map_inline:nn {#8} { \__egreg_blocksformath:nnn {#1} {##1} {sf} } } % Resetting math fonts with \ttfamily \hook_gput_code:nnn { cmd / ttfamily / before } { . } { \clist_map_inline:nn {#8} { \__egreg_blocksformath:nnn {#1} {##1} {tt} } } \hook_gput_code:nnn { begindocument / end } { . } { \clist_map_inline:nn {#8} { \__egreg_blocksformath:nnn {#1} {##1} {rm} } } \DeclareSymbolFont{#1rm}{TU}{#1rm}{m}{n} \DeclareSymbolFont{#1sf}{TU}{#1sf}{m}{n} \DeclareSymbolFont{#1tt}{TU}{#1tt}{m}{n} } \cs_new_protected:Nn \__egreg_blocksformath:nnn { \seq_set_split:Nnn \l_tmpa_seq {-} {#2} \int_step_inline:nnn {\seq_item:Nn \l_tmpa_seq {1}} {\seq_item:Nn \l_tmpa_seq {2}} { \Umathcode ##1 = "0 ~ \use:c {sym#1#3} ~ ##1 } } \ExplSyntaxOff \babelprovide[import,main,onchar={ids fonts}]{english} \babelfont{rm}[Color = {red}]{NewCM10-Book.otf} \babelfont{sf}[Color = {green}]{NewCMSans10-Book.otf} \babelfont{tt}[Color = {blue}]{NewCMMono10-Book.otf} \setmathfont[version = {rm}, Color = {red}]{NewCMMath-Book.otf} \setmathfont[version = {sf}, Color = {green}]{NewCMSansMath-Regular.otf} \setmathfont[version = {tt}, Color = {blue}]{NewCMSansMath-Regular.otf} \enableblockformath{japanese}{HaranoAjiMincho-Regular.otf}[Color = {red}]{HaranoAjiGothic-Regular.otf}[Color = {green}]{HaranoAjiGothic-Regular.otf}[Color = {blue}]{"3040-"30FF,"4E00-"9FFF} \enableblockformath{thai}{NotoSerifThai-Regular.ttf}[Color = {red}]{NotoSansThai-Regular.ttf}[Color = {green}]{NotoSansThai-Regular.ttf}[Color = {blue}]{"0E00-"0E7F} \begin{document} English language ภาษาไทย 日本語 $x+y=ก+ข=あ+い$ \sffamily English language ภาษาไทย 日本語 $x+y=ก+ข=あ+い$ \ttfamily English language ภาษาไทย 日本語 $x+y=ก+ข=あ+い$ \end{document}
- Is possible using Rscript in listings with tcolorbox combined with listings (code/in AND execution/out)?by Mika Ike on July 14, 2026 at 7:43 am
With tcolorbox you can code LaTeX and shot the result, as you can see in the first box. Is that possible with Rscript?. \documentclass[12pt]{article} \usepackage{geometry} \usepackage{parskip} \usepackage{amsmath,mathtools} \usepackage{tcolorbox} \tcbuselibrary{listings} \tcbset{listing engine=listings} \tcbuselibrary{minted} \begin{document} \begin{tcblisting}{colback=red!5!white,colframe=red!75!black} This is a \LaTeX\ example which displays the text as source code and in compiled form. \hfill $x=\dfrac{-b\pm\sqrt{b^2-4ac}}{2a}$ \end{tcblisting} %\tcbset{listing engine=Rscript} \begin{tcblisting}{colback=red!5!white,colframe=red!75!black}[language=Rscript] a<-sample(1:24,5,replace=TRUE) mean(a) barplot(a) \end{tcblisting} \end{document}
- how to make local table of contents using etoc all start without shifting to the right?by Nasser on July 14, 2026 at 4:00 am
I am not using \cftsubsubsecindent 0pt so the following question did not help me figure why How to correctly indent a local table of contents with etoc? This is my MWE \documentclass[12pt,titlepage]{article}% \usepackage[titles]{tocloft} \usepackage{etoc} \newcommand{\makeLocalSectionToc} { \begingroup % Keeps layout changes isolated to just this local TOC \etocsetnexttocdepth{2} \etocsettocstyle{}{}% Completely removes "Local contents" and saves space \localtableofcontents \endgroup % Restores standard settings immediately after printing } \newcommand{\makeLocalSubsectionToc} { \begingroup % Keeps layout changes isolated to just this local TOC \etocsetnexttocdepth{3} \etocsettocstyle{}{}% Completely removes "Local contents" and saves space \localtableofcontents \endgroup % Restores standard settings immediately after printing } \newcommand{\makeLocalSubsubsectionToc} { \begingroup % Keeps layout changes isolated to just this local TOC \etocsetnexttocdepth{4} \etocsettocstyle{}{}% Completely removes "Local contents" and saves space \localtableofcontents \endgroup % Restores standard settings immediately after printing } \begin{document} \section{First order differential equations}% \makeLocalSectionToc \subsection{Algorithm charts} \makeLocalSubsectionToc \subsubsection{First chart}% \makeLocalSubsubsectionToc \paragraph{A} text \paragraph{B} text \end{document} compiled with lualatex Is the way the commands are defined not correct? Update Thanks to answers below. Here is the after and before result. I find having local toc's start at same offset better to look at it. Ofcourse this is personal choice. Someone else might think the way it was looks better. This uses \setlength{\cftparaindent}{20pt} for everyting.
- Text overflowing in tabular cell with makecellby Matias Aznar on July 13, 2026 at 11:05 pm
I'm creating a table in LaTeX with images and multi-line text in one column. The text in the "Observaciones" (Observations) column is overflowing outside the table boundaries and not wrapping properly within the cell. The third row's text wraps correctly, but the first two rows' text extends beyond the table width. I'm using \makecell[l] but it's not containing the text properly. How can I ensure the text stays within the cell boundaries and wraps properly regardless of content length? All rows should align at the top with text contained within the column width. The images sizes are 1257x1262 px \documentclass{article} \usepackage{geometry} \usepackage{makecell} \usepackage{graphicx} \geometry{ letterpaper, margin=3cm } \setlength{\marginparwidth}{2cm} \begin{document} \begin{table}[H] \centering \small \begin{tabular}{ >{\raggedright\arraybackslash}m{2cm} >{\centering\arraybackslash}m{3.4cm} >{\centering\arraybackslash}m{3.4cm} >{\raggedright\arraybackslash}m{6cm} } \hline \textbf{Fase} & \textbf{$L_1$} & \textbf{$L_3$} & \textbf{Observaciones} \\ \hline Poros & \includegraphics[width=3.3cm]{example-image} & \includegraphics[width=3.3cm]{example-image} & \makecell[tl]{ $N$: 127,090\\ $P_j$: 1.52\\ $T_G$: -1.16\\ Fuerte linealidad vertical } \\ \hline Óxido & \includegraphics[width=3.3cm]{example-image} & \includegraphics[width=3.3cm]{example-image} & \makecell[tl]{ $N$: 2,228\\ $P_j$: 1.09\\ $T_G$: -0.18\\ Débil anisotropía } \\ \hline Plagioclasa & \includegraphics[width=3.3cm]{example-image} & \includegraphics[width=3.3cm]{example-image} & \makecell[tl]{ $N$: 1,065\\ $P_j$: 1.29\\ $T_G$: -0.73\\ Orientación preferencial moderada sin embargo, se concentra en el eje Z } \\ \hline \end{tabular} \caption{Análisis de orientación de fases de la muestra L187.} \label{tab:stereonets_l187} \end{table} \end{document}
- Hollowed-out sphere effectby Sebastiano on July 13, 2026 at 10:49 pm
How can I obtain the hollowed-out sphere effect? The drawing above is my original done many years before. \documentclass{article} \usepackage{tikz} \usetikzlibrary{arrows.meta, calc, positioning, shapes.geometric} \begin{document} \begin{tikzpicture}[ scale=1.2, axis/.style={thick, ->} ] \coordinate (O) at (0, 0); \coordinate (X) at (-2, -2.3); \coordinate (Y) at (5.5, 0); \coordinate (Z) at (0, 4); \coordinate (P) at (3.1, 1.3); \draw[axis] (O) -- (X) node[left, font=\large, xshift=-3pt] {$x$}; \draw[axis] (O) -- (Y) node[below, font=\large, yshift=-3pt] {$y$}; \draw[axis] (O) -- (Z) node[left, font=\large, xshift=-3pt] {$z$}; \begin{scope} \shade[ball color=gray!30!white, opacity=0.85] (O) circle (0.9); \draw[gray!60, thin] (O) circle (0.9); \fill[gray!60!black, opacity=0.9] plot[smooth cycle, tension=0.7] coordinates { ($(O)+(-0.2, 0.4)$) ($(O)+(0.5, 0.5)$) ($(O)+(0.6, -0.4)$) ($(O)+(0.1, -0.6)$) ($(O)+(-0.3, -0.3)$) }; \shade[inner color=black!80, outer color=gray!70!black, opacity=0.5] plot[smooth cycle, tension=0.7] coordinates { ($(O)+(-0.2, 0.4)$) ($(O)+(0.5, 0.5)$) ($(O)+(0.6, -0.4)$) ($(O)+(0.1, -0.6)$) ($(O)+(-0.3, -0.3)$) }; \end{scope} \fill[black] (O) circle (0.07) node[below, yshift=-4pt, font=\large] {$O$}; \draw[->, >=Stealth, shorten >= 2.5pt, shorten <= 2pt] (O) -- (P) node[midway, above, yshift=2pt, font=\large] {$r$}; \fill[black] (P) circle (0.08) node[above, yshift=3pt, font=\large] {$P$}; \node[right, font=\Large\itshape, xshift=2pt, yshift=-2pt] at (P) {$m$}; \node[below, font=\large] at (0.2, -0.95) {$M$}; \end{tikzpicture} \end{document}
- How to write a chemical reactionby Brasil on July 13, 2026 at 3:04 am
I am trying to write a simple chemical reaction like this one: I have the MWE below. Can anyone help, please? \documentclass{article} \usepackage{chemfig} \begin{document} Nuclear reaction: \[ \schemestart \chemfig{^{235}U} \arrow{->} \chemfig{^{231}Th} \+ ^4\alpha \schemestop \] \end{document} with the error: ! Missing $ inserted. <inserted text> $ l.16 \schemestop ?
- Controlling what appears in front in a 3d pgfplotby James on July 12, 2026 at 6:00 pm
I'm trying to make a nice diagram to illustrate partial derivatives for my multivariable class. I have the graph of a function, a plane, the intersection of these in the graph, a tangent line, and some guide lines to show what's occurring, but (presumably because of the order in which they appear in the code) the diagram doesn't respect what object is behind a different object, i.e., the graph is drawn on top of the plane, or the plane is drawn on top of the graph, even though they ``should'' pass through one another. Is there any nice way to make whatever ``should'' be on top be drawn on top without manually finding intersections and having different domains/clip regions for different features? My code so far is below, along with the image that is produced \begin{standalone} \usepackage{tikz} \usepackage{pgfplots} \begin{document} \begin{tikzpicture} \begin{axis}[axis lines = center, xmin = 0, xmax = 3, ymin = 0, ymax = 3, view = {100}{30}, xlabel = {$x$}, ylabel = {$y$}, zlabel = {$z$}, xtick=\empty, ytick=\empty, ztick=\empty, ] % Using f(x,y) = 2 - (x-2)^3 - (y-1.5)^2 %graph \addplot3[ domain =1:3, y domain = 0.5:2.5,surf,colormap/viridis, opacity=0.9] {-(x-2)^3 - (y-1.5)^2 + 2}; %plane \draw[fill = blue!90, color = blue, opacity = 0.3] (2,0,0)--(2,3,0)-- (2,3,3) node[black, above, opacity = 0.9] {$x=a$}--(2,0,3)--cycle ; %intersection of line and plane \addplot3[domain = 0.5:2.5, blue, samples y = 1, thick] ({2},{x},{2 - (2-2)^3 - (x-1.5)^2}); %tangent line \addplot3[black, thick, domain = -1:1.23] ({2},{x+1},{-2*(1-1.5)*x + 2 - (1-1.5)^2}); %point of tangancy \draw[fill = black] (2,1, {2 - (1-1.5)^2}) circle (2pt); %guide lines for point \draw[dashed, thick] (2,0,0)--(2,1,0) node[below] {$(a,b,0)$}--(0,1,0); \draw[dashed, thick,] (2,1,0) -- (2,1,{2 - (1-1.5)^2}); \end{axis} \end{tikzpicture} \end{document}
- How to plot a graph?by charuanl on July 12, 2026 at 11:18 am
I want to plot a graph for this below picture I already tried but the graph wasn't smooth. This is the graph that I tried to plot Here's my code : \documentclass{article} \usepackage{tikz} \begin{document} \begin{center} \begin{tikzpicture}[x=1.2cm, y=0.7cm] \draw[thick, ->, >=stealth] (-2, 0) -- (6, 0) node[right] {X}; \draw[thick, ->, >=stealth] (0, -3.5) -- (0, 6.5) node[above] {Y}; \draw[thick, <->, >=stealth, color=black!80!blue] plot[smooth, tension=0.7] coordinates {(-1.5, 1.5) (0, 5) (2, 0) (4, -2) (4.8, 3)}; \fill (0, 5) circle (2.5pt); \node[above right] at (0, 5) {$(0, 5)$}; \fill (2, 0) circle (2.5pt); \node[above right] at (2, 0) {$(2, 0)$}; \fill (4, -2) circle (2.5pt); \node[below, yshift=-2pt] at (4, -2) {$(4, -2)$}; \node[above left] at (5.2, 3) {$y = f(x)$}; \end{tikzpicture} \end{center} \end{document}
- How to make a relatively more beautiful classification table of quadratic functions?by D G on July 9, 2026 at 12:16 am
Objectives: remove top left cell all contents are vertically and horizontally centered well balanced padding in each cell make it relatively much more beautiful \documentclass[12pt,border=12pt]{standalone} \usepackage{amsmath,array,tikz} \usetikzlibrary{math} \newcommand{\graph}[2][]{ \begin{tikzpicture}[baseline=(current bounding box.center)] \draw[blue,thick,->] (-1.5,#2)--(1.5,#2) node[right]{$x$}; \draw[red,thick,domain=-1.5:1.5,samples=100] plot(\x,{#1\x*\x/2}); \end{tikzpicture} } \renewcommand{\arraystretch}{1.8} \setlength{\tabcolsep}{18pt} \begin{document} \begin{tabular}{| >{\centering\arraybackslash}m{2.2cm}| >{\centering\arraybackslash}m{5.2cm}| >{\centering\arraybackslash}m{5.2cm}|} \cline{2-3} & $\mathbf{a>0}$ & $\mathbf{a<0}$ \\ \hline $\mathbf{D<0}$ & \graph{-1/2} & \graph[-]{1/2} \\ \hline $\mathbf{D=0}$ & \graph{0} & \graph[-]{0} \\ \hline $\mathbf{D>0}$ & \graph{1/2} & \graph[-]{-1/2} \\ \hline \end{tabular} \end{document} Any improvements are always welcome!