• How to vertically centre cell content in an array
    by Will Kim on December 13, 2025 at 12:59 pm

    How would you modify the following code so that the words "First shape", "Second shape", and "third shape" are vertically aligned? Thank you! \documentclass[11pt,twoside]{book} \usepackage[ paperwidth=7in, paperheight=10in, inner=0.75in, % inside margin (gutter) for binding outer=0.5in, % outside margin top=0.75in, % top margin bottom=0.75in % bottom margin ]{geometry} % % Packages \usepackage[utf8]{inputenc} \usepackage{amsmath, amssymb, amsfonts} % math symbols \usepackage{geometry} \usepackage{graphicx} % figures \usepackage{tikz} % drawings % Page layout % \usepackage{pgfplots} \usepackage{mathtools} \usepackage{cancel} \usepackage{pgfplots} \usepackage{array} \usepackage{amsmath} \usepackage{tikz} \begin{document} \textbf{23} A pattern of shapes is created with matchsticks.\\[0.15cm] \hspace*{6mm}The first three shapes are shown below.\\ \begin{center} $\begin{array}[b]{lcc} \text{First shape} & \quad & \begin{tikzpicture} %left \node[rotate around={+60:(-0.2,-0.5)}] (image) at (-0.2,-0.5) {\includegraphics[]{Stick.png}}; \node[rotate around={+120:(-0.35,+0.15)}] (image) at (-0.35,+0.15) {\includegraphics[]{Stick.png}}; %center \node[] (image) at (0,0) {\includegraphics[]{Stick.png}}; %right \node[rotate around={-60:(0.2,-0.5)}] (image) at (0.2,-0.5) {\includegraphics[]{Stick.png}}; \node[rotate around={-120:(0.35,+0.15)}] (image) at (0.35,+0.15) {\includegraphics[]{Stick.png}}; \end{tikzpicture} \\ \text{Second shape} & \quad & \begin{tikzpicture} %left \node[rotate around={+60:(-0.2,-0.5)}] (image) at (-0.2,-0.5) {\includegraphics[]{Stick.png}}; \node[rotate around={+120:(-0.35,+0.15)}] (image) at (-0.35,+0.15) {\includegraphics[]{Stick.png}}; %center \node[] (image) at (0,0) {\includegraphics[]{Stick.png}}; %right \node[rotate around={-60:(0.2,-0.5)}] (image) at (0.2,-0.5) {\includegraphics[]{Stick.png}}; \node[rotate around={-120:(0.35,+0.15)}] (image) at (0.35,+0.15) {\includegraphics[]{Stick.png}}; % \node[xshift=1.6cm] (image) at (0,0) {\includegraphics[]{Stick.png}}; %right \node[xshift=1.6cm,rotate around={-60:(0.2,-0.5)}] (image) at (0.2,-0.5) {\includegraphics[]{Stick.png}}; \node[xshift=1.6cm,rotate around={-120:(0.35,+0.15)}] (image) at (0.35,+0.15) {\includegraphics[]{Stick.png}}; \end{tikzpicture} \\ \text{Third shape} & \quad & \begin{tikzpicture} %left \node[rotate around={+60:(-0.2,-0.5)}] (image) at (-0.2,-0.5) {\includegraphics[]{Stick.png}}; \node[rotate around={+120:(-0.35,+0.15)}] (image) at (-0.35,+0.15) {\includegraphics[]{Stick.png}}; %center \node[] (image) at (0,0) {\includegraphics[]{Stick.png}}; %right \node[rotate around={-60:(0.2,-0.5)}] (image) at (0.2,-0.5) {\includegraphics[]{Stick.png}}; \node[rotate around={-120:(0.35,+0.15)}] (image) at (0.35,+0.15) {\includegraphics[]{Stick.png}}; % \node[xshift=1.6cm] (image) at (0,0) {\includegraphics[]{Stick.png}}; %right \node[xshift=1.6cm,rotate around={-60:(0.2,-0.5)}] (image) at (0.2,-0.5) {\includegraphics[]{Stick.png}}; \node[xshift=1.6cm,rotate around={-120:(0.35,+0.15)}] (image) at (0.35,+0.15) {\includegraphics[]{Stick.png}}; % \node[xshift=3.2cm] (image) at (0,0) {\includegraphics[]{Stick.png}}; %right \node[xshift=3.2cm,rotate around={-60:(0.2,-0.5)}] (image) at (0.2,-0.5) {\includegraphics[]{Stick.png}}; \node[xshift=3.2cm,rotate around={-120:(0.35,+0.15)}] (image) at (0.35,+0.15) {\includegraphics[]{Stick.png}}; \end{tikzpicture} \quad \end{array}$ \end{center} \text{}\\[-0.3cm] \\ \hspace*{6mm}Find an expression for the number of matchsticks used for the $n$th shape. \end{document}

  • Using \par directly in enumitem's itemjoin
    by Erwann on December 13, 2025 at 3:10 am

    I'm using enumitem to typeset paragraphs, whether contiguous or joined using \par. For this last case, itemjoin={\par} triggers an error, hence the shown workaround. Is there an inline solution (wild guess \exp_not:N did not work). *.tex \documentclass{article} \usepackage{enumitem} \usepackage{lipsum} \ExplSyntaxOn \cs_new:Npn \g__erw_par { \par } % workaround \newlist{my-list}{itemize*}{1} \setlist[my-list]{ label={}, % itemjoin={\par} itemjoin={\g__erw_par} % workaround } \ExplSyntaxOff \begin{document} \ExplSyntaxOn \begin{my-list}[after={\g__erw_par foo}] \item \lipsum[1][1] \item \lipsum[1][2] \end{my-list} \ExplSyntaxOff \lipsum[1][1-2] \end{document} Post Scriptum: the proposed workaround solves the compilation error but does not render as expected. The choice seems to between itemize or itemize*, but no crossover. terminal: Runaway argument? {label={},itemjoin={ ! Paragraph ended before \enit@setlist@i was complete. <to be read again> \par l.11 itemjoin={\par } ?

  • Lettrine breaks wrapfigure and marginnote
    by DanDucky on December 13, 2025 at 1:30 am

    I'm trying to make a template which uses wrapfigure (for wrapped text), marginnote, and lettrine. I've gotten all of the first 2 to play nice together, but the problem has started at lettrine. Basically, when I use lettrine and marginnote together then wrapfigure breaks and stops placing its text in the correct place. If I remove the marginnote then wrapfigure works with lettrine. The marginnote itself remains unaffected when I use lettrine, it just breaks wrapfigure. I've tried recreating the lettrine effect with wrapfigure only but ran into similar issues. I've made a minimum reproduction of this below, thank you in advance. I'm using Tectonic. \documentclass{article} \usepackage[ letterpaper, % or letterpaper, etc. margin=3cm, footskip=1cm % space between bottom of text and baseline of footer ]{geometry} \usepackage{lettrine} \usepackage{wrapfig} \usepackage{marginnote} \usepackage{lipsum} \usepackage{marginnote} \newcommand{\colnote}[1]{% \marginnote{% \footnotesize% #1% }% \normalmarginpar% in my main code this is determined by a \whichcolumn } \newcommand{\wrappedtext}[1]{% % in my main code this is l/r depending on column \begin{wrapfigure}{l}{0.4\linewidth}% \textit{#1}% \end{wrapfigure}% } \begin{document} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % when this is uncommented the whole thing breaks %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %\lettrine{L}{orem} \lipsum[1][1-8] \wrappedtext{\lipsum[1][1-2]} \lipsum[1][11-15] \colnote{\lipsum[1][3-4]} \lipsum[2-3] \end{document}

  • Top align display style formula in table cell
    by lela2011 on December 12, 2025 at 10:46 pm

    I am currently working on a cheat sheet. It is composed of a table with three columns. The first one is a keyword, the second one either a text explanation or a formula and the third one is a variable definition. The following is a minimal working example \documentclass[a4paper, twocolumn, landscape]{article} \usepackage[margin = 7mm, headsep=3mm, includehead]{geometry} \usepackage[fleqn]{amsmath} \usepackage{amsfonts, amssymb, mathtools} \usepackage{bm} \usepackage{siunitx} \usepackage{braket} \newcommand{\dd}{\mathrm{d}} \newcommand{\pd}{\partial} \DeclareMathOperator{\ham}{\hat{H}} \DeclareMathOperator{\mom}{\hat{p}} \DeclarePairedDelimiter{\abs}{\lvert}{\rvert} \DeclarePairedDelimiter{\norm}{\lVert}{\rVert} \makeatletter \let\oldabs\abs \def\abs{\@ifstar{\oldabs}{\oldabs*}} % \let\oldnorm\norm \def\norm{\@ifstar{\oldnorm}{\oldnorm*}} \makeatother \usepackage{tabularx} \usepackage{booktabs} \usepackage{array} \usepackage{makecell} \newcommand{\mc}[1]{\makecell{#1}} \renewcommand{\cellalign}{tl} \newcolumntype{L}{>{\raggedright\arraybackslash}p{0.2\linewidth}} \newcolumntype{F}{>{\raggedright\arraybackslash \abovedisplayskip=0pt \belowdisplayskip=0pt \abovedisplayshortskip=0pt \belowdisplayshortskip=0pt \mathindent=0pt \partopsep=0pt \topsep=0pt}p{0.5\linewidth}} \newcolumntype{E}{>{\raggedright\arraybackslash}X} \newenvironment{formtab}[1][1.2] { \renewcommand{\arraystretch}{#1} \fontsize{8}{8}\selectfont \tabularx{\linewidth}{@{} L F E @{}} } { \endtabularx } \begin{document} \subsubsection{Wavefunction - Discrete} \begin{formtab} discrete basis & set of discrete states $\{ \Psi_n \}$ with $\braket{\Psi_n | \Psi_m} = \delta_{nm}$ & \\ arbitrary state & \[ \ket{\Psi} = \sum_{n=1}^\infty a_n \ket{\Psi_n}, \quad a_n = \braket{\Psi_n | \Psi} \] & \\ probability & $P_\Psi(n) = \abs{a_n}^2 = \abs{\braket{\Psi_n | \Psi}}^2$ & \\ normalization & $\braket{\Psi | \Psi} = 1$ \end{formtab} \end{document} The table now looks like this I want the display style formula to sit flush with the top of the cell though. I have tried using $\displaystyle a^2+b^2=c^2$. This causes the keyword to be centered with the formula. Using \vspace(-.5cm) works partially but that would require me to manually find the correction which is not sensible if the entire document is made up of formulas. Do you have any ideas how this could be achieved?

  • How to draw a complete graph $K_5$ with 5 edges with different colors and the vertices are not big filled circles?
    by Intuition on December 12, 2025 at 10:17 pm

    I am trying to draw a complete graph $K_5$ with 5 edges with different colors and the vertices are not big filled circles? I found this here A complete graph on 5 vertices with coloured edges but I do not know how to have 5 edges with different colors and the vertices are not big filled circles, just small filled circles. Any hints will be greatly appreciated. I also do not want this one here How to draw the following graph in latex? , I want the edges themselves to be of different colors not shaded by different colors.

  • METAFONT - help with em and ex
    by Grzegorz Brzczyszczykiewicz on December 12, 2025 at 9:42 pm

    How do I set up the em and ex in METAFONT so that I can use it later in LaTeX?

  • How to draw a pattern within a path that features a visible decorated path and also invisible paths? OR How to visualize the ground?
    by Simon on December 12, 2025 at 6:13 pm

    How does the following MWE need to be modified to only visualize the decorated path but not the remaining path and draw the top right-hand corner not rounded? \documentclass{standalone} \usepackage{tikz} \usetikzlibrary{decorations.pathmorphing} \usetikzlibrary{patterns} \begin{document} \begin{tikzpicture} \path[draw,pattern=north west lines] decorate[decoration={random steps,segment length=1,amplitude=.2},rounded corners=.2] {(-1,0) -- (0,0) -- (1,0)} -- (1,-.25) -- (-1,-.25) -- cycle; \end{tikzpicture} \end{document} Thanks in advance!

  • Overcoming restriction for writing in non-nested directory
    by Erwann on December 12, 2025 at 5:25 pm

    For this issue a solution has been proposed consisting in exporting TEXMFOUTPUT with the desired path as an alternative to the more invasive modification of texmf.cnf. It hasn't worked for me: is that a dead end? tex: \begin{filecontents*}[overwrite]{../../json/dummy.json} [ { "id": "alice", "name": "Alice" }, { "id": "bob", "name": "Bob" } ] \end{filecontents*} \documentclass{article} % \usepackage{filecontents} obsolete \usepackage{jsonparse} \ExplSyntaxOn \JSONParseFromFile{\g__erw_dummy_prop}{../../json/dummy.json} \ExplSyntaxOff \begin{document} \end{document} On the terminal: $ ls -d ../../json../../json # ../../json export TEXMFOUTPUT=$(realpath $(pwd)/../../json) ls $(echo $TEXMFOUTPUT) # dummy.json pdflatex debug-125.tex # This is pdfTeX, Version 3.141592653-2.6-1.40.28 (TeX Live 2025) (preloaded format=pdflatex) # restricted \write18 enabled. # entering extended mode # (./debug-125.tex # LaTeX2e <2025-06-01> patch level 1 # L3 programming layer <2025-08-13> # # LaTeX Warning: Writing or overwriting file `../../json/dummy.json'. # # # pdflatex: Not writing to ../../json/dummy.json (openout_any = p; no extended check). # ! I can't write on file `../../json/dummy.json'. # <to be read again> # \relax # l.1 ...ontents*}[overwrite]{../../json/dummy.json} # # (Press Enter to retry, or Control-D to exit; default file extension is `.tex') # Please type another output file name: more on the terminal: $ grep 'openout_any' /opt/texlive/2025/texmf-dist/web2c/texmf.cnf % not write any output files, respect openout_any, or have hard-coded % restrictions similar to or higher than openout_any=p. The output file % epspdf, ps2pdf, pstopdf - need to respect openout_any, % tex, latex, etc. - need to forbid --shell-escape, and inherit openout_any. % (openout_any) on filenames starting with `.' (e.g., .rhosts) or openout_any = p

  • Allow biblatex to wrap text
    by user386618 on December 12, 2025 at 4:05 pm

    \documentclass[10pt]{book} \usepackage[T2A]{fontenc} \usepackage[english, russian]{babel} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage[papersize={148mm, 210mm}, inner=12.6mm, outer=5.4mm, top=5.4mm, textwidth=130mm, headheight=15pt, headsep=10pt, footskip=15mm, includehead]{geometry} \usepackage[backend=biber]{biblatex} \usepackage{fancyhdr} \pagestyle{fancy} \fancyhead{} \fancyhead[C]{\thepage} \fancyfoot{} \parindent=0pt \defbibenvironment{bibliography}{\list{}{\setlength{\leftmargin}{3em}}}{\endlist}{\item[\textbullet\ ]} \begin{filecontents*}{\jobname.bib} @inbook{rearrangement2, author = {Radmila Bulajich Manfrino and José Antonio Gómez Ortega and Rogelio Valdez Delgado}, title = {The Rearrangement Inequality}, booktitle = {Inequalities: A Mathematical Olympiad Approach}, pages = {13--20}, publisher = {Birkhäuser}, address = {Basel}, year = {2009}, isbn = {9783034600491} } @book{latexcompanion, author = "Michel Goossens and Frank Mittelbach and Alexander Samarin", title = "The \LaTeX\ Companion", year = "1993", publisher = "Addison-Wesley", address = "Reading, Massachusetts", keywords = "latex" } @online{knuthwebsite, author = "Donald Knuth", title = "Knuth: Computers and Typesetting", url = "http://www-cs-faculty.stanford.edu/~uno/abcde.html", addendum = "(accessed: 01.09.2016)", keywords = "latex,knuth" } @inbook{knuth-fa, author = "Donald E. Knuth", title = "Fundamental Algorithms", publisher = "Addison-Wesley", year = "1973", chapter = "1.2", keywords = "knuth,programming" } @book{knuth-acp, author = "Donald E. Knuth", publisher = "Addison-Wesley", title = "The Art of Computer Programming", series = "Four volumes", year = "1968", note = "Seven volumes planned", keywords = "knuth,programming" } @article{ctan, author = "George D. Greenwade", title = "The {C}omprehensive {T}ex {A}rchive {N}etwork ({CTAN})", year = "1993", journal = "TUGBoat", volume = "14", number = "3", pages = "342--351", keywords = "latex" } \end{filecontents*} \addbibresource{\jobname.bib} \begin{document} \twocolumn \nocite{*} \printbibliography[heading=subbibintoc,title={Smth}] \printbibliography[heading=subbibintoc,title={Lorem ipsum}] \end{document} I want that text wraps autonmatically (without - or \hspace(0pt)) like in babel package how to do that?

  • Different authors handled as same author in bibliography when using CSL style
    by dbmei on December 12, 2025 at 3:24 pm

    Problem I have two bibliographic entries in my database with similar author fields. In the first case, it is an article only by author A. In the second case, A (Luz) is the first author, followed by B, C, and D (Luz, Frank, Riches, Klimkeit). I abbreviate with et al. for more than 3 authors. However, in my bibliography the entries appear under the same name A, which is quite confusing. Any idea, folks, why this happens? I think it might have to do with the csl-style I wrote by myself, but I am not sure. I use .json as file format for my bibliography for different reasons. Thanks for any help! Wrong output Wanted Solution MWE Code, run with LuaLaTex \documentclass[10pt,openany,a4paper]{article} \usepackage[utf8x]{inputenc} \usepackage[english,ngerman]{babel} \usepackage[style=ownstyle]{citation-style-language} \addbibresource{Bib.json} \begin{document} Some text\cite{LuzEtAl_NachfolgeTRE}. Some further Text\cite{Luz_TRE23Nachfolge}. \printbibliography \end{document} Bibliography file, file format .json [ {"id":"Luz_TRE23Nachfolge","author":[{"family":"Luz","given":"Ulrich"}],"citation-key":"Luz_TRE23Nachfolge","collection-title":"TRE","container-title":"TRE","issued":{"date-parts":[["1994"]]},"page":"678–686","title":"Nachfolge Jesu I. Neues Testament","title-short":"Nachfolge Jesu I. Neues Testament","type":"entry-encyclopedia","volume":"23"}, {"id":"LuzEtAl_NachfolgeTRE","author":[{"family":"Luz","given":"Ulrich"},{"family":"Frank","given":"Karl Suso"},{"family":"Riches","given":"John K."},{"family":"Klimkeit","given":"Hans-Joachim"}],"citation-key":"LuzEtAl_NachfolgeTRE","collection-title":"TRE","container-title":"TRE","issued":{"date-parts":[["1994"]]},"page":"678--713","title":"Nachfolge Christi","title-short":"Nachfolge Christi","type":"entry-encyclopedia","volume":"23"} ] CSL-Style (note: I deleted a lot for this MWE, compliation still works fine but some code might be unnecessary, like if/else-if - please ignore) <?xml version="1.0" encoding="utf-8"?> <style xmlns="http://purl.org/net/xbiblio/csl" class="note" version="1.0" page-range-format="expanded" default-locale="de-DE" demote-non-dropping-particle="sort-only"> <info></info> <!-- ########## # Locale # ########## --> <locale xml:lang="de"> <terms> <!--<term name="cited">op. cit.</term>--> <term name="editor" form="short"> <single>Hg.</single> <multiple>Hg.</multiple> </term> <term name="container-author" form="short"> <single>Hg.</single> <multiple>Hg.</multiple> </term> <term name="director" form="long"> <single>Regie</single> <multiple>Regie</multiple> </term> </terms> </locale> <!-- ########## # Macros # ########## --> <macro name="author-bib"> <!--Autorenangabe i.d. Bibliographie--> <choose> <if variable="author"> <names variable="author" font-variant="normal" suffix=", "> <name font-style="normal" delimiter="/" delimiter-precedes-last="never" et-al-min="4" et-al-use-first="1" name-as-sort-order="all"> <!-- initialize-with="." #sorgt für Initalisierung von Vornamen--> <name-part name="family" font-variant="small-caps"/> <name-part name="given" font-variant="small-caps"/> </name> </names> </if> </choose> </macro> <!-- --> <macro name="author-intext"> <!--Autorenangabe im Fußnotentext--> <choose> <if variable="author"> <names variable="author" font-variant="normal" suffix=", "> <name form="short" font-style="normal" delimiter="/" delimiter-precedes-last="never" et-al-min="4" et-al-use-first="1" name-as-sort-order="all"> <!-- initialize-with="." #sorgt für Initalisierung von Vornamen--> <name-part name="family" font-variant="small-caps"/> </name> </names> </if> </choose> </macro> <!-- --> <macro name="title-bib"> <!--Titelangabe i.d. Bibliographie--> <choose> <if type="entry-encyclopedia" match="any"> <text variable="title" suffix=", "/> </if> <else-if> <text variable="title"/> </else-if> </choose> </macro> <!-- --> <macro name="title-intext"> <!--Titelangabe im Fußnotentext--> <choose> <if type="entry-encyclopedia" match="any"> <text variable="title" form="short"/> </if> <else-if> <text variable="title" form="short"/> </else-if> </choose> </macro> <!-- --> <macro name="edition"> <!--Auflage--> <choose> <if type="entry-encyclopedia" match="any"> <choose> <if is-numeric="edition"> <group > <number vertical-align="sup" variable="edition"/> </group> </if> </choose> </if> </choose> </macro> <!-- --> <macro name="date-year"> <!--Jahr d. Veröffentlichung--> <choose> <if type="entry-encyclopedia" match="any"> <date variable="issued"> <date-part name="year" prefix="(" suffix=")"/> </date> </if> <else> <date variable="issued"> <date-part name="year" /> </date> </else> </choose> </macro> <!-- --> <macro name="volume"> <!--Band einer mehrbändigen Ausgabe--> <choose> <if type="entry-encyclopedia"> <group> <text variable="volume"/> </group> </if> </choose> </macro> <!-- --> <macro name="page-bib"> <!--Seitenangabe--> <group> <text variable="page"/> </group> </macro> <!-- --> <macro name="collection"> <!--Titel mehrbändiger Ausgaben, z.B. Lexika, Editionen--> <choose> <if type="entry-encyclopedia"> <text variable="container-title" /> </if> </choose> </macro> <!-- #################### # In-Text Citation # #################### --> <citation> <layout suffix="" delimiter="; "> <choose> <if position="subsequent"> <group> <text macro="author-intext"/> <text macro="title-intext"/> </group> </if> <else-if type="entry-encyclopedia" match="any"> <group> <text macro="author-intext"/> <text macro="title-intext" prefix="Art. " suffix=", "/> <text macro="collection" /> <text macro="edition"/> <text macro="volume" prefix=" "/> </group> </else-if> <else> <group> <text macro="author-intext"/> <text macro="title-intext"/> </group> </else> </choose> </layout> </citation> <!-- ######################### # Bibliography Citation # ######################### --> <bibliography hanging-indent="true" et-al-min="3" et-al-use-first="1" line-spacing="1" entry-spacing="1" subsequent-author-substitute="---"> <sort> <key macro="author-bib" names-min="5" names-use-first="5"/> <key variable="date-year" sort="ascending"/> </sort> <layout suffix="."> <choose> <if type="entry-encyclopedia" match="any"> <!--Lexikonartikel--> <group> <text macro="author-bib"/> <text macro="title-bib" prefix="Art. " /> <text macro="collection" /> <text macro="edition" suffix=" "/> <text macro="volume" prefix=" " suffix=" "/> <text macro="date-year" prefix=" " suffix=", "/> <text macro="page-bib"/> </group> </if> </choose> </layout> </bibliography> </style>

  • LuaTeX (and other engines) equivalent of the \showglyphs command in ConTeXt for math
    by Apoorv Potnis on December 12, 2025 at 3:07 pm

    We can use the \showglyphs commannd in ConTeXt to show the bounding boxes of glyphs, both text and math. It also shows the baseline. \showglyphs \starttext Lorem ipsum \startformula \int_\Gamma f \cdot dx = 1 \stopformula \stoptext What are the equivalent commands with other engines, such as Lua(La)TeX, Xe(La)TeX, OpTeX, and even pdf(La)TeX if possible? The answers here don't work for math: Bounding box for each letter. The package lua-visual-debug does not seem to create boxes for all the glyphs involved in the equations.

  • I want to create a new recipe in the LaTeX Workshop for working with Asymptote [duplicate]
    by Ascended Ru on December 12, 2025 at 1:04 pm

    How to create a recipe in the LateX workshop of the form: pdflatex -> asy -> pdflatex?

  • Reduce spacing in TikZ state diagram with split nodes
    by mingabua on December 12, 2025 at 11:55 am

    I have the following code to create a tikzpicture of a labelling algorithm. However, I am currently not satisfied with the way it looks right now. Every looks to big and to much spread out. How can I create a more condense but still clear version of it. For (1); the vertical space between the boxes should be smaller. (2) the box height should be decreased and (3) the text inside the box should be more condense. The font size could be decreased as well. This is my code: \documentclass{article} \usepackage[margin=1in]{geometry} \usepackage{tikz} \usepackage{amsmath} \usetikzlibrary{positioning, arrows.meta, shapes.multipart, calc} \usepackage{lipsum} \begin{document} \lipsum[1] \begin{figure}[htbp] \centering \begin{tikzpicture}[ scale=1, % --- STYLES --- node distance=2.5cm and 3cm, font=\sffamily\footnotesize, % Label Box labelnode/.style={ rectangle split, rectangle split parts=2, draw=black!80, rounded corners, fill=gray!5, align=center, inner sep=3pt, minimum width=2.1cm }, % Infeasible (MS Pruning) - Rot infeasible/.style={ labelnode, draw=red!80, fill=red!5, dashed }, % Dominated (History Dominance) - Lila dominated/.style={ labelnode, draw=violet!80, fill=violet!5, dashed }, % Optimal Path Node - Grün optimal/.style={ labelnode, draw=green!50!black, fill=green!10, line width=1pt }, % Edges worker/.style={-{Latex[length=3mm]}, blue!70!black, thick}, ai/.style={-{Latex[length=3mm]}, orange!80!black, thick}, optedge/.style={worker, line width=1.5pt, green!40!black}, prunededge/.style={-{Latex[length=3mm]}, red!70, dashed}, domedge/.style={-{Latex[length=3mm]}, violet!70, dashed} ] % --- ZEITACHSE --- % Verschiebung nach oben (y=7) und Skalierung x (Faktor 3.2) \draw[->, thick, gray] (0, 7) -- (10.5, 7) node[right] {Time $t$}; \foreach \x in {0,1,2,3} \node[gray] at (\x*3.2, 7.3) {$t=\x$}; % --- KNOTEN --- % t=0 \node[labelnode] (start) at (0,0) { \textbf{Start} \nodepart{second} $V=0$\\$\omega=0$ }; % t=1 % Worker \node[optimal] (t1_w) at (3.2, 2.0) { \textbf{W1} \nodepart{second} $V=3$\\$\omega=1.0$\\$h=[1]$ }; % AI \node[labelnode] (t1_a) at (3.2, -2.0) { \textbf{A1} \nodepart{second} $V=1$\\$\omega=0.3$\\$h=[0]$ }; % t=2 % PATH A: \node[optimal] (t2_ww) at (6.4, 3.8) { \textbf{W $\to$ W} \nodepart{second} $V=6$\\$\omega=2.0$\\$h=[1,1]$ }; % PATH B: \node[labelnode] (t2_aw) at (6.4, 0) { \textbf{AI $\to$ W} \nodepart{second} $V=4$\\$\omega=1.3$\\$\mathbf{h=[0,1]}$ }; % PATH C: \node[dominated] (t2_wa) at (6.4, -2.5) { \textbf{W $\to$ AI} \nodepart{second} \textit{Dominated}\\$V=4$\\$\omega=1.3$\\$\mathbf{h=[1,0]}$ }; % PATH D: \node[infeasible] (t2_aa) at (6.4, -4.5) { \textbf{AI $\to$ AI} \nodepart{second} \textit{Pruned}\\$h=[0,0]$ }; % PATH A+: W -> W -> W \node[optimal] (t3_www) at (9.6, 4.8) { \textbf{3 Workers} \nodepart{second} $V=9$\\$\omega=3.0$\\Target Met }; % --- Arcs --- % t0 -> t1 \draw[optedge] (start) -- (t1_w) node[midway, above, sloped] {W (+3)}; \draw[ai] (start) -- (t1_a) node[midway, below, sloped] {AI (+1)}; % t1 -> t2 \draw[optedge] (t1_w) -- (t2_ww) node[midway, above, sloped] {W (+3)}; \draw[ai] (t1_w) -- (t2_wa) node[midway, below, sloped, pos=0.3] {AI (+1)}; \draw[worker] (t1_a) -- (t2_aw) node[midway, above, sloped, pos=0.4] {W (+3)}; \draw[prunededge] (t1_a) -- (t2_aa) node[midway, below, sloped] {Violation}; % t2 -> t3 \draw[optedge] (t2_ww) -- (t3_www) node[midway, above, sloped] {W (+3)}; % --- DOMINANCE --- \draw[->, violet, thick] (t2_aw) -- (t2_wa) node[midway, right, align=left, font=\scriptsize, xshift=2mm] {\textbf{Dominance Check}}; % --- NOTES BEREICH UNTER DEM PLOT --- \node[align=left, text width=12cm, anchor=north west, font=\sffamily\small] at (-0.5, -5.5) { \textbf{Notes:}\\ }; \end{tikzpicture} \caption{Your caption here} \label{fig:your-label} \end{figure} \lipsum[2] \end{document}

  • How to remove line numbers in A&A template
    by Markus Schmassmann on December 12, 2025 at 10:56 am

    In earlier versions (verified with v9.1) of the Astronomy & Astrophysics template, it was possible to remove the line numbers by \documentclass[desactivate]{aa}. However, in the current version (9.3) this does not compile. How do I fix this. A current version of the template with a some content can be found on overleaf. A MWE is here: \documentclass{aa} \usepackage{lipsum} \begin{document} \title{Astronomy \& Astrophysics \LaTeX\ template} \author{M. Example\inst{1}} \institute{nowhere} \abstract{no context}{aimless}{stupid method}{without results}{or conclusions} \maketitle \lipsum[1] \end{document} Note that line numbers are only printed if \maketitle is present.

  • Simulating language-related OpenType font features
    by Apothikon on December 12, 2025 at 10:03 am

    In LuaLaTeX, is it possible to use babel (or anything else) to simulate some language-related OpenType features not defined in the font? I give an example of what I mean: Writing in ecclesiastical latin requires to put an acute accent on some vowels. On my Italian keyboard I've only the character é, thus typing á, í, ó, ú is quite inefficient. I would like to tell LaTeX that, inside an ecclesiasticallatin environment, whenever I type à, ì, ò, ù, it must be rendered as á, í, ó, ú. Thanks in advance.

  • Lyx: Two Table of Contents with Different Granularity Levels
    by texmex on December 12, 2025 at 9:53 am

    Please note, I am not a very advanced user of Lyx (or Latex). I am trying to accomplish the following when I export the PDF document from Lyx. I want to have two Table of Contents (TOC) in my document. The first TOC, named "Brief Contents" should have only the Sections and Parts. I know this can be done using: \setcounter{tocdepth}{0} and \addto\captionsenglish{% \renewcommand{\contentsname}{Brief Contents}% } Right after the first TOC I want a detailed TOC, named "Detailed Contents" with Sub-Sections also. The issue is adding this second TOC with a different tocdepth and name. I am not sure how to accomplish this in Lyx. I have spent a lot of time trying to various things. But I have not been able to do this. There is a crude solution that might work. Generate two PDFs each one with different \setcounter{tocdepth}{0} and combine them. But I am hoping there is a better solution than manually having to generate two PDFs and combine them. Related Questions Switching tocdepth in the middle of a document Creating a table of contents using \addcontentstline in LyX LyX - How to lower ToC depth of multiple entries Childish Downvote Behaviour Please note, anyone who downvoted the answer anonymously, kindly grow up. Explain why you did what you did. If not, do not engage in any activity since you are not contributing anything positive to the discussion. The answer given by Google AI works and solves the problem. So refrain from such behaviour. The question and the answer might be simple for you. But everything is simple when the steps and details are known. Please do not get carried away because you know a few extra details.

  • Draw line at right angle
    by user4035 on December 12, 2025 at 9:09 am

    Code: \documentclass[12pt]{standalone} \usepackage[utf8]{inputenc} \usepackage[english]{babel} \usepackage[T2A]{fontenc} \usepackage{tikz} \usetikzlibrary{shapes, positioning, decorations.pathreplacing,calc,arrows} \begin{document} \begin{tikzpicture} \tikzset{ node/.style={draw, rectangle, rounded corners}, } \node [node] (excursions) {excursions}; \node [node, below right = 2.5cm of excursions] (excursions_cities_from) {excursions\_cities\_from}; \node [node, right = 3.5cm of excursions] (currencies) {currencies}; \draw[->] (currencies.west) -- node [below] {(id, currency\_id)} (excursions.east); \draw[->] (currencies.south) -> node [right] {(id, currency\_id)} (excursions_cities_from.north); \end{tikzpicture} \end{document} Is it possible to move the line \draw[->] (currencies.south) -> node [right] {(id, currency\_id)} (excursions_cities_from.north); to the position, indicated with red line? How to calculate coordinate from currencies.south - down until to top line of excursions_cities_from where the red arrow ends?

  • fontsize package: weird behavior
    by Iacobus1983 on December 12, 2025 at 8:49 am

    I compile with LuaLaTeX this quite simple code: \documentclass[11pt]{article} \usepackage{fontspec} \setmainfont[RawFeature=+onum]{EBGaramond} \usepackage{fontsize} %\changefontsize[14.5pt]{10.9pt} \usepackage{lipsum} \begin{document} \lipsum \end{document} If I uncomment %\changefontsize[14.5pt]{10.9pt}, I'd expect the output to be slightly smaller; yet, in fact it's slightly larger. Without \changefontsize: With \changefontsize: Why? (I fear it's just some trivial oversight of mine...)

  • What is the minimum set of commands to compile a plain tex file with UTF-8 Chinese characters to PDF?
    by merlin2011 on December 12, 2025 at 4:42 am

    Consider the following minimum Tex example with Chinese characters: 你好 \bye I tried to compile it the traditional way, and it produces an blank document: tex Hello.tex dvipdf Hello.dvi I tried to compile it with xetex and get an error: sudo apt install texlive-xetex xetex Hello.tex This is XeTeX, Version 3.141592653-2.6-0.999995 (TeX Live 2023/Debian) (preloaded format=xetex) restricted \write18 enabled. kpathsea: Running mktexfmt xetex.fmt mktexfmt: mktexfmt is using the following fmtutil.cnf files (in precedence order): mktexfmt: /usr/share/texmf/web2c/fmtutil.cnf mktexfmt: /usr/share/texlive/texmf-dist/web2c/fmtutil.cnf mktexfmt: mktexfmt is using the following fmtutil.cnf file for writing changes: mktexfmt: /home/hq6/.texlive2023/texmf-config/web2c/fmtutil.cnf mktexfmt [INFO]: writing formats under /home/hq6/.texlive2023/texmf-var/web2c mktexfmt [INFO]: Did not find entry for byfmt=xetex skipped mktexfmt [INFO]: not selected formats: 8 mktexfmt [INFO]: total formats: 8 mktexfmt [INFO]: exiting with status 0 I can't find the format file `xetex.fmt'! I tried running the command suggested in a different question and it completed successfully, but I still get the same error: sudo fmtutil-sys --all ... ... 50 preloaded fonts No pages of output. Transcript written on dviluatex.log. fmtutil [INFO]: log file copied to: /var/lib/texmf/web2c/luatex/dviluatex.log fmtutil [INFO]: /var/lib/texmf/web2c/luatex/dviluatex.fmt installed. fmtutil [INFO]: successfully rebuilt formats: 8 fmtutil [INFO]: total formats: 8 fmtutil [INFO]: exiting with status 0 How might I fix this error and compile the UTF-8 to PDF?

  • Problem inputing a file into another with LuaLaTeX
    by Knudsen on December 12, 2025 at 2:55 am

    I am trying to write a macro to input a set of small text files into a larger file, in lualatex, but seeing some variances how the text is inserted in the main file. So far I prepared this: \documentclass[11pt]{report} \usepackage{amsthm} \usepackage{polyglossia} \setmainfont{STIX Two Text} \usepackage[ a4paper, margin=4cm, marginparwidth=50pt, ]{geometry} \newtheoremstyle{problemstyle}% name of the style to be used {\topsep}% measure of space to leave above the theorem. E.g.: 3pt {\topsep}% measure of space to leave below the theorem. E.g.: 3pt {}% name of font to use in the body of the theorem {0pt}% measure of space to indent {\bfseries}% name of head font {}% punctuation between head and body { }% space after theorem head; " " = normal interword space {\thmname{#1}\thmnumber{ #2}\textbf{\thmnote{ (#3)}}} \theoremstyle{problemstyle} \newtheorem{problema}{\textbf{Problem}}[section] \newcommand{\bp}[1]{\begin{problema}[#1] \input{#1} \label{#1}\end{problema}} \begin{document} \bp{Fa87}% \begin{problema}[Fa87] Prove that $\cos^p \theta \leq \cos p\theta$ for $0 \leq \theta \leq \pi /2$ and $0 < p < 1$. \end{problema} \begin{problema}[Fa87] Prove that $\cos^p \theta \leq \cos p\theta$ for $0 \leq \theta \leq \pi /2$ and $0 < p < 1$. \end{problema} \begin{problema}[Fa87] Prove that $\cos^p \theta \leq \cos p\theta$ for $0 \leq \theta \leq \pi /2$ and $0 < p < 1$. \end{problema} \end{document} ẁith the text of Fa87 to be exactly Prove that $\cos^p \theta \leq \cos p\theta$ for $0 \leq \theta \leq \pi /2$ and $0 < p < 1$. all of it to be processed with lualatex. The variance can be seen here: where the spacing after the entry that uses the command \bp is about twice as much as the spacing of all others, entered directly into the text. Observe that the text introduced by the command is exactly the same as the one directly in the main file. The problem seems to be related to the text getting closer to the end of the line, but I fail to gresp how to address it.

  • Tikz vertical multipart rectangle error
    by ozsu on December 12, 2025 at 1:55 am

    I am having a problem with a multipart rectangle. I give a MWE below. I understand that the max number of parts are limited to 20. Following this, I added definitions for twentyone (newbox\pgfnodeparttwentyonebox) and twentytwo (newbox\pgfnodeparttwentytwobox) and that works when the multipart rectangle is horizontal. But, when it is vertical, it does not show twentyfirst and twentysecond parts and the node height of twentieth entry is very high. Not sure how to fix this and would appreciate help \documentclass{standalone} \usepackage{tikz} \usetikzlibrary{shapes.multipart} \begin{document} \begin{tikzpicture} \newbox\pgfnodeparttwentyonebox \newbox\pgfnodeparttwentytwobox \node[ rectangle split, rectangle split parts=22, draw, align=center, rectangle split part fill={ green!50,green!50,green!50,green!50,green!50, % dict dates green!50,green!50,green!50,green!50,green!50,green!50, yellow,yellow,yellow,yellow,yellow, % bitmaps yellow,yellow, yellow,yellow,yellow,yellow,yellow } ] (recSt) {% % Dictionary (dates) \nodepart{one} {2005-11-01}% \nodepart{two} {1998-05-01}% \nodepart{three} {2009-04-22}% \nodepart{four} {1998-11-01}% \nodepart{five} {2010-05-01}% \nodepart{six} {2022-09-01}% \nodepart{seven} {2021-03-18}% \nodepart{eight} {2011-01-01}% \nodepart{nine} {0216-07-01}% \nodepart{ten}{2013-01-08}% \nodepart{eleven}{2017-10-10}% % Bitmaps (one-hot) \nodepart{twelve} {10000000000}% \nodepart{thirteen} {01000000000}% \nodepart{fourteen} {00100000000}% \nodepart{fifteen} {00010000000}% \nodepart{sixteen} {00001000000}% \nodepart{seventeen} {00000100000}% \nodepart{eighteen} {00000010000}% \nodepart{nineteen} {00000001000}% \nodepart{twenty}{00000000100}% \nodepart{twentyone}{00000000010}% \nodepart{twentytwo}{00000000001}% }; \end{tikzpicture} \end{document}

  • Handwriting-style fonts [duplicate]
    by Latexfan on December 11, 2025 at 8:47 pm

    how can I creat the text format like this picture. It is not "kalam" format. Can you please help me that it can be compiled with pdftex? This is french. I wish to write in norwegian Thank you

  • Multipart rectangle error
    by ozsu on December 11, 2025 at 8:28 pm

    I am having a problem with a multipart rectangle. I give a MWE below. At \nodepart{twentyone} {\scriptsize 00000000010}% and \nodepart{twentytwo} {\scriptsize 00000000001}% it complains error: 45: Missing number, treated as zero. \nodepart{twentyone} { Any reason? Is there a max limit on the boxes? \documentclass{standalone} \usepackage{tikz} \usetikzlibrary{shapes.multipart} \begin{document} \begin{tikzpicture} \node[ rectangle split, rectangle split horizontal, rectangle split parts=22, draw, minimum height=1cm, align=center, rectangle split part fill={ % --- FIX: Added commas before the % comments --- green!50,green!50,green!50,green!50,green!50,green!50, % dict dates green!50,green!50,green!50,green!50,green!50, % (11 parts) yellow,yellow,yellow,yellow,yellow,yellow, % bitmaps yellow,yellow,yellow,yellow,yellow,yellow % (11 parts) } ] (recSt) {% % Dictionary (dates) \nodepart{one} {\scriptsize 2005-11-01}% \nodepart{two} {\scriptsize 1998-05-01}% \nodepart{three} {\scriptsize 2009-04-22}% \nodepart{four} {\scriptsize 1998-11-01}% \nodepart{five} {\scriptsize 2010-05-01}% \nodepart{six} {\scriptsize 2022-09-01}% \nodepart{seven} {\scriptsize 2021-03-18}% \nodepart{eight} {\scriptsize 2011-01-01}% \nodepart{nine} {\scriptsize 0216-07-01}% \nodepart{ten} {\scriptsize 2013-01-08}% \nodepart{eleven} {\scriptsize 2017-10-10}% % Bitmaps (one-hot) \nodepart{twelve} {\scriptsize 10000000000}% \nodepart{thirteen} {\scriptsize 01000000000}% \nodepart{fourteen} {\scriptsize 00100000000}% \nodepart{fifteen} {\scriptsize 00010000000}% \nodepart{sixteen} {\scriptsize 00001000000}% \nodepart{seventeen} {\scriptsize 00000100000}% \nodepart{eighteen} {\scriptsize 00000010000}% \nodepart{nineteen} {\scriptsize 00000001000}% \nodepart{twenty} {\scriptsize 00000000100}% \nodepart{twentyone} {\scriptsize 00000000010}% \nodepart{twentytwo} {\scriptsize 00000000001}% }; \end{tikzpicture} \end{document}

  • Cannot get rid of "Label(s) may have changed" warning in a TikZ picture
    by pdini on December 11, 2025 at 7:04 pm

    I made partial progress on this question thanks to two answers to this question. The first answer, by David Carlisle, provides some very useful diagnostic code, which I used. The second answer, by Matthew Leingang, talks about a similar error to what I got involving TikZ and in particular pgfid*. The solution that worked for Leingang is not relevant to my code because I do not use \tkzstyle. Since I know next to nothing about TikZ and use it only occasionally, I am hoping someone can help me find the cause of the warning. It took me a while to isolate the problem in this code for a (rather odd-looking) table. The table is just showing two balance sheets, with nonsensical filler text. In this code example the arrows are not properly placed, but this is just because I am using a different class file. When using the class file of the journal this is supposed to go into the arrows come out fine (and, importantly, I get the same error). \documentclass[pdftex]{article} \usepackage{tikz} \usetikzlibrary{arrows,through} \usepackage{nicematrix} \usepackage{multirow,array} \usepackage{ragged2e,booktabs} \makeatletter \def\Cline#1#2{\@Cline#1#2\@nil} \def\@Cline#1-#2#3\@nil{% \omit \@multicnt#1% \advance\@multispan\m@ne \ifnum\@multicnt=\@ne\@firstofone{&\omit}\fi \@multicnt#2% \advance\@multicnt-#1% \advance\@multispan\@ne \leaders\hrule\@height#3\hfill \cr} \makeatother \newcolumntype{M}[1]{>{\Centering\arraybackslash}m{#1}} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%% This code by David Carlisle addresses the warning %%% 'Label(s) may have changed...' %%% It causes the specific labels causing the problem %%% to be output in the log file: \makeatletter \def\@testdef #1#2#3{ \def\reserved@a{#3}\expandafter \ifx \csname #1@#2\endcsname \reserved@a \else \typeout{^^Jlabel #2 changed:^^J% \meaning\reserved@a^^J% \expandafter\meaning\csname #1@#2\endcsname^^J}% \@tempswatrue \fi} \makeatother %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \begin{document} \renewcommand{\arraystretch}{1.2} \begin{table} \small \centering \begin{tabular}{wc{2.3cm} !{\vrule width 1pt} wc{2.3cm} M{2.5cm} wc{2.3cm} !{\vrule width 1pt} wc{2.3cm} } \multicolumn{2}{c}{}&&\multicolumn{2}{c}{}\\ \small{A} & \small{B} & & \small{C} & \small{D} \\ \Cline{1-2}{1pt}\Cline{4-5}{1pt} \tikz[remember picture]\node (AD) {\small{11111}}; \tikz[remember picture]\node (X) {\small{22222}}; & \tikz[remember picture]\node (LD) {\small{33333}}; \tikz[remember picture]\node (X) {\small{44444}}; & & \tikz[remember picture]\node (X) {\small{11111}}; \tikz[remember picture]\node (AC) {\small{22222}}; & \tikz[remember picture]\node (X) {\small{33333}}; \tikz[remember picture]\node (LC) {\small{44444}}; \\ \tikz[remember picture]\node (AD) {$+\qquad$ }; \tikz[remember picture]\node (X) {$-$}; & \tikz[remember picture]\node (LD) {$-\qquad$}; \tikz[remember picture]\node (X) {$+$}; & & \tikz[remember picture]\node (X) {$+\qquad$}; \tikz[remember picture]\node (AC) {$-$}; & \tikz[remember picture]\node (X) {$-\qquad$}; \tikz[remember picture]\node (LC) {$+$}; \end{tabular} \begin{tikzpicture}[remember picture, ->, >=stealth', shorten >= -0.3cm, shorten <= -0.3cm, line width=1pt, auto] \draw[thick, draw=black, bend right=15] (LD) to (AC); \draw[dotted, draw=black, bend right=20] (AD) to (LC); \end{tikzpicture} \caption{This is the table caption} \label{tab:table1} \end{table} \end{document} Any help debugging this code is much appreciated.

  • Theorem numbers in smallcaps
    by xryophile on December 11, 2025 at 6:04 pm

    I have sectioning elements in my documents in bold smallcaps of various sizes. I was hoping to be able to achieve this with my theorems, remarks, etc. as well. However, while this works for the labels (i.e. "Theorem", "Definition", etc.) for some reason the numbers remain in upshape (although they are bolded). Is there some way to "smallcap" the number too? Here is a minimal (not) working example: \documentclass{article} \usepackage{tgpagella} % Need a font with scshape \usepackage{amsthm,thmtools} \declaretheoremstyle[ headfont=\scshape\normalsize\bfseries, ]{definition} \declaretheorem[style=definition] {definition} \begin{document} \setcounter{definition}{2} % Difference is clear with 3 \begin{definition} Number is bold, but not \\smallcaps. Bold \emph{and} small caps: \textbf{\textsc{3}}. \end{definition} \end{document} The result is N.B. I've tried using the headformat key of declaretheoremstyle too, passing things like \textsc{\NUMBER}, but this doesn't seem to help. [Although it does work with \NAME.] N.B.B. I'm using thmtools for reasons I've omitted from this MWE, so if an answer is possible within the framework of this package that would be excellent. Of course, if it can be done internally in amsthm or ntheorem that would be fine too. On the other hand, even though it may be possible to simply write a whole theorem environment from scratch, I'm not at this point inclined to fix this (minor) issue in this way.

  • Fit brackets around a fraction expression
    by category on December 11, 2025 at 5:55 pm

    The following code: \{ \frac{m}{n} \} creates a fraction that is larger than the brackets: how do I fit the fraction inside the brackets?

  • which combinations of standards PDF/A, X, UA are valid
    by user2609605 on December 10, 2025 at 11:24 pm

    This question comes from the fact, that norms are quite expensive, except PDF/UA-1/2 normed as ISO 14289-1/2 which i read. Extrapolating a bit, what I read in Section 5 and 6 to the other norms, it seems as if the entries in xmp data setting up the claim, i.e. for example that it is UA-2 or A-2b is a prerequisite for satisfying UA-2 or A-2b or whatsoever, although not a sufficient condition of course. But this means that at most one of the PDA/A norms can be satisfied. Likewise for PDF/X and for PDF/UA. But on the other hand, a single document may well be conform to one two or all three norms out of the families PDF/A,X,UA. Is this correct? I tried to specify two norms out of one family in \DocumentMetadata, e.g. \DocumentMetadata{pdfstandard=a-2a,pdfstandard=a-2b} then seemingly the later overwrites the former. Is this correct? I am aware that 2a is more restrictive than 2b. I am just interested how latex resolves the situation. Also i write a build tool and I want to have overview which situations emit a warning ... because the setting is for sure erroneous.

  • Gradients in TikZ
    by karlh on December 10, 2025 at 3:53 am

    Based on the documentation, I would expect the two rectangles generated by this code to look identical: \documentclass{article} \usepackage{tikz} \begin{document} \pgfdeclarehorizontalshading{myshadingA} {1cm}{rgb(0cm)=(1,0,0); color(2cm)=(green); color(4cm)=(blue)} \begin{tikzpicture} \pgfuseshading{myshadingA} \shade [shading=myshadingA] (-2,-1) rectangle (2,-3); \end{tikzpicture} \end{document} However, this is clearly not the case. What am I doing wrong and/or misinterpreting in the documentation?

  • How to layout the two-side notes using Latex
    by xuehao on December 8, 2025 at 4:49 am

    The following is an example from an English book. I'm planning to rewrite it in latex. The layout is with an itemize of points in the middle, and with "CONNECTIONS" notes along the two sides. I tried to solve it using TikZ, but the vertical align is hard to control. \documentclass{article} \usepackage{graphicx} % Required for inserting images \usepackage{tikz} \begin{document} \begin{center} \begin{tikzpicture} \node[draw,text width=3.1cm] at (0cm,0) {CONNECTIONS Because \\ \vspace{\baselineskip} It \\ and \\ Though \\ Since ... not \\ only \\ but also \vspace{\baselineskip} }; \node[draw,text width=6.3cm] at (5.1cm,0) {\begin{center} POINTS \end{center} 1. Brazil needs to be developed. \\ 2. New city, Brasilia, built 600 miles, Rio. \\ 3. Designed Lucio Costa. \\ 4. Became capital 1960. \\ 5. Planned for modern living. \\ 6. People at first reluctant to go. \\ 7. 1960 - population increasing. \\ 8. Established as capital. }; \node[draw,text width=3.1cm] at (10.2cm,0) {CONNECTIONS \vspace{\baselineskip} which was built \\ and which \\ \vspace{\baselineskip} It \\ but \\ However, with the increase }; \end{tikzpicture} \end{center} \end{document} Anyone could give me any clever solution for this task?

  • Drawing a sphere and ellipsoid together
    by Knudsen on December 8, 2025 at 4:00 am

    I would like to draw a sphere, of radius 3, and an ellipsoid of semi-axis 2, 3 and 4 together. They intersect at two great circles on the sphere (marked in red). I started out with the sphere and the great circles: \documentclass[border=2mm]{standalone} \usepackage{tikz} \usetikzlibrary{3dtools}% https://github.com/marmotghost/tikz-3dtools \begin{document} \begin{tikzpicture}[3d/install view={phi=120,theta=70},line cap=butt, line join=round,declare function={R=3;},c/.style={circle,fill,inner sep=1pt}] \path (0,0,0) coordinate (O) ; \draw[blue,3d/screen coords] (O) circle[radius=R]; \shade[ball color=white,3d/screen coords,opacity=0.7] (O) circle[radius=R]; % \shade[ball color=blue!30,3d/screen coords,opacity=0.7,xscale=2,yscale=3,zscale=4] (O) circle[radius=1]; \path pic[blue]{3d/circle on sphere={R=R,C={(O)}}}; \path pic[red]{3d/circle on sphere={R=R, n={(0.592,0,-1)}}}; % plane x = sqrt{7/10) z \path pic[red]{3d/circle on sphere={R=R, n={(0.592,0,1)}}}; % plane x = sqrt{7/10) z \draw[3d/hidden] (0,0,0) -- (0,0,R) (O)--(R,0,0) (O)--(0,R,0) (O)--(0,-R,0); \draw[3d/visible, -stealth] (R,0,0) -- (R + 4,0,0) node[below]{$x$}; \draw[3d/visible, -stealth] (0,R,0) -- (0,R + 1,0) node[right]{$y$}; \draw[3d/visible, -stealth] (0,0,R) -- (0,0,R + 1.5) node[above]{$z$}; \end{tikzpicture} \end{document} and everything is right so far: but when I remove the comment on the line that I would expect to draw the ellipsoid \shade[ball color=blue!30,3d/screen coords,opacity=0.7,xscale=2,yscale=3,zscale=4] (O) circle[radius=1]; I get something that is far from what I expected, including the fact that the zscale is not understood. How can one add the intersecting elipsoide to this image?