Skip to content

Commit 68f3317

Browse files
Improve warnings messages
1 parent 1c9fd6b commit 68f3317

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

linewidth.tikz

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
\begin{tikzpicture}
22
\draw (0,0) -- node {center} (\linewidth,1);
3-
\end{tikzpicture}
3+
\end{tikzpicture}

tikzscale.dtx

+8-6
Original file line numberDiff line numberDiff line change
@@ -619,7 +619,9 @@ and the derived files tikzscale.ins,
619619
\apptocmd{\tikzpicture}{%
620620
\ifdef{\tikzscale@restoreEndLineChar}{%
621621
\tikzscale@restoreEndLineChar
622-
}{}%
622+
}{%
623+
\PackageWarning{tikzscale}{restoreEndLineChar is not defined and it should be defined.}%
624+
}%
623625
}{}{\PackageError{tikzscale}{Patching tikzpicture failed}}%
624626
}%
625627
% \end{macrocode}
@@ -881,8 +883,8 @@ and the derived files tikzscale.ins,
881883
\ifdef{\pgfexternalwidth}{%
882884
\tikzscale@ifSizeDifference{\requestedWidth - \pgfexternalwidth}{%
883885
\tikzset{external/remake next}%
884-
% \PackageWarning{tikzscale}{Regenerate \tikzscale@externalizationName \MessageBreak because of width difference}%
885-
% \tikzscale@warnIfSizeDifference{\requestedWidth}{\pgfexternalwidth}{#2}%
886+
% \PackageWarning{tikzscale}{Regenerate \tikzscale@externalizationName \MessageBreak because of width difference \MessageBreak (requestedWidth: \requestedWidth, pgfexternalwidth: \pgfexternalwidth)}%
887+
% \tikzscale@warnIfSizeDifference{\requestedWidth}{\pgfexternalwidth}{current file}%
886888
}{}%
887889
}{%
888890
\tikzset{external/remake next}%
@@ -893,7 +895,7 @@ and the derived files tikzscale.ins,
893895
\ifdef{\pgfexternalheight}{%
894896
\tikzscale@ifSizeDifference{\requestedHeight - \pgfexternalheight}{%
895897
\tikzset{external/remake next}%
896-
% \PackageWarning{tikzscale}{Regenerate \tikzscale@externalizationName \MessageBreak because of height difference}%
898+
% \PackageWarning{tikzscale}{Regenerate \tikzscale@externalizationName \MessageBreak because of height difference \MessageBreak (requestedHeight: \requestedHeight, pgfexternalheight: \pgfexternalheight)}%
897899
}{}%
898900
}{%
899901
\tikzset{external/remake next}%
@@ -904,12 +906,12 @@ and the derived files tikzscale.ins,
904906
\ifdef{\tikzscale@oldAxisRatio}{%
905907
\tikzscale@ifSizeDifference{\requestedAxisRatio - \tikzscale@oldAxisRatio}{%
906908
\tikzset{external/remake next}%
907-
% \PackageWarning{tikzscale}{Regenerate \tikzscale@externalizationName \MessageBreak because of axis ratio difference}%
909+
% \PackageWarning{tikzscale}{Regenerate \tikzscale@externalizationName \MessageBreak because of axis ratio difference \MessageBreak (requestedAxisRatio: \requestedAxisRatio, oldAxisRatio: \tikzscale@oldAxisRatio)}%
908910
}{}%
909911
\undef{\tikzscale@oldAxisRatio}%
910912
}{%
911913
\tikzset{external/remake next}%
912-
% \PackageWarning{tikzscale}{Regenerate \tikzscale@externalizationName \MessageBreak because of no external axis ratio}%
914+
\PackageWarning{tikzscale}{Regenerate \tikzscale@externalizationName \MessageBreak because of no external axis ratio}%
913915
}%
914916
}{}%
915917
}

0 commit comments

Comments
 (0)