• Make Ipe use local LaTeX document formatting
    by yms on November 24, 2025 at 9:36 pm

    I'm trying to export an Ipe figure so that whatever math in the figure will use the font in my document. Here is my preamble: \documentclass{amsart} \usepackage{comment} \usepackage{tgtermes} \usepackage{newtxmath} \usepackage[usenames,dvipsnames]{color} \usepackage[normalem]{ulem} \usepackage{url} \usepackage{graphicx} \usepackage{float, caption} \usepackage{enumerate} \usepackage{hyperref} and here is how I'm attaching a figure: \begin{figure} \centering \includegraphics[width=0.7\linewidth]{graphics/figure1.eps} \end{figure} On the IPE figure I'm using the math mode to attach text, should I be putting raw LaTeX code instead? Thanks in advance for the help.

  • Problem finding texlive in TeXworks
    by Greg Bennett on November 24, 2025 at 8:51 pm

    I have a new install of texlive 2025 and a new install of TeXworks 0.6.8("Debian") No complaints in the log of either. They cannot find one another (yet). I made a small file in my home directory, opened it in TeXworks, hit the green arrow and received only Console output: This is pdfTeX, Version 3.141592653-2.6-1.40.25 (TeX Live 2023/Debian) (preloaded format=pdflatex) {This suggests that the TeXlive installation has been found} kpathsea: Running mktexfmt pdflatex.fmt mktexfmt: No such file or directory I can't find the format file `pdflatex.fmt'! Why, I wonder, is mktexfmt being called .. texlive made the formats during installation as fat as I can see: Looking in TeXworks.conf the binary paths are: binaryPaths=/usr/bin, /usr/local/sbin, /usr/local/bin, /usr/sbin, /sbin, /bin, /usr/games, /usr/local/games, /usr/local/texlive/2025/bin/x86_64-linux, /usr/local/texlive/2025/texmf-var/web2c/pdftex In the last element is the file pdflatex.fmt ! How do I make sure that TeXworks does find things in what seems to be its own search paths ? Thanks for advice/assistance Greg Bennett

  • cleveref cannot deal with figures under tufte classes and amsmath
    by Máté Wierdl on November 24, 2025 at 6:56 pm

    In a document where I reference a figure using cleveref, incorrect name and counter are used, namely the name used is section and the counter is the surrounding section's counter. This happens when I use either of the tufte classes and load amsmath. If I load the article class instead, the problem disappears. If I use a tufte class but not amsmath, again the problem disappears. I am using texlive 2025. I add that the same error is present when I reference a table. In the example below, I inserted a \newpage so that clicking on the figure reference, we can see that we jump to the section starting on the previous page. % \documentclass{article} \documentclass{tufte-handout} \usepackage{amsmath} \usepackage[nameinlink]{cleveref} \setcounter{secnumdepth}{2} \begin{document} \section{Cleveref test} \label{sec:cleveref-test} \subsection{The line} \label{sec:line} \newpage \Cref{fig:try} shows a line. \begin{figure} \caption{The line} \hbox to 5cm{\hrulefill} \label{fig:try} \end{figure} \end{document}

  • Inaccurate TikZ/PGF plot
    by Dominique on November 24, 2025 at 6:31 pm

    I'm using the following code to produce a plot: \documentclass{standalone} \usepackage{tikz} \usepackage{pgfplots} \begin{document} \begin{tikzpicture} \begin{axis}[ width = 15cm, xtick = {0, 1, 2, 3, 4, 5}, ] \addplot[black, thick, smooth, domain=0:5] {exp(-100 * \x) + sin(\x)}; \addplot[blue, thick, smooth] table {stiff.dat}; \end{axis} \end{tikzpicture} \end{document} It produces the following plot: Here, the blue curve plots data points generated with Matlab for the same function. The blue curve is correct, but the black one is not. It seems TikZ is not able to plot the function accurately. I've read on this forum about this issue and I tried a few things: \ustikzlibrary{fpu}: did not help; that may be because the PFU is limited to 4-5 digits \usepackage{xfp}: I could not get this to work and kept getting an error with \fpeval \usepackage{expl3}: same. I must be doing something wrong. What is the correct incantation here? I would rather not resort to compiling with Lua because my document is part of series that all compile fine with PDFLaTeX. Thank you in advance!

  • circuitikz: Rename self-drawn 'bipole symbol'
    by cis on November 24, 2025 at 4:46 pm

    I drew a new bipol-symbol (which is similar to a capacitor from pgfcircbipoles.tex) and I want to be able to say \draw[] (0,0) to[newname] (2,0) to[vC] (4,0); instead of \draw[] (0,0) to[capacitor] (2,0) to[vC] (4,0); I thought I could do the same trick as here. Simply "search and replace" doesn't work. What do I have to do? %\documentclass[a4paper]{article} \documentclass[margin=5pt]{standalone} \usepackage{circuitikz} \makeatletter %% Normaly-Open-Contact Dipol Symbol ============ \ctikzset{bipoles/capacitor/height/.initial=0.35}% default 0.6 \ctikzset{bipoles/capacitor/width/.initial=0.3}% default 0.2 \pgfcircdeclarebipolescaled{capacitors} {} {\ctikzvalof{bipoles/capacitor/height}} {capacitor} {\ctikzvalof{bipoles/capacitor/height}} {\ctikzvalof{bipoles/capacitor/width}} { \pgfcirc@maybe@fill@straight@capacitor \pgf@circ@setlinewidth{bipoles}{\pgfstartlinewidth} \pgfpathmoveto{\pgfpoint{2\pgf@circ@res@left}{\pgf@circ@res@up}} \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}} \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@down}} \pgfpathlineto{\pgfpoint{2\pgf@circ@res@left}{\pgf@circ@res@down}} \pgfpathmoveto{\pgfpoint{2\pgf@circ@res@right}{\pgf@circ@res@up}} \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}} \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}} \pgfpathlineto{\pgfpoint{2\pgf@circ@res@right}{\pgf@circ@res@down}} \pgfusepath{draw} } \pgfcirc@activate@bipole@simple{l}{capacitor} %% ============================= \makeatother \begin{document} \begin{circuitikz}[] \draw[] (0,0) to[capacitor] (2,0) to[vC] (4,0); \end{circuitikz} \end{document}

  • Why doesn’t LyX export in any format, or implement commands to remove a linespace between the footnote number and the actual footnote?
    by Mulder on November 24, 2025 at 4:28 pm

    I’ve got a document that is just about done, complete with footnotes. But despite inserting the code to supposedly remove the linespace between the footnote number and the actual footnote, it has no effect. To make matters worse, I can’t export the file in any format — the only error message I get is “Don’t know how to export to format: latex,” which tells me nothing. I can compile and preview my document just fine, but the code to solve the footnotes problem has no effect on the preview, so it isn’t working. BasicTeX 2025 is installed, just as the LyX web site stated. This is running on macOS 15.7.1. How can I solve both problems?

  • What is "% !TEX TS-program = lualatex" and "who" cares? [duplicate]
    by Steven Thomas Hatton on November 24, 2025 at 2:14 pm

    In this community I was recently presented with a preamble beginning with% !TEX TS-program = lualatex which I vaguely recall having the generic designation of "magic". A bash file typically begins with #!/bin/bash which, among other things, tells the execution environment where to find the bash executable. In the file grok-fail.txt with the content: \documentclass[a4paper,12pt,leqno]{book} \usepackage[margin=1in]{geometry} \usepackage[italian]{babel} \usepackage{fontspec} \usepackage{amsmath} file grok-fail.txt returns grok-fail.txt: LaTeX 2e document, ASCII text same filename with #!/bin/bash \documentclass[a4paper,12pt,leqno]{book} \usepackage[margin=1in]{geometry} \usepackage[italian]{babel} \usepackage{fontspec} \usepackage{amsmath} file grok-fail.txt returns grok-fail.txt: Bourne-Again shell script, ASCII text executable With the content: % !TEX TS-program = lualatex #!/bin/bash \documentclass[a4paper,12pt,leqno]{book} \usepackage[margin=1in]{geometry} \usepackage[italian]{babel} \usepackage{fontspec} \usepackage{amsmath} file grok-fail.txt returns grok-fail.txt: LaTeX 2e document, ASCII text as it did in the first example. It's helpful to us mere humans to be able to read TS-program = lualatex. But is there an expectation that a computer program will read this string and use it to determine which program to compile the content with? I ask, in particular, because I would like Kile to read that string with understanding. Alas I am forced to intervene upon first "live preview" compilation. So what's % !TEX TS-program = lualatex all about?

  • Add a DPDT switch
    by Nicolas on November 24, 2025 at 1:55 pm

    I've diagrammed the charging and discharging of a capacitor. \documentclass[border = 1mm]{standalone} \usepackage[utf8]{inputenc} \usepackage{siunitx} \usepackage[european, straightvoltages, RPvoltages]{circuitikz} \usetikzlibrary{babel} \begin{document} \begin{circuitikz} \draw (0,0) node[spdt,rotate=90,anchor=in] (Sw) {} (Sw.in)--++(0,-1) coordinate(RC) --++(1,0) to[R] ++(0,-1.5) to [leDo]++(0,-1.5) --++(-1,0) (RC)--++(-1,0) to[capacitor]++(0,-3)--++(1,0) (RC)--++(1,0) to[R] ++(0,-1.5) to [leDo]++(0,-1.5) coordinate (basRC) ($(basRC)+(-1,0)$) --++(0,-1) node[ground](GND){} (Sw.out 1) to[R] ++(-2,0) to[leDo, invert, mirror] ++(-2,0) coordinate(posSource) to [vsource] (posSource|-GND) --(GND) (Sw.out 2) --++(3,0) coordinate (posMoteur) to [Telmech=M,n=motor] (posMoteur|-GND)--(GND); \end{circuitikz} \end{document} For the discharge, I'd like to add a DPDT switch (and an LED + protection resistor in the corresponding loop) to be able to change the motor's direction of rotation: I haven't found anything about this in the documentation.

  • Fallback font - LuaLaTeX
    by GowriSaro on November 24, 2025 at 1:43 pm

    MWE is: \documentclass{article} \usepackage{amsfonts,amsmath,amssymb} \usepackage{fontspec} \directlua {luaotfload.add_fallback ("myfallback", { "MinionPro-Regular.otf:mode=harf", } ) } \directlua {luaotfload.add_fallback ("mysansfallback", { "Open Sans:mode=harf", } ) } \setmainfont[RawFeature={fallback=myfallback},Ligatures=TeX,% UprightFont= GentiumPlus-R.ttf, ItalicFont = GentiumPlus-I.ttf,%AutoFakeBold=2.5% BoldFont = GentiumPlus-Bold.ttf,% BoldItalicFont = GentiumPlus-BoldItalic.ttf, ]{GentiumPlus}%% \setsansfont[RawFeature={fallback=mysansfallback},Ligatures=TeX, UprightFont= GillSansStd.otf, ItalicFont = GillSansStd-Italic.otf, BoldFont = GillSansStd-Bold.otf, BoldItalicFont = GillSansStd-BoldItalic.otf]{GillSansStd}% %%%Primary alternative font \newfontfamily\primaryalternat[UprightFont= MinionPro-Regular.otf,ItalicFont = MinionPro-It.otf,BoldFont = MinionPro-Bold.otf,BoldItalicFont = MinionPro-BoldIt.otf]{MinionPro}%% %%%Secondary alternative font \newfontfamily\secondaryalternat[Ligatures=TeX, UprightFont= SourceSansPro-Regular.otf,ItalicFont = SourceSansPro-It.otf, BoldFont = SourceSansPro-Bold.otf, BoldItalicFont = SourceSansPro-BoldIt.otf,]{SourceSansPro}% \begin{document} \def\mytest#1#2{\hbox to 50pt{#1\hfill\symbol{"#1}}\par\addvspace{6pt}} \parindent0pt {\protect\mytest{0104}{}}%%the letter Ą {\protect\mytest{092E}{}}%%the Devanagari letter 'म {\sffamily {\protect\mytest{0104}{}} {\protect\mytest{092E}{}} } \end{document} Above code works without error, but in .log file, showed that luaotfload | cache : Lookup cache loaded from C:/Users/cm30132/.texlive2024/texm f-var/luatex-cache/generic/names/luaotfload-lookup-cache.luc. luaotfload | db : Reload initiated (formats: otf,ttf,ttc); reason: Font "MinionPro-Regular.otf" not found. Kindly advise how to fix this or shall I ignore this, as I'm new to Lua code.

  • How does autoinst use my provided encoding file?
    by TobiBS on November 24, 2025 at 12:46 pm

    I want to modify T1 encoding in two characters to fix the issue I described in How can I make sure characters 157 and 158 are populated with autoinst? So what I did is I copied the fontools_t1.enc, renamed to t1.enc and put it in the folder from which I run autoinst. However the output encodings do neither use the fontools_t1.enc nor the t1.enc data in the ouput encoding. So the encoding I want for 0x98 should read: % 0x98 /Ydieresis /Zacute /Zcaron /Zdotaccent /IJ /uni0130 /uni0111 /section But instead it reads /Ydieresis /Zacute /Zcaron /Zdotaccent /IJ /Idot /dmacron /section while the original fontools_t1.enc reads: % 0x98 /Ydieresis /Zacute /Zcaron /Zdotaccent /IJ /Idotaccent /dbar /section Any idea where autoinst takes this from?

  • Using reledmac, How to change line numbers passed to critical notes so that the subline is referred to by a letter instead of a number?
    by Paul on November 24, 2025 at 11:38 am

    I am editing a Sanskrit text, and the convention in Sanskrit is to refer to text in verse by verse-number followed by verse-quarter, the latter being referred to by a letter from "a" to "d". For example, to refer to the second quarter of the first verse of a text, one would write 1b, and for the third quarter of the fourth verse, 4c, etc. I can get reledmac to refer to verse-quarters in the critical footnotes by using the \linenum command, with the number for the line referring to the verse-number, and the number for the sub-line referring to the verse-quarter, e.g. \linenum{|1|2||1|2} and \linenum{|4|3||4|3} would give "1.2" and "4.3" respectively. However, I would like to stick to the convention of referring to Sanskrit verses, such that I would get "1b" and "4c." To get this result I would have to remove the period between the line number and sub-line number as well. MWE: \documentclass{article} \usepackage{reledmac} \begin{document} \setstanzaindents{0,0,0,0,0} \beginnumbering \stanza First half-line of verse, and then the \edtext{second}{\linenum{|1|2||1|2}\Afootnote{next A.}}; & Now the first and second halves of the second line. \& \endnumbering \end{document}

  • LaTeX "minted" is not working with MikTeX, Win10
    by J AK on November 24, 2025 at 11:29 am

    I want to submit a paper in e-informatica, so I am using their file, which is available here. But without any change, their file is not working. It generates the error Error message: minted v3+ executable is not installed or is not added to PATH with two other errors. I have uninstalled and reinstalled the package, and I have also already tried pdflatex --shell-escape your_document.tex pip install minted Please guide how I can fix this.

  • \setmainfont (missing characters) vs \babelfont (not all settings available)
    by Denis Bitouzé on November 24, 2025 at 11:15 am

    (Disclaimer: if I am not mistaken, this question incidentally concerns transliteration of Sanskrit, but I know nothing about that language.) The following MCE: \documentclass{article} \usepackage{fontspec} \usepackage{babel} \setmainfont{texgyrepagella}[ Extension =.otf, UprightFont = *-regular, BoldFont = *-bold, ItalicFont = *-italic, BoldItalicFont = *-boldItalic, Numbers = OldStyle, ] % \babelfont{rm}[Language=Default]{texgyrepagella} \begin{document} \foreignlanguage{sanskrit}{haṁsamukhī} \end{document} (run with lualatex) doesn't work well: Missing character: There is no ṁ (U+1E41) in font [texgyrepagella-regular.otf ]:mode=node;script=latn;language=dflt;+tlig;+onum;! If the line: % \babelfont{rm}[Language=Default]{texgyrepagella} is uncommented, it works nicely and still works nicely if in addition the \setmainfont command is commented. Hence I would be inclined to just rely on: \babelfont{rm}[Language=Default]{texgyrepagella} but, AFAICS, I would then be unable to adjust the settings precisely (e.g. Numbers = OldStyle). So what would be the right way to both: not have missing characters, be able to adjust the settings of the font precisely? Is it safe to keep both \setmainfont and \babelfont?

  • Self-pointing arrows with tikz-cd
    by Jinwen on November 24, 2025 at 11:10 am

    I am trying to adapt this answer to type a bitorsor structure with tikz-cd. What I am getting so far is: My questions are: How to change the direction of the arrows on the right? I tried to switch the start angle and end angle, but this does not do what I expected. How to properly change the relative position of the arrow? I am writing things like ($(\tikztostart.south)-(1em,0)$) which works but seems rather unnatural. How to properly change the size of the opening of the arrow? On the right diagram I changed the factor 0.5 to 0.3, but somehow the vertical position is shifted. Below is a MWE. \documentclass{article} \usepackage{amssymb} \usepackage{tikz-cd} \usetikzlibrary{calc} \begin{document} \[ \begin{tikzcd} B & C \arrow[from=1-1, to=1-2] \arrow["\displaystyle\mathtt{L}","\mathstrut"{name=0, anchor=center, inner sep=0}, from=1-1, to=1-1, to path={let \p1=($(\tikztostart.north)-(\tikztostart.south)$),\n1={scalar(asin(0.5*\y1/1.5em))} in ($(\tikztostart.south)-(1em,0)$) arc[start angle=-\n1,end angle=-360+\n1,radius=1.5em]\tikztonodes (\tikztotarget)}] \arrow["\displaystyle\mathtt{R}","\mathstrut"{name=1, anchor=center, inner sep=0}, from=1-2, to=1-2, to path={let \p1=($(\tikztostart.north)-(\tikztostart.south)$),\n1={scalar(asin(0.5*\y1/1.5em))} in ($(\tikztostart.north)+(1em,0)$) arc[start angle=180-\n1,end angle=-180+\n1,radius=1.5em]\tikztonodes (\tikztotarget)}] \end{tikzcd} \qquad \leadsto \qquad \begin{tikzcd} {A} \arrow["\displaystyle\mathtt{L}","\mathstrut"{name=0, anchor=center, inner sep=0}, from=1-1, to=1-1, to path={let \p1=($(\tikztostart.north)-(\tikztostart.south)$),\n1={scalar(asin(0.3*\y1/1em))} in ($(\tikztostart.south)-(1em,0)$) arc[start angle=-\n1,end angle=-360+\n1,radius=1em]\tikztonodes (\tikztotarget)}] \arrow["\displaystyle\mathtt{R}","\mathstrut"{name=1, anchor=center, inner sep=0}, from=1-1, to=1-1, to path={let \p1=($(\tikztostart.north)-(\tikztostart.south)$),\n1={scalar(asin(0.3*\y1/1em))} in ($(\tikztostart.north)+(1em,0)$) arc[start angle=180-\n1,end angle=-180+\n1,radius=1em]\tikztonodes (\tikztotarget)}] \end{tikzcd} \] \end{document}

  • tl_2025 and tl_basic_2025 in cygwin
    by Angela on November 24, 2025 at 10:11 am

    I've been using texLive in Cygwin for many years. Now, when I upgraded my texlive to the latest version, I see that there is no tl_2025 or tl_basic_2025 available in cygwin. TexLive does not install. I'm unable to use latex or pdflatex Does anyone know what I need to do?

  • In-text floats vs bottom floats: how to get consistent spacing?
    by Bastien on November 24, 2025 at 9:46 am

    Since the 2025-06-01 LaTeX kernel update, the new socket build/column/baselineattach lets us attach bottom floats using the baseline of the last text line. With \AssignSocketPlug{build/column/baselineattach}{on}, \textfloatsep is now added from the baseline and descenders in the last line no longer affect the spacing. However, \intextsep is still measured from the depth of the last line, not from the baseline. So the vertical space above an h-float changes depending on whether the previous line contains descenders. This produces inconsistent spacing between h-floats and b-floats. In the example image below, the spacing between a paragraph without descenders and an in-text float is 4.25 mm, while with a descender in the last line it becomes 4.94 mm. In contrast, the spacing to a b-float (which uses \textfloatsep and is affected by the socket baselineattach) matches the first value (within measurement uncertainty), confirming that only \intextsep still behaves differently. Is it possible to patch the output routine so that \intextsep behaves like \textfloatsep, i.e., is also attached to the baseline? I attempted to patch the output routine command \@addtocurcol directly by inserting a negative space equal to \theprevdepth, but this failed with compilation errors — presumably because \theprevdepth is not available at that point in the output routine. Here is a MWE : \documentclass{article} \setlength{\textfloatsep}{\intextsep} \AssignSocketPlug{build/column/baselineattach}{on} \AssignSocketPlug{build/column/outputbox}{floats-space-footnotes} \raggedbottom \begin{document} Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut purus elit, vestibulum ut, placerat ac, adipiscing vitae, felis. Curabitur dictum gravida mauris. Nam arcu libero, nonummy eget, consectetuer id, vulputate a, magna. Donec vehicula augue eu neque. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Mauris ut leo. Cras viverra metus rhoncus sem. Nulla et lectus vestibulum urna fringilla ultrices. Phasellus eu tellus sit amet tortor gravida placerat. Integer sapien est, iaculis in, pretium quis, viverra ac, nunc. Praesent eget sem vel leo ultrices bibendum. Aenean faucibus. \begin{figure}[h] \rule{\textwidth}{2cm} \end{figure} Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut purus elit, vestibulum ut, placerat ac, adipiscing vitae, felis. Curabitur dictum gravida mauris. Nam arcu libero, nonummy eget, consectetuer id, vulputate a, magna. Donec vehicula augue eu neque. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Mauris ut leo. Cras viverra metus rhoncus sem. Nulla et lectus vestibulum urna fringilla ultrices. Phasellus eu tellus sit amet tortor gravida placerat. Integer sapien est, iaculis in, pretium quis, viverra ac, nunc. Praesent eget sem vel leo ultrices bibendum. Aenean faucibus. Morbi dolor nulla, malesuada eu, pulvinar at, mollis ac, nulla. Curabitur auctor semper nulla. Donec varius orci eget risus. Duis nibh mi, congue eu, accumsan eleifend, sagittis quis, diam. Ut purus elit, vestibulum ut, placerat ac, adipiscing vitae, felis. \begin{figure}[h] \rule{\textwidth}{2cm} \end{figure} Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut purus elit, vestibulum ut, placerat ac, adipiscing vitae, felis. Curabitur dictum gravida mauris. Nam arcu libero, nonummy eget, consectetuer id, vulputate a, magna. Donec vehicula augue eu neque. \begin{figure}[b] \rule{\textwidth}{2cm} \end{figure} \end{document}

  • Why do expl3 setting commands use \edef?
    by jlab on November 24, 2025 at 9:21 am

    Looking at the definition of \tl_set:Nn (for example, with latexdef \tl_set:Nn), we find \tl_set:Nn: \protected\long macro:#1#2->\__kernel_tl_set:Nx #1{\__kernel_exp_not:w {#2}} where \__kernel_tl_set:Nx is simply \edef; and \__kernel_exp_not:w is \unexpanded. So, \tl_set:Nn \l_my_tl {...} means \edef \l_my_tl {\unexpanded {...}} that is to say: \edef requests for the expansion of the macro definition, but this expansion is prevented by \unexpanded. I'm curious, why not using instead \def \l_my_tl {...} ?

  • How can I define custom footnote links that respect duplicates, and store the pages they appear on?
    by womble on November 24, 2025 at 9:20 am

    I would like to implement commands for referencing requirements in a technical report. The goal is to streamline referencing requirements in the text as they are discussed, and automatically keep track of locations with links to make it easy for a reader to cross reference requirements between the body text and a post-text table of requirements while reading. There should be three commands: \makerequirement{ID}: Used in the table of requirements at the bottom of the report. Should take the requirement ID (eg. SYS_PWR 2.1), print it, make a label for future use, and place a hypertarget for linking. \refreq{ID}: for use in the body of the text. Will take the ID, and make a footnote with the ID that links to the requirement in the post-text table. If this ID has already been referenced on this page, it will reuse the same marker (so one page doesn't have many identical footnotes). \printrequirementrefs{ID}: For use in the table of requirements. Will print a list of page numbers that this ID appears on, and clicking each page number jumps to the page (so each page needs an anchor somewhere). I expected the implementation to follow this order of operations: All valid requirements are instantiated with \makerequirement at the bottom of the document. In text, \refreq{ID} is called on a page. If this ID has already been referenced on this page, fetch and place the correct footnote marker and move on. If it has not: make the footnote, store a label of some kind so the marker can be used again, set the state to show that this ID has been called, store this page that the ID was called on in a dictionary for \printrequirementrefs The page changes, and the list of used IDs is cleared. Repeat (2) for this page. \printrequirementrefs{ID} is called in the table for each ID, and the list of saved page numbers is iterated through and printed. \refreq will ideally respect the regular footnote numbers, so increment the same counter that any other footnote would. MWE The closest I was able to get to something functional (ie. it compiles) was this: \documentclass[12pt]{article} \usepackage{hyperref} % necessary for links \usepackage{atbegshi} % for clearing state \usepackage{etoolbox} % for logic % instantiate requirement and link target \newcommand*{\makerequirement}[1]{ \hypertarget{reqtarget:#1}{#1} \label{req:#1} } % used to repeat references to existing footnotes \makeatletter \newcommand\footnoteref[1]{\protected@xdef\@thefnmark{\ref{#1}}\@footnotemark} \makeatother \makeatletter \gdef\reqsOnPage{} % requirements referenced on this page \AtBeginShipoutFirst{\gdef\reqsOnPage{}} % clear on new page % custom command to check if a requirement is in state \newcommand*{\IfReqIn}[4]{% \edef\x{\noexpand\in@{,#1,}{,#2,}}\x% \ifin@ \expandafter\@firstoftwo \else \expandafter\@secondoftwo \fi {#3}{#4}% } \newcommand*{\refreq}[1]{% \IfReqIn{#1}{\reqsOnPage}% if footnote exists {% \footnoteref{reqfn:#1}% place the same marker }% {% \appto{\reqsOnPage}{#1,}% else add it to the list \footnote{% make the footnote \label{reqfn:#1}% \protect\hyperlink{reqtarget:#1}{#1} }% }% }% \makeatother \newcommand*{\printrequirementrefs}[1]{ % ?? #1 } \begin{document} I have just spoken about how I met requirement\refreq{foo} one, and this places the first footnote correctly. Here is some text\footnote{with a regular footnote}. And now there is the second requirement\refreq{bar}, which works, too. And this\refreq{foo} is the first one again, but it references the next occurrence (6) of this ID. \clearpage I am now talking about the second\refreq{bar} requirement, and again\refreq{bar} on the next page which works. And\footnote{generic footnote} the first\refreq{foo} one again, which also works. \clearpage The first\refreq{foo} one again, now broken again! \clearpage \begin{table}[h] \centering \begin{tabular}{*{3}{|l}|} \hline \textbf{ID} & \textbf{Description} & \textbf{References} \\ \hline \makerequirement{foo} & This is a sample requirement & \printrequirementrefs{foo} \\ \makerequirement{bar} & Another one! & \printrequirementrefs{bar} \\ \hline \end{tabular} \end{table} \end{document} The \footnoteref is courtesy of this post. The second page of output works as I need, but the first and third do not, referencing the incorrect marker when called. And, clearly, I wasn't even sure how to start with \printrequirementrefs. I could not get a version that compiled when trying to implement dictionary behaviour. What I've tried Using conditional checks and a state macro \reqsOnPage to store a comma-separated list of the requirements on the current page, and clearing it in between pages. I couldn't find an appropriate way to clear state that didn't leave relics across pages. The same method but with \thepage for the ID of the footnotes on each page as an attempt to sidestep the state-clearing issues of the previous approach. This never compiled as I ran into issues trying to expand the value. It also requires storing an additional list of page numbers, so doesn't seem like a great approach to me. Learning expl3 syntax and using prop as a dictionary to store the instance. This was promising as a programmatic approach, but I found it impenetrable and an extremely steep learning curve for something that, to me, feels like it shouldn't really need it. Maybe I'm wrong. Using LuaTeX to embed Lua scripts to handle the logic of \refreq and \printrequirementrefs. I'm clearly missing something fundamental to how Latex handles this sort of thing or a package that would make it trivial, but I'm at a loss for where to go from here. This has been deceptively hard to implement given how straightforward I think the logic is and I would very much appreciate some input. Thanks in advance.

  • Prevent page break after first line in five-line set examples in gb4e
    by renoh on November 24, 2025 at 8:38 am

    I'm writing a book that present hundreds of examples using gb4e (in the 2nd Part), and wondering how I could prevent page break after the first line. It is similar (almost the same) to Prevent page break after first line of example . However, its solution doesn't seem to work, probably because I have five lines in the exe environment, like in the MWE below: \documentclass[twoside,a4paper,12pt]{book} \usepackage{geometry} \geometry{margin=30truemm} \usepackage{fontspec} \setmainfont{Noto Serif} \usepackage{gb4e} \begin{document} \begin{exe} \ex{{[here I place the phonetic transcription]} \glll the target language here\\ the= seg-mented analysis here \\ DET= gloss gloss gloss\\ \glt `the translation here'} \end{exe} \begin{exe} \ex{{[here I place the phonetic transcription]} \glll the target language here\\ the= seg-mented analysis here \\ DET= gloss gloss gloss\\ \glt `the translation here'} \end{exe} \begin{exe} \ex{{[here I place the phonetic transcription]} \glll the target language here\\ the= seg-mented analysis here \\ DET= gloss gloss gloss\\ \glt `the translation here'} \end{exe} \end{document}

  • LaTeX and tabluarray theme
    by Aaron on November 24, 2025 at 7:26 am

    The table with the local settings works perfectly. But if I want to have a theme = compact, it no longer works. I want to write lines 25 and 26 into a global theme and only customize the specific changes locally, see line 25. \documentclass{scrbook} \usepackage{fontspec} \usepackage[sfdefault]{noto} \setmonofont{Noto Sans Mono}[UprightFont = * SemiBold] \usepackage{tabularray} \UseTblrLibrary{booktabs} \begin{document} \NewTblrTheme{compact}{% \DefTblrTemplate{contfoot-text}{default}{}% \DefTblrTemplate{conthead-text}{default}{}% % Style for the first line (header) \SetTblrStyle{row}{1}{font={\sffamily\bfseries\small},abovesep=3pt,belowsep=3pt}% % Style for all data rows \SetTblrStyle{row}{2-Z}{font={\sffamily\small},abovesep=1pt,belowsep=1pt}% } \begin{longtblr}[ theme = compact, caption = {Test}, label = {tab:test} ]{ colspec = {cX[l]}, rowhead = 1, % row{1} = {font={\small\sffamily\bfseries}, abovesep=3pt, belowsep=3pt}, % row{2-Z} = {font={\small\sffamily}, abovesep=1pt, belowsep=1pt}, cell{2-Z}{1} = {font=\ttfamily\small} } \toprule Spalte 1 & Spalte \\ \midrule 123 - 456 & Zeile 1 \\ 123 - 456 & Zeile 2 \\ 123 - 456 & Zeile 3 \\ 123 - 456 & Zeile 4 \\ \bottomrule \end{longtblr} \end{document}

  • floating point arithmetic and boolean operations with \ifthenelse
    by underflow on November 24, 2025 at 6:50 am

    This is a follow up to my previous post about arithmetic operations and tikz I would like to performance floating point arithmetic & boolean operations in conjunction with \ifthenelse. Here is a minimal example: \usepackage{tikz, ifthen} \begin{document} \begin{tikzpicture} \foreach \a in {-6,...,6} { \foreach \b in {-6,...,6} { \ifthenelse{ (\a+1.4*b < 4) \and (\a - 1.4*b)> 1 } { \node at ( (\a, \b ) {(\a, \b)}; } {} } } \end{tikzpicture} \end{document} Many thanks for your help!

  • How to fix overlays breaking in tcolorbox
    by Uncle C on November 24, 2025 at 5:19 am

    For some reason(s) i can't explain. When i use the codes below, the overalys on the right does not break to a new page. see MWE \documentclass[openany]{book} \usepackage[many]{tcolorbox} \tcbuselibrary{skins, breakable} %\tcbset{shield externalize} %\usepackage{mathspec} %\setmainfont{ntaqat} %\setmathsfont(Digits,Greek,Latin){ntaqat} %\setmathrm{ntaqat} \everymath{\displaystyle} \newtcolorbox[auto counter,number within=chapter]{myturn}{% enhanced, empty, breakable, coltitle=black, title={\hspace*{.2cm}\large Here's How We Do It \thetcbcounter}, fonttitle=\bfseries, % lefttitle=1cm, attach boxed title to top left={xshift=1mm}, overlay unbroken and first={\draw[dashed,line width=1pt] ([xshift=.2cm]frame.north west)-|([yshift=20mm,xshift=.2cm]frame.south west); \draw[dashed,line width=1pt] ([yshift=-15mm]frame.north east)--([yshift=5mm]frame.south east)--([xshift=-5mm]frame.south east)--++(180:2cm); \draw[line width=1pt] ([yshift=3mm]frame.south east)--([xshift=-3mm]frame.south east); \node[fill=black,rectangle,minimum width=4pt,minimum height=4pt,inner sep=0pt]at ([yshift=-15mm]frame.north east){}; \node[fill=black,rectangle,minimum width=4pt,minimum height=4pt,inner sep=0pt]at ([yshift=20mm,xshift=.2cm]frame.south west){}; % \draw[fill=black]([yshift=-15mm]frame.north east)circle(2pt); % \draw[fill=black]([yshift=20mm,xshift=.2cm]frame.south west)circle(2pt); \node[fill=white, draw=black, text=red, font=\small, circle, minimum size=12pt, inner sep=0pt] at ([xshift=2.5pt,yshift=-.3pt]title.west) {\includegraphics[clip,width=.5cm,height=.5cm,keepaspectratio]{cal1}}; } } \begin{document} \begin{myturn} \raggedright A civil-engineering team evaluates a reinforced beam where:\\ Concrete compression response is \(\sqrt{x^2+5x+2}\)\\[1ex] Steel reinforcement response is \(\sqrt{x^2+5}\)\\[1ex] The structural-safety model predicts that the difference between concrete and steel responses should match the predicted deflection index which is equal to one.\\[1ex] Task:\\[1ex] Identify the reinforcement level x where the predicted behaviour of the concrete–steel system aligns exactly with the deflection index.\\[1ex] What to do \vspace*{10cm} \begin{enumerate} \item Write down the required equation:\\[1ex] \(\sqrt{x^2+5x+2}\) \(=1+\sqrt{x^2+5}\) \item Square both sides of the equation to eliminate the outer square roots. \item Simplify the equation and isolate the remaining square root term. \item Square both sides again to eliminate the remaining square root. \item Rearrange the equation into a quadratic equation and solve it. \item Check both solutions in the original equation to see if they are valid. \end{enumerate} \end{myturn} \end{document} How can I fix this?? Thanks in advance

  • Incompatibility between array and bidi in LaTeX2e 2025-11-01
    by Psychonaut on November 24, 2025 at 3:29 am

    Following a recent update to TeX Live 2025, bidi has stopped working with array and packages that depend on it, such as nicematrix. Consider the following minimal example: \documentclass{article} \usepackage{array} \usepackage{bidi} \begin{document} \begin{tabular}{c} \end{tabular} \end{document} This results in the error ! Undefined control sequence. \@@array ...idth \z@ }\tbl_save_outer_table_cols: \begingroup \@mkpream {#2}... l.5 \begin{tabular}{c} It seems that the bidi file array-xetex-bidi.def references \tbl_save_outer_table_cols, but according to the LaTeX2e changelog, that identifier was removed in the 2025-11-01 release. I reported the issue in the vafa/bidi issue tracker on GitHub, though it's not clear to me whether that repository is still the official one or whether the package is still actively maintained. Is there a relatively easy way of working around this problem?

  • Font Warnings with scrextend and minipage
    by dedded on November 24, 2025 at 1:00 am

    I'm using \changefontsizes from scrextend and a scalable font to set my font size to 10.5. This seems to work fine, until I put text in a minipage. At that point I get a bunch of font warnings that look as if Latex is trying to make some sort of use of the default cm fonts. The resulting .pdf looks OK. Here's a MWE: \documentclass{article} \usepackage{fontspec} \setmainfont{TeX Gyre Schola} \usepackage{scrextend} \changefontsizes[13pt]{10.5pt} \begin{document} \begin{minipage}{2in} Hello \end{minipage} \end{document} And here are the warnings I get: LaTeX Font Warning: Font shape `OML/cmm/m/it' in size <10.5> not available (Font) size <10.95> substituted on input line 9. LaTeX Font Warning: Font shape `OMS/cmsy/m/n' in size <10.5> not available (Font) size <10.95> substituted on input line 9. LaTeX Font Warning: Font shape `OT1/cmr/m/n' in size <10.5> not available (Font) size <10.95> substituted on input line 9.

  • How to align the visual bottom of a large quotation mark with the cap height of the text?
    by Mihai on November 23, 2025 at 10:03 pm

    I am trying to figure how to correctly place a symbol (e.g., a quotation mark) as illustrated below. So, far I have the following: % Document class. \documentclass[12pt]{article} % Dependencies. \usepackage{lipsum} % Start. \ExplSyntaxOn % Define a box for the quote symbol. \box_new:N \l_quote_box % Define the `\pquote` command. \NewDocumentCommand{\pquote}{ m }{% % Start the quote environment. \begin{quote} % Enter horizontal mode. \leavevmode % Set the quote box to its content. \hbox_set:Nn \l_quote_box {% % Define the quote symbol. \rule{1em}{1em}% } % Place the quote symbol to the left. \llap{% % Smash to avoid affecting line spacing. \smash{% % Raise to align with the top of the first line. \raisebox{ \dim_eval:n { \fontcharht\font`H } }{% % Render the box containing the quote symbol. \box_use:N \l_quote_box }% }% }% % Render the quote content. #1 \end{quote} } % Stop. \ExplSyntaxOff \begin{document} \lipsum[1][1-3] \pquote{\lipsum[1][1-3]} \end{document} Which produces as output: However, the moment I redefine \l_quote_box as % Set the quote box to its content. \hbox_set:Nn \l_quote_box {% % Define the quote symbol. \fontsize{46}{0}\selectfont``% } the positioning of the symbol along the y-axis offset seems off, and the output obtained is: I can correctly reposition the symbol by tweaking the \raisebox, e.g. by setting \dim_eval:n { \fontcharht\font`H - 0.8em } but this feels arbitrary and perhaps dependent on the size used in \fontsize, which is not what I want. I would ideally like to: Determine (i.e., or scale) the size of quotation mark without compromising its "touch" point with the cap height, and thus not have to adjust the y-shift manually. Be mindful that large quotation marks do not overlap the text above, but rather push the entire quote environment down. Is there a robust way of achieving this, preferably without tikZ? I'd appreciate any ideas!

  • How to Make TikZ Overlay Arrows Smoother and Better Arranged in Table?
    by mingabua on November 23, 2025 at 6:33 pm

    I'm creating a table with TikZ overlay arrows to illustrate the data flow between cells. The arrows currently work, but they look somewhat crude and could be improved. I'm looking for suggestions on: How to make the curved arrows look more fluid and natural Better positioning strategies for the labeled nodes (A, B, C, D) so they don't overlap with arrows How to avoid awkward arrow angles and improve the overall visual flow Here's my MWE: \documentclass{article} \usepackage[margin=1in]{geometry} \usepackage{amsmath} \usepackage{booktabs} \usepackage{xcolor} \usepackage{lipsum} \usepackage{caption} \usepackage{tikz} \usetikzlibrary{tikzmark} \usepackage[most]{tcolorbox} % Color \definecolor{boxBack}{RGB}{245, 247, 250} \definecolor{darkgrey}{HTML}{464e51} \definecolor{customGray}{HTML}{DDDDDD} \definecolor{customRed}{HTML}{FDE7A9} \definecolor{customOrange}{HTML}{FC8E64} \definecolor{customBlue}{HTML}{B83779} % tcolorbox settings \tcbset{ enhanced, colback=boxBack, colframe=gray!40, boxrule=0.5pt, fonttitle=\bfseries\sffamily, coltitle=black, attach boxed title to top left={xshift=0.5cm, yshift=-3mm}, boxed title style={colback=white, colframe=gray!40, arc=3pt}, top=1em, bottom=1em, left=1em, right=1em } \begin{document} \lipsum[1-3] \begin{tcolorbox}[title=Test] \footnotesize $\quad$ \lipsum[1] \renewcommand{\arraystretch}{1.2} \begin{center} \captionsetup{font=footnotesize,labelfont={color=darkgrey,bf}} \captionof{table}{\textcolor{darkgray}{Example}} \label{tab:shifte} \vspace{-0.5cm} \[ \begin{array}{@{\hspace{1em}}c@{\hspace{2em}}c@{\hspace{3.5em}}c@{\hspace{3.5em}}c@{\hspace{3.5em}}c@{\hspace{2em}}c@{\hspace{1.0em}}} \toprule \text{Day} & \text{$1$} & \text{$2$} & \text{$3$} & \text{$4$} & \text{$\ldots$} \\ \midrule \text{{\fontsize{9}{10}\selectfont ...}} & \text{{E}} & \text{{L}} & \text{{O}} & \text{{E}} & \text{$\ldots$} \\[6pt] \text{$a_{ds}$} & \tikzmarknode{A2}{\text{$(1,0)$}} & \tikzmarknode{A3}{\text{$(0,1)$}} & \tikzmarknode{A4}{\text{$(0,0)$}} & \tikzmarknode{A5}{\text{$(1,0)$}} & \tikzmarknode{A6}{$\ldots$} \\[6pt] \text{$b_{ds}$} & \tikzmarknode{B2}{\text{$(1,0)$}} & \tikzmarknode{B3}{\text{$(1,0)$}} & \tikzmarknode{B4}{\text{$(0,1)$}} & \tikzmarknode{B5}{\text{$(0,1)$}} & \tikzmarknode{B6}{$\ldots$} \\[6pt] \text{$c_{ds}$} & \text{$(0,0)$} & \text{$(0,0)$} & \tikzmarknode{Z1}{\text{$(0,1)$}} & \text{$(0,0)$} & \text{$\ldots$} \\[6pt] \text{$v_{ds}$} & \tikzmarknode{E3}{\text{$(0,0)$}} & \tikzmarknode{E4}{\text{$(0,1)$}} & \text{$(0,0)$} & \tikzmarknode{E5}{\text{$(1,0)$}} & \tikzmarknode{E6}{$\ldots$ } \\ [6pt] \text{$d_{d}$} & \text{$0$} & \text{$1$} & \tikzmarknode{Z12}{\text{$0$}} & \text{$1$} & \text{$\ldots$} \\ \bottomrule \end{array} \] \begin{tikzpicture}[remember picture,overlay] % Fixed the typo here \draw[thick, ->] (-1.94,0.98) -- (-1.32,0.98); \draw[thick, -<] (-1.94,2.02) -- (-1.32,2.02); \draw[thick, -<] (-1.94,2.58) -- (-1.32,2.58); \draw[thick, ->] (-2.44,2.8) -- (-1.32,2.26); \draw[thick, customGray, -] (1.48,1.6) -- (2.56,2.22); \draw[thick, ->] (-0.44,2.8) -- (0.6,1.60); \draw[thick, ->] (1.48,1.6) -- (2.56,2.22); \draw[thick, -] (-1.94,2.58) -- (-1.94,0.98); \fill[customGray] (-2.21,2.65) circle (0.19); \fill[customGray] (2.02,1.91) circle (0.19); \fill[customGray] (0.08,2.16) circle (0.19); \fill[customGray] (-1.94,1.5) circle (0.19); \node[circle,draw,inner sep=1pt,font=\tiny] at (-2.21,2.65) {A}; \node[circle,draw,inner sep=1pt,font=\tiny] at (-1.94,1.5) {B}; \node[circle,draw,inner sep=1pt,font=\tiny] at (0.08,2.16) {C}; \node[circle,draw,inner sep=1pt,font=\tiny] at (2.02,1.91) {D}; \end{tikzpicture} \end{center} \noindent \lipsum[1] \end{tcolorbox} \normalsize \lipsum[2] \end{document} I want the arrows to look something like this:

  • arithmetic operations with \ifthenelse
    by underflow on November 23, 2025 at 5:47 pm

    Is there a way to add arithmetic operations to \ifthenelse statements? Here is a minimal (non)example: \documentclass{amsart} \usepackage{tikz, ifthen} \begin{document} \begin{tikzpicture} \foreach \a in {-6,...,6} { \foreach \b in {-6,...,6} { \ifthenelse{ (\a + \b) < 4 } { \node at ( (\a, \b ) {(\a, \b)}; } {} } } \end{tikzpicture} \end{document} It is not working because \ifthenelse does not allow \a+\b. Bonus question: Is there a way to e.g. define \c = \a + \b in advance so I can use \c elsewhere, in \ifthenelse and subsequence \draw commands? EDIT: Actually what I needed is \a + 1.414*\b < 4 AND \a - 1.414*\b > 0. I thought I could handle the rest once I know how to insert arithmetic operations into \ifthenelse, but apparently it's more complicated than that. Apologies for the mixup and thanks for your help.

  • Producing the sums outside of the 3x3 Magic Square
    by Vee on November 23, 2025 at 2:49 pm

    How can I align the column of sums outside of this 3x3 magic square? I've coursed through different variations of code, but I can't seem to get it correct. Kindly see the photo below. The 15s representing the diagonal sums don't seem to align with the row sums. \[ \begin{blockarray}{ccc@{\hspace{5mm}}c} \matindex{15} & \matindex{15} & \matindex{15} & \matindex{15} \\ % top column sums \begin{block}{[ccc]c} 4 & 9 & 2 & 15 \\ % row sums 3 & 5 & 7 & 15 \\ 8 & 1 & 6 & 15 \\ \end{block} & & & \matindex{15} % extra bottom-right 15 \end{blockarray} \]

  • First paragraph not indented in paracol environment
    by Roland Chastain on November 23, 2025 at 10:04 am

    I am making a bilingual document using paracol. I don't know why the first paragraph is not indented, as other are. I would like that it be indented. Here is my code: \documentclass[14pt,a4paper]{extarticle} \usepackage{fontspec} \usepackage[german,latin]{babel} \usepackage{microtype} \usepackage[margin=16mm]{geometry} \usepackage{paracol} % https://tex.stackexchange.com/a/505562/295527 \newcommand\chunks[2]{% \begin{leftcolumn*}\begin{otherlanguage}{latin}% {#1}% \end{otherlanguage}\end{leftcolumn*}% \begin{rightcolumn}\begin{otherlanguage}{german}% {#2}% \end{otherlanguage}\end{rightcolumn}% } \setlength{\columnsep}{8mm} \setlength{\columnseprule}{0.4pt} \usepackage[center]{titlesec}% https://tex.stackexchange.com/a/107282/295527 \begin{document} \thispagestyle{empty} \section*{GEBETE.} \subsection*{Das «Gegrüsset seist du, Maria».} \begin{paracol}{2} \chunks{\textsc{Ave}, Maria, gratia plena, Dominus tecum, benedicta tu in mulieribus et benedictus fructus ventris tui, Jesus.} {\textsc{Gegrüsset} seist du, Maria, voll der Gnade; der Herr ist mit dir; du bist gebeinedeit unter den Weibern, und gebeinedeit ist die Frucht deines Leibes, Jesus.} \chunks{Sancta Maria, Mater Dei, ora pro nobis peccatoribus, nunc et in hora mortis nostræ. Amen.} {Heilige Maria, Mutter Gottes, bitte für uns Sünder jetzt und in der Stunde unseres Todes! Amen.} \end{paracol} \end{document}

  • how to shade an region bounded by curves
    by underflow on November 22, 2025 at 6:43 pm

    I have a region on the plane bounded by two hyperbolas xy = +/- C. What is the best/simplest way to shade (not filled) the "star shaped" region enclosed by these two hyperbolas? Advanced version of this question: I have two rays in the first quadrant, starting from the origin. These two rays cut out a curved wedge in the star shaped region. How I can shade this wedge in a different color from the rest of the region? Here is a MWE for the star shaped region, plus the two rays: \documentclass{amsart} \usepackage{tikz} \begin{document} \begin{tikzpicture} \draw [thick, domain=0.5:3] plot (\x, { 1.2/\x)}); \draw [thick, domain=-3:-0.5] plot (\x, { 1.2/\x)}); \draw [thick, domain=0.5:3] plot (\x, {-1.2/\x)}); \draw [thick, domain=-3:-0.5] plot (\x, {-1.2/\x)}); \draw (-3.4,0) -- (3.4,0); \draw (0,-2.6) -- (0,2.6); \draw [thick] (0,0) -- (2.2,2.2); \draw [thick] (0,0) -- (3.1,1.5); \end{tikzpicture} \end{document} Thanks for your help! EDIT: I know how to fill a polygon using \draw [filled] (coord) -- (coord) -- etc but I don't know how to handle the parabolas.