Hot
- ClawXiv package on MikTeXby Sebastiano on April 25, 2026 at 12:08 pm
I can’t really understand how this package works. When I miss some .sty files related to a package on CTAN, MikTeX asks me and I authorise the installation. I have the following error. ! LaTeX Error: File `clawxiv.sty' not found. Type X to quit or <RETURN> to proceed, or enter new name. (Default extension: sty) Enter file name: \documentclass[12pt]{article} \usepackage{clawxiv} \begin{document} \begin{seniorquote}{25 aprile 2026}{}[] My test \end{seniorquote} \end{document}
- Images plus spacer to fit exactly text widthby user1850133 on April 25, 2026 at 11:34 am
How can I fill horizontally the whole space with e.g. 2 images and a spacer in between? Here's my try using \textwidth, but it crosses the text area. \documentclass[a4paper]{article} \usepackage{graphicx} \usepackage[showframe]{geometry} \setlength\parindent{0pt} \begin{document} \includegraphics[width=.45\textwidth]{example-image-9x16} \hspace{.1\textwidth} \includegraphics[width=.45\textwidth]{example-image-9x16} \end{document}
- How can I use Lua syntax inside a pgfkeys key, and load that from Lua so I can later print it's descendents to TeX?by Jasper on April 25, 2026 at 9:34 am
How can I use Lua syntax inside a pgfkeys key, and load that from Lua so I can later print it's descendents to TeX? This MWE looks ridiculous, but don't laugh! It's actually designed to show the type of behaviour I want to enable. That is, I want to have lua syntax highlighting in certain keys when I set them, and lua category codes too. I think it would be a really beautiful thing. \documentclass{article} \usepackage{jasper} \begin{document} \setobject[nice = { -- this is some lua syntax local with = "a \\par!" local wow = "!" -- I want to use the % operator too local test = 5 % 2 tex.sprint(test) -- blah return 7 }] \end{document} \NeedsTeXFormat{LaTeX2e}[1994/06/01] \ProvidesExplPackage{jasper}{1994/04/05}{v1.0.0}{ LuaLaTeX package for a question about pgfkeys and Lua. } \RequirePackage{tikz} \tikzset{ /jasper/.is~family ,/jasper/.cd ,nice/.code = {\protected@edef\jasper@nice{#1}} } \lua_load_module:n { George } \NewDocumentCommand { \setobject } {o} { \group_begin: \tikzset{ /jasper/.search~also = {/tikz} ,/jasper/.cd ,#1 } \__jasper_setobject: \group_end: } local function register_tex_cmd(name, func, args, protected) name = "__jasper_" .. name .. ":" .. ("n"):rep(#args) local scanners = {} for _, arg in ipairs(args) do scanners[#scanners+1] = token['scan_' .. arg] end local scanning_func = function() local values = {} for _, scanner in ipairs(scanners) do values[#values+1] = scanner() end func(table.unpack(values)) end local index = luatexbase.new_luafunction(name) lua.get_functions_table()[index] = scanning_func if protected then token.set_lua(name, index, "protected") else token.set_lua(name, index) end end local function body_expression(str) return load(str, "expression", "t", _G)() end local function set_object(hash) local object = body_expression(hash.object) local name = hash.name lua_tikz3dtools.math[name] = object end register_tex_cmd("setobject", function() set_object{ nice = token.get_macro("jasper@nice"), } end, { })
- pgf-PeriodicTable: usage of 'cell width' / 'cell height' ruins the layoutby cis on April 25, 2026 at 8:55 am
I want a full-page periodic table - in height and width! (Because I want to add external graphics as an overlay to the cells. That means a simple/artificial enlargement using scalebox or something similar is not useful.) As a test, I tried: cell width=40pt, cell height=50pt, but it ruins the layout (icons and text overlap or shift). What do I have to do? \documentclass[]{article} \usepackage[ showframe=true, a4paper, landscape, margin=10mm, ]{geometry} \usepackage{pgf-PeriodicTable} \begin{document} \noindent\pgfPT[ cell width=40pt,% example from manual, p. 22 cell height=50pt,% example from manual, p. 22 name font=\normalfont, show title=false, show legend=false, ] \end{document}
- MakeGlossaries failure: how to investigate what causes the failure?by Evan Aad on April 25, 2026 at 4:57 am
Several years ago I wrote a very long LaTex document, named Detailed.tex, complete with a bibliography, and an index, and a glossary. The file starts with several arara commands: % arara: clean: { extensions: [aux, bbl, bcf, blg, glg, glo, gls, idx, ilg, ind, ist, log, out, run.xml, slnc, tex~, toc] } % arara: lualatex % arara: biber % arara: makeglossaries % arara: lualatex % arara: makeglossaries % arara: lualatex Back then, when I ran arara Detailed the document compiled successfully. However, when I run this command now, the compilation fails when processing the glossary: (LuaLaTeX) LuaLaTeX engine .............................. SUCCESS (Biber) The Biber reference management software ......... SUCCESS (MakeGlossaries) The MakeGlossaries software ............ FAILURE I don't see any error message inside Detailed.log. There is no file named Detailed.glg. I don't know how to proceed to resolve this issue. Help will be greatly appreciated.
- How to draw steographically projected Clifford parallels?by Jasper on April 25, 2026 at 2:11 am
I want to draw that cool diagram by Penrose in twistor theor; it's supposed to be composed of steographically projected Clifford parallels. credit: https://www.eurekalert.org/multimedia/928836 Not this Clifford: But rather this one: I attempted to try it myself, as I am fond of stereographic projection. However, I have never studied Clifford tori. I have no basis to check is my work is actually based on Clifford parallels. I only made tori using regular old stereographic projection. I don't know if this is right. This is the MWE I made. It uses my package, which can be downloaded from github. \documentclass[tikz,border=1cm]{standalone} \usepackage{lua-tikz3dtools} % https://github.com/Pseudonym321/TikZ-Animations/tree/master1/TikZ/lua-tikz3dtools \begin{document} \foreach \CCC in {5,10,...,25} { \begin{tikzpicture} \useasboundingbox (-5,-5) rectangle (5,5); \appendlight[v = {return Vector:new{1, 1, 1 , 1}}] \def\SSS{3} \foreach \AAA in {0,30,60} { \pgfmathsetmacro{\AAA}{\AAA+\CCC} \setobject[ name=a,object={\AAA*pi/180} ] \setobject[ name=R, object={1/cos(a)} ] \setobject[ name=r, object={sqrt(abs(1/cos(a)^2)-abs(cos(a)))} ] \setobject[ name=view, object = {Matrix.zyzrotation3(pi/2, pi/3, pi/6)} ] \pgfmathtruncatemacro{\BBB}{((\AAA-10)*10/7)} \appendsurface[ ustart={pi/2}, ustop={-pi}, usamples= 20, vstart=0, vstop=tau, vsamples= 50, transformation = {return view}, v = { return Vector.hsphere3(u, v, r) :hadd(Vector:new{R*cos(u), R*sin(u), 0, 1}) }, filter = { local M = A:hadd(B):hadd(C):hscale(1/3):multiply(view:inverse()) return abs(M[1]) < \SSS.001 and abs(M[2]) < \SSS.001 and abs(M[3]) < \SSS.001 }, fill options = {fill={gray!\BBB!black!50!ltdtbrightness},fill opacity = 1}, curve = { local segments = {} local domain_origin = pi/2 local branches = 7 local samples_per_branch = 40 local samples = branches*samples_per_branch local step = tau/samples local function append_segment(s0, s1) if s1 <= s0 then return end local wrap = floor(branches*s0/tau + 1e-9) local u0 = domain_origin - s0 local u1 = domain_origin - s1 local v0 = branches*s0 - wrap*tau local v1 = branches*s1 - wrap*tau table.insert(segments, { Vector:new{u0, v0}, Vector:new{u1, v1}, drawoptions = "draw = green!50!black, thick" }) end for i = 0, samples - 1 do local s0 = i*step local s1 = s0 + step local wrap0 = floor(branches*s0/tau + 1e-9) local wrap1 = floor(branches*s1/tau + 1e-9) if wrap0 == wrap1 then append_segment(s0, s1) else local seam = (wrap0 + 1)*tau/branches append_segment(s0, seam) append_segment(seam, s1) end end return segments } ] } % ends foreach \appendsolid[ ustart=-\SSS, ustop=\SSS, usamples= \SSS, vstart=-\SSS, vstop=\SSS, vsamples= \SSS, wstart=-\SSS, wstop=\SSS, wsamples= \SSS, transformation = {return view}, filter = {return false}, v = {return Vector:new{u, v, w, 1}} ] \displaysimplices \end{tikzpicture}} % ends \CCC \end{document}
- Is there a way to add a local environment variable to latex workshop?by abgup on April 25, 2026 at 12:14 am
Specifically add another $TEXINPUTS path. I tried adding it locally via terminal and in vscode, but seems to not connect to latex workshop build, but will work in terminal using latexmk cli.
- How to test a string value with tabularray and functional? (target: coloring table cells according to their text content)by quark67 on April 24, 2026 at 10:31 pm
The tabularray package provides in his manual an example of testing integers values of a table for coloring background according to the value, positive or negative. \documentclass{article} \usepackage{xcolor} \usepackage{tabularray} \UseTblrLibrary{functional} \begin{document} \IgnoreSpacesOn \prgNewFunction \colorBack {} { \intStepOneInline {1} {\arabic{rowcount}} { \intStepOneInline {1} {\arabic{colcount}} { \intSet \lTmpaInt {\cellGetText {##1} {####1}} \intCompareTF {\lTmpaInt} > {0} {\cellSetStyle {##1} {####1} {bg=purple8}} {\cellSetStyle {##1} {####1} {bg=olive8}} } } } \IgnoreSpacesOff \begin{tblr}{hlines,vlines,cells={r,$},process=\colorBack} -1 & 2 & 3 \\ 4 & 5 & -6 \\ 7 & -8 & 9 \\ \end{tblr} \end{document} But how to do the same, when the table contains the words Yes (light green background) and No (light red background)? First step, replacing \intSet \lTmpaInt {\cellGetText {##1} {####1}} with \strSet \lTmpaStr {\cellGetText {##1} {####1}} Second step, replacing \intCompareTF with \strCase (\strCase and \intCompareTF are described in the functional manual). So, in theory, this is working: \documentclass{article} \usepackage{xcolor} \usepackage{tabularray} \UseTblrLibrary{functional} \begin{document} \IgnoreSpacesOn \prgNewFunction \colorBack {} { \intStepOneInline {1} {\arabic{rowcount}} { \intStepOneInline {1} {\arabic{colcount}} { \strSet \lTmpaStr {\cellGetText {##1} {####1}} \strCase {\lTmpaStr} { {No} {\cellSetStyle {##1} {####1} {bg=red!20}} {Yes} {\cellSetStyle {##1} {####1} {bg=green!20}} } } } } \IgnoreSpacesOff \begin{tblr}{hlines,vlines,process=\colorBack} Yes & No & No \\ No & No & Yes \\ No & Yes & No \\ \end{tblr} \end{document} But the result is a table with a white background: If I replace: \strSet \lTmpaStr {\cellGetText {##1} {####1}} with the simplier: \strSet \lTmpaStr {No} in theory, all cells have a light red background. This gives this code: \strSet \lTmpaStr {No} \strCase {\lTmpaStr} { But no, they are all white. In the functional manual, I read: So, \lTmpaStr is a string no? And the manual also says: So why isn't the code: \strCase {\lTmpaStr} { {No} {\cellSetStyle {##1} {####1} {bg=red!20}} {Yes} {\cellSetStyle {##1} {####1} {bg=green!20}} correct? Where is the mistake? How coloring background cells according to the value of the cells (obtained with \cellGetText {##1} {####1}) This question is focused to the tabularray package. So I hope that coloring background according to the text content in the cells is possible with tabularray.
- Improved visualization of the domains of integration in ℝ³by Sebastiano on April 24, 2026 at 9:26 pm
Before of this question, I would like to thank the authors of the answers and everyone who appreciated my question. I had previously created these two figures related to two triple integrals. Is there a better way to improve their presentation and make them clearer and more visually appealing? T={(x, y, z) ∈ ℝ³: (x²+y²)¹/² ≤ z ≤ 1}. \documentclass[12pt]{article} \usepackage{tikz,tikz-3dplot} \begin{document} \begin{center} \tdplotsetmaincoords{60}{130} \begin{tikzpicture}[tdplot_main_coords,scale=3] \pgfmathsetmacro{\h}{0.6} \pgfmathsetmacro{\raggio}{\h} \draw[thick,->] (0,0,0) -- (1.5,0,0) node [below left] {\footnotesize$x$}; \draw[dashed] (0,0,0) -- (-1.5,0,0); \draw[thick,->] (0,0,0) -- (0,1.5,0) node [right] {\footnotesize$y$}; \draw[dashed] (0,0,0) -- (0,-1.5,0); \draw[thick,->] (0,0,1.0) -- (0,0,1.5) node [above] {\footnotesize$z$}; \draw[dashed] (0,0,0) -- (0,0,1.0); \foreach \altura in {0.01,0.02,...,1.0}{ \draw[cyan,opacity=0.5] plot[domain=0:2*pi,smooth,variable=\t] ({\altura*cos(\t r)},{\altura*sin(\t r)},{\altura}); } \draw[blue,thick,fill=brown!50,opacity=0.6] plot[domain=0:2*pi,smooth,variable=\t] ({\raggio*cos(\t r)},{\raggio*sin(\t r)},{\h}); \draw[dashed,fill=yellow,opacity=0.4] plot[domain=0:2*pi,smooth,variable=\t] ({\raggio*cos(\t r)},{\raggio*sin(\t r)},0); \foreach \t in {0,10,30,60,90,120,150,250,280,310}{ \draw[black,dashed,thin,opacity=0.7] ({\raggio*cos(\t)},{\raggio*sin(\t)},{\h}) -- ({\raggio*cos(\t)},{\raggio*sin(\t)},0); } \fill[gray,opacity=0.1] (-1.2,-1.2,\h) -- (1.2,-1.2,\h) -- (1.2,1.2,\h) -- (-1.2,1.2,\h) -- cycle; \draw[red,very thick] (0,0,\h) -- (0,\raggio,\h); \node at (0,1.5,\h) {\small $z=h$}; \node at (0,0.5,0.75) {\small $z$}; \node at (0,0.25,-0.35) {\small $T(z=0)$}; \node at (0,.75,1.3) {\small $T(z=h)=T(z)$}; \end{tikzpicture} \end{center} \end{document} C= {(x,y,z)∈ ℝ³: z∈ [0, 2], x²+ y²≤ z} \documentclass[12pt]{article} \usepackage{tikz,tikz-3dplot} \begin{document} \begin{center} \tdplotsetmaincoords{70}{130} \begin{tikzpicture}[tdplot_main_coords,scale=2.5] \pgfmathsetmacro{\h}{.6} \pgfmathsetmacro{\raggio}{sqrt(\h)} \draw[thick,->] (0,0,0) -- (1.5,0,0) node [below left] {$x$}; \draw[thick,->] (0,0,0) -- (0,1.5,0) node [right] {$y$}; \draw[thick,->] (0,0,0) -- (0,0,1.5) node [above] {$z$}; \draw[red,very thick] plot[domain=-1:1,smooth,variable=\t] (0,{\t},{\t*\t}); \draw[blue,fill=yellow,opacity=0.4] plot[domain=0:2*pi,smooth,variable=\t] ({\raggio*cos(\t r)},{\raggio*sin(\t r)},{\h}); \draw[fill=yellow,dashed,opacity=0.5] plot[domain=0:2*pi,smooth,variable=\t] ({\raggio*cos(\t r)},{\raggio*sin(\t r)},{0}) node [above] {\tiny $C(z)$}; \foreach \t in {0,10,...,350}{ \draw[gray, dashed, thin,opacity=0.4] ({\raggio*cos(\t)},{\raggio*sin(\t)},{\h}) -- ({\raggio*cos(\t)},{\raggio*sin(\t)},0); } \foreach \altura in {0.0125,0.025,...,1.0}{ \pgfmathsetmacro{\radio}{sqrt(\altura)} \draw[cyan,thick,opacity=0.5] plot[domain=0:2*pi,smooth,variable=\t] ({\radio*cos(\t r)},{\radio*sin(\t r)},{\altura}); } \fill[orange!30,opacity=0.4] (-1,-1,\h) -- (1,-1,\h) -- (1,1,\h) -- (-1,1,\h) -- cycle; \draw[blue,very thick] (0,0,\h) -- (0,{\raggio},\h); \node[black, above right] at (0,{\raggio/2},\h) {\tiny $\sqrt{z}$}; \draw[blue,fill=yellow,dotted,thick,opacity=0.4] plot[domain=0:360,smooth,variable=\t] ({\raggio*cos(\t)},{\raggio*sin(\t)},{\h}); \draw[blue!80,thick] plot[domain=0:2*pi,smooth,variable=\t] ({cos(\t r)},{sin(\t r)},{1.0}); \end{tikzpicture} \end{center} \end{document}
- How are tone letters defined internally in T3? [closed]by Grzegorz Brzęczyszczykiewicz on April 24, 2026 at 8:34 pm
There are component parts used to build them in the T3 encoding chart, but how are they exactly built? There are 5 distinct heights, which should means 25 parts used to build tones (or 50 when short variants are included). But there are only 9 (18) parts. This must mean the program that generates the tone letters has to reposition them vertically. But how does it know the exact value of repositioning? If it raises a component piece too much, it will look jagged and uneven.
- Ungrouped alternatives to \foreach which are still canonical to use with tikzby Jasper on April 24, 2026 at 7:51 pm
Are there ungrouped alternatives to \foreach which are still canonical to use with tikz? I need to define a color in a loop and use it outside. Maybe expl3? \documentclass{article} \usepackage{pgffor,xcolor} \begin{document} \foreach \i in {1,2} {\colorlet{blah}{blue!\i}} \textcolor{blah}{blah} \end{document}
- Why does babel warn about missing small caps font for an inactive language?by niru on April 24, 2026 at 6:14 pm
With babel's onchar option, one can set fonts for multiple languages as can be seen in the following example: \documentclass{article} \usepackage{babel} \babelprovide[main,import,onchar=ids fonts]{english} \babelfont{rm}{NewCM10-Book.otf} \babelfont{sf}{NewCMSans10-Book.otf} \babelfont{tt}{NewCMMono10-Book.otf} \babelprovide[import,onchar=ids fonts]{malayalam} \babelfont[malayalam]{rm}{RIT-Rachana-Regular.ttf} \babelfont[malayalam]{sf}{RIT-MeeraNew.ttf} \babelfont[malayalam]{tt}{RIT-tnjoy-regular.ttf} \begin{document} \textsc{hii} മലയാളം \end{document} This code produces: LaTeX Font Warning: Font shape `TU/RIT-Rachana-Regular.ttf(0)/m/sc' undefined (Font) using `TU/RIT-Rachana-Regular.ttf(0)/m/n' instead on input line 13. I understand that this font doesn't have small caps which is why the warning is issued, but what I do not understand is that the main language of the document is english. As per the warning, \textsc, on line 13, is issued when there is no way Malayalam would be active; then why does the font warning for Malayalam's font appear? By the way, the warning goes if I add [SmallCapsFont=RIT-Rachana-Regular.ttf] to the font declaration. This warning is quite pointless as despite declaring the small caps font for Malayalam, the actual small caps text is (correctly) printed with English's font. Then... why?
- AUCTeX/RefTeX: How do I handle labels that are arguments of a macro?by jjramsey on April 24, 2026 at 1:12 pm
I'm working with an employer-provided LaTeX class where the tables and figures are handled in macros rather than environments, i.e, something like this: \ExampleFigMacro{fig:myfiglabel}{myfigure}{mycaption} If this were an environment, I'd try the solution discussed at https://tex.stackexchange.com/a/464901/195164, but this is just a macro. Is there a way to get AUCTeX to recognize that macro and extract fig:myfiglabel so that it can be used by RefTeX?
- Tikz pie chart with unitsby Thomas on April 24, 2026 at 1:07 pm
I have a pie chart representing a distribution of hours, and I'm using the option sum=auto to display the chat by these values. But I'd like to add the unit of the values inside the plot. If I type 12~h/Maths it raises error because LaTeX tries to compute the percentages. How could I achieve it ? \documentclass{article} \usepackage{pgf-pie} \begin{document} \begin{tikzpicture} \pie[sum = auto]{ 12/Maths, 9/Physique-Chimie, 2/Informatique, 2/TIPE, 2/Français } \end{tikzpicture} \end{document}
- Songbook with chordsby Cupora on April 24, 2026 at 12:58 pm
I'm about to make a guitar song book with LaTeX, which means, song lyrics with chords written above the lines: Gm Remember when you were young, Gb Bb You shone like the sun. Eb Dm Cm Bb F Shine on you crazy diamond. I found several packages doing this, and also some other ideas for custom LaTeX commands (for example here). However, I do not like the way the chords are added to the lyrics, since one needs to integrate the chord commands into the song lyrics: \chord{Eb}Shine\chords{Dm} y\chord{Cm}ou cr\chord{Bb}azy di\chord{F}amond which is a hell lot of work to format the lyrics copied from some website. I would prefer to be able to format the lines similar to this: \textlinewithchords{Eb Dm Cm Bb F}{^Shine^ y^ou cr^azy di^amond} so that the lyrics just contain the placeholders for the chords, and the chords input is separated. I would be glad if somebody had an idea how I could implement this behaviour 🙂
- Correct accented characters in pdf with pdflatex/OT1?by Alain Stalder on April 24, 2026 at 12:17 pm
I think this deserves its dedicated question even though the answer might be that it is not possible except with changes to tex sources or postprocessing the pdf, which both would appear to be major projects (at least for me with little specific prior coding knowhow around that)… Example: \DocumentMetadata{lang=en, pdfstandard=ua-2, pdfstandard=a-4f, tagging=on} \documentclass{article} \usepackage[noTeX]{mmap} \usepackage[OT1]{fontenc} \renewcommand{\familydefault}{\sfdefault} \begin{document} The [Loránd] Eötvös experiment was a physics experiment that measured the correlation between inertial mass and gravitational mass, demonstrating that the two were one and the same, something that had long been suspected but never demonstrated with the same accuracy. (Wikipedia) \end{document} When I copy text from the resulting pdf I get a text that starts with this: The [Lora´nd] Eo¨tvo¨s Similarly when I do show-pdf-tags --xml test.pdf I get this in the text with additional linebreaks <br> added for visibility (the fusing of words at end and beginning would be a separate issue): <?MarkedContent page="1" ?>The [Lora´nd] Eo¨tvo¨s experiment was a physics experiment that<br> measured thecorrelation between inertial mass and gravitational mass, <br> demonstrating that thetwo were one and the same, something that had long<brd> been suspected but neverdemonstrated with the same accuracy. (Wikipedia) Since the output is based on the OT1 character encoding, it puts a ¨ above an a to write an ä. (And, yes, with T1 character encoding you don't have that problem, nor with XeLaTeX and LuaLaTeX (Unicode), but since I am also using modes.mf pdflatex/OT1 is the only way so far that gives me sufficiently great typographical results for my purposes and tastes, as far as I can see mainly because anything beyond that lacks the METAFONT mechanisms for giving existing fonts a bit more weight in a sophisticated way.) Is there a way to fix this maybe with existing tex packages? For example, the mmap package I used above in the example (or I could also have used cmap) resolved the issue with ligatures, for example fl would now end up as two letters fl in the resulting pdf. Other than what might already be possible within TeX/LaTeX, I see in principle two ways in which this might be addressed: Provide some mechanism that could be applied in the code that is used by pdflatex/OT1 for rendering a pdf such that in the resulting pdf the two characters would be combined into one, I guess something like wrap them into a /ActualText span in the “normal” pdf text and just replace in the tagged texts, but I suspect that would not be trivial due to the structure of the code, etc. Post-process the resulting pdf with some code in some language. I do not know much about that specifically, but I gather that especially with tagged pdfs and the standards they would have to implement this might not be easy. For now my approach is just to essentially use the above approach from the example, which has the effect (besides the fusing of words) that my articles especially in German will likely not be found so well via search engines (and are less accessible).
- LaTeX pdf viewer of VS Code refresh seems to kill go to sourceby coxehj4142 on April 24, 2026 at 11:55 am
I'm a Windows user with miktex (with perl from Git installation) and recently trying to move from texmaker to VS Code Latex Workshop 10.14.0. The "go to source" by ctrl+click(or I've tried changing it to double-click too) seems to have issues related to the internal PDF viewer of VS code. When I open the pdf viewer after the build, both "go to pdf" and "go to source" work fine. But when I refresh my viewer by ctrl+alt+p and choosing "LaTeX Workshop: refresh all LaTeX PDF viewers" option, or re-build while the PDF viewer is opened, then suddenly "go to source" stops working, and only "go to pdf" works. However, at this moment, when I close and re-open the internal PDF viewer tab, then even without further builds the "go to source" begins to work again. I've checked that .synctex.gz (or .synctex on "-synctex=-1") updates even when the viewer is open, but it seems that it is the viewer that is not reading the changed synctex file properly. My build uses latexmk: "name": "latexmk", "command": "latexmk", "args": [ "-synctex=1", // tried -1 too "-interaction=nonstopmode", "-file-line-error", "-pdf", // "-recorder", // "-outdir=%OUTDIR%", // tried this without success "%DOCFILE%" //tried "%DOC%" too ] And I've also tried (single and double) pdflatex: "name": "pdflatex", "command": "pdflatex", "args": [ "-synctex=1", "-interaction=nonstopmode", "-file-line-error", "-recorder", "%DOCFILE%" ] I've also tried changing the following variables, but all true-falses or using defaults didn't fix the problem: "latex-workshop.latex.watch.pdf.delay": 1500, "latex-workshop.synctex.afterBuild.enabled": true, "latex-workshop.view.outline.sync.viewer": true, "latex-workshop.view.pdf.viewer": "tab", // with this fixed "latex-workshop.view.pdf.internal.synctex.keybinding": "double-click" I'd like to stick to the internal viewer as far as possible at this moment, if the problem can be resolved. I’d really appreciate any thoughts on what might be causing this.
- How to control "Attributes" added by tagpdf?by niru on April 24, 2026 at 11:30 am
I am compiling a document with the following minimal setup: \DocumentMetadata{tagging=on,lang={en-GB}} \documentclass{article} \usepackage{lua-unicode-math} \begin{document} quack \end{document} When I check show-pdf-tags mwe.pdf, it generates: Document (http://iso.org/pdf2/ssn): └─text-unit (https://www.latex-project.org/ns/dflt) / Part (http://iso.org/pdf2/ssn): └─text (https://www.latex-project.org/ns/dflt) / P (http://iso.org/pdf2/ssn): ┝━━Attributes: │ └/Layout: │ └TextAlign: "Justify" └─Marked content on page 1: quack I want to know what Attributes:, Layout: and TextAlign: "Justify" are and how I can control them. Is there any way I can remove this from the output?
- Subscripts with capital lettersby Guran Semiotovic on April 24, 2026 at 9:46 am
I'm aware that similar questions are addressed elsewhere, but I have not found the answer that I am looking for. I am in a situation where: Even though this is not a choice I enjoy, I must use a capital J as a subscript. Expressions such as $u_J$, $P_J$, $\mu_{J+1}$, $\lambda_{J+1}$ are present in many parts of the paper I am writing, hence in most symbols J appears as a subscript of a lowercase letter. Other subscripts are with lower case letters, so I will also have $u_J(t_n)$, $K_m$, etc. I am looking for good practices to make the document look decent, and to do that consistently, possibly with one or more macros, if that is necessary. As I said, I would rather not take this path, but the compromises above are unavoidable. I have read in several posts about: using scriptsize changing default size for all subscripts keeping things as they are using a ghost superscript such as $u^{}_J$. Would you be up for going again through these choices with me, and expose pros and cons of them, and perhaps proposing alternatives? I can not cope well with how ugly $u_J$, $\mu_{J + 1}$ look. I know that some of these are a matter of taste, but I'm trying to find a decent solution that will make my subscripts look harmonious. You can use this minimal document if you want \documentclass{article} \begin{document} \[ u_J, u_{J+1} \qquad u_J(t_n), \qquad u_{J,M}(t_n) \qquad, P_J, \qquad P_{J, M} \] \end{document}
- European Computer Modern-like font that allows for bold italic smallcaps (textsc)?by canIchangethis on April 24, 2026 at 8:40 am
I would love to have bold, italicised small caps in my LaTeX document, using T1 encoding and, ideally, a font as close as possible to European Computer Modern. And I would like to only redefine \textbf{\textit{\textsc{}}} so that I can use smallcaps in italic and bold from another font. Related, I found this older question: https://tex.stackexchange.com/a/746482/114622 Thus, this is my MWE, which doesn't work, as in, it produces the warning: Font shape `T1/cmr/bx/scit' undefined \documentclass{article} \usepackage[T1]{fontenc} begin{document} \begin{center} \textbf{\textit{\textsc{my text}}} \end{center} \end{document}
- Why the note is wrongly placed?by iago on April 24, 2026 at 8:00 am
Why the F note is wrongly placed, taking into account as documentation specifies? My code (removing spaces after ovbkt and wh, or including 6 in {} does not changes the output): \documentclass[a4paper]{article} \usepackage[utf8]{inputenc} \usepackage[left=2.5cm, right=2.5cm]{geometry} \usepackage[english]{babel} \usepackage{musixtex} \def\nnotes{\vnotes1.6\elemskip} \begin{document} \begin{music} \parindent10mm% \instrumentnumber{1}% \setstaffs1{1}% \setclef1{60}% \nobarnumbers% \startextract% \nnotes\ovbkt {{'E}}{1}6\cchar{-5}{$F2$}\wh {F}\en% \zendextract \end{music} \end{document} And the output: But, I would expect the note an octave below, the same as where F is placed in page 148 of https://mirrors.ctan.org/macros/generic/musixtex/doc/musixdoc.pdf, If I use L instead of 'E for the overline, it compiles as it is expected. But I understand both are interchangeable.
- How to define new babel strings for a custom document class, if I can't load babel twice?by Alessandro Bertulli on April 24, 2026 at 7:40 am
I thought this would be trivial but apparently I can't find the idiomatic answer. I am writing a custom class using modern LuaLaTeX, and searching online and on the babel manual I understood that the "modern" way that babel uses to define new captions is something like: \StartBabelCommands*{english}{captions} \SetString{\attachmentsname}{Attachments} \SetString{\changesname}{List of changes} \StartBabelCommands*{italian}{captions} \SetString{\attachmentsname}{Allegati} \SetString{\changesname}{Lista di modifiche} \EndBabelCommands However, I couldn't find online how to let the user use it: if I don't load \RequirePackage{babel} in the .cls file, the command \StartBabelCommands is not defined if I do load it, then the \usepackage[english]{babel} in the .tex file triggers an error LaTeX Error: Option clash for package babel. So I am stuck: how should I allow both the .cls and the .tex file load babel? And more generally, is this the correct, modern and idiomatic way to provide localization for a new LaTeX class/package?
- coding a book cover color and titleby Nate on April 24, 2026 at 2:45 am
I am planning to write a book (using the book class) that has both a physical and digital version. In the physical version I am planning to use the bookcover package to create the following: while having the front cover as the first page of the pdf: What is the best way to code this flexibly so it can be adapted to both versions? (I used Word to create these examples.)
- pgf-PeriodicTable: produce a gap at La and Acby cis on April 24, 2026 at 1:36 am
How could I create a gap here (as seen sometimes)? \documentclass[landscape]{article} \usepackage[margin=11mm]{geometry} \usepackage{pgf-PeriodicTable} \tikzset{every picture/.append style={remember picture}} \begin{document} \pgfPT[ show title=false, show legend=false, IUPAC=false,% puts La and Ac above ] % Test \begin{tikzpicture}[remember picture, overlay] \node[fill, inner sep=0pt, minimum size=2mm, cyan, text=red] at (3.center) {UL}; \end{tikzpicture} \end{document}
- Is \textit now long, instead of short?by rallg on April 24, 2026 at 1:25 am
In the past, something such as \textit{this\par that} would throw an error, because the \textit command was "short" (it could not span paragraphs). But I now see (TeXlive 2026) that is is "long" (can span paragraphs). This is verified by inspecting code in file latex.ltx even though that file is not necessarily loaded. Even AI did not know that! Or did I hack something, and forgot about it?
- Next odd-numbered physical pageby Elayson Abreu on April 23, 2026 at 7:19 pm
I need to create a page break command called \nextoddphysicalpage that moves the current point to the next odd-numbered page, considering the physical numbering of the document, not the logical numbering. My near-solution was based on the \checkoddpage command, but it takes into account the logical numbering, not the physical one: \documentclass{article} \usepackage[strict]{changepage} \def\checkifodd{\checkoddpage \ifoddpage Odd\else Even\fi} \addtocounter{page}{1} \begin{document} Logical page: \checkifodd. \end{document}
- how to embed a domain curve in a parametric surface using luaby Jasper on April 23, 2026 at 12:07 pm
Here's what I'm thinking. Let's take a rectangular parameter domain, and embed a curve in it. Then, let's break it apart into triangles, and keep the subpaths inside each triangle, relative to it's affine coordinate system. Then, after partitioning and occlusion sorting, we can draw each triangle, and then it's embedded path(s). This technique would make the following diagram more beautiful. I'm open to alternative approaches too, as I'm aware that it's possible in other ways (see Howard Anton's calculus). I believe this should be achievable in TeX, using Lua. Look how improperly occluded the following diagram is in this regard: Notice: I wrote this package \documentclass[tikz,border=1cm]{standalone} \usepackage{lua-tikz3dtools} % https://github.com/Pseudonym321/TikZ-Animations/tree/master1/TikZ/lua-tikz3dtools \begin{document} \begin{tikzpicture} \setobject[ name = view, object = {Matrix.zyzrotation3(pi/2, pi/3, pi/6)} ] \appendlight[ v = {return Vector:new{1, 1, 1, 1}} ] \foreach \i in {0,1} { \appendsurface[ ustart = 0, ustop = tau, vstart = -tau, vstop = tau, usamples = 30, vsamples = 10, v = {return Vector:new{cos(u), sin(u), v, 1}:multiply(Matrix.zyzrotation3(0,\i*pi/2,0))}, transformation = {view}, fill options = {fill = white!50!ltdtbrightness} ] \appendcurve[ ustart = 0, ustop = tau, usamples = 100, transformation = view, v = {return Vector:new{cos(3*u), sin(3*u), 2*u - tau, 1}:multiply(Matrix.zyzrotation3(0,\i*pi/2,0))}, draw options = { line join = round, line cap = round, line width = 2pt, draw = red } ]} \displaysimplices \end{tikzpicture} \end{document} edit: I would like to embed line segments in triangles, causing the machine to output something like this: \documentclass[tikz,border=1cm]{standalone} \begin{document} \begin{tikzpicture}[scale = 5] % magnification to see better % I want to start with a triangle \filldraw[ fill = red, line width = 5pt, line join = round ] (0,0) -- (1,0) -- (1,1) -- cycle; % then dray sub-paths in it, cleanly \draw[ line width = 3pt, line cap = round ] (0.5,0) -- (0.75,0.6) (0.75,0.6) -- (1,0.5) ; \end{tikzpicture} \end{document} Edit 2: I was working on this on my own a bit, but the line segment thickness causes problems with overlapping nearby triangles.
- calculating tangent vectors with partial derivativesby Jasper on April 23, 2026 at 1:57 am
I wanted to try calculating some tangent vectors for a picture, just for fun. This requires taking partial derivatives. It will be some time before I can automate partial derivatives algebraically for illustrations, even though it is a long term goal of mine. In the meantime, I want to see how people would suggest I approximate them. \documentclass[tikz,border=3.14mm]{standalone} \usepackage[3d]{luadraw}%https://github.com/pfradin/luadraw \begin{document} \begin{luadraw}{name=tangent} local g = graph3d:new{viewdir={30,60}, window={-4,4,-3,7}, size={12,12}, bbox=false} local f = function(u, v) return M( 3*math.cos(u)+math.cos(u)*math.sin(v), 3*math.sin(u)+math.sin(u)*math.sin(v), u+math.cos(v)) end -- local dfdu = ??? -- local dfdv = ??? local S = surface(f, 0, 2*math.pi, 0, 2*math.pi) g:Dfacet(S, {mode=mShadedOnly,color="blue"}) g:Show() \end{luadraw} \end{document}
- Separate cases for real part and imaginary part [closed]by Tom Huntington on April 22, 2026 at 11:38 pm
I am trying to recreate I want it working in github markdown, but github markdown doesn't support this trick Missing or unrecognized delimiter for \right \left. aaaa \right\} Edit Github requires you to use \lbrace and \rbrace \left. aaaa \right\rbrace
- Plot a domain in 3D with TikZ for a triple integralby Sebastiano on April 20, 2026 at 9:59 pm
I have to solve this triple integral ∭ x y|z|³/(1+ (x²+y²)⁴) dx dy dz, with a domain T={(x, y, z) ∈ ℝ³: x ≤ 0, y ≥ 0, z² ≤ x²+y² ≤ 1}. Plotting with DESMOS 3D I see this: Actually I am not able to visualise this domain in my mind. It should be a cylinder enclosed by a double-sloped cone, but I can’t quite get the x ≤ 0, y ≥ 0 parameters right. I’ve created something but I would like my drawing (or a new one) to be intuitive with TikZ3D so that I can correctly draw this integral. My MWE: \documentclass[12pt]{article} \usepackage{tikz} \usepackage{tikz-3dplot} \tdplotsetmaincoords{60}{130} \begin{document} \begin{tikzpicture}[tdplot_main_coords, scale=3] % assi \draw[->] (0,0,0) -- (1.3,0,0) node[right]{$x$}; \draw[->] (0,0,0) -- (0,1.3,0) node[left]{$y$}; \draw[->] (0,0,0) -- (0,0,1.3) node[above]{$z$}; \foreach \t in {0,1,...,359}{ \pgfmathsetmacro{\ct}{cos(\t)} \pgfmathsetmacro{\st}{sin(\t)} \draw[blue!60, opacity=0.75] (0,0,0) -- plot[domain=0:1, samples=40] ({\x*\ct},{\x*\st},{\x}); \draw[red!60, opacity=0.75] (0,0,0) -- plot[domain=0:1, samples=40] ({\x*\ct},{\x*\st},{-\x}); } \draw[thick] plot[domain=0:360, samples=200] ({cos(\x)},{sin(\x)},1); \draw[thick] plot[domain=0:360, samples=200] ({cos(\x)},{sin(\x)},-1); \end{tikzpicture} \end{document}