Skip to content
Permalink
Browse files

Reset some text parameters inside a node #743

  • Loading branch information...
hmenke committed Sep 12, 2019
1 parent bf74182 commit b26565670b822c292e706cf5c9d426a7099be6bd
Showing with 21 additions and 12 deletions.
  1. +18 −10 tex/generic/pgf/frontendlayer/tikz/tikz.code.tex
  2. +3 −2 tex/generic/pgf/utilities/pgfutil-context.def
@@ -1147,15 +1147,17 @@
\tikzset{badness warnings for centered text/.is if=tikz@warn@for@narrow@centered}%
\newif\iftikz@warn@for@narrow@centered

\let\tikz@text@width=\pgfutil@empty
\let\tikz@text@height=\pgfutil@empty
\let\tikz@text@depth=\pgfutil@empty
\let\tikz@textcolor=\pgfutil@empty
\let\tikz@textfont=\pgfutil@empty
\let\tikz@textopacity=\pgfutil@empty
\let\tikz@node@textfont=\pgfutil@empty

\def\tikz@text@action{\pgfutil@raggedright\rightskip0pt plus2em \spaceskip.3333em \xspaceskip.5em\relax}%
\def\tikz@text@reset{%
\let\tikz@text@width=\pgfutil@empty
\let\tikz@text@height=\pgfutil@empty
\let\tikz@text@depth=\pgfutil@empty
\let\tikz@textcolor=\pgfutil@empty
\let\tikz@textfont=\pgfutil@empty
\let\tikz@textopacity=\pgfutil@empty
\let\tikz@node@textfont=\pgfutil@empty
\def\tikz@text@action{\pgfutil@raggedright\rightskip0pt plus2em \spaceskip.3333em \xspaceskip.5em\relax}%
}
\tikz@text@reset


% Alignment
@@ -3947,6 +3949,8 @@
\ifnum\the\catcode`\:=\active\relax\expandafter\let\tikz@activecolon=\tikz@origcolon\fi%
\ifnum\the\catcode`\|=\active\relax\expandafter\let\tikz@activebar=\tikz@origbar\fi%
\aftergroup\tikz@fig@collectresetcolor%
\tikz@signal@halign@check%
\tikz@text@reset%
\tikz@halign@check%
\ignorespaces%
}%
@@ -4211,7 +4215,7 @@
\newif\iftikz@do@align
% Alignment handling
\def\tikz@halign@check{%
\def\tikz@signal@halign@check{%
\tikz@do@alignfalse
\ifx\tikz@text@width\pgfutil@empty%
\pgfkeysgetvalue{/tikz/node halign header}\tikz@align@header%
@@ -4220,6 +4224,8 @@
\tikz@do@aligntrue%
\fi%
\fi%
}
\def\tikz@halign@check{%
\iftikz@do@align%
% Bingo
\setbox\tikz@align@aligned@box=\box\pgfutil@voidb@x% void
@@ -4338,6 +4344,8 @@
\ifnum\the\catcode`\|=\active\relax\expandafter\let\tikz@activebar=\tikz@origbar\fi%
\tikz@atbegin@node%
\aftergroup\tikz@fig@collectresetcolor%
\tikz@signal@halign@check%
\tikz@text@reset%
\tikz@halign@check%
\ignorespaces%
}%
@@ -167,11 +167,12 @@
\def\pgfutil@minipage[#1]#2{%
\hbox to#2\bgroup
\hsize=#2\relax
\vbox\bgroup\leavevmode
\vbox\bgroup
\noindentation
}

\def\pgfutil@endminipage{%
\egroup
\egroup
\egroup
}

0 comments on commit b265656

Please sign in to comment.
You can’t perform that action at this time.