I need to convert a latex output to an SVG extending to just a figure.
\documentclass{standalone}
%\documentclass{article}
%\pagestyle{empty}
\usepackage{nicematrix,tikz}
\begin{document}
$\begin{pNiceMatrix}[create-medium-nodes]
1 & 2 & -3 \
-2 & 0 & 4
\CodeAfter
\begin{tikzpicture}
\draw (2-3) circle (2cm) ; % just to prove this is visible
\node[right] at (1-3.east) {\quad this is some explanatory text that\
\quad should be displayed in standalone\
\quad on three lines?!\
} ;
\end{tikzpicture}
\end{pNiceMatrix}$
\end{document}
If I use \documentclass{article} I get the figure I want, but embedded in a full page.
If I use \documentclass{standalone} I only get the matrix, not the circle or the text.
- Why does standalone loose some of the figure elements?
- Why are the newlines in the text of the node not honored?
- Any changes to the code above that might yield output cropped to just the figure?
\node[right,align=left]{...}. – AndréC Aug 29 '20 at 06:58{article}, convert latex output to svg, and then crop the svg with inkscape. Clumsy, but at least no manual steps.I do wonder what breaks, though?!
– ea42_gh Aug 29 '20 at 11:11clip=falseinside an axis environment in your tikzpicture, or making all your drawings with\addplot– Blooment Aug 29 '20 at 11:13