| 1 |
%% $Id: fbox.tex 828 2023-12-04 19:56:29Z herbert $% |
| 2 |
\listfiles\setcounter{errorcontextlines}{100} |
| 3 |
\documentclass[paper=a4,fontsize=11pt,DIV=13,parskip=half-, |
| 4 |
captions=tableabove,twoside=on]{scrartcl} |
| 5 |
\usepackage{fontspec} |
| 6 |
\setmainfont{AccanthisADFStdNo3}[ |
| 7 |
UprightFont =*-Regular, |
| 8 |
BoldFont =*-Bold, |
| 9 |
ItalicFont =*-Italic, |
| 10 |
BoldItalicFont=*-BoldItalic, |
| 11 |
RawFeature = -rlig, |
| 12 |
] |
| 13 |
\setsansfont{GilliusADF}[ |
| 14 |
UprightFont =*-Regular, |
| 15 |
BoldFont =*-Bold, |
| 16 |
ItalicFont =*-Italic, |
| 17 |
BoldItalicFont=*-BoldItalic, |
| 18 |
RawFeature = -rlig, |
| 19 |
] |
| 20 |
\setmonofont{Anonymous Pro}[Scale=MatchLowercase,FakeStretch=0.9] |
| 21 |
|
| 22 |
\usepackage[english]{babel} |
| 23 |
\usepackage{scrlayer-scrpage} |
| 24 |
\usepackage{showexpl} |
| 25 |
\usepackage{listings} |
| 26 |
\lstset{basicstyle=\ttfamily\small,language=[LaTeX]TeX,rframe=} |
| 27 |
|
| 28 |
\def\Lfile#1{\texttt{#1}\index{#1 file@\texttt{#1} file}} |
| 29 |
\def\Lext#1{\texttt{.#1}\index{#1 file extension@\texttt{.#1} file extension}} |
| 30 |
\def\Lcs#1{\texttt{\textbackslash#1}\index{#1@\texttt{\textbackslash#1}}} |
| 31 |
\def\Lenv#1{\texttt{#1}\index{#1 environment@\texttt{#1} environment}} |
| 32 |
\def\Lpack#1{\texttt{#1}\index{#1 package@\texttt{#1} package}} |
| 33 |
\def\Lprog#1{\texttt{#1}\index{#1 program@\texttt{#1} program}} |
| 34 |
\def\Loption#1{\texttt{#1}\index{#1@\texttt{#1} package option}} |
| 35 |
\let\Ldim\Lcs |
| 36 |
|
| 37 |
\def\demoText{DuckDuckGo! Time to spread the word!\par |
| 38 |
Equipped with the talking points above, you’re ready to help anyone search and browse protected.} |
| 39 |
|
| 40 |
%\usepackage[bibstyle=dtk]{biblatex} |
| 41 |
%\addbibresource{\jobname.bib} |
| 42 |
|
| 43 |
\usepackage{url} |
| 44 |
\usepackage[colorlinks,linktocpage]{hyperref} |
| 45 |
|
| 46 |
\makeatletter% from: doc.sty |
| 47 |
\newcommand*\GetFileInfo[1]{% |
| 48 |
\def\filename{#1}% |
| 49 |
\def\@tempb##1 ##2 ##3\relax##4\relax{% |
| 50 |
\def\filedate{##1}% |
| 51 |
\def\fileversion{##2}% |
| 52 |
\def\fileinfo{##3}}% |
| 53 |
\edef\@tempa{\csname ver@#1\endcsname}% |
| 54 |
\expandafter\@tempb\@tempa\relax? ? \relax\relax} |
| 55 |
\makeatother |
| 56 |
|
| 57 |
%\GetFileInfo{xltabular.sty} |
| 58 |
\usepackage{xspace} |
| 59 |
\usepackage{fbox} |
| 60 |
|
| 61 |
\def\setVersion#1{\setVVersion#1!!} |
| 62 |
\def\setVVersion#1=#2!!{\def\fboxVersion{#2}} |
| 63 |
|
| 64 |
\setVersion{version = 0.07}% |
| 65 |
|
| 66 |
\title{Package \texttt{fbox} \\--\\ \normalsize \fboxVersion\ (\today)} |
| 67 |
\author{Herbert Voß\thanks{\url{[email protected]}\newline Thanks to Rolf Niepraschk}} |
| 68 |
\begin{document} |
| 69 |
\maketitle |
| 70 |
%\tableofcontents |
| 71 |
|
| 72 |
This package redefines the \LaTeX-macro \Lcs{fbox} to allow an optional |
| 73 |
argument: |
| 74 |
|
| 75 |
\begin{verbatim} |
| 76 |
\fbox*[<optargs>]{<contents>} |
| 77 |
\fparbox*[<optargs>]{<contents>} |
| 78 |
\end{verbatim} |
| 79 |
|
| 80 |
The star version does not put any horizontal space before or behind the argument |
| 81 |
if no optional argument \texttt{l} or \texttt{r} is given. The non star version always inserts |
| 82 |
\Ldim{fboxsep}. |
| 83 |
|
| 84 |
\Lcs{fparbox} uses the current \Ldim{linewidth} minus two times the box sep and boxrule width. |
| 85 |
It does \emph{not} a test for an existing paragraph indenting. It has do be done by the |
| 86 |
user, e.g.: |
| 87 |
|
| 88 |
\begin{verbatim} |
| 89 |
\noindent |
| 90 |
\fparbox ... |
| 91 |
\end{verbatim} |
| 92 |
|
| 93 |
The optional argument can be |
| 94 |
\begin{description} |
| 95 |
\item[boxrule] The rule width is predefined to the current value of \Ldim{fboxrule} (0.4pt) |
| 96 |
\item[boxsep] The box separation is predefined to the current value of \Ldim{fboxsep} (3pt) |
| 97 |
\item[lcolor] Color for the left line (black) |
| 98 |
\item[tcolor] Color for the top line (black) |
| 99 |
\item[rcolor] Color for the right line (black) |
| 100 |
\item[bcolor] Color for the bottom line (black) |
| 101 |
\item[linewidth] linewidth for \Lcs{fparbox} (\Ldim{linewidth}) |
| 102 |
\item[<letters>] Any combination of the letters |
| 103 |
l, r, b, and t, or altenatively L, R, B, and T for l)eft, r)right, b)ottom, and t)op |
| 104 |
of the frame parts. A missing or an empty argument is the same as the default |
| 105 |
\Lcs{fbox} command from standard \LaTeX. |
| 106 |
\end{description} |
| 107 |
|
| 108 |
|
| 109 |
\begin{LTXexample} |
| 110 |
\fbox{foo gar baz} |
| 111 |
\end{LTXexample} |
| 112 |
|
| 113 |
\begin{LTXexample} |
| 114 |
\fbox[]{foo gar baz} |
| 115 |
\end{LTXexample} |
| 116 |
|
| 117 |
\begin{LTXexample} |
| 118 |
\fbox[rbt]{foo gar baz} |
| 119 |
\fbox[rbt,boxrule=4pt,rcolor=red, |
| 120 |
tcolor=green]{foo gar baz} |
| 121 |
\fbox[brt]{foo gar baz} |
| 122 |
\fbox[bRT]{foo gar baz} |
| 123 |
\end{LTXexample} |
| 124 |
|
| 125 |
\begin{LTXexample} |
| 126 |
\fbox*[rbt]{foo gar baz} |
| 127 |
\fbox[rbt,boxrule=4pt,rcolor=red, |
| 128 |
tcolor=green]{foo gar baz} |
| 129 |
\fbox*[brt]{foo gar baz} |
| 130 |
\fbox*[bRT]{foo gar baz} |
| 131 |
\end{LTXexample} |
| 132 |
|
| 133 |
\begin{LTXexample} |
| 134 |
\fbox[lT]{foo gar baz} |
| 135 |
\end{LTXexample} |
| 136 |
|
| 137 |
\begin{LTXexample} |
| 138 |
\fbox*[lT]{foo gar baz} |
| 139 |
\end{LTXexample} |
| 140 |
|
| 141 |
\begin{LTXexample} |
| 142 |
\fbox[bT]{foo gar baz} |
| 143 |
\end{LTXexample} |
| 144 |
|
| 145 |
\begin{LTXexample} |
| 146 |
\fbox*[bT]{foo gar baz} |
| 147 |
\end{LTXexample} |
| 148 |
|
| 149 |
\begin{LTXexample} |
| 150 |
\fbox[Br]{foo gar baz} |
| 151 |
\end{LTXexample} |
| 152 |
|
| 153 |
\begin{LTXexample} |
| 154 |
\fbox*[Br]{foo gar baz} |
| 155 |
\end{LTXexample} |
| 156 |
|
| 157 |
\begin{LTXexample} |
| 158 |
\fbox[bT,boxrule=5pt]{foo gar baz} |
| 159 |
\end{LTXexample} |
| 160 |
|
| 161 |
\begin{LTXexample} |
| 162 |
\fbox*[bT,boxrule=5pt]{foo gar baz} |
| 163 |
\end{LTXexample} |
| 164 |
|
| 165 |
|
| 166 |
|
| 167 |
\begin{LTXexample} |
| 168 |
\fbox[Br,boxrule=5pt,bcolor=red]{foo gar baz} |
| 169 |
\end{LTXexample} |
| 170 |
|
| 171 |
|
| 172 |
\begin{LTXexample} |
| 173 |
\fbox*[boxrule=5pt,Br]{foo gar baz} |
| 174 |
\end{LTXexample} |
| 175 |
|
| 176 |
|
| 177 |
\begin{LTXexample} |
| 178 |
\fbox*[boxsep=5mm,bT,tcolor=green, |
| 179 |
boxrule=2pt]{foo gar baz} |
| 180 |
\end{LTXexample} |
| 181 |
|
| 182 |
|
| 183 |
|
| 184 |
\begin{LTXexample} |
| 185 |
\fparbox{\demoText} |
| 186 |
\end{LTXexample} |
| 187 |
|
| 188 |
\begin{LTXexample} |
| 189 |
\fparbox[]{\demoText} |
| 190 |
\end{LTXexample} |
| 191 |
|
| 192 |
|
| 193 |
\begin{LTXexample} |
| 194 |
\fparbox[rbt,bcolor=red,rcolor=blue, |
| 195 |
tcolor=red]{\demoText} |
| 196 |
\fparbox[brt]{\demoText} |
| 197 |
\fparbox[bRT]{\demoText} |
| 198 |
\end{LTXexample} |
| 199 |
|
| 200 |
\begin{LTXexample} |
| 201 |
\fparbox*[rbt]{\demoText} |
| 202 |
\fparbox*[brt]{\demoText} |
| 203 |
\fparbox*[bRT,rcolor=blue, |
| 204 |
tcolor=green]{\demoText} |
| 205 |
\end{LTXexample} |
| 206 |
|
| 207 |
\begin{LTXexample} |
| 208 |
\fparbox[lT]{\demoText} |
| 209 |
\end{LTXexample} |
| 210 |
|
| 211 |
\begin{LTXexample} |
| 212 |
\fparbox*[lT]{\demoText} |
| 213 |
\end{LTXexample} |
| 214 |
|
| 215 |
\begin{LTXexample} |
| 216 |
\fparbox[bT]{\demoText} |
| 217 |
\end{LTXexample} |
| 218 |
|
| 219 |
\begin{LTXexample} |
| 220 |
\fparbox*[bT]{\demoText} |
| 221 |
\end{LTXexample} |
| 222 |
|
| 223 |
\begin{LTXexample} |
| 224 |
\fparbox[Br]{\demoText} |
| 225 |
\end{LTXexample} |
| 226 |
|
| 227 |
\begin{LTXexample} |
| 228 |
\fparbox*[Br]{\demoText} |
| 229 |
\end{LTXexample} |
| 230 |
|
| 231 |
\begin{LTXexample} |
| 232 |
\fparbox[bT,boxrule=5pt]{\demoText} |
| 233 |
\end{LTXexample} |
| 234 |
|
| 235 |
\begin{LTXexample} |
| 236 |
\fparbox*[bT,boxrule=5pt,boxsep=6pt]{\demoText} |
| 237 |
\end{LTXexample} |
| 238 |
|
| 239 |
\begin{LTXexample} |
| 240 |
\fparbox*[bT,boxrule=5pt,boxsep=6pt, |
| 241 |
linewidth=0.75\linewidth]{\demoText} |
| 242 |
\end{LTXexample} |
| 243 |
|
| 244 |
\begin{LTXexample} |
| 245 |
\fparbox*[bT,boxrule=3pt,boxsep=10pt]{\demoText} |
| 246 |
\end{LTXexample} |
| 247 |
|
| 248 |
\begin{LTXexample} |
| 249 |
\fparbox*[bT,boxrule=3pt,boxsep=10pt, |
| 250 |
linewidth=7cm]{\demoText} |
| 251 |
\end{LTXexample} |
| 252 |
|
| 253 |
\begin{LTXexample} |
| 254 |
\fparbox[Br,boxrule=5pt,boxsep=10pt]{\demoText} |
| 255 |
\end{LTXexample} |
| 256 |
|
| 257 |
\begin{LTXexample} |
| 258 |
\fparbox*[boxrule=5pt,Br, |
| 259 |
bcolor=red!40,rcolor=blue!40]{\demoText} |
| 260 |
\end{LTXexample} |
| 261 |
|
| 262 |
|
| 263 |
|
| 264 |
|
| 265 |
|
| 266 |
|
| 267 |
|
| 268 |
\end{document} |