You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If we modify titled-frame with an increased border-width, we see that not only title looks wrongly positioned but also continuation label. In the image, we see the continuation label because \smash does \leavevmode with recent LaTeX, otherwise it would have become invisible from being swallowed into the border.
and obtained (the contents were trimmed to be sure they fit together with thick borders in linewidth, but anyhow the image showing only the frame, we do not see it fits exactly in the linewidth)
I used a 4pt x 4pt rule as continuation label.
With colorframed (including fix of #2) we get this
As commented in #2, the start of title is partly covered. The continuation label is configured here to use colour purple (as is used for TFTitleColor) and the \smash problem is fixed and we see the label in the border. But clearly this is wrong location.
I feel that at some point of development of framed.sty macro \TF@Title and \TF@conlab, it might be that D. A. had another \CustomFBox which would draw the vertical rules in such a way that the hboxes had their left border at the right edge of the west rule. Because if both Title and Continuation Label were shifted to the right by one \fboxrule more we would not have the above problems.
I had started commenting this in my edited \TF@Title but I am moving these comments here out of the colorframed.sty, so that they are recorded somewhere but don't take room in the macro file:
% The titled-frame environment depends in part on this macro,
% whose original in framed.sty has various colour problems.
% We have indicated the modifications, additionally to using
% our modified \CustomFBox.
% Original let the continuation label use same colour as frame.
% Let make this customizable.
\let\colorframedTFconlabcolorcommand\empty
\renewcommand\TitleBarFrame[3][]{\begingroup
\ifx\delimiter#1\delimiter
\let\TF@conlab\@empty
\else
\def\TF@conlab{%
\nointerlineskip
\hbox{%<<<< ADDED (needed due to \smash doing \leavevmode nowadays)
\colorframedTFconlabcolorcommand%<<<< ADDED
% ADDED COMMENT (JFB, 2022/09/24)
% The horizontal placement of #1 done here is very likely a bug. The
% \@tempboxa has a width which incorporates 2\fboxsep, but no \fboxrule. The
% left boundary of hboxes is at **left** edge of left (west) border. So this
% means that #1 is positioned to the right by \fboxsep of the **left** edge of
% the right (east) border. For example if \fboxrule is much bigger than
% \fboxsep, this places the label entirely inside the border; and as
% framed.sty draws it with the frame colour, it becomes invisble. Clearly a
% bug. It should probably be here 2\fboxrule and then perhaps \fboxsep, or
% some other spacing.
%
% OR, PERHAPS: this code was done at time the \CustomFBox (the one of framed.sty)
% was done in such a way that reference point was to the right of the west
% border. This would ALSO explain the problem with the \TF@Title placement of
% the title, see my github #2 for related comments. I have been careful to
% check my analysis using pristine framed.sty, as things could have been
% caused by my own version of \CustomFBox, which boxes things differently.
\smash{\rlap{\kern\wd\@tempboxa\kern\fboxrule\kern\fboxsep #1}}}%
}%<<<< ADDED
\fi
%\let\TF@savecolor\current@color%<<<< REMOVED
%\textcolor{TFFrameColor}{% <<<< REMOVED
\def\colorframedbordercolorcommand{\color{TFFrameColor}}%<<<< ADDED
\CustomFBox
{\TF@Title{#2}}{\TF@conlab}%
\fboxrule\fboxrule\fboxrule\fboxrule
{%\let\current@color\TF@savecolor\set@color%<<<< REMOVED
#3}%
%}% <<<< REMOVED
\endgroup
}
Another issue we see above with the title is that its vertical placement looks poor when the border is thick like here.
The text was updated successfully, but these errors were encountered:
Decision has been made leave problematic original code unmodied. Commit 9bd2032 provides a possible replacement \colorframedTItleBarFrame to \TitleBarFrame. With it we get for example:
(see file testissues3and4.tex)
This closes this issue and #4.
I will perhaps add a way to shift the title horizontally (here it is aligned with text) but that will be it.
I will perhaps add a way to shift the title horizontally (here it is aligned with text) but that will be it.
Done. Useful if environment is defined to use a large \fboxrule as in the screenshot of previous comment. It then makes the title align with the border with no separation, which is ok as the border is thick.
If we modify
titled-frame
with an increased border-width, we see that not only title looks wrongly positioned but also continuation label. In the image, we see the continuation label because\smash
does\leavevmode
with recent LaTeX, otherwise it would have become invisible from being swallowed into the border.I used
and obtained (the contents were trimmed to be sure they fit together with thick borders in linewidth, but anyhow the image showing only the frame, we do not see it fits exactly in the linewidth)
![Capture d’écran 2022-09-24 à 15 31 58](https://user-images.githubusercontent.com/2589111/192101106-6d9d466d-7971-4818-8829-753955053649.png)
I used a 4pt x 4pt rule as continuation label.
With colorframed (including fix of #2) we get this
![Capture d’écran 2022-09-24 à 15 45 02](https://user-images.githubusercontent.com/2589111/192101381-ff1a9f6a-d88c-497c-a4fd-2e6c8d826994.png)
As commented in #2, the start of title is partly covered. The continuation label is configured here to use colour purple (as is used for
TFTitleColor
) and the\smash
problem is fixed and we see the label in the border. But clearly this is wrong location.I feel that at some point of development of
framed.sty
macro\TF@Title
and\TF@conlab
, it might be that D. A. had another\CustomFBox
which would draw the vertical rules in such a way that the hboxes had their left border at the right edge of the west rule. Because if both Title and Continuation Label were shifted to the right by one\fboxrule
more we would not have the above problems.I had started commenting this in my edited
\TF@Title
but I am moving these comments here out of the colorframed.sty, so that they are recorded somewhere but don't take room in the macro file:Another issue we see above with the title is that its vertical placement looks poor when the border is thick like here.
The text was updated successfully, but these errors were encountered: