summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/bytefield
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2014-06-20 18:19:57 +0000
committerKarl Berry <karl@freefriends.org>2014-06-20 18:19:57 +0000
commit6c90a4d7ac1f533fbce95fa5cf0bc77c4739c603 (patch)
tree3110a6e06548211a24566823cc6b8ed0d4f097f4 /Master/texmf-dist/tex/latex/bytefield
parentf45d5c69a1891adff596350eaf5a16354e0fcd1b (diff)
bytefield (7jun14)
git-svn-id: svn://tug.org/texlive/trunk@34336 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/bytefield')
-rw-r--r--Master/texmf-dist/tex/latex/bytefield/bytefield.sty79
1 files changed, 73 insertions, 6 deletions
diff --git a/Master/texmf-dist/tex/latex/bytefield/bytefield.sty b/Master/texmf-dist/tex/latex/bytefield/bytefield.sty
index 319866f4b23..251c5fd5021 100644
--- a/Master/texmf-dist/tex/latex/bytefield/bytefield.sty
+++ b/Master/texmf-dist/tex/latex/bytefield/bytefield.sty
@@ -8,7 +8,7 @@
%%
%% This is a generated file.
%%
-%% Copyright (C) 2011 by Scott Pakin <scott+bf@pakin.org>
+%% Copyright (C) 2014 by Scott Pakin <scott+bf@pakin.org>
%%
%% This file may be distributed and/or modified under the conditions of
%% the LaTeX Project Public License, either version 1.3a of this license
@@ -22,7 +22,7 @@
%%
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
\ProvidesPackage{bytefield}
- [2011/06/19 v2.1 Network protocol diagrams]
+ [2014/06/03 v2.2 Network protocol diagrams]
\RequirePackage{calc}[1998/07/07]
\RequirePackage{keyval}
\def\bf@newdimen#1{\advance\count11 by 1
@@ -98,16 +98,16 @@
\def\heightunits{#2}%
\bf@boxformatting{#3\par}}}}%
\ifbitbox@top
- \put(0,#2){\line(1,0){#1}}
+ \put(0,#2){\line(1,0){#1}}%
\fi
\ifbitbox@bottom
- \put(0,0){\line(1,0){#1}}
+ \put(0,0){\line(1,0){#1}}%
\fi
\ifbitbox@left
- \put(0,0){\line(0,1){#2}}
+ \put(0,0){\line(0,1){#2}}%
\fi
\ifbitbox@right
- \put(#1,0){\line(0,1){#2}}
+ \put(#1,0){\line(0,1){#2}}%
\fi
\end{picture}%
\ifcounting@words
@@ -115,6 +115,55 @@
\global\counting@wordsfalse
\fi
\ignorespaces}
+\DeclareRobustCommand{\bitboxes}{%
+ \@ifstar\bf@bitboxes@star\bf@bitboxes@no@star
+}
+\def\bf@relax{\relax}
+\newcommand{\bf@bitboxes@no@star}[3][lrtb]{%
+ \def\bf@bitboxes@no@star@i##1{%
+ \def\bf@bitboxes@arg{##1}%
+ \ifx\bf@bitboxes@arg\bf@relax
+ \let\next=\relax
+ \else
+ \bitbox[#1]{#2}{##1}%
+ \let\next=\bf@bitboxes@no@star@i
+ \fi
+ \next
+ }%
+ \bf@bitboxes@no@star@i#3\relax
+ \ignorespaces
+}
+\newcommand{\bf@bitboxes@star}[3][lrtb]{%
+ \def\bf@bitboxes@star@i##1##2{%
+ \def\bf@bitboxes@arg{##2}%
+ \ifx\bf@bitboxes@arg\bf@relax
+ \bitbox[#1]{#2}{##1}%
+ \let\next=\relax
+ \else
+ \bitbox[#1R]{#2}{##1}%
+ \def\next{\bf@bitboxes@star@ii{##2}}%
+ \fi
+ \next
+ }%
+ \def\bf@bitboxes@star@ii##1##2{%
+ \def\bf@bitboxes@arg@i{##1}%
+ \def\bf@bitboxes@arg@ii{##2}%
+ \ifx\bf@bitboxes@arg@ii\bf@relax
+ \def\bf@bitboxes@sides{#1L}%
+ \else
+ \def\bf@bitboxes@sides{#1LR}%
+ \fi
+ \ifx\bf@bitboxes@arg@i\bf@relax
+ \let\next=\relax
+ \else
+ \expandafter\bitbox\expandafter[\bf@bitboxes@sides]{#2}{##1}%
+ \def\next{\bf@bitboxes@star@ii{##2}}%
+ \fi
+ \next
+ }%
+ \bf@bitboxes@star@i#3\relax\relax
+ \ignorespaces
+}
\newif\ifbitbox@top
\newif\ifbitbox@bottom
\newif\ifbitbox@left
@@ -139,6 +188,24 @@
\else
\ifx#1r%
\bitbox@righttrue
+ \else
+ \ifx#1T%
+ \bitbox@topfalse
+ \else
+ \ifx#1B%
+ \bitbox@bottomfalse
+ \else
+ \ifx#1L%
+ \bitbox@leftfalse
+ \else
+ \ifx#1R%
+ \bitbox@rightfalse
+ \else
+ \PackageWarning{bytefield}{Unrecognized box side `#1'}%
+ \fi
+ \fi
+ \fi
+ \fi
\fi
\fi
\fi