brister@td2cad.intel.com (James Brister) (08/30/89)
I'd like to use LaTeX for most of my writing now, but I'm having problem with one part of it.... I'd like sections to be indented relative to their depth. e.g. 1.0 Foo 1.1 Foo subsection 1.1.1 Foo subsubsection 1.2 Another Foo subsection 2.0 Bar 2.1 Bar subsection 2.2 Bar subection number 2 In troff this nice and easy, but I can't find the answer in the LaTeX book (I don't have the TeX book though, maybe it's there?) Do I need to explicitly set the \oddsidemargin and \evensidemargin each time? (Seems pretty ineffecient). Tnaks. James -- ------------------------------------------------------------------------------- James Brister "Is the set of all respectable sets respectable?" UUCP: {amdcad,decwrl,hplabs,oliveb,pur-ee,qantel}!td2cad!brister ARPA: brister%td2cad.intel.com@relay.cs.net CSNET: brister@td2cad.intel.com VOICE: (408) 765-9713
chris@mimsy.UUCP (Chris Torek) (08/30/89)
In article <BRISTER.89Aug29102815@aries.td2cad.intel.com> brister@td2cad.intel.com (James Brister) writes: >... I'd like sections to be indented relative to their depth. e.g. > > 1.0 Foo > 1.1 Foo subsection > 1.1.1 Foo subsubsection > 1.2 Another Foo subsection > 2.0 Bar > 2.1 Bar subsection > 2.2 Bar subection number 2 I hope that you would like this because a layout designer told you to do it this way (not that I would necessarily believe the layout designer: I think this looks horrid, and would look only marginally less so if the `1.1' were under the `F' in `Foo', etc.). Note also that LaTeX normally numbers sections as `1', not `1.0', etc. >Do I need to explicitly set the \oddsidemargin and \evensidemargin each >time? No. In fact, you must not set these. The quantity that needs to be adjusted is called `\leftskip'. The section depth goes in the `secnumdepth' counter. For clues as to how to work with the internals of the sectioning commands, look in latex.tex for the definition of `\@startsection' and in the style files that you are now using for the definitions of \section, \subsection, etc. -- In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163) Domain: chris@mimsy.umd.edu Path: uunet!mimsy!chris
bts@sas.UUCP (Brian T. Schellenberger) (09/03/89)
To get the desired indentation, you need to muck about with the style files (.sty) and create a special version; eg, if you use 11-point article now, copy article.sty into artindent.sty and art11.sty into arti11.sty. Then change the files to accomplish this. There should be ".doc" version of the ".sty" files available somewhere which have internal documentation to explain what the .sty files are doing. However, the LaTeX manual won't help you. There is no paper documentation for the LaTeX internals used in the style files, and you *will* need the TeXbook to explain the lower-level commands used therein. You may also need to look at latex.tex (which has lots of interntal documentation) to set the documentation for the LaTeX internal macros. All in all, this is a difficult task. If, however, you need this for a small number of documents, especially if they are short (and if not, heaven help your poor reader, given the desired style), then you would probably be better off using list environments (or simple enumerate) rather than the actual sectioning commands. These are easier to set up---look at the documentation for \begiin{list} in the LaTEX book, and use \renewenvironment to define your own environments. Then use them as: \begin{chapter}{The first chapter} \begin{section}{The first section} \begin{subsection}{The first subsection} This is in the first subsection. Isn't it fun? \end{subsection} \begin{subsection} . . . you can have your environments do the \item so you needn't type it in yourself, and you can even define \newcommand \newsection {\end{section}\begin{section}} to save on typing . . . -- -- Brian, the Man from Babble-on. ...!mcnc!rti!sas!bts -- "Every jumbled pile of person has a thinking part that wonders what the part that isn't thinking isn't thinking of" -- THEY MIGHT BE GIANTS