I was looking how to resize tikzpicture, and saw this accepted answer here
Specifying the width and height of a tikzpicture
But the code posted there do not work any more.
Here is the same exact code copied here from the above
\documentclass [tikz] {standalone}
\begin {document}
\begin {figure}
\centering
\resizebox {\columnwidth} {!} {
\begin {tikzpicture}
\node [draw] (my node 1) {my node 1};
\node [draw, anchor = west] (my node 2) at (my node 1.east) {centro};
\node [draw, anchor = west] at (my node 2.east) {my node 3};
\end {tikzpicture}
}
\end {figure}
\end {document}
When I compile it, the error is
lualatex foo2.tex
This is LuaTeX, Version 1.10.0 (TeX Live 2019)
restricted system commands enabled.
(./foo2.tex
LaTeX2e <2018-12-01>
.
.
.
(/usr/local/texlive/2019/texmf-dist/tex/generic/oberdiek/etexcmds.sty)))
(/usr/local/texlive/2019/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cfg))
! Improper \prevdepth.
\newpage ...everypar {}\fi \par \ifdim \prevdepth
>\z@ \vskip -\ifdim \prevd...
l.12 }
? X
1704 words of node memory still in use:
29 hlist, 1 rule, 1 disc, 1 local_par, 2 dir, 52 glue, 8 kern, 1 penalty, 22
glyph, 89 attribute, 52 glue_spec, 89 attribute_list, 2 temp, 3 if_stack, 1 wr
ite, 41 pdf_literal, 7 pdf_colorstack nodes
avail lists: 2:2,5:11
warning (pdf backend): no pages of output.
Transcript written on foo2.log.
The question is : What changes is needed to make it compile? I am using lualatex with TL 2019.
standalone“for simplicity” without even trying it. I changed it. I guess you can remove the question. – egreg May 28 '19 at 09:06