Week
- Eliminating user-defined beamer notes in ltx-talkby EconGuy on October 9, 2026 at 12:29 pm
I use beamer for my slides and have added notes to them, using the \note command, plus I have defined my custom \mynote to change the appearance as needed. As I have to provide accessible slides, I intend to switch to ltx-talk and as it doe snot support notes want to 'silence' the \note and \mynote command. While this easily works with \note, with \mynotes the problem is that once the overlay specification <10-11> becomes too big, it prints the notes. How can I silence my own command so that the note does not show? MWE (for texlive2026 and Lualatex) \DocumentMetadata{tagging=on, tagging-setup={math/setup=mathml-SE}, pdfstandard=ua-2, lang=en-GB} \documentclass[mode = handout]{ltx-talk} %%%Definition of mynote in beamer %\newcommand<>{\mynote}[1]{\alt#2{\note[item]{[$\rightarrow$]\textcolor{red}{#1}\par}} % {\note[item]{[$\rightarrow$] #1\par}}} \newcommand{\note}[2][]{} %%%This 'empty' command does not work \long\def\mynote#1#2#3#4{}% \begin{document} \begin{frame} \begin{itemize}[<+->] \item Point 1 \item Point 2 \item Point 3 \item Point 4 \item Point 5 \item Point 6 \item Point 7 \item Point 8 \item Point 9 \item Point 10 \item Point 11 \end{itemize} \note[itemize]{\item Initial note 1 \item Initial note 2} \mynote<1>{Note 1} \mynote<2>{Note 2} \mynote<3>{Note 3} \mynote<4>{Note 4} \mynote<5>{Note 5} \mynote<6>{Note 6} \mynote<7>{Note 7} \mynote<8>{Note 8} \mynote<9>{Note 9} \mynote<10>{Note 10} \mynote<10-11>{Note 11} \end{frame} \end{document}
- How to create an otf math font?by wipet on October 9, 2026 at 6:39 am
We have a font with almost all math characters and all sizes of braces, fences etc. Ten years ago we worked with pfb format of this font and we divided it to many subfonts and we created TeX metrics for them manually. The project was not completed and stopped. Now, the project is opened again. We decide that the old method (with many fonts and TeX metric) is obsolete and we want to create an OTF math font. Does anyone have any experience with this? What needs to be done? Yes, math font needs to have math tables inside, but how the tables can be created, what tools should be used and where is a specification of this format and good examples?
- Is it possible to combine T1 and OTF/TTF fonts nicely?by Roel on October 8, 2026 at 11:03 pm
I am trying to combine these two packages in LuaLaTeX, but cannot work out how to get both font encodings to work together nicely. Currently, to my surprise, only the bold bits are shown using the font txtt: \documentclass{article} \usepackage{fourier-otf} \usepackage{newtxtt} \usepackage[T1,TU]{fontenc} \begin{document} This is the main body text in \textbf{Erewhon Roman}. {\ttfamily\fontencoding{T1}This is typewriter text in \textbf{texttt}} \texttt{\fontencoding{T1}This is typewriter text in \textbf{texttt}} \verb|This is typewriter text in texttt| \end{document} Is there a way to make this work, ideally defining in the preamble that Erewhon is TU-encoded and txtt is T1-encoded and not switching encodings manually inside the document?
- Trying to find a specific math font or packageby iZiqx on October 8, 2026 at 10:07 pm
I'm trying to recreate the style of a pdf document i really like but i just can't get the font / package right , i tried fourier and a lot of others but nothing matches.
- How to show that a sinusoidal function continues indefinitely to the left?by Marco Moldenhauer on October 8, 2026 at 4:18 pm
I plotted a sinusoidal function using the axis environment from the pgfplots package. My code \documentclass[margin=3mm]{standalone} \usepackage{pgfplots} \pgfplotsset{compat=1.18} \begin{document} \begin{tikzpicture} \begin{axis}[ width=50cm, height=0.80\textwidth, axis y line=middle, axis x line=middle, axis on top, % <-- Correct pgfplots key to draw ticks, grid, and lines over plots xmin=-15, xmax=5.8, ymin=-125, ymax=125, xtick={-14,-3*pi,-5*pi/2,-2*pi,-3*pi/2,-pi,-pi/2,0,1,pi/2,pi,3*pi/2,2*pi}, xticklabels={$-\inf$,$-3\cdot\pi$,$-\frac{5}{2}\cdot\pi$,$-2\cdot\pi$,$-\frac{3}{2}\cdot\pi$,$-\pi$,$-\frac{1}{2}\cdot\pi$,$0$,1,$\frac{1}{2}\cdot\pi$,$\pi$,$\frac{3}{2}\cdot\pi$,$2\cdot\pi$}, ytick={-112.5,-112.5/sqrt(2),0,112.5/sqrt(2),112.5}, yticklabels={-112.5,,0,,112.5}, legend cell align={left}, grid=both, grid style={line width=.1pt, draw=gray!10}, major grid style={line width=.2pt, draw=gray!20}, xlabel={$\alpha=\omega\cdot t$ in rad}, ylabel={$p(t)$ in Watt}, xlabel style={at={(ticklabel* cs:1)}, anchor=north west}, ylabel style={at={(ticklabel* cs:1)}, anchor=south west} ] % 1. Colored area between x = 0 and x = 1 \addplot[ domain=0:1, samples=100, fill=green!30, draw=none ] {-112.5*sin(deg(x))} \closedcycle; % 2. Colored area between x = -4*pi and x = 0 \addplot[ domain=-4*pi:0, samples=100, fill=red!30, draw=none ] {-112.5*sin(deg(x))} \closedcycle; % Main curve \addplot[ domain=-4*pi:2*pi, samples=200, smooth, blue, thick ] {-112.5*sin(deg(x))}; \end{axis} \end{tikzpicture} \end{document} My output What I would like to achieve I would like to visually indicate that the sinusoidal function continues to oscillate periodically indefinitely in the negative "x"-direction. I'm totally open to creative ideas or completely different approaches. Any suggestions are very welcome! đ
- chemfig cram bond not drawn nicelyby nepomuk99 on October 8, 2026 at 4:15 pm
After some research (amongst others in this tex stackexchange question or this question), I could not resolve my issue in any straightforward way: It appears as though bond join is not working properly, since the following MWE % !TeX Program = lualatex \documentclass[tikz]{standalone} \usepackage{fontspec} \usepackage{unicode-math} \setmainfont{STIX Two Text} \setmathfont{STIX Two Math} \usepackage{chemfig} \setchemfig{ atom sep=0.5cm, cram width=2.0pt,, cram dash sep=0.5pt, cram dash width=0.5pt, bond join=true, bond style={line width=0.75pt, cap=round}} \begin{document} \chemfig{*6(--(<[::120]>[::60])-=--)} \end{document} produces this where I would expect it to produce this (pdf edited using inkscape): How can I get chemfig to draw the joined cram bonds properly? Of course I could edit all my figures in inkscape after producing them, but that seems not very efficient and somewhat defeating the purpose of a chemistry package... EDIT: I am sure that compilation uses bond join=true, although the difference is only nicely visible if cap=butt is set, as in \setchemfig{ atom sep=0.5cm, cram width=2.0pt,, cram dash sep=0.5pt, cram dash width=0.5pt, bond join=false, bond style={line width=0.75pt, cap=butt}} which then produces this output:
- Split an ecvitemize of europasscv list across pagesby Sebastiano on October 8, 2026 at 3:53 pm
I have a curriculum vitae and I would like to handle the page breaks in an ecvitemize list properly. \begin{ecvitemize} \item \lipsum[2][3-5] \item \lipsum[2][3-5] \item \lipsum[3][3-5] \item \lipsum[4][3-5] \item \lipsum[5][3-5] \item (2015) \lipsum[6][3-5] \item (2020) \lipsum[7][3-5] \end{ecvitemize} I would like the list to use the available space at the bottom of the page as efficiently as possible, with some \item filling the remaining space and the rest continuing normally at the top of the next page. At the moment, I would simply like to avoid having empty lines or large unused spaces at the bottom of the page. I have tried a few packages and different solutions, but eventually gave up on my attempts yesterday evening. I was thinking of something simple, such as a command like \breakpage, breakable of tcolorbox, \newpage, but I cannot figure out the best way to achieve this. What is the simplest way to do this? Simple solutions are preferred. Here my MWE: \documentclass[italian,a4paper]{europasscv} \usepackage[italian]{babel} \usepackage{graphicx} \usepackage{tikz} \usetikzlibrary{decorations.markings} \usepackage[pdftex,outline]{contour} \contourlength{0.011em} \usepackage[most]{tcolorbox} \newtcolorbox{mybox}{ blankest, borderline west={1pt}{-10pt}{% postaction=decorate, decoration={% markings, mark=at position 0.5 with {\filldraw circle[radius=3pt];} }, } } \usepackage{lipsum} \begin{document} \begin{europasscv} \lipsum[1] \lipsum[2] \lipsum[3] \lipsum[4] \lipsum[5] \lipsum[6] \lipsum[7] \lipsum[8] \lipsum[9] \lipsum[10] \ecvsection{Istruzione e formazione} \ecvtitlelevel{2012 â 2026/2027}{Corsi di perfezionamento \emph{postâlauream}}{ISCED~7} \ecvitem{}{ \begin{mybox} \begin{ecvitemize} \item \lipsum[2][3-5] \item \lipsum[2][3-5] \item \lipsum[3][3-5] \item \lipsum[4][3-5] \item \lipsum[5][3-5] \item (2015) \lipsum[6][3-5] \item (2020) \lipsum[7][3-5] \end{ecvitemize} \end{mybox} } \end{europasscv} \end{document}
- How to change width of precis text in newly defined part title page?by Chris Walton on October 8, 2026 at 1:41 pm
I have modified the part title page in memoir to: Add a part precis using chapterprecishere Add a part toc using \startcontents[parts] and \printcontents[parts]{}{0}{} Added a fake title to the part toc using \addtocontents Given this new part title page: how do I change the width of the precis text? How do I link the width of the precis text to the width of the toc? Example text width = 0.5 * toc width; or text width = toc width - number space - page number space (pseudo code). Any solution to this part has to be simple enough for me to understand as I will need to be able to maintain it in the future. My minex and image of my results so far are: \documentclass[a4paper,11pt,twoside,openright]{memoir} \usepackage{titletoc} \usepackage{lipsum} \makeatletter \def\ece#1#2{\expandafter#1\csname#2\endcsname} \def\setproperty#1#2#3{\ece\protected@edef{#1@p#2}{#3}} \def\setpropertyglobal#1#2#3{\ece\protected@xdef{#1@p#2}{#3}} \def\getproperty#1#2{ \expandafter \ifx\csname#1@p#2\endcsname\relax \else \csname#1@p#2\endcsname \fi} \makeatother \makeatletter \def\@endpart{ \vfil \chapterprecishere{\getproperty{partlayout}{text}} \setcounter{tocdepth}{0} \startcontents[parts] \printcontents[parts]{}{0}{} \par\bigskip \vfil\newpage \if@twoside \if@openright \null \thispagestyle{empty}% \newpage \fi \fi \if@tempswa \twocolumn \fi} \makeatother \setsecnumdepth{part} \begin{document} \setproperty{partlayout}{text}{\lipsum[1]} \setproperty{partlayout}{toctitle}{\cftpartfont{This is the Real (tm) ToC title}} \addtocontents{toc}{\getproperty{partlayout}{toctitle}} \part{First Part} \chapter{First Chapter} Obsufcate Pontificate Procrastinate Many times \end{document}
- want citations appear differently depending on my textby Rup_LA on October 8, 2026 at 10:42 am
I want to cite some papers as well as their authors in the document in different places. We use \cite{label} to cite a paper which appears as [#] in the document depending on the number given to it in the bibliography. Here is a sample of my Tex document code: \documentclass[a4paper,12pt]{article} \usepackage[ colorlinks=true, linkcolor=blue, citecolor=blue, urlcolor=blue ]{hyperref} \begin{document} \section*{Introduction} General Theory of Relativity \cite{ein} tells that ...\\ This theory is developed by Physicist \cite{ein} \begin{thebibliography}{33} \bibitem{ein} Einstein A., General Theory of Relativity, 2000. \end{thebibliography} \end{document} This gives the following output: I want the second [1] to be appeared as Einstein A. while the first one remains the same. Is there any way to do this?
- How to make \autoref shows "Example" for new theorem "example"? [duplicate]by Rup_LA on October 8, 2026 at 9:43 am
I want to link my example in text. For linking a lemma/theorem, I use \autoref which shows Theorem # in the document. But for the example environment, it is not working. What should I do? \documentclass{article} \usepackage{amsmath,amssymb,amsthm} \usepackage{hyperref} \hypersetup{ colorlinks=true, filecolor=blue, urlcolor=blue, linkcolor=blue } \newtheorem{theorem}{Theorem} \theoremstyle{definition} \newtheorem{example}{Example} \begin{document} \begin{theorem} \label{thm} Theorem. \end{theorem} \begin{example} \label{eg} Some examples. \end{example} See \autoref{thm} and \autoref{eg} \end{document} The above code gives the following output: Basically I want Example 1, not just 1. Any suggestion?
- Avoid double spaces around macro with no output [duplicate]by Wrzlprmft on October 8, 2026 at 7:02 am
I want to define a macro that â depending on its argument and external parameters â sometimes produces an output and sometimes nothing. When it produces nothing and is surrounded by spaces, it shall not yield a double space. Ideally, it applies the same behaviour to everything treated like a space such as newlines. How can I achieve this? The macro is exclusively used in regular text. Here is a minimal example: \documentclass[margin=5pt]{standalone} \usepackage{etoolbox} \newcommand{\mymacro}[1]{\ifstrempty{#1}{}{a #1 space}} \begin{document} Here \mymacro{} is \mymacro{double}. \end{document} This produces: I want to get rid of the double space without touching the document, only the macro definition. I considered the package trimspaces, but that can at best trim spaces created within the macro. xspace only adds spaces; so itâs also not what I am looking for.
- Small gap between the overlapped Wick contract lines on the same variableby myhsia on October 8, 2026 at 2:41 am
As shown in the attached picture, there are gaps in the same variable with double Wick contracted lines: especially the $\hat A$: the gap is wider. I guess it's similar to something like "letters' baseline"... but quite different. MWE: \documentclass{article} \usepackage{simplewick} \begin{document} \[ \contraction [1.6ex]{}{\hat q_j}{\,\hat q_j\,} {\hat q_j} \contraction [2.4ex]{\hat q_j\,}{\hat q_j}{\,\hat q_j\,}{\hat A} \bcontraction[.8ex] {\hat q_j\,}{\hat q_j}{\,} {\hat q_j} \bcontraction[1.6ex]{}{\hat q_j}{\,\hat q_j\,\hat q_j\,}{\hat A} \contraction [.8ex] {}{\hat q_j}{\,} {\hat q_j} \contraction [.8ex] {\hat q_j\,\hat q_j\,}{\hat q_j}{\,}{\hat q_j} \hat q_j\, \hat q_j\, \hat q_j\, \hat A \] \end{document}
- scrletter: How to position enclosure next to closing?by lAtExFaN on October 7, 2026 at 9:57 pm
The German standard specification for business letters (specified in DIN5008) also allows to place the enclosures' hint next to the closing, see this demo screenshot: How can this change be implemented? This is the code (MWE) I used to produce the above shown default output: \documentclass{scrartcl} \usepackage{scrletter} \usepackage[ngerman]{babel} \setkomavar{fromname}{Peter Mustermann} \setkomavar{signature}{Peter} \renewcaptionname{ngerman}{\enclname}{Anlage} \setkomavar{enclseparator}[\sffamily{\bfseries\enclname}]{} \makeatletter %DIN5008 conforming enclosure option 1 (when enough vertical space left): \renewcommand*{\encl}[1]{% \par% \ifdim\parskip=\z@% \vskip\baselineskip% \fi% \noindent% \begingroup \parbox[t]{\textwidth}{% \Ifkomavarempty*{enclseparator}% {}% {% \strut\usekomavar*{enclseparator}\usekomavar{enclseparator}\\% }% \ignorespaces #1\strut}% \parfillskip\fill\par \endgroup } \makeatother \begin{document} \begin{letter}{% Petra Ochs\\ Vor dem Berg 1\\ 12345 Musterhausen% } \opening{Liebste Petra,} bla bla \ldots{} \closing{In Liebe} \encl{2 Poster\\5 Autogrammkarten} \end{letter} \end{document}
- How can I depict X-ray beams as wavefronts that interfere above the sample to form a standing wave?by user449589 on October 7, 2026 at 7:24 am
I'm not very skilled using TikZ but I wanted to use it for all the figures in my bachelors thesis. So far I created this TikZ-picture: \documentclass{article} \usepackage{tikz} \usetikzlibrary{patterns} \usetikzlibrary{patterns.meta} \usetikzlibrary{decorations.pathreplacing} \usetikzlibrary{decorations.pathmorphing} \usetikzlibrary{decorations.markings} \usetikzlibrary{snakes} \usetikzlibrary{arrows.meta} \usetikzlibrary{calc,patterns,angles,quotes} \usepackage[table]{xcolor} \definecolor{MinzgrĂŒn}{RGB}{0,140,79} \definecolor{Fenstergrau}{RGB}{128,128,128} \definecolor{Telegrau 4}{RGB}{230,230,230} \definecolor{Tomatenrot}{RGB}{140,28,0} \begin{document} \begin{tikzpicture} [x=0.35cm,y=0.2cm,line cap=round,line join=round] \draw[line width=1.5pt] (17.5,12.5) arc [start angle=0, end angle=180, x radius=2.5, y radius=1]; \draw [black, line width=1pt] (16,13) -- (21,14) node [align=center,right]{Detector\\window}; \draw[line width=1.5pt] (19,2) arc [start angle=0, end angle=180, x radius=4, y radius=1.5]; \draw[black,line width=1.5pt] (5,0.5) -- (25,0.5) -- (25,2) -- (5,2) -- cycle; \draw[black,line width=1.5pt] (10,25) -- (10,12.5) -- (20,12.5) -- (20,25); \draw[black,line width=1.5pt] (12.5,17.5) -- (17.5,17.5) -- (17.5,20) -- (12.5,20) -- cycle; \fill[black,pattern=crosshatch dots] (12.5,17.5) -- (17.5,17.5) -- (17.5,20) -- (12.5,20) -- cycle; \draw [black,line width=1pt] (12,20) -- (8.5,21) node[align=center,left] {Energy-dispersive\\detector}; \draw[Fenstergrau,line width=1pt,postaction={decorate,decoration={markings,mark=at position 0.15 with{\arrow{>}},mark=at position 1 with {\arrow{>}}}}] (-5,4) -- (10,2) -- (25,4); \draw[Fenstergrau,line width=1pt,postaction={decorate,decoration={markings,mark=at position 0.15 with{\arrow{>}},mark=at position 1 with {\arrow{>}}}}] (5,4) -- (20,2) -- (35,4); \node[align=center] at (0,6.5){Incident beam}; \node[align=center] at (30,6.5){Reflected beam}; \draw[black,line width=1pt] (12.5,1.25) -- (10,-2.5) node [below, align=center] {Sample carrier\\(\textit{reflector})}; \draw[black,line width=1pt] (16,2.5) -- (21,-2.5) node [below, align=center] {Sample}; \draw[MinzgrĂŒn,line width=1.25pt,->,decorate,decoration={snake,amplitude=0.1cm,segment length=0.4cm, post length=0.2cm}](15,2.5) -- (15,17); \draw [black, line width=1pt] (14,8) -- (9,12) node [align=center, left] {Fluorescence\\radiation}; \end{tikzpicture} \end{document} But I would like to include the X-ray beams as wave fronts which interfere above the sample to form a standing wave like in this image: Sadly this is beyond my TikZ-skills. Maybe somebody can help me or tell me where to look for answers. Thanks a lot!
- How can I get underlined text in a PDF from Markdown with Pandoc?by lindes on October 6, 2026 at 9:13 pm
The pandoc docs say: To underline text, use the underline class: [Underline]{.underline} And, slightly below that: This will work in all output formats that support underline. I know that LaTeX is capable of underlining text, but it doesn't work o just have the above in my markdown. A partial solution for me is to include LaTeX code directly in my markdown, e.g. with \underline{some text}... if I do that, it works fine; e.g. the following code: This text has some \underline{underlining} in it. Generates this in the PDF (which is what I'm aiming for): But... I know that at some point, I'm likely to want to do HTML exports as well, so the [text]{.underline} syntax is appealing to me. Is there some way to do this that works for both HTML and LaTeX/PDF exports? Note: I'm willing to add a Lua filter to do this, and may be able to figure that out, but I'm not super familiar with lua, or pandoc filters, so... I'm hoping that either there's some easier thing (like a variable I've failed to notice, that I could set in the YAML preamble or defaults file), or that someone knows exactly how one might write the filter to make that example from the docs do what I want it to do. Any tips or pointers would be welcome. And if I end up solving this myself, I'll post an answer to help others in the future. Edit: Given the following input, in file test.md: Will this get [underlined]{.underline}? That's the hope. ... pandoc -o test.tex test.md will generate (entire output): Will this get {underlined}? That's the hope. ... and pandoc -s -o test.tex test.md will generate: % Options for packages loaded elsewhere \PassOptionsToPackage{unicode}{hyperref} \PassOptionsToPackage{hyphens}{url} % \documentclass[ ]{article} \usepackage{lmodern} \usepackage{amssymb,amsmath} \usepackage{ifxetex,ifluatex} \ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage{textcomp} % provide euro and other symbols \else % if luatex or xetex \usepackage{unicode-math} \defaultfontfeatures{Scale=MatchLowercase} \defaultfontfeatures[\rmfamily]{Ligatures=TeX,Scale=1} \fi % Use upquote if available, for straight quotes in verbatim environments \IfFileExists{upquote.sty}{\usepackage{upquote}}{} \IfFileExists{microtype.sty}{% use microtype if available \usepackage[]{microtype} \UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts }{} \makeatletter \@ifundefined{KOMAClassName}{% if non-KOMA class \IfFileExists{parskip.sty}{% \usepackage{parskip} }{% else \setlength{\parindent}{0pt} \setlength{\parskip}{6pt plus 2pt minus 1pt}} }{% if KOMA class \KOMAoptions{parskip=half}} \makeatother \usepackage{xcolor} \IfFileExists{xurl.sty}{\usepackage{xurl}}{} % add URL line breaks if available \IfFileExists{bookmark.sty}{\usepackage{bookmark}}{\usepackage{hyperref}} \hypersetup{ hidelinks, pdfcreator={LaTeX via pandoc}} \urlstyle{same} % disable monospaced font for URLs \setlength{\emergencystretch}{3em} % prevent overfull lines \providecommand{\tightlist}{% \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}} \setcounter{secnumdepth}{-\maxdimen} % remove section numbering \author{} \date{} \begin{document} Will this get {underlined}? That's the hope. \end{document} So, seems like it's just wrapping the text in braces, without anything else?
- Different math font in inline vs displayed styles doesn't work with \setmainfont and \mathrm: is the mathrm=sym unicode-math option safe?by Denis Bitouzé on October 6, 2026 at 9:01 am
(This is a follow up of this Mico's answer to the quite old question Use different math font in inline-style and display-style formulas) For a LaTeX class I'm currently working on, based on a graphic designer work, I'm asked (but don't agree!) to use different fonts for the maths depending whether they are inline or displayed: Garamond Math for the inline ones, Concrete Math font for the displayed ones. The following MCE: \documentclass{article} \usepackage{unicode-math} \setmainfont{EBGaramond} % EBGaramond or anything else \setmathfont[version=Concrete]{Concrete-Math} \setmathfont[version=Garamond]{Garamond-Math} \mathversion{Garamond} \everymath{\mathversion{Garamond}} \everydisplay{\mathversion{Concrete}} \begin{document} \begin{enumerate} \item $2=\sqrt[4]{16}$ and \begin{equation} 2=\sqrt[4]{16} \end{equation} \item $1 \times 2$ and \begin{equation} 1 \times 2 \end{equation} \item $E=mc^2$, where $E$ stands for energy, and \begin{equation} E=mc^2 \end{equation} % \item $5=17 \pmod{12}$ and % \begin{equation*} % 5=17 \pmod{12} % \end{equation*} \end{enumerate} \end{document} (lualatex) compiles, not nicely (numerous warnings âLaTeX Font Warning: Command \mathversion invalid in math mode on input lineâŠâ), but compiles. But, as soon as its commented lines are uncommented, it doesn't compile any more, because of: ! LaTeX Error: Math alphabet identifier \mathrm is undefined in math version ` Garamond'. Note that it compiles again if \setmainfont{âŠ} is commented. As a workaround, one can just load unicode-math with at least the mathrm=sym option. But is it safe?
- How to display solutions of trigonometric equations in degrees in luacas?by minthao_2011 on October 6, 2026 at 8:36 am
I am trying to solve the equation $\sin(5x)=\frac{1}{2}$, where $x$ is measured in degrees, using the luacas package. I tried: \documentclass{article} \usepackage{fourier-otf} \usepackage{luacas} \usepackage{amsthm} \theoremstyle{definition} \newtheorem{ex}{Example} \begin{document} \begin{ex} $x$ in degree \begin{CAS} vars("x", "k") u = 5*x v = 30 eq1 = Equation(u, v + 360*k):autosimplify() r1 = eq1:solvefor(x) eq2 = Equation(u, 180 - v + 360*k):autosimplify() r2 = eq2:solvefor(x) \end{CAS} \[ \sin(5x) = \frac{1}{2} \Leftrightarrow \sin\left(\print{u}\right)=\sin\left(\print{v}^\circ\right) \Leftrightarrow \left[ \begin{aligned} \print{u} &= \print{v} + 360 k\\ \print{u} &= 180-\print{v}+ 360 k \end{aligned} \right. \Leftrightarrow \left[ \begin{aligned} &\print{r1}\\ &\print{r2} \end{aligned} \right. \] How can I make the solutions produced by luacas be written in the following form? \[ \sin(5x) = \frac{1}{2} \Leftrightarrow \sin\left(\print{u}\right)=\sin\left(\print{v}^\circ\right) \Leftrightarrow \left[ \begin{aligned} \print{u} &= \print{v}^\circ + 360^\circ k\\ \print{u} &= 180^\circ-\print{v}^\circ+ 360^\circ k \end{aligned} \right. \Leftrightarrow \left[ \begin{aligned} &x = 6^\circ + 72^\circ k\\ & x = 30^\circ + 72^\circ k \end{aligned} \right. \] \end{ex} \end{document}
- Minor issues with brace and alignment in tableby Svend TveskĂŠg on October 5, 2026 at 4:32 pm
The is a follow-up question to Fit side-by-side tables to page width. Explorer came up with a very nice solution to my problem of having two tables side-by-side. However, as can be seen below, when I compile the following code, I have a few minor issues: The smallest braces inside the table are a bit too large and the biggest braces are a bit too small. The Met is a bit too low compared to AUG. I can manually fix this by using \raisebox{0.3ex}{Met}. Code and output % lualatex test.tex \documentclass[ a4paper, 12pt ]{article} \usepackage{fontspec} \setmainfont[ NFSSFamily = tgp, Extension = .otf, UprightFont = *-Regular, BoldFont = *-Bold, ItalicFont = *-Italic, BoldItalicFont = *-BoldItalic, Ligatures = { TeX, CommonOff } ]{texgyrepagella} \usepackage[ math-style = TeX ]{unicode-math} \setmathfont{texgyrepagella-math.otf} \usepackage[ hmargin = 2.4cm, vmargin = 3cm ]{geometry} \usepackage{nicematrix} \usepackage{tabularray} \UseTblrLibrary{tikz} \usepackage{tikz} \usetikzlibrary{calc} \usepackage{hyperref} \newcommand{\skrstr}[1]{\fontsize{#1pt}{\fpeval{1.2*#1}pt}\selectfont} \newcommand{\navn}[1]{\textbf{#1}} \newcommand{\essentiel}[1]{\textcolor{red}{#1}} \newcommand{\PanelWidth}{65pt} \newcommand{\CellGap}{6pt} \newcommand{\CellPadding}{3pt} \newcommand{\ContentPadding}{2pt} \newlength{\CodonLineHeight} \setlength{\CodonLineHeight}{14pt} \newcommand{\GroupLabel}[2]{% \hspace{1pt}% \parbox[c][\dimexpr#1\CodonLineHeight\relax][c]{26pt}{% \raggedright\small\navn{#2}% }% } \newcommand{\ChartCell}[3][\dimexpr4\CodonLineHeight+16pt\relax]{% \parbox[c][\dimexpr#1+\CellGap\relax][c]{\dimexpr#2+\CellGap+\CellPadding*2+\ContentPadding*2\relax}{% \centering \parbox[c][#1][c]{\dimexpr#2+\ContentPadding*2\relax}{\centering#3}% }% } \newcommand{\CodonLines}[1]{% \begingroup \setlength{\tabcolsep}{0pt}% \begin{tabular}{@{}>{\rule[-0.3\CodonLineHeight]{0pt}{\CodonLineHeight}}c@{}}% #1 \end{tabular}% \endgroup } \newcommand{\BraceGroup}[2]{% \hbox{\parbox[c][\dimexpr#1\CodonLineHeight\relax][c]{10pt}{% \centering \raisebox{-2pt}[0pt][0pt]{% \(\nulldelimiterspace = 0pt \smash{\left.\vcenter{\hbox{% \rule{0pt}{\dimexpr#1\CodonLineHeight-3pt\relax}% }}\right\}}% \)% }% }\GroupLabel{#1}{#2}}% } \newcommand{\BraceBlank}[2]{% \hbox{% \parbox[c][\dimexpr#1\CodonLineHeight\relax][c]{10pt}{\mbox{}}% \GroupLabel{#1}{#2}% }% } \newcommand{\CodonPanel}[2]{% \ChartCell{\PanelWidth}{% \CodonLines{#1}\hspace{2pt}% \parbox[c][\dimexpr4\CodonLineHeight\relax][c]{37pt}{% \offinterlineskip#2% }% }% } \newcommand{\RowIndex}[1]{{% \renewcommand{\CellPadding}{0pt}% \ChartCell{18pt}{#1}% }} \newcommand{\ColumnIndex}[1]{\ChartCell[18pt]{\PanelWidth}{#1}} \newcommand{\ThirdIndex}[1]{\RowIndex{\CodonLines{#1}}} \begin{document} \begin{table} \small \centering \begin{tabular}{c@{\qquad}|@{\quad}c}% \scalebox{0.72}{\Large\bfseries 2.~base} & \scalebox{0.72}{\Large\bfseries Forkortelser}\\ \hspace*{10pt}%<-- add left bounding box \begingroup \setlength{\tabcolsep}{0pt} \setlength{\extrarowheight}{0pt} \scalebox{0.72}{\begin{NiceTabular}{@{}cccccc@{}}[corners, cell-space-limits = 0pt] \CodeBefore \TikzEveryCell{offset = \dimexpr\CellGap/2\relax, fill = teal!60} \begin{tikzpicture} \foreach \r/\rn in {2/3,3/4,4/5,5/6} \foreach \c/\cn in {2/3,3/4,4/5,5/6} \fill[yellow!35] ([xshift = \dimexpr\CellGap/2\relax, yshift = -\dimexpr\CellGap/2\relax]\r-|\c) rectangle ([xshift = -\dimexpr\CellGap/2\relax, yshift = \dimexpr\CellGap/2\relax]\rn-|\cn); \end{tikzpicture} \Body & \ColumnIndex{U} & \ColumnIndex{C} & \ColumnIndex{A} & \ColumnIndex{G} \\ \RowIndex{U} & \CodonPanel{UUU\\UUC\\UUA\\UUG}{\BraceGroup{2}{Phe}\BraceGroup{2}{Leu}} & \CodonPanel{UCU\\UCC\\UCA\\UCG}{\BraceGroup{4}{Ser}} & \CodonPanel{UAU\\UAC\\UAA\\UAG}{\BraceGroup{2}{Tyr}\BraceBlank{1}{\skrstr{9.3}\textcolor{red!70!black}{STOP}}\BraceBlank{1}{\skrstr{9.3}\textcolor{red!70!black}{STOP}}} & \CodonPanel{UGU\\UGC\\UGA\\UGG}{\BraceGroup{2}{Cys}\BraceBlank{1}{\skrstr{9.3}\textcolor{red!70!black}{STOP}}\BraceBlank{1}{Trp}} & \ThirdIndex{U\\C\\A\\G} \\ \RowIndex{C} & \CodonPanel{CUU\\CUC\\CUA\\CUG}{\BraceGroup{4}{Leu}} & \CodonPanel{CCU\\CCC\\CCA\\CCG}{\BraceGroup{4}{Pro}} & \CodonPanel{CAU\\CAC\\CAA\\CAG}{\BraceGroup{2}{His}\BraceGroup{2}{Gln}} & \CodonPanel{CGU\\CGC\\CGA\\CGG}{\BraceGroup{4}{Arg}} & \ThirdIndex{U\\C\\A\\G} \\ \RowIndex{A} & \CodonPanel{AUU\\AUC\\AUA\\AUG}{\BraceGroup{3}{Ile}\BraceBlank{1}{Met}} & \CodonPanel{ACU\\ACC\\ACA\\ACG}{\BraceGroup{4}{Thr}} & \CodonPanel{AAU\\AAC\\AAA\\AAG}{\BraceGroup{2}{Asn}\BraceGroup{2}{Lys}} & \CodonPanel{AGU\\AGC\\AGA\\AGG}{\BraceGroup{2}{Ser}\BraceGroup{2}{Arg}} & \ThirdIndex{U\\C\\A\\G} \\ \RowIndex{G} & \CodonPanel{GUU\\GUC\\GUA\\GUG}{\BraceGroup{4}{Val}} & \CodonPanel{GCU\\GCC\\GCA\\GCG}{\BraceGroup{4}{Ala}} & \CodonPanel{GAU\\GAC\\GAA\\GAG}{\BraceGroup{2}{Asp}\BraceGroup{2}{Glu}} & \CodonPanel{GGU\\GGC\\GGA\\GGG}{\BraceGroup{4}{Gly}} & \ThirdIndex{U\\C\\A\\G} \\ \CodeAfter \TikzEveryCell{offset = \dimexpr\CellGap/2\relax, draw} \begin{tikzpicture} % \node[font = \Large\bfseries, anchor = south] % at ([yshift = +8pt]$(1-|2)!0.5!(1-|6)$) {2.~base}; \node[font = \Large\bfseries, rotate = 90, anchor = south] at ([xshift = -2pt]$(2-|1)!0.5!(6-|1)$) {1.~base}; \node[font = \Large\bfseries, rotate = -90, anchor = south] at ([xshift=+2pt]$(2-|7)!0.5!(6-|7)$) {3.~base}; \end{tikzpicture} \end{NiceTabular}} \endgroup% \hspace*{10pt}%<-- add right bounding box &% {\def\mlr{2} \scriptsize \begin{tabular}{ l @{\;=\;} l } \multicolumn{2}{c}{} \\ \navn{Ala} & Alanin~(\navn{A}) \\[\mlr pt] \navn{Arg} & Arginin~(\navn{R}) \\[\mlr pt] \navn{Asn} & Asparagin~(\navn{N}) \\[\mlr pt] \navn{Asp} & Aspartat~(\navn{D}) \\[\mlr pt] \navn{Cys} & Cystein~(\navn{C}) \\[\mlr pt] \navn{Gln} & Glutamin~(\navn{Q}) \\[\mlr pt] \navn{Glu} & Glutamat~(\navn{E}) \\[\mlr pt] \navn{Gly} & Glycin~(\navn{G}) \\[\mlr pt] \navn{His} & \essentiel{Histidin}~(\navn{H}) \\[\mlr pt] \navn{Ile} & \essentiel{Isoleucin}~(\navn{I}) \\[\mlr pt] \navn{Leu} & \essentiel{Leucin}~(\navn{L}) \\[\mlr pt] \navn{Lys} & \essentiel{Lysin}~(\navn{K}) \\[\mlr pt] \navn{Met} & \essentiel{Methionin}~(\navn{M}) \\[\mlr pt] \navn{Phe} & \essentiel{Phenylalanin}~(\navn{F})\\[\mlr pt] \navn{Pro} & Prolin~(\navn{P}) \\[\mlr pt] \navn{Ser} & Serin~(\navn{S}) \\[\mlr pt] \navn{Thr} & \essentiel{Threonin}~(\navn{T}) \\[\mlr pt] \navn{Trp} & \essentiel{Tryptofan}~(\navn{W}) \\[\mlr pt] \navn{Tyr} & Tyrosin~(\navn{Y}) \\[\mlr pt] \navn{Val} & \essentiel{Valin}~(\navn{V}) \\ \end{tabular}} \end{tabular} \end{table} \end{document} Questions How can the braces be adjusted automatically? (I don't see this issue in Explorer's answer which confuses me a bit.) How can the alignment be done automatically? (I do see this issue in Explorer's answer.)
- Using \multicolumn inside alignby schtandard on October 5, 2026 at 3:43 pm
I have a block of equations that I want to align (and number) with a final equation that should just be centered. Since align is essentially a table, my first attempt to realize this was to just use \multicolumn, but this shifts the equation number into the margin. \documentclass{article} \usepackage{array} \usepackage{amsmath} \begin{document} \begin{align} a_1 &= b_1 & a_2 &= b_2 \\ c_1 &= -d_1 & c_2 &= -d_2 \\ \multicolumn{4}{c}{$e = f$} \end{align} \end{document} How can I achieve the same alignment effect without shifting the equation number?
- Compilation error if listing contains either | or $by Marek Stepanek on October 5, 2026 at 9:18 am
How to print out a Makefile into \usepackage{listings} Here a mwe which I cut were the compiling stops. (l. 43) Choosing CMake as language does not help. \documentclass{scrreprt} \usepackage{listings} \lstset{escapeinside=||} % this is trying to read in the code from an external file \newcommand{\snip}[2][]{% \IfFileExists{snips/snips/#2} {\lstinputlisting[style=texcode, #1]{snips/snips/#2}} {\lstinputlisting[style=texcode, #1]{snips/#2}}% } \begin{document} \begin{lstlisting}[language=make, title=Makefile Original, mathescape] # NOTE: every recipe line below must start with a real TAB, not spaces. # --- what to build (values only; comments go above, never on the same line) -- MAIN ?= foo_headers SRCDIR ?= foo_dialogs BUILDDIR ?= _build # Sanitised copies of everything above. The recipes use only these, so a stray # space from the environment -- or a command line like `make BUILDDIR='_build '` # -- can never reach a filename. MAINBASE := $(strip $(MAIN)) CHAPDIR := $(strip $(SRCDIR)) OUTDIR := $(strip $(BUILDDIR)) # Tools. VIEWER is overridable and its call is prefixed with '-' in the # recipe, so a machine without Preview (Linux, CI) still gets a clean build: # `make VIEWER=true` or `make VIEWER=:`. LATEXMK ?= latexmk LATEXMKFLG ?= -lualatex -bibtex VIEWER ?= open -a Preview # Which chapter gets compiled? # default : whatever the master pulls in at the moment (auto-detected from # the first \input{...} or \include{...} naming the chapter dir) # override: make compile CH=chapters/networking_new02_day60-64.tex # Both mechanisms only *name* the job; the master decides the content -- see # the note at the bottom of this file. CH ?= $(shell sed -nE 's@.*\\(input|include)[{]([^}]*$(CHAPDIR)/[^}]*)[}].*@\2@p' $(MAINBASE).tex 2>/dev/null | head -n 1) \end{listings}
- The water level and the principle of communicating vesselsby Sebastiano on October 4, 2026 at 7:49 pm
I would like to create a water level, i.e. a transparent flexible tube filled with water, so that the principle of communicating vessels is clearly illustrated. How can I represent the flexible tube, keeping it along the horizontal surface and making it run up the two vertical sides, so that the configuration is similar to the one shown in the image? Here my 1st MWE: \documentclass{article} \usepackage{tikz} \usepackage{tikzphysics} \begin{document} \begin{tikzpicture}[ line cap=round, line join=round ] \node[ ground, ground width=8.6cm, ground depth=3mm ] (G) at (0,0) {}; \node[ ground, ground width=3.2cm, ground depth=3mm, rotate=90 ] (GL) at (-3.5,1.6) {}; \node[ ground, ground width=3.2cm, ground depth=3mm, rotate=90 ] (GR) at (3.5,1.6) {}; \draw[dashed, thick] (-3.9,2.8) -- (4.2,2.8); \draw[thin] (-3.9,0) -- (-3.7,0); \node[left] at (-3.7,3.1) {\small 100.0}; \draw[thin] (-3.2,0) -- (-3.2,3.1); \draw[thin] (3.8,0) -- (3.8,3.1); \draw[thin] (3.7,0) -- (3.9,0); \node[right] at (3.9,3.1) {\small 100.0}; \draw[thin] (-4.3,0) -- (-3.8,0); \node[left] at (-4.3,0.08) {\small 0.00}; \end{tikzpicture} \end{document} Now with Mathcha I have created the flexible tube, \documentclass{article} \usepackage[margin=0.5in]{geometry} \usepackage{tikz} \usepackage{tikzphysics} \definecolor{water}{RGB}{73,194,221} \pagestyle{empty} \begin{document} \centering \begin{tikzpicture}[x=1cm,y=1cm] \node[ ground, ground width=8.6cm, ground depth=3mm ] (G) at (0,0) {}; \node[ ground, ground width=3.2cm, ground depth=3mm, rotate=90 ] (GL) at (-3.5,1.6) {}; \node[ ground, ground width=3.2cm, ground depth=3mm, rotate=90 ] (GR) at (3.5,1.6) {}; \draw[dashed, thick] (-3.9,2.5) -- (4.2,2.5); \draw[thin] (-3.9,0) -- (-3.7,0); \node[left] at (-3.7,3.1) {\small 100.0}; \draw[thin] (-3.2,0) -- (-3.2,3.1); \draw[thin] (3.8,0) -- (3.8,3.1); \draw[thin] (3.7,0) -- (3.9,0); \node[right] at (3.9,3.1) {\small 100.0}; \draw[thin] (-4.3,0) -- (-3.8,0); \node[left] at (-4.3,0.08) {\small 0.00}; \begin{scope}[shift={(-6cm,-.9cm)}] \draw[gray!70,line width=7pt] (3.48,4.32) .. controls (3.48,3.98) and (3.71,3.58) .. (3.72,3.21) .. controls (3.73,2.85) and (3.50,2.35) .. (3.84,1.74) .. controls (4.10,1.23) and (4.46,1.03) .. (4.97,1.03) .. controls (6.20,1.03) and (7.68,0.99) .. (8.36,1.59) .. controls (8.96,2.09) and (8.90,3.16) .. (8.90,4.23); \draw[gray!20,line width=4.5pt] (3.48,4.32) .. controls (3.48,3.98) and (3.71,3.58) .. (3.72,3.21) .. controls (3.73,2.85) and (3.50,2.35) .. (3.84,1.74) .. controls (4.10,1.23) and (4.46,1.03) .. (4.97,1.03) .. controls (6.20,1.03) and (7.68,0.99) .. (8.36,1.59) .. controls (8.96,2.09) and (8.90,3.16) .. (8.90,4.23); \draw[water,line width=4.5pt] (3.69,3.42) .. controls (3.81,3.02) and (3.49,2.39) .. (3.84,1.74) .. controls (4.10,1.23) and (4.46,1.03) .. (4.97,1.03) .. controls (6.20,1.03) and (7.68,0.99) .. (8.36,1.59) .. controls (8.82,1.98) and (8.92,2.72) .. (8.90,3.42); \end{scope} \end{tikzpicture} \end{document} but the tube is not filled correctly.
- Defining a point on a plane using Asymptoteby Fabrice on October 4, 2026 at 12:19 pm
The idea is to reproduce the figure using the Asymptote software for the first time. The code could likely be improved, given that I determined the points on the plane using the Cartesian equation 25x + 14y - 35 = 0. Is there a better way to define the points on the plane ? import three; import math; size(8cm); defaultpen(fontsize(9pt)); currentprojection=orthographic ( camera=(8,5,4), up=(0,0,1), target=(2,2,2), zoom=1 ); pen style1 = linetype("4 4"); real h = 1; triple A = (1.4*h,0,0), B = (1.4*h,2.5*h,0), C = (0,2.5*h,0), D = (0,0,0), Ep = (1.4*h,0,1.3*h), F = (1.4*h,2.5*h,1.3*h), G = (0,2.5*h,1.3*h), H = (0,0,1.3*h); path3 p = A--C--G--Ep--cycle; draw(surface(p),lightgray+opacity(0.5)); draw(A--B--F--Ep--cycle^^B--F--G--C--cycle^^G--H--Ep); draw(A--D--C^^D--H,dashed); triple I = (0.728,1.2,0.55); triple J = (1.232,0.3,0.3); triple K = (1.036,0.65,0.75); triple S = interp(J,I,1.3); triple Np = interp(J,K,1.3); triple M = shift(Np-J)*S; dot(I);dot(J);dot(K);dot(S);dot(Np);dot(M); draw(interp(J,I,-0.1)--interp(J,I,1.6),style1); draw(interp(J,K,-0.2)--interp(J,K,1.6),style1); draw(S--M,style1); draw(Np--M,style1); draw(J--M,style1); draw(A--C,style1); draw(Ep--G); label("$A$",J, align=NW); label("$B$",I, align=SE); label("$C$",K, align=NW); label("$S$",S, align=SE); label("$N$",Np, align=NW); label("$M$",M, align=SE);
- Linguistic examples in gb4e: formatting the preamble (NOT the gloss lines)by Robert on October 4, 2026 at 9:50 am
I'm writing a book with a lot of linguistic examples and had to switch from expex to gb4e due to publisher requirements. Most of my examples have three lines, an orthographic representation that is not aligned with the others and two more for interlinear glosses (morphemes and labels). For example: \ea HuĆkhi cektake pho. \\ \gll hun -khiÊ cekt -a -k -e pho \\ MED -MOD say -PST -IPFV -IND.PST[.3sg.S] REP \\ \glt âI heard he was saying that.â \z I know how to format the two interlinear lines using \leteachwordone and \leteachwordtwo. However, my question is about the first line (in the example, HuĆkhi cektake pho.). In expex this would have been called the preamble and I could have modified it using everyglpreamble=\itshape (italicizing this line is my ultimate goal). What is this line called in gb4e and how can I modify it centrally? There is no \leteachwordzero, so I'm at a loss. Edit: My question has been answered, I'm just adding a minimal working example below as requested, maybe others can use it this way, too. I also get the problem with the italicized subexamples when I use the original gb4e but I'm using the modified package langsci-gb4e and there it doesn't occur. I'm combining Marijn's suggestion (\AddToHook) with the etoolbox package to overrun some class defaults for formatting examples. Also note I'm using XeLaTeX. \documentclass{langscibook} \usepackage{etoolbox} % modify commands such that additional code is run each time they are called \usepackage{langsci-gb4e} \AddToHook{cmd/ex/after}{\itshape} % line 1 (= orthographic representation) in italics \AddToHook{cmd/gll/before}{\normalfont} % back to normal font after that (otherwise all following lines are in italics) \pretocmd{\gll}{\def\eachwordone{\normalfont}}{}{} % line 2 (= segments) in normal font \pretocmd{\gll}{\def\eachwordtwo{\small}}{}{} % line 3 (= glosses) in smaller font \pretocmd{\glll}{\def\eachwordtwo{\small}\def\eachwordthree{\small}}{}{} % same in occasional examples with additional gloss line 4 \begin{document} \begin{exe} \ex Sattekha gone, o baba! Lu, abo tupla basaiÊko ubheÄ©be. \\ \gll satte =kha gonei o baba la abo tupla ba -sa -iÊ =go u- bheÄ© -beÊ \\ truth =NMLZâ ATTN oh lord okay now {banana\textunderscore leaf} PROX -OBL -LOCâ =NMLZâ 3SG.POSS- {place\textunderscore below} -LOCâ \\ \glt âIt is the truth indeed, oh Father! Okay, now [put] the banana leaf below this thing here.â \end{exe} \begin{exe} \ex \begin{xlist} \ex HuĆgo haniwahum koptubidaÊ. \\ \gll hun =go hani- wahum kopt -u -pid -a \\ MED NMLZâ 2PL.POSS- calabash {pick\textunderscore up\textunderscore for} -3[sg].P -BEN -IMP[.2SG.A] \\ \glt âPick up that calabash of yours for him.â \ex Achetta pati garikana, soloÄ©wa khukmari garikana... \\ \gll acheta pati gar -ikana soloÄ©wa khukmari gar -ikana \\ {consecrated\ rice} leaf do -CVB calabash trident do -CVB \\ \glt âHaving [here before me] consecrated rice, having calabashes and a trident...â \end{xlist} \end{exe} \end{document}
- Apparent conflict between \xelatex and \Longrightarrowby Leo on October 4, 2026 at 8:34 am
The command \Longrightarrow gives a broken arrow if I compile using xelatex and a regular (long) arrow if I compile using pdflatex. Here is MWE: \documentclass[11pt,b5paper]{book} \usepackage{amsmath, mathrsfs} %\usepackage[T1]{fontenc} % %\usepackage{fontspec} % %\setmainfont{Tinos} % \usepackage{polyglossia} % \setdefaultlanguage{french} % \setotherlanguages{hebrew, greek} % \newfontfamily\hebrewfont[Script=Hebrew]{Tinos} % \newfontfamily\greekfont[Script=Greek]{Linux Libertine O} % \newfontfamily\greekfontsf[Script=Greek]{Linux Libertine O} \begin{document} $$ A \Longrightarrow B$$ \end{document} This works correctly as it is (with pdflatex). If one includes the commented out (%) code (and compiles with xelatex), the arrow is broken. Is it a known conflict of packages?
- How to add \tags to multi-line equations in Lyx?by Penelope on October 3, 2026 at 11:46 pm
I am trying to add text using \tag in a multi-line equation in Lyx. Here is how I do it in mathjax for the web. \begin{align} a \alpha \beta + b \beta^2 N^2 & = \beta \\ \\ b (\beta^2 N^2 - \alpha^2) & = \beta  \tag{using (ii)} \\ \\ \beta ( \alpha^2 - \beta^2 N^2) & = \beta \tag{using (iv)}\\ \\ \alpha^2 - \beta^2 N^2 & = 1 \end{align} And the result seems to work: But I can't find any way to do this in the Lyx gui. Perhaps I shouldn't be trying to add tag, and there is a more canonical way to do it? Ultimately I want to express short explainers with each line of a multi-line equation.
- \autoref does not work for my exercise environment. What should I use?by Sourav on October 3, 2026 at 9:51 pm
I want to link my exercise later in the document such that the text "Exercise #" is (colored and) hyperlinked. For doing the same with the theorem environment, \autoref can be used, but it doesn't work with my exercise environment. How can I make it work ? Here is what I tried : \documentclass{article} \usepackage{amsmath,amsfonts,amssymb,amsthm} \usepackage{hyperref} \hypersetup{ colorlinks=true, filecolor=red, urlcolor=red, linkcolor=red } \newtheorem{theorem}{Theorem} \theoremstyle{definition} \newtheorem{exercise}{Exercise} \begin{document} \begin{theorem} \label{th} A theorem. \end{theorem} \begin{exercise} \label{ex} Some exercise. \end{exercise} See \ref{th} and \ref{ex}. \\ See \autoref{th} and \autoref{ex} \end{document} Output : In particular, I want the second 1 in the second line to be written as Exercise 1, instead of just the number 1.
- Want an environment titled "Solution of Exercise #"by Sourav on October 3, 2026 at 10:26 am
I am in need of an environment of the following name : Solution of Exercise #, where # is the required exercise number. I know that I can do this in case of a proof : \documentclass{article} \usepackage{amsmath,amsfonts,amssymb,amsthm} \usepackage{hyperref} \hypersetup{ colorlinks=true, filecolor=red, urlcolor=red, linkcolor=red } \newtheorem{theorem}{Theorem} \theoremstyle{definition} \newtheorem{exercise}{Exercise} \theoremstyle{remark} \newtheorem*{solution}{Solution} \begin{document} \begin{theorem} \label{th} Theorem. \end{theorem} Some content in between. \begin{proof}[Proof of \ref{th}] Proof. \end{proof} \end{document} The above gives the following output : How can I do the same for a solution ?
- How to test that my package option is not set?by gildux on October 2, 2026 at 5:56 pm
I'm writing a package (that will be called mytest in the MWE) but I'm having a little trouble with the use of one option (the only case presented in the MWE). Well, I have this mytest.sty file: \NeedsTeXFormat{LaTeX2e}[2022/06/02] \ProvidesPackage{mytest}[2026/09/09 v0.0.0 my test] \DeclareKeys[mytest]{% foo.store = \@mytest@foo, foo.usage = load, } \ProcessKeyOptions[mytest] \NewDocumentCommand\myexample{o m }{% foo?, baz \IfNoValueTF{#1}{% use default, set by \IfBlankTF{\@mytest@foo}{nope% package. }{\@mytest@foo% user. } }{#1% use provided⊠}\space% \emph{#2}% } \endinput Then I use this mytest.tex file: \documentclass{article} \usepackage{mytest} \begin{document} \myexample{yeah}. \end{document} I'd expect the result to be of nope \emph{yeah}. but that's not the case. What am I doing wrong? Note that replacing the \IfBlankTF with \IfNoValueTF gives the same result, so after keys processing \@mytest@foo is neither blank nor null/unset. I'm lost.
- tex4ebook + offline math SVGs that resize with text sizeby ana on October 2, 2026 at 5:46 pm
I want to generate epub3 files from .tex files where the mathematics is rendered as offline SVGs, no javascript, and the SVGs automatically resize with the font-size on the ereader. Possible? How? Ereaders now render MathML. Yay. But badly. Boo. SVGs are still visually better. The answers here do not work. They are also a decade old. After many iterations, I figure the SVG must be rendered such that it is scalable and the CSS must make the SVGs scale. So test.tex: \documentclass{article} \begin{document} This is inline: \(\alpha\). This is display: \begin{equation} f(x) = 1 + x \alpha \end{equation} \end{document} math.cfg: \Preamble{xhtml} \Css{img[src$=".svg"] { display: inline-block; max-width: 100%; width: auto; height: auto; }} \begin{document} \EndPreamble build.lua: Make:image("svg$", "dvisvgm --bbox=min --exact-bbox --no-fonts -p ${page} -o ${output} ${source}" ) and command: tex4ebook \ -f epub3 \ -c math.cfg \ -e build.lua \ test.tex \ "svg,pic-m,pic-equation" While this generates the math as SVG, it does not scale with the text. So I'm stumped.
- List and "complicated" table side-by-sideby Svend TveskĂŠg on October 2, 2026 at 3:17 pm
Introduction I'v been pondering about how to get started with the following table and list side-by-side. Unfortunately, I haven't come up with any useful ideas, so once again I present a "please do (some of) it for me" question. Sorry! đ Question I would like to reproduce the following table and list side-by-side: A few 'corrections': Table: I don't want the light color in the middle of each cell; plain yellow is preferred. List: I would like to left-align both the abbreviations, the equal signs, and the names. Important I hope that I can do the rest of it myself, as long as someone helps me getting started by setting up the "First letter", "Second letter", and "Third letter" labels around the table, the turquoise boxes on the edges of the table, the contents of the top-left yellow cell in the table, the first two rows aligned in the list. Again, I'm sorry for this type of question but I don't know where to start.