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

Answer by esdd for picture in picture: how to eliminate influences of outer node options on inner node?

$
0
0

To align the baseline of the text in the inner node on the baseline of the outer text you can use \tikz[baseline,nodes={anchor=base,...}] for the inner picture.

To prevent the influence of the outer node options save the inner picture in a box:

\documentclass[12pt,tikz,border=1mm]{standalone}\usetikzlibrary{chains,shapes.multipart}\newbox\mytikzBox\newcommand{\savetikzBox}[2][\mytikzBox]{%  \sbox#1{\pgfinterruptpicture#2\endpgfinterruptpicture}}\begin{document}\begin{tikzpicture}  \savetikzBox{%    \tikz[      baseline,      start chain = going right,      nodes={anchor=base,        fill=gray!10,        inner xsep=0.5mm,outer sep=0mm,        on chain}        ,node distance=.5mm      ]    {\node{0};\node{0};    \node[fill=none,inner xsep=0pt]{:};    \node{0};\node{0};}  }  \node[    rectangle split,rectangle split parts=2,    inner ysep=2mm,    text width=55mm,    draw]   {adjust time\qquad\usebox\mytikzBox  \nodepart{two} only text  };\end{tikzpicture}\end{document}

enter image description here


Viewing all articles
Browse latest Browse all 2

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>