• How to color \middle| to generate red vertical bar between two array?
    by Nasser on August 21, 2026 at 9:56 pm

    I have to use \middle| to create vertical bar as follows \documentclass[12pt]{book} \usepackage{amsmath} \usepackage{array} \usepackage{xcolor} \begin{document} \[ \left[ \begin{array}{cc} 3i&-3\\ 3&3i \end{array} \middle| \begin{array}{c} 0\\ 0 \end{array} \right] \] \end{document} Compiles to I just need to make the vertical bar red. Tried things such as \middle\color{red}| and \middle\textcolor{red}{|} but these produce Missing delimiter errors. the reason I need \middle| rather than the simpler cc|c is HTML conversion issue. In ordinary LaTeX, cc|c is preferable, but \middle| is currently only workaround that compiled and generates correct vertical bar in HTML. I just like to make the color red if possible, using the same above code, to make the bar more clear. There will only be one vertical bar. But number of rows and columns can change. No tikz solutions please. TL 2026

  • Hiding sections, but keep references with KOMA class
    by Archange on August 21, 2026 at 7:39 pm

    I’m trying to do exactly the same as in Hiding sections, but keep references, especially running the MWE from https://tex.stackexchange.com/a/683261/56823 but with the scrartcl KOMA class instead of the standard article one: \documentclass[a4paper]{scrartcl} \usepackage{environ} \NewEnviron{myhideenv}{% \setbox0\vbox{% \let\xxwrite\write \protected\def\write{\immediate\xxwrite}% {\tiny XX\BODY XX}} } \begin{document} The start of the report. \begin{myhideenv} \section{Testsection not printed} \label{testsection} Test not printed \end{myhideenv} Section reference is still correct: \ref{testsection} \section{This is section two} It is still correct when myhideenv is hidden. The end of the report. \end{document} It used to work up until TeX Live 2024, but not anymore (currently running up-to-date TeX Live 2026). Compiling with lualatex (which I use) gives: ! Incomplete \iffalse; all text was ignored after line 19. <inserted text> \fi l.19 \end{myhideenv} And with pdflatex: ! Emergency stop. <inserted text> }\endwrite l.19 \end{myhideenv}

  • How to pass keys values as expl3 token list
    by Denis Bitouzé on August 21, 2026 at 5:17 pm

    I would like to create a document command, say \marginaliagraphic, that: inserts a graphic (using \includegraphics) into the marginal note (using \marginalia from the marginalia package), allows the user to continue specifying the parameters of \marginalia and \includegraphics using key values, for example, like this: \marginaliagraphic[ , marginaliaset = { pos=left, valign=b } , graphicset = { width=.5\linewidth, angle=90 } ]{example-image} The following attempt fails, likely due to an expansion issue: \documentclass{article} \usepackage{marginalia} \usepackage{graphicx} \ExplSyntaxOn \keys_define:nn { mymodule } { , marginaliaset .tl_gset:N = \g__mymodule_marginalia_set_tl , graphicset .tl_gset:N = \g__mymodule_graphic_set_tl } \cs_new_protected:Npn \__mymodule_marginalia_graphic:nn #1 #2 { \keys_set:nn { mymodule } { #1 } \marginalia[\g__mymodule_marginalia_set_tl] { \includegraphics[\g__mymodule_graphic_set_tl]{#2} } } \NewDocumentCommand \marginaliagraphic { O{} m } { \__mymodule_marginalia_graphic:nn {#1} {#2} } \ExplSyntaxOff \begin{document} \marginaliagraphic[ , marginaliaset = { pos=left, valign=b } , graphicset = { width=.5\linewidth, angle=90 } ]{example-image} \end{document} How could I make something like this work?

  • How to manually put multiple tags within `array`?
    by Explorer on August 21, 2026 at 4:56 pm

    The post is the follow-up of this link, what I want is to add similar tags as below: \documentclass{article} \usepackage{bigdelim} \usepackage{amsmath} \begin{document} \[ \arraycolsep=2pt \begin{array}{r@{}rrrrr} \ldelim\{{2}{*} & x & + & 3y & = & 11 \tag{1}\\ & 2x & - & y & = & -9 \tag{2}\\[2pt] \ldelim\{{2.7}{*}[result ] & x & & & = & x_1 \tag{1'}\\ & & &\dfrac23 y & = & y_1 \tag{2'} \end{array} \] \end{document} For specific alignment requirement, I found the "syntax preference" with array and bigdelim package. However, we could not use \tags: ! Package amsmath Error: Multiple \tag. See the amsmath package documentation for explanation. Type H <return> for immediate help. ... l.10 ... & 2x & - & y & = & -9 \tag{2} \\[2pt] ? The solution for example this with empheq are hard to achieve multiple alignment points. How could I do that? Edit I have also tried the cases version with Werner's answer, if I switch cases to numcases environment provide by cases package, it can't be nested with matht environment: % Source - https://tex.stackexchange.com/a/765671 % Posted by Werner % Retrieved 2026-08-22, License - CC BY-SA 4.0 \documentclass{article} \usepackage{mathtools} \usepackage{cases} \begin{document} \begin{numcases}{\text{result~}} \phantom{2}x + 3y = \phantom{-9}\mathllap{11} \tag{1'} \\ 2x - \phantom{3}y = -9 \tag{2'} \end{numcases} Here is some text before: \begin{align} & \begin{numcases}{\phantom{\text{result~}}} \phantom{2}x + 3y = \phantom{-9}\mathllap{11} \\ 2x - \phantom{3}y = -9 \end{numcases} \\ \intertext{with some text inbetween the two, just because} & \begin{numcases}{\text{result~}} \phantom{2}x \phantom{{} + 3y} = \phantom{-9}\mathllap{x_1} \\ \phantom{2x + 3}\mathllap{\dfrac{2}{3}}y = \phantom{-9}\mathllap{y_1} \end{numcases} \end{align} and then some closing text at the end. \end{document} gives: ! Missing \endgroup inserted. <inserted text> \endgroup l.29 \end{align} ? Then I found the similar answer, but I still find it hard to apply it to this case...

  • Curve sketching in LaTeX document
    by M.R. Yegan on August 21, 2026 at 4:13 pm

    I wish to sketch a math graph in Latex Doc. my windows is 8.1 64 bit operating system. we need two packages tikz and pgf. I did not find these packages compatible with windows 8.1. Any help will be appreciated.

  • Adding document tagging messes up list indentation
    by hwlz on August 21, 2026 at 3:47 pm

    In adding tagging to documents (using pdfLaTeX, with TeX Live 2026), I've encountered a weird problem: equations mess up the indentation for lists. Here is a MWE: %%% Toggle this command to fix/mess up indentation \DocumentMetadata{ lang = en, pdfstandard = ua-2, pdfstandard = a-4f, %or a-4 tagging=on, tagging-setup={math/setup=mathml-SE} } %%% \documentclass{article} \usepackage[english]{babel} \begin{document} \begin{enumerate} \item First on the list, we have an equation $$ f(x) = x^2$$ followed by some text, \begin{enumerate} \item And \item A \item Sublist. \end{enumerate} \item Next on the list we have \begin{enumerate} \item A subitem with an equation $$f(x^2) = f(x)^2$$ \item Then \item Other subitems \end{enumerate} \end{enumerate} \end{document} With no tagging (i.e., no \DocumentMetadata command), I get: ... exactly as expected. But with tagging (including a \DocumentMetadate command), I get: What is going wrong here? Is there a workaround, to get the lists nicely indented?

  • Cannot \renewcommand{\Re} in LuaLaTeX with fontsetup
    by Alexander Voigt on August 21, 2026 at 2:27 pm

    I'm using LuaLaTeX and fontsetup to write a mathematical text about complex numbers. In my text I want to use "Re" and "Im" to denote the real and imaginary parts of a complex number, respectively, instead of the curly single letters R and I of plain-TeX. I use the following to re-define the \Re and \Im macros: \documentclass{standalone} \usepackage{fontsetup} \renewcommand{\Re}{\operatorname{Re}} \renewcommand{\Im}{\operatorname{Im}} \begin{document} $x=\Re(z)$, $y=\Im(z)$ \end{document} However, the curly single letters still appear in the output: . Note 1: When I comment out \usepackage{fontsetup} and use \usepackage{amsmath} and replace \renewcommand by \newcommand, the two-letter forms "Re" and "Im" are used. Note 2: The same issue appears when using the physics package: It re-defines \Re and \Im to \operatorname{Re} and \operatorname{Im} respectively. However, the single letter form still appears when using LuaLaTeX and fontspec. (I noticed this issue, because I'm using the physics package.) My question is: How can I overwrite the \Re and \Im macros to show the two-letter form "Re" and "Im" when using LuaLaTeX and fontspec? (I'd like to avoid creating new macros, because the files I'm writing are part of a larger project, which uses \Re and \Im all over the place and I want to be consistent.)

  • I want to create a character mapping in the Lualatex system
    by الطريق طالب العلم on August 21, 2026 at 2:17 pm

    I want to create a custom character map. I've already created one that works with Xelatex, but I can't work with it in Lualatex. Is it possible to create a map that supports Lualatex? This mapping LHSName "A-m-n" RHSName "UNICODE" Define a U+0061 ;a Define b U+0062 ;b Define c U+0063 ;c Define d U+0064 ;d Define e U+0065 ;e Define f U+0066 ;f Define g U+0067 ;g Define h U+0068 ;h Define i U+0069 ;i Define j U+006A ;j Define k U+006B ;k Define l U+006C ;l Define m U+006D ;m Define n U+006E ;n Define o U+006F ;o Define p U+0070 ;p Define q U+0071 ;q Define r U+0072 ;r Define s U+0073 ;s Define t U+0074 ;t Define u U+0075 ;u Define v U+0076 ;v Define w U+0077 ;w Define x U+0078 ;x Define y U+0079 ;y Define z U+007A ;z Define A U+0041 ;A Define B U+0042 ;B Define E U+0045 ;E Define G U+0047 ;G Define I U+0049 ;I Define N U+004E ;N Define O U+004F ;O Define S U+0053 ;S Define T U+0054 ;T Define U U+0055 ;U Define W U+0057 ;W Define Y U+0059 ;Y Define C U+005E ;^ << CARET Define UL U+005F ;_ << UNDERLINE Define P U+002E ;. << DOT Define V U+002C ;, << COMMA (_V_irgule) Define CO U+003A ;: << COLON Define SC U+003B ;; << SEMICOLON Define Ain U+0060 ;` Define F U+0046 ; F Define H U+0048 ;H << HAMZA Define Q U+0022 ;" << QUOTE Define Z U+002D ;Z << HYPHEN Define BAR U+007C ;| Define AN U+0061 U+004E ; aN Define LLAH U+006C U+006C U+005F U+0061 U+0068 ; ll_ah ;Define NUL U+00A6; ;;Define Ha U+0623 ;;Define Hi U+0625 ;;Define Hy U+0626 ;;Define Hw U+0624 ;;Define Hh U+06C0 ;; = U+0647 U+0654 ;;Define HA U+0622 ;;Define HB U+0640 U+0654 ;;Define HBAR U+0621 ; '| pass(Unicode) U+E000 > ; eliminate special code for capitalization in transliterations pass(Unicode) Class [VWL] = (U+0061 U+0065 U+0069 U+006F U+0075 ) ;(a e i o u) Class [AVWL] = (U+064B..U+0650); Class [LTR] = (U+0061..U+007A U+0041 U+0045 U+0047 U+0049 U+004F U+0055 U+0042 U+004E U+0054 U+0059 U+005E U+005F U+0022 U+0027 U+0060) ;a..z A E I O U B N T Y ^ _ " "" ` Class [BRACKETS] = (U+003C U+003E U+00AB U+00BB U+0028 U+0029 U+005B U+005D U+2018 U+2019 U+201C U+201D); < > () « » [ ] ‘ ’ “ ” Class [PUNCT] = (V SC P CO) Class [Iy] = (U+0049 U+0079) ;(I y) Class [Uw] = (U+0055 U+0077) ;(U w) Class [Uwu] = (U+0055 U+0077 U+0075) ;(U w u) ;Class [ae] = (U+0061 U+0065) ;(a e) ;Class [ou] = (U+0075 U+006F) ;(u o) Class [Iyi] = (U+0069 U+0079 U+0049) Class [UI] = (U+0049 U+0055) ; U I Class [Digits] = (U+0030..U+0039) Define BEG (#|Z|[BRACKETS]) Define END (#|[BRACKETS]|[PUNCT] U+0020|[PUNCT] #) Define ENDZ (#|[BRACKETS]|[PUNCT] U+0020|[PUNCT] #|Z) pass(Unicode) Class [Digits] = (U+0030..U+0039) Class [ArDigits] = (U+0660..U+0669) Class [ArEasternDigits] = (U+06F0..U+06F9) Class [VWL] = (U+0061 U+0065 U+0069 U+006F U+0075 ) ;(a e i o u) Class [LTR] = (U+0061..U+007A U+0041 U+0045 U+0049 U+004F U+0055 U+0042 U+004E U+0054 U+0059 U+005E U+002E U+005F U+0022 U+0027 U+0060) ;(a..z A E I O U B N T Y ^ . _ " "" `) e > U+0621 a > U+0627 b > U+0628 c > U+FE9F t > U+062A C t > U+062B UL (t|s) > U+062B j > U+062C H > U+062D C H > U+062E d > U+062F C d > U+0630 r > U+0631 C r > U+0632 s > U+0633 C s > U+0634 S > U+0635 C S > U+0636 T > U+0637 C T > U+0638 A > U+0639 C A > U+063A f > U+0641 q > U+0642 k > U+0643 l > U+0644 m > U+0645 n > U+0646 h > U+0647 w > U+0648 y > U+064A F > U+064E

  • How to typeset these two `cases` with multiple alignment requirement?
    by Explorer on August 21, 2026 at 2:13 pm

    Here below is what I want: the image above was generated by tabularray: \documentclass{article} \usepackage{showframe} \usepackage{tabularray} \UseTblrLibrary{tikz} \usetikzlibrary{decorations.pathreplacing} \usetikzlibrary{calligraphy} \usepackage{amsmath} \begin{document} \[ \begin{tblrtikzabove} \draw[decorate,decoration={calligraphic brace,mirror, amplitude=1.5mm},thick] ([yshift=-2pt]h1-|v2) -- ([yshift=+2pt]h3-|v2); \draw[decorate,decoration={calligraphic brace,mirror, amplitude=1.5mm},thick] ([yshift=-2pt]h3-|v2) -- ([yshift=+2pt]h5-|v2); \end{tblrtikzabove} \begin{tblr}{ % hlines, vlines, colspec = {r*{5}{r}}, columns = {rightsep=2pt, leftsep=2pt}, cell{1,3}{1} = {r = 2, c = 1}{m}, } & x & + & 3y & = & 11 \\ & 2x & - & y & = & -9 \\ \text{result\;\;} & x & & & = & x_1 \\ & & & \dfrac{2}{3}y & = & y_1 \end{tblr} \] \end{document} However, I was not sure whether the spacing was "correct" as amsmath's convention. In other word, I wonder whether there exist more "math"-like solution. Here below is my code with IEEEeqnarray, but, I found it hard to handle \{: % https://tex.stackexchange.com/a/147822 % https://tex.stackexchange.com/a/149396 \documentclass{article} \usepackage{showframe} \usepackage{amsmath} \usepackage{ieeetrantools} \begin{document} \begin{IEEEeqnarray*}{urCrCr} & x &+& 3y & = & 11 \\ & 2x &-& y & = & -9 \\ result & x & & & = & x_1 \\ result & & & \dfrac{2}{3}y & = & y_1 \end{IEEEeqnarray*} \end{document} Any suggestions about this?

  • How to nested `tabular` as column content within `IEEEeqnarray` of `ieeetrantools`?
    by Explorer on August 21, 2026 at 11:42 am

    This post is the follow-up of my previous answer: \documentclass{article} \usepackage{IEEEtrantools} \usepackage{newtx} \usepackage{lipsum} \usepackage{fixdif} \usepackage{array} \begin{document} \lipsum[1] \begin{IEEEeqnarray*}{rCl+s}% \left.\frac{\d f}{\d x}\right|_{x=3} &=& \frac{1}{\sqrt{\cdots}}& \hspace*{-1em}$\displaystyle\mathcolor{cyan}{\begin{aligned}\frac{\d}{\d x}(-(-25-x^2))^{1/2} \\ = \dots \end{aligned}} $\\[.5cm] y^2&=&x^2+\sin xy& \\ \frac{\d }{\d x}\left(y^2\right) &=& \frac{\d }{\d x}\left(x^2\right) + \frac{\d }{\d x}\left(\sin xy\right) & \begin{tabular}{>{\color{cyan}}l}Differentiate both sides\\% w.r.t.\ $x$\end{tabular}\\% 2y\frac{\d y}{\d x} &=& 2x+\cos(xy)\frac{\d}{\d x}(xy) & \begin{tabular}{>{\color{cyan}}l}Treating $y$ as a function \\ of $x$ and using the Chain Rule\end{tabular} \end{IEEEeqnarray*} \lipsum[2] \end{document} However, there are three \begin{tabular}{>{\color{cyan}}l}s, I fount it not so elegant here, so I try to put it into a custom column: \documentclass{article} \usepackage{IEEEtrantools} \usepackage{newtx} \usepackage{lipsum} \usepackage{fixdif} \usepackage{array} \IEEEeqnarraydefcol{P}{\begin{tabular}{>{\color{cyan}}l}}{\end{tabular}} \begin{document} \lipsum[2][1-3] \begin{IEEEeqnarray*}{rCl+P}% \left.\frac{\d f}{\d x}\right|_{x=3} &=& \frac{1}{\sqrt{\cdots}} &{some text some\\ other text}\\[.5cm] y^2&=&x^2+\sin xy& \\ \frac{\d }{\d x}\left(y^2\right) &=& \frac{\d }{\d x}\left(x^2\right) + \frac{\d }{\d x}\left(\sin xy\right) & {\textDifferentiate both sides\\ w.r.t.\ $x$} \\ 2y\frac{\d y}{\d x} &=& 2x+\cos(xy)\frac{\d}{\d x}(xy) & {Treating $y$ as a function \\of $x$ and using the Chain Rule} \end{IEEEeqnarray*} \lipsum[3][1-3] \end{document} However, it complains that the \\ he dislike: ! Missing } inserted. <inserted text> } l.14 &{some text some\\ o ther text}\\[.5cm] ? I wonder any suggestions to declare tabular inside IEEEeqnarray?

  • Using poetrytex, how to adjust vertical space between poems and their titles?
    by Yves on August 21, 2026 at 8:28 am

    My question is related to preparing a book of the poems that a friend wrote. I have selected, for various reasons, the package poetrytex. The beginning of a poem is called by \begin{poem}{Title}{Author, or year, or something}. This looks fine when the two arguments are used. However in my case, the second, typically the author, will be empty, since all the poems will be from a single author. The vertical space between the title and the poem is then increased, and does not look nice. Moreover, chances are that a long poem will spill a few lines on the following page, definitely not suitable. How to reduce consistently the space between the title and the first poem line? \documentclass[11pt, a5paper,draft]{book} \usepackage[english]{babel} \usepackage[numberpoems]{poetrytex} \usepackage{showframe} \begin{document} \begin{poem}{A Limerick}{Anonymous} There was an old party of Lyme\\ Who married three wives at one time. \\ When asked: ‘Why the third?’ \\ He replied: ‘One’s absurd, \\ And bigamy, sir, is a crime.’ \end{poem} \begin{poem}{A Limerick}{} There was an old party of Lyme\\ Who married three wives at one time. \\ When asked: ‘Why the third?’ \\ He replied: ‘One’s absurd, \\ And bigamy, sir, is a crime.’ \end{poem} \end{document}

  • Making document with big letter size [duplicate]
    by Maths Rahul on August 21, 2026 at 5:45 am

    In daily typing of mathematical work in latex, I am following the initial matter below: \documentclass[a4paper,12pt]{article} \usepackage[a4paper, total={6in, 8in}]{geometry} \usepackage{amssymb, amsfonts, amssymb, amsthm, amsmath} \begin{document} Hello Hello ..... Hello Hello ..... \end{document} I observed with above selection of document-type and size (6 by 8 inch): The word Hello can be typed 14 times. The line, containing 14 Hello words, can be typed a maximum of 40 times on one page. Question: How can I increase the size of fonts, for words as well as mathematical text throughout the document by simpler commands? Question: How can I put fewer than 14 instances of word Hello in a row? How can I reduce the number of lines to 30 or even less? Why am I doing it? This is because my class is narrow, and has 25 rows, and I can't show text in size of 12pt. I need to double it, to visualize to all audience. (Note: I am avoiding Beamer, since I can't show simpler proofs in one slide.) And, I am distributing the material after the class, which is easily readable with respect to font size.

  • How to create a macro to be concatenated?
    by D G on August 21, 2026 at 5:13 am

    The macro \PointLabel is made to simplify creating label on a graph. \fill \PointLabel[above]{-2} \PointLabel[below]{-1} ; Here below is the full code: \documentclass[tikz,border=1cm,12pt]{standalone} \usepackage{amsmath} \usepackage{xintexpr} \newcommand\fx[1]{(#1)^2} \newcommand{\Rational}[1]{% \xintifboolexpr{\xinttheexpr (#1)<0\relax} {-\xintTeXFrac{\xinttheexpr reduce(-( #1 ))\relax}} {\xintTeXFrac{\xinttheexpr reduce(#1)\relax}} } \newcommand{\CoordLabel}[1]{$\left(\Rational{#1},\Rational{\fx{#1}}\right)$} \newcommand{\PointLabel}[2][]{(#2,{\fx{#2}}) circle (2pt) node[#1]{\CoordLabel{#2}}} \begin{document} \begin{tikzpicture}[scale=1.2] \draw[->] (-3.5,0)--(3.5,0) node[right] {$x$}; \draw[->] (0,-1)--(0,10) node[above] {$y$}; \draw[blue,thick,samples=20,domain=-3:3] plot(\x,{\fx{\x}}); \fill (0,{\fx{0}}) circle(2pt) node[below right,red]{\CoordLabel{0}} (1,{\fx{1}}) circle(2pt) node[right]{\CoordLabel{1}} (2,{\fx{2}}) circle(2pt) node[right]{\CoordLabel{2}} (2.5,{\fx{2.5}}) circle(2pt) node[right]{$y=f(x)$} ; % the following causes errors. \fill \PointLabel[above]{-2} \PointLabel[below]{-1} ; \end{tikzpicture} \end{document} However it produces errors: ! Package tikz Error: Giving up on this path. Did you forget a semicolon?. See the tikz package documentation for explanation. Type H <return> for immediate help. ... l.40 \PointLabel [above]{-2} ?

  • glossaries: can the acronym-list be name:Description?
    by Engelbert Buxbaum on August 20, 2026 at 5:07 pm

    The following example: \documentclass{article} \usepackage[colorlinks]{hyperref} \usepackage[acronym,nomain,% only acronym-list nopostdot,% entries not finished with full-stop as not complete sentences nonumberlist,% entries not numbered shortcuts% use same commands as acronym package ]{glossaries} \begin{filecontents}[overwrite]{TestAcro.inc} \newacronym[description={pattern recognition technique}]{svm}{SVM}{support vector machine} \newacronym[description={cases in cluster analysis}]{otu}{OTU}{operational taxonomic unit} \newacronym[description={clustering criterion, average linkage}]{UPGMA}{UPGMA}{unweighted pair group method with arithmetic mean} \end{filecontents} \setacronymstyle{long-short-desc} \setglossarystyle{altlist} \makenoidxglossaries \loadglsentries[acronym]{TestAcro.inc} \begin{document} Put all \acfp{otu} into a \acl{svm}, or use cluster analysis with the \acs{UPGMA}-criterion. \Acsp{otu} will be grouped by similarity. \printnoidxglossary[sort=word,type=acronym] \end{document} leads to output like operational taxonomic unit (OTU) cases in cluster analysis In a list of acronyms, IMHO, the acronym should come first and then the long form, like OTU operational taxonomic unit: cases in cluster analysis The list should also be sorted by acronym. How can I achieve that? Thanks in advance Engelbert

  • prg_set_conditional with "p" style gives error when "T" and "F" do not
    by karlh on August 20, 2026 at 4:10 pm

    I have a working subroutine that uses \prg_set_conditional:Nnn to define a true/false branch. However, I encountered a situation in which I needed to test two things at once, so I tried using the p style conditional with \bool_lazy_and:nnTF, and I got an error. I now realize that even a trivial function returns the same error; here is a minimal working example: \ExplSyntaxOn \prg_set_conditional:Npnn \my_function:n #1 { p, T, F, TF } { \bool_set_false:N \l_tmpb_bool \prg_return_false: } \my_function:nTF { h } { \bool_set_true:N \l_tmpa_bool } { \bool_set_false:N \l_tmpa_bool } \typeout{TEST:~ \bool_to_str:N \l_tmpa_bool} \bool_set:Nn \l_tmpa_bool { \my_function_p:n {h} } %\bool_set:Nn \l_tmpa_bool { \int_compare_p:nNn { 2 } > { 1 } } \typeout{TEST:~ \bool_to_str:N \l_tmpa_bool} \stop If I uncomment the one line and comment out the one above it, it works fine, so I know it's something in my definition (not usage) that is wrong. Why can't I, say, set boolean variables inside a "_p" conditional? Are there other things that are allowed inside "T" and "F" conditionals but not "p" conditionals?

  • Promote the "fake column" and "fake row" feature with `tabularray`?
    by Explorer on August 20, 2026 at 3:29 pm

    This post is the follow-up of my previous answer, preceeding to F.Pantigny's nicematrix new feature "false row" and "false column", here below is the simplified version: % Source - https://tex.stackexchange.com/a/763357 \documentclass{article} \usepackage{xcolor} \usepackage{tabularray} \setlength\lTblrDefaultHruleWidthDim{2pt}% \setlength\lTblrDefaultVruleWidthDim{2pt}% \begin{document} \begin{tblr}{ colspec={*{8}{c}}, stretch = 0, colsep = 0pt, rowsep = 0pt, rows = {ht=1cm,font=\Large}, columns = {wd=1cm}, row{2} = {ht=.15cm}, column{2} = {wd=.15cm}, hlines = {3-Z}{solid}, hline{3-Z} = {1}{solid}, vline{3-Z} = {1}{solid}, vlines = {3-Z}{solid}, cells = { mode=math, halign=c }, cell{3}{3} = {magenta} } & & e & r & r^2 & f & fr^2 & fr \\ & & & & & & & \\ e & & e & r & r^2 & f & fr^2 & fr \\ r & & r & r^2 & e & fr^2 & fr & f \\ r^2 & & r^2 & e & r & fr & f & fr^2 \\ f & & f & fr & fr^2 & e & r^2 & r \\ fr^2& & fr^2 & f & fr & r & e & r^2 \\ fr & & fr & fr^2 & f & r^2 & r & e \end{tblr} \end{document} It looks good, but the code was not so elegant since I have commented here: Consider the "e" which was colored magenta, semantically, it would be cell{2}{2}, but in my code, that was cell{3}{3}, which is not so friendly for further modification The "fake row/column" distance was not easy to control. In my code, that is row{2} = {ht=.15cm} and column{2} = {wd=.15cm}, together with colspec={*{8}{c}},stretch = 0,colsep = 0pt,rowsep = 0pt In a word, I found my code was existing rooms to refine, maybe introduce similar "fake row/column" feature. Any suggestion on this?

  • Revtex adds "en" infront of date and section headers
    by Harry Mullineaux Sanders on August 20, 2026 at 12:40 pm

    I'm using revtex to write a paper manuscript, using TexStudio as my latex environment. When I compile my file, "en" keeps appearing infront of the date and the section headers. No solutions I've found have been able to fix this. It's also worth noting that if I compile my paper using overleaf I don't get the same problem. Here's an example using the preamble I use and the pdf it creates. \documentclass[physrev, aps,twocolumn, amsmath, amssymb, floats, floatfix,longbibliography,english]{revtex4-2} \usepackage{graphicx} \usepackage{dcolumn} \usepackage{bm} \usepackage{hyperref} \hypersetup{ colorlinks, citecolor=black, filecolor=black, linkcolor=black, urlcolor=black} \usepackage{braket} \usepackage{soul} \usepackage{lipsum} \begin{document} \title{Paper Title} \author{Author 1} %\email{123@uni.ac.uk} \affiliation{University} \author{Author 2} \affiliation{University} \date{\today} \begin{abstract} We did some stuff. % \end{abstract} \maketitle \section{Introduction} \lipsum[1-3] \section{Section 1} \lipsum[1-3] \end{document}

  • How to make emojis transparently available LaTeX? [duplicate]
    by H-J Salchow on August 20, 2026 at 8:46 am

    I like to use emojis transparently in my source. In other words, I like to type something like Hallo 🌍 directly in my LaTeX file and, after compilation, see the same emoji in the resulting PDF. My current solution uses LuaLaTeX together with the '''emotion''' package. The problem is, that every new emoji requires adding two lines to the preamble: an \emotiondef definition, and a corresponding buffer:gsub(...) replacement in a Lua callback. As the number of emojis grows, the preamble becomes longer and longer, which feels rather inelegant. Is there a more elegant way to achieve this? Here is a mwe: \documentclass{article} \usepackage{emotion} \emotiondef{world}{🌍} \directlua{ luatexbase.add_to_callback( "process_input_buffer", function(buffer) buffer = buffer:gsub("🌍", "\\emotion{world}") return buffer end, "apple_emojis" ) } \begin{document} Hello 🌍 \end{document}

  • adjmulticol in one column bidi RTL
    by الطريق طالب العلم on August 20, 2026 at 8:16 am

    I have a problem with the adjmulticol package; when the text is within two columns, \begin{adjmulticols}{2}{-.5cm}{-5.5cm} displays correctly, but when it's within a single column,\begin{adjmulticols}{1}{-.5cm}{-5.5cm} the text doesn't display correctly. This code \documentclass[twoside]{article} \usepackage{geometry} \geometry{ paperwidth=8.49in, paperheight=297mm, % right=.8in, inner=7.5cm,outer=2.5cm, top=72pt, headsep=16pt, textwidth=320pt, marginparsep=20pt, marginparwidth=180pt, textheight=680pt, reversemarginpar } \usepackage{fontspec} \usepackage{polyglossia} % Or the standard 'bidi' package \usepackage{adjmulticol} \usepackage{lipsum} % Set up your primary RTL language (e.g., Arabic, Persian, Hebrew) \setmainlanguage{arabic} \newfontfamily\arabicfont[Script=Arabic]{Amiri} % Replace with your preferred font \begin{document} % Standard text layout here... % 1-Column Layout with adjusted left (inner) and right (outer) margins % Syntax: \begin{adjmulticols}{Number of Columns}{Left Margin Change}{Right Margin Change} \begin{adjmulticols}{2}{-.5cm}{-5.5cm} \section{Two-Column} \textbf{Now I want to use the outer margin because I need width.} \lipsum[1-10] \end{adjmulticols} %----Problem One-Column {1} \begin{adjmulticols}{1}{-.5cm}{-5.5cm} \section{One-Column} \textbf{Now I want to use the outer margin because I need width.} \lipsum[1-10] \end{adjmulticols} \end{document}

  • Multiple old documents get reloaded when launching SumatraPDF as an external viewer from TeXStudio
    by einpoklum on August 20, 2026 at 8:10 am

    I'm using TeXStudio 4.9.6 with SumatraPDF 3.6.1 - a match not made in heaven apparently - on Windows 11 25H2. Whenever I launch Sumatra as an external viewer for some PDF I'm working on - many windows get opened, trying to load other LaTeX documents' output I had previously opened with it. I edited the Sumatra settings file, and set RestoreSession = false but the behavior persists. However - if I just launch Sumatra from the start menu (with or without a document to load) - this doesn't happen. I am guessing TeXStudio is the culprit, somehow deciding it needs to tell Sumatra to load many documents. How can I get it to stop doing that?

  • Why doesn't longtable like \pagebreak in \NewDocumentCommand?
    by Psychonaut on August 20, 2026 at 12:16 am

    I need to conditionally insert page breaks in a manuscript; sometimes these breaks must occur within a longtable environment. It seems that longtable is fine with this if the command containing the \pagebreak was defined with \newcommand, but not with \NewDocumentCommand: \documentclass{article} \usepackage{longtable} \newcommand{\myPageBreakA}{\pagebreak} \NewDocumentCommand{\myPageBreakB}{}{\pagebreak} \begin{document} \begin{longtable}{l} foo \\ \pagebreak % this works bar \\ \myPageBreakA % this works too baz \\ \myPageBreakB % this doesn't work quux \\ \end{longtable} \end{document} Running the above example produces the following error: ! Misplaced \noalign. \pagebreak ->\noalign {\ifnum `}=0\fi \@testopt {\LT@no@pgbk -}4 l.14 \myPageBreakB % this doesn't work Why does this problem occur, and is there some easy way of working around it? Unlike this minimal example, my actual \myPageBreakB command uses some fairly complex argument processing logic, so I would prefer to define it with \NewDocumentCommand instead of \newcommand.

  • mémoire.tex: erreur: 294: Undefined control sequence. ^^I\begin{tabular}, please help [closed]
    by خالد بن حورية on August 19, 2026 at 5:59 pm

    \documentclass[12pt,a4paper]{article} % ===== 1. الحزم الأساسية للغة والخطوط ===== \usepackage{fontspec} \usepackage{polyglossia} \setdefaultlanguage{arabic} \setotherlanguage{french} \newfontfamily\arabicfont[Script=Arabic,Scale=1.2]{Amiri} \newfontfamily\titlefont[Script=Arabic,Scale=1.5]{Amiri} \newfontfamily\frenchfont{Times New Roman} % ===== 2. تخطيط الصفحة ===== \usepackage{geometry} \geometry{margin=1cm} % ===== 3. الحزم الرسومية والزخارف ===== \usepackage{graphicx} \usepackage{tikz} \usetikzlibrary{positioning,shadows.blur,decorations.pathmorphing,shapes.geometric,calc,shapes.multipart} \usepackage{pifont} \usepackage{fontawesome5} % ===== 4. حزم الجداول ===== \usepackage{array} \usepackage{multirow} \usepackage{booktabs} \usepackage{longtable} \usepackage{tabularx} \usepackage{tabularray} % <<<< الحزمة السحرية % ===== 5. الألوان ===== \usepackage[table]{xcolor} % ===== 6. الصناديق المزخرفة ===== \usepackage[most]{tcolorbox} \tcbuselibrary{skins} \usepackage[tikz]{bclogo} % ===== 7. الرؤوس والتذييلات ===== \usepackage{fancyhdr} \usepackage{lastpage} % ===== 8. حزم إضافية ===== \usepackage{amsfonts} \usepackage{titlesec} \usepackage[normalem]{ulem} % ===== 9. أوامر مخصصة ===== \makeatletter \providecommand{\beginR}{\beginL} \providecommand{\endR}{\endL} \makeatother \pagestyle{empty} \definecolor{gold}{RGB}{212,175,55} \definecolor{navy}{RGB}{10,30,80} % كحلي أنيق % تعريف بيئة للتعريف \newtcolorbox{ddef}{ enhanced, colback=blue!5, colframe=blue!70!black, fonttitle=\bfseries\large, coltitle=white, title=\faLightbulb \hspace{2pt} تعريف, boxrule=0pt, sharp corners, borderline={1pt}{0pt}{gold}, % خط ذهبي يزين المربع attach boxed title to top right={yshift=-2mm,xshift=-2mm}, boxed title style={colback=blue!70!black, colframe=gold} % شريط علوي أزرق مع إطار ذهبي } % تعريف بيئة للنشاط \newtcolorbox{aact}{ enhanced, colback=red!5, colframe=red!70!black, fonttitle=\bfseries\large, coltitle=white, title=\faTasks \hspace{2pt} نشاط, boxrule=0pt, sharp corners, borderline={1pt}{0pt}{gold}, attach boxed title to top right={yshift=-2mm,xshift=-2mm}, boxed title style={colback=red!70!black, colframe=gold} } % تعريف بيئة للمثال \newtcolorbox{eex}{ enhanced, colback=green!5, colframe=green!60!black, fonttitle=\bfseries\large, coltitle=white, title=\faPen \hspace{2pt} مثال, boxrule=0pt, sharp corners, borderline={1pt}{0pt}{gold}, attach boxed title to top right={yshift=-2mm,xshift=-2mm}, boxed title style={colback=green!60!black, colframe=gold} } % تعريف بيئة للتطبيق \newtcolorbox{aapp}{ enhanced, colback=orange!5, colframe=orange!80!black, fonttitle=\bfseries\large, coltitle=white, title=\faCheck \hspace{2pt} تطبيق, boxrule=0pt, sharp corners, borderline={1pt}{0pt}{gold}, attach boxed title to top right={yshift=-2mm,xshift=-2mm}, boxed title style={colback=orange!80!black, colframe=gold} } % تعريف بيئة للعمل المنزلي \newtcolorbox{hhw}{ enhanced, colback=navy!5, % خلفية كحلي فاتح colframe=navy, % إطار كحلي غامق fonttitle=\bfseries\large, coltitle=gold, % العنوان بالذهبي title=\faHome \hspace{2pt} عمل منزلي, boxrule=0pt, sharp corners, borderline={1pt}{0pt}{gold}, % خط ذهبي يزين المربع attach boxed title to top right={yshift=-2mm,xshift=-2mm}, boxed title style={colback=navy, colframe=gold, coltext=gold} } % تحسين التباعد \setlength{\parindent}{0pt} \setlength{\parskip}{0.1cm} % ===== تصميم مدمج لرأس المذكرة ===== \newtcolorbox{memohead}{ enhanced, colback=white!95!gray, % خلفية متدرجة فاتحة colframe=blue!70!black, % إطار داخلي أزرق غامق boxrule=1.5pt, sharp corners=all, rounded corners=all, width=\textwidth, before=\vspace{0.2cm}, after=\vspace{0.2cm}, drop shadow=black!30, halign=center, overlay={ % خط علوي متدرج أخضر \draw[left color=green!60!black,right color=green!20!white, line width=2.5pt] (frame.north west)--(frame.north east); % خط سفلي متدرج أحمر \draw[left color=red!60!black,right color=red!20!white, line width=2.5pt] (frame.south west)--(frame.south east); % إطار خارجي ذهبي رفيع \draw[gold, line width=1pt, rounded corners=3pt] (frame.north west)--(frame.south west)--(frame.south east)--(frame.north east)--cycle; } } % ===== تصميم العنوان الرئيسي ===== \titleformat{\section} {\normalfont\Large\bfseries\color{red}} % حجم متوسط + أحمر {}{0pt}{} % بدون ترقيم \titlespacing*{\section}{0pt}{2ex plus 1ex}{1ex} % ===== تصميم العنوان الثانوي ===== \titleformat{\subsection} {\normalfont\large\bfseries\color{blue}} % حجم متوسط + أزرق {}{0pt}{} % بدون ترقيم \titlespacing*{\subsection}{0pt}{1.5ex plus 1ex}{1ex} \begin{document} \AddToHook{shipout/background}{% \begin{tikzpicture}[remember picture,overlay] % إطار أزرق حول الصفحة \draw [blue,line width=2mm] (current page.south west) rectangle (current page.north east); % كتابة رقم الصفحة في الأسفل \node[above right=1cm and 1cm,font=\bfseries] at (current page.south west) {\textarabic{صفحة \thepage\ من \pageref{LastPage}}}; \end{tikzpicture} } % ===== عنوان رئيسي مدمج ===== \begin{center} {\titlefont \fontsize{20}{22}\selectfont \textbf{\textcolor{blue!70!black}{مذكرة رقم: 03}}} \vspace{0.05cm} % زخرفة بسيطة \begin{tikzpicture} \draw[blue!50!black, thick] (0,0) -- (5,0); \draw[green!60!black, thick] (0,0) .. controls (0.2,0.2) and (0.4,0) .. (0.6,0); \draw[green!60!black, thick] (5,0) .. controls (4.8,0.2) and (4.6,0) .. (4.4,0); \end{tikzpicture} \end{center} \vspace{0.05cm} % ===== رأس المذكرة المبسط ===== \begin{memohead} % الصف الأول: ثانوية + السنة في سطر واحد \noindent \begin{minipage}{0.48\textwidth} {\textcolor{blue!70!black}{\textbf{ثانوية:}} حميدي عيسى – أولاد دراج} \end{minipage} \hfill \begin{minipage}{0.48\textwidth} {\textcolor{blue!70!black}{\textbf{السنة الدراسية:}} 2026--2027} \end{minipage} \vspace*{0.1cm} % الصف الثاني: اليوم + المستوى \noindent \begin{minipage}{0.48\textwidth} {\textcolor{green!70!black}{\textbf{اليوم:}} .......... \quad \textcolor{green!70!black}{\textbf{المدة:}} ساعة} \end{minipage} \hfill \begin{minipage}{0.48\textwidth} {\textcolor{green!70!black}{\textbf{المستوى:}} السنة الثانية علوم تجريبية} \end{minipage} \vspace*{0.1cm} % الصف الثالث: الميدان + المحور \noindent \begin{minipage}{0.48\textwidth} {\textcolor{orange!80!black}{\textbf{الميدان:}} التحليل} \end{minipage} \hfill \begin{minipage}{0.48\textwidth} {\textcolor{orange!80!black}{\textbf{المحور:}} الدوال العددية} \end{minipage} \vspace*{0.15cm} % الموضوع - حجم وسط \begin{center} {\textcolor{red!70!black}{\textbf{الموضوع:}} العمليات على دوال عددية} \end{center} \end{memohead} \vspace{0.1cm} % ===== المكتسبات القبلية ===== % ===== القسم ===== \begin{center} \begin{itemize} \item[{\textcolor{green!70!black}{\textbf{\ding{72}}}}] \textcolor{green!70!black}{\textbf{المكتسبات القبلية:}} مفاهيم أولية حول الدوال العددية. \item[{\textcolor{red!70!black}{\textbf{\ding{72}}}}] \textcolor{red!70!black}{\textbf{الكفاءات المستهدفة:}} مراجعة وتذكير بالمفاهيم العامة للدوال العددية. \item[{\textcolor{blue!70!black}{\textbf{\ding{72}}}}] \textcolor{blue!70!black}{\textbf{الأدوات المستعملة:}} المنهاج، الكتاب المدرسي، مراجع، الأنترنت. \end{itemize} \end{center} \begin{center} \begin{tabular}{|c|c|c|} \hline \rowcolor{gold!40} \textbf{المرحلة} & \textbf{عناصر الدرس} & \textbf{المدة} \\ \hline مرحلة الانطلاق & مراجعة المكتسبات القبلية وربطها بالدرس الجديد & 10 دقائق \\ مرحلة الاكتشاف & تقديم التعريفات الأساسية مع أمثلة توضيحية & 20 دقيقة \\ مرحلة بناء التعلمات & نشاط حول العمليات على الدوال + شرح الحل & 25 دقيقة \\ مرحلة التطبيق & تمرين فردي أو جماعي مع مناقشة النتائج & 15 دقيقة \\ مرحلة التقويم & تمرين ختامي أو أسئلة قصيرة للتأكد من الفهم & 10 دقائق \\ \end{tabular} \end{center} \end{document}

  • Overlay/Stamp a multipage PDF with a stamp defined as a single page PDF [duplicate]
    by mf67 on August 19, 2026 at 4:45 pm

    I have a multi-page PDF file (let's call it doc.pdf) a single-page PDF file (let's call it stamp.pdf) Both have the same format. I want to apply the contents of stamp.pdf as a stamp (on top/overlay) to each page of doc.pdf, starting from page 4 onward. Is there a package that supports this? Edit: Please see https://www.trumph.se/pdffiles/EditionSamples/T-002001.pdf. The "base document" is stamped starting on page 4 with another PDF containing the stamp. This stamping is generated with an external program, but I would like to do it in LaTeX. The base document is made using LaTeX (the music is mounted using pdfpages), so a possible solution could also be to use a "\stamp" command in that file, instead of mounting two pdf files in layers. But the latter alternative is also an interesting option, where the base document is not a native LaXTeX document, but any PDF.

  • Accessible PDFs while altering \maketitle, \section, etc
    by James on August 19, 2026 at 2:28 pm

    I'm trying to make the handouts I make for my classes (more) accessible using the instructions outlined by overleaf. In particular, I'm trying to make the pdf readable by a screen reader. I don't like how much space the article class leaves around the title and sectioning commands, so I've previously redefined those commands to fit my aesthetic preferences. For instance (borrowed from Roger Cortesi's Handout package) I've used the following macro to redefine \section \renewcommand\section{\@startsection {section}{2}{0mm}{0.1\baselineskip}{0.1\baselineskip}{\normalfont\large\textbf}} I'm hoping that the use of \@startsection will mean that the section headings get tagged properly, but I am not sure. Can anyone confirm? I've also redefined \maketitle, but it's much more naive and doesn't use \@maketitle, which I assume is necessary so that the title things get properly tagged? Finally, I like to have headers and footers that contain useful information (handout title, course title, course code etc). Can anyone explain, or point me at a resource, as to how screen readers will interact with headers and footers?

  • Rotate a wide table without rotating the page using Latex [closed]
    by Ines on August 19, 2026 at 9:02 am

    I am struggling to fit a large table into a portrait-oriented page in my thesis. What I would like to achieve is: The page itself should remain portrait-oriented. Only the table should be rotated/landscape-oriented, so that I can use the full width of the page for a wide table. The surrounding text and subsequent pages should remain in the normal portrait orientation. I am using Overleaf and currently trying to achieve this with the lscape package. However, with lscape, the entire page is rotated, including the page itself, rather than just the table. In other words, I get a landscape page containing a landscape table, whereas I want a portrait page containing a landscape table. It may be relevant but I am using the MIT thesis template [1]. Here is a simplified example using synthetic data: \documentclass[twoside]{report} \usepackage[a4paper]{geometry} \usepackage{array} % for p{} columns \usepackage{longtable} % multi-page tables \usepackage{colortbl} % \rowcolor \usepackage{xcolor} % HTML colors \usepackage{lscape} % landscape environment \usepackage{graphicx} % \rotatebox, used by \mcrot below \usepackage{pdfpages} \newcommand{\mcrot}[4]{\multicolumn{#1}{#2}{\rotatebox{#3}{#4}}} \begin{document} \noindent \clearpage \begin{landscape} \tiny \begin{longtable}{p{2cm}p{0.9cm}p{0.9cm}p{0.9cm}|p{0.9cm}p{0.9cm}p{1cm}p{1.3cm}p{0.9cm}|p{1.3cm}p{1cm}p{1cm}p{0.9cm}p{0.9cm}} \caption{Minimal example table} \label{tab:mre}\\ \hline \rowcolor[HTML]{C0C0C0} & \multicolumn{3}{c|}{\textbf{Group A}} & \multicolumn{5}{c|}{\textbf{Group B}} & \multicolumn{5}{c}{\textbf{Group C}} \\ \rowcolor[HTML]{C0C0C0} \textbf{Item} & \mcrot{1}{l}{75}{Column 1} & \mcrot{1}{l}{75}{Column 2} & \mcrot{1}{l}{75}{Column 3} & \mcrot{1}{|l}{75}{Column 4} & \mcrot{1}{l}{75}{Column 5} & \mcrot{1}{l}{75}{Column 6} & \mcrot{1}{l}{75}{Column 7} & \mcrot{1}{l}{75}{Column 8} & \mcrot{1}{|l}{75}{Column 9} & \mcrot{1}{l}{75}{Column 10} & \mcrot{1}{l}{75}{Column 11} & \mcrot{1}{l}{75}{Column 12} & \mcrot{1}{l}{75}{Column 13} \\ \hline \endfirsthead \caption[]{\textit{(continued)}} \\ \hline \rowcolor[HTML]{C0C0C0} & \multicolumn{3}{c|}{\textbf{Group A}} & \multicolumn{5}{c|}{\textbf{Group B}} & \multicolumn{5}{c}{\textbf{Group C}} \\ \rowcolor[HTML]{C0C0C0} \textbf{Item} & \mcrot{1}{l}{75}{Column 1} & \mcrot{1}{l}{75}{Column 2} & \mcrot{1}{l}{75}{Column 3} & \mcrot{1}{|l}{75}{Column 4} & \mcrot{1}{l}{75}{Column 5} & \mcrot{1}{l}{75}{Column 6} & \mcrot{1}{l}{75}{Column 7} & \mcrot{1}{l}{75}{Column 8} & \mcrot{1}{|l}{75}{Column 9} & \mcrot{1}{l}{75}{Column 10} & \mcrot{1}{l}{75}{Column 11} & \mcrot{1}{l}{75}{Column 12} & \mcrot{1}{l}{75}{Column 13} \\ \hline \endhead \hline \multicolumn{14}{r}{\textit{Continued on next page}} \\ \endfoot \hline \endlastfoot Item A & X & & & & & & & & & & & & \\ \rowcolor[HTML]{EFEFEF} Item B & X & & & & & & & & & & & X & \\ Item C & X & & & & & & & & & & & X & X \\ \rowcolor[HTML]{EFEFEF} Item D & X & & & X & & & & & X & & & & X \\ Item E & X & & & & X & X & & & & & & & X \\ \rowcolor[HTML]{EFEFEF} Item F & & & X & & & & & & X & X & X & & X \\ Item G & & & X & & & & X & & X & X & X & & \\ \end{longtable} \end{landscape} \clearpage \noindent \end{document} Is there a way in LaTeX to rotate only the table by 90 degrees while keeping the physical page in portrait orientation? EDIT: I figured that issue was that I used the package pdfpages, which kept me from getting the behavior I wanted. Specially with the MITthesis template, removing the pdfpages, gave me the lscape package behaviour.

  • Including image omits page style
    by smthint on August 19, 2026 at 4:28 am

    I want to include image on my chapter title page but don't want the page number to appear there. This is my code: \documentclass[12pt]{book} \usepackage{parskip} \usepackage{microtype} \usepackage{geometry} \usepackage{graphicx} \usepackage{hyperref} \usepackage{fancyhdr} \usepackage{etoolbox} \usepackage{titlesec} \usepackage{lipsum} \geometry{ paperwidth=6in, paperheight=9in, margin=0.75in } \fancyhead[L,C,R]{} \renewcommand{\headrulewidth}{0pt} \cfoot{} \fancyfoot[LE, RO]{\thepage} \begin{document} \pagestyle{fancy} \chapter{my chapter} \thispagestyle{empty} \includegraphics[width=\textwidth]{./image.png} \lipsum[1-10] \end{document} But when image is included, the page number is still appearing. When the image is not included, the code works as intented: the page number is not showing on the chapter title page and starts to appear on the next pages. \begin{document} \pagestyle{fancy} \chapter{my chapter} \thispagestyle{empty} \lipsum[1-10] \end{document} How to stop page number appearing on the chapter title page when image is included?

  • How to use visualcounter with r2l text? [closed]
    by Aviroum on August 18, 2026 at 6:27 pm

    How can I use visualcounter with r2l text to reverse predefined counters direction? \mainlanguage[ar] \setuppapersize[A6] \setupdirections[bidi=global,method=one] \setupalign[r2l] \setupbodyfont[amiri,17.3pt] \usemodule[visualcounter] \definevisualcounter [visualpage] [markers]%[mayanumbers][progressbar]% [width=.7EmWidth, height=0.3ExHeight,distance=width/12, counter=userpage, maxwidth=\textwidth, ] \setupfootertexts[\usevisualcounter{visualpage}] \setuppagenumbering[location=] \setupvisualcounter[markers][mpsetups=visualcounter::markers:square] \setuphead[chapter][numbercolor=orange, numberstyle={\switchtobodyfont[ss,25pt]\bf},alternative=normal,after={\blank[20pt]},distance=2em] \setupinteractionscreen[option=max] \starttext \chapter{هذا فصل} و هذا نص قصير \chapter{هذا فصل} و هذا نص قصير \chapter{هذا فصل} و هذا نص قصير \stoptext

  • Conflict with `luatexja` and `\DocumentMetadata{tagging=on}`?
    by Explorer on August 18, 2026 at 7:52 am

    Here below is the code, if I load luatexja, it complains: \DocumentMetadata{tagging=on} \documentclass{article} \usepackage{luatexja}% \begin{document} Text with \verb!\item! inline. \end{document} ! Package tagpdf Error: there is no open structure on the stack Type <return> to continue. ... l.6 \end{document} ? Is this the tagging side or the luatexja side should be reported to? Or any fix of this?

  • How to create a dynamic fan in TikZ in LaTeX?
    by mathrm alpha on August 18, 2026 at 5:49 am

    Although I've created a basic fan shape in TikZ, how do I make the center blade of the TikZ fan dynamic rotate? the value you enter determines exactly how fast the TikZ fan I created will spin. \documentclass{article} \usepackage{tikz} \usepackage[paperwidth=9cm, paperheight=9cm, margin=1.5cm]{geometry} \begin{document} \pagestyle{empty} \begin{figure}[htbp] \begin{tikzpicture} \filldraw[color=yellow!60, fill=orange!40, very thick](0,0) circle (3); \filldraw[color=yellow!60, fill=red!0, very thick](0,0) circle (2.5); \begin{scope}[rotate=0] \draw [line width=0.3cm] (0,0) -- (2,2); \draw [line width=0.3cm] (0,0) -- (0,3); \draw [line width=0.3cm] (0,0) -- (-2,2); \draw [line width=0.3cm] (0,0) -- (2,-2); \draw [line width=0.3cm] (0,0) -- (3,0); \draw [line width=0.3cm] (0,0) -- (-3,0); \draw [line width=0.3cm] (0,0) -- (0,-3); \draw [line width=0.3cm] (0,0) -- (-2,-2); \filldraw[orange] (0,0) circle (30pt) node[anchor=west]{}; \end{scope} \end{tikzpicture} \end{figure} \end{document}

  • Look at the error code i put full code, Undefined control sequence. ^^I^^I\begin{tabular} [closed]
    by خالد بن حورية on August 17, 2026 at 7:51 am

    \begin{center} \begin{tabular}{|c|c|c|} \hline \rowcolor{gold!40} \textbf{المرحلة} & \textbf{عناصر الدرس} & \textbf{المدة} \\ \hline مرحلة الانطلاق & مراجعة المكتسبات القبلية وربطها بالدرس الجديد & 10 دقائق \\ \hline مرحلة الاكتشاف & تقديم التعريفات الأساسية مع أمثلة توضيحية & 20 دقيقة \\ \hline مرحلة بناء التعلمات & نشاط حول العمليات على الدوال + شرح الحل & 25 دقيقة \\ \hline مرحلة التطبيق & تمرين فردي أو جماعي مع مناقشة النتائج & 15 دقيقة \\ \hline مرحلة التقويم & تمرين ختامي أو أسئلة قصيرة للتأكد من الفهم & 10 دقائق \\ \hline \end{tabular} \end{center}