[texhax] need a section hack

Sridhar M.A. mas at mylug.org
Wed Nov 29 08:23:21 CET 2006


On Wed, Nov 29, 2006 at 12:09:48AM -0500, George Georgalis wrote:
   > I have a report, where we only need/want section
   > numbers for the subsections of section 3.
   > 
   > so rather than
   > 
   > 1 Section
   > 2 Section
   > 3 Section
   > 3.1 SubSection
   > 3.2 SubSection
   > 3.3 SubSection
   > 3.4 SubSection
   > 4 Section
   > 5 Section
   > 
   > we have
   >  
   > Section
   > Section
   > Section
   > 1 SubSection
   > 2 SubSection
   > 3 SubSection
   > 4 SubSection
   > Section
   > Section
   > 
   > The result would be preferred but not required, I
   > wouldn't expect this a pretty hack but I don't
   > expect it too difficult either. This doc uses
   > sectsty and there is no contents generated.
   > 
   > Any takers?
   > 
This works. Of course, you have fiddle arounda bit to get the subsection
to drop the section numbers.

    \documentclass{article}
    %
    \begin{document}
    \tableofcontents

    \newpage
    \section*{Intro}
    \addcontentsline{toc}{section}{Intro}

    \section*{Details}
    \addcontentsline{toc}{section}{Details}

    \section*{Some moer details}
    \addcontentsline{toc}{section}{Some more details}

      \subsection{Blah 1}

      \subsection{Blah Blah}

    \end{document}

HTH,

Regards,

-- 
Sridhar M.A.                                 GPG KeyID : F6A35935
  Fingerprint: D172 22C4 7CDC D9CD 62B5  55C1 2A69 D5D8 F6A3 5935

No matter whether th' constitution follows th' flag or not, th' supreme
court follows th' iliction returns.
		-- Mr. Dooley
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://tug.org/pipermail/texhax/attachments/20061129/9a9339be/attachment.bin 


More information about the texhax mailing list