Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!apple!agate!agate!rusty From: rusty@belch.Berkeley.EDU (rusty wright) Newsgroups: comp.text.tex Subject: Re: Sloppy line-breaking: I didn't want it THAT sloppy! Message-ID: Date: 9 Nov 90 21:25:24 GMT References: <944@edg1.UUCP> Sender: usenet@agate.berkeley.edu (USENET Administrator) Organization: University of California Berkeley Lines: 72 In-Reply-To: jsa@edg1.UUCP's message of 8 Nov 90 14:23:06 GMT In _Graphic Design for the Electronic Age_ by Jan V. White he spends several pages listing the advantages of using ragged-right instead of justified text. One is that it's easier to read, another is that you don't usually have line-breaking problems like you're getting. After reading this book I've switched over to ragged-right exclusively. Here are the macros that I use that someone sent me. I use it with latex; name it ragright.sty and then use \documentstyle[ragright]{...} ... \ragright. % This is recommended in the TeXbook, and is probably a good % idea, though you really need to use it for every single font % used in your ragged-right text. It may not be worth the bother. % turn off stretchability for \raggedright setting %\fontdimen3\tenrm=0pt \fontdimen4\tenrm=0pt %\fontdimen3\tenit=0pt \fontdimen4\tenit=0pt %\fontdimen3\sevrm=0pt \fontdimen4\sevrm=0pt %\fontdimen3\sevit=0pt \fontdimen4\sevit=0pt % The rest of the message (down to the .signature) is an excerpt % from my personal LaTeX .sty file. Since it contains private % LaTeX macro names, it must be part of a .sty file, or enclosed % in \makeatletter ... \makeatother. % % I do not redefine the \raggedright command, because it has a % purpose (alongside \raggedleft and \centering). Note also that % immediately after defining \@ragright, I execute it (because I % want my text to be ragged-right by default). You may want to % take that line out. % % \raggedskip is the amount of glue to add at the right edge of % each line; my default (0pt plus4em) gives a decent right edge % without requiring too many unfortunate hyphenations, at least % using the typeface I use with the usual LaTeX \hsize. % % ragged-right % \newskip\raggedskip \raggedskip=\z@ plus4em % % \@ragright: like \raggedright, but % set \@rightskip to something reasonable instead of \@flushglue % and leave \parindent alone! (from latex.tex) % \newcommand\@ragright{\let\\=\@centercr\@rightskip\raggedskip \rightskip\@rightskip \leftskip\z@} % % civilize \@arrayparboxrestore (from latex.tex) % \def\@arrayparboxrestore{\let\par\@@par \let\-\@dischyph \let\'\@acci \let\`\@accii \let\=\@acciii \parindent\z@ \parskip\z@ \everypar{}\linewidth\hsize \@totalleftmargin\z@ \leftskip\z@ \@rightskip\raggedskip\rightskip\@rightskip \parfillskip\@flushglue \lineskip\normallineskip \baselineskip\normalbaselineskip\sloppy} % ersatz ragged-right \newcommand{\ragright}{% \fontdimen3\elvrm=0pt\relax% \fontdimen4\elvrm=0pt\relax% \fontdimen3\elvit=0pt\relax% \fontdimen4\elvit=0pt\relax% \fontdimen3\elvsl=0pt\relax% \fontdimen4\elvsl=0pt\relax% \fontdimen3\elvbf=0pt\relax% \fontdimen4\elvbf=0pt\relax% \@ragright}