• Including Octave source code and output in LaTeX document?
    by Kevin Zembower on August 29, 2026 at 7:56 pm

    all, I'm trying to create a LaTeX document that contains both source Octave code and output, like the way that Rmarkdown can be used to create a LaTeX document with both R source code and its output. Here's an example of what I'm trying to do, in a file named 'Ex.tex': \documentclass{article} \title{Exercise 1.1 T1} \author{Kevin Zembower} \date{} \begin{document} \maketitle \section{T1} This is an example from the documentation: ```{octave,engine.path='/usr/bin/octave',results='asis',echo=TRUE} x=-10:0.1:10; plot (x, sin (x)); print -djpg ./myfigure.jpg ``` Import the generated figure: ![My Plot of sin()]{./myfigure.jpg} \end{document} I don't know whether to put this code in a .Rnw, or .tex file. I'm not sure whether to use the << >> or ```{} delimiters. I'm producing the document in Emacs with LaTeX and Polymode enabled. I'm familiar with the latex interpreter in Octave, but I don't want to use it. I want more control over the document's appearance than the markdown in Octave allows. Can I use KnitR to combine Octave and LaTeX? I tried to use the ```{} delimters with the code in a .tex file, but when it's processed with pdflatex, it doesn't execute the Octave code. Am I missing a step to knit or sweave the code? Any help getting started? Any advice or guidance is appreciated. I think I'm confusing KnitR, Rmarkdown and LaTeX codes, with a lot of frustration. -Kevin

  • Designing consistent, good-looking inline TikZ nodes for keyboard keys and menu items
    by Marco Moldenhauer on August 29, 2026 at 6:38 pm

    I am creating my own inline TikZ commands for a Blender tutorial. So far, I have defined three commands: \KeyboardLetter{...} for keyboard letters, such as \KeyboardLetter{A} \KeyboardSymbol{...} for keyboard symbols, such as \KeyboardSymbol{\shift} \BlenderMenu{...} for Blender menu items, such as \BlenderMenu{Object Mode} My main requirement is that all three types of inline nodes should have the same height, regardless of their contents. I am not particularly happy with my current design (see the output below). How could I improve the design so that keyboard letters, keyboard symbols, and Blender menu items look like they belong to the same visual system? Maybe someone has a creative idea or a nice design suggestion? 🙂 my Code \documentclass{article} \usepackage{menukeys} \tikzset{ keystroke/.style={ draw=black!50, fill=yellow!20, %drop shadow={shadow xshift=0.15ex,shadow yshift=-0.15ex,fill=black,opacity=0.7}, rectangle, %rounded corners=0.8pt, inner xsep=1.5pt, inner ysep=1.5pt, line width=0.3pt, %minimum width=0.21cm, %minimum height=0.21cm, font=\sffamily\small, %text=blue!75!black, %anchor=south } } \newcommand*\KeyboardLetter[1]{% \tikz[baseline=(key.base)] % \node[keystroke](key) {#1} ;% } \newcommand*\KeyboardSymbol[1]{% \tikz[baseline=(key.base)]{% \node[keystroke,inner sep=1.5pt] (key) {\phantom{A}}; \node[ inner sep=0.8pt, transform shape, scale=0.75 ] at (key.center) {#1}; }% } \newcommand*\BlenderMenu[1]{% \tikz[baseline=(key.base)] % \node[% keystroke, %signal, fill=red!5 ](key) {#1} ;% } \begin{document} \KeyboardSymbol{\tab}\KeyboardLetter{A}\KeyboardLetter{P}\KeyboardLetter{=}\KeyboardSymbol{\shift}\KeyboardLetter{,}\BlenderMenu{Object Mode}\BlenderMenu{Edit Mode} \end{document} my Output

  • Again: too much whitespace between integral sign and integrand
    by Jürgen on August 29, 2026 at 3:40 pm

    This follow-up question refers to this question. I tried to use the proposal from MadyYuvi, but with this code \documentclass{scrartcl} \usepackage{kpfonts-otf} \removenolimits{\int} \removenolimits{\oint} \let\oldint\int \newcommand{\newint}{\oldint\hspace{-10cm}} \let\int\newint \begin{document} \begin{equation} I = \int_0^x S ds \end{equation} \begin{equation} I = \oint_0^x S ds \end{equation} \end{document} I can't see any effect. What am I doing wrong? -- EDIT: Implementing \AtBeginDocument With the hint from DavidCarlisle I use the code \documentclass{scrartcl} \usepackage{kpfonts-otf} \removenolimits{\int} \removenolimits{\oint} \AtBeginDocument{% \let\oldint\int \newcommand{\newint}{\oldint\!\!} \let\int\newint } \begin{document} \begin{equation} I = \int_0^x S ds \end{equation} \begin{equation} I = \oint_0^x S ds \end{equation} \end{document} and the result is

  • tcolorbox suboptimal connexion with dotted borderline
    by Denis Bitouzé on August 29, 2026 at 2:40 pm

    The example of a dotted borderline in the tcolorbox's documentation (currently page 207): \documentclass{article} \usepackage{tcolorbox} \usepackage{lipsum} \tcbuselibrary{skins} \begin{document} \begin{tcolorbox}[enhanced,arc=3mm,boxrule=1.5mm, frame hidden,colback=blue!10!white, borderline={1mm}{0mm}{blue,dotted} ] \lipsum[2] \end{tcolorbox} \end{document} is miraculously well-connected. But, in general, the connexion is only suboptimal, as shown in the following picture (look at its southwestern corner), obtained by replacing \lipsum[2] by \lipsum[1] in the previous example: Is there a way to get an optimal connexion, I mean automatically, by computing the height of the box and adapting the size of the dots and/or of the space between them?

  • How to achieve numbered zref-clever references in enumerated description list?
    by modallyFragile on August 29, 2026 at 1:15 pm

    I want a to write lists which include both a number (like enumerate) and a short description (like description). I can do that as described here. I also want to be able to refer to the numbers of these lists with zref-clever. How can I achieve this? I've got as far as making the list work, and getting zref to recognise references as items, but I can't work out how to get zref to print the relevant number. MWE: \documentclass{article} \usepackage{zref-clever} \usepackage{enumitem} \newcounter{enumdescription} \newlist{enumdescription}{description}{3} \zcsetup{countertype = {enumdescription = item}} \setlist[enumdescription]{% before={ \zcsetup{currentcounter=enumdescription} \setcounter{enumdescription}{0}% start each list at }, font={ \refstepcounter{enumdescription} \normalfont\arabic{enumdescription}.~% \bfseries% } } \begin{document} \begin{enumdescription} \item[Foo]\label{foo} text. \item[Bar]\label{bar} text. \item[Baz]\label{baz} text. \end{enumdescription} Should say `item 1': `\zcref{foo}'. \end{document} (Also nice to have, since it may be useful, would be a way of using zcref's ref option to capture the descriptive labels, so I could do \zcref[ref=desclabel]{foo} and get Foo. But this isn't really important.) TIA!

  • Include part number in page references
    by KeithB on August 29, 2026 at 11:38 am

    I've got a book with 4 \parts. It would be nice if \pageref would print something like "page ii.567" for page 567 in part 2, but only if the page is not in the current part. Is this possible?

  • How to put tikz node at top left in a picture fitting all the A4 document?
    by Manuel Selva on August 29, 2026 at 8:55 am

    I have the following document : \documentclass[a4paper]{article} \usepackage[a4paper,margin=0cm,landscape]{geometry} \usepackage{tikz} \usetikzlibrary{fit} \begin{document} \begin{tikzpicture}[remember picture, overlay] \coordinate (nw) at (current page.north west); \coordinate (se) at (current page.south east); \node [fill=red!10, fit=(nw) (se), inner sep=0pt] {}; \node [rectangle,fill=green,draw=black, minimum width=3cm, minimum height=3cm,anchor=north west] at (0, 0) {Manu}; \end{tikzpicture} \end{document} The Manu green rectangle is not in the top left corner of the resulting document while the red background done using fit correctly fits all the page. Why is the green rectangle shifted ?

  • How make a tikzpicture filling an A4 page?
    by Manuel Selva on August 29, 2026 at 6:49 am

    I want to use tikz to draw a diagram and I want this diagram occupy all the A4 space of my document (so that I can print it then). How can I achieve this ? Here is what I have for now : \documentclass[a4paper]{article} \usepackage{tikz} \usetikzlibrary{fit} \begin{document} \begin{tikzpicture}[remember picture, overlay] \node [fill=blue, fit=(current page.north west) (current page.south east), inner sep=0pt] {}; \end{tikzpicture} \end{document} But my problem is that I want to have a landscape A4 paper. Adding : \usepackage[a4paper,margin=0in,landscape]{geometry} results in a blue rectangle occupying only part of the document. It seems that current page.north west and current page.south east are no more valid with landscape ?

  • Sections taking chapter number, subsections not numbering
    by GrahamF on August 29, 2026 at 12:49 am

    This was working fine in June. Aftrer making edits, section numbering and toc not working properly. MWE: \documentclass[letterpaper, 9pt, oneside]{memoir} \usepackage{inconsolata} \usepackage[T1]{fontenc} % Font encoding \usepackage{lmodern, newpxmath} % Font family % Additional packages \usepackage{import} \usepackage{standalone} \usepackage{enumerate} % subsubsections and higher are numbered \setsecnumdepth{subsubsection} \maxsecnumdepth{subsection} \renewcommand\thesection{\arabic{chapter}} % Number format for sections \copypagestyle{chapter}{Ruled} \checkandfixthelayout % Required \sloppybottom \begin{document} \chapter{Business Requirement}\label{ch:requirement} \section{Background}\label{sec:background} Whilst the connectivity has been periodically upgraded, it is essentially the same functionality dating from 2006 when first implemented. The on-premise server is beyond end-of-life; the software version is out-of-date and represents a potential security vulnerability. Consequently, this project is to implement the next-generation connection. \section{Scope}\label{sec:scope} The following solution components are in scope for the project: \begin{itemize} \item A \item B \item C \item D \item E \item F \end{itemize} The user processes that trigger calculations are: \begin{itemize} \item 1 \item 2 \item 3 \end{itemize} \end{document} This produces the following pdf:

  • Alternative \oplus symbol when using newpx package
    by rla on August 28, 2026 at 7:35 pm

    When using newpx package I would like to change the \oplus and \bigoplus symbols to ones whose circles are slightly greater than the plus sign. I found a partial solution here How do I put a circle around an operator? \documentclass[a4paper, 10pt]{book} \usepackage{graphicx} \usepackage{mathtools} \usepackage{newpxtext} \usepackage[varg, smallerops]{newpxmath} \makeatletter \newcommand\incircbin {% \mathpalette\@incircbin } \newcommand\@incircbin[2] {% \mathbin% {% \ooalign{\hidewidth$#1#2$\hidewidth\crcr$#1\bigcirc$}% }% } \newcommand{\myoplus}{\incircbin{+}} \makeatother \begin{document} \[ \oplus \myoplus \] \[ \bigoplus \prod \sum \] \end{document} Similarly, I would like to define \mybigoplus operator which is basically a larger version of \myoplus. A first attempt would be to use \scalerel or \resizebox commands but that approach make the symbol look like a bold version. How to define a larger version of \myoplus with weight matching with others operator like the originals \prod and \sum from the newpx package? Furthermore, it will be good to have a solution that dynamically fits its size when \textstyle or \displaystyle are imposed.

  • Relative paths in pgfkeys vs. usage in TikZ
    by karlh on August 28, 2026 at 3:12 pm

    This is more a curiosity (or bug report?) than it is an actual problem. That is, I know how to fix it/work around it, and I'm really asking about the design principle(s). Using \pgfkeys to set a key /pgf/bar is fine, but setting one /pgf/foo/bar will cause an error if the \pgf part is left off inside a TikZ path/node/etc. command: \documentclass{article} \usepackage{tikz} \pgfkeys{% /pgf/bar/.initial=1cm, /pgf/foo/bar/.initial=1cm, } \begin{document} \begin{tikzpicture} \path [bar=2cm] (0,0); \end{tikzpicture} \end{document} compare to \documentclass{article} \usepackage{tikz} \pgfkeys{% /pgf/bar/.initial=1cm, /pgf/foo/bar/.initial=1cm, } \begin{document} \begin{tikzpicture} \path [foo/bar=2cm] (0,0); \end{tikzpicture} \end{document} The latter gives the following error: ! Package pgfkeys Error: I do not know the key '/tikz/foo/bar', to which you passed '2cm', and I am going to ignore it. Perhaps you misspelled it. See the pgfkeys package documentation for explanation. Type H <return> for immediate help. ... l.13 \path [foo/bar=2cm] ( 0,0); ? Making the root path /tikz solves the problem, as does providing the full path /pgf/foo/bar, but given the statement in the TikZ documentation, section 12.4.1, I expected it to work: Is this supposed to work, or is there a reason this list is not followed when a slash is present in the key name?

  • How to put test code into a self-designed macro package
    by lyl on August 28, 2026 at 2:21 am

    I want to put some test code into a macro package like this: %mypkg.sty \newif\iftest\testfalse \RequirePackage{...} some macros designed by myself \iftest\documentclass{article} preamble \begin{document} some test codes \end{document}\else\fi When \testtrue, the file mypkg.sty wish to be compiled and run, to get an output to test if the macros designed in this file work all right. If \testfalse, all the test code would be ignored, and the package mypkg.sty can be introduced by other files. It seems that this dose not work as expected. What's wrong with this method, and if there are better ways to put macros and its test code together into a .sty file?

  • `unicode-math`: prevent `\symbf` from switching font styles and just make things bold
    by moro11 on August 27, 2026 at 7:50 pm

    Consider the MWE \documentclass[varwidth]{standalone} \usepackage{unicode-math} \begin{document} $aB\beta\Xi$\\$\symbf{aB\beta\Xi}$ \end{document} I don't like how \symbf switches Latin letters from italic to upright, while i only intend to make them bold, there are other commands to make a letter bold and switch font such as \symbfit and \symbfup. I would like \symbf to just make things bold. I know i can switch the font style (italic/upright) of lower/upper case Latin/Greek letters with the option math-style and the style of bold face letters by bold-style. Although, with the available options, i was only able to achieve the desired behavior with math-style=ISO,bold-style=ISO which results in everything being italic . From pre-unicode-math days, i am used to math-style=TeX and \usepackage{bm} which gives (everything italic except for upper case Greek letters, which are upright in normal and bold font). I guess the ISO/ISO configuration is fine, but i am still wondering if it is possible to reproduce this configuration in unicode-math? or even better, completely turn off the font switch of \symbf, i.e. always use the exact same italic/upright configuration for bold math as used in standard non-bold math, where "standard math" is defined by math-style)?

  • Is there a tool that checks a manuscript against the Journal of Statistical Software (JSS) style guide?
    by kollerma on August 27, 2026 at 7:05 pm

    The Journal of Statistical Software has an extensive style guide beyond generic LaTeX conventions: dedicated preamble macros (\Plainauthor, \Address), semantic markup (\proglang, \pkg, \code), natbib citation forms, different capitalization rules for titles vs. sections vs. captions, code-formatting conventions, and completeness requirements on the .bib (e.g. doi fields). General linters like chktex and lacheck check LaTeX hygiene but know nothing about a journal's requirements, so violations tend to be found by the editors, one revision round at a time. Is there a tool that checks a .tex (or Sweave .Rnw / R Markdown .Rmd) manuscript and its bibliography against the JSS style guide specifically?

  • Full list by default available OpenType fonts in `fontspec` and `unicode-math`
    by moro11 on August 27, 2026 at 6:54 pm

    Is there a (approximately) complete list of OpenType fonts available by default within fontspec and unicode-math? I was not able to find something similar. So maybe this post could also be used to collect some. Just to specify what i mean: it is clear that there can not be a complete list as any OpenType font file (.otf) is compatible, and what font files are available by default probably varies on your TeX installation and can be looked up in /texmf/fonts/opentype. But there are some preconfigured named fonts which are loaded by name instead of loading a specific font file. As a fontspec example, loading the named font STIX Two Text and the font file STIXTwoText-Regular.otf in the following MWE \documentclass{standalone} \usepackage{fontspec} \setmainfont{STIX Two Text} \begin{document} ABC \textbf{ABC} \end{document} \documentclass{standalone} \usepackage{fontspec} \setmainfont{STIXTwoText-Regular.otf} \begin{document} ABC \textbf{ABC} \end{document} lead to and , respectively. As a unicode-math example, loading the named font NewComputerModernMath and the font file NewCMMath-Regular.otf in the following MWE \documentclass{standalone} \usepackage{unicode-math} \setmathfont{NewComputerModernMath} \begin{document} $ABC$ $\symcal{ABC}$ \end{document} \documentclass{standalone} \usepackage{unicode-math} \setmathfont{NewCMMath-Regular.otf} \begin{document} $ABC$ $\symcal{ABC}$ \end{document} lead to and , respectively. It seems to me, that these named fonts are not just equivalent to loading a specific .otf file, but there is some configuration happening in the background. (I guess they combine several .otf files.) So my question: is there a (approximatly) complete list of preconfigured named fonts provided by fontspec and unicode-math, respectively? In case fontspec and unicode-math do not provide these named fonts themselves, such a list might not exist, nevertheless they have to look them up somewhere. So, in this case, is there a way to manually look up locally available named fonts instead of playing a guess-the-name game (just like i am able to look up available .otf files in /texmf/fonts/opentype)?

  • Specify version=bold for specific font using unicode-math
    by moro11 on August 27, 2026 at 5:38 pm

    I am switching to unicode-math and have some trouble with the bold fonts. I know the intended way in unicode-math is to use \symbf, \symbfcal etc. which boldens characters, but no symbols like + or accents like \tilde. This is fine when boldface is used for schematics (e.g. to denote vectors). But sometimes, i want to use mathematics just in an all-bold environment (e.g. in section titles) where just everything should be bold. I know i could set a bold version of a math alphabet and switch to that using \boldmath or \boldsymbol instead of \symbfXY. (of course setting up these fonts has to be done carefully, as one might end up with two different bold fonts otherwise.) Now, i further want to have access to two calligraphic fonts \symcal and \symscr ideally with full support for both, but i can not get that to work. Consider the following MWE (the fonts are available at CTAN): \documentclass[varwidth]{standalone} \usepackage{unicode-math} \setmathfont{NewCMMath-Regular.otf} \setmathfont[version=bold]{NewCMMath-Bold.otf} \setmathfont[range={scr,bfscr}, StylisticSet=1]{NewCMMath-Regular.otf} \begin{document} $\symcal{A}$ (symcal) $\symbfcal{A}$ (symbfcal) {\boldmath$\symcal{A}$} (boldmath + symcal)\\ $\symscr{A}$ (symscr) $\symbfscr{A}$ (symbfscr) {\boldmath$\symscr{A}$} (boldmath + symscr) \end{document} producing What i want to have is I tried other configurations as well, such as: \setmathfont{NewCMMath-Regular.otf} \setmathfont[range={scr,bfscr}, StylisticSet=1]{NewCMMath-Regular.otf} \setmathfont[version=bold]{NewCMMath-Bold.otf} \setmathfont{NewCMMath-Regular.otf} \setmathfont[version=bold]{NewCMMath-Bold.otf} \setmathfont[range={scr,bfscr}, StylisticSet=1]{NewCMMath-Regular.otf} \setmathfont[version=bold, range={scr,bfscr}, StylisticSet=1]{NewCMMath-Bold.otf} I have the bad feeling that i found some hard limits of the unicode-math package. Is there any way to achieve this? I would also be happy with some workarounds if this is not possible. Maybe some adjusted .otf files. Or redefining the mechanic behind \boldmath and \boldsymbol to additionally redefine \symscr and \mathscr with \symbfscr and \mathbfscr or something (i guess these are the only non-bold alphabets, so replacing them with bold version might not be ideal, but probably good enough?) I mean, we are talking about the second calligraphic font in combination with the lesser used bold mechanic, so the use-case is probably not the most relevant. Nevertheless it feels odd to not have support for that at all, especially, as this is no problem without unicode-math using the old 8-bit engine.

  • Why do bib files generated by zbMATH and MathSciNet avoid the "address" key? [closed]
    by user134824 on August 27, 2026 at 5:32 pm

    As a mathematician, I use zbMATH and MathSciNet to generate bibtex database files for sources that I reference in papers that I write. Generally these bib files are almost perfect and require little editing before use, and I trust that the database editors have put great care into the algorithm that generates these files. Nonetheless, these bib files sometimes require manual editing. By far the most common issue I find myself fixing is location information appearing in the publisher field rather than the address field, which is absent entirely. For example, here are excerpts from the bib files for Wilson's textbook on finite simple groups: zbMATH: PUBLISHER = {Springer-Verlag London, Ltd.} MathSciNet: publisher = {London: Springer} Question: Is there some subtlety in using the address field that explains its absence in .bib files from zbMATH and MathSciNet? More generally, what are best practices for using this field? (For example, according to the biblatex documentation one should really call this field location instead of address.)

  • Determine if opt arg follows proper keyval syntax
    by Ankaa on August 27, 2026 at 4:43 pm

    I have a macro who's optional argument can either follow the classic key=value syntax or a special one that gets parsed differently. To detect which one is used, I currently extract the first key (assuming key=value syntax) and feed it into \keys_if_exist:nnTF, so that if the test is false, that means I did not extract a valid key. I am however changing the way this special syntax works and it requires me to change the above method: I would now need to test if every key of the optional argument is defined, and not just the first one. My first attempt at achieving this looks like this: \ExplSyntaxOn \bool_new:N \l__intexgral_special_syntax_bool \cs_new_protected:Npn \__intexgral_eval_opt_arg:n #1 { \bool_set:Nn \l__intexgral_special_syntax_bool { \exp_args:Ne \bool_lazy_all_p:n { \keyval_parse:nnn { \keys_if_exist_p:nn { integral } } { \exp_args:Nno \keys_if_exist_p:nn { integral } \use_i:nn } { #1 } } } } \__intexgral_eval_opt_arg:n { limits=ab, variables=cartesian, } % should yield TRUE \__intexgral_eval_opt_arg:n { double, variables={x,y} } % should yield TRUE \__intexgral_eval_opt_arg:n { double S:x,y } % should yield FALSE \bool_log:N \l__intexgral_special_syntax_bool \ExplSyntaxOff But I get the following error: ! Argument of \exp_args:Nno has an extra }. <inserted text> \par l.1191 ...rg:n { limits=ab, variables=cartesian, } From what I understand, the second argument of keyval_parse:nnn should receive code after which the key and value are placed into two braced groups, thus requiring a \use_i:nn to get rid of the value. Is there a better way of determining if the optional argument follows a suitable syntax for keys_set:nn? If my method seems correct, how can I get rid of this error?

  • Using "University of Aberdeen" PhD template, how does one add the bibliography to the table of contents? [duplicate]
    by Shaun on August 27, 2026 at 4:05 pm

    The Question: Using the University of Aberdeen PhD template, available on Overleaf, how does one add the bibliography to the table of contents? Context: Don't shoot! I'll be a bit naughty here and not go into details of what I tried. Why? Well, my dissertation deadline is on Monday, 31st August 2026. That's this coming Monday! I'm running out of time. I guess there will be a very quick fix, too \documentclass[phd]{abdnthesis} %% For citations, I would recommend natbib for its %% flexibility, particularly when named citation styles are used, but %% it also has useful features for plain and those of that ilk. %% The natbib package gives you the following definitons %% that extend the simple \cite: % \citet{key} ==>> Jones et al. (1990) % \citet*{key} ==>> Jones, Baker, and Smith (1990) % \citep{key} ==>> (Jones et al., 1990) % \citep*{key} ==>> (Jones, Baker, and Smith, 1990) % \citep[chap. 2]{key} ==>> (Jones et al., 1990, chap. 2) % \citep[e.g.][]{key} ==>> (e.g. Jones et al., 1990) % \citep[e.g.][p. 32]{key} ==>> (e.g. Jones et al., p. 32) % \citeauthor{key} ==>> Jones et al. % \citeauthor*{key} ==>> Jones, Baker, and Smith % \citeyear{key} ==>> 1990 \usepackage[round,colon,authoryear]{natbib} \setlength{\bibsep}{0pt} \bibliographystyle{apalike} \usepackage[T1]{fontenc} \title{How to use abdnthesis.cls} \author{Timothy J.\ Norman} % IMO this is a bit silly, but some like to include these. To remove, % delete this declaration and remove the option from the % \documentclass definition above. %\qualifications{PhD, Computer Science, University College London, 1997\\% %BEng (Hons.) Electrical and Electronic Engineering, The University of Wales, Swansea, 1992} \school{Department of Computing Science} %%%% In the final submission of a thesis, this should only be the year %%%% of submission. However, it is useful to use \date{\today} for drafts so that %%%% they don't get mixed up. \date{2010} %% It is useful to split the document up as chapters and include %% them. LaTeX will sort out all the numbering and cross-referencing %% for you --- if you run it enough times! %% If you want to include only a couple of chapters then use the %% \includeonly{} command with a list of the file/chapter names that %% you wish to include. NB, this must be in the preamble. \includeonly{introduction,faq} \def\sfthing#1#2{\def#1{\mbox{{\small\normalfont\sffamily #2}}}} \sfthing{\PP}{P} \sfthing{\FF}{F} %% This will make sure that all cross-references are correct (including %% references to those file not included) but will produce a dvi %% file with only those files/chapters you specify included. \begin{document} %%%% Create the title page and standard declaration. \maketitle \makedeclaration %%%% Then the abstract and acknowledgements \begin{abstract} An expansion of the title and contraction of the thesis. \end{abstract} \begin{acknowledgements} Much stuff borrowed from elsewhere \end{acknowledgements} %%%% It should have a table of contents, but delete the other two as %%%% necessary. \tableofcontents %\listoftables %\listoffigures \include{introduction} \include{faq} \include{literature-survey} \include{design} \include{implementation} \include{evaluation} \include{discussion} \include{conclusion} \appendix \include{proof} \bibliography{mybib} \end{document} Sorry!

  • How can I make article titles upright and journal names italic in amsrefs?
    by licheng on August 27, 2026 at 2:49 pm

    I am using amsrefs with bibliography entries written directly using biblist. For example: \documentclass{article} \usepackage[abbrev,nobysame]{amsrefs} \begin{document} See \cite{MR2365056}. \begin{bibdiv} \begin{biblist} \bib{MR2365056}{article}{ author={Balbuena, C.}, author={Cera, M.}, author={Di\'anez, A.}, author={Garc\'ia-V\'azquez, P.}, author={Marcote, X.}, title={On the edge-connectivity and restricted edge-connectivity of a product of graphs}, journal={Discrete Appl. Math.}, volume={155}, date={2007}, number={18}, pages={2444--2455}, doi={10.1016/j.dam.2007.06.014}, } \end{biblist} \end{bibdiv} \end{document} With the default amsrefs formatting, the article title is italic while the journal name is upright. I would like to reverse the default convention: the article title should be set in upright (roman) type, while the journal name should be italicized. I know that I could either write title={\textup{...} }, journal={\textit{...}}, in every bibliography entry. However, this would require modifying every bibliography entry individually, which is impractical since I have many references. All of my references are taken from MathSciNet.

  • How to duplicate `\vert` and reduce its thickness at larger sizes?
    by Nyx on August 27, 2026 at 1:13 pm

    I regularly use newpx for my LuaLaTeX documents with the font setup being similar to § 5, Example I of the documentation but using Asana Math as the OTF math font: \usepackage{newpxtext} \usepackage{unicode-math} \setmathfont{Asana Math} Unfortunately, I find that Asana Math's \vert is too thick at larger sizes for my taste. The following is version 1 of the MWE (with \otfmathtrue being uncommented) of my current problem: % !TEX program = lualatex \documentclass{article} \usepackage{mathtools} \usepackage{mleftright} % math fonts \newif\ifotfmath \otfmathtrue \ifotfmath \usepackage[ warnings-off={ mathtools-colon, mathtools-overbracket, }, ]{unicode-math} \setmathfont{Asana Math} \else \renewcommand*{\rmdefault}{minzpl} \usepackage[T1]{fontenc} \usepackage{newpxmath} \fi % \abs macro \DeclarePairedDelimiter{\abs}{\lvert}{\rvert} % \set macro from https://tex.stackexchange.com/a/763668 \ExplSyntaxOn \newcommand*{\suchthatvert}{\vert} \NewDocumentCommand{\set}{sO{}m} { \group_begin: \seq_set_split:Nnn \l__egreg_set_input_seq {\suchthat} {#3} \int_case:nnF { \seq_count:N \l__egreg_set_input_seq } { {1} { \__egreg_set_bylist:nnn {#1} {#2} {#3} } {2} { \__egreg_set_byproperty:nnee {#1} {#2} { \seq_item:Nn \l__egreg_set_input_seq {1} } { \seq_item:Nn \l__egreg_set_input_seq {2} } } }{OOPS!} \group_end: } \seq_new:N \l__egreg_set_input_seq \tl_new:N \l__egreg_set_st_tl \cs_new_protected:Nn \__egreg_set_byproperty:nnnn { \bool_if:nTF {#1} {% auto sizing \left\lbrace #3 \nonscript\;\middle\suchthatvert\nonscript\; #4 \right\rbrace } { \mathopen{#2\lbrace} #3 \mathrel{#2|} #4 \mathclose{#2\rbrace} } } \cs_generate_variant:Nn \__egreg_set_byproperty:nnnn {nnee} \cs_new_protected:Nn \__egreg_set_bylist:nnn { \bool_if:nTF {#1} { \left\lbrace } { \mathopen{#2\lbrace} } \group_begin: \clist_use:nn {#3} {,\penalty0~\hspace{0pt plus 3pt}} \group_end: \bool_if:nTF {#1} { \right\rbrace } { \mathclose{#2\rbrace} } } \ExplSyntaxOff \begin{document} \(\abs{x}\) \(\abs{A}\) \(\abs{M}\) \(\abs{S}\) \(\set[\big]{x \suchthat \dfrac{1}{2} < x < 3}\) \(\set[\Big]{x \suchthat \dfrac{1}{2} < x <3}\) \(\set[\bigg]{x \suchthat \dfrac{1}{2} < x < 3}\) \(\set*{x \suchthat \dfrac{1}{2} < x <3}\) \(\set[\Bigg]{x \suchthat \dfrac{1}{2} < x <3}\) \end{document} The following is version 2 of the MWE (with \otfmathtrue being commented) of my current problem: % !TEX program = lualatex \documentclass{article} \usepackage{mathtools} \usepackage{mleftright} % math fonts \newif\ifotfmath % \otfmathtrue \ifotfmath \usepackage[ warnings-off={ mathtools-colon, mathtools-overbracket, }, ]{unicode-math} \setmathfont{Asana Math} \else \renewcommand*{\rmdefault}{minzpl} \usepackage[T1]{fontenc} \usepackage{newpxmath} \fi % \abs macro \DeclarePairedDelimiter{\abs}{\lvert}{\rvert} % \set macro from https://tex.stackexchange.com/a/763668 \ExplSyntaxOn \newcommand*{\suchthatvert}{\vert} \NewDocumentCommand{\set}{sO{}m} { \group_begin: \seq_set_split:Nnn \l__egreg_set_input_seq {\suchthat} {#3} \int_case:nnF { \seq_count:N \l__egreg_set_input_seq } { {1} { \__egreg_set_bylist:nnn {#1} {#2} {#3} } {2} { \__egreg_set_byproperty:nnee {#1} {#2} { \seq_item:Nn \l__egreg_set_input_seq {1} } { \seq_item:Nn \l__egreg_set_input_seq {2} } } }{OOPS!} \group_end: } \seq_new:N \l__egreg_set_input_seq \tl_new:N \l__egreg_set_st_tl \cs_new_protected:Nn \__egreg_set_byproperty:nnnn { \bool_if:nTF {#1} {% auto sizing \left\lbrace #3 \nonscript\;\middle\suchthatvert\nonscript\; #4 \right\rbrace } { \mathopen{#2\lbrace} #3 \mathrel{#2|} #4 \mathclose{#2\rbrace} } } \cs_generate_variant:Nn \__egreg_set_byproperty:nnnn {nnee} \cs_new_protected:Nn \__egreg_set_bylist:nnn { \bool_if:nTF {#1} { \left\lbrace } { \mathopen{#2\lbrace} } \group_begin: \clist_use:nn {#3} {,\penalty0~\hspace{0pt plus 3pt}} \group_end: \bool_if:nTF {#1} { \right\rbrace } { \mathclose{#2\rbrace} } } \ExplSyntaxOff \begin{document} \(\abs{x}\) \(\abs{A}\) \(\abs{M}\) \(\abs{S}\) \(\set[\big]{x \suchthat \dfrac{1}{2} < x < 3}\) \(\set[\Big]{x \suchthat \dfrac{1}{2} < x <3}\) \(\set[\bigg]{x \suchthat \dfrac{1}{2} < x < 3}\) \(\set*{x \suchthat \dfrac{1}{2} < x <3}\) \(\set[\Bigg]{x \suchthat \dfrac{1}{2} < x <3}\) \end{document} I generally try to only use OpenType math fonts and use unicode-math's \setmathfont{...}[range={...}] or \setmathfont{...}[version=...] commands for additional glyphs or secondary fonts. In this particular case, I would like to duplicate the \vert macro into \suchthatvert and have the latter use the extensible delimiter from newpxmath (if that is possible) in order to have a \suchthatvert with reduced thickness at larger sizes without affecting other instances of \vert. Using \setmathfont{secondary-font.otf}[range={\vert}] with another OpenType math font would not work as it would affect \verts globally and using \setmathfont{secondary-font.otf}[version=secondary-font] would also not work as I believe it is not possible to do the following because of how \mathversion works: \newcommand*{\suchthatvert}{\mathversion{secondary-font}\vert\mathversion{default}}

  • tikz pgfplot fill area between multiple graphs or paths
    by paul_schaefer on August 27, 2026 at 12:22 pm

    MWE: \documentclass[12pt,a4paper]{article} \usepackage[utf8]{inputenc} \usepackage{lmodern} \usepackage[ngerman]{babel} \usepackage{amsmath} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{tikz} \usetikzlibrary{arrows.meta} \usetikzlibrary{datavisualization.formats.functions} \usepackage{pgfplots} \pgfplotsset{compat=1.18} \usepgfplotslibrary{fillbetween} \begin{document} \begin{tikzpicture}[scale=1] \begin{axis}[ axis equal, % axis line style=thick, axis x line=center, ylabel={$y$}, xlabel={$x$}, major tick style = {black}, axis y line=middle, every axis y label/.style={ at={(current axis.above origin)}, inner sep=3, anchor=north east, }, every axis x label/.style={ at={(current axis.right of origin)}, inner sep=3, anchor=north east, }, xtick={-1,1}, xticklabels={$-\frac{w}{2}$,$\frac{w}{2}$}, ytick={1}, yticklabels={$h$}, yticklabel style={anchor=south west}, xmin=-1.75, xmax=3.25, ymin=-0.1, ymax=1.5, height=4cm, samples=100] \addplot[domain=-1:1,thick, name path=A] {1 - x * x}; \addplot[domain=0.5:2.5,thick, name path=B] {1 - (x-1.5) * (x-1.5)}; \draw[name path=C, thin] (1/3,8/9) -- (1.5,1); \path [name path=D] (\pgfkeysvalueof{/pgfplots/xmin},0) -- (\pgfkeysvalueof{/pgfplots/xmax},0); \addplot[black!15] fill between[of=C and A, soft clip={domain=0:0.75}]; \addplot[black!15] fill between[of=C and B, soft clip={domain=0.75:1.5}]; \addplot[black!40] fill between[of=B and D, soft clip={domain=0.5:0.75}]; \addplot[black!40] fill between[of=A and D, soft clip={domain=0.75:1}]; \end{axis} \end{tikzpicture} \end{document} results in a graph, where the areas between the both graphs are filled in gray. In this example I splitted the areas into four sections and colored them. Is there a possibility to fill the areas without splitting them into sections? A second problem is, that the separation of each area into two parts will sometimes result in in slight white vertical line between the colored areas. In my case it depends on the scaling of the pdf viewer I use. If there area could be described without separation this should not happen.

  • How to draw 3D animation of reflection of a triangle about the bisector?
    by Learner on August 26, 2026 at 6:50 pm

    I want to plot a 3D animation of an equilateral triangle about one bisector. I have plotted the steps by using tikz: \documentclass[a4paper,11pt]{article} \usepackage{tikz} \usepackage[margin=1.2cm]{geometry} \usepackage{amsmath} \begin{document} \begin{tikzpicture}[x=1cm,y=1cm] % First triangle: \begin{scope}[shift={(0,0)}] \coordinate (A) at (0,2); \coordinate (B) at (-1.732,0); \coordinate (C) at (1.732,0); % Median = axis of reflection \draw[dashed,very thick] (0,0) -- (0,2); % Triangle \draw[thick] (A) -- (B) -- (C) -- cycle; % Vertex labels \node[above] at (A) {$A$}; \node[below left] at (B) {$B$}; \node[below right] at (C) {$C$}; % Element \node at (0,-0.7) {I}; \end{scope} %Arrow from first triangle to second triangle \draw[->,thick] (2.2,1) -- (5.8,1); \node at (4,1.2) {s}; \node at (4,0.5) {$(\text{reflection})$}; %second triangle \begin{scope}[shift={(8,0)}] \coordinate (A) at (0,2); \coordinate (B) at (-1.732,0); \coordinate (C) at (1.732,0); % Reflect in the vertical median \begin{scope}[xscale=-1] % Triangle \draw[thick] (A) -- (B) -- (C) -- cycle; % Vertex labels \node[above left] at (A) {$A$}; \node[below left] at (B) {$B$}; \node[below] at (C) {$C$}; \end{scope} % Reflection axis \draw[dashed,very thick] (0,0) -- (0,2); \node at (0,-1) {II}; \end{scope} \end{tikzpicture} \end{document} which gives the following two triangles: I want to plot a 3D animation to display the reflection about the bisector.I would appreciate to do that. The vertices B and C will be changing every time but A will remain fixed. Note that the first triangle and the last triangle are same.

  • PDFs not displayed in a document with background image
    by Rodrigo Tavares on August 26, 2026 at 5:14 pm

    I used a background image on the main part of the document, which is an RPG book, with the command \AddToHook, here my preamble: \documentclass[a5paper,oneside]{book} \usepackage[utf8]{inputenc} \usepackage[brazil]{babel} \usepackage[T1]{fontenc} \usepackage{amsmath,amssymb,latexsym} \usepackage{graphicx} \usepackage{amsthm} \usepackage{marvosym} \usepackage{lipsum} \usepackage{wrapfig} \usepackage{makeidx} \usepackage{siunitx} \usepackage{caption} \usepackage{pdfpages} \usepackage{lipsum} \makeindex \AddToHook{shipout/background} { \put (0in,-\paperheight){\includegraphics[width=\paperwidth,height=\paperheight]{fundo.pdf}} } \usepackage{lipsum} \usepackage[Lenny]{fncychap} \begin{document} \chapter{one} \lipsum \chapter{Two] \lipsum \newpage \includepdf{ficha3dnd.pdf} \newpage \includepdf{fichastoryweller.pdf} \newpage \printindex \end{document} But in the end of the document I wanted to show the images of the character sheets. I used the package pdfpages and used the command \includepdf to display the two character sheets in a entire page each. But when I compile the images are not displayed, instead the background appear without any image in it. How can I solve it? There's a way to deactivate the background in these two pages?

  • tikz datavisualization place axis labels next to axis tips
    by paul_schaefer on August 26, 2026 at 12:44 pm

    MWE: \documentclass[12pt,a4paper]{article} \usepackage[utf8]{inputenc} \usepackage[ngerman]{babel} \usepackage{amsmath} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{tikz} \usetikzlibrary{arrows.meta} \usetikzlibrary{datavisualization.formats.functions} \begin{document} \begin{tikzpicture}[baseline=(current bounding box.center), >=Stealth]% \datavisualization[% school book axes,% visualize as smooth line,% x axis={% label={$x$},% include value={-1.25, 1.25},% ticks={% major at={% -1 as $-\frac{w}{2}$,% 1 as $\frac{w}{2}$% },% },% },% y axis={% label={$y$},% include value=1.5,% ticks={% major at={% 1 as $h$% },% node style={anchor=south west},% },% },% ]% data [format=function] {% var x : interval [-1.0:1.0];% func y = 1 - (\value x * \value x);% };% \end{tikzpicture} \end{document} provides the following graph: What do I have to change to place the axis description next to the arrow tips (shown in red)? Adding visualize label={x axis={goto pos=.5}}, to the x axis definition leads to a second label. Trying to change the node style using visualize label={node style={anchor=north}}, doesn't has any effect. How can I change/access the label inside the axis definition?

  • Why does \pgfkeysvalueof give different results between nearly same codes
    by lyl on August 26, 2026 at 4:34 am

    \documentclass{article} \usepackage{tikz} \begin{document} \pgfkeys{my family/my key/.initial=hello} \pgfkeysvalueof{my family/my key} % Running the above two lines of code gets nothing \pgfkeys{/my family/my key/.initial=hello} \pgfkeysvalueof{/my family/my key} % Running the above two lines of code gets right output as expected. % What causes such different results between the two block of codes? \end{document}

  • Is it possible to have a different tocdepth in two table of contents?
    by KeithB on August 25, 2026 at 10:49 am

    I've not been able to find a way to achieve this behaviour, in which the local toc has full depth, but the main toc suppresses sections for part 2 only. Any suggestions? Document structure: \documentclass{book} \usepackage{etoc} % or is there something better? \begin{document} \part{Part 1} \tableofcontents \chapter{Chapter 1} \section{Section 1.1} \section{Section 1.2} \chapter{Chapter 2} \section{Section 2.1} \section{Section 2.2} \part{Part 2} \localtableofcontents \chapter{Chapter 3} \section{Section 3.1} \section{Section 3.2} \chapter{Chapter 4} \section{Section 4.1} \section{Section 4.2} \chapter{Chapter 5} \section{Section 5.1} \section{Section 5.2} \end{document} Desired toc: Table of contents of both parts % NB: sections of part 2 suppressed (tocdepth changes for part 2) Chapter 1 ..................................................... Section 1.1 ................................................. Section 1.2 ................................................. Chapter 2 ..................................................... Section 2.1 ................................................. Section 2.2 ................................................. Chapter 3 ..................................................... Chapter 4 ..................................................... Chapter 5 ..................................................... Table of contents of part 2 % NB: sections of part 2 shown Chapter 3 ..................................................... Section 3.1 ................................................. Section 3.2 ................................................. Chapter 4 ..................................................... Section 4.1 ................................................. Section 4.2 ................................................. Chapter 5 ..................................................... Section 5.1 ................................................. Section 5.2 .................................................

  • I cannot write any commands inside "\textArab{}"
    by الطريق طالب العلم on August 24, 2026 at 7:08 pm

    I have a problem: After creating my custom character map "MyRules.lua", I can type the characters perfectly, but I cannot type any commands inside \textArab{}. This file 'MyRules.lua' local TransTable = { -- 1. معالجة الحروف المشددة أولاً (لأنها تتكون من رمز مكرر) {a = "%^t", b = "ث"}, {a = "%^H", b = "خ"}, {a = "%^d", b = "ذ"}, {a = "%^r", b = "ز"}, {a = "%^s", b = "ش"}, {a = "%^S", b = "ض"}, {a = "%^T", b = "ظ"}, {a = "%^A", b = "غ"}, {a = "%:y", b = "ي"}, } singlefv = { {a="e", b="ء"}, {a="a", b="ا"}, {a="b", b="ب"}, {a="t", b="ت"}, {a="j", b="ج"}, {a="H", b="ح"}, {a="d", b="د"}, {a="r", b="ر"}, {a="s", b="س"}, {a="S", b="ص"}, {a="T", b="ط"}, {a="f", b="ف"}, {a="A", b="ع"}, {a="f", b="ف"}, {a="q", b="ق"}, {a="k", b="ك"}, {a="l", b="ل"}, {a="m", b="م"}, {a="n", b="ن"}, {a="h", b="ه"}, {a="w", b="و"}, {a="y", b="ى"}, {a="c", b="c"}, } LuaAr = {} function LuaAr.process(text) local inside = text -- حلقة تكرارية تمر على الجدول من أول سطر إلى آخره for i = 1, #TransTable do inside = string.gsub(inside, TransTable[i].a, TransTable[i].b) end for i = 1,#singlefv do inside = string.gsub(inside, singlefv[i].a, singlefv[i].b) end -- إرجاع النص النهائي بعد تحويله بالكامل return inside end This is the code \documentclass{article} \usepackage{amsmath,amssymb,amsfonts} \usepackage{comment,luacode,xstring} \usepackage[no-math]{fontspec} \usepackage{polyglossia} \usepackage{xspace} \setdefaultlanguage[numerals=maghrib]{arabic} % from polyglossia \setotherlanguage{english} \newfontfamily\arabicfont[Script=Arabic, Mapping=maghrib]{Times New Roman}%Amiri \newfontfamily\englishfont[Script=Arabic,Mapping=maghrib]{Times New Roman} \newfontfamily\fontmath[Script=Arabic,AutoFakeBold=.7,%FakeSlant=-0.2 WordSpace =.8,PunctuationSpace=2, SizeFeatures={ {Size={-8},FakeStretch=1.1,FakeBold=1.5}, {Size={8-14}}, {Size={14-}}, }]{MyFonttwo002-VF.ttf} \directlua{dofile(kpse.find_file("MyRules.lua"))} \newcommand{\trans}[1]{% \bgroup \fontmath % \textdir TRT % جعل اتجاه الكتابة من اليمين إلى اليسار \directlua{tex.sprint(LuaAr.process(\luastringN{#1}))}\egroup% } \makeatletter \def\arabtexcodes{\catcode`^=11\relax\catcode`_=11\relax} %\let\arabtex@codes\arabtexcodes \makeatother \newcommand{\textArab}[1]{% \bgroup% \arabtexcodes \fontmath \ifvmode\leavevmode\fi% \directlua{tex.sprint(LuaAr.process(\luastring{#1}))}% \egroup% } \newcommand{\ar}[1]{%->arb-math inline {\ignorespaces\textArab{#1}} } \newcommand{\afrac}[2]{ {\bfseries\boldmath\fontspec{MyFonttwo002-VF.ttf}[FakeStretch=1.1,FakeBold=1.5]\ensuremath{\!\frac{\text{\textArab{#1}}}{\text{\textArab{#2}}}}} } \begin{document} \textArab{0123456789\\1.2\\ e a b t ^t j H^H d ^d r ^r s ^s S ^S T ^T A ^A f q k l m n h w y c }% $\frac{num}{den}$ \\ \ar{a + \afrac{num}{den}} \end{document} I have a problem. ! Incomplete \iffalse; all text was ignored after line 57. <inserted text> \fi <*> document.tex The file ended while I was skipping conditional text. This kind of error happens when you say `\if...' and forget the matching `\fi'. I've inserted a `\fi'; this might work. ! Emergency stop. <*> document.tex *** (job aborted, no legal \end found) Here is how much of LuaTeX's memory you used: 6259 strings out of 475695 100000,794899 words of node,token memory allocated 1050 words of node memory still in use: 6 hlist, 1 vlist, 2 rule, 1 local_par, 1 dir, 32 glue, 4 kern, 6 penalty, 44 glyph, 12 attribute, 52 glue_spec, 12 attribute_list, 1 temp, 3 if_stack, 2 writ e nodes avail lists: 2:1,4:1,5:6,7:1 29001 multiletter control sequences out of 65536+600000 31 fonts using 14732263 bytes 73i,1n,93p,291b,265s stack positions out of 10000i,1000n,20000p,200000b,200000s ! ==> Fatal error occurred, no output PDF file produced!

  • How can csvsimple handle a csv containing quoted values?
    by Biki Teron on August 24, 2026 at 6:37 pm

    With the csv file as below, the 1st row is not appearing in the output SlNo,Name,Affiliation 1,John Deo,"A College, A City" 2,Piter Deo, A College Here is my MWE \documentclass{article} \usepackage{csvsimple-l3} \usepackage{tikz} \begin{document} \csvreader[ % separator=semicolon, head to column names ]{participants.csv}{}{% \begin{tikzpicture} \node[] at (1.2,2.45) {\Name}; \node[] at (1.2,4.45) {\Affiliation}; \end{tikzpicture} \newpage } \end{document} How can I have quoted values in my csv?

  • tikz how to stop lines at shape edge when using plotted coordinates
    by JKomp on August 23, 2026 at 10:49 pm

    I'm writing a translator from OmniGraffle (left diagram) to tikz and I've run into a bit of a problem for translating lines (right diagram). Lines in OmniGraffle are specified as a start point, middle vertices and an ending point. I can replicate the exact shape of the line from the OmniGraffle points by using tikz plot/coordinates in a draw but I'm unsure how to change the code to end at the shape boundary. Here's my MWE \documentclass{article} \usepackage{tikz} \begin{document} \begin{tikzpicture} \draw (36pt,-36pt) circle [radius=36pt ] node [] (S0) { S0}; \draw[red] plot [smooth, tension=1] coordinates { (S0) (-17.600000262260437pt, 3.89259546372341pt) (15.955999737740058pt, 28.233391483626292pt) (S0)}; \draw[red] plot [smooth, tension=1] coordinates { (36pt, -36pt) (87.40297565709261pt, 7.120001628994942pt) (57.999990582466125pt, 25.534386508502394pt) (36pt, -36pt)}; \draw[red] plot [smooth, tension=1] coordinates { (36pt, -36pt) (-15.128618137809553pt, -70.48571669739613pt) (10.699999623000622pt, -91.0802335745775pt) (36pt, -36pt)}; \end{tikzpicture} \end{document} Note, this is an early phase so things like line widths, arrowheads, text formatting, and converting out of pt coordinates are later tasks.