2
votes
1answer
31 views

\widthof text in a def'd subroutine inside a tikzpicture? [duplicate]

I have already seen \widthof within tikzpicture, but this is slightly different. I have a rather complex Tikz image, which I'd like to eventually include in a Latex document; as such, I'd like this ...
5
votes
1answer
63 views

Stretching an \fbox horizontally to fit the page

I have a frame box next to some text (Komentar:), and I would like to stretch it so it fills up the page. I've done this using the calc package by subtracting \widthof{Komentar: } from \hsize (or ...
4
votes
1answer
915 views

Calculate parbox width to make it meet the page border?

I'm using the program package to typeset my algorithms. I want my comments to have a light gray background, therefore I'm using colorbox with a parbox inside (for multi-line comments). Now the ...
7
votes
1answer
1k views

Shrinking text to the width of a node within a tikzpicture

I would like to be able to scale text to the width of a TikZ node. Using \widthof within tikzpicture as a starting point, I've arrived at somewhat of a solution, except it has incorrect spacing, and ...
5
votes
2answers
1k views

\widthof within tikzpicture

In this minimal example \documentclass{scrartcl} \usepackage{calc} \usepackage{tikz} \newlength{\TestLength} \begin{document} \setlength{\TestLength}{\widthof{\tikz \node {bla};}} ...