-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathbreakfbox.sty
More file actions
26 lines (23 loc) · 845 Bytes
/
breakfbox.sty
File metadata and controls
26 lines (23 loc) · 845 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{breakfbox}[2023/03/21 v0.3]
\RequirePackage[usetype1]{myuline--}
\newdimen\bfbox@lineposition
\newdimen\bfbox@linegap
\newdimen\bfbox@height
\newdimen\bfbox@depth
\newbox\bfbox@content
\def\breakfbox#1{%
\setbox\bfbox@content\hbox{#1}%
\bfbox@lineposition=\dimexpr\ht\bfbox@content+\fboxsep+.5\fboxrule\relax
\bfbox@linegap=\dimexpr\ht\bfbox@content+\dp\bfbox@content+2\fboxsep\relax
\bfbox@height=\dimexpr\bfbox@linegap+2\fboxrule\relax
\bfbox@depth=\dimexpr-\dp\bfbox@content-\fboxrule-\fboxsep\relax
\rule[\bfbox@depth]{\fboxrule}{\bfbox@height}%
\nobreak
\uline[lines=2,position=\bfbox@lineposition,linegap=\bfbox@linegap,width=\fboxrule]{%
\hspace{\fboxsep}#1\inhibitglue\nobreak\hspace{\fboxsep}%
}%
\nobreak
\rule[\bfbox@depth]{\fboxrule}{\bfbox@height}%
}
\endinput