terry@calgary.UUCP (Terry Heintz) (12/07/87)
I have a problem with latex and producing list the way I want. What I want to do should be easy, but I cannot figure it out. What I want is to have the item separation the same on many levels of the list. I have set \parsep and \itemsep to 0cm, but the second level seems to want to ignore these values. Question: How do I access these values at the second level? I will provide an example below of the list using itemize, when run thru latex you see a distinct separation difference between level 1 and 2. If this cannot be done with itemize, how do I do it using either list or even better a newenvironment. I would also like the first level with bullets and the second level with dashes, which is why I started with itemize in the first place. Thank you Terry Heintz University of Calgary UUCP calgary!terry % ============= TryThis.tex ================ \documentstyle[11pt]{article} % \setlength{\textheight} {9.5in} \setlength{\textwidth} {6.0in} \setlength{\oddsidemargin} {0.0cm} \setlength{\evensidemargin} {0.0cm} \setlength{\marginparsep} {0.0cm} \setlength{\marginparwidth} {0.0cm} \setlength{\topmargin} {0.0cm} \setlength{\headsep} {0.0cm} \setlength{\headheight} {0.0cm} \setlength{\footheight} {0.0cm} \setlength{\footskip} {0.0cm} \setlength{\itemindent} {0.0cm} \setlength{\itemsep} {0.0cm} \setlength{\topsep} {0.0cm} \setlength{\parsep} {0.0cm} \setlength{\parskip} {0.0cm} \begin{document} This is an example where one cannot seem to change the item separation of the list. I have set parsep to 0, so this makes the paragragh separation very small. Itemsep is added to parsep to get the total separation. \begin{itemize} \item This is the first item to be made. It should have the next item right after it. For some reason, item 1a does not do this. \begin{itemize} \item This is item 1a where it should be indented and should of course be the same separation as other items on the upper level. \item This is item 1b. It should be the same distance from 1a as items 2 thru to 4. \item This is item 1c. Again the distance should be correct. How do we adjust the itemsep for this level \item This is item 1d. \item This is item 1e, and is the last item before we go to item 2. \end{itemize} \item This is item 2. It should be the same space as item 2 is from item 3. \item This is item 3. It should have an itemsep of 0. \item This is item 4 This one is here to really show what the item spaceing should be. \item This is the last item and here ends the example. \end{itemize} \end{document} % ================ end trythis.tex =======
jamey@XN.LL.MIT.EDU (Jamey Hicks) (12/09/87)
> > What I want is to have the item separation the same on many levels > of the list. I have set \parsep and \itemsep to 0cm, but the second > level seems to want to ignore these values. Question: How do I access > these values at the second level? I will provide an example below ... > \setlength{\itemsep} {0.0cm} > The problem is that you are setting \itemsep at the top level, but the \Itemize environment is built from the \List environment. When a \list is begun, one of the macros \@listi, \@listii, \@listiii, or \@listiv are called. These set the values of \itemsep to a default value (which is in the appropriate .sty file). A simple way to adjust this value without writing your own \itemize environment is: \newenvironment{myitemize} {\begin{itemize} \setlength{\itemsep}{0.0 cm}} {\end{itemize}} You can even make this parameterized so that the desired \itemsep is an argument to the \myitemize environment. Other dimensions can be set in this command also. If you have trouble with \newenvironment (I always do, maybe I should read the LaTeX manual on this command!) then you can use: \def\myitemize{\begin{itemize} \setlength{\itemsep}{0.0 cm}} \def\endmyitemize{\end{itemize}} Happy LaTeXing! Jamey @xn.ll.mit.edu