Hot
- QED symbol at end of align blocks final equation numberby Niles on February 21, 2026 at 9:56 am
I'm trying to use \qedhere with the ams classes to set a proof endmark at the end of an align environment. But doing so removes the number from that equation! This problem doesn't happen with a single numbered equation. Here are some examples. In the last one, I have a sort of hack from this question that adds a paragraph break and then a negative \vspace. But, the spacing isn't quite right and I wouldn't want to manually adjust it for each different environment. I've also seen a similar suggestion for a multi-line display. Is there not a better way? \documentclass{amsart} \begin{document} \begin{proof} Numbered equation, qedhere at right. \begin{equation} x+y\qedhere \end{equation} \end{proof} \begin{proof} Align environment; qed on newline \begin{align} x & = 2\\ y & = 3 \end{align} \end{proof} \begin{proof} Align environment; using qedhere blocks the final equation number \begin{align} x & = 2\\ y & = 3\qedhere % <---- want a number here too \end{align} \end{proof} \begin{proof} Align environment; paragraph break and negative vspace \begin{align} x & = 2\\ y & = 3 \end{align} \par\nopagebreak\vspace{-\baselineskip}\mbox{} \end{proof} \end{document} Note: Several related questions, like this one for the cases environment, have comments suggesting that it's just bad style to end a proof with a displayed equation. Leaving that aside, I'm really interested in different endmarks for different environments. The proof environment is just the simplest way to display the issue with \qedhere and align. Note 2: I also see suggestions that ntheorem handles endmarks better. I've used ntheorem for many years, but it hasn't been updated since 2011. I'm looking for a better solution using the new begin/end environment hooks. I had hoped \qedhere in the appropriate hook could do the job.
- Strange intersection glitch of knots package?by Explorer on February 21, 2026 at 9:20 am
This question based on the previous question: % Source - https://tex.stackexchange.com/a/759998 % Posted by Andrew Stacey % Retrieved 2026-02-21, License - CC BY-SA 4.0 \documentclass[tikz, border=1cm]{standalone} \usetikzlibrary{decorations.pathreplacing,knots} %\url{https://tex.stackexchange.com/q/759978/86} \begin{document} \begin{tikzpicture}[ basic strand/.style={ black, double=gray!10, double distance=1pt, line cap=round, thick, }, crossing strand/.style={ line width=2pt, only when rendering/.style={% draw=gray!10,% line width=1pt, double=none, } }, rounded corners=1pt, ] \begin{knot}[ consider self intersections=true, ignore endpoint intersections=false, background colour=black, every intersection/.style={ crossing strand }, only when rendering/.style={ basic strand }, clip width=1, flip crossing=1, ] \strand (7.5,7.5)--(6.5,5.5)--(7.5,3.5)--(6.5,1.5)--(4.5,0.5)--(2.5,1.5)--(0.5,0.5)--(1.5,2.5)--(0.5,4.5)--(1.5,6.5)--(3.5,7.5)--(5.5,6.5)--(7.5,5.5)--(6.5,3.5)--(7.5,1.5)--(5.5,0.5)--(3.5,1.5)--(1.5,0.5)--(0.5,2.5)--(1.5,4.5)--(0.5,6.5)--(2.5,7.5)--(4.5,6.5)--(6.5,7.5)--(5.5,5.5)--(7.5,4.5)--(6.5,2.5)--(7.5,0.5)--(5.5,1.5) --(3.5,0.5)--(1.5,1.5)--(0.5,3.5)--(1.5,5.5) --(0.5,7.5)--(2.5,6.5)--(4.5,7.5)--(6.5,6.5) --(4.5,5.5)--(5.5,3.5) % --(7.5,2.5) ; \end{knot} \end{tikzpicture} \end{document} With --(7.5,2.5) commented, it behaves good: However, if I uncommented that line, thing changed: Is that a bug or feature? Any possibility to improve this?
- Using tikz's backgrounds library to draw something behind textby Werner on February 21, 2026 at 7:20 am
Consider the following minimal example where I want to draw a rectangle behind a sequence of numbers (to highlight them): \documentclass{article} \usepackage{tikz} \usetikzlibrary{backgrounds,calc} \NewDocumentCommand{\tikzmark}{ m }{\tikz[overlay, remember picture] \node (#1) {};} \newcounter{seq} \NewDocumentCommand{\seqstart}{}{% \stepcounter{seq}% Start a new sequence \tikzmark{seq-start-\theseq}}% Set start marker \NewDocumentCommand{\seqend}{}{% \tikzmark{seq-end-\theseq}% Set end marker \tikz[remember picture, overlay] \scoped [on background layer] \fill [fill=blue!10!white] ($(seq-start-\theseq.south west) + (-0.5pt,1pt)$) rectangle ($(seq-end-\theseq.south east) + (0.5pt,1.1\normalbaselineskip)$);% } \begin{document} \[ 12, 15, 8, 11, 4, 7, 0, 3, 16, 19, 12, 15, 8, 11, 4, 7, 0, 3, \ldots \] \[ \seqstart{}12, 15, 8, 11, 4, 7, 0, 3, 16, 19\seqend{}, 12, 15, 8, 11, 4, 7, 0, 3, \ldots \] \end{document} The idea is that \seqstart would set a (counter-driven) \tikzmark representing the start of the sequence to be marked. Then \seqend would set a \tikzmark at the end and highlight it using the background layer. The counter allows for multiple such sequence marking within a larger document. However, the output shows that the rectangle highlighting a part of the sequence is not being drawn on background layer as requested. Why is that? How can I ensure the rectangle is drawn on the background layer behind document/text elements? The backgrounds library documentation (in the tikz documentation, section 45) mentions that on background layer can only be used inside a {scope} or \scoped, which is done above.
- When I use \hl inside of a longtable, the file says it's building forever but never buildsby Tyler on February 21, 2026 at 12:02 am
First off, here is my setup because I am certain that must be part of the problem. I'm using: texlive 2025 VS Code with these extensions: LaTeX by Mathematic Inc LaTeX Workshop by James Yu I have a LaTeX document that used to build just fine. I recently tried switching over to using the tcolorbox package instead of the soul package for highlighting in that document. As part of that process, I was getting some errors, and from reading various posts online for similiar issues I suspected I had an outdated texlive distribution so ended up trying to update everything with this on my command line: tlmgr update --all This appeared to fix the errors with tcolorbox, but I then realized that tcolorbox does not break across lines nicely so switched back to using soul. But now my document will not build. It is stuck in an infinite loop or something, the status at the bottom of VS code has the spinning circular arrows next to "Build" and it just spins forever. I have narrowed the problem down to when I use \hl inside of a longtable. Minimum working code is below. If I uncomment the commented line, I get the building-forever behavior. \documentclass{article} \usepackage{longtable} \usepackage{soul} \usepackage{xcolor} \begin{document} \sethlcolor{yellow}\hl{Test text} \begin{longtable}{ll} Column 1 & Column 2\\ % \hl{Test text} & Entry 2 \\ \end{longtable} \end{document} I have completely removed and re-installed my texlive installation and am still getting the same result. When I click "Kill LaTeX compiler process" twice to stop the infinite build, I get a popup saying "Recipe terminated with error". I click on "Open Compiler log" and get this: Initial Win CP for (console input, console output, system): (CP437, CP437, CP1252) I changed them all to CP1252 Rc files read: NONE Latexmk: This is Latexmk, John Collins, 15 June 2025. Version 4.87. No existing .aux file, so I'll make a simple one, and require run of *latex. Latexmk: applying rule 'pdflatex'... Rule 'pdflatex': Reasons for rerun Category 'other': Rerun of 'pdflatex' forced or previously required: Reason or flag: 'Initial setup' ------------ Run number 1 of rule 'pdflatex' ------------ ------------ Running 'pdflatex -synctex=1 -interaction=nonstopmode -file-line-error -recorder "c:/Users/REDACTED/test/test.tex"' ------------ This is pdfTeX, Version 3.141592653-2.6-1.40.28 (TeX Live 2025) (preloaded format=pdflatex) restricted \write18 enabled. entering extended mode (c:/Users/REDACTED/test/test.tex LaTeX2e <2025-11-01> L3 programming layer <2026-01-19> (c:/texlive/2025/texmf-dist/tex/latex/base/article.cls Document Class: article 2025/01/22 v1.4n Standard LaTeX document class (c:/texlive/2025/texmf-dist/tex/latex/base/size10.clo)) (c:/texlive/2025/texmf-dist/tex/latex/tools/longtable.sty) (c:/texlive/2025/texmf-dist/tex/generic/soul/soul.sty (c:/texlive/2025/texmf-dist/tex/generic/soul/soul-ori.sty) (c:/texlive/2025/texmf-dist/tex/generic/infwarerr/infwarerr.sty) (c:/texlive/2025/texmf-dist/tex/generic/etexcmds/etexcmds.sty (c:/texlive/2025/texmf-dist/tex/generic/iftex/iftex.sty))) (c:/texlive/2025/texmf-dist/tex/latex/xcolor/xcolor.sty (c:/texlive/2025/texmf-dist/tex/latex/graphics-cfg/color.cfg) (c:/texlive/2025/texmf-dist/tex/latex/graphics-def/pdftex.def) (c:/texlive/2025/texmf-dist/tex/latex/graphics/mathcolor.ltx)) (c:/texlive/2025/texmf-dist/tex/latex/l3backend/l3backend-pdftex.def) (./test.aux) (c:/texlive/2025/texmf-dist/tex/context/base/mkii/supp-pdf.mkii [Loading MPS to PDF converter (version 2006.09.02).] ) Here is my test.log file: This is pdfTeX, Version 3.141592653-2.6-1.40.28 (TeX Live 2025) (preloaded format=pdflatex 2026.2.20) 20 FEB 2026 17:50 entering extended mode restricted \write18 enabled. file:line:error style messages enabled. %&-line parsing enabled. **c:/Users/REDACTED/test/test.tex (c:/Users/REDACTED/test/test.tex LaTeX2e <2025-11-01> L3 programming layer <2026-01-19> (c:/texlive/2025/texmf-dist/tex/latex/base/article.cls Document Class: article 2025/01/22 v1.4n Standard LaTeX document class (c:/texlive/2025/texmf-dist/tex/latex/base/size10.clo File: size10.clo 2025/01/22 v1.4n Standard LaTeX file (size option) ) \c@part=\count275 \c@section=\count276 \c@subsection=\count277 \c@subsubsection=\count278 \c@paragraph=\count279 \c@subparagraph=\count280 \c@figure=\count281 \c@table=\count282 \abovecaptionskip=\skip49 \belowcaptionskip=\skip50 \bibindent=\dimen148 ) (c:/texlive/2025/texmf-dist/tex/latex/tools/longtable.sty Package: longtable 2025-10-13 v4.24 Multi-page Table package (DPC) \LTleft=\skip51 \LTright=\skip52 \LTpre=\skip53 \LTpost=\skip54 \LTchunksize=\count283 \LTcapwidth=\dimen149 \LT@head=\box53 \LT@firsthead=\box54 \LT@foot=\box55 \LT@lastfoot=\box56 \LT@gbox=\box57 \LT@cols=\count284 \LT@rows=\count285 \c@LT@tables=\count286 \c@LT@chunks=\count287 \LT@p@ftn=\toks17 ) (c:/texlive/2025/texmf-dist/tex/generic/soul/soul.sty Package: soul 2023-06-14 v3.1 Permit use of UTF-8 characters in soul (HO) (c:/texlive/2025/texmf-dist/tex/generic/soul/soul-ori.sty Package: soul-ori 2023-06-14 v3.1 letterspacing/underlining (mf) \SOUL@word=\toks18 \SOUL@lasttoken=\toks19 \SOUL@syllable=\toks20 \SOUL@cmds=\toks21 \SOUL@buffer=\toks22 \SOUL@token=\toks23 \SOUL@syllgoal=\dimen150 \SOUL@syllwidth=\dimen151 \SOUL@charkern=\dimen152 \SOUL@hyphkern=\dimen153 \SOUL@dimen=\dimen154 \SOUL@dimeni=\dimen155 \SOUL@minus=\count288 \SOUL@comma=\count289 \SOUL@apo=\count290 \SOUL@grave=\count291 \SOUL@spaceskip=\skip55 \SOUL@ttwidth=\dimen156 \SOUL@uldp=\dimen157 \SOUL@ulht=\dimen158 ) (c:/texlive/2025/texmf-dist/tex/generic/infwarerr/infwarerr.sty Package: infwarerr 2019/12/03 v1.5 Providing info/warning/error messages (HO) ) (c:/texlive/2025/texmf-dist/tex/generic/etexcmds/etexcmds.sty Package: etexcmds 2019/12/15 v1.7 Avoid name clashes with e-TeX commands (HO) (c:/texlive/2025/texmf-dist/tex/generic/iftex/iftex.sty Package: iftex 2024/12/12 v1.0g TeX engine tests ))) (c:/texlive/2025/texmf-dist/tex/latex/xcolor/xcolor.sty Package: xcolor 2024/09/29 v3.02 LaTeX color extensions (UK) (c:/texlive/2025/texmf-dist/tex/latex/graphics-cfg/color.cfg File: color.cfg 2016/01/02 v1.6 sample color configuration ) Package xcolor Info: Driver file: pdftex.def on input line 274. (c:/texlive/2025/texmf-dist/tex/latex/graphics-def/pdftex.def File: pdftex.def 2025/09/29 v1.2d Graphics/color driver for pdftex ) (c:/texlive/2025/texmf-dist/tex/latex/graphics/mathcolor.ltx) Package xcolor Info: Model `cmy' substituted by `cmy0' on input line 1349. Package xcolor Info: Model `hsb' substituted by `rgb' on input line 1353. Package xcolor Info: Model `RGB' extended on input line 1365. Package xcolor Info: Model `HTML' substituted by `rgb' on input line 1367. Package xcolor Info: Model `Hsb' substituted by `hsb' on input line 1368. Package xcolor Info: Model `tHsb' substituted by `hsb' on input line 1369. Package xcolor Info: Model `HSB' substituted by `hsb' on input line 1370. Package xcolor Info: Model `Gray' substituted by `gray' on input line 1371. Package xcolor Info: Model `wave' substituted by `hsb' on input line 1372. ) (c:/texlive/2025/texmf-dist/tex/latex/l3backend/l3backend-pdftex.def File: l3backend-pdftex.def 2025-10-09 L3 backend support: PDF output (pdfTeX) \l__color_backend_stack_int=\count292 ) (./test.aux) \openout1 = `test.aux'. LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 6. LaTeX Font Info: ... okay on input line 6. LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 6. LaTeX Font Info: ... okay on input line 6. LaTeX Font Info: Checki Yes, it just cuts off in the middle of a line there. I can't decipher anything from these outputs, and I'm not sure what else to check. Please let me know whatever file you need to see to help figure this out. Thanks!
- How to make tcbox doing linebreak automatically in LuaLaTeX?by YCH817 on February 20, 2026 at 11:52 pm
I am using LuaLaTeX. I use tcbox with \mintinline to display inline code, but \tcbox does not support automatic linebreaking. I have found this post https://tex.stackexchange.com/a/697157/242598 and try to imitate it, but my code didn't work. Also I noticed that the solution provided in the link I've mentioned above does not support Chinese characters. I am using ctex package. Here is my MWE. \documentclass[10pt,a5paper]{article} \usepackage[showframe]{geometry} \usepackage[ 10pt, % fontset=fandol, ]{ctex} % Chinese support \usepackage{calc} % For Calculation \usepackage[ dvipsnames, svgnames, table ]{xcolor} % colors \usepackage{minted} % code highlighting \usepackage[ all ]{tcolorbox} % for boxes % \usepackage{soulpos} % soul % \usepackage{soulutf8} % not sure it is useful \usepackage{lua-ul} % for underlining text in LuaLaTeX \usepackage{relsize} % relative font size \setmonofont[ % set monofont Contextuals={Alternate} ]{Fira Code} \usemintedstyle{material} % set minted style \setminted{ breaklines=true, breakanywhere=true, % escapeinside=脎吡,% encoding=utf8, tabsize=2, } \tcbset{ mycode/base/.style={ fontupper=\relscale{.7}, breakable, enhanced, skin first=enhanced, skin middle=enhanced, skin last=enhanced, colframe=Gray, colback=Black!80!DarkBlue, colbacklower=LightGray!50, boxrule=.4pt, arc=5pt, top=2.5mm, bottom=2mm, center lower, }, mycode/inline/.style={ mycode/base, colupper=white!25!LightSteelBlue, nobeforeafter, boxsep=1.5pt, left=2pt, right=2pt, top=0pt, bottom=0pt, on line, % position settings } } \renewcommand\FancyVerbFormatText[1]{% \textcolor{white!25!LightSteelBlue}{#1} }% \fvset{breaksymbolleft=\textcolor{white!25!LightSteelBlue}{\tiny\ensuremath{\hookrightarrow}}} \makeatletter \newcommand{\tclstbox}[2][latex]{ \tcbox[mycode/base]{\vphantom{\tt (Fg)}\mintinline{#1}{#2}}% } \newcommand{\tcblst}[2][latex]{% \def\tcblst@cache{#1} \tcblst@ul } \ulposdef\tcblst@ul[xoffset-start=2pt]{% \tclstbox[\tcblst@cache]{\rule{\ulwidth}{0pt}}% } \makeatother \begin{document} 你好!我是 YCH817!下面是一段长测试文字:% \tcblst[haskell]{lst = [x| x <- ['a'..'g']] -- 代码来自 YCH817 }\ \tcblst{tcolorbox} \end{document}
- How to include list of abbreviations of journal titlesby rensemil on February 20, 2026 at 10:47 pm
I am using Zotero with better BibLaTeX to make my bibliography. I have the names of journals abbreviated. Is there any way to make LaTeX print a list of these abbreviations? So just before the bibliography, I would like a list that basically says something like: ALL = Archiv für Lateinische Lexikographie DLZ = Deutsche Literaturzeitung and so on. Thanks in advance!
- Patch for lineno so \lineref creates linksby Markus Schmassmann on February 20, 2026 at 10:19 pm
I'm trying to write a patch for lineno, so that it's \lineref command creates links, when hyperref is loaded. The code below works except for the commented-out \lineref* version, which is not supposed to create a link. If I remove the comments from the \lineref* definition, \lineref* works, but it breaks the linking function of \pageref and the \lineref[]{} with an optional argument. \documentclass{article} \usepackage{lipsum,lineno,hyperref,suffix}\linenumbers \makeatletter % presence of modern LaTeX hook system since Oct 2020 \@ifundefined{DeclareHookRule}{ \PackageWarningNoLine{lineno}{% pre 2020-10 LaTeX, no hook system: no hyperref lineref links} }{\DeclareHookRule{begindocument/end}{lineno/hyperref}{after}{hyperref} \DeclareHookRule{begindocument/end}{lineno/hyperref}{after}{lineno} \AddToHook{begindocument/end}[lineno/hyperref]{% after hyperref/lineno \@ifpackageloaded{hyperref}{% \let\LN@orig@lineref\lineref \let\LN@orig@pageref\pageref %%% \@LN@linelabel == lineno internal called by \linelabel \let\LN@orig@linelabel\@LN@linelabel \gdef\@LN@linelabel#1{\hypertarget{#1}{\LN@orig@linelabel{#1}}} \renewcommand*{\lineref}[2][0]{% \hyperlink{#2}{\NoHyper\LN@orig@lineref[#1]{#2}\endNoHyper}% }% \renewcommand*{\pageref}[1]{% \hyperlink{#1}{\LN@orig@pageref*{#1}}% }% % \WithSuffix{\newcommand*}\lineref*[2][0]{% % \NoHyper\LN@orig@lineref[#1]{#2}\endNoHyper% % }% \WithSuffix{\newcommand*}\pageref*[1]{% \LN@orig@pageref*{#1}% }% }{}% no changes without hyperref } } \makeatother \begin{document}\noindent% Line: \lineref{line:test}\quad\lineref*{line:test}\\ page: \pageref{line:test}\quad\pageref*{line:test}\\ Line 0 offset: \lineref[0]{line:test}\\ Line 1 offset: \lineref[1]{line:test}\\ page\_old: \pageref{sec:foobar}\quad\pageref*{sec:foobar} \lipsum[1]\linelabel{line:test} \section{foobar}\label{sec:foobar} \end{document} As a bonus, does anyone have an idea how to write this patch in such a way that it works on older LaTeX distributions without DeclareHookRule?
- Color terminal output: Partial success, but not full successby rallg on February 20, 2026 at 7:56 pm
I have searched for various ways to colorize text that appears in Terminal. In general, they fail miserably with lualatex (and may also fail with others, but I did not check). When I first posted this question, I showed a MWE that partially worked. Thanks to Marcel's comment, I realized that I had mingled Lua and TeX syntax, so that MWE could fail. This is a revised MWE that works well. Since others have asked this question, I provide the good MWE now: \documentclass{article} %% compile with lualatex %% Usage: \directlua{terminal_color("N", "Message")} %% Where N is the terminal color code, such as 32 for green. \directlua{ function terminal_color(color_code, text) texio.setescape(0) texio.write_nl("\string\x1B[" .. color_code .. "m" .. text .. "\string\x1B[0m") texio.setescape(1) end }%% \begin{document} \directlua{texio.write_nl("This terminal text is normal color.")} \directlua{terminal_color("32", "This terminal text is green.")} \directlua{texio.write_nl("Normal terminal color.\string\nReally.")} %% Works. \end{document}
- How to colour only the first box in a \multicolumn table row with fixed heightby Jon on February 20, 2026 at 7:33 pm
I have included the full document because the behaviour only occurs in this context. In the final \multicolumn row of the table, I am constructing a row that visually consists of several fixed-width boxes separated by vertical rules. I want only the first box in that row to have a background colour, with: a consistent row height, the colour filling the box exactly (no padding), the colour reaching the vertical rule, and no colour bleed into adjacent boxes. At the moment, attempts to enforce row height using struts or rules either do not affect the height or cause alignment/bleed issues when combined with colour. What is the correct and robust way to colour only the first fixed-width box in this kind of composite table row while maintaining consistent height and clean rule alignment? (I am open to restructuring the table if there is a better construction.) % !TeX program = xelatex % !TeX spellcheck = en_GB \documentclass[12pt,addpoints]{exam} % ----------------------------- % Maths % ----------------------------- \usepackage{amsmath, amssymb} \usepackage{bm} % ----------------------------- % Graphics & layout % ----------------------------- \usepackage{graphicx} \usepackage{float} \usepackage{pdfpages} \usepackage{geometry} \usepackage{parskip} \usepackage{multicol} % ----------------------------- % TikZ / plots (kept, but minimal) % ----------------------------- \usepackage{tikz} \usetikzlibrary{math, calc} \usepackage{pgfplots} \usepackage{tkz-base} \usepackage{tkz-euclide} \usepackage{tikz-3dplot} \usepackage{tikzlings} \usepackage{tikzpeople} \usepackage{geometry} % ----------------------------- % Fonts (LuaLaTeX) % ----------------------------- \usepackage{fontspec} \setmainfont{Aptos} \usepackage{unicode-math} \setmathfont{Cambria Math} % ----------------------------- % Tables & colour % ----------------------------- \usepackage{xcolor} \usepackage{array} \usepackage{colortbl} % ----------------------------- % Exam class configuration % ----------------------------- \marksnotpoints \qformat{\textbf{Task \thequestion\hfill (\thepoints)}} % ----------------------------- % Page geometry & header % ----------------------------- \newgeometry{ left=2.25cm, right=2cm, top=1.4cm, bottom=0cm } % ----------------------------- % Utility commands % ----------------------------- \newcommand{\uline}[1]{\rule[0pt]{#1}{0.4pt}} \newcommand\dunderline[3][-1pt]{% \sbox0{#3}% \ooalign{\copy0\cr\rule[\dimexpr#1-#2\relax]{\wd0}{#2}}% } \renewcommand{\arraystretch}{2} \newcolumntype{P}[1]{>{\centering\arraybackslash}p{#1}} % ----------------------------- % Footer % ----------------------------- \footer{}{\textbf{End of Questions}}{\scriptsize Page \thepage\ / \numpages} \firstpagefooter{}{}{} \extraheadheight[20pt]{20pt}% addded <<<<<<<<<<<<<<<<<< \definecolor{wordgrey}{RGB}{166,166,166} \usepackage[table]{xcolor} \hyphenpenalty=10000 \exhyphenpenalty=10000 \begin{document} \renewcommand{\arraystretch}{1.8} \setlength{\arrayrulewidth}{1pt} \vspace*{-0.25cm} \noindent \setlength{\arrayrulewidth}{0.5pt} \noindent\hspace*{-0.19cm} \begin{tabular}{|p{3.7cm}|p{12.8cm}|} \hline \fontsize{12pt}{14pt}\selectfont\textbf{Something} & Something \\ \hline \fontsize{12pt}{14pt}\selectfont\textbf{Something} & Something \\ \hline \fontsize{12pt}{14pt}\selectfont\textbf{Time Allowed} & \\ \hline \fontsize{12pt}{14pt}\selectfont\textbf{Something} & \\ \hline \fontsize{12pt}{14pt}\selectfont\textbf{Something } & {\fontsize{11}{13}\selectfont \setlength{\labelsep}{1.7em} \setlength{\leftmargini}{3.6em} \begin{itemize} \item One \item \item \item \item \item \item \end{itemize} } \\ \hline \textbf{Something} & \cellcolor{wordgrey} \fontsize{11pt}{13pt}\selectfont \textbullet\ \hspace{0.4cm} Section \\ \cline{2-2} & \fontsize{11pt}{13pt}\selectfont \textbullet\ \hspace{0.4cm} Section \\ \cline{2-2} \hline \textbf{\mbox{ Something}} & \fontsize{11pt}{13pt}\selectfont \textbullet\ \hspace{0.4cm} \\ \hline \multicolumn{2}{|l|}{\hspace*{3.95cm}\fontsize{12pt}{14pt}\selectfont [ something]} \\ \hline \multicolumn{2}{|l|}{% \fontsize{11pt}{13pt}\selectfont \colorbox{wordgrey}{\makebox[3.0cm][l]{\textbf{1. No AI}}}% \vrule width 0.5pt\hspace{0.4em}% \colorbox{white}{\makebox[3.2cm][l]{\textbf{2. AI Planning}}}% \vrule width 0.5pt\hspace{0.4em}% \colorbox{white}{\makebox[4.3cm][l]{\textbf{3. AI Collaboration}}}% \vrule width 0.5pt\hspace{0.4em}% \colorbox{white}{\makebox[2.7cm][l]{\textbf{4. Full AI}}}% \vrule width 0.5pt\hspace{0.4em}% \colorbox{red}{\makebox[3.0cm][l]{\textbf{5. AI Exploration}}}% } \\ \hline \multicolumn{2}{|l|}{% \fontsize{11pt}{13pt}\selectfont {\cellcolor{wordgrey}\makebox[3.0cm][l]{\textbf{1. No AI}}}% \vrule width 0.5pt\hspace{0.4em}% {\cellcolor{white}\makebox[3.2cm][l]{\textbf{2. AI Planning}}}% \vrule width 0.5pt\hspace{0.4em}% {\cellcolor{white}\makebox[4.3cm][l]{\textbf{3. AI Collaboration}}}% \vrule width 0.5pt\hspace{0.4em}% {\cellcolor{white}\makebox[2.7cm][l]{\textbf{4. Full AI}}}% \vrule width 0.5pt\hspace{0.4em}% {\cellcolor{red}\makebox[3.0cm][l]{\textbf{5. AI Exploration}}}% } \\ \hline \multicolumn{2}{|l|}{% % Match your font settings for the whole inner row \fontsize{11pt}{13pt}\selectfont % Inner table that actually draws the five boxes with rules \setlength{\arrayrulewidth}{0.5pt}% make rules 0.5pt as in your \vrule \arrayrulecolor{black}% \begin{tabular}{@{} >{\raggedright\arraybackslash}p{2.8cm} | >{\raggedright\arraybackslash}p{3.2cm} | >{\raggedright\arraybackslash}p{4.1cm} | >{\raggedright\arraybackslash}p{2.7cm} | >{\raggedright\arraybackslash}p{3.0cm} @{}} \cellcolor{wordgrey}\textbf{1. No AI} & \textbf{2. AI Planning} & \textbf{3. AI Collaboration} & \textbf{4. Full AI} & \textbf{5. AI Exploration} \end{tabular}% } \\ \multicolumn{2}{|l|}{% \fontsize{11pt}{13pt}\selectfont \cellcolor{wordgrey}\makebox[3.0cm][l]{\textbf{1. No AI}}% \vrule width 0.5pt\hspace{0.4em}% \cellcolor{red} \makebox[3.2cm][l]{\textbf{2. AI Planning}}% \vrule width 0.5pt\hspace{0.4em}% \makebox[4.3cm][l]{\textbf{3. AI Collaboration}}% \vrule width 0.5pt\hspace{0.4em}% \makebox[2.7cm][l]{\textbf{4. Full AI}}% \vrule width 0.5pt\hspace{0.4em}% \makebox[3.0cm][l]{\textbf{5. AI Exploration}}% } \\ \hline \multicolumn{2}{|l|}{% \fontsize{11pt}{13pt}\selectfont % First box: grey background only for this box \begingroup\setlength{\fboxsep}{0pt}% \colorbox{wordgrey}{% \makebox[3.0cm][l]{\textbf{1. No AI}}% }% \endgroup \vrule width 0.5pt\hspace{0.4em}% % Remove the red — it was causing the bleed \makebox[3.2cm][l]{\textbf{2. AI Planning}}% \vrule width 0.5pt\hspace{0.4em}% \makebox[4.3cm][l]{\textbf{3. AI Collaboration}}% \vrule width 0.5pt\hspace{0.4em}% \makebox[2.7cm][l]{\textbf{4. Full AI}}% \vrule width 0.5pt\hspace{0.4em}% \makebox[3.0cm][l]{\textbf{5. AI Exploration}}% } \\ \hline \multicolumn{2}{|l|}{% \fontsize{11pt}{13pt}\selectfont % ---- First box: solid grey, exactly 3.0cm, with enforced height ---- \begingroup \setlength{\fboxsep}{0pt}% no padding so it fills exactly 3.0cm \colorbox{wordgrey}{% % The inner makebox *sets the width*. The \rule sets the row height. \makebox[3.0cm][l]{\rule{0pt}{3.2ex}\textbf{1. No AI}\rule[-1.2ex]{0pt}{0pt}}% }% \endgroup % Immediately draw the vertical rule so the grey reaches it \vrule width 0.8pt\hspace{0.5em}% % ---- Remaining boxes: unchanged, uncolored ---- \makebox[3.2cm][l]{\textbf{2. AI Planning}}% \vrule width 0.5pt\hspace{0.4em}% \makebox[4.3cm][l]{\textbf{3. AI Collaboration}}% \vrule width 0.5pt\hspace{0.4em}% \makebox[2.7cm][l]{\textbf{4. Full AI}}% \vrule width 0.5pt\hspace{0.4em}% \makebox[3.0cm][l]{\textbf{5. AI Exploration}}% } \\ \hline \end{tabular} \newpage \begin{questions} \question \end{questions} \end{document}
- Make all subtables 'textheight' and 'textwidth' (table spanning multiple pages)by cis on February 20, 2026 at 6:54 pm
A table spans multiple pages and should have the same textwidth and textheight in all subtables. Text-width is achieved using xltabular = tabularx + longtable (and yes, I need pgfplotstable at the end). What do I need to do to make all subtables textheight? Note: The number of rows in the original table is calculated automatically, depending on the values chosen for the columns p1, p2,... I have no control over this. Hint: I set paperheight=58mm to better illustrate the problem. \documentclass[paper=a5]{scrreprt} \usepackage[margin=14mm, showframe=true, paperheight=58mm, ]{geometry} \usepackage{pgfplotstable} \pgfplotsset{compat=1.18} \usepackage{xltabular} \newcolumntype{Y}{>{\centering\arraybackslash}X@{\hspace{5pt}}} \begin{document} % Create some table-data ===================== \def\OutFilename{\jobname-data.csv} \newwrite\MyFile \immediate\openout\MyFile=\OutFilename % \foreach[count=\No from 0] \n in {1,...,4}{%% \foreach \k in {0,...,\n}{ \immediate\write\MyFile{\n, \k, 0.1111, 0.2222, 0.3333, 0.4444, 0.5555, 0.6666, 0.7777, \k, \No} }%% } \immediate\closeout\MyFile % =================================== \noindent% \pgfplotstabletypeset[ precision=4, skip 0.,% number format header=true, font=\footnotesize, column type=, begin table=\begin{xltabular}{\textwidth}{c c | *{7}{Y} | c l}, end table=\end{xltabular}, col sep=comma, every head row/.style={%% output empty row, before row={% %% Very first Header ======================== \hline n & k & p1 & p2 & p3 & p4 & p5 & p6 & p7 & k & N \\ \hline \endfirsthead %% Header for subsequent pages ================ \hline n & k & P1 & P2 & P3 & P4 & P5 & P6 & P7 & k & N \\ \hline \endhead %% Footer for all pages except last ================ \hline n & k & q1 & q2 & q3 & q4 & q5 & q6 & q7 & k & N \\ \hline \endfoot %% Footer for the very last page ================ \hline n & k & Q1 & Q2 & Q3 & Q4 & Q5 & Q6 & Q7 & k & N \\ \hline \endlastfoot },% end of 'before row' %% },%% end of 'every head row/.style' %% ]{\OutFilename} \end{document}
- How to draw self-overlapped path with double line style?by Explorer on February 20, 2026 at 4:52 pm
The question is similar to this solution, but not the same: \documentclass[tikz, border=1cm]{standalone} \usetikzlibrary{decorations.pathreplacing} % https://tex.stackexchange.com/a/572738/322482 \begin{document} \begin{tikzpicture}[ rounded corners=1pt, path decomposition/.style={% postaction={decoration={show path construction, lineto code={ \draw[#1] (\tikzinputsegmentfirst) -- (\tikzinputsegmentlast); }, curveto code={ \draw[#1] (\tikzinputsegmentfirst) .. controls (\tikzinputsegmentsupporta) and (\tikzinputsegmentsupportb) ..(\tikzinputsegmentlast) ; }, closepath code={ \draw[#1] (\tikzinputsegmentfirst) -- (\tikzinputsegmentlast) {closepath};} } ,decorate}}] \draw[line cap=round, black, double=gray!10, thick, path decomposition={black, double=gray!10,thick}] (3,3) -- (1,1) -- (3,1) -- (1,3); % here below is what I want with only one path \begin{scope}[xshift=3cm] \draw[black, double=gray!10, thick, line cap=round] (3,3) -- (1,1) -- (1.5,1); \draw[black, double=gray!10, thick, line cap=round] (2.5,1) -- (3,1) -- (1,3); \draw[black, double=gray!10, thick] (1.3,1) -- (2.7,1); \end{scope} \end{tikzpicture} \end{document}
- Memoize not working for certain equation environmentsby jayo8589 on February 20, 2026 at 4:32 pm
Good day, thank you very much for taking the time to read this. I am working on a mathematics book for high school students, which is quite extensive (between 500 and 1000 pages). The project contains numerous equations and graphics using TikZ, annotate-equations, etc. My goal is to speed up the compilation time. My workflow is based on Windows, MiKTeX with Perl, VS Code with LaTeX Workshop, and LuaLaTeX with latexmk. To accelerate the compilation, I am using the memoize package, which externalizes not only graphics but also equation environments like align, etc. However, I am facing the following issues: Memoize does NOT externalize starred equation environments such as \begin{equation*}, \begin{align*}, etc. Only the unstarred versions (\begin{equation}, \begin{align}) appear as externalized. The displaymath environment [ ... ] is not being taken into account for externalization. In the actual project, I get a huge number of .memo files without their corresponding PDFs, which suggests that the externalization process is not being completed. What could be the problem? How should memoize be correctly configured? How can I ensure that all starred equation environments, including the displaymath [ ... ] shorthand, are properly externalized? \documentclass{book} \usepackage{docmute} \usepackage{memoize} \mmzset{ memo dir=Chapters/main, auto={tikzpicture}{memoize}, auto={tcolorbox}{nomemoize}, auto={mynote}{nomemoize}, % Entornos estándar y amsmath auto={displaymath}{memoize, capture=vbox}, auto={equation}{memoize, capture=vbox}, auto={eqnarray}{memoize, capture=vbox}, auto={align}{memoize, capture=vbox}, auto={gather}{memoize, capture=vbox}, auto={alignat}{memoize, capture=vbox}, auto={multline}{memoize, capture=vbox}, auto={flalign}{memoize, capture=vbox}, } \usepackage{tikz} \usepackage{tcolorbox} \usepackage{amsmath, amssymb, amsthm} \begin{document} Document Body ... \begin{align} a + b & = c \\ d + e & = f \quad \text{Align environment NOT (*)} \end{align} \begin{align*} 5x + 6y & = -55m \\ -9z + 2w & = -99n \quad \text{Align environment with (*)} \end{align*} \begin{equation} -5x^2+4y^2=-3 \quad \text{Equation environment with NOT (*)} \end{equation} \begin{equation*} -5x^2+4y^2=-3 \quad \text{Equation environment WITH (*)} \end{equation*} \[ y=mx+b \quad \text{Display Math environment } \] \begin{multline} y=-4x^2+8x+8+4444444444 \quad \text{Multline environment NOT (*)} \end{multline} \begin{multline*} y=-8x^2+8x+8+8888888888 \quad \text{Multline environment WITH (*)} \end{multline*} \end{document} I would greatly appreciate any help you can provide. Thank you in advance.
- Does (Lua)TeX use .notdef or U+FFFD?by rallg on February 20, 2026 at 3:57 pm
Simple (I hope) question. Does not need MWE. I use LuaLaTeX, although I expect that this question is generally applicable. If a font does not have a requested Unicode character, does (Lua)LaTeX insert a .notdef glyph there, or does it insert U+FFFD (if the font has U+FFFD) ? Does this depend on circumstances (such as math/text mode, etc.) ? I am not worried about intentionally contrived situations that would never occur in a real document. Reason I ask: I design and use my own fonts, which have U+FFFD. Since this is a valid Unicode location, I can do font-related tricks with it, such as using OpenType features to show different glyphs, depending on the problem. But I cannot do them with .notdef, because it is not a valid Unicode location. I dimly recall reading (here at SE) that U+FFFD is used, if found, but I cannot find that thread. Search returns XeTeX-specific info, and I do not use that.
- xsim: shortsolutions chapter by chapterby chriho on February 20, 2026 at 3:34 pm
I have a collection of xsim exercises, each of which has a solution and shortsolution implemented. In my exercises-collection document, I want to print the solutions or shortsolutions (depending on a toggle) chapter by chapter (or section by section). To define the shortsolutions, I mainly use the definition from the xsim-manual: % new property: \DeclareExerciseProperty{shortsolution} % new environment: \NewDocumentEnvironment{shortsolution}{+b} {% \edef\ExerciseType{\csname g_xsim_exercise_type_tl\endcsname}% \edef\ExerciseID{\csname g_xsim_exercise_id_tl\endcsname}% \SetExerciseProperty{shortsolution}{#1}% } {} % we'll use a description list for the list of short solutions: \newcommand\printshortsolutions{% \begin{description} \ForEachUsedExerciseByType{% \GetExercisePropertyT{shortsolution} {\item[Short Solution ##3]####1}% }% \end{description} } While \printsolutions[chapter={true}] works as expected, the option \printshortsolutions[chapter={true}] unfortunately does not work. Here, the short solutions of all chapters are printed every time.
- Advantage of \csname over \makeatletter (inside \pgfkeys/\tikzset)?by Sammy on February 20, 2026 at 3:29 pm
In this answer https://tex.stackexchange.com/a/133357 to a question regarding TikZ I found the following comment inside a \tikzset: % Use csname so catcode of @ doesn't have do be changed. This leaves me wondering if using \csname has any advantage over changing the catcode of @ by wrapping \tikzset with \makeatletter - which inside a package wouldn't even be neccesary since inside a package @ is of catcode letter by default. Is the use of \makeatletter potentially problematic (in general or inside pgfkeys)? If so: In which cases is it advisable to use \csname instead of \makeatletter? As far as I can imgine it (practically?) should be just a matter of taste, otherwise using such code inside a package where @ is of catcode letter would be problematic?!
- `tcolorbox` + `lualineno`: line numbering disappears when a title is usedby cjorssen on February 20, 2026 at 3:03 pm
I am using LuaLaTeX together with tcolorbox and the new lualineno package. The intended behaviour is to apply line numbering exclusively to the upper part of a tcolorbox (the box body), while leaving the title unaffected. With the minimal example below, line numbering behaves differently depending on whether the box has a title. \documentclass{article} \usepackage{tcolorbox} \usepackage{pgffor} \usepackage{lualineno} \newcounter{lineno} \lualineno{% define = { name = default toks = {\stepcounter{lineno}} left = {\tiny\thelineno \kern.8em} } } \begin{document} Some text before the box. \begin{tcolorbox}[ % title = Test, before upper = {\lualineno{set = default}}, after upper = {\lualineno{unset}} ] \foreach \n in {1,...,30}{ \noindent This is line \n. \\ } \end{tcolorbox} Some text after the box. \end{document} Observed behavior: Without a title (title commented out): Line numbers appear correctly outside the box. With a title (title = Test uncommented): Line numbers disappear. No compilation error or warning is produced. If the box is made breakable, I observe a related but slightly different effect: with a titled breakable box, line numbers disappear in the first segment of the box (before the page break). Adding a title should not affect line numbering inside the box. I would expect identical numbering behavior with or without a title. Is this interaction between tcolorbox and lualineno expected? Should lualineno be applied differently when titles are used? Any explanation of the underlying mechanism or guidance on proper usage would be greatly appreciated.
- Remove linebreak form clipboard textby rzickler on February 20, 2026 at 2:22 pm
I have code sections in my text that are highlighted with lstlisting. The line breaks are working and I get a (desired!) \hookrightarrow int the output text. So from this input TeX: My code: \begin{lstlisting} This is a long long long long long long long long long long long long long long long long long long line of code \end{lstlisting} I get this in the output PDF: Now I want to be able to copy and paste the code from the PDF to an editor. I was able to follow https://tex.stackexchange.com/a/649475/243557 to remove the (desired!) \hookrightarrow with the help of \usepackage{accsupp} from the clipboard on text copy. But the line break is still in the text. So if I copy+paste the above code from the PDF to my editor of choice I get the following result (works with Adobe Acrobat Reader): Note the line of code and the LF. Now my idea was to use the ANSI escape code for backspace in the ActualText={} of postbreak=\raisebox{0ex}[0ex][0ex]{\BeginAccSupp{ActualText={<BS-char-here>}}\ensuremath{\color{gray}\hookrightarrow\space}\EndAccSupp{}}, to somehow delete the line break from the clipboard text. I added the non visible BS-code directly but this did not result in the desired outcome (did not build). I also don't want to delete all line breaks just the ones that were added by lstlisting. Is this the right way to go or could I use some other technique to do the job. Notes: Code in a parallel documents is unfortunately not an option. Its a big PDF file with different code snippets. Furthermore, the PDF is our only allowed "source of truth". I know that the PDF reader plays an important role in this matter. But I'm fine if it is working with Adobe. Edit: Here is my listings setup: \documentclass{article} \usepackage{xcolor} \usepackage{listings} \usepackage{accsupp} \lstset{ % Highlight line break due to textwidth % https://tex.stackexchange.com/questions/116534/lstlisting-line-wrapping postbreak=\raisebox{0ex}[0ex][0ex]{\BeginAccSupp{ActualText={}}\ensuremath{\color{gray}\hookrightarrow\space}\EndAccSupp{}}, breakatwhitespace = true, breaklines = true } \begin{document} My code: \begin{lstlisting} This is a long long long long long long long long long long long long long long long long long long line of code \end{lstlisting} \end{document} In a previous version I hat the input as Markdown. This is because I use Pandoc to convert to TeX and then to the PDF file. But the first step is not important for this problem and I replaced the Markdown with the converted TeX-Input.
- CV template - Side column size changes when footer is in first page?by Chip on February 20, 2026 at 1:10 pm
I'm trying to make a CV based on this Overleaf template. All my content fits on one page, so I wanted the footer to be on the first; for some unknown reason this changes the size of the left column and sends everything out of alignment. Minimal working example: % a mashup of hipstercv, friggeri and twenty cv % https://www.latextemplates.com/template/twenty-seconds-resumecv % https://www.latextemplates.com/template/friggeri-resume-cv \documentclass[lighthipster]{simplehipstercv} % available options are: darkhipster, lighthipster, pastel, allblack, grey, verylight, withoutsidebar % withoutsidebar \usepackage[utf8]{inputenc} \usepackage[default]{raleway} \usepackage[margin=1cm, a4paper]{geometry} %------------------------------------------------------------------ Variablen \newlength{\rightcolwidth} \newlength{\leftcolwidth} \setlength{\leftcolwidth}{0.23\textwidth} \setlength{\rightcolwidth}{0.75\textwidth} %------------------------------------------------------------------ \title{New Simple CV} \author{\LaTeX{} Ninja} \date{June 2019} \pagestyle{empty} \begin{document} \thispagestyle{empty} %------------------------------------------------------------- \section*{Start} \simpleheader{headercolour}{Jack}{Sparrow}{Captain}{white} %------------------------------------------------ % this has to be here so the paracols starts.. \subsection*{} \vspace{4em} \setlength{\columnsep}{1.5cm} \columnratio{0.23}[0.75] \begin{paracol}{2} \hbadness5000 %\backgroundcolor{c[1]}[rgb]{1,1,0.8} % cream yellow for column-1 %\backgroundcolor{g}[rgb]{0.8,1,1} % \backgroundcolor{l}[rgb]{0,0,0.7} % dark blue for left margin \paracolbackgroundoptions % 0.9,0.9,0.9 -- 0.8,0.8,0.8 \footnotesize {\setasidefontcolour \flushright \bg{cvgreen}{white}{About me}\\[0.5em] {\footnotesize \lorem\lorem\lorem} \bigskip \bg{cvgreen}{white}{personal} \\[0.5em] Jack Sparrow nationality: English 1690 \bigskip \bg{cvgreen}{white}{Areas of specialization} \\[0.5em] Privateering ~•~ Bucaneering ~•~ Parler ~•~ Rum \bigskip \bigskip \bg{cvgreen}{white}{Interests}\\[0.5em] \lorem \bigskip \bg{cvgreen}{white}{Interests}\\[0.5em] \texttt{R} ~/~ \texttt{Android} ~/~ \texttt{Linux} \texttt{R} ~/~ \texttt{Android} ~/~ \texttt{Linux} \texttt{R} ~/~ \texttt{Android} ~/~ \texttt{Linux} \vspace{4em} \infobubble{\faAt}{cvgreen}{white}{jack@sparrow.org} \infobubble{\faTwitter}{cvgreen}{white}{@sparrow} \infobubble{\faFacebook}{cvgreen}{white}{Jack Sparrow} \infobubble{\faGithub}{cvgreen}{white}{sparrow} \phantom{turn the page} \phantom{turn the page} } %----------------------------------------------------------- \switchcolumn \small [content] \vfill{} \pagebreak %---------------------------------------------------------------------------------------- % FINAL FOOTER %---------------------------------------------------------------------------------------- \setlength{\parindent}{0pt} \begin{minipage}[t]{\rightcolwidth} \begin{center}\fontfamily{\sfdefault}\selectfont \color{black!70} {\small Jack Sparrow \icon{\faEnvelopeO}{cvgreen}{} The Black Pearl \icon{\faMapMarker}{cvgreen}{} Tortuga \icon{\faPhone}{cvgreen}{} 0099/333 5647380 \newline\icon{\faAt}{cvgreen}{} \protect\url{jack@sparrow.com} } \end{center} \end{minipage} \end{paracol} \end{document} As you can see, the above code works fine, but if I comment out the \pagebreak just before the footer... Anyone have any idea of why, and how I could fix this?
- Thinspace with babel french?by nowox on February 20, 2026 at 12:47 pm
I love LaTeX, but I also love french typography and I noticed that babel does not really add a thin space before the colon/semicolon: \documentclass{article} \usepackage[french]{babel} \addto\extrasfrench{% \renewcommand{\FBcolonspace}{\nobreak\thinspace}% } \begin{document} \large Le canard: un animal avec deux pattes. \end{document} Built with: latexmk -lualatex test.tex If I manually do it, the result is visually much better. \begin{document} \large Le canard\nobreak\thinspace: un animal avec deux pattes. \end{document} Is there a way to tweak babel to do it right?
- GitHub and LaTeXby Tanda on February 20, 2026 at 12:20 pm
I need to be able to work on an Overleaf project while offline. I read tha I had to create a link with a repository on GitHub, which is what I did. All files are there, but how do I run LaTeX? Thanks to whomever will answer
- Class to typeset a journal: is memoir a good choice?by alcuinus on February 20, 2026 at 9:32 am
I normally use memoir to print my books. I am now editing a scholarly journal. Can I use memoir for this task? The main problem seems to redefine author for each chapter, Bibliography is at the end, I prefer a comprehensive list at the end of the journal. I saw the proc class but memoir seems much more developed.
- How to make good use of built-in Japanese sequence in `luatexja-otf` named `\ajKakuHira`-family in `luatexja-ajmacros.sty`?by Explorer on February 20, 2026 at 7:32 am
Learning from standard \alph and \@alph, I have the following code: \documentclass{article} \usepackage[sourcehan-jp]{luatexja-preset} \usepackage{enumitem} \makeatletter \newcommand{\hira}[1]{\expandafter\@hira\csname c@#1\endcsname} \def\@hira#1{\ifcase#1\or あ\or い\or う\or え\or お\or か\or き\or く\or け\or こ\or さ\or し\or す\or せ\or そ\or た\or ち\or つ\or て\or と\or な\or に\or ぬ\or ね\or の\or は\or ひ\or ふ\or へ\or ほ\or ま\or み\or む\or め\or も\or や\or ゆ\or よ\or ら\or り\or る\or れ\or ろ\or わ\or ゐ\or ゑ\or を\or ん\else\@ctrerr\fi} \AddEnumerateCounter{\hira}{\@hira}{あ} \makeatother \begin{document} \begin{enumerate}[label=(\hira*)] \item 第一 \item 第二 \item 第三 \item 第四 \item 第五 \end{enumerate} \end{document} gives: That is okay, but I need to move all the codes of numrical sequence everywhere(maybe I could put them into hira.tex and \input), I don't think that is the best practice, if I want Kata and Yobi at the same time(see below), I need to copy\def\@hira#1 twice. IMHO, I don't think that is Japanese LaTeX users' best approach to use these sequences. I found following commands in luatexja-ajmacros.sty could be found in luatexja-package: \@tempcnta\@ne \@aj@numberdef{Hira}あいうえおかきくけこさしすせそたちつてとなにぬねのはひふへほまみむめもやゆよらりるれろわゐゑをん\@nil \@tempcnta\@ne \@aj@numberdef{Kata}アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワヰヱヲン\@nil \@tempcnta\@ne \@aj@numberdef{Yobi}日月火水木金土祝休\@nil I want to make good use of it with \usepackage{luatexja-otf}, but I don't know whether they could interact with \AddEnumerateCounter: \documentclass{article} \usepackage[sourcehan-jp]{luatexja-preset} \usepackage{luatexja-otf} \usepackage{pgffor} \usepackage{enumitem} \begin{document} \foreach \x in {1,...,10}{ \ajKakuHira{\x}\par } % \bigskip % not work % \newcommand{\ajhira}[1]{\ajKakuHira{#1}} % \AddEnumerateCounter{\hira}{\ajhira}{あ} % \begin{enumerate}[label=\hira*] % \item 111 % \item 222 % \item 333 % \item 444 % \item 555 % \item 666 % \item 777 % \end{enumerate} \end{document} Any suggeestions to avoid manually add \def\@hira#1 and make good use of luatexja-otf built-in commands?
- Make a distorted circle a circle again, after rescaling in the `axis` environmentby Máté Wierdl on February 20, 2026 at 3:53 am
In the graph below the red "dots" get distorted due to unequal scaling. How can I make them circles again? \documentclass{article} \usepackage{tikz} \usepackage{pgfplots} \pgfplotsset{compat=1.18} \begin{document} \begin{tikzpicture} % Parameter: epsilon \newcommand{\eps}{0.25} % Compute intersection x-values: \pgfmathsetmacro{\xint}{acos(1 - \eps)/360} \begin{axis}[xscale=2/3, yscale=0.4, width=10cm, % chose these to keep axis height=20cm, % from automatically rescaling to a square trig format=rad, domain = -1/2:1/2, axis y line=left, axis x line=bottom, axis line style = {-}, % makes arrow heads disappear; has to come % after "axis y line" and "axis x line" xtick = {-1/2, -\xint, 0, \xint, 1/2}, xticklabels = {$-1/2$, $-\delta$, $0$, $\delta$, $1/2$}, ytick = {-1, 1-\eps, 1}, yticklabels = {$-1$, $1-\epsilon$, $1$}, ] \addplot[smooth] { cos(2*pi*x) }; \draw[dashed] (-0.5, 1 - \eps) -- (0.5, 1 - \eps); \draw[dashed] (-\xint, -1) -- (-\xint, 1 - \eps); \draw[dashed] (\xint, -1) -- (\xint, 1 - \eps); \filldraw[red] (axis cs: -\xint,1 - \eps) circle (0.5cm); \filldraw[red] (axis cs: \xint,1 - \eps) circle (0.5cm); \end{axis} \end{tikzpicture} \end{document}
- Uniform sequences of mathematical dotsby Sebastiano on February 19, 2026 at 10:39 pm
When I need to write a sequence of dots without using TikZ, I often define a simple macro based on \bullet or another symbol that produces two or three dots (which they can be increase and decrease in size). However, I would like to generalize this idea so that I can obtain a sequence of n dots (horizontal, diagonal, vertical). In particular, I would like the solution I define to work well in different mathematical contexts: a sequence of dots arranged horizontally on a line, a vertical sequence for example under a brace or associated with \vdots, and even a diagonal arrangement for something like \ddots. I would also like this sequence of dots to automatically adapt to different math style sizes, meaning it should work properly in \displaystyle, \scriptstyle, \scriptscriptstyle, etc. Ideally, it should be possible to scale the symbols elegantly using packages like scalerel or equivalent techniques, so that the macro can be used in subscripts, superscripts, or expressions of different sizes without visual issues. Another requirement is that these sequences of dots should be able to be grouped in pairs, triplets, quadruplets, etc., and that such groups can be represented under a brace or curly bracket to visually highlight those groupings within the formulas. The goal is to have a parameterized macro that generates an arbitrary sequence of dots with uniform spacing and consistent behavior in various mathematical contexts, simple to use and not dependent on TikZ or other packages. Is there a well-established way to approach this problem? \documentclass{article} \usepackage{mathtools,amssymb} \newcommand{\Dots}[1]{% \mathpunct{\ifnum#1>0 \cdot\fi}% \ifnum#1>1 \mathpunct{\cdot}\fi% \ifnum#1>2 \mathpunct{\cdot}\fi% \ifnum#1>3 \mathpunct{\cdot}\fi% \ifnum#1>4 \mathpunct{\cdot}\fi% \ifnum#1>5 \mathpunct{\cdot}\fi% } \begin{document} $a\Dots{1}b$ $\Dots{2}$ $\Dots{3}$ $\Dots{4}$ $\Dots{6}$ \end{document} Something like this where the size of the bullet can be changed:
- How to draw a half‑sphere with 5‑degree lines along the x‑axis in TikZ/PGF?by AruGip on February 19, 2026 at 8:40 pm
I found this post and I'm trying to retrieve the version shown in the image below. Does anyone know how I can get that specific version? I've checked the documentation and explored the available properties, but I couldn't find anything that returns the same value shown there. Any ideas on how to achieve this?
- Is it possible to log the contents of a box without changing pdfTeX's return value?by cfr on February 19, 2026 at 4:17 pm
Consider \documentclass{article} \begin{document} \ExplSyntaxOn \tl_set:Nn \l_tmpa_tl {abc} \tl_log:N \l_tmpa_tl \hbox_set:Nn \l_tmpa_box {abc} \box_log:N \l_tmpa_box \ExplSyntaxOff \end{document} This does exactly what I want, except that \box_log:N \l_tmpa_box changes pdfTeX's return value from 0 to 1, whereas compiling \documentclass{article} \begin{document} \ExplSyntaxOn \tl_set:Nn \l_tmpa_tl {abc} \tl_log:N \l_tmpa_tl \hbox_set:Nn \l_tmpa_box {abc} % \box_log:N \l_tmpa_box \ExplSyntaxOff \end{document} returns 0. Is it possible to log the contents of \l_tmpa_box without altering pdfTeX's exit code?
- Create a directed graphby Dimitrios ANAGNOSTOU on February 19, 2026 at 4:15 pm
I want to create the following figure. Using the following code, I managed to get something close. But I cannot figure out how to get properly the diagonal vectors without too much trial and error. Any ideas? Thanks a lot! \documentclass[a4paper,11pt]{article} \usepackage[T1]{fontenc} \usepackage[french]{babel} \usepackage{tikz} \usetikzlibrary{positioning,arrows.meta} \begin{document} \begin{figure}[!htpb] \centering \begin{tikzpicture}[ node distance=3cm, box/.style={draw, rectangle, minimum size=1.2cm, font=\large}, arr/.style={->, >=Stealth, thick} ] % Nodes \node[box] (1) {1}; \node[box, below=of 1] (2) {2}; \node[box, right=of 1] (3) {3}; \node[box, below=of 3] (4) {4}; % Labels n_i \node[above=3mm of 1] {$n_1=3$}; \node[above=3mm of 3] {$n_3=1$}; \node[below=3mm of 2] {$n_2=2$}; \node[below=3mm of 4] {$n_4=2$}; % Horizontal 1 <-> 3 (two parallel arrows) \draw[arr] ([yshift=4pt]1.east) -- ([yshift=4pt]3.west); \draw[arr] ([yshift=-4pt]3.west) -- ([yshift=-4pt]1.east); % Vertical left \draw[arr] (1) -- (2); % Vertical right \draw[arr] (4) -- (3); % Bottom horizontal \draw[arr] (2) -- (4); % Diagonals \draw[arr] (2) -- (3); \draw[arr] ([xshift=-4pt]4.north) -- ([xshift=4pt]1.south); \draw[arr] ([xshift=-4pt]1.south) -- ([xshift=4pt]4.north); \end{tikzpicture} \end{figure} \end{document}
- Adjust tabularx with X columns to text widthby cis on February 19, 2026 at 2:22 pm
In the following table, I'm trying to simulate a larger table using the original settings. The p-columns (p1, p2, ..., p7) should be evenly distributed across the remaining text width. So, I've chosen \newcolumntype{Y}{>{\centering\arraybackslash}X} for them. The rest are c-columns. To me, it looks like the table fits within the text width, but I'm still getting Overfull \hbox (1.16014pt too wide). How can I fix this? \documentclass[paper=a5]{scrartcl} \usepackage[margin=14mm, showframe]{geometry} \usepackage{xcolor} \usepackage{diagbox} \usepackage{colortbl} \usepackage{tabularx} \newcolumntype{Y}{>{\centering\arraybackslash}X} \newcolumntype{K}{>{\cellcolor{pink}}c} \newcolumntype{S}{>{\cellcolor{lightgray}}c} \begin{document} \section{Tabularx with overfull hbox} \begingroup \setlength\arrayrulewidth{1pt}% test: correctness of the rules \footnotesize\sffamily % used \noindent% \begin{tabularx}{\textwidth}{c | K | *{7}{Y} | S | l } \hline $n$ & \diagbox{$k$}{$p$} & p1 & p2 & p3 & p4 & p5 & p6 & p7 & \diagbox{$p$}{$k$} \\ \hline 100 & 22 % 3 and 2 digits & 0.1111 % with leading zero & .2222 & .3333 & .4444 & .5555 & .6666 & .7777% without ~ & 22 % 2 digits \end{tabularx} \endgroup \end{document}
- how to put a character between dollarsby Jordi Pinyol on February 19, 2026 at 12:18 pm
In texmaker how can you put a character (or more) between dollars automatically, just like you can do with emphasis. For example: x=y -> select and execute a command -> $x=y$
- uneven commutative diagramby mappingmoe on February 18, 2026 at 11:33 am
I want to draw the following commutative diagram in LaTeX: I have tried tikzcd, but I think I won't work, since the rows have different size. Is there a clean way to do it? EDIT: my first approach was the following: \documentclass[a4paper]{article} \usepackage{tikz-cd} \begin{document} \begin{tikzcd} P \arrow{l}{pr} \arrow{d}{\pi} & TP \arrow{d}{T \pi}\\ I \arrow{ur}{\tilde{\gamma}} \arrow{r}{\dot{\gamma}} & M \arrow{l}{pr} & TM \end{tikzcd} \end{document}