🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.text
Article #4985

Getting Underlined Section Headings To Wrap

#4985
From: Jeff Wong
Date: Fri, 05 Aug 1988 19:48
42 lines
2537 bytes
	I am trying to create a new document style using the `article'
document style as a basis.  My problem occurs when I try to underline the
subsection headings.  I use the \underbar command and pass it parameter
#8 (the subsection heading), see the example code below.  This works
quite well if, and only if, the subsection heading is no longer than one line.
If it is longer, it doesn't wrap and goes shooting dramatically off the page.
I have tried placing a \parbox and a \begin{minipage} environment around
the {\underline{\uppercase{#8}}}, but this doesn't seem to have any effect.
Can anyone suggest an appropriate solution.  Thanks in advance.

	Amanda S. Hanes  (using Jeff Wong's account)
---------------------------------Sample Code---------------------------------
\def\@startsubsection#1#2#3#4#5#6{\if@noskipsec \leavevmode \fi
   \par \@tempskipa #4\relax
   \@afterindenttrue
   \ifdim \@tempskipa <\z@ \@tempskipa -\@tempskipa \@afterindentfalse\fi
   \if@nobreak \everypar{}\else
     \addpenalty{\@secpenalty}\addvspace{\@tempskipa}\fi \@ifstar
     {\@ssect{#3}{#4}{#5}{#6}}{\@dblarg{\@sectsub{#1}{#2}{#3}{#4}{#5}{#6}}}}

\def\@sectsub#1#2#3#4#5#6[#7]#8{\ifnum #2>\c@secnumdepth
     \def\@svsec{}\else 
     \refstepcounter{#1}\edef\@svsec{\csname the#1\endcsname }\fi
     \@tempskipa #5\relax
      \ifdim \@tempskipa>\z@ 
        \begingroup #6\relax
          \@hangfrom{\@svsec
		\hskip \secindent \relax}
		{\interlinepenalty \@M
		\hskip -.33em {\underline{\uppercase{#8}}}\par} 
        \endgroup
       \csname #1mark\endcsname{#7}\addcontentsline
         {toc}{#1}{\ifnum #2>\c@secnumdepth \else
                      \protect\numberline{\csname the#1\endcsname}\fi
                    #7}\else
        \def\@svsechd{#6\hskip #3\@svsec \hskip \secindent #8\csname
             #1mark\endcsname {#7}\addcontentsline
                           {toc}{#1}{\ifnum #2>\c@secnumdepth \else
                             \protect\numberline{\csname the#1\endcsname}\fi
                       #7}}\fi
     \@xsect{#5}}
Technical Details
Message-ID: <1575@aplcomm.jhuapl.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!attcan!uunet!oddjob!mimsy!aplcen!aplcomm!aplvax.jhuapl.edu!jw

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!attcan!uunet!oddjob!mimsy!aplcen!aplcomm!aplvax.jhuapl.edu!jw
From: jw@aplvax.jhuapl.edu (Jeff Wong)
Newsgroups: comp.text
Subject: Getting Underlined Section Headings To Wrap
Message-ID: <1575@aplcomm.jhuapl.edu>
Date: 5 Aug 88 19:48:28 GMT
Sender: news@aplcomm.jhuapl.edu
Reply-To: jw@aplvax.jhuapl.edu.UUCP (Jeff Wong)
Distribution: comp.text
Organization: The Johns Hopkins University Applied Physics Laboratory
Lines: 42