I am probably the thousandth person who wants to scale a tikzpicture to the size of \textwidth.
There is a solution for this problem given in https://tex.stackexchange.com/a/6391/193625
however it uses environ. I do not exactly know what that packages offers but it seems that it is redundant with NewDocumentEnvironment of xparse.
- Am I correct that
xparsecould/should be used here? Sadly I still understand LaTeX far to little to translate the older solution myself. Any help is appreciated. - Does anyone know why this is not implemented directly into
tikz/pgf?
Ty for your help.
Franz
(I am interested in a solution that works with the externalize option of tikz.)
\resizebox{\textwidth}{!}{...}do what you want? – Michael Fraiman Oct 26 '22 at 12:30xparsesolutions against their old counterparts on his blog. And yes, you can use\NewDocumentEnvironmentinstead of\NewEnvironto use the content of an environment twice. But that's only about defining macros/environments, the usage is not affected (unlessxparsedeals better with catcodes). – Qrrbrbirlbel Oct 26 '22 at 12:34xparsepart.externalizelooks for\begin{tikzpicture}Have you tried any of these solutions withexternal? It may produce two PDFs, only the first one (that's too big) or none. – Qrrbrbirlbel Oct 26 '22 at 12:38scaledoesn't affect nodes and so relations between parts can change. You often have to make adjustments and to rearrange parts to get a pleasing result and imho a simple automatical solution doesn't exist. – Ulrike Fischer Oct 26 '22 at 13:38