12.07.2015 Views

The cjw-latex Macro Collection

The cjw-latex Macro Collection

The cjw-latex Macro Collection

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

114 \null\vfill\begin{flushright}115 \itshape\small116 On my honour, I have neither given nor received\\117 any unacknowledged aid on this #1.\\[5ex]118 \normalfont\footnotesize119 \makebox[2in]{\hrulefill}\quad\@date\\120 \makebox[2in]{Colin J.~Wynne,~’94}\quad{\hphantom{\@date}}\\121 \end{flushright}}As mentioned in the option section, there is a macro used to put fancy sectiondelimiters into, say, a story. <strong>The</strong> \ssbreak command expects the type of delimiter,the \ssbreakbar, to be defined. Since either draft or final must be chosen as anoption, this should be fine, but I have put a hopefully redundant command in justin case.122 \newcommand{\ssbreak}{\bigskip123 \centerline{\ssbreakbar}\bigbreak}124 \providecommand{\ssbreakbar}{}1.3 Box formattingI have written some of my own commands for handling boxes. <strong>The</strong> first thing Iwanted was an analog of \mbox or \hbox formathmode. <strong>The</strong>simpleversion—\mathbox puts its argument into an \hbox, inmathmode,inthecurrentstyle.<strong>The</strong> second version is \Mathbox, which takes two arguments, the first of which isput in the box and evaluated before math mode is entered. This was done for aspecific application where I needed to get the contents of the \mathbox itself intoboldface. Of course, \boldmath cannot be evaluated within math mode. Note thatthe style is chosen by the \mathpalette macro, and that the command \@mathboxis essentially just a dummy to allow the proper expansion of \mathpalette.125 % \mathbox puts its argument into an \hbox, in math mode, with the126 % current \...style.127 \def\mathbox #1{\hbox{$\mathpalette\@mathbox{#1}$}}128 \def\Mathbox #1#2{\hbox{#1$\mathpalette\@mathbox{#2}$}}129 \def\@mathbox#1#2{#1#2}Now, there is a reason why these are defined with \def and not \newcommand.You see, what I really wanted to do was something like\newcommand{\mathbox}[2][]{%\hbox{#1$\mathpalette\@mathbox{#1}$}}\newcommand{\@mathbox}[2]{#1#2}in order to get optional arguments to my \mathboxes. <strong>The</strong> problem, though, isthat I want to use this command in the context of \boxN=\mathbox{...}, andfor that to work, the first token in the expansion of \mathbox must be a \?boxcommand. <strong>The</strong> overhead imposed by \newcommand precludes this. So, I use thecheap hack until I figure out a more workable way of implementing what I reallywant.A more generically applicable box command is one which does unto widthwhat \smash does to height. Hence \smush:7

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!