home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.text.tex
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!moe.ksu.ksu.edu!ux1.cso.uiuc.edu!news.cso.uiuc.edu!usenet
- From: heller@heller.slip.uiuc.edu (Helmut Heller)
- Subject: Re: line break after every character, how?:SOLUTION
- References: <1992Nov19.160226.6338@newssrv.edvz.univie.ac.at>
- Message-ID: <BxzKIz.4CC@news.cso.uiuc.edu>
- Sender: usenet@news.cso.uiuc.edu (Net Noise owner)
- Reply-To: heller@lisboa.ks.uiuc.edu
- Organization: University of Illinois at Urbana
- Date: Thu, 19 Nov 1992 23:13:43 GMT
- Keywords: SOLUTION, Thanks
- Lines: 55
-
- Thanks to everyone who responded to my original request.
-
- David Carlisle, carlisle@cs.man.ac.uk, has actually made a style file which
- does what I want. It is available from aston and SHSU and is called
- showkeys.sty.
-
- Muhammad Masroor Ali and Hiroshi NAKASHIMA pointed out how to split a word in
- single characters and I based my solution on their insight (see below).
-
- Peter Schmitt gave a solution involving "real" hyphenation; perhaps overkill
- for what I wanted to do.
-
- Here my little macros to make labels appear in the margins and if they don't
- fit they are wrapped around nicely:
-
- %% show labels in margins if draft mode
- \if@draft
- \def\BreakAfterEachCharacter#1{\Break#1\EndText}
- \def\Break#1{\ifx#1\EndText\let\next = \relax
- \else#1\penalty0\let\next=\Break\fi
- \next}
- \def\EndText{End@fT@xt}
- \reversemarginpar
- \def\label#1{\@bsphack\if@filesw {\let\thepage\relax
- \def\protect{\noexpand\noexpand\noexpand}%
- \xdef\@gtempa{\write\@auxout{\string
- \newlabel{#1}{{\@currentlabel}{\thepage}}}}}\@gtempa
- \if@nobreak \ifvmode\nobreak\fi\fi\fi%
- % here comes the new stuff to print the label in the margin
- \def\@mr{%
- \smash{%\smash will eliminate hight and width of the box
- \hspace*{-2mm}% experimental factor, that is as far as the printer will print
- \hspace*{-\marginparwidth}% we reserve the width of the margin
- \hspace*{-\marginparsep}% we go as far out as possible, no outer space
- \parbox{\marginparwidth}{\raggedright\footnotesize\tt
- \BreakAfterEachCharacter{#1}}}}
- \ifvmode
- \@mr
- \else
- \vadjust{\smash{\raise 8pt\hbox{\@mr}}
- % we need this smash to elimitate the effect
- % of the \raise
- }
- \fi
- \@esphack}
- \fi
-
-
- --
- Servus, Helmut (W9/DH0MAD) ______________NeXT-mail preferred________________
- heller@lisboa.ks.uiuc.edu "Knowledge must be gathered and cannot be given"
- FAX: (217)244-6078 ZEN, one of BLAKES7
- Phone: (217)244-6914 -------------------------------------------------
- Helmut Heller, University of Illinois at Urbana-Champaign, Beckman Institute
- Theoretical Biophysics Group, Room 3143, MC 251
-