• NEW VER‌ION OF MACTEX HAVE PROBLEM WITH BEAMER
    by Tony Stark on February 5, 2025 at 2:29 am

    \documentclass[12pt]{beamer} % Document class declaration in the preamble \usepackage[utf8]{vietnam} % Package inclusion in the preamble %\usepackage[T1]{fontenc} % Commented out, but if needed, keep in preamble \usepackage{lmodern} % Package inclusion in the preamble \usetheme{Madrid} % Theme selection in the preamble \begin{document} % Start of the document body \author{Võ Xuân Cường Thịnh} \title{Bài 5: TÍNH CHẤT HOÁ HỌC CỦA BASE} %\subtitle{} %\logo{} %\institute{} %\date{} %\subject{} %\setbeamercovered{transparent} %\setbeamertemplate{navigation symbols}{} \begin{frame}[plain] \maketitle \end{frame} \begin{frame} \frametitle{} % You should add a title here \end{frame} \end{document} % End of the document I have ju‌st updat‌ed Mactex and when I compile a new beamer file I have this problem Please sh‌ow me the s‌lution

  • Smart enumerated notes enviroment
    by Ak2399 on February 5, 2025 at 1:49 am

    I'm looking for creating an environment called notes where it acts like the enumerate environment but it also detects how many \items have been used to create different outputs, the desired behaviour is like this: \begin{notes} \item something \end{notes} \begin{notes} \item something 1 \item something 2 \end{notes} \begin{notes} As a bonus, this wouldn't be rendered. or alternatively it would be rendered as is. \end{notes} Would output With some help with ChatGPT, I have came up with this semi-solution: \documentclass{article} \usepackage{environ} \makeatletter % We define a new environment "notes" that collects its entire body in \BODY \NewEnviron{notes}{% % Define a scratch counter to count the items \newcount\notesItemCounter \notesItemCounter=0 %--- First pass: we "execute" the body in a group with \item redefined %--- so that each \item increments our scratch counter. \begingroup \def\item{\global\advance\notesItemCounter by 1\relax}% \BODY \endgroup %--- Now act according to the number of items found \ifnum\notesItemCounter>0 \ifnum\notesItemCounter=1 % Exactly one \item => print "Note: ..." and show the text \noindent \textbf{Note:} \begingroup \def\item{}% remove \item so it does not print any bullet/number \BODY \endgroup \else % Two or more items => print "Notes:" and enumerate \noindent \textbf{Notes:} \begin{enumerate} \BODY \end{enumerate} \fi \fi } \makeatother \begin{document} %----------------------------- % Zero items: prints nothing \begin{notes} This text is not in an \item, so we expect nothing to appear. \end{notes} %----------------------------- % One item: prints "Note: something" \begin{notes} \item something \end{notes} %----------------------------- % Two or more items: enumerates them \begin{notes} \item first note \item second note \end{notes} \end{document} But it prints the Body twice:

  • Cannot get bold parentheses with unicode-math
    by HerpDerpington on February 4, 2025 at 10:16 pm

    I am trying to properly get bold parentheses with unicode-math. I tried this: \documentclass{article} \usepackage{unicode-math} % You may remove this to see that % this does not cause the issue. \usepackage{bm} \setmathfont[% BoldFont=NewCMMath-Bold.otf% ]{NewCMMath-Regular.otf} \begin{document} \[ ( \symbf{(} \] \[ \symbfup{(} \symbfit{(} \] \[ \mathbf{(} \] \[ \text{\boldmath$($} \] % hacky \[ \boldsymbol{(} \bm{(} \] \end{document} The result is: So it seems only the three "bad" solutions work. As far as I known, \boldsymbol and \bm should not be used and switching into text mode and back is hacky.

  • Why `\allowbreak` not working
    by Eugene Zhang on February 4, 2025 at 10:15 pm

    I have met with a problem with the justification of a paragraph using \allowbreak in LaTeX. The MWE LaTeX code is as below: \documentclass[11pt,twoside]{article}% \usepackage{amssymb} \usepackage{amsmath} \usepackage{amsfonts} \usepackage{geometry} \newtheorem{theorem}{Theorem}[section] \begin{document} \begin{proof} Then $(\psi_n(x_1,\cdots,x_n))$ is a $n-$type of $\mathfrak{P}\,$ for $\,\mathfrak{P}\vDash\psi_n[\mathcal{P}^{1}(\varnothing),\cdots,\mathcal{P}^{n}(\varnothing)]$. Clearly $\{\allowbreak\eta_1(x_1),\cdots, \eta_n(x_1),\cdots,\psi_2(x_1,x_2),\cdots, \psi_n(x_1,x_2,\cdots,x_n)\cdots\}$ generates a maximum consistent set of formulas involving $\varnothing$ that is the only complete type of $\mathfrak{P}$. \end{proof} \end{document} The problem happens at\eta_n(x_1),... for it does not break there. I am totally lost because there is no \left bracket at all. Thanks.

  • Put text on each mounted pdf's last page
    by mf67 on February 4, 2025 at 8:55 pm

    Is it possible to put a foot (end) note on each mounted pdf's last page? I could do it by \includepdf[pages=1-3]{file1.pdf} \includepdf[pages=4,pagecommand={//some text//}]{file1.pdf} \includepdf[pages=1-2]{file2.pdf} \includepdf[pages=3,pagecommand={//some other text//}]{file2.pdf} but it would require to know which page is the very last for each pdf.

  • Get rid of additional spacing due to \color in newtcolorbox
    by Crob on February 4, 2025 at 8:39 pm

    \usepackage{tcolorbox} \newtcolorbox{tbox}[1][]{ #1, before upper={ \everydisplay{\color{red}} } } \begin{document} \begin{tcolorbox} \[a^2+n^2=c^2\] \end{tcolorbox} \begin{tbox} \[a^2+n^2=c^2\] \end{tbox} \end{document} I just want to change the color of math mode in my custom tcolorbox, but using \everydisplay{} adds a space at the bottom of the box and I don't understand why. How can I get rid of that and just get the default spacing of tcolorbox ? EDIT: Similar issue in Strange vertical spacing after colored equation However, the two solutions don't work here. I don't know how to use \begingroup...\endgroup because I would have to begin in before upper and end in after upper which doesn't seem to work. The 2nd solution is to use \mathcolor but how can I use it in \newtcolorbox? Also, I don't use lualatex

  • Unexpected roundoff with fpeval length comparison
    by rallg on February 4, 2025 at 8:01 pm

    This MWE shows it all. Same with pdflatex or lualatex: \documentclass{article} \newlength\mytemplength \setlength\mytemplength{8.5in} \newlength\myotherlength \setlength\myotherlength{8.5in} \edef\myresulta{\fpeval{\mytemplength<8.499in}} % expect 0, meaning false \edef\myresultb{\fpeval{\mytemplength<8.5in}} % expect 0, meaning false \edef\myresultc{\fpeval{\mytemplength<8.5001in}} % expect 1, meaning true \edef\myresultd{\fpeval{\mytemplength<\mytemplength}} % expect 0, meaning false \edef\myresulte{\fpeval{\mytemplength<\myotherlength}} % expect 0, meaning false \typeout{MYRESULTA=\myresulta} % provides 0, as expected \typeout{MYRESULTB=\myresultb} % provides 1, NOT expected \typeout{MYRESULTC=\myresultc} % provides 1, as expected \typeout{MYRESULTD=\myresultd} % provides 0, as expected \typeout{MYRESULTE=\myresulte} % provides 0, as expected \begin{document} foo \end{document} I realize that the length is not stored as inches. Nevertheless, I expect that when I retrieve the stored length, and compare it to 8.5in, the conversion of 8.5in should use the same algorithm as was used when a length is stored. But it seems that this is not the case. Thus, a roundoff error occurs. I can handle this by creating additional lengths, so that I compare stored values to stored values. I can handle this by comparing a stored length to a tweaked value. But I am mystified as to why the stored length is not equal to its unstored value.

  • IPE editor: Is there a way to draw a curve with an arrow in the middle?
    by Hao S on February 4, 2025 at 7:12 pm

    If I draw a 3 pointed curve and select the mid point arrow option, the arrow does not appear in the middle. Is there a way to make the arrow appear in the middle? I've searched the documentation and it seems this feature is not currently implemented. Is there a workaround for this? Having the arrow at the end makes it almost impossible to draw a directed graph as the arrow at the endpoint just disappears behind the node. Edge bd is directed but the arrow is behind the node.

  • Why is \symsfup generating glyphs with serifs?
    by HerpDerpington on February 4, 2025 at 6:33 pm

    Consider this example: \documentclass{article} \usepackage{unicode-math} \setmathfont{latinmodern-math.otf} \setmathfont[version=sans]{New Computer Modern Sans Math} \begin{document} \[ T|\symsfup{T}|\symup{T} \] \mathversion{sans} \[ T|\symsfup{T}|\symup{T} \] \end{document} which renders as Why does the \symsfup{T} have serifs? It is both in the sans version and also inside \symsfup (the same would occur with only \symsf).

  • xelatex listing greek letters cannot be captured by literal replacement
    by drcicero on February 4, 2025 at 4:39 pm

    This other question and answer describes how some utf8 letters can be enabled with xelatex and lstlistings. However it seems this does not work for all characters, and i dont see why. The following snippet demonstrates that it in xelatex is possible to map the hex code 2318 representing the character ⌘ to the latex expression \ensuremath{\alpha}, but its not possible to map the hexcode 945 representing the character "α" to the latex expression (\cmd) (or to anything else). \documentclass{article} \usepackage{fontspec} \usepackage{libertine} % or any other font \usepackage{listings} \usepackage{menukeys} \makeatletter %for xelatex: \lst@InputCatcodes \def\lst@DefEC{% \lst@CCECUse \lst@ProcessLetter ^^^^2318% ⌘ cmd ^^^^2423% ␣ invisiblespace ^^^945% α alpha ^^00} \lst@RestoreCatcodes \makeatother \lstset{ extendedchars=true, literate= {⌘}{\ensuremath{\alpha}}1 {α}{{(\cmd)}}1 {␣}{{\textvisiblespace}}1, showstringspaces=false, columns=flexible, keepspaces=true} \begin{document} Here is a listing: \begin{lstlisting} Mac␣users praαaess ⌘-C \end{lstlisting} \end{document} With pdflatex both literal replacements work, i.e., $ latexmk -pvc test.tex </dev/null produces the following pdf: However, with xelatex, as described above, only one of the two literal replacement works, .i.e. $ latexmk -pvc -xelatex test.tex </dev/null produces the following pdf: It seems to me that xelatex simply ignores literal instructions for some letters but not for others. I wonder if there is a workaround to make it possible to have literal instructions for greek letters in xelatex? Maybe some more special @ commands?

  • How can I use pandoc with equations that will work in Canvas LMS?
    by Josiah Yoder on February 4, 2025 at 4:14 pm

    I love combining Git, Pandoc markdown, and LaTeX to manage course content for Canvas LMS (from Instructure). But like others, I find it a little tricky to get equations to work in Markdown. How can I make sure my equations will show up properly for my students? (Unlike the linked question, numbering equations is not my goal. Just getting them to display to students correctly when pasting the pandoc-to-HTML into Canvas's HTML editor.)

  • How to Specify Which Font to Use to Get Rid of the 'Font shape undefined' Warning?
    by kalle on February 4, 2025 at 3:53 pm

    I would like to specify which bold font to use, since I receive the following warnings: Package microtype Info: Loading generic protrusion settings for font family (microtype) `Grandview.ttf' (encoding: TU). (microtype) For optimal results, create family-specific settings. (microtype) See the microtype manual for details. LaTeX Font Warning: Font shape `TU/Grandview.ttf(0)/b/n' undefined (Font) using `TU/Grandview.ttf(0)/m/n' instead on input line 1. Package microtype Info: Loading generic protrusion settings for font family (microtype) `IBMPlexMath-Regular.ttf' (encoding: TU). (microtype) For optimal results, create family-specific settings. (microtype) See the microtype manual for details. LaTeX Font Warning: Font shape `TU/IBMPlexMath-Regular.ttf(1)/b/n' undefined (Font) using `TU/IBMPlexMath-Regular.ttf(1)/m/n' instead on input line 2. LaTeX Font Warning: Font shape `TU/IBMPlexMath-Regular.ttf(2)/b/n' undefined (Font) using `TU/IBMPlexMath-Regular.ttf(2)/m/n' instead on input line 2. LaTeX Font Warning: Font shape `TU/IBMPlexMath-Regular.ttf(3)/b/n' undefined (Font) using `TU/IBMPlexMath-Regular.ttf(3)/m/n' instead on input line 2. My MWE is the following: \documentclass{scrartcl} \usepackage{microtype} \usepackage{fontspec} \usepackage{plex-mono} \usepackage{unicode-math} \setmainfont{GrandviewLight}[ BoldFont = GrandviewBold.ttf , ItalicFont = GrandviewItalic.ttf , BoldItalicFont = GrandviewBoldItalic.ttf, UprightFont = GrandviewLight.ttf] \setsansfont{Grandview.ttf} \setmathfont{IBMPlexMath-Regular.ttf} \usepackage{amsmath} \let\equation\gather \let\endequation\endgather \usepackage{amstext} \usepackage[]{bm} \usepackage[separate-uncertainty=true,multi-part-units=single]{siunitx} \usepackage{physics} \AtBeginDocument{\RenewCommandCopy\qty\SI} \begin{document} In a theory with a $U(1)$ gauge symmetry and action \begin{equation*} S=\int\!\mathrm{d}^dx\sqrt{-g}\left[\left(M^d_\textsf{P}\right)^{d-2}\frac{R^d}{2}-\frac{F^2}{4g^2}+\dots\right], \end{equation*} \end{document} There is no bold IBM Plex maths font, I thought maybe I could use fakebold instead. Would that be an option, and if so, how can I realise this? For the text, I'd like to use GrandviewLight for the normal text, but Grandview for upright text in equations, and GrandviewBold for bold in text. I think I set this up like this, but I still receive the warning LaTeX Font Warning: Font shape `TU/Grandview.ttf(0)/b/n' undefined (Font) using `TU/Grandview.ttf(0)/m/n' instead on input line 1. which makes me think it is not done correctly. How can I use the regular font for bold and the light font for normal text? Thank you very much for your insights and corrections to my code!

  • remove the period after the figure citation in the text
    by Ulisses on February 4, 2025 at 3:53 pm

    I have a problem removing the period after citing questions. I'll try to explain what's going on. I'm preparing a list of exercises, in most questions I use the \label function so I can reference it later. When I use \ref{} in the text, a period appears after the question number. The point only appears after I reference the questions, that is, when I reference the figures the point does not appear. Este é a parte do código e isto é o que aparece no pdf. From what I understand, the point after the reference to the questions serves to differentiate it from the reference to the figures, is that correct? Could someone help me, please? Below is my code \documentclass[11pt,twoside,a4paper]{article} \usepackage[hmargin=1cm,vmargin=2.5cm]{geometry} \usepackage[portuguese]{babel} % Linguagem português \usepackage[colorlinks=true,allcolors=blue]{hyperref} \usepackage{enumext} \begin{document} O enunciado a seguir refere-se às questões \ref{q1} e \ref{q2}. \begin{enumext}[list-indent=0pt,save-ans=test,show-ans=false] \item \label{q10} \dots \item \label{q1} Qual é o módulo \dots \item \label{q2} Qual o menor valor \dots \end{enumext} \end{document}

  • Creating a fixed image size using standalone
    by alisonmb7 on February 4, 2025 at 3:44 pm

    I'm using standalone to try and create images of maths problems I can combine into worksheets. I'd like to create a kind of template for them all so they all have the same width but the size of my resultant image seems to change depending on the contents. On top of that my font size doesn't seem to change. I've taken bits of other people's code so still figuring out what I need and don't need but this is what I have (some of the packages are for images I've removed). I'd like it to be roughly A4 landscape width with a large font, in an attempt to improve the quality of the png. Any thoughts? Thank you. \documentclass[14pt, preview, border={10pt 10pt 10pt 10pt}]{standalone} \renewcommand{\familydefault}{\sfdefault} \usepackage{amsfonts, amssymb, amsmath} \usepackage{tgadventor} \setlength{\textwidth}{28cm} \usepackage[paperheight=19cm, paperwidth=28cm]{geometry} \usepackage[dvipsnames]{xcolor} \definecolor{Example}{RGB}{0, 255, 35} \usepackage{tikz} \begin{document} \raggedright \textcolor{Example}{Example}\\ [16pt] The vector $\begin{pmatrix}\text{3} \\ \text{4}\end{pmatrix}$ translates A to B. Which of these vectors translates B to A?\\ [16pt] \begin{tabular}{p{3cm}p{3cm}p{3cm}p{3cm}} $\begin{pmatrix}\text{-3} \\ \text{4}\end{pmatrix}$& $\begin{pmatrix}\text{3} \\ \text{4}\end{pmatrix}$& $\begin{pmatrix}\text{-3} \\ \text{-4}\end{pmatrix}$& $\begin{pmatrix}\text{3} \\ \text{-4}\end{pmatrix}$\\ \end{tabular} \end{document}

  • How can I use some semi-exotic characters in a source-code listing?
    by John on February 4, 2025 at 3:34 pm

    Below is some text that I copy-pasted from the Isabelle theorem-prover interface. shows "P ≠ Q" and "P ≠ l" and "l ∩ m = m" and "∀P. P ≤ P" and "S ⟶ T" and "⟦U⟧ ⟹ V" and " ℝ ≠ ℕ" I'd like to typeset this with the listings package, thus: \documentclass[11pt,notitlepage,openany,oneside]{book} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \RequirePackage[svgnames]{xcolor} \usepackage{listings} %\usepackage{isabelle-listings} \begin{document} \begin{lstlisting}{language=Pascal} lemma times_assoc: fixes a::nat and b and c shows "P ≠ Q" and "P ≠ l" and "l ∩ m = m" and "∀P. P ≤ P" and "S ⟶ T" and "⟦U⟧ ⟹ V" and " ℝ ≠ ℕ" sorry end \end{lstlisting} \end{document} You can see that I'm telling the Listings package that it's Pascal rather than Isabelle, because telling it that I'm using Isabelle doesn't help, and the isabelle language-definition file is huge and (I believe) a red-herring for this question. Just as an FYI, the intended eventual output is something like this: and the isabelle listings language-description already does the coloring and bold-ing nicely when there are no special characters, so it's only the funny characters that are giving me trouble. My problem is that the result, upon running this with pdflatex I get the dreaded "LaTeX Error: Invalid UTF-8 byte sequence". When I switch to LuaLaTeX, things get a little better. I get the expected Package inputenc Warning: inputenc package ignored with utf8 based engines. and then a little later, the more significant Missing character: There is no ≠ (U+2260) in font ec-lmr10! Missing character: There is no ≠ (U+2260) in font ec-lmr10! Missing character: There is no ∩ (U+2229) in font ec-lmr10! Missing character: There is no ∀ (U+2200) in font ec-lmr10! Missing character: There is no ≤ (U+2264) in font ec-lmr10! Missing character: There is no ⟶ (U+27F6) in font ec-lmr10! Missing character: There is no ⟦ (U+27E6) in font ec-lmr10! Missing character: There is no ⟧ (U+27E7) in font ec-lmr10! Missing character: There is no ⟹ (U+27F9) in font ec-lmr10! Missing character: There is no ℝ (U+211D) in font ec-lmr10! Missing character: There is no ≠ (U+2260) in font ec-lmr10! Missing character: There is no ℕ (U+2115) in font ec-lmr10! ] (/compile/output.aux) I confess that at this point, I'm out of my depth in LaTeX. I don't know what ec-lmr10 is, or why it's being used, or what font I could be using to include these characters, and even if I knew what font that was, how to say "please use it during lstlistings. I've done my best to look for related questions (I read a lot about "LaTeX Error: Invalid UTF-8 byte sequence", for instance), but I'm in the position of not even knowing what words to search for. So: is there a way to typeset this kind of thing using listings?

  • How can I prevent ligatures from converting `--` into an en‐dash in my custom macro?
    by Isin Altinkaya on February 4, 2025 at 3:01 pm

    I am using pdfLaTex. I'm trying to define a command \cmd that prints its argument in a typewriter font (i.e. using \texttt for code formatting). For example, I want \cmd{--my-command} to print exactly --my-command (with two separate hyphens), but instead it produces an en‐dash followed by my-command (i.e. “–my-command”). My original macro: \newcommand{\cmd}[1]{\texttt{\detokenize{#1}}} I’ve tried several methods to “break” the ligature, including: Disabling hyphen ligatures: \usepackage{microtype} \DisableLigatures[-]{encoding = *, family = * } \newcommand{\cmd}[1]{\texttt{\detokenize{#1}}} Disabling all ligatures: \usepackage{microtype} \DisableLigatures[]{encoding = *, family = * } \newcommand{\cmd}[1]{\texttt{\detokenize{#1}}} Manually inserting a zero-width kern between hyphens (using xstring): \usepackage{xstring} \newcommand{\cmd}[1]{% \StrSubstitute{#1}{--}{-\kern0pt-}[\temp]% \texttt{\temp}% } Disabling all ligatures: \usepackage{microtype} \DisableLigatures{} \newcommand{\cmd}[1]{\texttt{\detokenize{#1}}} Disabling all ligatures: \usepackage{microtype} \DisableLigatures{family=rm*} \newcommand{\cmd}[1]{\texttt{\detokenize{#1}}} None of these methods work as expected; the output still ligatures the two hyphens.

  • How to add arrows from one point on one plot to another point on second plot in tikz and pgfplots
    by Mr.Price on February 4, 2025 at 2:57 pm

    I have the following code to plot 3 lines from which 2 are just a translation of main plot 2 points up and down. I want to highlight that fact by adding arrows pointing up and down (of length 2 point) from middle plot to two other plots. How can I do that nicely in tikz and pgfplots without manually calculating the position of points on plot and adding/subtracting 2 from y coordinate? I would like to add these arrows every 20% of plot length (so 5 arrows in total). \documentclass[tikz, margin=3mm]{standalone} \usepackage{tikz} \usetikzlibrary{shapes, backgrounds, arrows.meta, fit,decorations.pathreplacing} \usepackage[dvipsnames]{xcolor} \usepackage{pgfplots} \usepgfplotslibrary{fillbetween} \pgfplotsset{compat=1.18} \usepackage{polski} \begin{document} \begin{tikzpicture}[ % show background grid, background grid/.style={thin, dotted, draw=gray,step=.5cm}, >=Stealth, remember picture, ] \begin{axis}[ xmin=-3.5, xmax=3.99, ymin=-4.5, ymax=4.99, xtick distance=1, ytick distance=1, xticklabels=\empty, yticklabels=\empty, extra y ticks={1}, % Dodatkowy tick na osi Y (dla b=1) extra y tick labels={$1$}, % Oznaczenie wartości b extra x ticks={1}, % Dodatkowy tick na osi Y (dla b=1) extra x tick labels={$1$}, % Oznaczenie axis lines=middle, % Osie przechodzą przez środek axis line style={-Stealth}, % Strzałki na osiach axis on top, % Osie na wierzchu xlabel={$X$}, % Oznaczenie osi X ylabel={$Y$}, % Oznaczenie osi Y xlabel style={at={(ticklabel* cs:1)}, anchor=north east}, % Pozycja etykiety X ylabel style={at={(ticklabel* cs:1)}, anchor=north west}, % Pozycja etykiety Y grid=both, % Dodaj siatkę grid style={dotted, gray!50}, % Styl siatki: kropkowana, szara set layers, % Włącz warstwy clip mode=individual, legend style={font=\tiny, scale=0.8, legend cell align=left}, legend pos=south west% Zmniejsza legendę ] \begin{pgfonlayer}{axis foreground} \addplot [domain=-3:3, samples=100, thick, color=Red] {x} node[pos=0.9, above] {\textbf{$\textcolor{Red}{f}$}}; \addplot [domain=-3:3, samples=100, thick, color=Orchid] {x+2} node[pos=0.9, above] {\textbf{$\textcolor{Orchid}{g}$}}; \addplot [domain=-3:3, samples=100, thick, color=Cerulean] {x-2} node[pos=0.9, above] {\textbf{$\textcolor{Cerulean}{h}$}}; \end{pgfonlayer} \end{axis} \end{tikzpicture} \end{document}

  • "guia" Gregorian Chant symbol setting and vertical space in Tetragram using Musixtex
    by ABV on February 4, 2025 at 2:55 pm

    It is needed to move the "Guia" symbol to the right corner of the staff; also is needed to configure the vertical space between staff inside tetragram. The basic code is as follow: \documentclass[% border={2pt 7pt 15pt -17pt},% left bottom right top %border=8pt varwidth]{standalone} \usepackage{tikz} \usetikzlibrary{positioning} \usepackage{musicography} \usepackage{scalerel}%Escalar símbolos \usepackage{musixtex} \input musixlyr% \input musixlit% \input {musixgre}%gregoriano %\input musixps% \usepackage{gregoriotex}%Additiona package \usepackage{amsmath}% \usepackage{amssymb}% %$\shortmid$ and $\mid$ \usepackage{xcolor} \xdefinecolor{red-undar}{RGB}{179,35,79} \usepackage{fontawesome5} %\usepackage{fontspec} \usepackage[T1]{fontenc} \usepackage{lmodern} %\usepackage{graphicx} \usepackage{lilyglyphs} \usepackage{rotating,lilyglyphs}% \usepackage{trimclip} \begin{document} \begin{music} \hsize=\linewidth% \resetlyrics \setlyrics{Letras}{Be-ne-{\hspace{1.5cm}-dic-tus D\'o-mi-nus} De-us Is-ra-el: {\hspace{4.5cm}quia visitávit, et fecit redemptiónem} ple-bis su-{\ae}: Et er-{{\hspace{2.3cm}-éxit cornu sal}}-{\'u}-tis no-bis: {{\hspace{4.1cm}in domo David pú-}} e-ri-su-i. Si-cut {{\hspace{2.1cm}locútus est per}} os san-ctó-rum, {{\hspace{5.5cm}qui a s{\ae}culo sunt, prophe}}-t{\'a}-rum ei-us: Sa-l{\'u}-{{\hspace{0.7cm}tem ex inimicis nostris, et de manu ómnium}} qui o-dér-unt nos:}% \setsongraise{1}{0.15cm} \font\A=phvb8t at 6pt% added for letter type. \font\B=phvb8t at 13pt% added for letter type. \instrumentnumber{1} \nobarnumbers \setlines14 \setclef1{4000} \setstaffs11 \setaltoclefsymbol1\gregorianCclef% \newcommand{\guia}[1]{\loff{\zcharnote #1{\GreCustos3{}}}}% \newcommand{\ustt}[1]{\raisebox{0.2\Interligne}{\kern-1.4pt \ust {#1}\kern1.4pt}}% normal size \ust centered and put higher for notes on a line \newcommand{\usttt}[1]{\zcharnote {#1}{\A\textbf\medtype \kern0.3pt\raisebox{0.1\Interligne}-\kern0.3pt}}% shorter \ust % \newcommand{\btt}[1]{\zcharnote {#1}{\A\textbf{\kern1.16pt \raisebox{-0.9\Interligne}{\lilyGlyph{rests.M1neomensural}}\kern-1.16pt}}}% vertical bar below center of note head (original distance) \newcommand{\ptt}[1]{\kern-4pt\pt {#1}\kern4pt}% point closer to note head (original distance is defined for larger \nq) % %\newcommand{\caeg}{\zcharnote{5}{\hbsk\begin{tikzpicture}%Barra Vertical %\draw[line width=0.5pt,draw=black] (0.35,-0.295) -- ++(0,0.15); % %\end{tikzpicture}}}% works, but quite complicated if there is an existing symbol in amssymb % \newcommand{\caeg}{\charnote{b}{\kern-4.1pt$\A\textbf\shortmid$\kern4.1pt}\hbsk}% see differences in spacing % \newcommand{\dsbr}{\notes\zcharnote M{\kern-1.1pt$\A\textbf\mid\hspace{-0.125cm}\mid$\kern1.1pt}\hbsk\en}% see differences in spacing % \newcommand{\sbr}{\notes\zcharnote M{\kern-1.1pt$\A\textbf\mid$\kern1.1pt}\hbsk\en}% see differences in spacing % \newcommand{\sbre}{\zcharnote O{\kern-1.6pt$\A\textbf\mid$}}% see differences in spacing % \startpiece% \A\assignlyrics{1}{Letras}% \addspace{0.5\afterruleskip}% \notes\diapunc{M}\issluru1{N}\diapunc{N}\hbsk\tsslur1{a}\nolyr\diapunc{a}\lyr\Hpause{a}{2}\sk\sk\sk\diapunc{_b}\diapunc{a}\diapunc{N}\diapunc{a}\diapunc{a}\sk\roffset{1.3}{\guia{j}}\en% \zalaligne% \notes\lyr\Hpause{a}{5}\sk\sk\sk\sk\sk\sk\diapunc{N}\diapunc{M}\issluru0N\diapunc{N}\hbsk\tsslur0{a}\nolyr\diapunc{a}\issluru0N\diapunc{N}\hbsk\tsslur0{M}\nolyr\diapunc{M}\roffset{1.3}{\guia{h}}\en% \zalaligne% \notes\diapunc{M}\issluru0N\diapunc{N}\hbsk\tsslur0{a}\nolyr\diapunc{a}\lyr\Hpause{a}{4}\sk\sk\sk\sk\sk\diapunc{_b}\diapunc{a}\diapunc{N}\diapunc{a}\roffset{1.3}{\guia{j}}\en% \zalaligne% \notes\lyr\Hpause{a}{5}\sk\sk\sk\sk\sk\sk\diapunc{N}\diapunc{M}\issluru0N\diapunc{N}\hbsk\tsslur0{a}\nolyr\diapunc{a}\issluru0N\diapunc{N}\hbsk\tsslur0{M}\nolyr\diapunc{M}\roffset{1.3}{\guia{h}}\en% \zalaligne% \notes\diapunc{M}\issluru0N\diapunc{N}\hbsk\tsslur0{a}\nolyr\diapunc{a}\lyr\Hpause{a}{5}\sk\sk\sk\sk\sk\sk\diapunc{_b}\diapunc{a}\diapunc{N}\diapunc{a}\roffset{1.3}{\guia{j}}\en% \zalaligne% \notes\lyr\Hpause{a}{7}\sk\sk\sk\sk\sk\sk\sk\sk\diapunc{N}\diapunc{M}\issluru0N\diapunc{N}\hbsk\tsslur0{a}\nolyr\diapunc{a}\issluru0N\diapunc{N}\hbsk\tsslur0{M}\nolyr\diapunc{M}\roffset{1.3}{\guia{h}}\en% \zstoppiece% \end{music} \end{document} The current output is as follow:

  • Using Deployment Diagrams in Latex (using tikz or tikz-uml)
    by Stephan1403 on February 4, 2025 at 1:54 pm

    For my bachelors thesis I wanted to include a Deployment Diagram. For my other diagrams I found that using tikz-uml was the best. Unfortunately there seems to be no option to draw the 3d Boxes used in deployment diagrams with tikz-uml. What is the best way to include a deployment diagrams in my latex? P.s. this is my reference for tikz-uml: https://perso.ensta-paris.fr/~kielbasi/tikzuml/var/files/doc/tikzumlmanual.pdf

  • Print a bibliography with groups and subgroups by two different fields?
    by modallyFragile on February 4, 2025 at 11:54 am

    [Sorry if this is a dupe, searching my key terms just brings up stuff about how to group a bibliography with simpler methods, which I discuss below in 'Prior art'] I want to use BibLaTeX to print a bibliography which automatically groups entries by one field in the bib entry, then subgroups (within those groups) by another field, and gives each group a formatted (sub)section heading based on the value of the field by which it is grouped. I want the larger groups to be based on the value of the institution field and the subgroups to be based on the value of the role field (which I implement myself---see below). The value of the institution field is a literal, and I want entries with the same literal to be printed together. The value of the role field is a key list, and I want entries with the same key in their list to be printed together (so some entries might be printed twice). For context: this is for laying out an academic CV and listing teaching positions at different institutions, in different capacities. I'm using the package biblatex-cv, which provides a new entry type Teaching, for such positions. entrysubtype, department, date and location are mandatory fields for this type though are not relevant here So given this input: @Teaching{foo, institution = {Univeristy of Life}, role = {adjunct,lecturer}, title = {Foo Studies}, entrysubtype = {undergraduate}, department = {studies}, location = {campus} } @Teaching{bar, institution = {Univeristy of Death}, role = {adjunct}, title = {Bar Studies}, date = 2025, entrysubtype = {undergraduate}, department = {studies}, location = {campus} } I should get this output: UNIVERSITY OF LIFE As Lecturer: Foo studies As Adjunct: Foo studies UNIVERSITY OF DEATH As Adjunct: Bar Studies (Where lines in caps are section headings, and title-capped lines beginning with 'As' are subsection headings, each defined in terms of the value at hand.) Notice that Foo Studies is printed twice, because it has two different keys in its role list. A complete solution to this would be great, but I would happily accept an answer with even part of this implemented (i.e. with grouping by institution or role, or without the repeated printing for roles-groups) just as a start. Minimal examples I don't really know where to start with this, so I don't have a minimal working example yet, but here's a start at the machinery necessary: % Obviously for my real CV I use something more interesting -- this is % a MWE \documentclass{article} % * Define datamodel \begin{filecontents*}{\jobname.dbx} \ProvidesFile{cv.dbx} [\abx@bbxid] % ** Inherit from biblatex-cv.dbx % This is like doing \RequireCitationStyle or something, but % \RequireDatabaseFile doesn't exist \blx@inputonce{biblatex-cv.dbx}{database file 'biblatex-cv'}{}{}{} {\blx@error {Database file 'biblatex-cv' not found} {The database file 'biblatex-cv' could not be found}} % ** Roles for teaching positions % A list of keys, each of which is a role in a position \DeclareDatamodelFields[type=list,datatype=key]{role} % Add `role' to the list of supported fields for teaching \DeclareDatamodelEntryfields[teaching]{% role } % ** End input \endinput \end{filecontents*} % * Define bib database \begin{filecontents*}{\jobname.bib} @Teaching{foo, institution = "Univeristy of Life", role = "adjunct,lecturer", title = {Foo Studies}, entrysubtype = {undergraduate}, department = {studies}, location = {campus} } @Teaching{bar, institution = "Univeristy of Death", role = "adjunct", title = {Bar Studies}, date = 2025, entrysubtype = {undergraduate}, department = {studies}, location = {campus} } \end{filecontents*} % * Standard Preamble \usepackage[% datamodel=\jobname, ]{biblatex} \addbibresource{\jobname.bib} \date{} \author{modally-fragile} \title{modally-fragile CV} \begin{document} \nocite{*} \printbibliography{} \end{document} % Emacs stuff---tex.se can ignore this. % Local Variables: % TeX-master: t % End: This sets up all the background database stuff, but it just prints a list with \printbibliography, which isn't what I want. Any advice or implementations would be appreciated! Prior art (Just for context) I know how to print bibliography grouped by categories, but this requires manually setting the categories for each entry, and I don't want to do that. I also know that a \printbibliography can filter for keywords, but to use this mechanism I would have to set all the keywords correctly (to line up with the values of institution and role) and then issue a separate \printbibliography for each institution/role pair, and print the section headings manually, which isn't ideal.

  • Runaway Argument error due to restatable in newenvironment in Latex
    by Clément Michaud on February 4, 2025 at 11:04 am

    I'm trying to wrap a restatable block in my own environment using \newenvironment to be able to customize my blocks and restate them but when I try to do that I get the following error: Runaway argument? ! File ended while scanning use of \thmt@collect@body. \par <*> ...mp/843342bb-1eed-41c5-9012-92b0e9271a56.tex Here is the simple code that raises this error: \documentclass{article} \usepackage{thmtools} \usepackage{thm-restate} \newenvironment{test}[2]{\begin{restatable}{#1}{#2}}{\end{restatable}} \begin{document} \begin{test}{thm}{test2} test \end{test} \end{document} This is compiled with pdfLatex and with version 2024. I also tried with NewEnviron from the environ package. With this, the command that is supposed to be used for restating the theorem gives an error: Undefined control sequence.. Can anyone help me figure out what's wrong? Is it an issue with restatable? Thank you in advance.

  • How can I make the footnotes appear on the same line ? How can I make the numbers bold?
    by Maxime on February 4, 2025 at 10:27 am

    \documentclass[12pt] {article} \usepackage{geometry} \geometry{a4paper, margin=2cm} \usepackage{reledmac} \firstlinenum{5} \linenumincrement{5} \renewcommand{\numlabfont}{\normalfont\small} \setlength{\linenumsep}{10mm} \newcommand{\apparatus} \begin{document} \beginnumbering \pstart \edtext{les ungs plus, les autres mains.}{\Afootnote{les ungs plus que les aultres \textit{M}}} Encores \edtext{est}{\Afootnote{sont \textit{M}}} il \pend \endnumbering \end{document}

  • How to Create a Landscape Page with Full-Width Header and Footer in LaTeX?
    by eXor420 on February 4, 2025 at 9:25 am

    I need to include a single page in landscape orientation within my LaTeX document, preferably in A3 format, though the most critical requirement is ensuring proper landscape layout. The header and footer should appear at the top and bottom of the page, respectively, and extend across the entire width of the page. I have already tried multiple solutions from TeX Stack Exchange, and the closest I got to a working approach still has two major issues: The footer does not appear at all. The header does not span the full width of the page. I am looking for a solution that properly handles the header and footer while keeping them aligned to the landscape format. How can I achieve this correctly? If possible i also like the Landscape Page to be in the A3 size instead of A4 like the other pages. This is my simplyfied Code: \documentclass[a4paper,12pt]{scrreprt} % Pakete für deutsche Sprache und Formatierung \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage[ngerman]{babel} % Paket für Farben \usepackage{xcolor} \definecolor{accent}{HTML}{F42C34} % Definiert die Akzentfarbe % Paket für Grafiken und Logos \usepackage{graphicx} \usepackage{hyperref} % Paket für Seitenlayout \usepackage{geometry} \geometry{a4paper, left=3cm, right=3cm, top=2.5cm, bottom=2.5cm} \newenvironment{uselandscape}{ \KOMAoptions{paper=landscape, DIV=current} \newgeometry{left=1.3cm, right=1.3cm, top=2.5cm, bottom=2.5cm} \pagestyle{fancy} \fancyheadoffset{0\linewidth} }{ \cleardoublepage \restoregeometry } \usepackage{fancyhdr} \usepackage{lastpage} \pagestyle{fancy} \fancyhf{} \renewcommand{\headrulewidth}{1pt} \fancyhead[L]{Title} \fancyhead[R]{Name Name} \renewcommand{\footrulewidth}{1pt} \fancyfoot[L]{Ausgabe vom Donnerstag, 27. Februar 2025} \fancyfoot[R]{Seite \thepage{} von \pageref{LastPage}} \fancypagestyle{plain}{% \fancyhf{} \renewcommand{\headrulewidth}{1pt} \fancyhead[L]{Title} \fancyhead[R]{Name Name} \renewcommand{\footrulewidth}{1pt} \fancyfoot[L]{Ausgabe vom Donnerstag, 27. Februar 2025} \fancyfoot[R]{Seite \thepage{} von \pageref{LastPage}} } \setlength{\parindent}{0pt} \begin{document} \section{Test} \cleardoublepage \begin{uselandscape} \section{Test 2} \end{uselandscape} \end{document} This is what i looks like now: I want it something like this: Thanks for your help!

  • Sqrt creates space under numbers
    by Lancekri on February 4, 2025 at 9:04 am

    I'm using Latex in markdown and when I add the sqrt to the expression it creates spaces under the numbers. What causes this and how can I fix it? $$u = \dfrac{-5 \pm \sqrt{5^2 - 4 \times 3 \times (-2)}}{2\times3} = \dfrac{-5 \pm 7}{6}$$

  • How to disable `\setdefaultlanguage` in polyglossia package which changes the `\chinese` setting in ctexbook document class?
    by M. Logic on February 4, 2025 at 7:45 am

    First a minimal working sample and its output are as follows. \documentclass{ctexbook} \usepackage{polyglossia} \setotherlanguage{russian} \newfontfamily\russianfont[Script=Cyrillic,Language=Russian, ItalicFont={NewCM10-Italic.otf}, BoldFont={NewCM10-Bold.otf}, BoldItalicFont={NewCM10-BoldItalic.otf}]{NewCM10-Regular.otf} \newfontfamily\russianfontsf[Script=Cyrillic,Language=Russian, ItalicFont={NewCMSans10-Oblique.otf}, BoldFont={NewCMSans10-Bold.otf}, BoldItalicFont={NewCMSans10-BoldOblique.otf}]{NewCMSans10-Regular.otf} \newfontfamily\russianfonttt[Script=Cyrillic,Language=Russian, ItalicFont={NewCMMono10-Italic.otf}, BoldFont={NewCMMono10-Bold.otf}, BoldItalicFont={NewCMMono10-BoldOblique.otf}]{NewCMMono10-Regular.otf} \begin{document} \tableofcontents \section{测试} 你好!Hi! \textrussian{Привет!} \end{document} As you see, I'm writing a document involving Chinese (the main language), English and Russian. I invoke the polyglossia package to make it possible to write Russian letters. But the polyglossia package defines \setdefaultlanguage which changes the Chinese setting by \chinese in ctexbook, for example, ctexbook sets Contents to be 目录, i.e., ctexbook already defines the environment \chinese to set some special formats while \setdefaultlanguage in the polyglossia package set English to be default. So how to disable \setdefaultlanguage in polyglossia package which change the \chinese setting in ctexbook document class? Note that, ctexbook also have default setting on English. In fact, I need a solution to the following goals: Use ctexbook to write a Chinese document involving English and Russian; Don't change settings on Chinese and even English (ctexbook already does settings on both Chinese and English), and just add some setting to write some Russian sentences. So the question as above could also be solved without the polyglossia package.

  • Two column text and wide floats
    by Bob on February 4, 2025 at 3:06 am

    I am having trouble laying out some figure heavy pages for some instructional text. I am trying to achieve this the 'proper way' using floats and twocolumn (the reason being a desire to move away from multicols as it cannot handle floats). I want to avoid placing my figures manually as I do currently. The following figure demonstrates my desired result, which I have photoshopped. I cannot get figure B to go where it belongs. And its presence causes errors in subsequent figures as well. Here is my mwe which notably does not produce the picture above. \documentclass{memoir} \usepackage{geometry} \geometry{hmargin={0.75in,0.75in},vmargin={0.75in,0.75in},marginparwidth={0.8in},marginparsep={0in}} \usepackage{graphicx} \usepackage{lipsum} \begin{document} \twocolumn \lipsum[1-4]%more than one column of text %this figure MUST go in the top right, of the first page \begin{figure}[t] \centering \includegraphics[width=\linewidth]{example-image-a} \end{figure} %this wide figure MUST go on the same page as the figure above it, that being the first page. % Instead something breaks and it and all figures after it are forced to the back of all the remaining text. \begin{figure*}[b] \centering \includegraphics[width=\linewidth, height= 2in]{example-image-b} \end{figure*} \lipsum[1-8] \begin{figure}[t] \centering \includegraphics[width=0.75\linewidth, height=4in]{example-image-c} \end{figure} % These two figures MUST go in the same column, but can have text between them. \begin{figure}[b] \centering \includegraphics[width=\linewidth]{example-image-c} \end{figure} \lipsum[1-6] \end{document} I suppose I don't want the photos to 'float' at all. I want to pick which page they go on, in what position they are relative to one another, then have all the text fill the space accordingly.

  • Possible package clash -- XeLaTex + mla + graphicx?
    by crmdgn on February 4, 2025 at 2:23 am

    I'm using MacTex 2024. This code \documentclass[12pt,letterpaper]{article} \usepackage{mla} \usepackage{graphicx} \begin{document} \begin{mla} Blah blah text text \begin{figure} \includegraphics[width=0.75\textwidth]{photo.jpg} \end{figure} \end{mla} \end{document} produces these errors: LaTeX Error: Cannot determine size of graphic in photo.jpg (no BoundingBox). [...5\textwidth]{photo.jpg}] LaTex Font Warning: Font shape `TU/ptm/m/n' undefined (Font) using `TU/lmr/m/n instead on input line 10 What is going on and how do I fix it?

  • TikZ Layers on custom code
    by Emanuele Nardi on February 4, 2025 at 12:57 am

    I'm working on adapting the code from How to Optimize a TikZ Animation of Quicksort? to use TikZ with layers. I want to add a layer that draws a rectangle with a very thick line. Additionally, I would like to include a line between the 7th and 8th elements, exactly in the middle of the vector. Furthermore, the labels should be positioned between the colored cells. More details are provided in the code. Desired output This is my current output: This is the output I would like to achieve: Code \documentclass[tikz, border=.2cm]{standalone} \usetikzlibrary{chains} % slide 11/52 \newcommand*\tikzqsset{\pgfqkeys{/tikz/qs}} \tikzqsset{ % default cell style vector/.style = {draw, shape=rectangle, minimum size = +0.7cm, outer sep = +0pt}, label/.style = {node distance = 0pt,font = \ttfamily\scriptsize}, % /tikz/label exists already % cells styles undiscovered/.style = {fill = white}, left/.style = {fill = red!30}, between/.style = {fill = yellow!30}, right/.style = {fill = blue!30}, % parsing style parse/.style args={#1#2}{qs/sc-#1/.try, node contents={#2}}, % defining styles sc-l/.style={in front of path, qs/undiscovered}, sc-L/.style={in front of path, qs/left}, sc-b/.style={in front of path, qs/between}, sc-r/.style={in front of path, qs/undiscovered}, sc-R/.style={in front of path, qs/right}, } \NewDocumentCommand{\DividiEtImpera}{ m }{ \tikz\path[node distance=+0pt, start chain=going right] { foreach[count=\i] \v in {#1}{ node[on chain, qs/vector, qs/parse/.expand once=\v] } } []; \tikz\draw[very thick] (chain-1.north west) rectangle (chain-16.south east); } \begin{document} \DividiEtImpera{l0, L1, L2, L3, L4, l5, b6, b7, b8, b9, b10, r11, r12, R13, R14, R15} % maxL label below and between 1 and 4 % maxRR label below and between 6 and 7 % maxLL label below and between 8 and 10 % maxR label below and between 13 and 15 \end{document}

  • Special enumerated list inside a display-math environment
    by Cherryblossoms on February 3, 2025 at 9:49 pm

    As in the above image, I need to define a set consisting of constraints. These constraints need to be cross-referenced elsewhere in the document, so I also need to label them. I am unable to find a solution to this. I tried align/aligned, but the tag comes on the right, which I don't want (it doesn't appear inside the set). The above way will make my overall set neat. An enumerate environment seems to be a possible option, except I am getting errors.

  • LuaLaTeX ignores kerning pairs among math glyphs
    by FKranhold on February 3, 2025 at 8:44 pm

    (This issue might be somewhat related to this question.) Consider the following MWE: \documentclass{scrartcl} \usepackage{unicode-math} \setmathfont{MinionMath-Regular} \begin{document} $abcff,$ \end{document} When compiled with LuaLaTeX (you need the Minion Math font for this), the result looks as follows: Clearly, some kerning information is either missing or ignored here. However, it looks as if this is not an issue of the font: A quick inspection with FontForge shows that the font contains information for many kerning pairs, including “ff” and “f,” (the “italic f” being the unicode character U+1D453): I believe there must be a way to tell LuaLaTeX all these values. Even if LuaLaTeX cannot get these values from the OTF file itself (which would surprise me), I’d expect that one can tell LuaLaTeX all these kerning values manually, similar to this solution, but somehow adapted to the math font. (For completeness, I should mention that staircaise kerning for subscripts and superscripts works fine.) Update: I have just noticed that with TeX Gyre Pagella Math as math font, there is a quite noticable kerning effect at “cf” and “ff” – so apparently, the concept of kerning math glyphs is something LuaLaTeX is (in principle) perfectly capable of: