Week
- French babel raising error if colon in label with cleverref [duplicate]by Thomas on July 20, 2026 at 1:40 pm
In my document, I add label to sections, figures etc with the following \label{sec:a}. In an English document, when I want to refer to these label using the package cleverref (with \cref{sec:a}) and all works well. But if I change the document language to French, I get the following error Missing \endcsname inserted. <to be read again> The issue of the error is the colon : in the label, if I use sec-a instead of sec:a, the compilation works well. But I don't explain why the usage of French language has an incidence on this... Here is a MWE : \documentclass{article} \usepackage[T1]{fontenc} % \usepackage[english]{babel} % If uncommented : no problem \usepackage[french]{babel} % If uncommented : error at compilation \usepackage{cleveref} \begin{document} Voir Section~\cref{sec:a}. \section{A} \label{sec:a} \end{document} Note that if I use \ref{sec:a}, there is no issue at compilation. I'm using LaTeX version 3.141592653-2.6-1.40.25 (TeX Live 2023/Debian)- maybe an old version ?, and here is the list of file (/cc @Joseph) : *File List* article.cls 2023/05/17 v1.4n Standard LaTeX document class size10.clo 2023/05/17 v1.4n Standard LaTeX file (size option) fontenc.sty 2021/04/29 v2.0v Standard LaTeX package babel.sty 2024/01/07 v24.1 The Babel package english.ldf 2017/06/06 v3.3r English support from the babel system babel-english.tex cleveref.sty 2018/03/27 v0.21.4 Intelligent cross-referencing l3backend-pdftex.def 2024-01-04 L3 backend support: PDF output (pdfTeX) ***********
- Para mode alignment with equal column sep by using tabular or tabular* onlyby MadyYuvi on July 20, 2026 at 12:35 pm
I'm trying to make all the column into para alignment with equal columnsep, I've referred the answer from @egreg Cells of equal width using tabular which is somewhat match with my requirement and not sure how to fix para mode alignment, and the MWE is: \documentclass{book} \ExplSyntaxOn \newenvironment{ftabular}[2][c] { \lawrence_ftabular:nn { #1 } { #2 } } { \endtabular } \tl_new:N \l__lawrence_ftabular_header_tl \dim_new:N \l__lawrence_ftabular_maxwd_dim \box_new:N \l__lawrence_ftabular_item_box \cs_new_protected:Nn \lawrence_ftabular:nn { \tl_clear:N \l__lawrence_ftabular_header_tl \dim_zero:N \l__lawrence_ftabular_maxwd_dim \clist_map_inline:nn { #2 } { \hbox_set:Nn \l__lawrence_ftabular_item_box { ##1 } \dim_set:Nn \l__lawrence_ftabular_maxwd_dim { \dim_max:nn { \l__lawrence_ftabular_maxwd_dim } { \box_wd:N \l__lawrence_ftabular_item_box } } \tl_put_right:Nn \l__lawrence_ftabular_header_tl { & {\makebox[\l__lawrence_ftabular_maxwd_dim]{##1}} } } \tl_put_right:Nn \l__lawrence_ftabular_header_tl { \\ \hline } \tabular[#1]{ c| *{ \clist_count:n { #2 } } { c| } } \tl_use:N \l__lawrence_ftabular_header_tl } \ExplSyntaxOff \begin{document} \begin{ftabular}{Human capital and research, Reflects countries’ investment in education and research and development. Range: 0 to 100., Captures national investments in general infrastructure, information and communication technologies and ecologically sustainable development. Range} \hline \\ Column 1 & Column2 & Column3\\ \end{ftabular} \end{document} I understood that this requirement easily can fix by using tabularx and tabulary and so on, but it's much helpful for me, if it fix by using either tabular or tabular*
- What is the correct way to print a mixed number compatible with a tagged PDF?by Pablo González L on July 20, 2026 at 12:31 pm
I am working on a small package for school things (primary/secondary) where the well-known mixed numbers appear frequently ($3\frac{4}{5}$). The MWE I'm showing below does the job and can be validated with veraPDF. I'm using TL26 and LuaTeX: \DocumentMetadata { lang=es-CL, pdfversion=2.0, pdfstandard=ua-2, tagging=on, } \documentclass{article} \usepackage[spanish]{babel} \usepackage{unicode-math, hyperref} \hypersetup { colorlinks = true, pdfstartview = FitH, pdfdisplaydoctitle = true, pdftitle = {Test para números mixtos}, } \ExplSyntaxOn % Invisible Separator (use \Umathchardef from LuaTeX) \hook_gput_code:nnn {begindocument} {spintent} { \Umathchardef \__spintent_invisible_sep: = "0 "0 "2063 } % Vars \box_new:N \l__spintent_spmQ_target_box \box_new:N \l__spintent_spmQ_ref_box \dim_new:N \l__spintent_spmQ_raise_dim \dim_new:N \l__spintent_spmQ_target_dim \dim_new:N \l__spintent_spmQ_ref_dim \tl_new:N \l__spintent_spmQ_factor_tl \tl_new:N \l__spintent_spmQ_math_style_tl % Math style (use \mathstyle from LuaTeX) \cs_new_protected:Npn \__spintent_wrap_math:n #1 { $ \l__spintent_spmQ_math_style_tl #1 $ } \cs_new_protected:Npn \__spintent_spmQ_capture_math_style: { \tl_set:Ne \l__spintent_spmQ_math_style_tl { \int_case:nnF { \mathstyle } { { 0 } { \exp_not:N \displaystyle } { 1 } { \exp_not:N \displaystyle } { 2 } { \exp_not:N \textstyle } { 3 } { \exp_not:N \textstyle } { 4 } { \exp_not:N \scriptstyle } { 5 } { \exp_not:N \scriptstyle } { 6 } { \exp_not:N \scriptscriptstyle } { 7 } { \exp_not:N \scriptscriptstyle } } { \exp_not:N \textstyle } } } \cs_new_protected:Npn \__spintent_spmQ_scale_int:nnn #1 #2 #3 { \__spintent_spmQ_capture_math_style: \hbox_set:Nn \l__spintent_spmQ_target_box { \__spintent_wrap_math:n { #1 } } \hbox_set:Nn \l__spintent_spmQ_ref_box { \__spintent_wrap_math:n { \frac { #2 } { #3 } } } % Alturas \dim_set:Nn \l__spintent_spmQ_target_dim { \box_ht_plus_dp:N \l__spintent_spmQ_target_box } \dim_set:Nn \l__spintent_spmQ_ref_dim { \box_ht_plus_dp:N \l__spintent_spmQ_ref_box } % \dim_ratio:nn \dim_compare:nNnTF { \l__spintent_spmQ_target_dim } = { \c_zero_dim } { \tl_set:Nn \l__spintent_spmQ_factor_tl { 1 } } { \tl_set:Ne \l__spintent_spmQ_factor_tl { \dim_ratio:nn { \l__spintent_spmQ_ref_dim } { \l__spintent_spmQ_target_dim } } } % Sacle int box \box_scale:Nnn \l__spintent_spmQ_target_box { \l__spintent_spmQ_factor_tl } { \l__spintent_spmQ_factor_tl } % Align \dim_set:Nn \l__spintent_spmQ_raise_dim { \box_dp:N \l__spintent_spmQ_target_box - \box_dp:N \l__spintent_spmQ_ref_box } % Print \box_move_up:nn { \l__spintent_spmQ_raise_dim } { \box_use_drop:N \l__spintent_spmQ_target_box } \MathMLintent { enteros } { \__spintent_invisible_sep: } \frac { #2 } { #3 } } % #1 = int, #2 = Numerador, #3 = Denominador \NewDocumentCommand { \spmQ } { m m m } { \__spintent_spmQ_scale_int:nnn { #1 } { #2 } { #3 } } \ExplSyntaxOff \begin{document} Texto en línea $\spmQ{3}{4}{5}$ fin del párrafo. \[ \spmQ{3}{4}{5} \] \end{document} It produces the following output: and: <math xmlns="http://www.w3.org/1998/Math/MathML"> <mtext> <math xmlns="http://www.w3.org/1998/Math/MathML"> <mn>3</mn> </math> </mtext> <mi intent="enteros" mathvariant="normal"></mi> <mfrac> <mn>4</mn> <mn>5</mn> </mfrac> </math> This can be done in a better way?
- What actually is the "binding correction"?by M0M0 on July 20, 2026 at 11:36 am
The KOMA script classes (and probably other classes as well) offer an option to set a binding correction. There are are few questions on the forum regarding how to determine the binding correction if one has a sample book (similar number of pages, same printing service). There are also (in German) two methods to do so described by Markus Kohm. However, I have a hard time understanding how to carry them out. I think this is caused by my total misunderstanding what binding correction even refers to. Often it is said that it is the amount of paper that is "lost due to" or "vanishes inside" the binding. However, I think I don't fully understand what is meant by this. I personally (maybe wrongly) think that it is the difference between the actually paper width and the width of the projection of the bound, curved, actual page inside the book onto a flat surface (the perceived page). The reason why I'm not sure about this is, that here the loss that is due to the actual binding is almost negligible compared to the loss of the curvature of the page. In fact this is more of a "curvature correction" than a "binding correction" then. Also, the curvature applies to the whole page (but is of course strongest close to the inner end of the page), does it really make sense to apply the correction only to the inner margin? It feels like the whole page layout should be recalculated taking the curvature of the page into account. To illustrate my problem: If I use Kohm's second method (open the book in the middle as you would read it; put a ruler in the middle; push a paper of the same width as the page against the ruler; measure how far this page hangs over the end of the book page), it makes a huge difference if I use a flexible paper and push it against the ruler such that follows the curvature of the page or if I use a stiff page and push it against the ruler while the page is parallel to the desk plane. For my reference example the first method gives a few mm and the second 2 cm. The second method takes the lost width due to the curvature into account (projection onto a flat plane) while the first one doesn't. As said, I think the second method is the correct one. But then again it is said that an upper limit for the binding correction is half of the height of the book (without cover) since the page at max needs to wrap around half of it. But why is this is a upper bound? In my example the loss due to the curvature of the pages is much larger than half of the book's width. I apologize if the question is hard to follow. I think it is a problem hard to describe in words, which is probably the reason why I'm such confused. Edit: I hope those two pictures help to illustrate the problem. This, first image, shamelessly stolen from this question shows that commonly used bindings for thesis like documents can cause a strong curvature of the page. This second picture is a drawing (sorry, I really can't draw) of mine to illustrate what I mean. The question in the end is, is the binding correction the page width minus r2 (the projection of the page onto a plane) r4 (the total, curved, visible area of the page) the difference between r1 and r3 I was under the assumption that the term binding allowance/binding correction is well defined and I'm simply not able to understand it. If the question is indeed opinion based (that is the binding allowance is not a well defined term and might to refer to whatever a typesetting thinks they should or should not correct for), I apologize for asking it. Since the discussion came up in the comments: I struggle with the term visibility (I'm not a native speaker). Is r3 considered visible or is r1 considered visible in the context of a binding allowance? I don't mean this in a philosophical way but as a genuine question.
- Jitter Metafont stroke endpoints to make glyphs messierby morgan on July 20, 2026 at 4:03 am
I would like to use .*TeX to make a variety of documents, including many with handwriting. I would like to avoid the glyphs exactly repeating since that looks less real. I previously found something to offset and rotate words, which definitely would help, but is there a way to have Metafont stroke endpoints be randomly offset? That would make each glyph a bit different, and in combination with other effects and on a handwriting style font, better approximate the look of handwriting as well as be another way to show rushed vs calmly written documents.
- How to rotate an illustration created using an environment generated using the newfloat command?by forrest on July 19, 2026 at 3:49 pm
In my book I have two kinds of illustrations: photographs and sketches. These should be named respectively and should have distinct counters. This task can be done with the use of the \newfloat command of the memoir package. Great. Now, among both kinds of illustrations are present big graphics which should be rotated by the angle of 90 degrees - together with their captions. The tool aimed to perform this operation is sidewayfigure environment which is included in the rotating package. Fine. The remaining task is to integrate these two environments, but I am failed by it. Code: \documentclass[11pt,twoside]{memoir} \usepackage{mwe} \usepackage[utf8]{inputenc} \usepackage{graphicx} \usepackage{rotating} \setstocksize{180mm}{120mm} \settrimmedsize{180mm}{120mm}{*} \settypeblocksize{160mm}{100mm}{*} \setlrmargins{10mm}{*}{*} \setulmargins{10mm}{*}{*} \setheadfoot{0pt}{0pt} \settypeoutlayoutunit{mm} \checkandfixthelayout \newfloat{photo}{lop}{Photograph} \newfloat{sketch}{los}{Sketch} \begin{document} \begin{photo}[p] \includegraphics[width=\textwidth,height=.9\textheight]{example-image-a}% \caption{First photo}\label{photo:first} \end{photo} \begin{sketch}[p] \includegraphics[width=\textwidth,height=.9\textheight]{example-image-b}% \caption{First sketch}\label{sketch:first} \end{sketch} \begin{sidewaysfigure} \includegraphics[width=\textwidth,height=.5\textheight]{example-image-c}% \caption{First figure}\label{figure:second} \end{sidewaysfigure} \begin{photo} \begin{sideways} \includegraphics[width=\textwidth,height=.5\textheight]{example-image-a}% \caption{Second photo}\label{photo:second} \end{sideways} \end{photo} \end{document} By the way: How width and height optional arguments of \includegraphics work while are called within sidewaysfigure environment?
- I want to learn on tex4ht based on oolatex but cannot findby user2609605 on July 19, 2026 at 1:59 am
I remember strongly that there was a script called oolatex in texlive. Also in the documentation of tex4ht it is mentioned. Still I cannot find it in texlive any more. Is it available only in old releases? I don't want to use make4ht since I need full control. I prefer oolatex because it is closer to elementary. My intention is just to learn.
- Fine-tuning the box surrounding a bar plotby Muhannad Al Ayoubi on July 18, 2026 at 5:22 pm
This is my first time making a bar plot using pgfplots. I am happy so far with what I have, but I still need some points. How can I make the top-most tick (14) coincide with the top boundary of the box? I do not like the tiny space between the top-most gridline and the top boundary of the box. I've already tried removing 14 from the key ytick but I don't like the result. I think the 14 has to stay. Suppose instead I decided to completely remove the top and right boundaries of the box. I know I can do that using the options axis x line*=bottom and axis y line*=left, but then I'd like to include arrowheads, at least for the y-axis. How to do that? Finally, I've managed to adjust the distance between successive bars by playing with the option x=0.8 cm. Is there a better way? Here is my code. I've also attached the figure. \documentclass[10pt]{book} \usepackage{tikz,pgfplots} \begin{document} \begin{tikzpicture}[every node/.style={font=\footnotesize}] \begin{axis}[ clip=false, ybar, ymajorgrids, grid style={dashed}, ymin=0, %axis x line*=bottom, %axis y line*=left, xlabel=Number of siblings, ylabel=Frequency, ytick pos=left, xtick pos=left, xtick=data, ytick={0,2,4,...,12,14}, bar width=.4cm, x=0.8cm, y=0.3cm, label style={font={\footnotesize \itshape}}, tick label style={font={\footnotesize \itshape}}, nodes near coords, nodes near coords align={vertical}, ] \addplot [fill=orange,] coordinates { (0,3) (1,13) (2,8) (3,3) (4,1) }; \end{axis} \end{tikzpicture} \end{document}
- Adjusting TikZ code example to create clock faces for modular arithmetic graphicsby Bryan-StackExchange on July 18, 2026 at 4:30 pm
The following Stack Exchange answers describe two sort of clock faces which are very close to what I need : Chords between nodes on a clock-like diagram using TikZ As seen in the two examples, I would like to : keep the digits on exterior of circle control whether to display the arrows or lines - or, especially, not display them. I have been able to adjust the code of the two answers (details below) in order to : increase the divisions e.g. from 12 to 98 (but see below) obtain any single face and print it using most of size 8.5 x 11 paper I still would like : display only certain values around perimeter - e.g. 12, 3, 6, 9 as might be seen on a normal clock increase the total to 98 but ideally any value. The purpose is generally for looking at symmetry in modular arithmetic. LaTeX seems ideally suited for this vs. e.g. Gnuplot. omit the lines between "nodes" (or markings) potentially create hash marks on the circle at any increment I do not understand many parts of the two code examples, and I believe this is necessary to adjust the examples to my requirements. e.g. the function of modtweleve and TikZMGClockMath. I am using https://tikz.dev/ as a reference - so I suspect I am overlooking a number of resources. The small adjustments to the two answers in the link are IMHO trivial, and I do not think they need to be reproduced here unless requested. some details : in the accepted answer by user Jake, in \newcommand replace 12 with e.g. 50. However, this approach runs into memory problems as the value increases. adjust stepsize in {1,...,12} to e.g. stepsize in {5} gives the fifth clock face only. This is good. in the answer by user percusse I adjusted 12 to 13 and used a single \begin{scope} to control how many pictures are displayed. The resultant image(s) are closest to what I need ; however, I do not understand how the macro is working - e.g. the \modtwelve part. However, the value can be increased to 98 without any memory problems, and create a nice image. In fact, my exact goal is met by adjusting \TikZMGClockMath{3}{28} - giving a 7-fold pattern. Specifically, the drawing would be perfect if the integers between e.g. 0 and 28 were omitted. in that answer, I commented out line 19-29 - from \draw and the first } that appears - to 'omit' the lines (vectors). This seems good. UPDATE: I added hashmarks with this code: \foreach \angle / \label in {90/0, 38.6/14, -12.8/28, -64.2/42, -115.6/56, -167/70, -218.4/84} ... which is good to show 7-fold symmetry, but they are not on the perimeter. The \draw commands adjust the position of a node or line width by the \angle. This is easy to adjust. See https://tikz.dev/pgffor UPDATE I found an inelegant way to add hashmarks - right after the above code, put this in: \draw[line width=0.5pt] (\angle:8.0cm) -- (\angle:8.5cm); } \foreach \angle in {86.3265, 86.3265, 82.6531, [.. skipping...] -258.98, -262.653, -266.327} the values are pre-calculated using awk. It would be nice to reduce that into a \foreach, multiplying the value of the example (360/98). Then, (360/98) could be any division of the circle. I tried asking on the original post, but I do not have the requisite reputation. If there is a better approach, I'd be glad to change this question.
- An original cover of my book for a broken clockby Sebastiano on July 17, 2026 at 8:21 pm
I have tried to create a cover for my book that is beautiful and visually appealing. Since the book deals with topics such as relativity, clocks, four-vectors, spacetime, the calculus of variations, and many other fascinating ideas, I imagined clocks being sucked into an unknown spacetime and deformed in the style of Salvador Dalí. The clocks become distorted until they break apart into many fragments, including the smallest and most symbolic components, such as the central pin and the internal spring. Question: How can you improve the broken clock that loses pieces to make it look more beautiful? \documentclass[12pt,a4paper]{book} \usepackage[T1]{fontenc} \usepackage{amsmath,amsfonts,amssymb} \usepackage{tikz} \usetikzlibrary{calc} \usepackage{geometry} \begin{document} \pagestyle{empty} \begin{tikzpicture}[remember picture, overlay] \coordinate (Centro) at (current page.center); \coordinate (TopRight) at (current page.north east); \coordinate (TopLeft) at (current page.north west); \definecolor{bglight}{RGB}{172, 206, 184} \fill[bglight] (current page.south west) rectangle (current page.north east); \definecolor{clockgold}{RGB}{230, 177, 43} \definecolor{clockgreen}{RGB}{166, 209, 108} \definecolor{clockorange}{RGB}{240, 133, 41} \definecolor{clockgrey}{RGB}{140, 155, 145} \definecolor{gridblue}{RGB}{110, 150, 135} \definecolor{authorgreen}{RGB}{18, 92, 79} \node[anchor=north east, align=right, text width=7cm] at ($(TopRight)+(-1.5,-1.5)$) { {\fontfamily{ptm}\selectfont\LARGE\color{authorgreen}\textbf{Name Surname 1}}\\[0.2cm] {\fontfamily{ptm}\selectfont\LARGE\color{authorgreen}\textbf{Name Surname 2}} }; \node[anchor=north west, align=justify, text width=16cm] at ($(TopLeft)+(1.5,-3.5)$) { {\fontfamily{pnc}\selectfont\huge\itshape\color{white}Lezioni di}\\[0.3cm] {\fontfamily{pnc}\fontseries{b}\fontsize{44pt}{46pt}\selectfont\spaceskip=0.5em\color{white} LONGGGGGGGGGGG\\ [.4cm] LONGGGGGGGGGGG} }; \begin{scope}[shift={(Centro)}, scale=1.6] \begin{scope}[gridblue, opacity=0.5, line width=0.8pt] \foreach \k in {-4.5,-3.7,-2.9,-2.1,-1.3,-0.5,0.5,1.3,2.9,3.7,4.5} { \draw[smooth, samples=40] plot[domain=-5.5:4.5] ({ \k * (1 - 0.6 / (1 + 0.2*\k*\k + 0.2*\x*\x)) }, { \x * (1 - 0.6 / (1 + 0.2*\k*\k + 0.2*\x*\x)) }); } \foreach \k in {-5,-4.1,-3.2,-2.3,-1.4,-0.5,0.5,1.4,2.3,3.2,4} { \draw[smooth, samples=40] plot[domain=-4.8:4.8] ({ \x * (1 - 0.6 / (1 + 0.2*\x*\x + 0.2*\k*\k)) }, { \k * (1 - 0.6 / (1 + 0.2*\x*\x + 0.2*\k*\k)) }); } \end{scope} \fill[white, opacity=0.25, rotate around={12:(3.2,-1.5)}] (1.8,-3) rectangle (4,0); \fill[white, opacity=0.25, rotate around={-15:(-3,2)}] (-4.2,0.8) rectangle (-1.8,3.2); \begin{scope}[shift={(-2.8,2)}, rotate=-15, scale=0.95] \draw[white, fill=white, line width=4pt, line join=round] plot[smooth cycle, tension=0.5] coordinates {(-1,1.1) (1,0.9) (0.9,-1) (-1.1,-0.8)}; \draw[gray!60!black, line width=2pt, line join=round] plot[smooth cycle, tension=0.5] coordinates {(-1,1.1) (1,0.9) (0.9,-1) (-1.1,-0.8)}; \fill[clockgold] plot[smooth cycle, tension=0.5] coordinates {(-0.7,0.8) (0.7,0.7) (0.6,-0.7) (-0.7,-0.5)}; \fill[black] (0,0) circle (2.5pt); \draw[black, ultra thick, ->] plot[smooth, tension=1] coordinates{(0,0) (0.05, 0.25) (0.15,0.5)}; \draw[black, ultra thick, ->] plot[smooth, tension=1] coordinates{(0,0) (-0.2, -0.05) (-0.4,-0.1)}; \foreach \a in {0,90,180,270} \draw[white, thick] (\a:0.55) -- (\a:0.7); \end{scope} \begin{scope}[shift={(-2.6,-0.8)}, rotate=22, scale=1.05] \draw[white, fill=white, line width=4pt, line join=round] plot[smooth cycle, tension=0.7] coordinates {(-0.6,1.4) (0.8,0.4) (0.2,-1.5) (-0.9,-0.8)}; \draw[gray!60!black, line width=2.2pt, line join=round] plot[smooth cycle, tension=0.7] coordinates {(-0.6,1.4) (0.8,0.4) (0.2,-1.5) (-0.9,-0.8)}; \fill[clockgreen] plot[smooth cycle, tension=0.7] coordinates {(-0.4,1.1) (0.5,0.2) (0.1,-1.2) (-0.6,-0.6)}; \fill[black] (-0.1,-0.1) circle (2.5pt); \draw[black, ultra thick, ->] plot[smooth, tension=1] coordinates{(-0.1,-0.1) (0, 0.2) (0.15,0.6)}; \draw[black, ultra thick, ->] plot[smooth, tension=1] coordinates{(-0.1,-0.1) (0.05, -0.3) (0.2,-0.5)}; \draw[black!70, thick] (0.1,0.9) -- (0.2,1.1); \draw[black!70, thick] (-0.4,-0.8) -- (-0.5,-1.0); \end{scope} \begin{scope}[shift={(-.5,-3.6)}, rotate=-15, scale=0.9] \draw[white, fill=white, line width=4pt, line join=round] plot[smooth cycle, tension=0.7] coordinates {(-0.7,1.4) (0.8,1.2) (1.1,-2.2) (-0.9,-2.4)}; \draw[gray!60!black, line width=2pt, line join=round] plot[smooth cycle, tension=0.7] coordinates {(-0.7,1.4) (0.8,1.2) (1.1,-2.2) (-0.9,-2.4)}; \fill[clockgrey!70!clockgreen] plot[smooth cycle, tension=0.7] coordinates {(-0.5,1.1) (0.6,1.0) (0.8,-1.9) (-0.6,-2.0)}; \fill[black] (0.05,-0.1) circle (2.5pt); \draw[black, ultra thick, ->] plot[smooth, tension=1.2] coordinates{(0.05,-0.1) (-0.2, 0.4) (0.3,0.9)}; \draw[black, ultra thick, ->] plot[smooth, tension=1.2] coordinates{(0.05,-0.1) (0.4, -0.6) (0.1,-1.5)}; \draw[black!80, thick] (90:0.6) -- (90:0.8); \draw[black!80, thick] (0:0.5) -- (0:0.7); \draw[black!80, thick] (180:0.4) -- (180:0.6); \draw[black!80, thick] (270:0.6) -- (270:1.3); \end{scope} \begin{scope}[shift={(2.5,-3.8)}, rotate=-35, scale=1.1] \draw[white, fill=white, line width=4pt, line join=round] plot[smooth cycle, tension=0.4] coordinates {(-1.3,0.6) (1.3,0.7) (0.9,-0.6) (-1.1,-0.5)}; \draw[clockorange, line width=2.5pt, line join=round] plot[smooth cycle, tension=0.4] coordinates {(-1.3,0.6) (1.3,0.7) (0.9,-0.6) (-1.1,-0.5)}; \fill[black] (0,0) circle (2.5pt); \draw[black, ultra thick, ->] plot[smooth, tension=1] coordinates{(0,0) (0.3, 0.1) (0.7,0.2)}; \draw[black, ultra thick, ->] plot[smooth, tension=1] coordinates{(0,0) (-0.2, -0.05) (-0.5,-0.1)}; \draw[black!70, thick] (1,0.2) -- (1.2,0.2); \draw[black!70, thick] (-0.9,-0.2) -- (-1.1,-0.2); \end{scope} \begin{scope}[shift={(2.5,2.5)}, rotate=15, scale=0.85] \begin{scope}[shift={(-0.3, 0.2)}, rotate=5] \draw[white, fill=white, line width=3pt] (0,0) -- (110:1.2) arc(110:200:1.2) -- cycle; \fill[clockgrey!70!clockgreen] (0,0) -- (110:1.0) arc(110:200:1.0) -- cycle; \draw[black!80, thick] (180:0.7) -- (180:0.9); \draw[black!80, thick] (120:0.7) -- (120:0.9); \end{scope} \begin{scope}[shift={(0.2, 0.4)}, rotate=-8] \draw[white, fill=white, line width=3pt] (0,0) -- (10:1.3) arc(10:85:1.3) -- cycle; \fill[clockgrey!70!clockgreen] (0,0) -- (10:1.1) arc(10:85:1.1) -- cycle; \draw[black!80, thick] (0:0.8) -- (0:1.0); \draw[black!80, thick] (60:0.8) -- (60:1.0); \draw[black, ultra thick] (30:0.2) -- (45:0.7); \end{scope} \begin{scope}[shift={(0.0, -0.4)}, rotate=12] \draw[white, fill=white, line width=3pt] (0,0) -- (220:1.2) arc(220:340:1.2) -- cycle; \fill[clockgrey!70!clockgreen] (0,0) -- (220:1.0) arc(220:340:1.0) -- cycle; \draw[black!80, thick] (270:0.7) -- (270:0.9); \draw[black!80, thick] (300:0.7) -- (300:0.9); \end{scope} \begin{scope}[shift={(-0.8, -0.9)}, rotate=-30] \draw[white, fill=gray!40, line width=1.5pt] (0,0) -- (0.3,0.4) -- (-0.1,0.5) -- cycle; \end{scope} \begin{scope}[shift={(0.9, -0.2)}, rotate=45] \draw[white, fill=white, line width=2pt] (0,0) -- (0.4,0.1) -- (0.2,0.3) -- cycle; \end{scope} \fill[black] (-0.1,0.05) circle (2.5pt); \begin{scope}[shift={(-0.5, 0.8)}, rotate=25] \draw[black, ultra thick, ->] (0,0) -- (-0.4, 0.5); \end{scope} \draw[gray!80!black, thick, smooth] plot[domain=0:540, samples=40] (\x:{\x*0.001 + 0.05}); \end{scope} \begin{scope}[shift={(2.6,-1.4)}, rotate=45, scale=1.2] \draw[clockorange, line width=5pt, line join=round, fill=white, fill opacity=0.1] plot[smooth cycle, tension=0.2] coordinates {(-1.1,0.5) (1.1,0.5) (0.7,-0.5) (-0.7,-0.5)}; \end{scope} \end{scope} \end{tikzpicture} \clearpage \end{document}
- Adding subtitle in section slide but not on TOCby Wanon98 on July 17, 2026 at 1:12 pm
I'm doing a presentation using beamer and the theme Singapore with some personnal adjustments. I'm having trouble generating a correct subtitle for the section slide, that does not appear on the table of contents. In the example bellow, I would like the "Subtitle" to show on the slide, like it is now, without it being shown on the TOC. I have tried many ways to do it, and I would like to avoid doing it manually by creating the section slide myself for every section, rather than using the automatically generated one. Here is my code and what it gives \documentclass[10pt,aspectratio=32]{beamer} \usetheme{Singapore} \usepackage{multicol} \setbeamersize{text margin right=15pt} \oddsidemargin=-45pt \textwidth=330pt \defbeamertemplate*{section page}{sectionpage}[1][]{% \begin{centering} {\usebeamerfont{section name}\usebeamercolor[fg]{section name}#1} \vskip1em\par \begin{beamercolorbox}[sep=12pt,center]{part title} \usebeamerfont{section title}\insertsection\par \end{beamercolorbox} \end{centering} } \setbeamertemplate{section in toc}{\inserttocsectionnumber.~\inserttocsection} \setbeamertemplate{subsection in toc}[ball unnumbered] \setbeamertemplate{caption}[numbered] \setbeamertemplate{navigation symbols}{ \usebeamerfont{footline} \insertframenumber/\inserttotalframenumber \vspace{10pt} } \setbeamerfont{frametitle}{size=\fontsize{12pt}{14pt},series=\mdseries} \setbeamerfont{section in toc}{size=\small,series=\bfseries} \setbeamerfont{subsection in toc}{size=\footnotesize} \setbeamerfont{structure}{family=\rmfamily,series=\mdseries} \setbeamerfont{normal text}{size=\small,series=\bfseries} \setbeamerfont{title}{size=\fontsize{13.5pt}{13.5pt}} \setbeamerfont{subtitle}{size=\fontsize{13pt}{13pt}} \setbeamerfont{author}{size=\fontsize{11pt}{11pt}} \setbeamerfont{institute}{size=\fontsize{10pt}{10pt}} \setbeamerfont{date}{size=\fontsize{10pt}{10pt}} \setbeamertemplate{itemize item}{\small \color{fg}$\blacktriangleright$} \setbeamertemplate{itemize subitem}{\tiny \color{fg}$\blacktriangleright$} \title[Title]{Title \vspace{-0.5cm}} \author{Me} \date[27th August 2026]{} \usefonttheme[onlymath]{serif} \begin{document} \AtBeginSection[]{\frame{\sectionpage}} \begin{frame}[plain] \titlepage \end{frame} \begin{frame} \frametitle{Table of contents} \begin{multicols}{2} \tableofcontents \end{multicols} \end{frame} \section[Introduction]{Introduction long title} \begin{frame}{Title} \end{frame} \begin{frame}{Title} \end{frame} \begin{frame}{Title} \end{frame} \section[Part 1]{Part 1 long title} \begin{frame}{Title} \end{frame} \subsection{title} \begin{frame}{Title} \end{frame} \begin{frame}{Title} \end{frame} \subsection{title} \begin{frame}{Title} \end{frame} \begin{frame}{Title} \end{frame} \section[Part 2]{Part 2 long title\\-\\Subtitle} \begin{frame}{Title} \end{frame} \subsection{title} \begin{frame}{Title} \end{frame} \begin{frame}{Title} \end{frame} \subsection{title} \begin{frame}{Title} \end{frame} \begin{frame}{Title} \end{frame} \section[Part 3]{Part 3 long title\\-\\Subtitle} \begin{frame}{Title} \end{frame} \subsection{title} \begin{frame}{Title} \end{frame} \begin{frame}{Title} \end{frame} \subsection{title} \begin{frame}{Title} \end{frame} \begin{frame}{Title} \end{frame} \section[Conclusion]{Conclusion and perspectives} \begin{frame}{} \end{frame} \begin{frame} \end{frame} \end{document} I hope my problem is clear enough, thank you for your help !
- TeX Live 2026 make4ht MathJax MathML rendering of math following a \tikz command not enclosed in tikzpictureby krone on July 17, 2026 at 1:01 pm
This is a follow up from Another mathjax/mathml question. MWE test.tex: \documentclass{book} \usepackage{tikz} \begin{document} \chapter{A test} \section{A section in the chapter} \begin{center} \tikz{ \draw (0,0) -- (1,0); } % \begin{tikzpicture} % \draw (0,0) -- (1,0); % \end{tikzpicture} \end{center} \[ a = b \] \begin{equation} \chi = \int_{-\infty}^{\infty} a(x) \exp{\left[ i 2 \pi x f \right]} dx \end{equation} \end{document} and test.cfg \Preamble{xhtml,mathml,mathjax} \catcode`\:11 \Configure{IMG} {\ht:special{t4ht=\ifmathml <\a:mathml semantics><\a:mathml annotation-xml encoding="application/xhtml+xml">\fi<img\Hnewline \ifmathml xmlns="http://www.w3.org/1999/xhtml"\fi\Hnewline src="\a:imgdir }\PauseMathClass} {\ht:special{t4ht=" alt="}} {" } {\ht:special{t4ht=" }} {\EndPauseMathClass\ht:special{t4ht=\xml:empty>\ifmathml </\a:mathml annotation-xml></\a:mathml semantics>\fi}} \catcode`\:12 \begin{document} \EndPreamble The config is probably unnecessary for users of vanilla texlive, but required in my case (see link to original question). make4ht is called as make4ht -l -c test.cfg test.tex As written, both equations after the \tikz{...} render as Math input error. If replaced by the code commented out i.e. \begin{tikzpicture} \draw{...} \end{tikzpicture} the rendering is normal. Thanks for your attention.
- 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): EDIT At the suggestion of Qrrbrbirlbel, I tried a variant using fadings. Issues: (a) it requires the path to be drawn explicitly twice (once in the preamble/fading definition and once in the body of the document) due to the definition of the fading; (b) I find that I have to rescale and/or translate the fit so it's in the right place, even though the fading and the path are drawn from the same coordinates, and (c) it requires scope fadings, which some PDF viewers (including evince/papers) do not display correctly for strokes, as shown below. \documentclass[tikz]{standalone} \usetikzlibrary{calc} \usepackage{worldflags} \begin{tikzfadingfrompicture}[name=island] \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 [fill=transparent!100] (0,-2) rectangle (6,4); \path [save path=\island] (a) -- (b) -- (c) -- (d) -- (e) -- (f) -- cycle; \path [draw=transparent!95,line width=2cm,use path=\island]; \path [draw=transparent!80,line width=0.5cm,use path=\island]; \path [draw=transparent!60,line width=0.1cm,use path=\island]; \path [fill=transparent!0,use path=\island]; \end{tikzfadingfrompicture} \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 [fill=cyan] (0,-2) rectangle (6,4); \path [save path=\island] (a) -- (b) -- (c) -- (d) -- (e) -- (f) -- cycle; \begin{scope}[transparency group] % \path [scope fading=island,fit fading=true, % fading transform={scale=0.29}] (0,-2) rectangle (6,4); \path [scope fading=island,fit fading=false, fading transform={shift={(3cm,1cm)}}] (0,-2) rectangle (6,4); \pic [country=PT,width=6cm,length=6cm] at (3,1) {worldflag}; \end{scope} \path [draw=black,use path=\island]; \end{tikzpicture} \end{document} This looks OK in Xpdf, viz., but it is not displayed correctly in Evince or Papers, viz.,
- 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}
- 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?
- Custom link text with cleveref [closed]by 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 (i.e. 'see here 1,2'). 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. EDIT 2: I have accepted the answer by Mico for now, as it more closely conforms to the question, though Explorer's is also valid and should be looked at. In the comments of the latter answer, Explorer and I agreed that a simpler solution than both probably should exist, considering my ask is 1) apparently the default in the question I linked to above (though that question has no MWE and is quite old), and 2) it is apparently the more correct way to currently cite IEEE, as according to the most updated reference guide (2025) -- see Section 1. Also see here. As such, I suppose the question is still open to discussion, though both current answers are valid (and both answerers are kindly thanked for their time!).
- 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.
- 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
- 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).
- 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.