Quantcast
Channel: picture in picture: how to eliminate influences of outer node options on inner node? - TeX - LaTeX Stack Exchange
Viewing all articles
Browse latest Browse all 2

picture in picture: how to eliminate influences of outer node options on inner node?

$
0
0

In the case, when you have in some shape (rectangle in my case) a TikZ picture, than it seems that parameters of outer shape also influences on parameters of inner picture. This can be eliminate with redefinition of all this parameters. But, what to do, if outer shape has determined "text width", but in shape of inner picture I like to determine only minimum width" (that the width of shape is automatically adjust to width of text)? For example:

\documentclass[12pt,tikz,border=1mm]{standalone}\usetikzlibrary{chains,shapes.multipart}    \begin{document}        \begin{tikzpicture}[start chain = going right]        \node[rectangle split,rectangle split parts=2,              inner ysep=1mm, inner ysep=2mm, text width=55mm, draw]         {adjust time\qquad    \tikz[every node/.style={shape=rectangle,                             inner xsep=0.5mm,outer sep=0mm,                              text width=1.1ex,% here I like to have minimum width ...                             node distance=0.5mm,on chain}]        {\node[fill=gray!10]{0};\node[fill=gray!10]{0};\node{:};         \node[fill=gray!10]{0};\node[fill=gray!10]{0};}    \nodepart{two} only text                    };        \end{tikzpicture}    \end{document}

Is there a way to tell inside picture, that "text width" determined for outer shape should not influence on text width of text width of inner influence or to determine it in inner shape, that it will automatically adjust to width of actual text?enter image description here

On above picture the width of node with semicolon (:) is to wide, i like that width will be automatically adjusted to its width.

I also like to solve a problem, how to align text in inner rectangle with text in outer one.


Viewing all articles
Browse latest Browse all 2

Latest Images

Trending Articles





Latest Images