Hot
- Error, non fatal with ordinary compilation, fatal with latexmkby Denis Bitouzé on January 7, 2026 at 2:16 pm
Why an error which isn't fatal with ordinary compilation (pdflatex, say), is fatal with latexmk? For instance with the following MCE (say test.tex): \documentclass{article} \begin{document} \textb{Foo} \end{document} an output PDF file is produced with: pdflatex -interaction=nonstopmode test despite the error: ! Undefined control sequence. l.3 \textb {Foo} But, with: latexmk -pdf -interaction=nonstopmode test no output PDF file produced: ! Undefined control sequence. l.3 \textb {Foo} ! ==> Fatal error occurred, no output PDF file produced!
- How to typeset 'proof DAGS'by seldon on January 7, 2026 at 9:28 am
I'd like to render something like A ------------------------------ B C D ---------------- ------ E F ---------------------------- G In general, rather that rendering a proof tree I need to render a proof DAG, in which branches can sometimes rejoin. Is it possible with any of the existing packages?
- How to correctly align a vertical margin note inside a complex tcolorbox layout with Arabic text?by Med Elhadi Kh on January 7, 2026 at 8:36 am
I am designing a lesson plan layout using tcolorbox and TikZ in XeLaTeX with polyglossia (Arabic). The layout (BoxDars) has a specific right margin reserved for "Stages" (المراحل). I defined a command \mrhala to place vertical text in that specific strip. The Problem: The \mrhala command relies on current page coordinates and manual shifts, which makes it unstable. It does not land exactly in the reserved vertical strip defined in the BoxDars overlay, especially when I change nesting or margins. Goal: I want the vertical text generated by \mrhala to be absolutely positioned centered within the right margin strip (the white space between the red line and the right edge of the box), regardless of where the box is on the page. Here is a Minimal Working Example (MWE): \documentclass[a4paper]{article} \usepackage[margin=1cm]{geometry} \usepackage[most]{tcolorbox} \usepackage[explicit]{titlesec} \usepackage[tikz]{bclogo} \usepackage{amsmath,amssymb,mathtools,bidicontour,tikz,pifont,fontawesome,array,colortbl,varwidth,yagusylo} \usetikzlibrary{calc,shapes.geometric,backgrounds} \usepackage{polyglossia} \setdefaultlanguage[locale=algeria]{arabic} \setotherlanguage{english} \newfontfamily\arabicfont[Script=Arabic,Scale=1.1]{Amiri} \newfontfamily\arabicfontsf[Script=Arabic,Scale=1.2]{Sakkal Majalla} \newfontfamily\yot[Script=Arabic,Scale=1.4]{Arial} \def\EN#1{\textenglish{#1}} \def\AR#1{\textarabic{#1}} \renewcommand{\baselinestretch}{1.2} \pagestyle{empty} \parindent=0mm \def\marahil{1.25cm} \def\modat{1cm} \def\REMS{2.5cm} \newtcolorbox{BoxDars}{ enhanced,breakable, blanker,top=10mm, leftupper=\modat+\REMS+3mm, rightupper=\marahil+3mm, colback=white, bottom=3mm, before skip=3pt, after skip=10pt, parbox=false, overlay={ \draw[very thick,fill=orange!45] (interior.north west) rectangle ([yshift=-8mm]interior.north east); \draw[very thick,red!50!black] (interior.south west) rectangle (interior.north east); \draw[very thick,red!50!black] ([xshift=\REMS+\modat]interior.north west) -- ([xshift=\REMS+\modat]interior.south west); \draw[very thick,red!50!black] ([xshift=\REMS]interior.north west) -- ([xshift=\REMS]interior.south west); \draw[very thick,red!50!black] ([xshift=-\marahil]interior.north east) -- ([xshift=-\marahil]interior.south east); \node[white] at ($(interior.north east)!0.5!([shift={(-\marahil,-8mm)}]interior.north east)$) {\RL{\bf\Large{\resizebox {!}{0.3cm}{\textcolor{green!65!black}% {\bidicontour{yellow}{\RL{المراحل }}}}}}}; \node[white] at ($([shift={(-\marahil,0)}]interior.north east)!0.5!([shift={(\modat,-8mm)}]interior.north west)$) {\RL{\bf\Large{\resizebox {!}{0.4cm} {\textcolor{green!65!black}% {\bidicontour{yellow}{\RL{عناصر الدرس }}}}}}}; \node[white] at ($([shift={(\REMS+\modat,0)}]interior.north west)!0.5!([shift={(\REMS,-8mm)}]interior.north west)$) {\RL{\bf\Large{\resizebox {!}{0.4cm}{\textcolor{green!65!black}% {\bidicontour{yellow}{\RL{المدّة }}}}}}}; \node[white] at ($([shift={(\REMS,0)}]interior.north west)!0.5!([shift={(0,-8mm)}]interior.north west)$) {\RL{\bf\Large{\resizebox {!}{0.4cm} {\textcolor{green!65!black}% {\bidicontour{yellow}{\RL{ الملاحظات }}}}}}}; }} \newcommand{\ondor}[1]{ \LR{\tikzpicture \begin{scope}[rotate=-90,smooth cycle, line width=2.3pt, scale=0.3] \draw[line join=miter, color=#1!80] (0,0) -- ++ (0.7,-0.5) -- ++ (0.7,0.5); \draw[line join=miter, color=#1!68] (0,-0.5) -- ++ (0.7,-0.5) -- ++ (0.7,0.5); \draw[line join=miter, color=#1!58] (0,-1) -- ++ (0.7,-0.5) -- ++ (0.7,0.5); \draw[line join=miter, color=#1!38] (0,-1.5) -- ++ (0.7,-0.5) -- ++ (0.7,0.5); \end{scope} \endtikzpicture}} \newcommand\rqm[1]{\ifnum #1 < 10 0\fi #1} \newcounter{exo} \newenvironment{exe}[1][]{ \vglue7mm\begin{tcolorbox}[breakable,enhanced,detach title,blanker,title={\RL{تطبيق}},coltitle=black, boxsep=3mm,top=2mm,bottom=2mm, overlay={ \scoped[on background layer]{ \draw[fill=blue!60!black!1,draw=none](interior.north west)rectangle (interior.south east); \draw[draw=blue!60!black,line width=1.2pt](interior.north east)|- (interior.south west);} \node[anchor=north east,above left,font=\bf\sffamily ,inner xsep=7mm,inner ysep=2mm] (1) at (interior.north east){\tcbtitle}; \scoped[on background layer]{ \draw[fill=blue!60!black!10,draw=blue!60!black,line width=1.2pt](1.north west)--(1.north east)[sharp corners]--(1.south east)--(1.south west)--cycle; \fill[blue!60!black]([xshift=-4mm]1.north east)-|([yshift=-4mm]1.north east)--cycle; \fill[blue!60!black](interior.north east)rectangle([yshift=3pt]1.south west); \fill[blue!60!black](interior.south west)rectangle([yshift=0.5mm]interior.south east); \fill[blue!60!black]([xshift=-0.5mm]interior.south east)rectangle(interior.north east); \coordinate (A) at (1.north west); \coordinate (B) at (1.south west); \coordinate (C) at ($(1.north west)!0.5!(1.south west)$); \draw[draw=blue!60!black,line width=1.2pt,fill=white,rounded corners=2pt] ([yshift=0.7mm]1.north west)--([xshift=5.8mm]C)--([yshift=-0.7mm]1.south west)-- ([xshift=-5.8mm]C)--cycle node (K){}; } \node at ([xshift=-0.5mm]C) (M){ \stepcounter{exo} \bf\rqm{\theexo}}; \node[anchor=east,text=red!40!black] at (M.west)(N){\ondor{blue!60!black}}; \node[anchor=east,text=red!40!black] at (N.west)(N){\RL{\bf\sffamily #1}}; }] }{\end{tcolorbox}} \def\rosol{% \tikzpicture[transform shape,scale=0.5] \node [circle,scale=1.2,draw,fill=gray!25](1){}; \foreach \i in {0,2}{ \draw [line width=.4mm]([shift={(-0.\i,-.08)}]1.north east)arc(-40:-338:1.3mm and 5.3mm);} \endtikzpicture} \newtcolorbox{box1}[1][عنوان]{ enhanced,breakable, before skip=2mm,after skip=1cm,bottom=4mm, colback=white,colframe=black,boxrule=0.5mm, attach boxed title to top center={yshift*=1mm-\tcboxedtitleheight}, varwidth boxed title*=-3cm, boxed title style={frame code={ \path[fill=blue!30!black] ([yshift=-1mm,xshift=-1mm]frame.north west) arc[start angle=0,end angle=180,radius=1mm] ([yshift=-1mm,xshift=1mm]frame.north east) arc[start angle=180,end angle=0,radius=1mm]; \path[left color=blue!60!black,right color=blue!60!black, middle color=blue!40!white] ([xshift=-2mm]frame.north west) -- ([xshift=2mm]frame.north east) [rounded corners=1mm]-- ([xshift=1mm,yshift=-1mm]frame.north east) -- (frame.south east)--(frame.south)[sharp corners]--([xshift=-1mm,yshift=-2mm]frame.south)[rounded corners=1mm]--([xshift=-2mm]frame.south)[rounded corners=1mm]--(frame.south west) --([xshift=-1mm,yshift=-1mm]frame.north west) [sharp corners]-- cycle; },interior engine=empty, },overlay unbroken and first={ \foreach \i in {0.1,0.2,...,0.9}{ \node at ($([yshift=-2.4mm,xshift=2mm]title.north east)!\i!([yshift=-1.4mm]frame.north east)$){\rosol}; } \foreach \i in {0.1,0.2,...,0.9}{ \node at ($([yshift=-2.4mm,xshift=-2mm]title.north west)!\i!([yshift=-1.4mm]frame.north west)$){\rosol}; } }, fonttitle=\bfseries, title={#1}} \newtcolorbox{BoxRafa}[2][red] {enhanced, before skip=2mm,after skip=2mm, colback=yellow!10!white,colframe=black!50,boxrule=0.2mm, attach boxed title to top right = {xshift=-0.6cm,yshift*=1mm-\tcboxedtitleheight}, varwidth boxed title*=-3cm, boxed title style={frame code={ \path[fill=tcbcolback!30!black] ([yshift=-1mm,xshift=-1mm]frame.north west) arc[start angle=0,end angle=180,radius=1mm] ([yshift=-1mm,xshift=1mm]frame.north east) arc[start angle=180,end angle=0,radius=1mm]; \path[left color=tcbcolback!60!black,right color = tcbcolback!60!black, middle color = tcbcolback!80!black] ([xshift=-2mm]frame.north west) -- ([xshift=2mm]frame.north east) [rounded corners=1mm]-- ([xshift=1mm,yshift=-1mm]frame.north east) -- (frame.south east) -- (frame.south west) -- ([xshift=-1mm,yshift=-1mm]frame.north west) [sharp corners]-- cycle; },interior engine=empty, }, fonttitle=\bfseries, title={#2},colbacktitle = {#1}} \newcommand{\Time}[2][0]{% \begin{tikzpicture}[remember picture,overlay] \def\baseDist{0.2} \pgfmathsetmacro{\timeShift}{\baseDist - 0.55 * (\value{tcblayer} - 1)} \coordinate (A) at (0,0); \coordinate (Edge) at (current page.north west |- A); \node at ([xshift=\timeShift cm, yshift=#1]Edge) { \begin{minipage}{1cm}\centering {\large\yagding[ifsymclock]{148}}\\ \normalsize {{د \EN{#2} }} \end{minipage} }; \end{tikzpicture}% } \newcommand{\rems}[2][0]{% \begin{tikzpicture}[remember picture,overlay] \def\baseDist{-1.5} \pgfmathsetmacro{\timeShift}{\baseDist - 0.55 * (\value{tcblayer} - 1)} \coordinate (A) at (0,0); \coordinate (Edge) at (current page.north west |- A); \node at ([xshift=\timeShift cm, yshift=#1]Edge) { \RL{\begin{minipage}{2cm}\small\centering #2 \end{minipage}} }; \end{tikzpicture}% } \newcommand{\mrhala}[2][0]{% \tikz[overlay,remember picture,baseline=0pt]{% \def\baseDist{-5.45} \pgfmathsetmacro{\newX}{\baseDist - (\value{tcblayer}-1)*0.3} \coordinate (A) at (0,0); \ifnum\value{tcblayer}>0 \coordinate (Edge) at (current page.north east |- A); \node[inner sep=0] at ([xshift=\newX cm, yshift=#1 mm]Edge) {\rotatebox{90}{\RL{#2}}}; \fi }% } \newtcolorbox[auto counter]{box2}[1][]{enhanced,arc=1.5mm, before skip=2mm,after skip=2mm,right=1mm, colback=white,frame style={left color=white, right color=red!80!black,fill=none},boxrule=0.4mm, attach boxed title to top right= {xshift=-0.01cm,yshift*=-0.12mm-\tcboxedtitleheight}, boxed title style={frame code={ \path[draw=red!80!black, left color=tcbcolback!60!black,right color=tcbcolback!60!black, middle color=tcbcolback!80!black] ([xshift=-5mm]frame.north west) [rounded corners=1.5mm] -- (frame.north east) -- ([ yshift=-1mm]frame.south east) -- (frame.south east) -- ([xshift=-2mm]frame.south west) -- ([xshift=-4mm,yshift=-1mm]frame.north west)[sharp corners] -- cycle;},interior engine=empty,},colbacktitle=red, fonttitle=\bfseries,title={~~مثال~\thetcbcounter}, ,overlay unbroken and first={\node[anchor=west,color=green!55!black] at ([xshift=-4.5cm]title.west) {{\bfseries\small\RL{ #1}}};},} \newtcolorbox{proof 1}[1][]{ freelance,before skip=0mm,after skip=0pt, colback=white,title={\hspace*{-0.6cm}\bccrayon\ \bfseries \textcolor{red!90!black}{إثبـــات}}, bottomrule=0pt,top=-0cm,left=0mm,right=3mm,bottom=-1mm, boxrule=0pt,colframe=white, overlay unbroken and first={ \draw[red!40,line width=2.1pt,] ([xshift=-1.3mm,yshift=-8mm]frame.north east) -- ([xshift=-1.3mm,yshift=-8mm]frame.north east) -- ([xshift=-1.3mm,yshift=-0mm]frame.south east); \hfill \textcolor{red!70!black}{$\blacksquare$};}} \newtcolorbox[auto counter]{box3}[1][عنوان] {enhanced,arc=1.5mm, boxrule=2pt, breakable,colback=cyan!3,frame style={ left color=yellow!80, middle color=green!80, right color= cyan!80!blue, }, title=#1, attach boxed title to top right={xshift=-0.51cm,yshift*=-0.42cm}, coltitle=red, boxed title style={top=.5mm,bottom=+.5mm}, , underlay unbroken and first={ \fill[green!30,draw=cyan]([xshift=2pt,yshift=+2pt]title.north east) -- ([xshift=-8pt,yshift=+2pt]title.north west)--([xshift=-9pt]$(title.west)+(-0.3cm,0)$)-- ([xshift=-8pt,yshift=-2pt]title.south west) -- ([xshift=2pt,yshift=-2pt]title.south east)--cycle; % \draw[white,thick]([xshift=-1pt,yshift=+1pt]title.north west) -- ([xshift=+7pt,yshift=+1pt]title.north east)--([xshift=+8pt]$(title.east)+(0.3cm,0)$)-- ([xshift=+7pt,yshift=-1pt]title.south east) -- ([xshift=-1pt,yshift=-1pt]title.south west)--cycle; % \fill[cyan](title.north east) -- (title.north west)--($(title.west)+(-0.3cm,0)$)-- (title.south west) -- (title.south east)--cycle; \node[font=\bf] at(title.center){\textcolor{white}{#1}} ;} % } \begin{document} \begin{BoxDars} \section{عنوان} \mrhala{مرحلة الإنطلاق} \begin{box1}[نشاط مقترح] $f$ و $g$ دالتان معرفتان على $D_f$ و $D_g$ على الترتيب. مركب الدالة $f$ متبوعة بالدالة $g$ هي الدالة التي نرمز إليها بالرمز \{$g \circ f $ \} والمعرفة على $D_{ g \circ f} =\big\{ x ; f(x) \in D_g \wedge x\in D_f\big\}$ بــ \{{$(g \circ f )(x) = g \big( f(x)\big) $} \} \end{box1} \Time{20} \begin{box2}\mrhala{مرحلة} \textcolor{blue!85!black}{$z+z'=x+x'+i(y+y')$} جداء العددين $z$ و $z'$ هو العدد المركّب \textcolor{blue!85!black}{$z.z'=xx'-yy'+i(xy'+x'y)$} \end{box2} \begin{BoxRafa}[blue]{تعريف} لإثبات أن $f$ لا فردية ولا زوجيـة يكفي تقديم مثــال مضاد \end{BoxRafa} \begin{BoxRafa}{مــلاحظة} \mrhala{مرحلة} لإثبات أن $f$ لا فردية ولا زوجيـة يكفي تقديم مثــال مضاد \end{BoxRafa} \rems{ كتابة الملاحظة يكون هنا في هذه التعليمة } \begin{proof 1} \begin{enumerate} \item أي \item { $\dfrac{aZ_A+bZ_B}{a+b}$}. \end{enumerate} \end{proof 1} \begin{box3}[مبرهنــة] سسسسسسس \end{box3} \begin{exe} لتكن الدالة التالية يييسس \end{exe} \end{BoxDars} \end{document}
- Error when making a list of abbreviations in linguisticsby Holden on January 7, 2026 at 5:14 am
I'm using the leipzig package and the gb4e package for making an example with glosses. I want to make a list of abbreviations that I used in the document. The code below does produce a list of abbreviations, but it comes with an error message, Package glossaries Error: Glossary style `inline' undefined attached to \printglosses. I replaced \usepackage{glossaries} with \usepackage{glossaries-extra}, but it came with more error messages including the one above. It is not a problem as long as it creates the list of abbreviations, but the error bothers me. The following is the code. \documentclass[12pt]{article} \usepackage{graphicx} \usepackage[margin=3cm]{geometry} \usepackage{setspace} \usepackage{mathptmx} \usepackage{amssymb} \usepackage{pifont} \usepackage{gk-biblatex} \usepackage[normalem]{ulem} \usepackage{movement-arrows} \usepackage[linguistics]{forest} \usepackage{multicol} \usepackage{comment} \usepackage{glossaries} \usepackage{leipzig} \usepackage{gb4e} \addbibresource{ref.bib} \usetikzlibrary{decorations.pathmorphing} \doublespacing \makeglossaries \newleipzig{sfp}{sfp}{sentence-final particle} \title{Right Dislocation of Adnominal Modifiers in Japanese} \author{Shun Yamazaki} \date{} \begin{document} \maketitle \pagenumbering{roman} \tableofcontents \newpage \printglosses \section{Introduction} \begin{exe} \ex \gll John-ga LGB-o yonda-yo.\\ John-\Nom{} LGB-\Acc{} read.\Pst{}-\Sfp{}\\ \trans `John read LGB.' \end{exe} \end{document}
- How to use datatooltk with DTLforeach after reading dbtex file using DTLread?by Krantz on January 7, 2026 at 1:55 am
The following code works if I use \DTLread to read csv under name data, then save it as dbtex-3 using \DTLwrite, and finally read the .dbtex file under the name datafromdbtex. Then I can use it for the operations that follow, in this case with \action. However, if I produce the .dbtex under the same name datafromdbtex using datatooltk.jar, it does not work. No error is produced but also no PDF is produced. Any help would be much appreciated. I get the warning (and no PDF is produced): Package datatool Warning: Database name `datafromdbtex' requested but name hard coded in file as `datafromdbtex' on input line 13. Here is the reproducible example: \begin{filecontents*}{testdata.csv} one,two,three first_value_of_one,first_value_of_two,first_value_of_three second_value_of_one,second_value_of_two,second_value_of_three \end{filecontents*} \documentclass{article} \usepackage{datatool} % \DTLread[name=data,format=csv,keys={one,two,three}]{testdata}% works % \DTLwrite[name=data,format=dbtex-3,keys={one,two,three},overwrite=allow]{testdata}% works \immediate\write18{datatooltk.jar --csv testdata.csv --output testdata.dbtex --name datafromdbtex}% does not produce pdf and does not produce error: just a wraning saying: Package datatool Warning: Database name `datafromdbtex' requested but name hard coded in file as `datafromdbtex' on input line 27. \DTLread[format=dbtex,name=datafromdbtex,keys={one,two,three}]{testdata}% \newcommand{\action}[3]{\csname#1#2#3\endcsname} {% \def\_{_}% \DTLforeach{datafromdbtex}{\one=one,\two=two,\three=three}% {% \global\cslet{datafromdbtex\one\two}{\three}% }% }% \begin{document} \action{datafromdbtex}{second_value_of_one}{second_value_of_two} % should print second_value_of_three \end{document}
- How can I re-define the Tex math commands for Greek letters?by dedded on January 7, 2026 at 12:18 am
I want to occasionally include a little math with a font that does not have a math font. My plan is to use Stix2 as the math font, but then substitute all the letters and numbers with those from the main font. A problem is that some of the Greek characters are missing, like \phi. The font does have \varphi, so I would like to substitute that. I can make substitutions work for unicode characters, but I have been unable to re-define the Tex commands for the Greek letters. How can I re-define \phi to be \varphi? Here's a MWE: \documentclass{article} \usepackage{unicode-math} \usepackage{newunicodechar} \setmainfont{SourceSerifPro} \setmathfont{STIXTwoMath} % Want SourceSerifPro characters in math mode \setmathfont[range=\mathup/{num,latin,Latin,greek,Greek}]{SourceSerifPro-Regular} \setmathfont[range=\mathit/{num,latin,Latin,greek,Greek}]{SourceSerifPro-It} \setmathfont[range=\mathbfup/{num,latin,Latin,greek,Greek}]{SourceSerifPro-Bold} \setmathfont[range=\mathbfit/{num,latin,Latin,greek,Greek}]{SourceSerifPro-BoldIt} % But there is no \phi (ϕ) in SourceSerifPro, substitute \varphi (φ) \newunicodechar{ϕ}{φ} % This works in text or math mode \newunicodechar{𝜙}{𝜑} % This works in math mode only % How to re-define the Tex command? None of these work: %\AtBeginDocument{% %\let\phi\varphi% %\renewcommand\phi{φ}% %\renewcommand\phi{\varphi}% %\RenewCommandCopy\phi=\varphi% %\mathchardef\phi=\varphi% %} \begin{document} $ϕ𝜙φ𝜑$ \\ % These work (get italic \varphi for all) $\varphi$ \\ % This works, no substitution necessary $\phi$ \\ % Does not work \end{document}
- How to force strict flush-left alignment in align* environments inside a minipage when text notes are added?by Oregon Math Tutor on January 6, 2026 at 11:53 pm
I am working on a math worksheet involving quadratic formula. My goal is to have every problem on the sheet strictly follow the alignment and layout of Problem #1 (top left in image below). Currently, Problem #1 renders correctly: The equation, variable list ($a=, b=, c=$), solution steps, and the final boxed answer are all flush-left. The vertical spacing is consistent. However, as seen in Problems #2, #3, and #4, the layout breaks when I introduce additional steps or explanatory text (e.g., "Set equal to 0"). These elements seem to force center alignment or inconsistent indentation, disrupting the visual flow. My Goal: code fix that forces Problems 2–4 to mimic the strict left-alignment and vertical spacing of Problem 1, regardless of whether there are extra text annotations or extra solution steps involved. This LaTeX project uses both .sty and .tex files (see below). Thanks very much for your assistance! I've tried long and hard to fix the problem without success. High probability that my .sty is not canonical LaTeX code. The document does compile in overleaf. mwe: .sty \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{quadratic-solutions}[2026/01/06 v1.4 Step-Hint Standardization] % -------------------------------------------------- % Core packages % -------------------------------------------------- \RequirePackage[margin=0.75in]{geometry} \RequirePackage{xcolor} \RequirePackage{amsmath} \RequirePackage{amssymb} \RequirePackage{bm} \RequirePackage{calc} % -------------------------------------------------- % Color definitions % -------------------------------------------------- \definecolor{colorA}{RGB}{220, 53, 69} \definecolor{colorB}{RGB}{0, 123, 255} \definecolor{colorC}{RGB}{40, 167, 69} \definecolor{instructioncolor}{RGB}{80, 80, 80} \newcommand{\cola}[1]{{\color{colorA}#1}} \newcommand{\colb}[1]{{\color{colorB}#1}} \newcommand{\colc}[1]{{\color{colorC}#1}} % -------------------------------------------------- % Assignment header % -------------------------------------------------- \newcommand{\assignmentheader}[2]{% \noindent\textbf{ASSIGNMENT #1 --- #2}\hfill\textbf{#1}\par \vspace{0.1in}\hrule\vspace{0.15in} } % -------------------------------------------------- % Problem box (layout only — no instruction logic) % -------------------------------------------------- \newenvironment{problembox}[2]{% \begin{minipage}[t]{0.48\textwidth} \textbf{#1.} #2 }{% \end{minipage}% } % -------------------------------------------------- % Step hint (for aligned math rows) % -------------------------------------------------- \newcommand{\stephint}[1]{% \quad \text{\itshape\color{instructioncolor}(#1)}% } % -------------------------------------------------- % Quadratic Formula display % -------------------------------------------------- \newcommand{\displayquadformula}{% \par\medskip \begin{center} \setlength{\fboxsep}{10pt} \framebox{% {\fontsize{14}{17}\selectfont $x = \dfrac{-b \pm \sqrt{b^{2} - 4ac}}{2a}$}% } \end{center} \medskip } % -------------------------------------------------- % Solutions environment % -------------------------------------------------- \newenvironment{solutions}{% \par\vspace{0.5em} \noindent \setlength{\jot}{12pt} $\displaystyle \begin{aligned}[t] }{% \end{aligned} $ \par\vspace{1em} } % -------------------------------------------------- % Final answer box % -------------------------------------------------- \newcommand{\solutionbox}[2]{% \par\vspace{0.5em} \noindent \setlength{\fboxsep}{8pt} \framebox{$\displaystyle x = #1 \approx #2$} \par\vspace{0.5em} } \endinput .tex \documentclass[11pt]{article} \usepackage{quadratic-solutions} \begin{document} \assignmentheader{9-A}{QUADRATIC FORMULA PRACTICE} \noindent \textbf{PRACTICE:} Use the Quadratic Formula to solve each equation. Write answers as (a) exact values and (b) decimals rounded to the nearest hundredth. Show work. \displayquadformula \vspace{0.5cm} % ======================================================= % ROW 1 % ======================================================= \noindent \begin{problembox}{1}{$-x^{2} + 7x - 3 = 0$} \begin{solutions} \cola{a} & = \cola{-1},\quad \colb{b} = \colb{7},\quad \colc{c} = \colc{-3} \\ x & = \dfrac{-\colb{7} \pm \sqrt{\colb{7}^2 - 4(\cola{-1})(\colc{-3})}}{2(\cola{-1})} \end{solutions} \solutionbox{\dfrac{-7 \pm \sqrt{37}}{-2}}{0.09 \text{ or } 3.54} \end{problembox} \hfill \begin{problembox}{2}{$x^{2} + 6x = 10$} \begin{solutions} x^{2} + 6x & = 10 \stephint{Set equal to $0$} \\ x^{2} + 6x - 10 & = 0 \\ \cola{a} & = \cola{1},\quad \colb{b} = \colb{6},\quad \colc{c} = \colc{-10} \\ x & = \dfrac{-\colb{6} \pm \sqrt{\colb{6}^2 - 4(\cola{1})(\colc{-10})}}{2(\cola{1})} \end{solutions} \solutionbox{-3 \pm \sqrt{19}}{-3 \pm 4.36} \end{problembox} \vspace{1.5cm} % ======================================================= % ROW 2 % ======================================================= \noindent \begin{problembox}{3}{$2x^{2} = 4x + 3$} \begin{solutions} 2x^{2} & = 4x + 3 \stephint{Move all terms left} \\ 2x^{2} - 4x - 3 & = 0 \\ \cola{a} & = \cola{2},\quad \colb{b} = \colb{-4},\quad \colc{c} = \colc{-3} \\ x & = \dfrac{4 \pm \sqrt{16 + 24}}{4} \end{solutions} \solutionbox{\dfrac{4 \pm \sqrt{40}}{4}}{2.16 \text{ or } -0.66} \end{problembox} \hfill \begin{problembox}{4}{$4x^{2} + 81 = 36x$} \begin{solutions} 4x^{2} + 81 & = 36x \stephint{Set equation $= 0$} \\ 4x^{2} - 36x + 81 & = 0 \\ \cola{a} & = \cola{4},\quad \colb{b} = \colb{-36},\quad \colc{c} = \colc{81} \\ x & = \dfrac{36 \pm 0}{8} \end{solutions} \solutionbox{\dfrac{36}{8}}{4.5} \end{problembox} \vspace{0.8cm} \end{document}
- Define commands inside foreach loopby kaba on January 6, 2026 at 8:29 pm
I'm trying to define commands inside a pgffor \foreach loop, where the command-names depend both on the a macroparameter and the loop parameters. However, I get "First argument of '\NewDocumentCommand' must be a command.". What is wrong, and how can it be fixed? \documentclass[a4paper,12pt]{article} \usepackage{pgffor} \NewDocumentCommand{\CreateMyCommands}{m}{ \foreach \x/\a in {x/a,y/b} { \global\NewDocumentCommand{\csname #1\x\endcsname}{}{#1\a} } } \CreateMyCommands{f} \begin{document} \fx \fy \end{document} A smaller example which seems to demonstrate the problem is: \documentclass[a4paper,12pt]{article} \usepackage{pgffor} \foreach \x in {x} { \global\NewDocumentCommand{\csname f\endcsname}{}{a} } \begin{document} \f \end{document}
- Drawing behind gridlines in Rotated pgfplot - "set layers" seems to have side-effectsby user1476176 on January 6, 2026 at 7:36 pm
I'm trying to create a figure with a filled area behind the gridlines for use on a rotated page. I don't want to use axis on top because I have nodes which need to be drawn on top of the gridlines. I've tried following the instructions at PGFPlots: Understanding how to draw plots on different layers and arrange them, which uses set layers, but I've found that it messes up the spacing when combined with rotate=90,transform shape. MWE: \documentclass{standalone} \usepackage{pgfplots} \begin{document} % Rotate entire page \global\pdfpageattr\expandafter{\the\pdfpageattr/Rotate 90} % Correct label placement but incorrect layering \begin{tikzpicture}[rotate=90,transform shape] \begin{axis}[grid=both,title={Correct Spacing but Incorrect Layering}] \addplot {\x}; \addplot[fill=green,draw=none,on layer=background] coordinates { (-5,-5) (-5,-3) (-3,-3) (-3,-5) (-5,-5) }; \node[fill=white,align=center] at (axis cs:-3,2) {Node above\\gridlines}; \end{axis} \end{tikzpicture} % Fix from Stack Exchange \pgfplotsset{% layers/my layer set/.define layer set={background,main,foreground}{},% set layers=my layer set,% }% % Correct layering but incorrect label placement \begin{tikzpicture}[rotate=90,transform shape] \begin{axis}[grid=both,,title={Correct Layering but Incorrect Spacing}] \addplot {\x}; \addplot[fill=green,draw=none,on layer=background] coordinates { (-5,-5) (-5,-3) (-3,-3) (-3,-5) (-5,-5) }; \node[fill=white,align=center] at (axis cs:-3,2) {Node above\\gridlines}; \end{axis} \end{tikzpicture} \end{document} Output: I also tried setting the layers as follows: \pgfdeclarelayer{background} \pgfdeclarelayer{foreground} \pgfsetlayers{background,main,foreground} but it seems to also give correct spacing but incorrect layering.
- Tikz: how to fit a series of nodes determined at run-timeby Guidone on January 6, 2026 at 7:15 pm
My goal is to draw a brace under N nodes, like it is shown in the picture (nodes "G" and "H"): Looking at the second answer to this question I came out with this MWE: \begin{filecontents}[overwrite]{argumentmapp.cls} \NeedsTeXFormat{LaTeX2e} \ProvidesClass{argumap}[2026/01/03 v.0.0 Argument Mapping] \LoadClass[11pt]{extarticle} \RequirePackage{fontspec} \defaultfontfeatures{Ligatures=TeX} \setmainfont{Brill} \RequirePackage{euler-math} \newfontfamily{\supscriptfont}{Euler Math}%[Scale=0.55] \RequirePackage{polyglossia} \setdefaultlanguage{italian} \setotherlanguage[hyphenation=liturgical, usej=true, prosodicshorthands=true]{latin} \RequirePackage{suffix} %=================% % Document layout % %=================% % Page \RequirePackage{geometry} \geometry{a4paper,margin=20mm} \pagestyle{plain} \setlength{\parindent}{0pt} % Line spacing: 1.3 \RequirePackage{setspace} \setstretch{1.2} % Two-column engine \RequirePackage{paracol} %=================% % Utilities % %=================% \RequirePackage{etoolbox} \RequirePackage{etextools} \RequirePackage{lipsum} %------------------ % Control Flow %------------------ \RequirePackage{xifthen} \RequirePackage{xstring}% used to operate on a string %------------------ % Graphics %------------------ \RequirePackage{graphicx} \RequirePackage{tikz} \usetikzlibrary{% calc,arrows.meta,% positioning,% decorations.pathreplacing,% fit,% } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% Main 2-column environment %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \NewDocumentEnvironment{argan}{ O{0.55} O{0.45} }{% \setcounter{ctrstmt}{0}% \columnratio{#1,#2}% \begin{paracol}{2}% \switchcolumn[0]% }{% \end{paracol}% } \newcommand{\TextCol}{\switchcolumn[0]} \newcommand{\AnalysisCol}{\switchcolumn[1]} \newcommand{\TextColStar}{\switchcolumn*[0]} \newcommand{\AnalysisColStar}{\switchcolumn*[1]} \newcommand{\TextColumn}{\switchcolumn[0]} \WithSuffix\newcommand\TextColumn*{\switchcolumn*[0]} \newcommand\AnalysisColumn{\switchcolumn[1]} \WithSuffix\newcommand\AnalysisColumn*{\switchcolumn*[0]} \newcounter{ctrstmt} \setcounter{ctrstmt}{0} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% Right column macros %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%==============================%% %% Statement Graphic %% %%==============================%% % Styles \tikzset{ argStmnt/.style={ circle, draw, inner sep=0pt, minimum size=2.2em, font=\normalsize, }, arganDep/.style={ -{Latex[length=2.2mm,width=1.6mm]}, line width=0.4pt }, } \newrobustcmd{\emptyKey}{} \newrobustcmd{\elemPos}{} \pgfkeys{% /gstmnt/.is family, /gstmnt/.cd, name/.store in=\elemName, name/.default=, depend from/.store in=\dependFrom, % depend from/.initial={}, depend from/.default=, from/.store in=\dirFrom, from/.default=south, to/.store in=\dirTo, to/.default=north, element@pos/.style={}, south of/.code={\pgfqkeys{/gstmnt}{element@pos/.style={below=of #1}}}, north of/.code={\pgfqkeys{/gstmnt}{element@pos/.style={above=of #1}}}, west of/.code={\pgfqkeys{/gstmnt}{element@pos/.style={left=of #1}}}, east of/.code={\pgfqkeys{/gstmnt}{element@pos/.style={right=of #1}}},% name,depend from,from,to } \NewDocumentCommand{\graphStmnt}{O{} m}{% \pgfkeys{/gstmnt/.cd,% name,depend from,from,to,%, #1}% \node[argStmnt, /gstmnt/element@pos] (\elemName) {\supscriptfont#2};% \ifx\dependFrom\empty% \else \draw[arganDep] (\dependFrom.\dirFrom) -- (\elemName.\dirTo); \fi } %%==============================%% %% Coordinated Statement %% %%==============================%% \newif\ifispivot \newcounter{ctrelem} \setcounter{ctrelem}{0} \pgfkeys{% /coostmnt/.is family,% /coostmnt/.cd,% name/.store in=\elemName,% name/.default=,% pivot/.is if=ispivot,% element@pos/.style={}, pivot on/.store in=\pivotOn,% pivot on/.default=,% pivot below/.code={\pgfqkeys{/coostmnt}{element@pos/.style={below=of \pivotOn}}}, pivot below/.initial=, pivot above/.code={\pgfqkeys{/coostmnt}{element@pos/.style={above=of \pivotOn}}}, child of/.store in=\elemParent,% child of/.default=,% after/.code={\pgfqkeys{/coostmnt}{element@pos/.style={right=of \elemParent}}}, before/.code={\pgfqkeys{/coostmnt}{element@pos/.style={left=of \elemParent}}}, from/.store in=\dirFrom, from/.default=, to/.store in=\dirTo, to/.default=, name,pivot on, child of, from, to,% } \tikzset{ coordBrace/.style={ line width=0.4mm,% decorate,% decoration={amplitude=0.1cm,brace, mirror},% % blue } } \newcommand{\elemid}{} \newcommand{\elelist}{} \newcommand{\elements}{} \NewDocumentCommand{\coordielem}{O{} m}{ \refstepcounter{ctrelem} \pgfkeys{/coostmnt/.cd,% name,pivot=false, pivot on, child of,% #1 } \listadd{\elelist}{\elemName} \node[argStmnt, /coostmnt/element@pos] (\elemName) {\supscriptfont$#2\|$\thectrelem}; \ifx\pivotOn\empty \draw[arganDep] (\elemParent.\dirFrom) -- (\elemName.\dirTo); \else \draw[arganDep] (\pivotOn.\dirFrom) -- (\elemName.\dirTo); \fi } \newcounter{cntrbox} \setcounter{cntrbox}{0} \newcommand*{\boxname}{} \NewDocumentEnvironment{coordination}{+b}{% \stepcounter{cntrbox} \renewcommand*{\boxname}{coordbox\thecntrbox} \begin{scope}[local bounding box=\boxname] #1% \end{scope} \draw[color=red, coordBrace] (\boxname.south west) -- (\boxname.south east); } {\setcounter{ctrelem}{1}} % \NewDocumentEnvironment{argugraph}{O{12mm} +b}{ \par\centering% \begin{tikzpicture}[node distance=#1]% #2 }{% \end{tikzpicture}\par} \end{filecontents} \documentclass{argumentmapp} \begin{document} \begin{argan}[0.55][0.35] \AnalysisColumn \begin{argugraph} \graphStmnt[name=A]{A} \graphStmnt[name=B, south of=A, depend from=A, from=south, to=north]{1} \graphStmnt[name=C, north of=A, depend from=A, from=north, to=south]{C} \graphStmnt[name=D, west of=A, depend from=A, from=west, to=east]{D} \graphStmnt[name=E, east of=A, depend from=A, from=east, to=west]{E} \graphStmnt[name=F, south of=D, depend from=D, from=south, to=north]{F} \begin{coordination} \coordielem[name=G, pivot on=E, pivot above, from=north, to=south]{G} \coordielem[name=H, child of=G, after, from=east, to=west]{H} \end{coordination} \graphStmnt[name=L, south of=H, depend from=H, from=south, to=north]{L} \end{argugraph} \end{argan} \end{document} It compiles, but it is not what I am looking for. As a matter of fact, this is what I get: Which makes sense, since the scope also includes the connectors from "E" and "L". So, I decided to go along with the first answer to the same question, and modified the coordination environment to read like this: \newcounter{cntrbox} \setcounter{cntrbox}{0} \newcommand*{\boxname}{} \newcommand{\Loopx}{} \NewDocumentEnvironment{coordination}{+b}{% #1 % Converting the list obtained by each '\coordielem' \listtocsv[\elements]\elelist %suggested by https://tex.stackexchange.com/questions/173579/tikz-fit-variable-number-of-nodes \xdef\Loop{} \foreach \el in \elements {\xdef\Loop{\Loop(\el)} } \node[draw=red,fit=\Loop] {}; } {\setcounter{ctrelem}{1}}% Compiling it, I get the following message: ! Package pgf Error: No shape named `' is known. See the pgf package documentation for explanation. Type H <return> for immediate help. ... l.238 \end {argugraph} With this output: I think something is wrong with my use of the lists. My idea would be to build a list containing the names of \coordielem with etoolbox, convert it to a csvlist with etextools, then iterate over it with TikZ's \foreach method. But, clearly, I am missing something. Any idea?
- Setting the "trapped" flag in XMPby schade96 on January 6, 2026 at 6:42 pm
I am trying to set the "Trapped" flag for my PDF using pdfmanagement: \DocumentMetadata{ pdfstandard = {X-4}, lang = en-US, pdfversion = 1.7, colorprofiles = { X = FOGRA39L_coated.icc% } } \documentclass[a4paper]{article} \ExplSyntaxOn % Note that these must be equal, as per PDF/X-4. \pdfmeta_xmp_add:n{<pdfx:Trapped>True</pdfx:Trapped>} \pdfmanagement_add:nnn{Info}{Trapped}{/True} \ExplSyntaxOff \begin{document} test \end{document} I can for example see $ exiftool test.pdf | grep "Trapped" Trapped : True or, when opening the PDF in a text editor: <?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?> <x:xmpmeta xmlns:x="adobe:ns:meta/"> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <rdf:Description rdf:about="" xmlns:pdf="http://ns.adobe.com/pdf/1.3/" xmlns:xmpRights="http://ns.adobe.com/xap/1.0/rights/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:photoshop="http://ns.adobe.com/photoshop/1.0/" xmlns:xmp="http://ns.adobe.com/xap/1.0/" xmlns:xmpMM="http://ns.adobe.com/xap/1.0/mm/" xmlns:stEvt="http://ns.adobe.com/xap/1.0/sType/ResourceEvent#" xmlns:pdfaid="http://www.aiim.org/pdfa/ns/id/" xmlns:pdfuaid="http://www.aiim.org/pdfua/ns/id/" xmlns:pdfx="http://ns.adobe.com/pdfx/1.3/" xmlns:prism="http://prismstandard.org/namespaces/basic/3.0/" xmlns:stFnt="http://ns.adobe.com/xap/1.0/sType/Font#" xmlns:Iptc4xmpCore="http://iptc.org/std/Iptc4xmpCore/1.0/xmlns/" xmlns:pdfaExtension="http://www.aiim.org/pdfa/ns/extension/" xmlns:pdfaSchema="http://www.aiim.org/pdfa/ns/schema#" xmlns:pdfaProperty="http://www.aiim.org/pdfa/ns/property#" xmlns:pdfaType="http://www.aiim.org/pdfa/ns/type#" xmlns:pdfaField="http://www.aiim.org/pdfa/ns/field#" xmlns:pdfxid="http://www.npes.org/pdfx/ns/id/"> <pdfaExtension:schemas> [...] </pdfaExtension:schemas> <pdf:Producer>luahbtex-1.22.0</pdf:Producer> <pdf:PDFVersion>1.7</pdf:PDFVersion> <pdfxid:GTS_PDFXVersion>PDF/X-4</pdfxid:GTS_PDFXVersion> [...] <pdfx:Trapped>True</pdfx:Trapped> </rdf:Description> </rdf:RDF> </x:xmpmeta> This looks fine to me. But then why is Preflight in Adobe Acrobat reporting this: Trapped key not present in XMP metadata There is no trapped key present in the XMP metadata. The trapped key indicates whether the PDF has been trapped or not. PDF/X-4 requires that the Trapped entry is present in the document's XMP Metadata in the user defined 'pdfx" name space. user defined 'pdfx" name space.
- Errors using Multicol after package updateby Robert Pearson on January 6, 2026 at 6:33 pm
Preface: while this may not have to do with anything, today I updated packages in MikTex for the first time in perhaps a few years. After failing to build documents I have used for many years (syllabi), I've isolated the issue to the Multicol package. The latex-tools package is installed. This is the MWE that's not working. \documentclass{article} \usepackage{multicol} \begin{document} \begin{multicols}{2} ab cd \end{multicols} \end{document} Below are the first log errors I'm getting. ! Undefined control sequence. \mc@prepare@mark@regions ...ark_clear_structure:n {column} l.7 a b cd The control sequence at the end of the top line of your error message was never \def'ed. If you have misspelled it (e.g., `\hobx'), type `I' and the correct spelling (e.g., `I\hbox'). Otherwise just continue, and I'll forget about whatever was undefined. ! You can't use `\prevdepth' in horizontal mode. \nointerlineskip ->\prevdepth -\@m \p@ l.7 a b cd Sorry, but I'm not programmed to handle this case; I'll just pretend that you didn't ask for it. If you're in the wrong mode, you might be able to return to the right one by typing `I}' or `I$' or `I\par'. ! Missing $ inserted. <inserted text> $ l.7 a b cd I've inserted a begin-math/end-math symbol since I think you left one out. Proceed, with fingers crossed. LaTeX Font Info: External font `cmex10' loaded for size (Font) <7> on input line 7. LaTeX Font Info: External font `cmex10' loaded for size (Font) <5> on input line 7. ! Missing number, treated as zero. <to be read again> { l.7 a b cd A number should have been here; I inserted `0'. (If you can't figure out why I needed to see a number, look up `weird error' in the index to The TeXbook.) ! Illegal unit of measure (pt inserted). <to be read again> { l.7 a b cd Dimensions can be in units of em, ex, in, pt, pc, cm, mm, dd, cc, nd, nc, bp, or sp; but yours is a new one! I'll assume that you meant to say pt, for printer's points. To recover gracefully from this error, it's best to delete the erroneous units; e.g., type `2' to delete two letters. (See Chapter 27 of The TeXbook.) ! Missing $ inserted. <inserted text> $ l.7 a b cd I've inserted a begin-math/end-math symbol since I think you left one out. Proceed, with fingers crossed. Missing character: There is no � in font cmex10!
- Starred nocite not functioningby user2568648 on January 6, 2026 at 4:48 pm
I am trying to cite all references in a .bib file (generated via Zotero). I use the \nocite{*} command yet nothing appears. My method of composing is XeLaTex + MakeIndex + BibTex. MWE: \documentclass[a4paper, 11pt]{report} \usepackage[utf8]{inputenc} \usepackage[style=apa]{biblatex} \addbibresource{testbib.bib} \begin{document} my doc with hopefully a full bibliography! \nocite{*} \printbibliography \end{document} The following warnings appear : No file test.bbl. LaTeX Warning: Empty bibliography on input line 16. LaTeX Warning: There were undefined references. Package biblatex Warning: Please (re)run Biber on the file: (biblatex) test (biblatex) and rerun LaTeX afterwards.
- Add a photodiode using pst-circby Darío on January 6, 2026 at 4:28 pm
I was looking a photodiode symbol in pst-circ's documentation, I was creation my own photodiode symbol using \newCircDipole{fotodiodo} \makeatletter \def\pst@draw@fotodiodo{% \newdiode[linecolor=black](-0.5,0)(0.5,0){} \multips(-0.25,0.3)(0.25,0){3}{\psline[arrows=<-,linecolor=](0.25,0.22)} \pnode(-0.5,0){dipole@1} \pnode(0.5,0){dipole@2}} \makeatother in the documentation not appear, and is an usual electronic element. With the circuitikz package's is possible but all code and circuit code, is almost finish, except by the photodiode. Thanks a lot!
- How can I create a simple sankey diagram?by Martin Thoma on January 6, 2026 at 1:20 pm
I've used the following data to generate this sankey diagram of my energy usage in December 2025: PV Dach [216] House PV Garten [9] House Grid [1283] House House [1223] Heat House [20.98] Dishwasher House [15.25] Refrigerator House [8] TV House [1.98] Washing Machine House [0.45] Microwave Heat [1110] Heating (HP) Heat [63] Hot Water (HP) Heat [49.8] AC Heat [22] Heater (Bathroom) :PV Dach #f5f542 :PV Garten #f5f542 :Grid #000 :House #cdcdcd :Heat #ff0000 :AC #cc0000 :Heating (HP) #cc0000 :Hot Water (HP) #cc0000 :Heater (Bathroom) #cc0000 :Refrigerator #0000ff with https://sankeymatic.com/ I've seen https://ctan.mirror.garr.it/mirrors/ctan/graphics/pgf/contrib/sankey/sankey.pdf, and sankey but the graphs there seem to be rather complex. Is there any way that lets me produce something like the image above without writing a lot of TeX?
- How to make a sort bibliography file according to order of appearance of file.bib in LaTeX document? [duplicate]by user121793 on January 6, 2026 at 12:41 pm
Please see attach a short lines in Latex: file.bib @misc{energy_five_2024, title = {The five attributes of an ideal {BESS} site}, url = {https://shellenergy.com.au/energy-insights/the-five-attributes-of-an-ideal-bess-site/}, abstract = {Learn more about what attributes make for an ideal site for a Battery Energy Storage System (or BESS).}, language = {en-AU}, urldate = {2026-01-06}, journal = {Shell Energy}, author = {Energy, Shell and How, Penelope}, month = sep, year = {2024}, } @misc{noauthor_ultimate_nodate, title = {The ultimate site selection checklist for battery energy storage projects}, url = {https://pvcase.com/blog/site-selection-checklist-battery-energy-storage}, abstract = {Master battery energy storage projects with our ultimate site selection checklist. Find and evaluate ideal locations to minimize risk and maximize profitability.}, language = {en}, urldate = {2026-01-06}, journal = {PVcase}, } @misc{noauthor_what_nodate, title = {What {Developers} {Need} to {Know} {About} {Ideal} {BESS} {Site} {Selection}}, url = {https://www.glintsolar.com/resources/what-developers-need-to-know-about-ideal-bess-site-selection-gsnext-lars}, abstract = {META description of this post}, language = {en-us}, urldate = {2026-01-06}, } @article{Greening_Grid, shorttitle = {Grid-Scale Battery Storage}, url = {https://pedagogy-vestnik.ksu.kz/apart/2021-104-4/13.pdf}, doi = {10.31489/2021Ped4/101-107}, number = {4}, urldate = {2026-01-06}, journal = {Bulletin of the Karaganda University. Pedagogy series}, year = {2021}, pages = {101--107}, } @misc{harnessing, title = {Harnessing {GIS} for {Site} {Selection} for {Battery} {Energy} {Storage} {Systems} ({BESS})}, url = {https://www.linkedin.com/pulse/harnessing-gis-optimal-site-selection-battery-energy-storage-5ucec}, language = {en}, urldate = {2026-01-06}, } % my references @conference {CIGRE269, title = {CIGRE Technical Brochure 269, Working Group B4.37, VSC transmission. },} @phdthesis{medina2013design, title={Design and Control of Single-phase Modular Multilevel Converter}, author={Medina, Mario L{\'o}pez}, year={2013}, school={Universidad de Oviedo},} @ARTICLE{NabaeandTakahashi\autoref*{figures/NPC}, author={A. Nabae and I. Takahashi and H. Akagi}, journal={IEEE Transactions on Industry Applications}, title={A New Neutral-Point-Clamped PWM Inverter}, year={1981}, volume={IA-17}, number={5}, pages={518-523}, keywords={AC motors;Circuits;Clamps;Harmonic analysis;Motor drives;Pulse inverters;Pulse width modulation;Pulse width modulation inverters;Switches;Voltage}, doi={10.1109/TIA.1981.4503992}, ISSN={0093-9994}, month={Sept},} @book{sharifabadi2016design, title={Design, Control and Application of Modular Multilevel Converters for HVDC Transmission Systems}, author={Sharifabadi, K. and Harnefors, L. and Nee, H.P. and Teodorescu, R. and Norrga, S.}, isbn={9781118851562}, lccn={2016011610}, series={Wiley - IEEE}, year={2016}, publisher={Wiley},} @article{Huang2005, author = {Huang, Mojia}, doi = {10.1016/j.ijsolstr.2004.06.037}, file = {:C$\backslash$:/Users/lobos/Documents/Mendeley/Huang - 2005.pdf:pdf}, journal = {International Journal of Solids and Structures}, keywords = {crystallites,effective elastic stiffness,orthorhombic aggregate of cubic,the 2-point microtexture coefficients,the n -ocf}, pages = {1425--1441}, title = {{The n-point orientation correlation function and its application}}, url = {http://www.sciencedirect.com/science/article/pii/S0020768304003646}, volume = {42}, year = {2005}} @article{Engler2011, author = {Engler, Olaf and Mertens, Norbert and van Dam, Pim}, doi = {10.1016/j.jmatprotec.2011.02.011}, file = {:C$\backslash$:/Users/lobos/Documents/Mendeley/Engler, Mertens, van Dam - 2011.pdf:pdf}, issn = {09240136}, journal = {Journal of Materials Processing Technology}, month = jul, number = {7}, pages = {1278--1284}, publisher = {Elsevier B.V.}, title = {{Texture-based design of a convoluted cut-edge for earing-free beverage cans}}, url = {http://linkinghub.elsevier.com/retrieve/pii/S0924013611000562}, volume = {211}, year = {2011}} @article{Jochen2010, author = {J\"{o}chen, Katja and B\"{o}hlke, Thomas}, doi = {10.1002/pamm.201010200}, file = {:C$\backslash$:/Users/lobos/Documents/Mendeley/J\"{o}chen, B\"{o}hlke - 2010.pdf:pdf}, issn = {16177061}, journal = {PAMM}, month = dec, number = {1}, pages = {415--416}, title = {{Influence of the number of grains in a polycrystal on the prediction of texture during rolling by using the Taylor approach}}, url = {http://doi.wiley.com/10.1002/pamm.201010200 http://onlinelibrary.wiley.com/doi/10.1002/pamm.201010200/abstract}, volume = {10}, year = {2010}} @article{Hashin1963, author = {Hashin, Zvi and Shtrikman, S.}, file = {:C$\backslash$:/Users/lobos/Documents/Mendeley/Hashin, Shtrikman - 1963.pdf:pdf;:C$\backslash$:/Users/lobos/Documents/Mendeley/Hashin, Shtrikman - 1963(2).pdf:pdf}, journal = {Journal of the Mechanics and Physics of Solids}, number = {42}, pages = {127--140}, title = {{A variational approach to the theory of the elastic behaviour of multiphase materials}}, url = {http://www.sciencedirect.com/science/article/pii/0022509663900607}, volume = {11}, year = {1963}} packages \usepackage{blindtext} % needed for creating dummy text passages \usepackage{amsmath} % needed for command eqref \usepackage{amssymb} % needed for math fonts \usepackage[hyphens]{url} \usepackage[colorlinks=true, allcolors=blue]{hyperref} \usepackage{xcolor} \definecolor{c1}{rgb}{0,0,1} % blue \definecolor{c2}{rgb}{0,0.3,0.9} % light blue \definecolor{c3}{rgb}{0.3,0,0.9} % red blue \hypersetup{ linkcolor={c1}, % internal links citecolor={c2}, % citations urlcolor={c3} % external links/urls } \usepackage[numbers, sort&compress]{natbib} % needed for cite and abbrvnat bibliography style \usepackage[nottoc]{tocbibind} % needed for displaying bibliography and other in the table of contents \usepackage{graphicx} % needed for \includegraphics \usepackage{longtable} % needed for long tables over pages \usepackage{bigstrut} % needed for the command \bigstrut \usepackage{enumerate} % needed for some options in enumerate %\usepackage{todonotes} % needed for todos \usepackage{makeidx} % needed for creating an index \makeindex \documentclass[a4paper]{book} \input{settings/packages} \input{settings/page} \begin{document} \chapter*{BESS Location critaria in power grid} For optimal Battery Energy Storage System (BESS) placement in a grid, some keys criteria \cite{energy_five_2024}, \cite{noauthor_ultimate_nodate}, \cite{noauthor_what_nodate} must be include such as: \begin{itemize} \item grid connection proximity (near substations/weak buses) \item physical site suitability (flat, accessible land, good soil) \item technical performance (improving voltage, reducing losses \item supporting renewables), economic viability (matching load, favorable markets) \item alongside strict zoning/safety compliance and environmental considerations \end{itemize} \bibliographystyle{abbrvnat} \bibliography{literature/library} \end{document}
- Embed custom color profile using pdfmanagementby HerpDerpington on January 6, 2026 at 12:26 pm
I need to embed a custom color profile into my pdf. Looking at "l3pdfmeta.pdf" I thought this may work: \DocumentMetadata{ pdfversion = 1.7, pdfstandard = {A-2B}, lang = en-US, % Cannot natively embed custom profiles as mentioned in % the documentation. %colorprofiles = { A = eciRGB_v2.icc } } \ExplSyntaxOn \pdf_object_unnamed_write:nn{fstream} {{/N~4}{eciRGB_v2.icc}} \pdf_object_unnamed_write:ne {dict} { /DestOutputProfile \pdf_object_ref_last: /Info (sRGB) /OutputConditionIdentifier (sRGB) /S /GTS_PDFA1 /Type /OutputIntent } \pdfmanagement_add:nne {Catalog}{OutputIntents}{\pdf_object_ref_last:} \ExplSyntaxOff \documentclass[a4paper]{article} \begin{document} hello \end{document} This does compile. However, qpdf reports, when applied to the pdf: WARNING: test.pdf object stream 11 (object 10 0, offset 37): unknown token while reading object; treating as string WARNING: test.pdf object stream 11 (object 10 0, offset 14): expected dictionary key but found non-name object; inserting key /QPDFFake1 qpdf: operation succeeded with warnings; resulting file may have some problems What would be a fully working example for this? See also: https://tex.stackexchange.com/a/537890
- Is that possible to balance two columns `longtblr` with `tabularray` package?by Explorer on January 6, 2026 at 12:19 pm
This question is nearly the same as this: \documentclass[twocolumn]{article} \usepackage[showframe,paperheight=15cm]{geometry} \usepackage{lipsum} \usepackage{cuted} \usepackage{tabularray} \NewTblrTheme{naked}{ \DefTblrTemplate{foot}{empty}{} \SetTblrTemplate{foot}{empty} \DefTblrTemplate{head}{empty}{} \SetTblrTemplate{head}{empty} } \NewTblrEnviron{mytblr} \SetTblrOuter[mytblr]{long,theme=naked} \begin{document} \begin{strip} \lipsum[2] \bigskip \hrule \bigskip \end{strip} \begin{mytblr}{hlines,vlines,width=\linewidth,colspec={X[c]X[c]X[c]}} 1alpha & beta & gamma \\ 2alpha & beta & gamma \\ 3alpha & beta & gamma \\ 4alpha & beta & gamma \\ 5alpha & beta & gamma \\ 6alpha & beta & gamma \\ 7alpha & beta & gamma \\ 8alpha & beta & gamma \\ 9alpha & beta & gamma \\ 10alpha & beta & gamma \\ 11alpha & beta & gamma \\ 12alpha & beta & gamma \\ 13alpha & beta & gamma \\ 14alpha & beta & gamma \\ 15alpha & beta & gamma \\ 16alpha & beta & gamma \\ 17alpha & beta & gamma \\ 18alpha & beta & gamma \\ 19alpha & beta & gamma \\ 20alpha & beta & gamma \\ 21alpha & beta & gamma \\ 22alpha & beta & gamma \\ 23alpha & beta & gamma \\ 24alpha & beta & gamma \\ 25alpha & beta & gamma \\ 26alpha & beta & gamma \\ 27alpha & beta & gamma \\ 28alpha & beta & gamma \\ 29alpha & beta & gamma \\ 30alpha & beta & gamma \\ 31alpha & beta & gamma \\ 32alpha & beta & gamma \\ 33alpha & beta & gamma \\ 34alpha & beta & gamma \\ 35alpha & beta & gamma \\ 36alpha & beta & gamma \\ 37alpha & beta & gamma \\ 38alpha & beta & gamma \\ 39alpha & beta & gamma \\ 40alpha & beta & gamma \\ 41alpha & beta & gamma \\ 42alpha & beta & gamma \\ 43alpha & beta & gamma \\ 44alpha & beta & gamma \\ 45alpha & beta & gamma \\ 46alpha & beta & gamma \\ 47alpha & beta & gamma \\ 48alpha & beta & gamma \\ 49alpha & beta & gamma \\ 50alpha & beta & gamma \\ \end{mytblr} \end{document} which gives: Noted that I want to typeset something like a university transcript. Thus, unbalanced layout is not elegant, is that possible to hack with some tricks? Edited: longtblr solution conflicted with multicol: \documentclass{article} \usepackage[showframe,paperheight=15cm]{geometry} \usepackage{lipsum} \usepackage{multicol} \usepackage{tabularray} \NewTblrTheme{naked}{ \DefTblrTemplate{foot}{empty}{} \SetTblrTemplate{foot}{empty} \DefTblrTemplate{head}{empty}{} \SetTblrTemplate{head}{empty} } \NewTblrEnviron{mytblr} \SetTblrOuter[mytblr]{long,theme=naked} \begin{document} \lipsum[2] \bigskip \hrule \bigskip \begin{multicols}{2} \begin{mytblr}{hlines,vlines,width=\linewidth,colspec={X[c]X[c]X[c]},rowhead=1} Header 1 & Header 2 & Header 3 \\ 1alpha & beta & gamma \\ 2alpha & beta & gamma \\ 3alpha & beta & gamma \\ 4alpha & beta & gamma \\ 5alpha & beta & gamma \\ 6alpha & beta & gamma \\ 7alpha & beta & gamma \\ 8alpha & beta & gamma \\ 9alpha & beta & gamma \\ 10alpha & beta & gamma \\ 11alpha & beta & gamma \\ 12alpha & beta & gamma \\ 13alpha & beta & gamma \\ 14alpha & beta & gamma \\ 15alpha & beta & gamma \\ 16alpha & beta & gamma \\ 17alpha & beta & gamma \\ 18alpha & beta & gamma \\ 19alpha & beta & gamma \\ 20alpha & beta & gamma \\ 21alpha & beta & gamma \\ 22alpha & beta & gamma \\ 23alpha & beta & gamma \\ 24alpha & beta & gamma \\ 25alpha & beta & gamma \\ 26alpha & beta & gamma \\ 27alpha & beta & gamma \\ 28alpha & beta & gamma \\ 29alpha & beta & gamma \\ 30alpha & beta & gamma \\ 31alpha & beta & gamma \\ 32alpha & beta & gamma \\ 33alpha & beta & gamma \\ 34alpha & beta & gamma \\ 35alpha & beta & gamma \\ 36alpha & beta & gamma \\ 37alpha & beta & gamma \\ 38alpha & beta & gamma \\ 39alpha & beta & gamma \\ 40alpha & beta & gamma \\ 41alpha & beta & gamma \\ 42alpha & beta & gamma \\ 43alpha & beta & gamma \\ 44alpha & beta & gamma \\ 45alpha & beta & gamma \\ 46alpha & beta & gamma \\ 47alpha & beta & gamma \\ 48alpha & beta & gamma \\ 49alpha & beta & gamma \\ 50alpha & beta & gamma \\ \end{mytblr} \end{multicols} \end{document} It failed resulted:
- Hide all content before a certain point [duplicate]by Sebastiano on January 6, 2026 at 11:48 am
Suppose I have a document containing text and mathematical formulas. From a certain point onward, I would like everything written before that point not to be displayed in the compiled document, without manually deleting the previous content. In other words, I am looking for a command or macro or environment that allows me to say: "from here on, show the content, but ignore everything that comes before". I am looking for possible solutions because I need this behavior for a correspondence with another user who has not updated their TeX distribution for a long time. For this reason, solutions that work with older or widely available LaTeX setups would be especially useful. I have never needed to do something like this before, so I am not sure whether such a command exists or if a specific package is required. Here a MWE with a comment: \documentclass{article} \usepackage{lipsum} \begin{document} \lipsum[8] %%%%%%%%%%%%%%%%%%% I not want visualize \lipsum[8] %%%%% %%%%%%%%%%%%%%%%%%% but only \lipsum[10] %%%%%%%%%% \lipsum[10] \end{document}
- Interaction between DeclareBibstringSetFormat and foreignblockcquoteby Meven Lennon-Bertrand on January 6, 2026 at 8:38 am
I seem to encounter an interesting interaction with the commands around \DeclareBibstringSetFormat (which I want to use to render ibid and other Latin locutions in italics, as per French norms) and the csquotes package, as showcased with the following code, which fails to compile with the following error: ! Missing \endcsname inserted. <to be read again> \blx@bibstringset@set@latin l.46 } MWE: \documentclass{article} \usepackage{hyperref} \usepackage{csquotes} \usepackage[english,french]{babel} \usepackage[ backend=biber, hyperref=true, backref=true, style=verbose-ibid, % style = apa, maxbibnames=99, % maxcitenames=2, sorting=nty, ]{biblatex} \begin{filecontents}[overwrite]{\jobname.bib} @incollection{white_frederick_1994, title = {Frederick Jackson Turner and Buffalo Bill}, pages = {145}, booktitle = {The Frontier in American culture}, author = {White, Richard(Author)}, date = {1994}, } \end{filecontents} \addbibresource{\jobname.bib} \usepackage{csquotes} \SetCiteCommand{\autocite} \DefineBibliographyExtras{french}{% \DeclareBibstringSet{latin}{andothers,ibidem}% \DeclareBibstringSetFormat{latin}{\mkbibemph{#1}}} \UndefineBibliographyExtras{french}{% \UndeclareBibstringSet{latin}} \begin{document} First citation \autocite{white_frederick_1994} \foreignblockcquote{english}[X]{white_frederick_1994}{It is a vanished world. No journeys, save those memory can make, will bring you to it now. The mountains are there, far and shining, and the sunlight and the infinite earth, and the air that seems forever the true fountain of youth – but where is the buffalo, and the wild antelope, and where the horseman with is pasturing thousands? So like its old self does the sage brush seem when revisited, that you wait for the horseman to appear. } \end{document} It somehow seems that the too long \foreignblockcquote paragraph is causing some sort of overflow? If I either make the cited paragraph shorter make the quote non foreign (ie a standard \blockcquote) remove the code to italicize Ibid then the issue disappears. What is happening? Is this an issue with biblatex,with csquotes, or with me? (Note: I originally opened this as an issue, but I got no answer there so I was hoping I could get some help here instead.)
- How to use cslet with DTLforeach after reading dbtex file using DTLread?by Krantz on January 5, 2026 at 3:45 pm
The following code works until \DTLwrite. So, I am unable to get the \action to work. I understand there might be other ways of accomplishing this. My reason for using this approach is to speed up fetching data from many large csv files. Any help would be much appreciated. I get the error: ! Missing \endcsname inserted. <to be read again> \protect l.9 {\cslet{datafromdbtex\one\two}{\three}} Here is the reproducible example: \documentclass{article} \usepackage{datatool} \DTLread[name=data,format=csv,keys={one,two,three}]{testdata}% works \DTLwrite[name=data,format=dbtex-3,keys={one,two,three},overwrite=allow]{testdata}% works \DTLread[format=dbtex,name=datafromdbtex,keys={one,two,three}]{testdata}% does not work \newcommand{\action}[3]{\csname#1#2#3\endcsname} \DTLforeach{datafromdbtex}{\one=one,\two=two,\three=three}% does not work {\cslet{datafromdbtex\one\two}{\three}}% \begin{document} \action{datafromdbtex}{second_value_of_one}{second_value_of_two}% does not work %should print second_value_of_three \end{document} % testdata.csv % one,two,three % first_value_of_one,first_value_of_two,first_value_of_three % second_value_of_one,second_value_of_two,second_value_of_three
- Can I customise the footer in ltx-talk?by Elena on January 5, 2026 at 1:52 pm
Yay, now there are accessible Latex slides! I just started porting my slides to ltx-talk from beamer. The first thing that I cannot easily replicate from my beamer template is the footer, which is as follows: \setbeamercolor{foot1}{fg=black, bg=skyblue!20} \setbeamercolor{foot2}{fg=black, bg=skyblue!60} \setbeamercolor{foot3}{fg=black, bg=skyblue} \setbeamertemplate{footline}{% \leavevmode% \hbox{% \begin{beamercolorbox}[wd=.3\paperwidth,ht=2.75ex,dp=1ex,left]{foot1}% \hspace*{2ex} \insertshorttitle \end{beamercolorbox}% \begin{beamercolorbox}[wd=.5\paperwidth,ht=2.75ex,dp=1ex,center]{foot2}% \insertsubtitle % \end{beamercolorbox}% \begin{beamercolorbox}[wd=.2\paperwidth,ht=2.75ex,dp=1ex,right]{foot3}% \insertframenumber{}/\inserttotalframenumber \hspace*{2ex} \end{beamercolorbox}}% \vskip0pt% } I have two main issues. First, I cannot change the height of the footer. See the original beamer slide and its version in ltx-talk. While I can ignore the other differences, this height does bother me. Second, I really like to show the number of the current slide out of the total number of slides. Is there a way to do something similar like 3/10? By the way, this is my current ltx-talk settings: \EditInstance{footer}{std}{ background-color = skyblue!20, color = black, element-order = {title, subtitle, framenumber}, right-hspace = 3mm, left-hspace = 3mm, } I did try using totalframes comma separated inside element-order, but it gave me this error <argument> \??? ! LaTeX Error: Erroneous variable \@shorttotalframes used! But even if it did work, I still don't like the two numbers to be separated. Here is my minimal working example: \DocumentMetadata{tagging = on} \documentclass[10pt]{ltx-talk} \title{Fundamentals of Web Development} \subtitle{Week 1: Basics of HTML} \usepackage[T1]{fontenc} \renewcommand*\familydefault{\sfdefault} \usepackage[sfdefault,condensed]{roboto} \definecolor{kentblue}{HTML}{003882} \definecolor{skyblue}{HTML}{2ABED9} \EditInstance{footer}{std}{ background-color = skyblue!20, color = black, element-order = {title, subtitle, framenumber}, right-hspace = 3mm, left-hspace = 3mm, } \begin{document} \begin{frame} \begin{center} \Huge \textcolor{kentblue}{\textbf{Lecture 1} ltx-talk} \end{center} \begin{itemize} \item Introduction to HTML and CSS \item Basic syntax of HTML \item Some simple formatting \item Images and links \end{itemize} \end{frame} \end{document}
- circuitikz: width, height and pin-distance of a 'op amp'by cis on January 5, 2026 at 1:27 pm
I want to create a breadboard whose x-slot spacing matches the pin spacing of a muxdemux (this was done here); and whose y-slot spacing matches the pin spacing of an op amp. An image for clarification: I can approximate the y-direction by trial and error, using \pgfmathsetlengthmacro\OApin{% 'op amp' pin width \bl*\ctikzvalof{tripoles/op amp/width}*0.3*0.5} But I would like to do this accurately and precisely. In short: I need height, width, and pin spacing of an op amp from the package-keys. (Unfortunately, these keys are usually well hidden and not very self-explanatory.) \documentclass[margin=5pt, multi=circuitikz]{standalone} \usepackage{circuitikz} \def\ShowBreadBoard{1} % Breadboard 1/2 ====================== % Default of bipoles/length ================= \pgfmathsetlengthmacro\bl{\UseName{pgf@circ@Rlen}}% default 1.4cm %%%%%%%%%% Problems here %%%%%%%%%%% % Breadboard y - measures of 'op amp' ================= \pgfmathsetlengthmacro\OApin{% 'op amp' pin width \bl*\ctikzvalof{tripoles/op amp/width}*0.3*0.5} \pgfmathsetlengthmacro\OAh{% 'op amp' height \bl*\ctikzvalof{tripoles/op amp/height}} \pgfmathsetlengthmacro\OAw{% 'op amp' width \bl*\ctikzvalof{tripoles/op amp/height}*5/6+0*\pgflinewidth/cos(45)} %%%%%%%%%%%%%%%%%%%%%%%%% % Breadboard x - measures of 'MuxDemux' ================= \pgfmathsetlengthmacro{\basemuxlen}{\bl *\ctikzvalof{multipoles/muxdemux/base len} *\ctikzvalof{muxdemuxes/scale}} \pgfmathsetlengthmacro{\MUXw}{\basemuxlen*6}%w=6, muxdemux-width %\pgfmathsetlengthmacro{\MUXh}{\basemuxlen*4}%Lh=4, muxdemux-height \pgfmathsetlengthmacro{\MUXp}{\MUXw/3}% bottom pin distance of muxdemux \begin{document} \begin{circuitikz}[] % Breadboard 2/2 ================ \begin{scope}[font=\footnotesize\ttfamily] \pgfmathsetlengthmacro\u{\MUXp/4}% x-unit-length \pgfmathsetlengthmacro\v{\OAh/4}% y-unit-length \def\X{x} \def\Y{y}% letters for coordinates \foreach \x in {0,...,26}{%% \foreach \y in {0,...,6}{% \ifnum\ShowBreadBoard=1 %%%%%%%%% \pgfmathtruncatemacro\Xt{mod(\x,2)==0 ? 1 : 0}% show x-coordinate test \pgfmathtruncatemacro\Yt{mod(\y,2)==0 ? 1 : 0}% show y-coordinate test \fill[gray] (\u*\x,-\y*\v) circle[radius=0.65pt] coordinate[label=](\X\x\Y\y); \ifnum\y=0 \node[above, red] at (\X\x\Y\y) {\ifnum\Xt=1 \x\fi};\fi \ifnum\x=0 \node[left, red] at (\X\x\Y\y) {\ifnum\Yt=1 \y\fi};\fi \draw[red, shorten <=2pt] (x0y0) -- +(135:0.75) node[midway, above]{x} node[near end, below]{y}; \else% \coordinate[](\X\x\Y\y) at (\u*\x,-\y*\v); \fi%%%%%%%%%%%%%% }}% %% %\node{\OAw, \OAh};% test %\draw (x0y0) circle(1mm); % test \end{scope}% ===================== \node[op amp](opamp) at (x8y3) {}; \draw (x15y3) to[L, color=pink] (x22y3); \end{circuitikz} \end{document}
- microtype + newcomputermodern produce unknown slot number warnings, even without textby PHL on January 5, 2026 at 12:29 pm
microtype used together with fontspec is producing many unknown slot number warnings. This is apparently related to protrusion, see microtype producing dozens of Unknown slot number warnings for Lete Sans Math . These warnings happens even with an empty document (so without any pdf output) and are not stopped by disabling protrusion at the beginning of document as demonstrated by the following MWE. % !TEX TS-program = lualatex \documentclass{article} \usepackage{fontsetup} \usepackage{microtype} \AtBeginDocument{\microtypesetup{protrusion=false}} \begin{document} \end{document} (fontsetup without option load the new computer modern font). Using protrusion=false as an option of the package does however solve the problem. [concrete]{fontsetup} does also solve the problem, so this is really font dependent.
- Is there an equivalent to the decimal package (provides raised decimal point in math mode automatically) which works in lualatex? [closed]by Phillip Helbig on January 5, 2026 at 11:24 am
I've mentioned the following subject in an earlier question, but it’s probably best to raise it in a question of its own. (The earlier question involves pdfLaTeX, in which the decimal package works fine for simple font setups.) Unfortunately, I’m having trouble getting Times Roman-like oldstyle numerals both in math and text modes, monospaced in math mode and proportional in text, with otherwise identical fonts. My goal is to have oldstyle numerals both in math (tables, matrices) and text (preferably proportional oldstyle, but monospaced oldstyle would be OK) with a raised decimal point. At least at first glance, it looks like LuaLaTeX can handle the font-related routines. However, for obvious reasons, the decimal package doesn’t work there. I have hundreds of numbers so something like \num from siunitx is not an option for me. Normal input should be possible.
- Where to post / read news about TeX/ LaTeX and similar?by topskip on January 5, 2026 at 9:52 am
This is not a technical question about LaTeX or TeX. Imagine I have created a cool LaTeX package or a new TeX engine or something similar. Is there a good place to post this? I see special mailing lists (for example tex-live), these don't seem to fit. Where can / should I place announcements like this?
- subfloat + includegraphics: alignement and box sizes?by Achille on January 5, 2026 at 9:44 am
I have the following latex code but I cannot fix it. The first row is made of 6 boxes. The second row is made of 3 boxes, the first should be large as the first 3 boxes of the first row, the other two boxes should have the same height of the first box in the same row. All boxes should be aligned. So here are my questions: How can I adjust the space between boxes in the same row? How can I adjust the size of the first box in the second row and adjust the other sizes accordingly? ...Ideally I'd also like to add arrows between, e.g. the 4th box in the first row and the 3rd box in the the second row. Maybe subfloat is not the best choice... Thanks for helping \documentclass{article} \usepackage[utf8]{inputenc} \usepackage{graphicx} \usepackage{subfig} % Changed from subcaption to subfig \usepackage{array} \setlength{\voffset}{-0.75in} \setlength{\headsep}{5pt} \begin{document} \begin{figure}[ht] \centering % Image rows \subfloat{\includegraphics[width=0.14\textwidth]{example-image-a}}\hfill \subfloat{\includegraphics[width=0.14\textwidth]{example-image-a}}\hfill \subfloat{\includegraphics[width=0.14\textwidth]{example-image-a}}\hfill \subfloat{\includegraphics[width=0.14\textwidth]{example-image-a}}\hfill \subfloat{\includegraphics[width=0.14\textwidth]{example-image-a}}\hfill \subfloat{\includegraphics[width=0.14\textwidth]{example-image-b}} \vspace{0.5cm} \subfloat{\includegraphics[width=0.42\textwidth]{example-image-c}}\hfill \subfloat{\includegraphics[width=0.14\textwidth]{example-image-c}}\hfill \subfloat{\includegraphics[width=0.14\textwidth]{example-image-c}}\hfill \subfloat{\includegraphics[width=0.14\textwidth]{example-image}} \vspace{0.5cm} \subfloat{\includegraphics[width=0.42\textwidth]{example-image-c}}\hfill \subfloat{\includegraphics[width=0.14\textwidth]{example-image-c}}\hfill \subfloat{\includegraphics[width=0.14\textwidth]{example-image-c}}\hfill \subfloat{\includegraphics[width=0.14\textwidth]{example-image}} \end{figure} \end{document}
- circuitikz: potentiometer without pin on the right side [was: How to shorten the sliding rheostat's wire length in circuitikz package?]by Explorer on January 5, 2026 at 7:45 am
What I want to achieved is as below: I have the following code: \documentclass[border=5pt]{standalone} \usepackage{circuitikz} \begin{document} \begin{circuitikz}[european] \draw(0,0) to [rmeter,t=A] (0,2) to [R,l_=$R$](3,2) to [pR,l_=$R'$,n=pr] (4.1,2); \draw(0,0) to [normal open switch,l_=$S$] (6,0) |-(pr.wiper); \end{circuitikz} \end{document} it gives the similar result: However, the righthand of sliding rheostat's length is control in manual, but guess the coordinate (4.1,2), which is not elegant. I have consulted the manual, but found no similar components. Is that better method to achieve the desird result?
- circuitikz: set 'rounded corners' of a 'oscopeshape' to a smaler valueby cis on January 4, 2026 at 11:23 pm
Due to a chat-talk with @Rmano, I asked myself wether there is a methode to set the rounded corners of a oscopeshape to 0pt or to a very small value. The rounded corners can become weird, if I set a small scale: \documentclass[margin=10pt]{standalone} \usepackage{circuitikz} \begin{document} \begin{circuitikz}[font=\footnotesize] \node[oscopeshape] (A){scale=1}; \node[oscopeshape, right of=A, scale=0.5](B) {scale=0.5}; \node[oscopeshape, right of=B, scale=0.35] {scale=0.35}; \end{circuitikz} \end{document}
- ConTeXt: Inset Bible Chapter Numbers Mid-Paragraphby Jeff Dodson on January 4, 2026 at 3:22 pm
I'm new to ConTeXt, and am wondering how I might typeset Bible chapter numbers for cases where a chapter break occurs in the middle of a paragraph (i.e., verse 1 of the chapter doesn't begin a new paragraph). Here's an example of what I'd like to achieve in ConTeXt: As you can see here, in Mark, Chapter 9 begins mid-paragraph. As a result, there's no paragraph break at Mark 9:1, and I do need to explicitly show the verse number for Mark 9:1 in the text. The chapter number "9" does appear against the left margin, but the text of the paragraph flows nicely around it, until there's eventually a paragraph break starting at Mark 9:2. The above was achieved in XeLaTeX using a code snippet that David Carlisle (I believe it was) was kind enough to provide a couple of years ago. Perhaps the answer to my question is to use the same snippet with ConTeXt. However, I guess what I'm wondering is if there's a different way I should be doing it in ConTeXt, as opposed to (XeLaTeX). Incidentally, this is the snippet in LaTeX that produced the above desired results: \newlength{\parskipval} \makeatletter \def\newparshape{\parshape\@npshape0{}} \def\@npshape#1#2#3{\ifx\\#3\expandafter\@@@npshape\else\expandafter\@@npshape\fi {#1}{#2}{#3}} \def\@@npshape#1#2#3#4#5{% \ifnum#3>\z@\expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi {\expandafter\@@npshape\expandafter{\the\numexpr#1+1\relax}{#2 #4 #5}{\numexpr#3-1\relax}{#4}{#5}}% {\@npshape{#1}{#2}}} \def\@@@npshape#1#2#3{#1 #2} \makeatother \newcommand{\parnopar}[1][]{\parfillskip=0pt\par% #1% \parskip=0pt\noindent\parfillskip=0pt plus1fil} \newfontfamily\dropnum[Scale=3.2]{Times New Roman} \newsavebox{\dropcapbox} \newcommand{\nbchapbeg}[1]{% \setlength{\parskipval}{\parskip}% \parnopar% \savebox{\dropcapbox}{\dropnum{#1}}% \newparshape {2}{\dimexpr\wd\dropcapbox+1ex}{\dimexpr\linewidth-\wd\dropcapbox-1ex} {1}{0pt}{\linewidth}\\% \noindent \llap{\raisebox{\dimexpr-\height+.44\baselineskip}[0pt][0pt]{% \usebox{\dropcapbox}% \hspace{1ex}% }}% \ignorespaces% \setlength{\parskip}{\parskipval}% } With the \nbchapbeg macro above (which I believe stands for "non-breaking chapter beginning), I place a call to the macro anywhere within the verse prior to the first verse of the chapter that doesn't begin a new paragraph (Mark 9 here), and it causes the chapter number to be inset into the text in the proper place. So I guess my real question is: Is there a "ConTeXty" way to do this, or should I use the same technique? Here's the ConTeXt code snippet I'm working with, where I'd like to make the chapter number have the paragraph flow around it. The text below is in English rather than Greek, but the solution applies regardless of the language used. \starttext 35 For whosoever will save his life shall lose it; but whosoever shall lose his life for my sake and the gospel's, the same shall save it. 36 For what shall it profit a man, if he shall gain the whole world, and lose his own soul? 37 Or what shall a man give in exchange for his soul? 38 Whosoever therefore shall be ashamed of me and of my words in this adulterous and sinful generation; of him also shall the Son of man be ashamed, when he cometh in the glory of his Father with the holy angels. (Chapter 9 drop num goes here) 1 And he said unto them, Verily I say unto you, That there be some of them that stand here, which shall not taste of death, till they have seen the kingdom of God come with power. 2 And after six days Jesus taketh with him Peter, and James, and John, and leadeth them up into an high mountain apart by themselves: and he was transfigured before them. \stoptext UPDATE: I realized today that I left the \def for \newparshape out of my original post, so I added that above. At this point, I'd be happy to just have a conversion of the original code into pure TeX in such a way that I could use it in ConTeXt. I've tried that conversion myself, but have not been able to get it right. The following is what I did so far, but again, it doesn't work. The sticking point, I think, is the \newparshape part. \newskip\parskipval \newbox\dropcapbox \def\dropnumfont{\definedfont[Serif*default at 38.4pt]} \def\newparshape{\parshape\npshape0{}} \def\npshape#1#2#3{% \ifx\\#3% \expandafter\npshapeend \else \expandafter\npshapeloop \fi {#1}{#2}{#3}% } \def\npshapeloop#1#2#3#4#5{% \ifnum#3>0 \expandafter\npshapeloop \expandafter{\the\numexpr#1+1\relax}% {#2 #4 #5}% {\numexpr#3-1\relax}% {#4}{#5}% \else \npshape{#1}{#2}% \fi } \def\npshapeend#1#2#3{#1 #2} \def\nbchapbeg#1{% \parskipval=\parskip \parfillskip=0pt\par\parskip=0pt\noindent\parfillskip=0pt plus 1fil \setbox\dropcapbox=\hbox{\dropnumfont #1}% \dimen0=\wd\dropcapbox \advance\dimen0 by 1ex \dimen1=\wd\dropcapbox \advance\dimen1 by -1ex \dimen2=\linewidth \advance\dimen2 by -\dimen1 \newparshape 2 \dimen0 \dimen2 1 0pt \linewidth \\% \noindent \rlap{% \smash{% \raise -0.56\baselineskip \hbox{% \unhbox\dropcapbox \hskip 1ex }% }% }% \ignorespaces \parskip=\parskipval }