• Should I stay with the TeX Live 2023 snapshot, or should I switch to the 2025 version? (Overleaf)
    by SENTiNEL on March 4, 2026 at 11:01 am

    I maintain, expand, and refine a personal template that has become quite complex by now. Due to an issue in the 2024 snapshot, I skipped that version and would now like to move to the current 2025 release. When doing so, I encounter two warnings: Command \showhyphens has changed. Package tracklang Warning: No datatool support for dialect ngerman on input line 9908. I managed to reduce the behaviour to this short MWE, so I assume the warnings are not caused by the many new definitions and adjustments in my full template. I rely on both packages: % Overleaf, pdfLaTeX, TeX Live Version 2025 \documentclass[ngerman]{standalone} \usepackage{microtype}% "\showhyphens has changed." \usepackage{babel} \usepackage{datatool}% "No datatool support for dialect ngerman." \begin{document} MWE \end{document} From what I have found so far, the microtype message seems to be an informational notice rather than an actual warning. I also assume that the missing datatool-dialect support can be ignored, because I only sort my own labels, which do not include country‑specific symbols or similar characters. Does switching to the 2025 version offer any advantages (besides updated packages such as fontawesome7 instead of fontawesome5) that I would not get with the 2023 snapshot? I read that microtype has been improved further. I would prefer not to add a patch or something similar to my template just to address these warnings. If such a change becomes necessary, that would be a follow up question.

  • Luatex - Coloring Haraka
    by Mario Fischer on March 4, 2026 at 6:08 am

    I want to colour the harakat (diacritics) of a text in Pashto. I use Luatex, and I want to switch this function on and off. It should look like I tried this code: \documentclass{article} \usepackage{fontspec} \usepackage{xcolor} \usepackage{luacolor} \usepackage[bidi=basic]{babel} % Setup Arabic language \babelprovide[import, main]{arabic} % THE FIX: Use Renderer=Node instead of Harfbuzz \babelfont{rm}[Renderer=Node]{Amiri} % 1. The Lua Script \directlua{ harakat_attr_val = nil local luacolor_attr = luatexbase.attributes['luacolor'] local function color_harakat(head) if not harakat_attr_val then return head end for item in node.traverse_id(node.id("glyph"), head) do local char = item.char -- Unicode range for Arabic harakat (0x064B to 0x065F) -- and the superscript Alef (0x0670) if (char >= 0x064B and char <= 0x065F) or char == 0x0670 then node.set_attribute(item, luacolor_attr, harakat_attr_val) end end return head end % Add the filter so it runs before the font shaper luatexbase.add_to_callback("pre_linebreak_filter", color_harakat, "color_harakat") } % 2. Custom command to safely set the Harakat color \makeatletter \newcommand{\setHarakatColor}[1]{% \begingroup \color{#1}% \directlua{ harakat_attr_val = tex.attribute[luatexbase.attributes['luacolor']] }% \endgroup } \makeatother \begin{document} \begin{center} \Huge % Tell LuaTeX to color all following harakat Red \setHarakatColor{red} بِسْمِ اللَّهِ الرَّحْمَٰنِ الرَّحِيمِ \vspace{1cm} % Switch to blue! \setHarakatColor{blue} بِسْمِ اللَّهِ الرَّحْمَٰنِ الرَّحِيمِ \end{center} \end{document} But it is not coloring. What might be the problem, or is there an easy option in Luatex?

  • How to have bodymatter start on the next page after frontmatter regardless of left or right in a double-sided document?
    by Gary on March 4, 2026 at 3:56 am

    I apologize for asking what appears to be such a simple question, but would you please tell me what I'm missing to get the body matter to start on the next page immediately after the front matter ends? This example makes it a right-hand page, inserting a blank page on the left; and no option I have tried, thus far, changes that. Thank you. \setuppagenumbering[alternative=doublesided,location=] \starttext \startfrontmatter[page=right] Front matter. \stopfrontmatter \startbodymatter[] Body matter. \stopbodymatter \stoptext Added after receiving answer \setuppagenumbering[alternative=doublesided] %% Setup code, just for the demonstration. \setuppapersize[A9, portrait][A6, landscape] \setuppaper[nx=4, ny=2, offset=-1.5pt] \definepalet[layout][page=black] \showframe[page] \setuparranging[XY] %% Demonstration \starttext %% Before \setupfootertexts[Before] \startfrontmatter[page=yes] Front matter 1. \stopfrontmatter \startbodymatter[page=yes] Body matter 1.1. \pagebreak Book matter 1.2. \stopbodymatter \startfrontmatter[page=yes] Front matter 2. \stopfrontmatter \startbodymatter[page=yes] Body matter 2.1. \pagebreak Book matter 2.2. \stopbodymatter %% After \setupfootertexts[After] \startfrontmatter[page=yes] Front matter 1. \stopfrontmatter \startbodymatter[page=yes] Body matter 1.1. \pagebreak Book matter 1.2. \stopbodymatter \startfrontmatter[page=right] Front matter 2. \stopfrontmatter \startbodymatter[page=yes] Body matter 2.1. \pagebreak Book matter 2.2. \stopbodymatter \stoptext

  • How ow to access cells outside of the days of the month using tikz calendar?
    by Robert on March 3, 2026 at 9:25 pm

    how to create a calendar like the attached photo. in particular how to: combine days like may 24/31 so that one month's calendar always fits on 5 rows, and how to put items (e.g. mini calendar for previous and successive months, photo, or lunar phases) in the boxes that aren't days

  • How to configure latexmk to clean by whitelisting certain files (keep only specific extensions)?
    by palloc on March 3, 2026 at 8:15 pm

    I am using win 11, VS Code. My full LaTeX Workshop configuration contains multiple recipes, but the relevant part looks like this (settings.json): { "latex-workshop.latex.tools": [ { "name": "latexmk", "command": "latexmk", "args": [ "-synctex=1", "-interaction=nonstopmode", "-file-line-error", "-pdfps", "%DOC%" ] }, { "name": "makenomenclature", "command": "makeindex", "args": [ "%DOCFILE%.nlo", "-s", "nomencl.ist", "-o", "%DOCFILE%.nls" ] }, { "name": "cleaner", "command": "latexmk", "args": [ "-c", "%DOC%" ] } ], "latex-workshop.latex.recipes": [ { "name": "latexmk → nomencl → latexmk → latexmk cleaner", "tools": [ "latexmk", "makenomenclature", "latexmk", "cleaner" ] } ], "latex-workshop.latex.recipe.default": "latexmk → nomencl → latexmk → latexmk cleaner", "latex-workshop.latex.autoBuild.run": "never", } After compilation, a typical project directory contains (without -c or -C): aromatic.eps bib.bib main.aux main.bbl main.bcf main.blg main.dvi main.fdb_latexmk main.fls main.ilg main.log main.nlo main.nls main.out main.pdf main.ps main.run.xml main.synctex.gz main.tex With -c: aromatic.eps bib.bib main.bbl main.dvi main.nlo main.nls main.pdf main.ps main.synctex.gz main.tex With -C: aromatic.eps bib.bib main.bbl main.nlo main.nls main.tex I would like a cleaning setup where only these files remain: *.tex *.pdf *.bib *.eps *.png/*.jpg (other img format) Everything else should be removed. Is it possible to configure latexmk to clean files using a whitelist approach (keep only specific extensions), instead of relying on the default -c / -C behavior? Additionally, I have multiple subdirectories (e.g., chapters/, figures/, etc.) that also contain auxiliary files such as .aux, so delete those files as well. I only want this for archiving, and this question occurred to me - whether it would be feasible.

  • TikZ: How to add a node where a path gets clipped
    by Edoardo Serra on March 3, 2026 at 3:07 pm

    I am designing a square (or “squarish” actually) map protractor in TikZ. So far, I have managed to draw the degree ticks along the four sides by clipping radial lines between two closed paths using the even odd rule like I saw in this answer. The ticks are generated in a \foreach loop. To avoid drawing long ticks on top of short ones, I separated them into two loops using a conditional test. I am not sure whether this separation is actually necessary for correct SVG export/printing, but that is how I implemented it. Below is a MWE: \documentclass[tikz]{standalone} %,convert={outfile=\main.svg} \usepackage{pgfplots} \pgfplotsset{compat=newest} \usetikzlibrary{intersections, pgfplots.fillbetween} \pgfdeclarelayer{pre main} \pgfdeclarelayer{main} \pgfsetlayers{pre main, main} \usetikzlibrary{shapes} \begin{document} %all of this is needed to easily clip between two closed paths using even odd rule \makeatletter \def\@appendnamedsoftpath#1{% \pgfsyssoftpath@getcurrentpath\@temppatha \expandafter\let\expandafter\@temppathb\csname tikz@intersect@path@name@#1\endcsname \expandafter\expandafter\expandafter\def\expandafter\expandafter\expandafter\@temppatha\expandafter\expandafter\expandafter{\expandafter\@temppatha\@temppathb}% \pgfsyssoftpath@setcurrentpath\@temppatha } \def\@appendnamedpathforactions#1{% \pgfsyssoftpath@getcurrentpath\@temppatha \expandafter\let\expandafter\@temppathb\csname tikz@intersect@path@name@#1\endcsname \expandafter\def\expandafter\@temppatha\expandafter{\csname @temppatha\expandafter\endcsname\@temppathb}% \let\tikz@actions@path\@temppatha } \tikzset{ use path for main/.code={% \tikz@addmode{% \expandafter\pgfsyssoftpath@setcurrentpath\csname tikz@intersect@path@name@#1\endcsname }% }, append path for main/.code={% \tikz@addmode{% \@appendnamedsoftpath{#1}% }% }, use path for actions/.code={% \expandafter\def\expandafter\tikz@preactions\expandafter{\tikz@preactions\expandafter\let\expandafter\tikz@actions@path\csname tikz@intersect@path@name@#1\endcsname}% }, append path for actions/.code={% \expandafter\def\expandafter\tikz@preactions\expandafter{\tikz@preactions \@appendnamedpathforactions{#1}}% }, use path/.style={% use path for main=#1, use path for actions=#1, }, append path/.style={% append path for main=#1, append path for actions=#1 } } \makeatother \begin{tikzpicture} \pgfmathsetmacro\bigside{7} \pgfmathsetmacro\smallsidedelta{0.5} %cuts \draw[rounded corners=12pt, name path=outside] (0,0) rectangle (\bigside,\bigside); \draw[dotted, rounded corners=12pt, name path=inside] (\smallsidedelta,\smallsidedelta) rectangle (\bigside-\smallsidedelta,\bigside-\smallsidedelta); %remove before cutting or printign. Just as reference grid %backside print \tikzfillbetween[of=inside and outside] {white}; %print on transparent plastic so this is needed for better readability %frontside print \pgfmathsetmacro\degreesmallticksize{0.2} \pgfmathsetmacro\degreemidticksize{0.35} \pgfmathsetmacro\outerradius{sqrt(2*\bigside/2*\bigside/2)} \path[rounded corners=12pt, name path=degrees short] (\degreesmallticksize,\degreesmallticksize) rectangle (\bigside-\degreesmallticksize,\bigside-\degreesmallticksize); \path[rounded corners=12pt, name path=degrees mid] (\degreemidticksize,\degreemidticksize) rectangle (\bigside-\degreemidticksize,\bigside-\degreemidticksize); \begin{scope} [even odd rule] %small ticks \clip[use path=outside, append path=degrees short]; \foreach \deg in {0, ..., 359} { \pgfmathsetmacro\degmod{mod(\deg,5)} \pgfmathtruncatemacro{\itest}{ifthenelse(\degmod==0,1,0)} \ifnum\itest=0 \draw[thin] (\bigside/2,\bigside/2) -- ({\bigside/2+\outerradius*cos(\deg)},{\bigside/2+\outerradius*sin(\deg)}); \fi } \end{scope} %had to add a second scope and for loop since the clipped area is different \begin{scope} [even odd rule] %mid ticks \clip[use path=outside, append path=degrees mid]; \foreach \deg in {0, ..., 359} { \pgfmathsetmacro\degmod{mod(\deg,5)} \pgfmathtruncatemacro{\itest}{ifthenelse(\degmod==0,1,0)} \ifnum\itest=1 \draw[thick] (\bigside/2,\bigside/2) -- ({\bigside/2+\outerradius*cos(\deg)},{\bigside/2+\outerradius*sin(\deg)}); \fi } \end{scope} \end{tikzpicture} \end{document} And the output is the following: I would now like to add a label at the inner end of each thick (5°) tick, displaying the corresponding degree value (0–355), like this: Now a few nuances: The numbers must always face towards the inside, with the exception, if possible, of the bottom row of numbers from 135° to 225°. When numbers get big, they don't have enough space to fit unless the labels become too small to read (actual printing size of the protractor will be something like 7x7 or 8x8cm). So they need to be shifted in such a way that they fit. 355 in the provided image is a clear example of what I mean. I can consider shifting them radially as well, but they need to stay to the outside of the dotted line, which I can make a little smaller. I really don't know where to start and didn't manage to find anything online. Thank you for your time!

  • Fontspec overriding/causing error with realhats package
    by FamisherCaterpillar on March 3, 2026 at 2:44 pm

    I am working on Overleaf (using XeLaTeX compiler) and I am trying to use both the fontspec package (to use a different font) and the realhats package (to give my symbols "real hats"). However, when I activate fontspec, it turns all the realhats back into "regular hats." This happens even when I don't change the font, just when I activate the fontspec package. Example 1: Realhats works \documentclass[12pt]{article} \usepackage[margin=1in]{geometry} \usepackage{amsmath,amssymb,amsthm} % maths packages \usepackage{amsfonts} \usepackage{graphicx} % Required for inserting images \usepackage{xcolor} \usepackage{tikz-cd} % commutative diagrams %\usepackage{fontspec} \usepackage{realhats} \usepackage{etoolbox,xspace,bbm} \usepackage{hyperref} \begin{document} %\setmainfont{ComicSansMS3.ttf} Random text $\hat{p}.$ \end{document} Example 2: Realhats doesn't work (only change is uncommenting fontspec) \documentclass[12pt]{article} \usepackage[margin=1in]{geometry} \usepackage{amsmath,amssymb,amsthm} % maths packages \usepackage{amsfonts} \usepackage{graphicx} % Required for inserting images \usepackage{xcolor} \usepackage{tikz-cd} % commutative diagrams \usepackage{fontspec} \usepackage{realhats} \usepackage{etoolbox,xspace,bbm} \usepackage{hyperref} \begin{document} %\setmainfont{ComicSansMS3.ttf} Random text $\hat{p}.$ \end{document} Any ideas on how to fix this? Or, if it cannot be fixed, how I can get both the font change and have real hats? Thank you, have a nice day.

  • How to label axes, points, and curves in a 3D plot using luadraw?
    by Octavius on March 3, 2026 at 2:00 pm

    The question arised from the previous link and the luadraw solution. I am using luadraw to visualize the surface z = x^2 + y^2 together with the intersection curve corresponding to the direction u = (1,0). I would like to know whether it is possible to: Label the coordinate axes $x$, $y$, and $z$, Label the point $c = (0,0)$, Indicate the direction $u = (1,0)$, And label the function $F(t) = t^2$ corresponding to the intersection curve. When I try to use Dtext3d, the document compiles but the output appears blank in Overleaf. Is there a reliable way to add these labels when using luadraw? \documentclass[border=5pt]{standalone} \usepackage[svgnames]{xcolor} \usepackage[3d]{luadraw} \usepackage{fourier-otf} \usepackage{tikz} \begin{document} \begin{luadraw}{name=paraboloid} local g = graph3d:new{ window3d = {-2,2,-2,2,0,8}, window = {-4.5,4,-3,9.5}, size = {10,10,0}, viewdir = perspective("central",30,50,20) } -- Surface local S = cartesian3d(function(x,y) return x^2+y^2 end, 2,-2,-2,2) -- Direction local c = Origin local u = M(1,0,0) local N = pt3d.prod(u, vecK) -- Intersection curve local Curve = g:Intersection3d(S, {c,N}) -- Draw surface g:Dfacet(S, {usepalette={palGasFlame,"z"}, edgecolor="gray", clip=true}) -- Draw curve g:Dedges(Curve, {hidden=true, color="Navy", width=12}) -- Axes g:Dline3d({Origin, M(2,0,0)}, {color="black", width=1, dash="dotted"}) g:Dline3d({Origin, M(0,2,0)}, {color="black", width=1, dash="dotted"}) g:Dline3d({Origin, M(0,0,6)}, {color="black", width=1, dash="dotted"}) g:Show() \end{luadraw} % ---- 2D overlay labels (safe in Overleaf) ---- \begin{tikzpicture}[overlay] \node at (3.7,4.2) {$x$}; \node at (1.1,4.8) {$y$}; \node at (2.5,7.3) {$z$}; \end{tikzpicture} \end{document}

  • Table Alignment Trouble [closed]
    by Nick B on March 3, 2026 at 1:02 pm

    I used AI to create this table from Tony Records Guided notes. I was hoping to drag and drop code for my notes today, but there are several errors that I can't locate. Also, column on left is not aligned with right. Any help is appreciated. \documentclass{article} \usepackage[margin=1in]{geometry} \usepackage[most]{tcolorbox} \usepackage{tabularray} \usepackage{amsmath} \usepackage{xcolor} % Custom Colors from the image \definecolor{headerpurple}{RGB}{102, 45, 145} \definecolor{bodyblue}{RGB}{214, 230, 247} \definecolor{benefitgold}{RGB}{255, 242, 204} \definecolor{drawbackorange}{RGB}{248, 203, 173} \begin{document} \begin{tcolorbox}[ enhanced, sharp corners, boxrule=1.5pt, colframe=black, colback=white, left=0mm, right=0mm, top=0mm, bottom=0mm, boxsep=0pt, title=\textbf{\large Defining a Sequence}, colbacktitle=headerpurple, toptitle=2mm, bottomtitle=2mm, center title ] \begin{tblr}{ colspec = {X[l,m]X[l,m]}, stretch = 1.2, vlines = {0.5pt, black}, % Vertical line between columns hlines = {0.5pt, black}, % Horizontal lines between rows column{1,2} = {leftsep=8pt, rightsep=8pt, topsep=6pt, bottomsep=6pt}, row{1} = {bg=headerpurple, fg=white, font=\bfseries, halign=c}, row{2} = {bg=bodyblue}, row{3} = {bg=benefitgold}, row{4} = {bg=drawbackorange}, } % Row 1: Headers Recursive (Implicit) Definition) & Explicit Definition \\ % Row 2: Main Content { \textbf{Note:} Each term in the sequence is three more than the preceding term. Therefore,\\ \(a_1 = 1\) \\ \(a_2 = a_1 + 3\) \\ \(a_3 = a_2 + 3\) \\ \(\quad \vdots\) \\ \(a_{n+1} = a_n + 3\) \\ Putting this all together, formally we should say:\\ \(a_1 = 1\) and \(a_{n+1} = a_n + 3\) where \(n = 1, 2, 3, \dots\) } & { \textbf{Note:} Each term in the sequence can be represented by ordered pairs using the convention:\\ \centering (order of the term, actual value of the term) \\ \raggedright Therefore, we can rename those terms with $(1,1), (2,4), (3,7), (4,10), \dots$ and use a known relationship between the ordered pairs. Here, we have a linear relationship. \[ \text{slope} = \frac{4-1}{2-1} = \frac{7-4}{3-2} = \frac{10-7}{4-3} = \dots = 3 \] Using the \textit{point-slope} formula with the first coordinate point: \[ a_n - 1 = 3(n-1)\] \\ or \\ \[a_n = 3n - 2\] } \\ % Row 3: Benefits \textbf{Benefit:} The relationship is typically easy to see. & \textbf{Benefit:} The explicit definition is extremely helpful in finding terms deep into the sequence like \(a_{50}\). \\ % Row 4: Drawbacks \textbf{Drawback:} The recursive definition is not very helpful if we want to find a term deep into the sequence like \(a_{50}\). & \textbf{Drawback:} The relationship can be difficult to see if the sequence is not so ``well-behaved,'' i.e., linear, or geometric. \end{tblr} \end{tcolorbox} \end{document} The error message is: ! Missing $ inserted. <inserted text> $ l.72 \end {tblr} ?

  • Why is it necessary to keep first line of input in 'buffer' array?
    by Igor Liferenko on March 3, 2026 at 6:24 am

    In §331 of tex.web we have this: first:=1; ... if not init_terminal then goto final_end; first:=last+1; {|init_terminal| has set |loc| and |last|} So, before input_ln, which is called by init_terminal, we have: loc is 0, first is 1, last is 0. Let's type x<return> in response to **. Then after init_terminal we will have: loc is 1, first is 1, last is 2. And then (due to above snippet) first will be 3. This means that first line of input is permanently kept in buffer array throughout the entire TeX job. And so the length of the first line will restrict the length of line that TeX can read. In particular, one and the same file will compile cleanly if file name is relative, and will fail to compile if file name is absolute. Why first line of input is kept in buffer array?

  • The sizes of \because and \therefore in exam-zh
    by M. Logic on March 3, 2026 at 1:34 am

    A MWS is as follows. \documentclass{exam-zh} \makeatletter \DeclareSymbolFont{AMSa}{U}{msa}{m}{n} %\DeclareSymbolFont{AMSb}{U}{msb}{m}{n} \DeclareMathSymbol{\therefore}{\mathrel}{AMSa}{"29} \DeclareMathSymbol{\because}{\mathrel}{AMSa}{"2A} \makeatother \begin{document} $\because ABCD=\therefore ABCD$ \end{document} As you see, the sizes of \because and \therefore in exam-zh are very small although I invoke them from amssymb. How to fix this to make the sizes of them be normal when invoking them from amssymb?

  • tabularray - make talltblr caption mirror other captions
    by user20478285 on March 3, 2026 at 12:13 am

    \documentclass{article} \usepackage[font=small, labelfont=bf, format=hang]{caption} \usepackage{tabularray} \usepackage{tblr-extras} \UseTblrLibrary{amsmath, booktabs, caption} \begin{document} \begin{table}[h] \centering \begin{talltblr}[caption={A talltblr table.}]{colspec={cc}} \toprule a & b\\ \midrule x & y\\ \bottomrule \end{talltblr} \end{table} \end{document} Using the code above, I get the following result for my talltblr (i.e. the caption width is limited to the table width). I tried the approach from here: \documentclass{article} \usepackage[font=small, labelfont=bf, format=hang]{caption} \usepackage{tabularray} \usepackage{tblr-extras} \UseTblrLibrary{amsmath, booktabs, caption} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \DefTblrTemplate{firsthead}{caption}{% \makebox[\tablewidth]{\parbox{\columnwidth}{% \UseTblrTemplate{caption}{normal}% }}% } \SetTblrTemplate{firsthead}{caption} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \begin{document} \begin{table}[h] \centering \caption{A regular table. A regular table. A regular table. A regular table. A regular table. A regular table. A regular table. A regular table. A regular table.} \begin{tabular}{cc} \toprule a & b\\ \midrule x & y\\ \bottomrule \end{tabular} \end{table} \begin{table}[h] \centering \caption{A tblr table. A tblr table. A tblr table. A tblr table. A tblr table. A tblr table. A tblr table. A tblr table. A tblr table. A tblr table. A tblr table.} \begin{tblr} { colspec={cc} } \toprule a & b\\ \midrule x & y\\ \bottomrule \end{tblr} \end{table} \begin{table}[h] \centering \begin{talltblr} [ caption={A talltblr table. A talltblr table. A talltblr table. A talltblr table. A talltblr table. A talltblr table. A talltblr table. A talltblr table.} ] { colspec={cc} } \toprule a & b\\ \midrule x & y\\ \bottomrule \end{talltblr} \end{table} \end{document} Now the caption has the right width, but it is too close to the table itself. Also, the caption font is too big and the label is not bold, which I can fix / hack if I add \SetTblrStyle{caption-tag}{font=\small\bfseries} \SetTblrStyle{caption-text}{font=\small} but I'm not sure if this is the way to go (and it does not fix the issue of the caption touching the table). I also tried to have a look at the default caption definitions myself in the source code but I just don't understand even remotely enough of LaTeX3). Edit for clarity: I don't need to be able to control table, talltblr, and tblr with \captionsetup, I am rather looking for a way to get the same consistent captions for figure, table, tblr and talltblr environments in my document. I realise this is not easy, especially since the different caption style for talltblr is apparently a feature: I don't think it is a bug. In many aspects, tabularray is different from traditional tables https://github.com/TeXackers/tabularray/issues/255#issuecomment-1142833319)

  • LTeX not spotting errors in subfile
    by Thomas on March 2, 2026 at 11:12 pm

    I'm writing a document in French, and I'm including subfiles using the command \input. I'm using the extension LTeX, which is a spell check extension, for LaTeX (and other format) document, in order to spot errors in my document. In the main document, the French language is well detected, and the mistakes made are correctly displayed. However, in the other file included, the mistakes are not spotted at all, despite the presence of the flag setting the language to French. If I remove this flag, the errors are indeed spotted, but regarding the English language... Here is the main file \documentclass[10pt]{article} \usepackage[french]{babel} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \begin{document} bonjour, ceci est un texte en francais. % Error spotted : missing upper case B, and typo in the word francais \input{file2} \end{document} and here is the file2.tex % LTeX: language=fr-FR et ceci est le sous-fcihier. % Error that should be spotted : missing upper case E and typo in the word fcihier

  • Issue with lslisting "leaking" in header [closed]
    by user3771535 on March 2, 2026 at 10:13 pm

    I have code snippets in my document, which I present using the listings package. Specifically, I want the code to be in \ttfamily. However, it seems that the lstlisting environments “leak” into the page headers (in this case, fancy headers): In the header, the text should not be in ttfamily, but in normal small caps. I tried adding \normalfont in \lstset{basicstyle= and also in the header definition \fancyhead[LO], but it didn't change anything. How can I fix this? Here is my code: \documentclass[twoside]{book} \usepackage{polyglossia} \setmainlanguage{french} \usepackage[paperheight=23.4cm,paperwidth=16cm,left=2cm,right=2cm,top=1.5cm,bottom=2.4cm]{geometry} \renewcommand{\baselinestretch}{1.15} \usepackage{fancyhdr} \pagestyle{fancy} %dit qu'on utlise le package \fancyhf{} % vide l'en tete et le pied de page par defaut de latex \fancyhead[LO]{\normalfont\small\textsc{\nouppercase{\rightmark}}} %extremite droite des pages paires \fancyhead[RE]{\normalfont\small\textsc{\nouppercase{\leftmark}}} %extremte gauche des pages impaires \fancyhead[LE,RO]{\normalfont\thepage} % \fancyfoot{} \renewcommand{\headrulewidth}{0pt} \renewcommand{\footrulewidth}{0pt} \usepackage{listings} \lstset{basicstyle=\normalfont\ttfamily,frame=single,numbers=left, numberstyle=\scriptsize} \begin{document} \chapter{Nom de chapitre} Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, \begin{lstlisting} No \author given. \end{lstlisting} Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod \begin{lstlisting} No \author given. Reference `fig:igraph:histdegre' on page 6 undefined There were undefined references. No \author given. Reference `fig:igraph:histdegre' on page 6 undefined There were undefined references. No \author given. Reference `fig:igraph:histdegre' on page 6 undefined There were undefined references. No \author given. Reference `fig:igraph:histdegre' on page 6 undefined \end{lstlisting} Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam \begin{lstlisting} No \author given. Reference `fig:igraph:histdegre' on page 6 undefined There were undefined references. No \author given. Reference `fig:igraph:histdegre' on page 6 undefined There were undefined references. No \author given. Reference `fig:igraph:histdegre' on page 6 undefined There were undefined references. No \author given. Reference `fig:igraph:histdegre' on page 6 undefined \end{lstlisting} Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi \begin{lstlisting} No \author given. Reference `fig:igraph:histdegre' on page 6 undefined There were undefined references. No \author given. Reference `fig:igraph:histdegre' on page 6 undefined There were undefined references. No \author given. Reference `fig:igraph:histdegre' on page 6 undefined There were undefined references. No \author given. \end{lstlisting} Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore \begin{lstlisting} No \author given. \end{lstlisting} Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do \begin{lstlisting} No \author given. \end{lstlisting} Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.\footnote{Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt }. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. \begin{lstlisting} No \author given. \end{lstlisting} Lorem ipsum dolor sit amet, consectetur adipiscing elit, \begin{lstlisting} No \author given. Reference `fig:igraph:histdegre' on page 6 undefined There were undefined references. \end{lstlisting} \end{document}

  • How to make block titles go on more than one line
    by George Dewhirst on March 2, 2026 at 8:33 pm

    I have a long block title, "L1 scheme for numerical approximations for stochastic subdiffusion problems" and I want to wrap it on multiple lines but am not sure how to do this. Ideally it would be L1 scheme \\ for numerical approximations \\ for stochastic subdiffusion problems where \\ denotes the new line which I am after It is coming from the template file which I enclose: \ProvidesPackage{beamerthemeParisSaclay} % this style was created by frédéric Mazaleyrat %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \RequirePackage{fontawesome5} \mode<presentation> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \definecolor{jaune}{RGB}{243 185 0}%{0,150,204} \definecolor{saclaydk}{RGB}{99,0,60} \definecolor{saclayl}{RGB}{243,185,0} \definecolor{prunel}{RGB}{184, 172, 215} \definecolor{vertl}{RGB}{213,223,61} \definecolor{vert}{RGB}{140,198,62} \definecolor{rouge}{RGB}{198, 11, 70} \definecolor{mandarine}{RGB}{243, 115, 32} \definecolor{bleu}{RGB}{80, 144, 205} \setbeamercolor{headline}{fg=mandarine,bg=saclaydk} \setbeamercolor{footline}{fg=mandarine, bg=saclaydk} \setbeamerfont{footline}{size=\large,series=\sf} \setbeamercolor{separation line}{bg=saclaydk} \setbeamercolor{title in headline}{fg=white} \setbeamercolor{author in headline}{fg=bleu} \setbeamercolor{institute in headline}{fg=white} \setbeamercolor{framesubtitle}{fg=mandarine, bg=gray} \setbeamercolor{author in head/foot}{fg=white, bg=black} \setbeamercolor{title in head/foot}{fg=white, bg=saclaydk} %\setbeamercolor*{normal text}{fg=saclaydk, bg=white} % set block \setbeamercolor*{block body}{bg=saclaydk!20,fg=black} \setbeamercolor*{block title}{fg=white,bg=saclaydk} \setbeamerfont*{block title}{size=\large,series=\bf} %\setbeamercolor*{upper separation line head}{fg=saclaydk} \setbeamercolor*{block text}{fg=saclaydk,bg=vertl} % set example block \setbeamercolor*{example body}{bg=gray,fg=black} \setbeamercolor*{example text}{fg=saclaydk,bg=vertl} \setbeamercolor*{example title}{bg=vert,fg=white} \setbeamercolor{alerted body}{bg=mandarine,fg=vert} \setbeamercolor{alerted title}{fg=white,bg=rouge} \setbeamercolor{alerted text}{fg=white,bg=rouge} \setbeamercolor{structure}{fg=bleu} \setbeamertemplate{itemize items}[triangle] \setbeamertemplate{navigation symbols}{} % no navigation on a poster %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \setbeamertemplate{block begin}{ \vskip.75ex \begin{beamercolorbox}[ht=3.5ex,dp=0.5ex,center,leftskip=-1em,colsep*=.75ex]{block title}% \usebeamerfont*{block title}% %{\phantom{Gg}\insertblocktitle}% phantom because of baseline problem \parbox{\dimexpr\textwidth-2em\relax}{\insertblocktitle}% \end{beamercolorbox}% {\ifbeamercolorempty[bg]{block body}{}{\nointerlineskip\vskip-0.5pt}}% \usebeamerfont{block body}% \begin{beamercolorbox}[leftskip=1em,colsep*=.75ex,sep=0.5ex,vmode]{block body}% \ifbeamercolorempty[bg]{block body}{\vskip-.25ex}{\vskip-.75ex}\vbox{}% } \setbeamertemplate{block end}{ \end{beamercolorbox} } %%%%%%%%%%%%%%%%%%%%%%%%%%%%% \setbeamertemplate{headline}{ \leavevmode \begin{beamercolorbox}[wd=\paperwidth]{headline} \begin{columns}[T] \begin{column}{.02\paperwidth} \end{column} \begin{column}{.6\paperwidth} \vskip4ex \raggedleft \usebeamercolor{title in headline}{\color{fg}\textbf{\Huge{\inserttitle}}\\[1ex]} \usebeamercolor{author in headline}{\color{fg}\large{\insertauthor}\\[1ex]} \usebeamercolor{institute in headline}{\color{fg}\large{\insertinstitute}\\[1ex]} \end{column} \begin{column}{.1\paperwidth} \vskip8ex \begin{center} %\includegraphics[width=2\linewidth]{LogoUPaS} \end{center} \vskip2ex \end{column} \begin{column}{.02\paperwidth} \end{column} \end{columns} \vskip2ex \end{beamercolorbox} \begin{beamercolorbox}[wd=\paperwidth]{lower separation line head} \rule{0pt}{3pt} \end{beamercolorbox} } %%%%%%%%%%%%%%%%%%%%% \setbeamertemplate{footline}{ % \begin{beamercolorbox}[wd=\paperwidth]{upper separation line foot} % \rule{0pt}{3pt} % \end{beamercolorbox} \setbeamercolor{coloredboxstuff}{fg=white,bg=saclaydk} \leavevmode% \begin{beamercolorbox}[ht=4ex,leftskip=1em,rightskip=1em]{coloredboxstuff}% %<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< \begin{center} % \includegraphics[height=5cm]{LOGO_CNRS_BLEU} \hspace{4cm} \includegraphics[height=5cm]{logo_ENSPaS.pdf} \hspace{4cm} % \includegraphics[height=5cm]{GS_IS}\hspace{4cm} % \includegraphics[height=5cm]{spintronique} \end{center} \faEnvelope \;2234061@chester.ac.uk %<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< \hfill Conference name %<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< \hfill \faUbuntu \; \LaTeX %<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< \vskip1ex \end{beamercolorbox} \vskip0pt% \begin{beamercolorbox}[wd=\paperwidth]{lower separation line foot} \rule{0pt}{3pt} \end{beamercolorbox} } %%%%%%%%%%%%%%%%%%%% % Display a grid to help align images ... and it looks nice with this color scheme \beamertemplategridbackground[1cm] %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \mode<all> % adapt height of imtemize rectangles \setbeamertemplate{itemize items}[triangle] \setbeamertemplate{itemize item}{\raisebox{0.12ex}{\faSplotch}\hskip0.1em} \setbeamertemplate{itemize subitem}{\raisebox{0.12ex}{$\triangleright$}\hskip0.1em} % or define your own template using \defbeamertemplate{itemize item}, see beameruserguide.pdf % equal font sizes for all levels \setbeamerfont{itemize/enumerate body}{size=\normalsize} \setbeamerfont{itemize/enumerate subbody}{size=\normalsize} \setbeamerfont{itemize/enumerate subsubbody}{size=\normalsize} %%%%%%%%%%%%%%%%%%%%%%%%%%%%

  • Improving the visibility of a curve in a 3D PGFPlots surface
    by Octavius on March 2, 2026 at 4:50 pm

    In the left-hand figure, I would like to improve the visualization so that the red curve is more clearly visible. \documentclass[12pt,b5paper,twoside,openany]{book} \usepackage[utf8]{inputenc} \usepackage[english]{babel} \usepackage{amsmath,amssymb,amsfonts,amsthm} \usepackage{graphicx} \usepackage{xcolor} \usepackage{tikz} \usepackage{tikz-3dplot} \usepackage{pgfplots} \pgfplotsset{compat=1.18} \hypersetup{colorlinks=true,linkcolor=black,citecolor=black} \newtheorem{example}{Example} \setlength{\parindent}{0pt} \begin{document} \begin{example} Consider the function \[ f(x,y)=x^2+y^2, \] the point \[ c=(0,0), \] and the direction \[ u=(1,0). \] To study the variation of $f$ at $c$ in the direction $u$, we define the one-variable function \[ F(t)=f(c+tu). \] In this case, \[ c+tu=(t,0), \] and therefore \[ F(t)=f(t,0)=t^2. \] Thus, when we move away from $c$ in the direction $u$, the values of $f$ vary according to the quadratic function $F(t)=t^2$. The directional derivative of $f$ at $c$ in the direction $u$ is given by \[ f'(c;u)=F'(0). \] Since \[ F'(t)=2t, \] we obtain \[ f'(c;u)=F'(0)=0. \] \end{example} \bigskip \begin{center} \begin{tikzpicture} % --- SURFACE --- \begin{axis}[ at={(0,0)}, anchor=origin, view={120}{25}, axis lines=center, axis line style={->}, xlabel={$x$}, ylabel={$y$}, zlabel={$z$}, domain=-2:2, y domain=-2:2, samples=30, samples y=30, width=8cm, height=8cm ] % Surface z = x^2 + y^2 \addplot3[surf, opacity=0.4] {x^2+y^2}; % Curve corresponding to F(t) \addplot3[very thick, red, domain=0:1.2, samples=100] ({x},{0},{x^2}); \end{axis} % --- GRAPH OF F(t) --- \begin{axis}[ at={(7cm,0)}, anchor=origin, axis lines=middle, axis line style={->}, xlabel={$t$}, ylabel={$F(t)$}, domain=-1.5:1.5, samples=200, width=7cm, height=6cm ] \addplot[very thick, red] {x^2}; \node at (axis cs:1,1) [red, anchor=west] {$F(t)=t^2$}; \end{axis} \end{tikzpicture} \end{center} \end{document}

  • Disable stretching between words while using babel for Thai
    by p_pattedd on March 2, 2026 at 8:04 am

    When typing a document in Thai with babel (using XeLaTeX via MikTeX), sometimes it outputs with these spaces between words, for example: MWE: \documentclass[12pt,a4paper]{article} \usepackage[no-math]{fontspec} \usepackage[thai,provide=*]{babel} \babelfont[thai]{rm}[Scale=1.33333]{TH Sarabun New} \renewcommand\baselinestretch{1.4} \begin{document} เดิมแผ่นดินเมืองจีนทั้งปวงนั้น เปนสุขมาช้านานแล้วก็เปนศึก ครั้นศึกสงบแล้วก็เปนสุข มีพระมหากษัตริย์ทรงพระนามพระเจ้าจิวบูอ๋อง แลพระวงศ์ได้เสวยราชย์ต่อ ๆ ลงมาเปนหลายพระองค์ ได้ความสุขมาถึงเจ็ดร้อยปี จึงมีผู้ตั้งแขงเมืองถึงเจ็ดหัวเมือง ครั้งนั้นพระเจ้าจิ๋นอ๋องได้เสวยราชย์ในเมืองจิ๋นก๊กให้ไปตีเอาหัวเมืองทั้งเจ็ดนั้น เข้าอยู่ในอาณาจักรพระเจ้าจิ๋นอ๋องทั้งสิ้น ครั้นอยู่มาพระเจ้าจิ๋นอ๋องเสียแก่ฮั่นฌ้อ แล้วฮั่นโกโจกับฮั่นฌ้อรบกัน จึงได้ราชสมบัติแก่ฮั่นโกโจ ฮั่นโกโจแลพระราชวงศ์ได้เสวยราชสมบัติต่อ ๆ มาในแผ่นดินจีนนั้นถึงสิบสององค์ มีขุนนางคนหนึ่งชื่ออองมังเปนขบถชิงเอาราชสมบัติได้ เปนเจ้าแผ่นดินอยู่สิบแปดปี แล้วจึงมีหลานพระเจ้าฮั่นโกโจชื่อฮั่นกองบู๊จับอองมังฆ่าเสียชิงเอาราชสมบัติได้เสวยราชย์สืบวงศ์มาสิบสององค์ พระองค์ได้เสวยราชย์ที่สุดนั้น ทรงพระนามพระเจ้าเหี้ยนเต้ จึงแตกเปนสามเมือง ภาษาจีนเรียกว่า สามก๊ก \end{document} How to stop LaTeX from doing this? (I have read babel-thai documentation, but none of the macros seems to work.)

  • Redesign of arrow at circuitikz ccgsw symbol
    by Zarko on March 2, 2026 at 7:20 am

    In circuitikz symbol ccgsw I like to change the color of arrow (by simple in-line selection, if is possible) and arrow head for example from stealth to Straight Barb. How to do this? \documentclass[margin=3mm]{standalone} \usepackage{xcolor} \usepackage{circuitikz} \begin{document} \begin{circuitikz} \draw[gray] (0,0) to [ccgsw={$t=t_b$}] (2,0) ; \end{circuitikz} \end{document}

  • BibLaTeX specified language is not used
    by Knudsen on March 2, 2026 at 6:40 am

    Why would biblatex fill out this entry with Cyrillic while the language being specified is Serbian written in Latin? \documentclass{article} \begin{filecontents*}{test.bib} @book{Mitri-vol1-sr, title={Cauchyjev račun ostataka sa primenama}, author = {Mitrinović, Dragoslav S. and Kečkić, Jovan D.}, series = {Matematički problemi i ekspozicije}, volume = {8}, year = {1978}, publisher = {Naučna Knjiga}, address = {Beograd}, pages = {271}, langid = {serbian}, } \end{filecontents*} \usepackage{fontspec} \newfontfamily\cyrillicfont{STIX Two Text} \usepackage{polyglossia} \usepackage{csquotes} \setmainlanguage{english} \setotherlanguage{serbian} \usepackage[style=authoryear, backend=biber, autolang=other, ]{biblatex} \addbibresource{test.bib} \begin{document} \nocite{*} \printbibliography \end{document}

  • How to draw this shape? [closed]
    by bakhta marouf on March 2, 2026 at 5:49 am

    I want to draw this shape using TikZ, but I don't know how. Could anyone provide an example of how to do it?

  • How can I terminate a wire with an X symbol in quantikz?
    by tparker on March 1, 2026 at 8:08 pm

    I would like to terminate a quantum wire in Quantikz with an "X" drawn over the rightmost end. (I don't want to put the "X" in a box, because that would look like a Pauli X-gate.) The best way that I've found to do this is to with the swap{} command, like this: \documentclass{article} \usepackage{tikz} \usetikzlibrary{quantikz} \begin{document} \begin{quantikz} \lstick{} & \swap{} \end{quantikz} \end{document} This isn't bad, but the wire extends a little bit past the center of the "x". Is there any way to get the wire to terminate right at the cross of the "x"?

  • How to change "python" language style of listings package
    by Syvshc on March 1, 2026 at 3:28 pm

    I want to define my own style of Python, so I write \documentclass{article} \usepackage{listings, xcolor} \lstset { basicstyle = \ttfamily\small, frame = leftline, framerule = 1pt, } \lstdefinelanguage{python}{ morekeywords = {python, red}, keywordstyle = {\bfseries\color{red}}, rulecolor = {\color{red}}, } \begin{document} \begin{lstlisting}[language=python] python, red \end{lstlisting} \end{document}% after compiling with texlive 2025, I got: It did not work. I thought it might be the problem with the default settings of listings.sty package, i.e. lstlang1.sty. However, I can change the style of matlab language: \documentclass{article} \usepackage{listings, xcolor} \lstset { basicstyle = \ttfamily\small, frame = leftline, framerule = 1pt, } \lstdefinelanguage{python}{ morekeywords = {python, red}, keywordstyle = {\bfseries\color{red}}, rulecolor = {\color{red}}, } \lstdefinelanguage{Matlab}{ morekeywords = {Matlab, lime}, keywordstyle = {\bfseries\color{lime}}, rulecolor = {\color{red}}, } \begin{document} \begin{lstlisting}[language=python] python, red \end{lstlisting} \begin{lstlisting}[language=Matlab] Matlab, lime \end{lstlisting} \end{document}% The output is: I wonder why it happened and how I can actually change the style of "python" language. EDIT: I found that this does not work only on TexLive 2025; my version of listings is 76899, and it's cat-version is 1.11b. If I compile this file with 1.10a and TexLive 2024 on Overleaf, all things worked well. EDIT: I found that listings package is insensitive to the language name, Python, python, and PYTHon point to the same language

  • Automatic italic for foreign words
    by Apothikon on March 1, 2026 at 2:06 pm

    Foreign words or phrases inside a mostly monolingual document should usually be displayed in italic. How can this be achieved automatically using babel? I have produced the following code: \documentclass{article} \usepackage{lipsum} \usepackage[french, british, italian]{babel} % Font for the main language \babelfont{rm}{ebgaramond} % Font for foreign languages, inverting roman and italic \babelfont [french, british]{rm}{ebgaramond-Italic} \begin{document} MAIN LANGUAGE \lipsum[1] \vspace{1em} FOREIGN LANGUAGE \foreignlanguage{british}{\lipsum[1]} \end{document} However, I can see some problems in my approach: If I define new features for the font (ligatures, character variants...) I must repeat them for both the main and the foreign font; If I add new languages I must remember to add them to the list of foreign languages to which the italic must be applied. I am quite sure that the amazing babeltransform can easily make it more automatic.

  • Italic text with upright uppercases
    by Apothikon on March 1, 2026 at 1:45 pm

    Can someone suggest a method to have Roman (upright) capitals in italic texts, in the style of Aldus Manutius and of the early Renaissance books? I believe it could probably be done with the lua.otf.font.handler but I don't know where to start. Also, I think at least two aspects need to be kept in mind: Efficiency: the approach should not be too heavy, in order to be usable also for large documents with many paragraphs in italics; Kerning: it will probably be required to define new kerning pairs for many (or every) capital, and I expect this to be done manually depending on the font used in the document. As an example to test this: \documentclass{article} \usepackage{lipsum} \usepackage{ETbb} % A font in the style of Aldus Manutius \begin{document} A B C D E F G H I J K L M N O P Q R S T U V W X Y Z \vspace{1em} \textit{A B C D E F G H I J K L M N O P Q R S T U V W X Y Z} \vspace{1em} \lipsum[1] \vspace{1em} \textit{\lipsum[1]} \end{document} Every suggestion, even if not a complete answer, is very appreciated.

  • Reset counter in \newtheorem
    by Afonso Guerra on March 1, 2026 at 10:52 am

    I'm trying to make a title with \newtheorem{case}{Caso} (My code is in Portuguese-Portugal) and it outputs Caso X. "X" being the next number. So here is the thing, I actually need to reset the "X" value, and I have tried the [theorem] parameter, but it doesn't work for me so can anyone help? Here is my code: \documentclass[12pt]{report} \usepackage[]{amsmath,amsthm,amssymb,amscd} \usepackage[a4paper,margin=25mm]{geometry} \usepackage{babel} \usepackage{pgfplots} \usepackage{multirow} \usepackage{booktabs} \usepackage{framed} \newtheorem{case}{Caso} \begin{document} \begin{case} Não conhecemos a distribuição de $X_1$ ou $X_2$, mas os tamanhos das amostras não apresentão assimetrias exageradas. \end{case} \begin{case} % Some text here % \end{case} % Reset the X value % \begin{case} % More text here, but with it saying "Caso 1." % \end{case} \end{document} If you want something else please tell me.

  • How to produce an effect of bracket below with text?
    by Sunshine on March 1, 2026 at 5:29 am

    I want to produce the bracket like this: \documentclass{article} \begin{document} There is a bracket below with text. \end{document}

  • How to fit these items on three separate lines
    by Ricky W. on March 1, 2026 at 3:11 am

    I am trying to make this bullet points look nice in three lines but here is the problem. it won't fit. Here is my code \documentclass{beamer} \setbeamertemplate{theorems}[numbered] \begin{frame} \frametitle{Definitions} \begin{definition}[Normed Linear Space] A linear space $\mathbb{X}$ is a normed linear space if, to each vector $x\in \mathbb{X}$, there is a real-valued norm $\left\|x\right\|$ that satisfies \begin{itemize}[$\bullet$] \item $\left\|x\right\| \geq 0$ for all $x\in \mathbb{X}$, with $\left\|x\right\|=0$ if and only if $x=0$ \item $\left\|x+y\right\| \leq \left\|x\right\| + \left\|y\right\| $ for all $x,y\in \mathbb{X}$ \item $\left\|ax\right\|=|a|\left\|x\right\|$ for all $a\in \mathbb{R}$ and $x\in \mathbb{X}$ \end{itemize} Here is what I got

  • How can I calculate or approximate the intersection(s) or lack thereof of a line and an exponential curve using Lua?
    by Jasper on February 27, 2026 at 5:58 pm

    How can I calculate or approximate the intersection(s) or lack thereof of a line and an exponential curve. My goal is to avoid using an approach which first tessellates curves into line segments, and tests each line segment pair. That is O(n^2). I want something which can scale. I think Lua is appropriate for this, based on evidence in the comments. \documentclass[tikz,border=1cm]{standalone} \begin{document} \begin{tikzpicture} \draw[->] (-2,0) -- (2,0); \draw[->] (0,-2) -- (0,e^2); \draw[domain=-2:2] plot (\x,e^\x); \draw[domain=-2:2] plot (\x,\x+1.5); % two intersections \draw[domain=-2:2] plot (\x,\x+1); % one intersection \draw[domain=-2:2] plot (\x,-\x+4.5); % one intersection \draw[domain=-2:2] plot (\x,\x); % zero intersections % My goal is to use pgfmath to calculate, or if % necessary iteratively approximate, the intersections % of these lines with the exponential curve. % If it is not easy in pgfmath, then I want a Lua-based solution. \end{tikzpicture} \end{document}

  • I am plotting a family of parabolas in TikZ, and there is a stray parabola. I'm confused
    by Jasper on February 25, 2026 at 7:14 pm

    I am plotting a family of parabolas in TikZ, and there is a stray parabola. I'm confused. \documentclass[tikz,border=1cm]{standalone} \begin{document} \begin{tikzpicture} \pgfmathsetmacro{\SIGMALstart}{-3} \pgfmathsetmacro{\SIGMALstop}{3} \pgfmathsetmacro{\SIGMALsamples}{50} \pgfmathsetmacro{\SIGMALstep}{(\SIGMALstop-\SIGMALstart)/(\SIGMALsamples-1)} \foreach \SIGMAL[parse=true] in {\SIGMALstart,\SIGMALstart+\SIGMALstep,...,\SIGMALstop} { \draw[ variable=\TAUL, domain=-3:3 ] plot ( {\SIGMAL*\TAUL}, {((\TAUL)^2-(\SIGMAL)^2)/2} ); } \end{tikzpicture} \end{document}

  • How to write at an angle along a straight line
    by rpapa on February 24, 2026 at 8:33 pm

    Using "sloped" I know how to write text parallel to a line, but how do I make the text also at an angle in the second case? \documentclass{article} \usepackage{tikz} \usetikzlibrary{positioning,matrix,calc} \begin{document} \begin{tikzpicture} \draw [red,ultra thick] (0,0)coordinate(A1)-- (3,5)coordinate(A2); \path (A1) -- (A2) node[sloped,pos=0.3,draw,fill=white]{aa}; \draw [blue,ultra thick] (1,0)coordinate(A3)-- (4,5)coordinate(A4); \foreach \i in {1,...,5} \node [sloped,draw,fill=white] at ($(A3)!{\i*10mm}!(A4)$) {\i}; \end{tikzpicture} \end{document} To be clear, the nodes must have a set distance between them. I am proposing my solution, adapted from your responses. \documentclass{article} \usepackage{tikz} \usetikzlibrary{positioning,matrix,calc} \begin{document} \begin{tikzpicture} \draw [red,ultra thick] (0,0)coordinate(A1)-- (3,5)coordinate(A2); \path (A1) -- (A2) node[sloped,pos=0.3,draw,fill=white]{aa}; \draw [blue,ultra thick] (1,0)coordinate(A3)-- (4,5)coordinate(A4); \foreach \i in {1,...,5} \node [sloped,draw,fill=white] at ($(A3)!{\i*10mm}!(A4)$) {\i}; \draw [blue,ultra thick] (2,0)coordinate(A3)-- (5,5)coordinate(A4); \pgfmathanglebetweenpoints{\pgfpointanchor{A3}{center}}{\pgfpointanchor{A4}{center}} \edef\angleAB{\pgfmathresult} \foreach \i in {1,...,5} \node [rotate=\angleAB,draw,fill=blue,minimum height=2mm,minimum width=8mm,text=yellow] at ($(A3)!{\i*10mm-10mm}!(A4)$) {\i}; \newcommand{\tracepark}[4]{ \draw (#1) -- (#2); \pgfmathanglebetweenpoints{\pgfpointanchor{#1}{center}}{\pgfpointanchor{#2}{center}} \edef\angleAB{\pgfmathresult} \foreach \i in {#3,...,#4} \node [rotate=\angleAB,draw,fill=blue,minimum height=2mm,minimum width=8mm,text=yellow] at ($(#1)!{\i*10mm-#3*10mm}!(#2)$) {\i}; } \coordinate(A5) at (-3,4); \coordinate(A6) at (3,-8); \tracepark{A5}{A6}{5}{10} \end{tikzpicture} \end{document}