Hot
- After compiling the TeX file, the PDF file is not savedby ThomasO on July 2, 2025 at 4:41 am
Compiling: LaTeX->dvips->distiller This process creates a PDF file. I use AcroTeX packages that allow the following lines, among others: \begin{docassembly} \insertPreDocAssembly aebTrustedFunctions(this, aebSaveAs, "Save"); \end{docassembly} Until a few days ago, this meant that the PDF document was saved at the end. Now that the document is no longer saved automatically, this must be done manually before each further compilation process, otherwise Distiller cannot create the new PDF. Does anyone know how this problem can be solved so that the PDF is saved automatically again? Many thanks in advance for any helpful ideas.
- How to draw a two-mass spring-damper system in latex for my academic paperby Sajid Mahfuz on July 1, 2025 at 11:06 pm
I'm trying to recreate a diagram for my research paper using TikZ in LaTeX. It’s a vertical mechanical system showing a base-excited spring-damper setup with two masses: one representing the wings and one for the body of a flapping-wing aerial vehicle.
- How can I convert LaTeX to some text format preserving the section numbering?by homocomputeris on July 1, 2025 at 9:01 pm
A simple LaTeX document like \begin{document} \section{One} Text. \section{Two} More text. \end{document} will be compiled into a PDF with numbered sections, like 1 One Text. 2 Two More text. Is there a way to convert the .tex source to any more or less plain text format that would have numbered sections?
- How to interface the tikz key system with lua?by Jasper on July 1, 2025 at 7:54 pm
I am trying to get the solution in https://tex.stackexchange.com/a/747040/319072 to work for some tikz commands I am making, but am running into roadblocks when it comes to implementing a tikz key interface (built on pgfkeys). I want to use many optional keys in a command, but I don't know how to properly interface them with lua commands. With lua commands, I only really know how to accept mandatory parameters, namely integers. I want feedback on my attempt to implement a basic parametric curve generator. My goal is to interface the "pgfkeys" (actually, the tikz keys) with the lua. Yes, I know that it doesn't follow the linked post, but I couldn't get that post to work with the tikz key interface, hence my mwe being the way it is. % texse.tex % arara: lualatex \documentclass{article} \usepackage{texse} \begin{document} \begin{tikzpicture} \appendcurve[ u min = 0 ,u max = 2*math.pi ,u samples = 36 ,fx = { 2 * math.cos(u) / 0.7 } ,draw options = { red ,ultra thick } ]{name} \rendersegments \end{tikzpicture} \end{document} % texse.sty \NeedsTeXFormat{LaTeX2e}[1994/06/01] \ProvidesPackage{texse}[ 2025/07/01 v0.01 LaTeX package for a TeX.SE question. ] \RequirePackage{tikz} \tikzset{ u min/.estore in = \tikz@umin ,u max/.estore in = \tikz@umax ,u samples/.estore in = \tikz@usamples ,fx/.code n args = {1} {\edef\tikz@fx{"#1"}} ,fy/.code n args = {1} {\edef\tikz@fy{"#1"}} ,fz/.code n args = {1} {\edef\tikz@fz{"#1"}} ,draw options/.code n args = {1} {\edef\tikz@drawoptions{"#1"}} ,u min = 0 ,u max = 5 ,u samples = 5 ,fx = math.cos(u) ,fy = math.sin(u) ,fz = 0 ,draw options = {"line cap = round"} } \newcommand{\appendcurve}[2][]{ \begingroup \tikzset{#1} \directlua{ local texse = require "texse" texse.append_curve{ u_start = \tikz@umin, u_end = \tikz@umax, u_samples = \tikz@usamples, fx_str = \tikz@fx, fy_str = \tikz@fy, fz_str = \tikz@fz, draw_options = \tikz@drawoptions, name = #2 } } \endgroup } \newcommand{\rendersegments}{ \begingroup \directlua{ local texse = require "texse" texse.render_segments() } \endgroup } -- texse.lua local texse = {} local segments = {} function texse.append_curve(hash) local u_start = tonumber(hash.u_start) local u_end = tonumber(hash.u_end) local u_samples = tonumber(hash.u_samples) local fx_str = load(("return function(u) return %s end"):format(hash.fx_str))() local fy_str = load(("return function(u) return %s end"):format(hash.fy_str))() local fz_str = load(("return function(u) return %s end"):format(hash.fz_str))() local draw_options = hash.draw_options local name = hash.name local u_step = (u_end - u_start) / (u_samples - 1) local function parametric_curve(u) return {fx_str(u),fy_str(u),fz_str(u),1} end for i = 0, u_samples - 2 do local u = u_start + i * u_step local A = parametric_curve(u) local B = parametric_curve(u+u_step) table.insert(segments,{{A,B}, draw_options, name}) end end function texse.render_segments() for _, seg in ipairs(segments) do S, E = seg[1][1], seg[1][2] tex.sprint( "\\draw["..seg[2].."]".. string.format( '(%f,%f) -- (%f,%f);' ,S[1],S[2],E[1],E[2] ) ) end segments = {} end return texse
- Writing tab spaces to an external file with `newfile`by Colas on July 1, 2025 at 7:43 pm
I would like to write some text including tab spaces in an external file. I've tried the following MWE but it does not work: \documentclass{article} \usepackage{newfile} \newoutputstream{test} \openoutputfile{test.py}{test} \begin{document} \begin{writeverbatim}{test} def test(): return "This a test" \end{writeverbatim} \closeoutputstream{test} \end{document} Here is the content of the file test.py produced by the package newfile: Note that the tab space has disappeared. I have double-checked that I have a tab space in the .tex file. PS: My goal is to write some programs in my .tex file which will be copied in an external file. PPS: I use TeXShop, TeX Live 2025, macOS 15.5 PPPS: Here is the console output: This is pdfTeX, Version 3.141592653-2.6-1.40.27 (TeX Live 2025) (preloaded format=pdflatex) restricted \write18 enabled. entering extended mode (./bac_a_sable.tex LaTeX2e <2024-11-01> patch level 2 L3 programming layer <2025-01-18> (/usr/local/texlive/2025/texmf-dist/tex/latex/base/article.cls Document Class: article 2024/06/29 v1.4n Standard LaTeX document class (/usr/local/texlive/2025/texmf-dist/tex/latex/base/size10.clo)) (/usr/local/texlive/2025/texmf-dist/tex/latex/xpatch/xpatch.sty (/usr/local/texlive/2025/texmf-dist/tex/latex/l3kernel/expl3.sty (/usr/local/texlive/2025/texmf-dist/tex/latex/l3backend/l3backend-pdftex.def)) (/usr/local/texlive/2025/texmf-dist/tex/latex/l3packages/xparse/xparse.sty) (/usr/local/texlive/2025/texmf-dist/tex/latex/etoolbox/etoolbox.sty)) (/usr/local/texlive/2025/texmf-dist/tex/latex/newfile/newfile.sty (/usr/local/texlive/2025/texmf-dist/tex/latex/tools/verbatim.sty)) (./bac_a_sable.aux) (./bac_a_sable.aux) ) No pages of output. Transcript written on bac_a_sable.log.
- Explode a group of slices in pgf pieby Papagon on July 1, 2025 at 6:39 pm
on this tikzpicture, there are two exploded slices, but I would like them to be exploded "together", as a group. How may I do that? \documentclass[tikz, border=5pt]{standalone} \usepackage{amsmath} \usepackage{tikz,pgf-pie} \begin{document} \begin{tikzpicture}[scale=0.36] \pie[color={gray,white,white,gray,white},explode={0.2,0.2,0,0,0},hide number]{10,25,15,15,35}; \end{tikzpicture} \end{document} Thank you!
- Would using a different editor to complie a PDF prevent "corruptions"/"drawing errors" when attempting to print the PDF?by Dr. Nate on July 1, 2025 at 6:02 pm
I have published a book on Amazon and IngramSpark. I have been using TexShop to compile with XeLaTex. The IngramSpark printers have had no problems with my PDF. For long stretches, I have sold print copies on Amazon, but twice now, they suddenly say my PDF is corrupt on the same page: The interior file is corrupt and cannot complete in production. While reviewing the file we found there was a drawing error on PDF Page 352. Resolution: Please create a new PDF from the native file, using a new PDF producer. This should be a new file, with a new name, and should not be a resave over the previous file. When creating a new PDF, please follow the "Print to PDF" section of the following resource: https://kdp.amazon.com/en_US/help/topic/G202145060 My early physical proof copies show no errors on the page they mention. They have no problem with the eBook. The first time I fixed the problem (or so I thought), I trashed the aux files and compiled from scratch in TeXShop. I also changed the image on that page from a PGFPlots vector image to a PNG screenshot because I thought a drawing error referred to an image issue. They also made me change all my fonts to outlines because Libertinus wasn't on their list. I Printed to PDF (as Amazon KDP wants) using my Mac's Previewer app. Since the page has those two changes and is coming back with the same problem, I guess I do need to use a new PDF producer like they say. Would using a different editor to compile a PDF prevent "corruptions"/"drawing errors" when attempting to print the PDF? If so, please advise on which editor I should use on my Mac. Alternatively, give any advice, including on different ways to Print to PDF if you think that is the issue. At the moment, TEXstudio and Texifier are at the top of my consideration list. More possibly relevant info: Going to the link they provide, you can see they prefer that submitted files are optimized. I did not do that because the original file was only 33 MB and I didn't want to reduce the resolution of images. The second time I submitted, I used Adobe Acrobat Pro to make a PDF/X-1a compliant PDF, but their Print to PDF step makes it non-compliant.
- setboardfontencoding LSBC4 results in ! LaTeX Error: Encoding scheme `LSBC4' unknownby Klaus on July 1, 2025 at 5:53 pm
I found an example which should create an animated chess board. But I got an error with the line: \setboardfontencoding{LSBC4} Results in: LaTeX Error: Encoding scheme `LSBC4' unknown. \documentclass{article} % Note: you only need to load xskak, % not the skak or chessboard packages. \usepackage{xskak} \usepackage{animate} \begin{document} \newskaklanguage{german}{KDTLSB}\skaklanguage[german]% \setchessboard{boardfontsize=0.8cm,shortenend=5pt, margin=false}% %\setboardfontencoding{LSBC4}% <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< \newskaklanguage{german}{KDTLSB}\skaklanguage[german]% % \newcommand\getmovestyle[1]{% \ifthenelse {\equal{#1}{N}}%knight move {\def\mymovestyle{[clockwise=false,style=knight]curvemove}} {\ifthenelse {\equal{#1}{}}% castling {\def\mymovestyle{curvemove}} {\def\mymovestyle{straightmove}}}}% % \newchessgame[white=Paethz,black=Dirr,result=0-1,id=anim]% \hidemoves{% 1.d4 Sf6 2.c4 g6 3.Sc3 Lg7 4.e4 d6 5.Sge2 O-O 6.Sg3 c6 7.Le2 a6 8.a4 a5 9.h4 h5 10.Le3 Sa6 11.f3 e5 12.d5 Sd7 13.Sf1 Sdc5 14.Sd2 Db6 15.Db1 Sb4 16.Sb3 Scd3+ 17.Kd2 Dxe3+}% % \unitlength0.8cm\relax \begin{animateinline}[autoplay,loop,controls]{0.5}% \begin{picture}(11,11) \put(1.5,1.5){\chessboard[setfen=\xskakgetgame{initfen}]}% \end{picture} \newframe \xskakloop{% \getmovestyle{\xskakget{piecechar}}% \begin{picture}(11,11) \put(1.5,1.5){% \chessboard[pgfstyle=\mymovestyle, color=blue, pgfshortenend=0.3em,arrow=to, markmoves=\xskakget{move}, coloremph,piececolor=blue, emphfields={\xskakget{moveto}}, setfen=\xskakget{nextfen}]}% \end{picture}% \newframe}% \begin{picture}(11,11) \put(1.5,1.5){\chessboard[setfen=\xskakgetgame{lastfen}]}% \end{picture} \end{animateinline} \end{document} I am using pdflatex If I comment the line out, I get a animated pdf as expected. It also works with okular under linux. Fine! What to do to get the font encoding o work?
- Reading CSV file with a particular requirementby user404708 on July 1, 2025 at 5:03 pm
\documentclass{article} \usepackage{csvsimple} \begin{document} \begin{filecontents*}{fruit.csv} Name,Quantity Apples,30 Pears,25 Lemons,40.5 Peaches,34.5 Cherries,20 \end{filecontents*} \csvreader[separator=comma]{fruit.csv}{Name = \Name, Quantity = \Quantity}{\Quantity/\Name, } \end{document} The output of the above code is: 30/Apples, 25/Pears, 40.5/Lemons, 34.5/Peaches, 20/Cherries, But for a particular application, I need the output as follows (i.e., omitting the last comma at the end): 30/Apples, 25/Pears, 40.5/Lemons, 34.5/Peaches, 20/Cherries For this, how do I need to code \csvreader[]{}{}?
- Definining "property" environment that has a tag to refer toby Mag Vargas on July 1, 2025 at 4:54 pm
I want to define a new environment called property similar to the equation environment in the sense that it has a customisable \tag to which I can refer to later. Here's an example of how I have done it before: \documentclass{article} \usepackage{amsmath, amsthm} \usepackage{hyperref} \usepackage{cleveref} \makeatletter \newcommand{\leqnomode}{\tagsleft@true\let\veqno\@@leqno} \newcommand{\reqnomode}{\tagsleft@false\let\veqno\@@eqno} \makeatother \theoremstyle{plain} \newtheorem{theorem}{Theorem} \newenvironment{property}[1][$\star$]{\begin{equation*}\tag{$#1$} \begin{minipage}{0.80\linewidth}}{\end{minipage}\end{equation*}} \crefname{property}{property}{properties} \Crefname{property}{Property}{Properties} \begin{document} \begin{theorem} This is a theorem. I have some set $Y$ such that the following property holds true: \begin{equation} \tag{$*$} \label{statement} \leqnomode \parbox{0.75\linewidth}{For any $y \in Y$ we have that $\overline{y}\neq y$} \end{equation} \end{theorem} \begin{proof} This is a proof. By property (\ref{statement}), the statement is trivial. \end{proof} \end{document} and how it turned out The reason I want to do this is so I can then use the cleveref package and refer to statement and have it show as "property (*)" My goal is to have only have the text and inline math be written within the property environment, so the syntax should/could be something like \begin{property}{*}\label{statement} For any $y \in \Y$ we have that $\overline{y}\neq y$ \end{property} This is what I tried so far \documentclass{article} \usepackage{amsmath, amsthm} \usepackage{hyperref} \usepackage{cleveref} \makeatletter \newcommand{\leqnomode}{\tagsleft@true\let\veqno\@@leqno} \newcommand{\reqnomode}{\tagsleft@false\let\veqno\@@eqno} \makeatother \theoremstyle{plain} \newtheorem{theorem}{Theorem} \newenvironment{property}[1][$\star$]{\begin{equation*}\tag{$#1$} \begin{minipage}{0.80\linewidth}}{\end{minipage}\end{equation*}} \crefname{property}{property}{properties} \Crefname{property}{Property}{Properties} \begin{document} \begin{theorem} This is a theorem. I have some set $Y$ such that the following property holds true: \begin{property}[*] \label{statement} \leqnomode For any $y \in Y$ we have that $\overline{y}\neq y$ \end{property} \end{theorem} \begin{proof} This is a proof. By \cref{statement}, the statement is trivial. \end{proof} \end{document} which turned out like How should I go on about this?
- chess skak and xskak, unable to set language for inputby Klaus on July 1, 2025 at 3:51 pm
I am starting with chessboards right now and I strugling with the very basics... How to set the input language? \documentclass{article} % Note: you only need to load xskak, % not the skak or chessboard packages. \usepackage{xskak} \begin{document} % This \chessboard command draws % an empty chess board: the option % showmover=false will be discussed % later in the article \chessboard[showmover=false] % The \newchessgame command % initializes a new game: \newchessgame % Because a new game was initialized, % \chessboard now draws a % board with chess pieces: \chessboard[language=german] The small white square to the right of the second board is called the \textit{mover}. \newchessgame %\mainline[]{ 1.e4 e5 2.Sc3} <<< how to set German input. Currently the package did not recognize "S" for knight \mainline[]{ 1.e4 e5 2.Nc3} % it still requires English notation \showboard % A skak package command. Future examples will use \chessboard[...] \end{document} How can I use German in this example?
- Grid with rounded cornersby Daniel Neskorodov on July 1, 2025 at 3:28 pm
I continue working on the project mentioned here (dynamic height of tikzpicture). Now I need to draw a grid inside of the box after a text. Although drawing most of the grid is easy, I face a problem with the last horizontal line. Since I have rounded corners, there's a case when the last line should start at a rounded line, but I have troubles drawing that. Here's what I mean: I tried to code it using simple maths, but for some reason it still doesn't work. I also have the same problem with the ending of the line. My code is: \documentclass{article} \usepackage[a4paper,top=20mm, bottom=20mm, left=10mm, right=10mm]{geometry} \usepackage{tikz} \usepackage{lipsum} \usepackage{xcolor} \usepackage{pgf} \makeatletter \newcommand{\textwidthVal}{\strip@pt\textwidth} \makeatother \definecolor{checkeredgray}{HTML}{b3b3b3} \newlength{\remaining} \newcommand{\problem}[1]{ #1\\ \setlength{\remaining}{\dimexpr \textheight - \pagetotal\relax} \def\offset{5} \def\size{0.5} \def\radius{10} \def\lineWidth{0.3} \pgfmathsetmacro{\coef}{0.0352778} \pgfmathsetmacro{\remainingMM}{(\remaining - \offset - 1)*\coef} \pgfmathtruncatemacro{\numberOfLines}{\remainingMM / \size} \noindent\begin{tikzpicture} \draw[rounded corners=\radius,checkeredgray,line width=\lineWidth mm] (0,0) -- (0,-\remaining + \offset) -- (\textwidth,-\remaining + \offset) -- (\textwidth,0) -- cycle; \foreach \i in {1,...,37}{ \draw[checkeredgray,line width=\lineWidth mm] (\i*\size,0) -- (\i*\size,-\remaining + \offset); } \pgfmathtruncatemacro{\numberOfLinesMinusOne}{\numberOfLines - 1} \foreach \i in {1,...,\numberOfLinesMinusOne}{ \draw[checkeredgray,line width=\lineWidth mm] (0,-\i*\size) -- (\textwidth,-\i*\size); } \pgfmathsetmacro{\lastY}{\numberOfLines * \size} \pgfmathsetmacro{\cornerLimit}{(\remaining - \offset - \radius)*\coef} \pgfmathsetmacro{\xStartLast}{\radius*\coef - sqrt((\radius*\coef)^2 - (\lastY - \cornerLimit)^2)} \pgfmathsetmacro{\xFinishLast}{\textwidthVal*\coef - \xStartLast} \pgfmathparse{\cornerLimit < \lastY} \ifnum\pgfmathresult=1 \draw[checkeredgray,line width=\lineWidth mm] (\xStartLast,-\lastY) -- (\xFinishLast,-\lastY); \else \draw[checkeredgray,line width=\lineWidth mm] (0,-\lastY) -- (\textwidth,-\lastY); \fi \end{tikzpicture} } \begin{document} \problem{\lipsum[1]\vspace{1.15cm}} \lipsum[2] \end{document} How do I fix the last line?
- How to plot curve given implicitlyby Apollonius on July 1, 2025 at 3:21 pm
How do I use pgfplots to plot something like this? as you can see, this is the locus of the curve $x^2y+xy^2-x^4-y^4=0$. Here is an example which did work, where my work-around was to use a parametrisation of the curve. However, ideally I'm looking for a more direct solution. \documentclass[tikz, border=1cm]{standalone} \usepackage{pgfplots} \pgfplotsset{compat=1.18} \begin{document} \begin{tikzpicture} \begin{axis}[ axis lines=none, ] \addplot[ domain=-1.20:1.20, samples=100, smooth, black, variable=t, ] ({t^2 - 1}, {t^3 - t}); \end{axis} \end{tikzpicture} \end{document}
- Same file gives different results with and without `standalone`by Jepessen on July 1, 2025 at 1:28 pm
I'm trying to add a tikz image into a document. The .tex file that contains the image is the following one: \documentclass[tikz,border=2cm]{standalone} \usepackage{pgf-umlcd} \usepackage{xcolor} % Conditional color definitions \ifstandalone \definecolor{entitycolor}{RGB}{70, 130, 180} % Steel Blue \definecolor{controllercolor}{RGB}{255, 140, 0} % Dark Orange \definecolor{sensorcolor}{RGB}{34, 139, 34} % Forest Green \definecolor{kinematiccolor}{RGB}{220, 20, 60} % Crimson \definecolor{environmentcolor}{RGB}{138, 43, 226} % Blue Violet \definecolor{backgroundcolor}{RGB}{245, 245, 245} % Light Gray \definecolor{shadowcolor}{RGB}{180, 180, 180} % Medium Gray \fi \begin{document} \begin{tikzpicture}[ % Custom styles drop shadow/.style={ shadow xshift=0.2cm, shadow yshift=-0.2cm, shadow blur steps=8, shadow blur extra rounding=0.05cm, fill=shadowcolor!30 }, entity style/.style={ fill=entitycolor!20, draw=entitycolor!80, line width=2pt, rounded corners=5pt }, controller style/.style={ fill=controllercolor!20, draw=controllercolor!80, line width=2pt, rounded corners=5pt }, sensor style/.style={ fill=sensorcolor!20, draw=sensorcolor!80, line width=2pt, rounded corners=5pt }, kinematic style/.style={ fill=kinematiccolor!20, draw=kinematiccolor!80, line width=2pt, rounded corners=5pt }, environment style/.style={ fill=environmentcolor!20, draw=environmentcolor!80, line width=2pt, rounded corners=5pt } ] % Background with gradient - adjusted for better scaling \fill[backgroundcolor] (-3.5, -7) rectangle (17, 10); % Add some decorative elements \foreach \i in {-2,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17} \fill[entitycolor!10] (\i, 9) circle (0.1); \foreach \i in {-2,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17} \fill[entitycolor!10] (\i, -7) circle (0.1); % Title \node[font=\Large\bfseries, color=entitycolor!80] at (7.25, 8.3) {Entity Component Model}; % Components with custom styles \begin{class}[text width=4.5cm, entity style]{Entity}{6, 3} \attribute{\textbf{+state: State}} \attribute{-kinematicModel: KinematicModel} \attribute{-controller: Controller} \attribute{-sensors: Sensor[]} \operation{+update(): void} \operation{+getState(): State} \end{class} \begin{interface}[text width=4cm, controller style]{Controller}{0, 2.5} \operation{+control(): void} \operation{+setTarget(): void} \operation{+getCommands(): Command[]} \end{interface} \begin{class}[text width=4.5cm, kinematic style]{KinematicModel}{6, -3} \attribute{-position: Vector3} \attribute{-velocity: Vector3} \attribute{-acceleration: Vector3} \operation{+updatePosition(): void} \operation{+applyForces(): void} \end{class} \begin{class}[text width=4cm, sensor style]{Sensor}{6, 7.5} \attribute{-sensorType: SensorType} \attribute{-data: SensorData} \operation{+read(): SensorData} \operation{+calibrate(): void} \end{class} \begin{class}[text width=4.5cm, environment style]{VirtualEnvironment}{13, 2.5} \attribute{-objects: GameObject[]} \attribute{-physics: PhysicsEngine} \operation{+simulate(): void} \operation{+getState(): EnvironmentState} \end{class} \begin{class}[text width=5.5cm, environment style]{VirtualEnvironmentCollisor}{13, -3} \attribute{-collisionBounds: BoundingBox} \attribute{-materialProperties: Material} \operation{+checkCollision(): boolean} \operation{+resolveCollision(): void} \operation{+applyConstraints(): void} \end{class} % Enhanced connectors with custom styles \composition[color=entitycolor!70, line width=1.5pt]{Entity}{}{1}{Controller} \composition[color=entitycolor!70, line width=1.5pt]{Entity}{}{1}{KinematicModel} \composition[color=entitycolor!70, line width=1.5pt]{Entity}{}{1..*}{Sensor} \unidirectionalAssociation[color=controllercolor!70, line width=1.5pt]{Controller}{control}{uses}{KinematicModel} \association[color=controllercolor!70, line width=1.5pt]{Controller}{reads}{}{Sensor}{data}{} \unidirectionalAssociation[color=sensorcolor!70, line width=1.5pt]{Sensor}{observes}{}{VirtualEnvironment} \unidirectionalAssociation[color=environmentcolor!70, line width=1.5pt]{VirtualEnvironment}{manages}{}{VirtualEnvironmentCollisor} \unidirectionalAssociation[color=kinematiccolor!70, line width=1.5pt]{KinematicModel}{interacts}{}{VirtualEnvironmentCollisor} \unidirectionalAssociation[color=environmentcolor!70, line width=1.5pt]{VirtualEnvironmentCollisor}{affects}{}{Entity} % Add some decorative frames - adjusted coordinates \draw[entitycolor!50, line width=3pt, rounded corners=10pt] (-3.5, -7) rectangle (17, 10); \draw[entitycolor!30, line width=1.5pt, rounded corners=8pt] (-3, -6.5) rectangle (16.5, 9.5); \end{tikzpicture} \end{document} If I build with pdflatex I obtain the following result: Now I want to integrate the image into the main file with: \begin{figure} \centering \scalebox{0.6}{\input{images/tikz/entity-component-model.tex}} \caption{Components diagram of an entity.} \label{fig:entity-component-model} \end{figure} But the image is different: As you can see the dimensions of the external box are different and on the bottom part it's not correct. How can I fix it?
- Remove "continued" from long table captionby Martin Šudoma on July 1, 2025 at 12:36 pm
I'm writing to ask if someone could help me figure out how to remove the word "continued" from the caption of a chart that appears below a long table, and also how to make the entire caption title appear in a larger font. It seems to be smaller than the font size set in the document (10pt). I know that the caption should normally be placed above the table, but I want to mimic an internal document format for automation purposes. Thank you for any advice. \documentclass{article} \usepackage{geometry} \usepackage{xcolor} \usepackage{lmodern} % Tabularray \usepackage{tabularray} \usepackage{booktabs} %\UseTblrLibrary{longtblr} %\UseTblrLibrary{color} \definecolor{Stad_b}{RGB}{11, 63, 117} \definecolor{Stad_w}{RGB}{255, 255, 255} \definecolor{Stad_g}{RGB}{245, 245, 245} \NewTblrTheme{fancy}{ % \SetTblrStyle{caption-tag}{red} % \DefTblrTemplate{caption}{default}{} % Removes a caption % \DefTblrTemplate{capcont}{default}{} % Removes a caption on subsequent pages \DefTblrTemplate{contfoot}{default}{} % Removes text denoting continuation on next \DefTblrTemplate{firsthead,middlehead,lasthead}{default}{ } % \DefTblrTemplate{firstfoot}{default}{ % \UseTblrTemplate{contfoot}{default} % \UseTblrTemplate{caption}{default} % } % \DefTblrTemplate{middlefoot}{default}{ % \UseTblrTemplate{contfoot}{default} % \UseTblrTemplate{capcont}{default} % } \DefTblrTemplate{lastfoot}{default}{ \UseTblrTemplate{note}{default} \UseTblrTemplate{remark}{default} \UseTblrTemplate{capcont}{default} } } \NewDocumentEnvironment{table_complex_long}{m o o}{% % \begin{table}[!ht] \centering \fontsize{9}{8}\selectfont \begin{longtblr}[ theme = fancy, caption = {#2}, label = {#3}, % note{a} = {It is the first footnote.}, ]{ colspec={#1}, rowhead = 1, rowsep=4pt, % <-- hlines, % vlines, row{1}={bg={Stad_b}, fg={Stad_w}, font=\bfseries}, vline{2-10}={1}{white} } }{% \end{longtblr} % \IfValueT{#2}{Table 3.1: #2\par} % \IfValueT{#2}{\caption{#2}} % \IfValueT{#3}{\label{#3}} % \end{table} } \begin{document} \begin{table_complex_long}{X[l, 10cm]| X[c, 4cm]| X[c]}[Overview of components][tab:overview_comp] Name & Assembly drawing & Chapter \\ \SetCell[c=3]{c} \textbf{Car Body Interfaces} \\ Crashmodul Einbau & PR\_5210321 & 5.1.3 \\ Frontschuerze Einbau & PR\_5382929 & 5.1.3 \\ Abdeckung komplett & PR\_5944568 & 5.1.3 \\ \SetCell[c=3]{c} \textbf{Driver’s cab} \\ Haltegriff Einbau Notausstieg & PR\_5302811 & 5.2.1 \\ Begleitersitz Einbau & PR\_5407185 & 5.2.2 \\ Elektrodisposition Einbau Fahrerstand & PR\_5317103 & 5.2.3 \\ \SetCell[c=3]{c} \textbf{Passenger Compartment} \\ Trittleiste Einbau & PR\_5344722 & 5.3.13 \\ Gepaeckablagen Einbau EW & PR\_5261209 & \SetCell[r=3]{c} 5.3.14 \\ Gepaeckablagen Einbau MWC & PR\_5261212 & \\ Gepaeckablagen Einbau MWD & PR\_5261213 & \\ Seitenwandtisch Einbau Winter EW & PR\_5260959 & 5.3.15 \\ Haltegriff Einbau Notausstieg & PR\_5302811 & 5.2.1 \\ Begleitersitz Einbau & PR\_5407185 & 5.2.2 \\ Elektrodisposition Einbau Fahrerstand & PR\_5317103 & 5.2.3 \\ Haltegriff Einbau Notausstieg & PR\_5302811 & 5.2.1 \\ Begleitersitz Einbau & PR\_5407185 & 5.2.2 \\ Elektrodisposition Einbau Fahrerstand & PR\_5317103 & 5.2.3 \\ Haltegriff Einbau Notausstieg & PR\_5302811 & 5.2.1 \\ Begleitersitz Einbau & PR\_5407185 & 5.2.2 \\ Elektrodisposition Einbau Fahrerstand & PR\_5317103 & 5.2.3 \\ Haltegriff Einbau Notausstieg & PR\_5302811 & 5.2.1 \\ Begleitersitz Einbau & PR\_5407185 & 5.2.2 \\ Elektrodisposition Einbau Fahrerstand & PR\_5317103 & 5.2.3 \\ Haltegriff Einbau Notausstieg & PR\_5302811 & 5.2.1 \\ Begleitersitz Einbau & PR\_5407185 & 5.2.2 \\ Elektrodisposition Einbau Fahrerstand & PR\_5317103 & 5.2.3 \\ Haltegriff Einbau Notausstieg & PR\_5302811 & 5.2.1 \\ Begleitersitz Einbau & PR\_5407185 & 5.2.2 \\ Elektrodisposition Einbau Fahrerstand & PR\_5317103 & 5.2.3 \\ Haltegriff Einbau Notausstieg & PR\_5302811 & 5.2.1 \\ Begleitersitz Einbau & PR\_5407185 & 5.2.2 \\ Elektrodisposition Einbau Fahrerstand & PR\_5317103 & 5.2.3 \\ Haltegriff Einbau Notausstieg & PR\_5302811 & 5.2.1 \\ Begleitersitz Einbau & PR\_5407185 & 5.2.2 \\ Elektrodisposition Einbau Fahrerstand & PR\_5317103 & 5.2.3 \\ Haltegriff Einbau Notausstieg & PR\_5302811 & 5.2.1 \\ Begleitersitz Einbau & PR\_5407185 & 5.2.2 \\ Elektrodisposition Einbau Fahrerstand & PR\_5317103 & 5.2.3 \\ Haltegriff Einbau Notausstieg & PR\_5302811 & 5.2.1 \\ Begleitersitz Einbau & PR\_5407185 & 5.2.2 \\ Elektrodisposition Einbau Fahrerstand & PR\_5317103 & 5.2.3 \\ Haltegriff Einbau Notausstieg & PR\_5302811 & 5.2.1 \\ Begleitersitz Einbau & PR\_5407185 & 5.2.2 \\ Elektrodisposition Einbau Fahrerstand & PR\_5317103 & 5.2.3 \\ Haltegriff Einbau Notausstieg & PR\_5302811 & 5.2.1 \\ Begleitersitz Einbau & PR\_5407185 & 5.2.2 \\ Elektrodisposition Einbau Fahrerstand & PR\_5317103 & 5.2.3 \\ Haltegriff Einbau Notausstieg & PR\_5302811 & 5.2.1 \\ Begleitersitz Einbau & PR\_5407185 & 5.2.2 \\ Elektrodisposition Einbau Fahrerstand & PR\_5317103 & 5.2.3 \\ Haltegriff Einbau Notausstieg & PR\_5302811 & 5.2.1 \\ Begleitersitz Einbau & PR\_5407185 & 5.2.2 \\ Elektrodisposition Einbau Fahrerstand & PR\_5317103 & 5.2.3 \\ Haltegriff Einbau Notausstieg & PR\_5302811 & 5.2.1 \\ Begleitersitz Einbau & PR\_5407185 & 5.2.2 \\ Elektrodisposition Einbau Fahrerstand & PR\_5317103 & 5.2.3 \\ Haltegriff Einbau Notausstieg & PR\_5302811 & 5.2.1 \\ Begleitersitz Einbau & PR\_5407185 & 5.2.2 \\ Elektrodisposition Einbau Fahrerstand & PR\_5317103 & 5.2.3 \\ \end{table_complex_long} \end{document}
- Package breakurl Warningby Mohamed Mohammedi on July 1, 2025 at 10:30 am
I downloaded the Springer template on Overleaf, and during compilation, I received the following warning message: Package breakurl Warning: You are using breakurl while processing via pdflatex. (breakurl) \burl will be just a synonym of \url. on input line 48. Here is the header of my manuscript: % Version 2.1 April 2023 % See section 11 of the User Manual for version history %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% %% %% Please do not use \input{...} to include other tex files. %% %% Submit your LaTeX manuscript as one .tex document. %% %% %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \documentclass[sn-mathphys,Numbered]{sn-jnl} % Math and Physical Sciences Reference Style %%%% Standard Packages \usepackage{hyperref} \usepackage{graphicx} \usepackage{multirow} \usepackage{amsmath,amssymb,amsfonts} \usepackage{amsthm} \usepackage{mathrsfs} \usepackage[title]{appendix} \usepackage{xcolor} \usepackage{textcomp} \usepackage{manyfoot} \usepackage{booktabs} \usepackage{algorithm} \usepackage{algorithmicx} \usepackage{algpseudocode} \usepackage{listings} \usepackage{epstopdf} \usepackage{lscape} \usepackage{natbib} \usepackage{pgfplots} \usepackage{tikz} \usepackage{setspace} \usepackage{color} \usepackage{smartdiagram} \usepackage{float} \usepackage{array} \def\BibTeX{{\rm B\kern-.05em{\sc i\kern-.025em b}\kern-.08em T\kern-.1667em\lower.7ex\hbox{E}\kern-.125emX}} \newcolumntype{L}[1]{>{\raggedright\let\newline\\\arraybackslash\hspace{0pt}}m{#1}} \newcolumntype{C}[1]{>{\centering\let\newline\\\arraybackslash\hspace{0pt}}m{#1}} \newcolumntype{R}[1]{>{\raggedleft\let\newline\\\arraybackslash\hspace{0pt}}m{#1}} \usesmartdiagramlibrary{additions} \usetikzlibrary{shapes.geometric, arrows, positioning, shadows, trees} \tikzset{ basic/.style = {draw, text width=2cm, drop shadow, font=\sffamily, rectangle}, root/.style = {basic, rounded corners=2pt, thin, align=center, fill=green!30}, level 2/.style = {basic, rounded corners=3pt, thin, align=center, fill=green!60, text width=8em}, level 3/.style = {basic, thin, align=left, fill=pink!60, text width=6.5em} } \setcounter{secnumdepth}{4} \setcounter{tocdepth}{3} \makeatletter \newcounter{subsubsubsection}[subsubsection] \renewcommand{\thesubsubsubsection}{\thesubsubsection .\@alph\c@subsubsubsection} \newcommand{\subsubsubsection}{\@startsection{subsubsubsection}{4}{\z@}% {-3.25ex\@plus -1ex \@minus -.2ex}% {1.5ex \@plus .2ex}% {\normalfont\normalsize\bfseries}} \newcommand*\l@subsubsubsection{\@dottedtocline{3}{10.0em}{4.1em}} \newcommand*{\subsubsubsectionmark}[1]{} \makeatother \raggedbottom \pgfplotsset{compat=1.18} \begin{document} Could you please assist me in resolving this issue?
- Unable to quote external references with xr-hyper and hyperrefby paulbou on July 1, 2025 at 10:14 am
When I try to access a referenced link through xr-hyper and hyperref it results in an error. Of course, all my files are in the same directory. The first file is M1.tex : \documentclass{article} \def\Blabla{\count10=450 Bla \def\suite{bla\ \blabla} \def\blabla{\advance\count10 by-1% \ifnum\count10=0 \gdef\suite{\relax}\fi \suite}% \suite} \usepackage{xr-hyper} \usepackage{hyperref} \begin{document} \section{Section 1}\label{M1:Sec1} \Blabla \section{Section 2}\label{M1:Sec2} \Blabla \section{Section 3}\label{M1:Sec3} \Blabla Link to Section 1 of file 1 : \ref{M1:Sec1} Link to Section 2 of file 1 : \ref{M1:Sec2} Everything is fine \end{document} The second file is M2.tex : \documentclass{article} \def\Blabla{\count10=450 Bla \def\suite{bla\ \blabla} \def\blabla{\advance\count10 by-1% \ifnum\count10=0 \gdef\suite{\relax}\fi \suite}% \suite} \usepackage{xr-hyper} \usepackage{hyperref} \externaldocument{M1} % \externaldocument{C:/<Complete path>/M1} % \externaldocument{M1}[C:/<Complete Path>/M1.pdf] \begin{document} \section{Section 1}\label{M2:Sec1} \Blabla \section{Section 2}\label{M2:Sec2} \Blabla \section{Section 3}\label{M2:Sec3} \Blabla Link to Section 1 of file 2 : \ref{M2:Sec1} ; it's OK. Link to Section 2 of file 1 : \ref{M1:Sec2} ; doesn't work ... \end{document} If I use the first code to link the first file \externaldocument{M1} I'm sent to the second section of the second document and not to the first file. When the pointer passes over the link, it however indicates "M1.pdf" but nothing else. If I use any of the three other codes (with the < Complete path > specified one or two times) I get an error : "ShellExecute failed : < Path/file > file not found". The pointer indicates "C:/< Complete path >/M1.pdf#section.2", which seems good but nonetheless leads to an error. The .log file doesn't mention any error... All files .log, .aux, .out, .synctex, .pdf are effectively created... Is it a problem of local configuration or something else ?
- I have always an error with bidiby PaRa__NoRmAl on July 1, 2025 at 9:57 am
So am making my final year report first time with xelatex. i needed bidi for an arabic section and the bidi package always raise this error i know its arrangment issue but i tried all the solution using ai and non has worked someone help please code : \documentclass[12pt,a4paper]{report} % Packages \usepackage{graphicx} \usepackage{float} \usepackage[normalem]{ulem} \usepackage{geometry} \geometry{left=2cm, right=2cm, top=2.5cm, bottom=2.5cm} \usepackage{titlesec} \titleformat{\chapter}[block] {\normalfont\huge\bfseries} {Chapter \thechapter :}{1em}{} \titleformat{\section}{\normalfont\bfseries\fontsize{20}{24}\selectfont}{}{0pt}{} \usepackage{xcolor} \usepackage{polyglossia} \setmainlanguage{english} \setotherlanguages{french,arabic} \usepackage{fontspec} \setmainfont{Times New Roman} \newfontfamily\arabicfont[Script=Arabic]{Amiri} \usepackage{setspace} \singlespacing \setlength{\parindent}{0pt} \usepackage{array} \usepackage{longtable} \usepackage{booktabs} \usepackage{calc} \usepackage{hyperref} \hypersetup{hidelinks,pdfcreator={XeLaTeX}} \usepackage{tocloft} % TOC adjustments \renewcommand{\cftchapfont}{\bfseries} \renewcommand{\cftchappagefont}{} \setlength{\cftchapnumwidth}{0pt} \setlength{\cftchapindent}{0pt} \setlength{\cftsecindent}{1.5em} \setlength{\cftsubsecindent}{3em} \setcounter{secnumdepth}{0} % Suppress numbering for sections and below \setcounter{tocdepth}{2} \renewcommand{\numberline}[1]{} \usepackage{etoolbox} % Required for \AtBeginDocument \AtBeginDocument{\usepackage{bidi}} \begin{document} error message : Package bidi Error: Oops! you have loaded package hyperref after bidi package. Please load package hyperref before bidi package, and then try to run xelatex on your document again.
- Complement Symbolby Friedrich Swun on July 1, 2025 at 8:43 am
How do I show this symbol for a complement of a set?
- Moving forest branches in the next rowby mikebuba on July 1, 2025 at 8:40 am
a similar thread is already discussing the issue here: https://tex.stackexchange.com/a/329794/78526, but I am not sure what the key command is. Is it tier=this? My code is here (updated from https://tex.stackexchange.com/a/746921/78526): \documentclass{article} \usepackage[edges]{forest} % \usetikzlibrary{arrows.meta} \usepackage[T1]{fontenc} \usepackage{array} \newcolumntype{C}[1]{@{}>{\centering}p{#1}@{}} \newcolumntype{L}[1]{@{}>{\raggedright}p{#1}@{}} \forestset{% common/.style={ rounded corners=3pt, draw, inner sep=3pt, fill=white, % align=L{3cm}, % default is left-aligned, 3cm + padding etc. change to C for default centring % align=C{3cm}, % default is centre-aligned, 3cm + padding etc. change to C for default centring minimum height=0.3cm }, shift me/.style={ before computing xy={ l+=#1, }, }, } \begin{document} \footnotesize \centering \hspace*{0in} \begin{forest} for tree={ common, }, where level=0{ align=C{4cm}, % for centre aligned % align=L{3cm}, % for left aligned % s sep'=1cm, % apostrophe makes it faster calign=edge midpoint, }{% folder, grow'=0, if level=1{ before typesetting nodes={child anchor=north}, edge path'={(!u.parent anchor) -| (.child anchor)}, edge+={blend mode=lighten}, % note that this may not display properly in some pdf viewers }{}, } [Title, inner sep=0pt,minimum width=2mm, minimum height=7mm [Section 1, align=C{3.5cm}, % this node is 2cm wide plus padding with centred text shift me=-5mm, % shift this node and all its children up 5mm for children={align=L{3cm}}, % the children are left-aligned, 3cm + padding etc. [Section 1.1, % this node is 2cm wide plus padding with centred text % shift me=-5mm, % shift this node and all its children up 5mm for children={align=L{3cm}}, % the children are left-aligned, 3cm + padding etc. [Section 1.1.1] [Section 1.1.2] ] [Section 1.2, % this node is 2cm wide plus padding with centred text % shift me=-5mm, % shift this node and all its children up 5mm % for children={align=L{3cm}}, % the children are left-aligned, 3cm + padding etc. [Section 1.2.1] [Section 1.2.2] ] [Section 1.3, % this node is 2cm wide plus padding with centred text % shift me=-5mm, % shift this node and all its children up 5mm % for children={align=L{3cm}}, % the children are left-aligned, 3cm + padding etc. [Section 1.3.1] [Section 1.3.2] [Section 1.3.3] ] ] [Section 2, align=C{3.5cm}, % this node is 2cm wide plus padding with centred text % shift me=-5mm, % shift this node and all its children up 5mm for children={align=L{3cm}}, % the children are left-aligned, 3cm + padding etc. [Section 2.1] [Section 2.2] ] [Section 3, align=C{2.5cm}, % this node is 2cm wide plus padding with centred text % shift me=-5mm, % shift this node and all its children up 5mm for children={align=L{3cm}}, % the children are left-aligned, 3cm + padding etc. [Section 3.1] [Section 3.1.1, % this node is 2cm wide plus padding with centred text % shift me=-5mm, % shift this node and all its children up 5mm % for children={align=L{3cm}}, % the children are left-aligned, 3cm + padding etc. [Section 3.1.1.1] [Section 3.1.1.2] ] [Section 3.1.2] ] [Section 4, align=C{2cm}, % this node is 2cm wide plus padding with centred text shift me=-5mm, % shift this node and all its children up 5mm % for children={align=L{3cm}}, % the children are left-aligned, 3cm + padding etc. [Section 4.1] [Section 4.2] ] ] \end{forest} \end{document} I would like to move Section 4 in the next row, like in the figure below: Cross-post: the additional question below is cross-posted as an update to How to centre the parent and the child level, but not anything below? and already has an answer there. [edit by cfr] Additional question: Title and Section 1 blocks have a higher height compared to Section 1.2.1 and Section 1.3.1, etc. The difference is that the Title and Section 1 block use the align=C{3.5cm} attribute, and Section 1.2.1 does not have any attribute next to it. Is it possible to have the title and Section 1 the same height as Section 1.2.1?
- tikzpicture shifted in marginnoteby user2926204 on July 1, 2025 at 6:05 am
When I put a tikzpicture inside a marginnote, the tikzpicture is shifted to the left (see B). Is there a way to put the tikzpicture inside the marginnote? What I really want is to put a tikz rectangle (with text) in marginnote. Using the center environment, the tikzpicture does go into the margin, however it's shifted down (see C). Is there a way to have the tikzpicture automatically appear at the same level as the text in the main body where the margin note is created? Thanks. \documentclass[a4paper, openany,oneside,chapterprefix, 12pt, parskip=full] {scrbook} \setlength{\textwidth}{5in} \setlength{\hoffset}{-0.25in} \setlength{\marginparwidth}{2in} \usepackage{showframe} \usepackage{marginnote} \usepackage{tikz} \begin{document} A. Some text. \marginnote{margin note} B. Some text. \marginnote{\noindent\begin{tikzpicture}[overlay,remember picture] \node[rectangle, draw=red, text width=4cm, minimum width=2cm, line width=0.1cm, inner sep=0.2cm] { {margin note} }; \end{tikzpicture}} C. Some text. \marginnote{\noindent\begin{center} \begin{tikzpicture}[overlay,remember picture] \node[rectangle, draw=red, text width=4cm, minimum width=2cm, line width=0.1cm, inner sep=0.2cm] { {margin note} }; \end{tikzpicture} \end{center} } \end{document}
- Is there a way to automatically align the components in a large matrix without thousands of \hphantom? [duplicate]by Your neighbor Todorovich on July 1, 2025 at 5:34 am
For example, I want to create a simple matrix, \begin{bmatrix} -1 & 1 \\ 1 & -1 \end{bmatrix} But this looks a bit messy visually (especially for larger matrices), However, I want to align the 1s with the 1s, so I write \begin{bmatrix} -1 & \hphantom{-}1 \\ \hphantom{-}1 & -1 \end{bmatrix} This achieves the alignment and looks more visually pleasing. However, usually the matrices are a lot bigger than 2x2 and I find myself copying and pasting \hphantom{-} many many times. It works, but it is very messy. Is there a better way?
- \tikzsetnextfilename (externalize) with \tdplotsetmaincoords (3d-plot) and tikzscaleby Pjanc Matuzl on June 30, 2025 at 6:32 pm
Where is the mistake or incompatibility? If I comment out tikzsetnextfilename everything works as expected. Consider the following setup (Windows machine, MikTeX installation): <project_directory> mwe.tex <-- the main document, see below fig/ <-- figures go here cs/ <-- some folder mwe_3d.tikz <-- tikz picture, see below external/ <-- tikz externalize should put the produced files here ... <-- mwe3d.log etc. are here ... <-- mwe.log etc. are here Contents of mwe.tex: \documentclass{standalone} \usepackage{graphicx} \usepackage{pgfplots} \pgfplotsset{compat=newest} \usepackage{tikz} \usepackage{tikzscale} \usepackage{tikz-3dplot} \usepgfplotslibrary{external} \newcommand{\externaldirectory}{fig/external/} \tikzexternalize[prefix=\externaldirectory,optimize=false,shell escape=-enable-write18] \pgfmathsetmacro{\csxglob}{70} % these variables are reused in a lot of pictures \pgfmathsetmacro{\csyglob}{105} \pgfmathsetmacro{\cssamples}{54} \pgfmathsetmacro{\csradius}{4} \pgfmathsetmacro{\cstheta}{60} \pgfmathsetmacro{\csphi}{55} \begin{document} % in real document, this is in a float etc. \tikzsetnextfilename{mwe3d} % if this is commented out, mwe-figure0.pdf gets successfully produced \includegraphics[width=15cm] % in real document, this is \textwidth {fig/cs/mwe_3d.tikz} \end{document} Contents of mwe_3d.tikz: \tdplotsetmaincoords{\csxglob}{\csyglob} \begin{tikzpicture}[tdplot_main_coords] \coordinate (0) at (0,0,0); \tdplotsetcoord{P}{\csradius}{\cstheta}{\csphi} \node[right] at (P) {$P$}; \draw[thick,->] (0) -- (P); \draw[red] (-10:\csradius) arc (-10:100:\csradius); \end{tikzpicture} While the PDF output seems OK: the compiler throws error and does not produce an mwe3d.pdf within the external directory: <path_to_project>\fig\cs\mwe_3d.tikz:13: Package tikz Error: Sorry, the system call 'pdflatex -enable-write18 -halt-on-error -interaction=batchmode -jobname "fig/external/mwe3d" "\def\tikzexternalrealjob{mwe}\input{mwe}"' did NOT result in a usable output file 'fig/external/mwe3d' (expected one of .pdf:.jpg:.jpeg:.png:). Please verify that you have enabled system calls. For pdflatex, this is 'pdflatex -shell-escape'. Sometimes it is also named 'write 18' or something like that. Or maybe the command simply failed? Error messages can be found in 'fig/external/mwe3d.log'. If you continue now, I'll try to typeset the picture. [\end{tikzpicture}] I call the compilation process with: "pdflatex -halt-on-error -synctex=1 -enable-write18", "bibtex", "makeglossaries", "makeindex", "pdflatex -synctex=1 -enable-write18 -interaction=nonstopmode", "pdflatex -synctex=1 -enable-write18 -interaction=nonstopmode", EDIT: mwe3d.log has these lines towards the end: ! Missing number, treated as zero. <to be read again> \relax l.28 ...degraphics[width=15cm]{fig/cs/mwe_3d.tikz} ^^M A number should have been here; I inserted `0'. (If you can't figure out why I needed to see a number, look up `weird error' in the index to The TeXbook.)
- Getting errors with multirow and siunitx, and uncertainty spacingby JustARando on June 30, 2025 at 3:57 pm
I am trying to use siunitx to write tables. I am coming across two problems. Using Multirow like so: \documentclass[a4paper,12pt]{article} \usepackage{siunitx} \sisetup{separate-uncertainty=true, separate-uncertainty-units=single} \usepackage{threeparttable} \usepackage{booktabs} \usepackage{multirow} \begin{document} \begin{table}[h!] \begin{threeparttable} \caption{Mass balance of the three cycles of extraction.} \begin{tabular}{l l S[table-format=2.2+-2.2] S[table-format=2.2+-2.2] S[table-format=2.2+-2.2] S[table-format=2.2+-2.2] } \toprule \multicolumn{1}{c}{\textbf{Fraction}} & \multicolumn{1}{c}{\textbf{Cycle}} & \multicolumn{1}{c}{\textbf{Mass}} & \multicolumn{1}{c}{\textbf{Proteins}} & \multicolumn{1}{c}{\textbf{Sugars}} & \multicolumn{1}{c}{\textbf{Phenolics}} \\ \midrule \multirow{3}{*}{Solvent} & Cycle 0 & 2.07(5) & 0.15(1) & \multirow{3}{*}{--} & \multirow{3}{*}{--} \\ & Cycle 1 & 2.13(12) & 0.15(0) & & \\ & Cycle 2 & 2.00(8) & 0.15(1) & & \\ \bottomrule \end{tabular} \end{threeparttable} \end{table} \end{document} Generates the error: ! Use of \@@array doesn't match its definition. <argument> \let \reserved@d =[\def \reserved@a ! Use of \\multirow doesn't match its definition. <argument> ...d@d =[\def \reserved@a {\\multirow } If you say, e.g., `\def\a1{...}', then you must always put `1' after `\a', since control sequence names are made up of letters only. ! Illegal parameter number in definition of \l__siunitx_table_collect_tl. <to be read again> I tried to add the array package as noted in this previous question: Use of \@array doesn't match its definition, but to no avail. So to circumvent this, I modify the code by removing the multirow with the under the S type columns and manually put dashes in the middle row, but the spacing for the uncertainty is incorrect, like so: \documentclass[a4paper,12pt]{article} \usepackage{siunitx} \sisetup{separate-uncertainty=true, separate-uncertainty-units=single} \usepackage{threeparttable} \usepackage{booktabs} \usepackage{multirow} \begin{document} \begin{table}[h!] \begin{threeparttable} \caption{Mass balance of the three cycles of extraction.} \begin{tabular}{l l S[table-format=2.2+-2.2] S[table-format=2.2+-2.2] S[table-format=2.2+-2.2] S[table-format=2.2+-2.2] } \toprule \multicolumn{1}{c}{\textbf{Fraction}} & \multicolumn{1}{c}{\textbf{Cycle}} & \multicolumn{1}{c}{\textbf{Mass}} & \multicolumn{1}{c}{\textbf{Proteins}} & \multicolumn{1}{c}{\textbf{Sugars}} & \multicolumn{1}{c}{\textbf{Phenolics}} \\ \midrule \multirow{3}{*}{Solvent} & Cycle 0 & 2.07(5) & 0.15(1) & & \\ & Cycle 1 & 2.13(12) & 0.15(0) & {--} & {--} \\ & Cycle 2 & 2.00(8) & 0.15(1) & & \\ \bottomrule \end{tabular} \end{threeparttable} \end{table} \end{document}
- Correct way of typesetting a "relation" plus a "quantity" in LaTeX?by suckingalemon on June 30, 2025 at 3:15 pm
I need advice with how best to do this. I'm using siunitx to typeset quantities and units in a standard way, but I do not know how to handle approximate quantities. Look at my sentence (complete with minimum working environment) here that involves an approximate value followed by units: \documentclass{article} \usepackage{siunitx} \begin{document} Aryl transmission peaks at \(\approx \SI{820}{\per\cm}\) are also present as expected. \end{document} This gives the following: Here, we see the math mode handling the space between the almost equal to sign and the numerical value (820), and then siunitx handling the spaces between the number (820) and the unit (per centimeter). Sometimes I see articles and books remove the space between things like ≈ and > and the numerical value (e.g., ≈820 cm^-1 or <820). What is the correct way to handle this according to the standards implemented by siunitx?
- Unable to find a match: texlive-moresize on CentOS Stream 9by tail on June 30, 2025 at 1:11 pm
I am trying to install moresize.sty package into my CentOS Stream 9 machine. Unfortunately, when I run this command: sudo dnf install texlive-moresize I will get: Last metadata expiration check: 1:49:03 ago on Mon 30 Jun 2025 01:20:04 PM CEST. No match for argument: texlive-moresize Error: Unable to find a match: texlive-moresize Also, this command: dnf provides '*/moresize.sty' returns: Error: No matches found. If searching for a file, try specifying the full path or using a wildcard prefix ("*/") at the beginning. How do I solve this issue? Also, I performed a full texlive installation but the problem persists.
- Word Grammar diagrams in Latex [closed]by Andrew van der Spuy on June 30, 2025 at 12:38 pm
Can anyone tell me what package I should use in order to draw diagrams like this? Also, could you direct me to an instruction manual that explains how to draw such diagrams? I am currently using tikz-dependency package, with instructions by Daniele ?Pighin, but it only explains how to draw the bottom quarter of such diagrams. I need to be able to draw the upward arrows and the parts where the words are in bold font. Thanks!
- How to *locally* expose lua code in a .sty fileby Jasper on June 30, 2025 at 9:07 am
I want to make latex commands which run lua code. In particular, I want to know how to properly expose this lua code locally to a .sty file, so I don't have to require it in every newcommand. My big underlying goal here is to learn how to properly use lua and latex together. Reference: https://tex.stackexchange.com/a/742410/319072 % test.tex % arara: lualatex \documentclass[border = 1cm]{standalone} \usepackage{test} \begin{document} \begin{tikzpicture} \appendpoint{-1}{0} \appendpoint{1}{0} \appendpoint{0}{-1} \appendpoint{0}{1} \rotatepoints{math.pi/4} \renderpoints \end{tikzpicture} \end{document} % test.sty \NeedsTeXFormat{LaTeX2e}[1994/06/01] \ProvidesPackage{test} [ 2025/06/30 v0.01 LaTeX package for an inquiry on TeX.SE. ] \RequirePackage{tikz} \newcommand{\appendpoint}[2]{ \directlua{ local test = require("test") test.append_point(#1,#2) } } \newcommand{\renderpoints}{ \directlua{ local test = require("test") test.render_points() } } \newcommand{\rotatepoints}[1]{ \directlua{ local test = require("test") test.list_of_points = test.mult( test.list_of_points ,test.rotate(#1) ) } } -- test.lua local test = {} test.list_of_points = {} function test.append_point(x,y) table.insert(test.list_of_points,{x,y,1}) end function test.render_points() for i = 1, #test.list_of_points do tex.print( string.format( [[ \fill (%f,%f) circle[radius = 0.1]; ]] ,test.list_of_points[i][1] ,test.list_of_points[i][2] ) ) end end function test.mult(A,B) local rows_A = #A local columns_A = #A[1] local rows_B = #B local columns_B = #B[1] assert( columns_A == rows_B ,string.format( [[ Wrong size matrices for multiplication. Size A: %f,%f Size B: %f,%f ]] ,rows_A,columns_A ,rows_B,columns_B ) ) local product = {} for row = 1, rows_A, 1 do product[row] = {} for column = 1, columns_B, 1 do product[row][column] = 0 for dot_product_step = 1, columns_A, 1 do product[row][column] = ( product[row][column] + A[row][dot_product_step] * B[dot_product_step][column] ) end end end return product end function test.rotate(angle) return { {math.cos(angle),math.sin(angle),0} ,{math.cos(angle+math.pi/2),math.sin(angle+math.pi/2),0} ,{0,0,1} } end return test
- Babel Arabic kashida justification pushes text oustide of tableby InsightClip on June 30, 2025 at 4:44 am
I would like to have a table with three columns, a different language in each column, all being justified and aligned correctly. The issue I have is with Arabic specifically and what happens when enabling kashida justification, sometimes a line is pushed outside the bounds of the cell like the MWE below. Why is this happening and how can I resolve it? \documentclass[10pt]{article} \usepackage{tabularray} \usepackage{ragged2e} \usepackage[english, provide=*, bidi=basic, layout=counters.tabular]{babel} \babelprovide[import, mapdigits, justification=kashida, transforms=kashida.base]{arabic} \babelprovide[import]{coptic} \babelprovide[import]{greek} \babelfont[arabic]{rm}{Scheherazade New} \babelfont[coptic]{rm}{Antinoou} \babelfont[greek]{rm}{Palatino Linotype} % To justify the arabic when it is right aligned by tabularray \RenewDocumentCommand\TblrAlignRight{}{\RaggedLeft} % ^^a0 is code for U+00A0, which I use to ensure no line breaks happen just before a separator \begin{document} \begin{tblr}{colspec={|X|X|X[r]|}} \begin{otherlanguage}{english} {Sing to the Lord a new song^^a0•︎ O people who love Christ;^^a0•︎ The Lord had compassion upon us^^a0•︎ and has given life to the world.} \end{otherlanguage} & \begin{otherlanguage}{coptic} {Ϩⲱⲥ ⲡⲟ︦ⲥ︦ ϧⲉⲛ ⲟⲩϩⲱⲥ ⲙ̀ⲃⲉⲣⲓ^^a0⳾ ⲱ ⲛⲓⲗⲁⲟⲥ ⲙ̀ⲙⲁⲓⲡⲭ︦ⲥ︦^^a0⳾ ϫⲉ ⲡⲟ︦ⲥ︦ ⲁϥϣⲉⲛϩⲏⲧ ϧⲁⲣⲟⲛ^^a0⳾ ⲟⲩⲟϩ ⲁϥϯ ⲙ̀ⲡⲓⲱⲛϧ ⲙ̀ⲡⲓⲕⲟⲥⲙⲟⲥ} \end{otherlanguage} & \begin{otherlanguage}{arabic} {سبِّحوا الربَّ تسبيحاً جديداً^^a0؞ أيها الشُعوب مُحبي المسيح^^a0؞ فالربُ ترأف علينا^^a0؞ وأعطى الحياةَ للعالم.} \end{otherlanguage} \\ \end{tblr} \end{document} UPDATE Here is the output following Javier's suggestion. It certainly has helped, although it looks like for some other lines, the line is shifted into the table further than before. In the below example, lines 3 and 4 in the Arabic have shifted left by a small amount. \documentclass[10pt]{article} \usepackage{tabularray} \usepackage{ragged2e} \usepackage[english, provide=*, bidi=basic, layout=counters.tabular]{babel} \babelprovide[import, mapdigits, justification=kashida, transforms=kashida.base]{arabic} \babelprovide[import]{coptic} \babelprovide[import]{greek} \babelfont[arabic]{rm}{Scheherazade New} \babelfont[coptic]{rm}{Antinoou} \babelfont[greek]{rm}{Palatino Linotype} % To justify the arabic when it is right aligned by tabularray \RenewDocumentCommand\TblrAlignRight{}{\RaggedLeft} \UseTblrLibrary{varwidth} \def\nbs{\char"00A0} \begin{document} \begin{tblr}{colspec={|X|X|X[r]|},measure=vbox} \begin{otherlanguage}{english} {Sing to the Lord a new song\nbs•︎ O people who love Christ;\nbs•︎ The Lord had compassion upon us\nbs•︎ and has given life to the world.} \end{otherlanguage} & \begin{otherlanguage}{coptic} {Ϩⲱⲥ ⲡⲟ︦ⲥ︦ ϧⲉⲛ ⲟⲩϩⲱⲥ ⲙ̀ⲃⲉⲣⲓ\nbs⳾ ⲱ ⲛⲓⲗⲁⲟⲥ ⲙ̀ⲙⲁⲓⲡⲭ︦ⲥ︦\nbs⳾ ϫⲉ ⲡⲟ︦ⲥ︦ ⲁϥϣⲉⲛϩⲏⲧ ϧⲁⲣⲟⲛ\nbs⳾ ⲟⲩⲟϩ ⲁϥϯ ⲙ̀ⲡⲓⲱⲛϧ ⲙ̀ⲡⲓⲕⲟⲥⲙⲟⲥ} \end{otherlanguage} & \par\vskip-\baselineskip\begin{otherlanguage}{arabic} {سبِّحوا الربَّ تسبيحاً جديداً\nbs؞ أيها الشُعوب مُحبي المسيح\nbs؞ فالربُ ترأف علينا\nbs؞ وأعطى الحياةَ للعالم.} \end{otherlanguage} \\ \end{tblr} \end{document}
- How to type a symbol for the intuitionistic notion of apartnessby Edgar Campos on June 30, 2025 at 3:24 am
I need to type the symbol for the intuitionistic relation of apartness that is different from inequality (\neq or \ne), as it can be seen in this paragraph below: I looked it up in lists of TeX symbols, but I couldn't find anything useful. # bears some resemblance, but it’s not what I’m looking for. Does anyone have an idea on how to get the symbol I need? Thank you in advance for your help.