; TeX output 1996.10.23:1029FDtGGcmr17A7tstqyleoptiontocreateniceframeswiththemNG cmbx12dingbat7tfonqts!", cmsy10gXQ cmr12MarcusOhlhautIWVestendstrae231i_D-80686MSvuncrhenͭN߆T cmtt12marcusff}r-ohlhaut@m4.maus.deCPrinrtedOctobSer23,19960Kt : cmbx9Abstractэo cmr9ThisarticledescribAesanewst9yleoptionthatcanbeusedwiththedocumen9t yst9yles&thataredistributedwiththeL5Aacmr6A TuAEXdistributions.̬Itde nesnewcommandsytoTframematerialwithdecorativ9eframes,using68dingbatfonts.#č`!Nff cmbx12Contents`""V cmbx101oIn9troQduction1`2oTheTuserin9terfaceS2`3oTheTimplemen9tationUz2oK`y cmr103.1TheUU#- cmcsc10docstripmoGdules`+..........................c2o3.2ProGducingUUthedocumentation.......................c2o3.3TheUUexamplew................................c3o3.4UsefulUUfontsԍ.................................c4o3.5TheUUcoGdeF..................................c4`1xLIntros3duction`WhentgIt_setouttobGecomefamilarwithallthefontsavqailableforTU>'ExX,|+It_cameacross `theAdingbatfont.7SOnlyafewglyphshavebGeende nedinthatfont,|andsomeof`themUUareintendedtoyieldniceframeswhensetappropriately*.`IQdidn'tswanttoworkoutthedetailsofarrangingtheglyphseachtimeIQneededto`frameUUtext,andhencewrotethislittlepackqagetodotheworkforme.`When4testingthis,;0I4noticedthatoneoftheglyphswaswronglycoGdedintheoriginal`dingbatvdistribution.hT*ogetherwiththispackqage,Cacorrectedversionof=dingbatis`distributed.`Thisdpackqagehasnooptions.\Itrequiresthepackqage$'ExX2 b> cmmi10"(.cs1j cmsy9h(ow cmss9driveroi cs2j'ߤN cmtt9\documentclass{ltxdoc}cs3cs4j%dimensionsfromltugboat.sty:cs5j\setlength\textwidth{31pc}\setlength\textheight{54pc}cs6j\setlength{\parindent}{0pt}cs7j\setlength{\parskip}{2ptplus1ptminus1pt}cs8j\setlength{\oddsidemargin}{8pc}cs9j\setlength{\marginparwidth}{8pc}`10j\setlength{\topmargin}{-2.5pc}`11j\setlength{\headsep}{20pt}`12j\setlength{\columnsep}{1.5pc}`13j\setlength{\columnwidth}{18.75pc}`14j\EnableCrossrefs`15j\RecordChanges`16j\CodelineIndex`17`18j\MakeShortVerb{\|}`19j\begin{document}`20`21j\DocInput{niceframe.dtx}`22`23j\end{document}`24jh5" cmmi9=driveroi2ŠF`3.3~Theexample9B`ThisPisjustashortL5ffA͉TU>'ExX- letotesttheinstallation.pCInstalltheniceframepackqage, `andUUrunlatex?example.tex.܍`25jhexample#{i `26j\documentclass[a4paper]{article}`27j\usepackage{niceframe}`28`29j\begin{document}`30j\pagestyle{empty}`31`32j\parindent0pt܍`First,UUa\niceframethatspansthewhole\textwidth.`33j\niceframe{%`34odD\begin{center}`35tMaytheroadrisetomeetyou\\`36tMaythewindbealwaysatyourback\\`37tMaythesunshinewarmuponyourface\\`38tTherainfallsoftuponyourfields\\`39tAnduntilwemeetagain\\`40tMayGodholdyouinthehollowofhishand\\`41odD\end{center}`42odD\bigskip`43odD\hfillTheBlessingofSt.~Patrick`44j}`45j\vfill܍`Then,UUacentered\curlyframethatisonly0.75\textwidthwide.`46j\centerline{%`47odD\curlyframe[0.75\textwidth]{%`48t\begin{center}`49xp\LARGEIamnotflexible!\\`50xpJustdisorganized!\\`51t\end{center}`52j}}`53j\vfill܍`AndUUan\artdecoframeforthephilosophicalbit.`54j\centerline{orisit\dots}`55j\vfill`56j\artdecoframe{%`57odD\begin{center}`58t\LARGEIamnotdisorganized!\\`59tJustflexible!\\`60odD\end{center}`61j}`62j\newpage܍`TheUUfollowingthreeframesareexamplesof\generalframe.`63j\font\border=karta15`64j\generalframe{\border\char'307}{\border\char'324}{\border\char'322}`65L{\border\char'310}U {\border\char'323}`66L{\border\char'174}{\border\char'325}{\border\char'175}`67L{Thisisa\texttt{generalframe},usingeightdifferent`68charactersfromfont\texttt{karta15}aspartsofthe`69framework.Onemightuseittopointotherpeopleto`70importantnotes,hintsand/ormessages.`71L}3 F`72j\vfill `73j\font\border=umranda`74j\generalframe{\border\char'136}{\border\char'137}{\border\char'140}`75L{\border\char'145}U {\border\char'141}`76L{\border\char'144}{\border\char'143}{\border\char'142}`77L{This\texttt{generalframe}usessymbolsfromAlexander`78Schrell's\texttt{umranda}(hiseMailis:`79alexander\_schrell@w2.maus.de)collection.`80Thematerialtobeframedconsistsofquiteafewlinesto`81emphasizethefactthatvirtuallyanythingcango`82insidea\texttt{generalframe}.Notethatwearelimited`83by\TeX'smemoryasthematerialtoframehastobepassed`84asanargument.Youcan'tcheatbypassinga\texttt{vbox}`85thathasalreadybeenset(asyoumightwithsomeother`86macros)since\texttt{generalframe}hastore-setallofit.`87L}`88j\vfill`89j\font\border=umrandb`90j\generalframe{\border\char'165}{\border\char'151}{\border\char'164}%`91L{\border\char'150}U {\border\char'150}%`92L{\border\char'166}{\border\char'151}{\border\char'167}`93L{Last,butnotleast!This\texttt{generalframe}(with`94symbolsfrom\texttt{umrandb})displayssomemath:`95$$E=mc^2$$`96whicheveryonewillimmediatelyrecognizeasthefamous`97Einsteinformulaforenergy-mass-equivalence.`98L}`99j\end{document}\100jh=example#{i`3.4~Usefulfonts9`The7fontusedforsettingtheframesisthedingbatfontbyDougHenderson.anSince `thec@originaldistributioncontainedawronglycoGdedchar,fIc=haveincludedacorrected`version0withthispackqage.>fExceptfromthecoGdeforchar("e"),thisisDoug'soriginal` le. A`IPhavefalsoaddedthefontsbbQding10,k\rarta15,umrandafandumrandbforthey`areUUusedintheexamples.`3.5~Theco`de9`W*ebGeginbyidentifyingtheversionofthis leontheterminalandinthetranscript` leandUUbyloadingthepackqagecalc.\101jhpack9age#g i \102j\NeedsTeXFormat{LaTeX2e}[1994/06/01]\103j\ProvidesPackage{niceframe}[\filedate\spacev\fileversion\spaceniceframepackage(MO)]\104j\typeout{Package:niceframev\fileversion\space<\filedate>(MarcusOhlhaut)}\105j\RequirePackage{calc}`W*eUUthenloadthefontusedforsettingthestandardframes.\106j\font\dingdingbatscaled1200`AUUfewinternaldimensionsneedtobGede nedandinitialized.\107j\newlength{\nicefr@mechar} \108j\settowidth{\nicefr@mechar}{\ding\char'141}\109j\newlength{\nicefr@mewidth}\110j\setlength{\nicefr@mewidth}{\hsize}4$F\111j\newlength{\nicefr@meheight} \112j\setlength{\nicefr@meheight}{\vsize}\113j\newlength{\@ldhsize}\114j\setlength{\@ldhsize}{\hsize}t\upd@ublerulefill t\dnd@ublerulefill t\ltd@ublerulefill t\rtd@ublerulefill`Theseinternalmacrosde neasetofleadersforeachofthefoursidesof\niceframe. `TheUUappropriatecharsaretakenfromthedingbatfont.\115j\newcommand{\upd@ublerulefill}{\xleaders\hboxto10pt\116odD{\hss\ding\char'142\hss}\hfill}\117j\newcommand{\dnd@ublerulefill}{\xleaders\hboxto10pt\118odD{\hss\ding\char'147\hss}\hfill}\119j\newcommand{\ltd@ublerulefill}{\xleaders\vboxto10pt\120odD{\vss\hbox{\ding\char'144}\vss}\vfill}\121j\newcommand{\rtd@ublerulefill}{\xleaders\vboxto10pt\122odD{\vss\hbox{\ding\char'145}\vss}\vfill}'\niceframe`Finally*,UUwede netheuserinterfaces.\123j\newcommand{\niceframe}[2][\textwidth]{{`First,UweUUhavetosetthematerialthatispassedto\niceframetoanappropriate `width.oThatpwidthistherequestedwidthofthe nal\vboxminustwicethesize`ofthecharsthatmakeupthecornersoftheframe(ie.\nicefr@mechar).Theset`materialUUisstoredforfurtherusein\box0.\124odD\setlength{\hsize}{#1-2\nicefr@mechar} \125odD\setbox0=\vbox{#2}`W*eY thenuseheightanddepthof\box0tocalculatetherequiredheightofthe\vbox`thatUUenclosestheverticalleaders.\126odD\setlength{\nicefr@meheight}{\ht0+\dp0}`Similarily*,UUwethenusethewidthof\box0forenclosingthehorizontalleaders.\127odD\setlength{\nicefr@mewidth}{\wd0+2\nicefr@mechar}`Finally*,hwhenalltherelevqantdimensionshavebGeendetermined,htheframeiscompiled. `W*e߃startwiththetoprow(cornerchar,horizontalleader,cornerchar),setthemiddle`partD(verticalleader,H:thingstoframe,verticalleader)and nishwiththebGottomrow`(cornerUUchar,horizontalleader,cornerchar).\128odD\vbox{% \129t\hboxto\nicefr@mewidth{\ding\char'141\upd@ublerulefill\char'143}\130t\hboxto\nicefr@mewidth{\vboxto\nicefr@meheight{\ltd@ublerulefill}\131\hss\raise\dp0\box0\hss\132\vboxto\nicefr@meheight{\rtd@ublerulefill}}\133t\hboxto\nicefr@mewidth{\ding\char'146\dnd@ublerulefill\char'150}\134odD}\135j}}"L\curlyframe`Thismacroworksexactlylike\niceframe.6 Theonlydi erenceisthatweusestret- `chableHspaceinsteadofleadersanddi erentglyphsforthefourcorners(obviously).`W*eUUhalsohaveUUtomoveUUthetextabitclosertothecornersduetotheirshapGe.\136j\newcommand{\curlyframe}[2][\textwidth]{{ \137odD\setlength{\hsize}{#1-2\nicefr@mechar}\138odD\setbox0=\vbox{#2}\139odD\setlength{\nicefr@meheight}{\ht0+\dp0}\140odD\setlength{\nicefr@mewidth}{\wd0+2\nicefr@mechar}\141odD\vbox{%\142t\hboxto\nicefr@mewidth{\ding\char'105\hfill\char'106}51eF\143t\vskip-\baselineskip \144t\hboxto\nicefr@mewidth{\hss\raise\dp0\box0\hss}\145t\vskip-\baselineskip\146t\hboxto\nicefr@mewidth{\ding\char'110\hfill\char'107}\147odD}\148j}}H4\artdecoframe`ThisUUisjustavqariationof\curlyframe.\149j\newcommand{\artdecoframe}[2][\textwidth]{{\150odD\setlength{\hsize}{#1-2\nicefr@mechar}\151odD\setbox0=\vbox{#2}\152odD\setlength{\nicefr@meheight}{\ht0+\dp0}\153odD\setlength{\nicefr@mewidth}{\wd0+2\nicefr@mechar}\154odD\vbox{%\155t\hboxto\nicefr@mewidth{\ding\char'115\hfill\char'114}\156t\hboxto\nicefr@mewidth{\hss\raise\dp0\box0\hss}\157t\hboxto\nicefr@mewidth{\ding\char'112\hfill\char'113}\158odD}\159j}}\generalframe`Finally*, 4Ihave,designedamoregeneralmacroforframing.R\generalframetakesnine `parametersư(righttothelimit)andproGducesa\vbox.Thewidthofthisboxisless`thanI5(orequalto)thecurrent\hsize;M?anditconsistsofabGordergeneratedfromthe`charactersshinthe rsteightargumentsandabGoxwhichcontainsthematerialpassed`inUUtheverylastargument. `TheUU rsteightparametersto\generalframeareusedasfollows:Bo !", cmsy10y#1UUisthecharacterforthetopleftcorner,oy#2UUbuildsthetophorizontalleader,oy#3UUisthecharacterforthetoprightcorner,oy#4UUbuildstheleftverticalleader,oy#5UUbuildstherightverticalleader,oy#6UUisthecharacterforthebGottomleftcorner,oy#7UUbuildsthetophorizontalleader,oy#8UUisthecharacterforthebGottomrightcorner,`ThisDbGoxiscenteredwithrespGecttotheframe,{andthereisatleast\fboxsepbetween `the cmmi10K`y cmr10ٓRcmr7c