TeX - LaTeX Asked on April 9, 2021
I need to use the tabbing environment in a TikZ node. When I try the following:
documentclass{standalone}
usepackage{tikz}
begin{document}
begin{tikzpicture}[box/.style={rectangle,minimum size=1cm,text width=3cm,
text centered}]
node[box] (mybox) at (0.0,0.0) {
begin{tabbing}
abcdef = abcdef kill
hello > there
end{tabbing}
};
end{tikzpicture}
end{document}
it results in an empty line before the "hello there":
How can I get rid of the empty line (other than adding vspace{-baselineskip}
?
Put the contents that tikz
has difficulties to handle into a savebox.
documentclass[border=2pt]{standalone}
usepackage{tikz}
newsaveboxhello
saveboxhello{%
begin{minipage}{3cm}
begin{tabbing}
abcdef = abcdef kill
hello > there
end{tabbing}%
end{minipage}%
}
begin{document}
begin{tikzpicture}
node[draw]{useboxhello};
end{tikzpicture}
end{document}
Correct answer by gernot on April 9, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP