%% $Id: fbox.tex 947 2019-03-08 17:06:20Z herbert $
%
\listfiles\setcounter{errorcontextlines}{100}
\documentclass[paper=a4,fontsize=11pt,DIV=13,parskip=half-,
               captions=tableabove,twoside=on]{scrartcl}
\usepackage{fontspec}
\setmainfont{AccanthisADFStdNo3}[
  UprightFont   =*-Regular,
  BoldFont      =*-Bold,
  ItalicFont    =*-Italic,
  BoldItalicFont=*-BoldItalic,
  RawFeature    = -rlig,
]
\setsansfont{GilliusADF}[
  UprightFont   =*-Regular,
  BoldFont      =*-Bold,
  ItalicFont    =*-Italic,
  BoldItalicFont=*-BoldItalic,
  RawFeature    = -rlig,
]
\setmonofont{Anonymous Pro}[Scale=MatchLowercase,FakeStretch=0.9]

\usepackage[english]{babel}
\usepackage{scrlayer-scrpage}
\usepackage{showexpl}
\usepackage{listings}
\lstset{basicstyle=\ttfamily\small,language=[LaTeX]TeX,rframe=}

\def\Lfile#1{\texttt{#1}\index{#1 file@\texttt{#1} file}}
\def\Lext#1{\texttt{.#1}\index{#1 file extension@\texttt{.#1} file extension}}
\def\Lcs#1{\texttt{\textbackslash#1}\index{#1@\texttt{\textbackslash#1}}}
\def\Lenv#1{\texttt{#1}\index{#1 environment@\texttt{#1} environment}}
\def\Lpack#1{\texttt{#1}\index{#1 package@\texttt{#1} package}}
\def\Lprog#1{\texttt{#1}\index{#1 program@\texttt{#1} program}}
\def\Loption#1{\texttt{#1}\index{#1@\texttt{#1} package option}}
\let\Ldim\Lcs

%\usepackage[bibstyle=dtk]{biblatex}
%\addbibresource{\jobname.bib}

\usepackage{url}
\usepackage[colorlinks,linktocpage]{hyperref}

\makeatletter% from: doc.sty
\newcommand*\GetFileInfo[1]{%
  \def\filename{#1}%
  \def\@tempb##1 ##2 ##3\relax##4\relax{%
    \def\filedate{##1}%
    \def\fileversion{##2}%
    \def\fileinfo{##3}}%
  \edef\@tempa{\csname ver@#1\endcsname}%
  \expandafter\@tempb\@tempa\relax? ? \relax\relax}
\makeatother

%\GetFileInfo{xltabular.sty}
\usepackage{xspace}
\usepackage{fbox}

\def\setVersion#1{\setVVersion#1!!}
\def\setVVersion#1=#2!!{\def\fboxVersion{#2}} 

\setVersion{version = 0.03}%

\title{Package \texttt{fbox} \\--\\ \normalsize \fboxVersion\ (\today)}
\author{Herbert Voß\thanks{\url{hvoss@tug.org}\newline Thanks to Rolf Niepraschk}}
\begin{document}
\maketitle
%\tableofcontents

This package redefines the \LaTeX-macro \Lcs{fbox} to allow an optional
argument:

\begin{verbatim}
\fbox*[<optargs>]{<contents>}
\end{verbatim}

The star version does not put any horizontal space before or behind the argument
if no optional argument \texttt{l} or \texttt{r} is given. The non star version always inserts
\Ldim{fboxsep}.

The optional argument can be of any combination of the letters
l, r, b, and t or altenatively L, R, B, and T. This l)eft, r)right, b)ottom, and t)op
for the frame parts. A missing or an empty argument is the same as the default
\Lcs{fbox} from standard \LaTeX.


\begin{LTXexample}
\fbox{foo gar baz}
\end{LTXexample}

\begin{LTXexample}
\fbox[]{foo gar baz}
\end{LTXexample}

\begin{LTXexample}
\fbox[rbt]{foo gar baz}
\fbox[brt]{foo gar baz}
\fbox[bRT]{foo gar baz}
\end{LTXexample}

\begin{LTXexample}
\fbox*[rbt]{foo gar baz}
\fbox*[brt]{foo gar baz}
\fbox*[bRT]{foo gar baz}
\end{LTXexample}

\begin{LTXexample}
\fbox[lT]{foo gar baz}
\end{LTXexample}

\begin{LTXexample}
\fbox*[lT]{foo gar baz}
\end{LTXexample}

\begin{LTXexample}
\fbox[bT]{foo gar baz}
\end{LTXexample}

\begin{LTXexample}
\fbox*[bT]{foo gar baz}
\end{LTXexample}

\begin{LTXexample}
\fbox[Br]{foo gar baz}
\end{LTXexample}

\begin{LTXexample}
\fbox*[Br]{foo gar baz}
\end{LTXexample}

\begin{LTXexample}
\setlength\fboxrule{5pt}
\fbox[bT]{foo gar baz}
\end{LTXexample}

\begin{LTXexample}
\setlength\fboxrule{5pt}
\fbox*[bT]{foo gar baz}
\end{LTXexample}


\begin{LTXexample}
\setlength\fboxrule{5pt}
\fbox[Br]{foo gar baz}
\end{LTXexample}

\begin{LTXexample}
\setlength\fboxrule{5pt}
\fbox*[Br]{foo gar baz}
\end{LTXexample}



\end{document}