Hot
- Proof environment already defined with \DocumentMetadata{pdfstandard=UA-2}by Gaussler on September 28, 2026 at 12:04 pm
I just updated to TeX Live 2026. Now when I compile the following, I get ! LaTeX Error: Command \proof already defined. The problem disappears if I remove the \DocumentMetadata line: \DocumentMetadata{pdfstandard=UA-2} \documentclass{article} \usepackage{amsmath} \usepackage{ntheorem} \theoremstyle{nonumberplain} \newtheorem{proof}{Proof} \begin{document} You want proof? \end{document}
- Macro which prints input only if all internal invocations of a second macro are non-blank?by modallyFragile on September 28, 2026 at 9:11 am
I want to define two macros, let's call them \coalesce and \coalescegroup. \coalescegroup is only ever used within \coalesce (names are inspired by the Postgres command). \coalesce prints its input if and only if every instance of \coalescegroup within that input prints something non-blank (where blankness is tested by \tl_if_blank:nTF or a variant). Otherwise it discards its input. \coalescegroup divides its input at every instance of some delimiter -- say \coalesceor, and then prints the first division which is not blank (by the same test). If all are blank, it prints nothing. The motivation is templating in class files. I maintain class files for things like handouts and syllabi, where I often want to do things like print 'my email is ', but only if my email is defined. Usually that would be something like \ifblank{\email}{}{My email is: \email} but with coalesce it can be \coalesce{My email is: \coalescegroup{\email}}, which to me makes much more sense. I also like the idea of setting up active characters for these things within coalesce, so that the last example could be written \coalesce{My email is: <\email>}, but that's a separate issue. How can I do this? Below is a MWE of what I've tried so far. I feel like it's close, but not quite there. My idea was to define \coalesceor to evaluate to itself, then define \coalescegroup to exhaustively expand its input, split it on \coalesceor (which will survive the expansion, because it expands to itself), then map over the result and print the first non-blank element, or the token \__coalesce_stop if they're all blank. Then \coalesce uses the same trick: define \__coalesce_stop to expand to itself, \coalesce then just expands its input, checks to see if the resulting token list includes \__coalesce_stop, and prints it all just if it doesn't. I think the basic idea is probably OK, but I can't get the expl3 details right. \documentclass{article} \ExplSyntaxOn % First attempt at coalescegroup % Define a boolean for 'already done' \bool_new:N \__coalesce_coalescegroup_bool % Processor for arguments \cs_new:Npn \__coalesce_coalescegroup_step #1 { \bool_if:NF \__coalesce_coalescegroup_bool \tl_if_blank:nF #1 % If the group isn't blank, then ... % ... we will (eventually) print this arg. {\tl_set:Nn \tl_tmpa_tl {#1} % ... and set the boolean. \bool_set_true:N \__coalesce_coalescegroup_bool } } % Disjunction token \cs_new:Npn \coalesceor { \exp_not:N \coalesceor } \NewDocumentCommand{\coalescegroup}{ m }{ \bool_set_false:N \__coalesce_coalescegroup_bool % Set the scratch list a to be empty. \tl_set:Nn \tl_tmpa_tl {\__coalesce_stop} \tl_set:Nn \tl_tmpb_tl {\exp_args:Ne {\SplitList{\coalesceor}} { #1 }} \ProcessList \tl_tmpb_tl { \__coalesce_coalescegroup_step } % Print the output \tl_tmpa_tl } % Second attempt \NewDocumentCommand{\newcoalescegroup}{ >{\SplitList{\coalesceor}} m }{ \tl_new:N \coalescegroup_output_tl \tl_set:Nn \coalescegroup_output_tl \__coalesce_stop \tl_set:Nn \tl_tmpa_tl {\exp_args:ne { #1 }} \tl_map_inline:Nn \tl_tmpa_tl { % If the token is non-empty ... \tl_if_blank:nF #1 { % ... then write it to output var \coalescegroup_output_tl \tl_set:Nn \tl_tmpa_tell #1 % ... and break. \tl_map_break: } } % Leave result in the input stream \coalescegroup_output_tl } % Blocker token \cs_new:Npn \__coalesce_stop { \exp_not:N \__coalesce_stop } \NewDocumentCommand{\coalesce}{ m }{ % Print nothing if the blocker cs is found. \exp_args:Ne \tl_if_in:nnTF { #1 } \__coalesce_stop {} { #1 } } \ExplSyntaxOff % Testing values \def\blank{} \def\something{something} \begin{document} \section{First attempt} % Should print nothing, prints `foo bar' \coalesce{foo \coalescegroup{\blank} bar} % Should print nothing (because the second coalesce group fails), % prints `foo something bar baz' \coalesce{foo \coalescegroup{\something} bar \coalescegroup{\blank} baz} % Should print `foo something bar', and does! \coalesce{foo \coalescegroup{\blank \coalesceor \something} bar} % Should print `foo literal bar', and does! \coalesce{foo \coalescegroup{\blank \coalesceor literal} bar}\ \section{Second attempt} % Should print nothing, prints `foo bar' \coalesce{foo \newcoalescegroup{\blank} bar} % These all produce Error: Control sequence \coalescegroup_output_tl % already defined: % % \coalesce{foo \newcoalescegroup{\something} bar \newcoalescegroup{\blank} baz} % \coalesce{foo \newcoalescegroup{\blank \coalesceor \something} bar} % \coalesce{foo \newcoalescegroup{\blank \coalesceor literal} bar} \end{document} TIA.
- MLTeX and encTeX interactionby lodwicz on September 27, 2026 at 7:34 pm
I know that modern 8bit TeX implementations (TeXLive) may enable both MLTeX and encTeX extensions. My question is thus both technical and historical. I am enabling all three extensions (with eTeX) for some custom Plain pdfTeX macros, but I'd like to understand the processing order, and thus the interaction, amongst these extensions in terms of reencoding and hyphenation. So, assume I have an hyphenation pattern including with 1n defined in the format, that I have a pdfTeX with all three extensions enabled, and I reencode and substitute ñ, as follows, to enable UTF-8 input: \mubyte ^^D1 ^^C3 ^^91 \endmubyte % Ñ \mubyte ^^F1 ^^C3 ^^B1 \endmubyte % ñ \charsubdef ^^D1 = '176 ^^4E % Ñ \charsubdef ^^F1 = '176 ^^6E % ñ My actual question is this: in this case, it is clear to me that the hyacc-cm macros, to enable hyphenation in the remaining part of a composite word (say: "pi-ña-ta"), are unnecessary to enforce hyphenation even in Computer Modern fonts, if I define the \chars for Latin1 and compatible encodings as follows: \catcode^^D1=\active \catcode^^F1=\active \def^^D1={\~N} \def^^F1={\~n} I ran some experiments to check whether this was true, rather successfully, but I cannot understand exactly why. I haven't seen (maybe haven't searched enough for) any explanation of the interaction between MLTeX and encTeX that explains this behavior. Some references to some documentation are surely welcome.
- Align the equal sign of two groups `aligned` with two tagsby myhsia on September 27, 2026 at 5:45 pm
Two aligned environments inside two equation environments (obviously, two tags), now I want to align the 4 = signs. I know I can place the middle text inside the \shortintertext or \intertext provided by the mathtools package, but how to keep only 2 numbered tags keep in the middle of each aligned group vertically? \documentclass{article} \usepackage{mathtools} \begin{document} some text \begin{equation}\label{eq:eta_quantum} \begin{aligned} abc & = defghij\\ & = \int f(x) dx, \end{aligned} \end{equation} some text \begin{equation}\label{eq:eta_classical} \begin{aligned} defghi & = defghij\\ & = \int f(x) dx, \end{aligned} \end{equation} \end{document}
- Why does combining TikZ `patterns` and `fadings` cause rendering problems in some PDF viewers? [closed]by kabenyuk on September 27, 2026 at 3:47 pm
I have come across an interesting difference in how a PDF produced by TikZ is rendered by different PDF viewers. The following MWE isolates the issue: \documentclass{article} \usepackage{tikz} \usetikzlibrary{patterns,fadings} \begin{document} \begin{tikzpicture} % Pattern only \fill[draw,pattern=north west lines] (0,0) rectangle (3,.4); % Fading only \fill[draw,path fading=east] (0,-1) rectangle (3,-.6); % Pattern + fading \fill[draw,pattern=north west lines,path fading=east] (0,-2) rectangle (3,-1.6); \end{tikzpicture} \end{document} Left: Adobe Acrobat. Right: WinEdtPDF. The same PDF file is shown in both viewers. In WinEdtPDF the first two rectangles are rendered correctly. The problem appears only in the third one, where pattern=north west lines and path fading=east are used together: the hatching is not rendered correctly. Thus, pattern=north west lines works by itself, and path fading=east works by itself. The rendering difference appears only when the two TikZ mechanisms are combined. The same PDF is rendered correctly in Adobe Acrobat, Microsoft Edge, and Firefox. The same defect as in WinEdtPDF is also visible in Google Drive's PDF preview. I initially reported this to the WinEdt developer. Alex Simonic explained that WinEdtPDF uses PDFium for rendering and that the behavior observed there is a limitation of PDFium rather than of WinEdtPDF itself: https://github.com/WinEdt-Team/WinEdt-Support/discussions/131#discussioncomment-18627725 So my question is about the TikZ/PDF side of this behavior: what does TikZ write into the PDF when a pattern and path fading are combined, and what is special about this construction that makes different PDF rendering engines handle it differently?
- How to draw reaction mechanism arrows in chemfig?by alayne on September 27, 2026 at 3:20 am
I want to draw a simple arrow with its tail towards the C-H bond and its arrowhead pointing to the plus charge. Here is what I have so far: \documentclass[12pt]{article} \special{papersize=3in,5in} \usepackage{chemfig} \begin{document} \schemestart \chemfig{(-[:90]H)(-[:150])(-[:210])(-[:330]{\charge{330:3pt=$\scriptstyle \oplus$}{}}) } \arrow{->} \chemfig{{\charge{180:3pt=$\scriptstyle \oplus$}{}}(-[:0])(-[:120])(-[:240])} \schemestop \end{document} Also, for some reason, I can't add images
- How to adjust the width and height of underbracket and overbracket with LuaLaTeX?by Mika Ike on September 26, 2026 at 10:17 pm
Mathtools package admits width and height adjusts with PDFLaTeX, but with LuaLaTeX width and height is not adjustable. How to adjust or use native mathtools? \documentclass{article} \usepackage[spanish,es-notilde]{babel} \usepackage{amsmath,amssymb,mathtools} % amssymb, en LuaLaTeX, debe cargarse antes que unicode-math \usepackage{fontspec} \usepackage{unicode-math} \setmainfont{TeX Gyre Pagella} \setmathfont{TeX Gyre Pagella Math} \usepackage{xcolor} \begin{document} \[ B(x)\underbracket[0.5pt]{A(z)}_{\text{Esto es una prueba}}C(w) B(x)\underbracket{A(z)}_{\text{Esto es una prueba}}C(w) \] \[ B(x)\overbracket[0.5pt]{A(z)}^{\text{\footnotesize Esto es una prueba}}C(w) B(x)\overbracket{A(z)}^{\text{\footnotesize Esto es una prueba}}C(w) \] \end{document}
- How to adjust the placement of the chemical reaction arrows in chemmacros so that it is horizontally aligned with the center of the chemfig figures?by alayne on September 26, 2026 at 4:25 pm
I need to show the structure of the products and reactants in a chemical equation. However, the arrow is not horizontally aligned to the center of the chemical figures. Here is the commands: \documentclass[12pt]{article} \special{papersize=3in,5in} \usepackage{chemmacros} \usepackage{chemfig} \usepackage[version=4] {mhchem} \begin{document} \begin{reaction*} \chemfig{(-[:210])(-[:330]OH)} ->[O] \chemfig{(-[:210])(=[:330]O)} \end{reaction*} \end{document}
- Adding -\infty and +\infty using nl-intervalby Sebastiano on September 26, 2026 at 12:40 pm
Is there a remote possibility to have, -\infty and +\infty, below the real line using only the package nl-interval? \documentclass{article} \usepackage{nl-interval} \begin{document} \begin{tikzpicture} \nlAxisX{-2}{5} \nlnuminf[pattern=north west lines]{1.5}[+3]{c}[.2] \end{tikzpicture} \begin{tikzpicture} \nlAxisX{-2}{5} \nlinfnum[pattern=north west lines]{1}[-5]{o}[.2] \end{tikzpicture} \begin{tikzpicture} \nlAxisX{-2}{5} \nlnumnum{-1}{o}{3}{c}[.2] \end{tikzpicture} \end{document}
- why is TeX capacity exceeded with \DocumentMetadata{tagging=off}?by murray on September 26, 2026 at 1:34 am
This source compiles just fine with the line \DocumentMetadata{tagging=off} commented out, as shown. Why, if I uncomment that line, do I get a "TeX capacity exceeded" at line 15, and how can this be fixed? \NeedsTeXFormat{LaTeX2e}[2026-06-01] % !TEX program = lualatex %\DocumentMetadata{tagging=off} \documentclass{book} \usepackage{fontspec} \usepackage{lua-unicode-math} \usepackage[thmtools-compat]{keytheorems} \newkeytheoremstyle{thmstyle}{} \AtBeginDocument{\newkeytheorem{theorem}[name=Theorem,style=thmstyle,numberwithin=chapter]} \usepackage{hyperref} \begin{document} \chapter{A chapter} \section{The section} \begin{theorem}[A key theorem] Some theorem text \end{theorem} \end{document}
- Best way to convert Latex to Doc [duplicate]by Giovanna Oliveira Silva on September 25, 2026 at 7:06 pm
I have been searching for the best way to convert a .tex file to .docx I have tried a lot, but have not found the most trustworthy. I'm not the most knowledgeable in that sector, being in the humanities area, but love using latex. The teachers and scientific journals all ask for doc files. I don't need the easiest way, but the one that needs the least corrections and adjustments after conversion . I have windows, so it need to be possible on it.
- Enumitem: problem with formatting *itemize* inside *description* listby Zarko on September 25, 2026 at 4:12 pm
Consider the following example: \documentclass{article} \usepackage{lipsum} \usepackage{enumitem} \begin{document} \begin{description}[style=nextline] \item[First item] \lipsum[11] \item[Second item] \begin{itemize} \item first subitem \item second subitem \end{itemize} \end{description} \end{document} Why itemize list in above example doesn't start in new line as other normal text do? Is this a bug? Well, I can manage this behaviour by adding \mbox{} after description label.
- Figure placement with minimal whitespaceby Ali on September 25, 2026 at 3:33 pm
Is there any way to tell LaTeX to place a figure as close as possible to where it is in the source text, but to prioritise having as little whitespace as possible? Currently I'm using the code below \begin{figure}[h] \centering \includegraphics[width=\textwidth]{image.png} \caption{} \end{figure} but if the figure is too big, it gets sent to the end of the document on a page by itself (even if the figure doesn't take up a whole page). Leaving the [h] out is slightly better, but still puts the figure on a page by itself with lots of whitespace if it's big enough. The answers to this question suggest using [H], but that then again generates a potentially large amount of whitespace. At the moment my solution is to figure out manually where the best figure placement is, then navigate to that position in the source code and use [H] to make sure the is placed there, but of course as soon as I change any of the earlier text this breaks.
- How do we create a `\subsubsubsection` (using `\paragraph`) and `\subsubsubsubsection` (using `\subparagraph`) in amsart?by Arbuja on September 25, 2026 at 3:13 pm
Using Latex Overleaf, I want to create a \subsubsubsection with \paragraph and \subsubsubsubsection with \subparagraph in \documentclass{amsart}. However, there are two problems: The \subsubsubsection returns an error sign If I add an * to the \subsubsubsection and \subsubsubsubsection (e.g., \subsubsubsection*), it won't disappear from the table of contents. \documentclass[11pt]{amsart} \newcommand{\subsubsubsection}{\paragraph} \newcommand{\subsubsubsubsection}{\subparagraph} \setcounter{secnumdepth}{5} \setcounter{tocdepth}{5} \title[Title]{Title} \author[Arbuja]{Arbuja Krishnan} \address{None, Unaffiliated, United States} \begin{document} \maketitle \tableofcontents \section{adhfk} \subsection{aksad} \subsubsection{fsajk} \subsubsubsection{agrg} \subsubsubsubsection{sjaf} \subsubsection{aehkfg} \subsubsubsubsection*{asfkdh} %We want this invisible from the table of contents%) \subsubsubsubsection*{asdgj} %We want this invisible from the table of contents%) \end{document} Question: How do I fix the problems above the code?
- Producing the Thirteen Stars' Distribution on the 1777 American Flagby DDS on September 25, 2026 at 11:48 am
This is an extension of Replacing a Circle of Asterisks with Tikz Colored Stars Consider the code: \documentclass{book} \usepackage{tikz} \usetikzlibrary{shapes.geometric} \definecolor{thisblue}{RGB}{10,49,97} %\definecolor{thisred}{RGB}{179,25,66} \begin{document} \thispagestyle{empty} \pagecolor{thisblue} \noindent {\LARGE\bfseries{\textcolor{white}{Twelve even-spaced stars:}}} \vspace{10pt} \begin{center} \begin{tikzpicture} \foreach \k in {0,30,...,330} \node[ shape=star, star points=5, star point ratio=2.5, minimum size=0.8cm, fill=white, draw=white ] at (\k:3.5cm) {}; \end{tikzpicture} \end{center} \vspace{40pt} \noindent {\LARGE\bfseries{\textcolor{white}{Supposed to be thirteen even-spaced stars:}}} \vspace{10pt} \begin{center} \begin{tikzpicture} \foreach \k in {0,27.69,55.38,...,332.28} \node[ shape=star, star points=5, star point ratio=2.5, minimum size=0.8cm, fill=white, draw=white ] at (\k:3.5cm) {}; \end{tikzpicture} \end{center} \end{document} which produces: The first problem (regarding the second set of stars) is that there are only twelve stars (not thirteen). The second problem should be (the way I thought I have estimated it) should be roughly according to the thirteen (original colonies) represented as stars in the original (Betsy Ross) flag (See: Betsy Ross Flag): QUESTION: What am I doing wrong? How may I replicate the star-distribution on Betsy Ross' flag? (Incidentally, I still do not understand how my code did not display thirteen stars for the second figure.) Thank you.
- Switching between fourier and helveticaby Amir on September 25, 2026 at 8:10 am
In a manuscript there are two sections, the main part and the application part. For the main we use fourier package and for the application we use phv font with helvetica. The codes interfere with each other then. For example \Biggl(, \Biggr), \begin{cases} ... \end{cases} , \Biggl|, \Biggr| are not working for the fourier case. Also, \hbar is wrongly typed in the application part. Here is the code (given by AI) I am using % Configuration of \mathversion{application} (Helvetica / CM Math) \DeclareMathVersion{application} \SetSymbolFont{operators}{application}{T1}{phv}{m}{n} \SetSymbolFont{letters}{application}{OML}{cmm}{m}{it} \SetSymbolFont{symbols}{application}{OMS}{cmsy}{m}{n} \SetSymbolFont{largesymbols}{application}{OMX}{cmex}{m}{n} \SetMathAlphabet{\mathrm}{application}{T1}{phv}{m}{n} \SetMathAlphabet{\mathbf}{application}{T1}{phv}{b}{n} \SetMathAlphabet{\mathit}{application}{T1}{phv}{m}{it} % Dynamic Math Slot Switcher for Fourier <-> Application (Helvetica/CM) \makeatletter \let\fourier@orig@hbar\hbar % Fourier (normal) specific slots & delimiters \newcommand{\fourier@mathslots}{% \let\hbar\fourier@orig@hbar \global\mathcode`+ = "2280 \global\mathcode`- = "2200 \global\mathcode`= = "3281 \global\mathcode`< = "3282 \global\mathcode`> = "3283 % Delcodes for (, ), [, ], {, } \global\delcode`( = "0283A1 \global\delcode`) = "0293A2 \global\delcode`[ = "05B3A3 \global\delcode`] = "05D3A4 \global\delcode`\{ = "266328 \global\delcode`\} = "267329 % Macros for \lbrace, \rbrace, | \gdef\lbrace{\delimiter"4266328 }% \gdef\rbrace{\delimiter"5267329 }% \gdef\vert{\delimiter"026A30C }% \gdef\vertbar{\delimiter"026A30C }% } % Standard / Helvetica (application) slots & delimiters (CMEX/OMS) \newcommand{\standard@mathslots}{% \gdef\hbar{{\mathchar'26\mkern-9mu h}}% \global\mathcode`+ = "202B \global\mathcode`- = "2200 \global\mathcode`= = "303D \global\mathcode`< = "313C \global\mathcode`> = "313E % Delcodes for (, ), [, ], {, } \global\delcode`( = "028300 \global\delcode`) = "029301 \global\delcode`[ = "05B302 \global\delcode`] = "05D303 \global\delcode`\{ = "266308 \global\delcode`\} = "267309 % Macros for \lbrace, \rbrace, | \gdef\lbrace{\delimiter"4266308 }% \gdef\rbrace{\delimiter"5267309 }% \gdef\vert{\delimiter"026A30C }% \gdef\vertbar{\delimiter"026A30C }% } % Switch math slots when the math version changes \let\orig@mathversion\mathversion \renewcommand{\mathversion}[1]{% \orig@mathversion{#1}% \def\@tempa{#1}% \def\@tempb{normal}% \ifx\@tempa\@tempb \fourier@mathslots \else \standard@mathslots \fi } % Initialize in Fourier / normal mode \fourier@mathslots \makeatother Can you fix it so that two sections are working properly without interefering with each other? thanks.
- How to adjust the opacity of the solution enviroment background in exam class?by Mika Ike on September 25, 2026 at 6:06 am
How to adjust the opacity of the solution background in exam class? \documentclass[12pt]{exam} \usepackage[dvipsnames,x11names,svgnames]{xcolor} \shadedsolutions \colorlet{SolutionColor}{cyan!33} \usepackage{tikz} \usepackage{watermark} %-------------------------------- \watermark{ \begin{tikzpicture}[remember picture,overlay] \node [scale=1.1824,rotate=45,anchor=base,shift={(0em,6em)}] at (current page.center) [text width=1.64\linewidth,rounded corners,align=center] {{\color{pink} \parbox[][][m]{32cm}{ \LARGE{ {\center \hspace{6em}XXXXXXXXXXXXXX YYYYYYYYYYYYYYYY ZZZZZZZZZZZZZZZZ .......}}} }}; \end{tikzpicture} } \printanswers \begin{document} \begin{questions} \question $2+4=$ \begin{solution} $2+4=6$ \end{solution} \question $5+6$ \end{questions} \end{document}
- Why TeX does not print error for hyphenchar when \language is changed?by Igor Liferenko on September 25, 2026 at 6:01 am
If we run TeX on this example1.tex \hfuzz=\maxdimen \hsize=0pt \hyphenchar\font=`^^ff \hskip0pt error \bye in log file we get Missing character: There is no ^^ff in font cmr10! But if we change \language in example2.tex, this error message is not produced. Why? \language 1 \hfuzz=\maxdimen \hsize=0pt \hyphenchar\font=`^^ff \hskip0pt error \bye EDIT Let us load patterns. Create this my.tex: \input plain \language 1 \patterns {z4zy} \dump Then run tex -ini my to create my.fmt. Then run the example with new format: tex -fmt my example2 The warning in log file still does not appear. Why?
- zleftrepeat not working with noindent in Musixtexby ABV on September 25, 2026 at 3:55 am
It is needed to implement \zleftrepeat command with \noindent\kern-1.6cm to avoid the offset, but it is not working even though it uses \alaligne before call the command. The basic code is as follow: \documentclass[12pt]{article} % ========== FORMATO DE PÁGINA: A4 VERTICAL ========== \usepackage[a4paper,portrait,left=0.4cm,right=0.2cm,top=0.2cm,bottom=0.2cm]{geometry} \pagestyle{empty} % ========== PAQUETES ========== \usepackage{tikz} \usetikzlibrary{quotes} \usetikzlibrary{shapes} \usetikzlibrary{fit,positioning} \usetikzlibrary{arrows.meta} \usetikzlibrary{decorations} \usepackage{amsmath} \usepackage{xcolor} \usetikzlibrary{calc} \usepackage{musicography} \usepackage{musixtex} \input musixlyr \input musixjt \xdefinecolor{red-undar}{RGB}{179,35,79} \begin{document} \begin{music} % ========== CONFIGURACIÓN GLOBAL ========== \parindent0mm% \staffbotmarg8\Interligne \font\B=phvb8t at 12pt \font\A=phvb8t at 10pt \A% \setsongraise1{6mm} \setstaffs1{1} \setlines{1}{5} \setclef{1}{\treble} \setclefsymbol{1}{\empty}% \generalmeter{\meterfrac34}% %\nobarnumbers% \systemnumbers% \def\raisebarno{5\internote}% % acerca el número al pentagrama \def\shiftbarno{-5pt}% % posición horizontal \def\writebarno{\eightrm\the\barno\barnoadd}% quita el recuadro, usa texto simple \nostartrule % ancho de sistema = ancho del texto de la página A4 (sin sobreancho) % ========== SISTEMA 1 (6 compases) ========== \startpiece \Notes\usf m\ibl1i0\qb1j\nbbl1\qb1j\tbl1\qb1j\usf m\ibl2i0\qb2{j}\tbl2\qb2{j}\Qqbbl jjjj\en\bar% \Notes\usf m\ibl1i0\qb1j\nbbl1\qb1j\tbl1\qb1j\usf m\ibl2i0\qb2{j}\tbl2\qb2{j}\Qqbbl jjjj\en\bar% \Notes\usf m\ibl1i0\qb1j\nbbl1\qb1j\tbl1\qb1j\usf m\ibl2i0\qb2{j}\tbl2\qb2{j}\Qqbbl jjjj\en\bar% \Notes\usf m\ibl1i0\qb1j\nbbl1\qb1j\tbl1\qb1j\usf m\ibl2i0\qb2{j}\tbl2\qb2{j}\Qqbbl jjjj\en\bar% \alaligne\noindent\kern-1.6cm\zleftrepeat% \Notes\ccharnote{-5}{\hspace{-0.7cm}\p}\usf p\ql j\Dqbu fj\qu f\en\bar% \Notes\usf p\ql j\Dqbu fj\Dqbu ff\en\bar% \Notes\usf p\ql j\Dqbu fj\qu f\en\bar% \Notes\usf p\ql j\Dqbu fj\Dqbu ff\en\bar% \Notes\usf p\ql j\Dqbu fj\qu f\en\bar% \Notes\usf p\ql j\Dqbu fj\Dqbu ff\en\bar% \Notes\usf p\ql j\Dqbu fj\qu f\en\bar% \Notes\usf p\ql j\Dqbu fj\Dqbu ff\en\bar% \Notes\usf p\ql j\Dqbu fj\qu f\en\bar% \NOtes\stdstemfalse\smallnotesize\islurd{1}{j}\grcu j\en% \Notes\tslur{1}{j}\ql j\qp\qp\en\rightrepeat% \Notes\ccharnote{-19}{\hspace{0.3cm}\mf}\usf m\ibl0i0\qb0j\triolet l\nbbl0\qb0{jj}\tql0j\usf m\ibl1i0\qb1{j}\tbl1\qb1{j}\Qqbbl jjjj\en\bar% \NOtes\stdstemfalse\smallnotesize\islurd{1}{j}\grcu j\en% \Notes\tslur{1}{j}\ql j\qp\qp\en\bar% \NOtes\stdstemfalse\smallnotesize\islurd{1}{j}\grcu j\en% \Notes\tslur{1}{j}\fermataup{k}\ql j\qp\qp\en\setdoubleBAR% \nolyr% \lyricsoff% \endpiece% \end{music} \end{document} The current output is as follow: The desired output is as follow:
- Why TeX does not print error message about \hyphenchar for some fonts?by Igor Liferenko on September 25, 2026 at 3:44 am
If we run TeX on this file \hfuzz=\maxdimen \hsize=0pt \hyphenchar\font=`^^ff \hskip0pt error \bye in log file we get Missing character: There is no ^^ff in font cmr10! But if we load rm-lmr10 font, this error message is not produced. Why? \font\F=rm-lmr10 \F \hfuzz=\maxdimen \hsize=0pt \hyphenchar\font=`^^ff \hskip0pt error \bye Which part of rm-lmr10 makes TeX not to print this message? Is this proper behavior?
- Override a PGF key .initial value for a new shapeby karlh on September 25, 2026 at 12:00 am
Is it possible to set shape border rotate to a new default for a particular shape? For example, say I want to define a shape (which I'll call trapezoid in the MWE) that is essentially a trapezium but it is rotated by 180° by default. For example, \documentclass{standalone} \usepackage{tikz} \usetikzlibrary{shapes.geometric} \pgfdeclareshape{trapezoid}{% \nodeparts{text}% \inheritsavedanchors[from=trapezium]% \inheritbackgroundpath[from=trapezium]% \inheritanchorborder[from=trapezium]% \inheritanchor[from=trapezium]{text}% \inheritanchor[from=trapezium]{center}% \inheritanchor[from=trapezium]{north}% \inheritanchor[from=trapezium]{south}% \inheritanchor[from=trapezium]{east}% \inheritanchor[from=trapezium]{west}% \inheritanchor[from=trapezium]{north west}% \inheritanchor[from=trapezium]{north east}% \inheritanchor[from=trapezium]{south west}% \inheritanchor[from=trapezium]{south east}% \behindbackgroundpath{% \pgfpathmoveto{\lowerleftpoint}% \pgfpathlineto{\upperrightpoint}% }% }% \begin{document} \begin{tikzpicture} \node [draw,trapezium,minimum size=1cm] {}; \node [draw=blue,trapezoid,minimum size=1cm,name=s] at (0,-1.25) {}; \node [draw=orange,trapezoid,minimum size=1cm,shape border rotate=180] at (0,-2.5) {}; % \foreach \anchor/\placement/\color in {north/above/orange,south/below/teal, % east/right/red,west/left/green,50/above/violet} % \draw [color=\color,shift=(s.\anchor)] plot [mark=x] coordinates {(0,0)}; \end{tikzpicture} \end{document} but both the blue and the orange shapes should be the same. Alternatively, the blue one could be narrow-end-on-top, and the orange one rotates 180° more and looks like the black one. Options I have considered: Define a new shape and a new set of keys to go with it that are very similar to trapezium except upside-down (this is the worst option) Define trapezoid as a style that calls another shape (say, decorated trapezium or some such) whose only real purpose is to set another default value of shape border rotate Create an anchor that reads another key (say, trapezoid rotate) that determines what the user wants the new angle to be, then sets shape border rotate to something based on that. I am hoping there is another way, something like issuing \changepgfinitialvalue inside the shape definition so that the initial value changes for that shape (and only that shape). Is there? Clarification: what I want is a shape (I used trapezium here, but it could be something else) that looks similar to an existing one, but has extra things drawn on it, an appendage of some sort, etc., but the base shape is rotated with respect to the original. If there is a way to do this so that the user who calls, say, shape=trapezoid instead of just trapezoid without reverting the orientation, that would be my preference. In other words, inherit everything from a shape, build on it with \beforebackgroundpath, \foregroundpath, and such, and change the default orientation.
- Rotate some table header's textby Natan Camargos on September 24, 2026 at 7:36 pm
My goal is to achieve this: Best that a can do now is: \begin{tabular}{c c c c c} &\Text{Calça Azul} & \text{Calça Preta} & \text{Sapato Azul} & \text{Sapato Preto} \\ \text{Camisa branca} & & & & \\ \text{Camisa vermelha} & & & & \end{tabular} How to get something more close to the goal?
- Drawing a rectangular box in three different orientations with TikZby Sebastiano on September 24, 2026 at 7:26 pm
I am preparing some physics exercises about pressure, and I would like to illustrate a rectangular box that can be placed on each of its three different faces. In this way, the same box would have three different base areas, while its dimensions remain unchanged. For example, my box has dimensions: 23 cm, 24 cm, 46 cm I would like to create the three possible orientations of the box with TikZ, so that in each drawing a different face is touching the ground. At the moment, I have this code for one orientation: \documentclass{article} \usepackage[margin=0.5in]{geometry} \usepackage{tikz} \begin{document} \begin{center} \begin{tikzpicture}[x=0.027cm,y=-0.027cm,line width=0.35pt,draw=black!75] \draw (77,123)--(77,199)--(146,231)--(281,163)--(281,110); \draw (146,156)--(146,231); \draw (212,55)--(212,122); \draw (77,123)--(60,84)--(126,117)--(146,156)--cycle; \draw (77,123)--(51,96)--(186,27)--(212,55)--(109,109); \draw (212,55)--(232,16)--(301,48)--(281,87)--cycle; \draw (146,156)--(281,87)--(319,91)--(184,160)--cycle; \draw[<->] (66,126)--(66,198); \draw[<->] (72,210)--(141,242); \draw[<->] (151,242)--(286,173); \node[rotate=-90,inner sep=0pt,font=\small] at (57,160) {23 cm}; \node[rotate=-25,inner sep=0pt,font=\small] at (101,233) {24 cm}; \node[rotate=27,inner sep=0pt,font=\small] at (227,213) {46 cm}; \end{tikzpicture} \end{center} \end{document} Is there a relatively simple way to modify this code (or to define a reusable TikZ command) so that I can obtain the other two orientations of the same box, with the 23 cm, 24 cm, and 46 cm dimensions exchanged accordingly? Ideally, I would like to be able to write something like \boxorientation{23}{24}{46} and obtain the corresponding drawing, or otherwise have a convenient way to generate the three possible orientations. The purpose is to use the drawings in physics exercises about pressure, where the students have to calculate the pressure exerted by the box when it rests on each of its three possible bases.
- How can I make a vee with two bars underneath it?by Akiva Weinberger on September 24, 2026 at 6:10 pm
In their 1962 paper "The Braid Groups," Fox and Neuwirth use a notation similar to \veebar to describe one point being directly on top of another in the plane, as shown below. I was wondering what the best way to reproduce this in LaTeX would be. One option would be \stackrel\vee=, but it doesn't have quite the right spacing. (I wonder how they did it. Obviously this predates LaTeX, but I don't know enough about the way mathematics papers were typeset in the 60s. By the way, the terms "abscissa and ordinate" refer to the x- and y-coordinate respectively.)
- Replacing a Circle of Asterisks with Tikz Colored Starsby DDS on September 24, 2026 at 2:52 pm
First, consider the code which produces the colored star: \documentclass{article} \usepackage{tikz} \usetikzlibrary{shapes.geometric} \begin{document} \begin{center} \begin{tikzpicture} \node[ shape=star, star points=5, star point ratio=2.5, minimum size=0.8cm, fill=red, draw=red ] {}; \end{tikzpicture} \end{center} \end{document} which produces: Now, consider the code which produces the tikz circle of asterisks: \documentclass{book} \usepackage{tikz} \usetikzlibrary{shapes.geometric} % Required for the star shape \usetikzlibrary{calc} \definecolor{oldgloryblue}{RGB}{10,49,97} \begin{document} \thispagestyle{empty} \begin{center} \begin{tikzpicture} \foreach \k in {0,30,...,360} \node at ($(0,0)+(\k:2)$){*}; \end{tikzpicture} \end{center} \end{document} and which produces However, when I replace the asterisk by `shape=star, star points=5, star point ratio=2.5, minimum size=0.8cm, fill=red, draw=red` I encounter many problems. QUESTION: How may I produce the circular image of `red stars' instead of the circular images of asterisks? Thank you.
- Manipulating the numbering of tcolorboxes created by newtcbtheoremby Littlejacob2603 on September 24, 2026 at 1:42 pm
I have the following set up for my different elements \documentclass{report} \usepackage[theorems]{tcolorbox} % for producing coloured boxes \tcbuselibrary{theorems} % theorems with tcolorbox \tcbuselibrary{breakable} \tcbuselibrary{skins} \definecolor{myblack}{RGB}{0, 0, 0} \definecolor{mywhite}{RGB}{255, 255, 255} \definecolor{mylightblue}{RGB}{102, 178, 255} \definecolor{mymidblue}{RGB}{0, 128, 255} \definecolor{mydarkblue}{RGB}{0, 0, 204} \definecolor{mylightgreen}{RGB}{128, 255, 0} \definecolor{mymidgreen}{RGB}{102, 204, 0} \definecolor{mydarkgreen}{RGB}{76, 153, 0} \definecolor{mylightred}{RGB}{255, 153, 153} \definecolor{mymidred}{RGB}{255, 102, 102} \definecolor{mydarkred}{RGB}{255, 51, 51} \definecolor{myyellow}{RGB}{255, 255, 0} \definecolor{myorange}{RGB}{255, 204, 153} \definecolor{mydarkpink}{RGB}{255, 102, 178} \definecolor{mymidpink}{RGB}{255, 153, 204} \definecolor{mylightpink}{RGB}{255, 204, 229} \tcbset{commonstyle/.style={ breakable, enhanced, coltitle=myblack, colupper=myblack, toprule=1mm, bottomrule=1mm, leftrule=1mm, rightrule=1mm }, defstyle/.style={ commonstyle, colframe=mydarkblue, colback=mylightblue, colbacktitle=mymidblue}, theostyle/.style={ commonstyle, colframe=mydarkred, colback=mylightred, colbacktitle=mymidred}, exastyle/.style={ commonstyle, colframe=mydarkgreen, colback=mylightgreen, colbacktitle=mymidgreen}, remstyle/.style={ commonstyle, colframe=mydarkpink, colback=mylightpink, colbacktitle=mymidpink} } \newtcbtheorem[number within=section, Crefname={theorem}{theorems}]{theorem}{Theorem}{theostyle}{theo} \newtcbtheorem[use counter from=theorem, Crefname={definition}{definitions}]{definition}{Definition}{defstyle}{def} \newtcbtheorem[use counter from=theorem, Crefname={example}{examples}]{example}{Example}{exastyle}{exa} \newtcbtheorem[use counter from=theorem, Crefname={remark}{remarks}]{remark}{Remark}{remstyle}{rem} \newtcbtheorem[use counter from=theorem, Crefname={corollary}{corollaries}]{corollary}{Corollary}{theostyle}{cor} \newtcbtheorem[use counter from=theorem, Crefname={lemma}{lemmas}]{lemma}{Lemma}{theostyle}{lem} \newtcbtheorem[use counter from=theorem, Crefname={proposition}{propositions}]{proposition}{Proposition}{theostyle}{prop} \newtcbtheorem[use counter from=theorem, Crefname={algorithm}{algorithms}]{algorithm}{Algorithm}{theostyle}{alg} \tcolorboxenvironment{proof}{commonstyle,colframe=mydarkred, colback=myorange, colbacktitle=mymidred} \begin{document} \chapter{Chapter 1} \section{Section 1.1} \begin{theorem}{Title}{1.1.1} ... \end{theorem} \begin{lemma}{Title}{1.1.2} ... \end{lemma} \begin{sublemma}{Title}{1.1.2a} ... \end{sublemma} \begin{corollary}{Title}{1.1.3} ... \end{corollary} \end{document} I want to understand how to define the sublemma tcbtheorem with an \alph counter so that the numbering reads Lemma 1.1.1a, Lemma 1.1.1b, ... Following Theorem/Lemma/... 1.1.1 and so on, resetting every time the original theorem counter increases. I've tried everything under the sun, but I couldn't make it work. I tried setting up a global counter for the theorems, but this kept on breaking with how tcolorbox overwrites the counter definition, etc. Does anyone know how to do it?
- Tasks environment: Page break in tasksby Martin on September 24, 2026 at 10:22 am
I use the tasks environment from the tasks package to make exercises and solutions. If the solutions are long, there is a lot of free space since it seems that individual \tasks do not allow page breaks inside of them. Instead. the \task will start on the next page. I could just use the enumerate environment for these solutions, but some solutions are rather short, so I use the task envornment for these, to have multiple tasks side by side, going from left to right and not from top to bottom first. To have my code consistent, I would like to have the longer solutions in the task environment also. Can \tasks somehow be set up such that they can span over multiple pages? MWE: \documentclass{scrartcl} \usepackage{tasks} \usepackage{lipsum} \begin{document} \begin{tasks} \task \lipsum[1-2] \task \lipsum[1-3] \end{tasks} \end{document}
- TeXworks compiles without errors but will not output PDFby br4m on September 23, 2026 at 9:47 pm
I've been working on a fairly long document which uses quite a few subfiles. It had been compiling fine, but today I added some figures into one of the subfiles. Since then, when I try to compile the document it is like TeXworks gets stuck. The console output shows chapter headings and page numbers as I would expect, and seems to get to the end of the document. Then it says "*", and nothing else happens. It doesn't show any errors. I have also realised that it does create a PDF file in the right folder, but when I try to open that it seems to get stuck on loading (there's a grey background and a full loading bar, but no pages). I'm using MikTeX and TeXworks, set to compile using pdfLaTeX. Since there's no error message it's hard to know what's causing this. Does anyone know what's happening?
- Modern Scientific illustrations: what can we "show off" now that wasn't possible 12 years ago?by DJP on September 23, 2026 at 1:05 am
There is a highly popular post from 2014 showcasing Nice scientific pictures show off but a lot has changed with LaTeX over the last 12 years. What is your best science picture to show off now that wasn't possible 12 years ago? Constraints for each answer: The Picture & Code: Show off a beautiful scientific illustration that utilizes features, packages, or engine capabilities (e.g., LuaLaTeX memory handling, modern pgfplots limits, Luametafun) that remove barriers which routinely stopped typical users from doing this 12 years ago (such as hard memory crashes, lack of default ecosystem support, or prohibitive manual workarounds). The Evolution: You must explicitly explain what technological progress or package developmentover the last decade made this picture possible today. AI usage is allowed, but must be acknowledged per community guidelines.
- roman numerals as enumeration in italics font styleby Rup_LA on September 20, 2026 at 2:59 pm
I'm writing a lemma with italics font style where I need enumeration in lowercase Roman numerals. I tried different ways and the best I could do is to use the package enumerate like this: \usepackage{enumerate} \begin{document} \begin{lemma} For any graph G, \begin{enumerate}[(i)] \item L(G) is symmetric. \item L(G) is positive semidefinite. \item etc. \end{enumerate} \end{lemma} \end{document} But the problem I'm facing is the tilts of parentheses are more than that I like. Actually I want like this: Any help would be appreciated.