; TeX output 1996.10.01:1556soADtGGcmr17The7tGGcmss17Ragged2e-pacqkage!", cmsy10ޟXQ cmr12MartinScrhr oderURK`y cmr10F*riedrich-HumbGert-StraeUU124/ED-28759UUBremen!MS@Dream.HB.North.DEUU(Internet)DȌ-1996/05/30,LDD"|{Ycmr8A_ٻT UE!XedOctobSer1,1996-c[>t : cmbx9Abstract5So cmr9ThisU>pac9k|rageprovidesnewcommandsandenvironmentsforset- ~stingU>raggedtextwhic9hareeasytocon guretoallowhyphenation.~sAnU>earlierattempttodothisw9asthestyleow cmss9raggedright[6]bythe~ssameU>author. 8esNff cmbx12Contentses "V cmbx101tsTheU>problem~ 1es2tsOldU>\solutions"2 ts2.1sL5ffٓRcmr7A͉TU>'ExXUэ..............................2ts2.2s!solution2ts3.1sUsage'..............................2s3.1.1sTheUUmacros?~.......................3s3.1.2sTheUUparametersm.....................3s3.1.3sTheUUenvironments΍...................5es4tsOptions m5es5tsRequiredU>pac9k\rages+6es6tsAc9knowledgementsOn6xۍVes1}TheU>problem$ઍesL5ffA͉TU>'ExX8hasthreecommands(\centering,es\raggedleft, and~\raggedright)esandzthreeenvironmentsz("m#R cmss10center,es ushleft,&and ushright)totypGesetesraggedtext.oTheenvironmentsesarebasedupGonthecommandsDŽlqff-(centerʲuses=\centering,1v ush-left<\raggedright,v\and ushright\raggedleft).ઍThesecommandshave,ghowever,oneserious aw:8theyrenderhyphen-ationalmostimpGossible,*andthusthe;textloGoks#': cmti10to}'o-ragged,u%asthefollowingUUexampleshows:es(tff @ -:q% cmsy6LTheXvÎersionnumb\SOLUTIONS"2oq#퍍xes$ߤN cmtt9\raggedright: es\TheU>L5Aacmr6A TuAEXesdoAcumen9tespreparationessystemU>isaesspAecialU>v9ersionofesDonaldU>Kn9uth'sesTuAEXU>program.esTuAEXU>isaessophisticatedesprogramU>designedestoU>proAduceeshigh-qualit9yest9ypAesetting,esespAeciallyU>foresmathematicalestext."[3,U>p.xiii]cDŽ|xff)\RaggedRight: \TheU>L5A TuAEXdoAcu-men9tU>preparationsystemU>isaspAe-cialU>v9ersionofDonaldU>Kn9uth'sTuAEXU>program.TuAEXU>isasophis-ticatedU>programdesignedU>topro-duceU>high-qualit9yt9ypAesetting,U>espe-ciallyU>formathe-maticalU>text."[3,p.xiii]$"zes2}OldU>\solutions"Hes'N cmbx122.13LAl#(2@cmbx8A~/TESXָesL5ffA͉TU>'ExXgde nese.g.\raggedrightas esfollows:h1p& cmsy9hlatex-i h2p\def\raggedright{%h3~KW\let\\=\@centercrh4~KW\@rightskip\@flushglueh5~KW\rightskip\@rightskiph6~KW\leftskip\z@h7~KW\parindent\z@}esInitially*,UU\@flushglueisde nedash8p\@flushglue=0ptplus1filh9ph%5" cmmi9=latex-iesThusthe\rightskipissetto es0pt?plus1fil.Knuth,aKhowevereswarnsUU[2,p.q101]:꜍~s\F:orU>example,apAerson ~scanU>set\rightskip=0pt~splus1fil,U>andev9eryline~swillU>bAe lledwithspaceto~stheU>righ9t.Butthisisn'ta@#ff?ݍparticularlyU>goAodw9ayto mak9eU>ragged-rightmar-gins,U>bAecausethein n9testretc9habilityU>willassignzeroU>badnesstolinesthatareU>v9eryshort.T:odoadecen9tU>jobofragged-rightsetting,U>thetric9kistoset\rightskipU>sothatitwillstretc9hU>enoughtomakelineU>breakspAossible,y9etnotU>toAom9uch,U>becauseshortU>linesshouldbAecon-sideredU>bad.F:urthermoretheU>spacesbAet9weenU>wordsshouldU>bAe xedsothattheyU>donotstretc9horshrink." 2.2#+߆T cmtt12plainXDplainTU>'ExXde nesanspGecialver- sion0of0\raggedright,fwhichop-eratesthewayKnuthdescribGesit;but8whichcannotbGeusedwhithL5ffA͉TU>'ExX,0ibGecauseeL5ffATU>'EXerede nes\raggedright.󍍑)X10w|hplain i )X11w|\def\raggedright{%)X12>\rightskip\z@plus2em)X13>\spaceskip.3333em)X14>\xspaceskip.5em\relax}plainoprovidesalsoaversionof \raggedrightUUfortypGewriterfonts)X15w|\def\ttraggedright{%)X16>\tt)X17>\rightskip\z@plus2em\relax})X18w|h=plain i$`es3}OurU>solutiones3.13UsageesSincetheplainsolutioncannotbGeusedwithL5ffA͉TU>'ExX,wehavetorede ne esitUUandmakeitpGossibletocon gureitforpersonalpreferences.Ѡses3 OURU>SOLUTIONax3oes3.1.1iTheU>macroses\Centering,z\RaggedLeft,and \RaggedRightcanbGeusedinthesame+4 \Centering &zu\RaggedLeft!\RaggedRight eswaynbas\centering,\raggedleft,andnb\raggedright:JusttypGetheescommand,-and$afterthatthewholetextwillbGesetcentered,ragged-leftoresragged-right.aesF*or˫example,@weswitchedon\RaggedRightonthetopofthistext,@andesconsequentlyUUthistextwassetragged-right.esTheYnewcommandsarefullycompatiblewiththeircounterpartsinL5ffA͉TU>'ExX,esbutimplementtheplainsolutionandcanbGeeasilycon guredusingtheesfollowingUUparameters:~鍍es3.1.2iTheU>parametersFnӍesTwF 2ӍCommandPUsesF\CenteringP\CenteringLeftSkip,Ĭ\CenteringRightSkip, P\CenteringParfillskip,UU\CenteringParIndent\RaggedLeftP\RaggedLeftLeftskip,\RaggedLeftRightskip, P\RaggedLeftParfillskip,UU\RaggedLeftParIndent\RaggedRightP\RaggedRightLeftskip,Ƀ\RaggedRightRightskip, P\RaggedRightParfillskip,UU\RaggedRightParIndentallP\RaggedSpaceskip,UU\RaggedXSpaceskipKF?~esAllUUParameterscanbGesetwith\setlength,e.g.K.~s\setlength{RaggedRightRightskip}{0ptplus1em}K/essetsUU\RaggedRightRightskipto0pt?plus1em.esThese>arethe\leftskipsinsertedbyb?\Centering,y \RaggedLeft,andg[\CenteringLeftskip\RaggedLeftLeftskip/\RaggedRightLeftskipes\RaggedRight.K.1\\leftskip+(glueU>atleftofjusti edlines)"[2,p.274]K/es\leftskipmmustbGesettoa nitevqalue,tomakehyphenationpGossible.esSettingV?ittoin nitevqalueslike0pt?plus1filV?makeshyphenationalmostesimpGossible.esThese#arethe\rightskipsinsertedby \Centering,'\RaggedLeft,and\CenteringRightskip/\RaggedLeftRightskip:\RaggedRightRightskipes\RaggedRight.K.1\\rightskipC(glueU>atrigh9tofjusti edlines)"[2,p.274]K/es\rightskipmustbGesettoa nitevqalue,qtomakehyphenationpGossible.esSettingV?ittoin nitevqalueslike0pt?plus1filV?makeshyphenationalmostesimpGossible.esThesezarethe\parfillskipsinsertedby\Centering,/\RaggedLeft,and:\CenteringParfillskip\RaggedLeftParfillskipm\RaggedRightParfillskipes\RaggedRight.s1\\parfillskip¶(additionalU>\rightskipatendofparagraphs)"[2, ¶p.U>274]Pses3 OURU>SOLUTIONax4oesTheSnormalsettingfor\parfillskipis0pt?plus1fil;theSparame- estersrbareprovidedfortestingcombinationsof9\ !", cmsy10fleftjrightgskipandes\parfillskip.esThesearethe\parindentsusedbyY\Centering,\RaggedLeft,and\CenteringParindent/\RaggedLeftParindent:\RaggedRightParindentes\RaggedRight.1\\parindentC(widthU>of \indent)"[2,p.274]es\parindentRistheindentofthe rstlineofaparagraphandshouldbGesetestoUU0pt,sinceindentedlinesinraggedtextdonotloGokgood.es\RaggedSpaceskipVisthe\spaceskipusedbyzG\Centering,W\RaggedLeft,ڇ\RaggedSpaceskipesandUU\RaggedRight.1\\spaceskipC(glueU>bAet9weenwords,ifnonzero)"[2,p.274]esIfD\spaceskip'isnonzero,the\spaceskipglueisusedforaninterwordesspace.)Thegvplainsolutionsets\spaceskipto.3333emsothatthespacesesbGetweenxwordsare xed./ThiscanonlybGeusedwithproportionalfonts,essincewithmonospacedfontslikecmttthe\spaceskipshouldbGesettoesthewidthofaspace`EJffff&f.Jffw',whichise.g..5emincmtt.1tSoplainprovidesesthe$command\ttraggedrightformonospacedfontswhichdoGesn'tsetes\spaceskip.esT*oBsolvethisproblemweusethepackqageeverseltodistinguishbGetweenesmonospaced.andpropGortionalfonts.vIfthecurrentfontismonospacedes(\fontdimen3=0pt)weset\spaceskiptotheinterwordspacede nedesbyUUthefont(\fontdimen2);otherwiseweuse\RaggedSpaceskip.^1es\RaggedXSpaceskipisthe\xspaceskipusedby\Center,Y\RaggedLeft, \RaggedXSpaceskipesandUU\RaggedRight.1\\xspaceskipW(glueU>bAet9weensentences,ifnonzero)"[2,p.274]es\xspaceskipisthegluebGetweensentences(afterelementswithaspaceesfactore2000),ifnonzero.HerewealsohavetodistinguishbGetweenesmonospacedUUandpropGortionalfontsusingxeverysel.esTheUUparametershaveUUthefollowinginitialsetting:esX-ff J= "5-:1LThisU>will/#fcmti8notalloÎwhyphenationoftypto-1forthe\ttfamily[4@].+ses4 OPTIONSL5o+xWesTwF 2ӍParameterL5ffA͉TU>'ExXUUsettingRagged2eUUsettingF\CenteringLeftskip0pt?plus1fil0pt?plus2em \RaggedLeftLeftskip0pt?plus1fil0pt?plus2em\RaggedRightLeftskip0pt?plus0ptminus?0pt0pt?plus0ptminus?0pt\CenteringRightskip0pt?plus1fil0pt?plus2em\RaggedLeftRightskip0pt?plus0ptminus?0pt0pt?plus0ptminus?0pt\RaggedRightRightskip0pt?plus1fil0pt?plus2em\CenteringParfillskip0pt?plus0ptminus?0pt0pt?plus0ptminus?0pt\RaggedLeftParfillskip0pt?plus0ptminus?0pt0pt?plus0ptminus?0pt\RaggedRightParfillskip0pt?plus1fil0pt?plus1fil\CenteringParindent0pt0pt\RaggedLeftParindent0pt0pt\RaggedRightParindent0pt0pt\RaggedSpaceskip0pt0.3333em/\fontdimen2^2\RaggedXSpaceskip0pt.5em/0pt^2KFes3.1.3iTheU>en9vironmentsesCenterisfullycompatiblewithcenter, butuses\Centeringinsteadof>cCenter es\centering.esFlushLeftͲisfullycompatiblewithflushleft,'butuses\RaggedRight/FlushLeftesinsteadUUofr\raggedright.esFlushRightnisfullycompatiblewithflushright,butuses\RaggedLeft+4 FlushRightesinsteadUUofr\raggedleft.esE.g.UUFlushLeftcanbGeusedinthesamewayUUasflushleft:~s\begin{FlushLeft} ~sh1j cmti9text,މwhichއisfragged-righti~s\end{FlushLeft}$`es4}OptionsesThisUUpackqagehasthefollowingoptions:esOriginalCommandsTheL5ffA͉TU>'ExX-commands\centering,]\raggedleft,and ~s\raggedrightzandtheL5ffA͉TU>'ExX-environmentszcenter, ushleft,and~s ushrightUUremainunchanged.~sItUUisthedefault.esffff J= "5-:2LFJorU>propP*ACKAGESZ6oesNewCommandsbTheL5ffA͉TU>'ExX-commands\centering,˦\raggedleft,and ~s\raggedrightzandtheL5ffA͉TU>'ExX-environmentszcenter, ushleft,and~s ushright+aresetequaltotheircounterpartsde nedbyO ragged2e.~sThuso1\raggedrightinvokes\RaggedRight.[Theoriginalcommands~scan[bGeaccesseduntertheNames\LaTeXhoriginal*vname[iF?/,'ExX.esNewParameters^TheKparametersusedbythecommandsimplementedby~sragged2e>areinitializedwiththedefaultsettingsde nedbybragged2e.~sItUUisthedefault.$`es5}RequiredU>packagesesThisUUpackqagerequiresthefollowingpackqage:eseverysel[5]3It8isusedtodistinguishbGetween8monospacedandproportional~sfonts.es6}AcknowledgementsesAUU rstversionofthispackqageforL5ffA͉TU>'ExX2.09wasnamedraggedri[6].esLaurentuSiebGenmann(lcs@topo.math.u-psud.fr)withhisstylerag-esged.sty#[7]UUprovidedthe nalimpulseforthisnewimplementation.esWithout8theconstantnaggingofRainerSieger(rsieger@awi-bremerhaven.de)esthisUUpackqagemightnotbGe.esReferenceses[1]u"JohannesBraams,`DavidCarlisle,AlanJe rey*,LeslieLampGort,F*ranku"Mittelbach,tChris ;Rowley*,and ;RainerSchopf.ltmiscen.dtx.Part ;oftheu"L5ffA͉TU>'ExX-distribution.es[2]u"Donald>eE.Knuth.@TheU>TKß'E-XBo}'ok,v/volume>eA>ofComputers&T;yp}'esetting.u"Addison-W*esley,UUReading,MA,USA,1986.es[3]u"LeslieLampGort.qL雍Q2t}\cmti7ATKß'E-X:AU>Do}'cumentPreparationSystem.qAddison-u"W*esley,UUReading,MA,USA, rstedition,1986.es[4]u"F*rankMittelbachandRainerSchopf.+The lecmfonts.fddforuseu"withUUL5ffA͉TU>'ExX2 b> cmmi10"(.nPartUUoftheL5ffA͉TU>'ExX-distribution.es[5]u"Martin'Schroder.Theeverysel-packqage.CTAN:u"tex-archive/macros/latex/contrib/supported/everysel.#L5ffA͉TU>'ExX2"u"packqage.AΠsesIndex)M7oes[6]u"MartinSchroder.TheraggedridoGcumentoption.W*asinCTAN: u"tex-archive/macros/latex209/contrib/raggedright.#L5ffA͉TU>'ExX2.09u"style,UUoutdated.es[7]u"Laurent hSiebGenmann.hragged.sty.CTAN:u"tex-archive/macros/generic/ragged/ragged.sty.genericQmacrou" leUUforplainandL5ffA͉TU>'ExX.$`esIndexesNumbGersqwritteninitalicHrefertothepagewherethecorrespondingentryesisdescribGed,theonesunderlinedfe.#5tothede nition,theresttotheplaceseswhereUUtheentryisused.ǍesCen9ter=CenterU>(environment),5 esCen9tering=X\subitem*+\Centering+,\usage{3}esCen9teringLeftskip=X\subitem*+\CenteringLeftskip+,\usage{3}esCen9teringPar llskip=X\subitem*+\CenteringParfillskip+,\usage{3}esCen9teringParindent=X\subitem*+\CenteringParindent+,\usage{4}esCen9teringRightskip=X\subitem*+\CenteringRightskip+,\usage{3}esdef=X\subitem*+\def+,2,11,15esen9vironments:>Center,U>5 esen9vironments:>FlushLeft,U>5esen9vironments:>FlushRight,s5esFlushLeft=FlushLeftU>(en9viron-smen9t),U>5esFlushRigh9t=FlushRightU>(environ-smen9t),U>5esleftskip=X\subitem*+\leftskip+,6eslet=X\subitem*+\let+,3esparinden9t=X\subitem*+\parindent+,7esRaggedLeft=X\subitem*+\RaggedLeft+,\usage{3}ffRaggedLeftLeftskip=X\subitem*+\RaggedLeftLeftskip+,\usage{3} lORaggedLeftP9ar llskip=X\subitem*+\RaggedLeftParfillskip+,\usage{3}RaggedLeftP9arindent=X\subitem*+\RaggedLeftParindent+,\usage{4}RaggedLeftRigh9tskip=X\subitem*+\RaggedLeftRightskip+,\usage{3}RaggedRigh9t=X\subitem*+\RaggedRight+,\usage{3}raggedrigh9t=X\subitem*+\raggedright+,2,11RaggedRigh9tLeftskip=X\subitem*+\RaggedRightLeftskip+,\usage{3}RaggedRigh9tPar llskip=X\subitem*+\RaggedRightParfillskip+,\usage{3}RaggedRigh9tParindent=X\subitem*+\RaggedRightParindent+,\usage{4}RaggedRigh9tRightskip=X\subitem*+\RaggedRightRightskip+,\usage{3}RaggedSpaceskip=X\subitem*+\RaggedSpaceskip+,\usage{4}RaggedXSpaceskip=X\subitem*+\RaggedXSpaceskip+,\usage{4}relax=X\subitem*+\relax+,14,17righ9tskip=X\subitem*+\rightskip+,5,12,17D퍑spaceskip=X\subitem*+\spaceskip+,13tt=X\subitem*+\tt+,16 lOttraggedrigh9t=X\subitem*+\ttraggedright+,15xspaceskip=X\subitem*+\xspaceskip+,14=X\subitem+,6,7,12,17M; 2t}\cmti71j cmti90Cscmtt8/#fcmti8-p0J cmsl10+߆T cmtt12(2@cmbx8'N cmbx12& cmsy9%5" cmmi9$ߤN cmtt9#': cmti10"m#R cmss10! cmmi10K`y cmr10ٓRcmr7Y