enumerate items in multicolumn table

tex

    Next

  • 1. biblatex, bibtex OS X
    Hi all, I just started using biblatex (with biblatex-apa) for my thesis and I ran into a strange problem: filename.aux (correctly) contains a bibdata command like this: \bibdata{filename-blx,refs} filename-blx.bib was correctly created by biblatex, however, bibtex claims to be unable to open filename-blx.bib. This is so with TeXLive 2009 running on OS X 10.5 in my office. Everything works fine with TL 2009 on Ubuntu on my laptop. There is no apparent reason why should be unable to open the file: It's there and it's readable. Is this a known problem? Lasse
  • 2. Memoir Class to Word
    Does anyone know how to produce a Word document from a Memoir Class Latex file? I am now thoroughly dependent on using Memoir, and have an urgent need to send a colleague a Word file. Before I used Memoir, I was able to reliably create rtf files using LaTeX2RTF. With Memoir this no longer works, and I am stuck. I have spent a long hours trying to find tools that will work for me (including tools for converting from PDF to Word) but nothing works well. All this is causing me to consider only using Memoir for projects I am sure I will not have to share with Word users. Any ideas would be appreciated.

enumerate items in multicolumn table

Postby r1.younis@gmail.com » Wed, 20 Aug 2008 04:20:01 GMT

please help me with the following:
I am trying to enumerate items in multicolumn tables. Earlier, I got
help and the following code works fine except that I want the item
numbers instead of bullets, and secondly I need the text to be "left
justified" as there is awkward spacing between words if I leave it
"center". I tried to change itemize with enumerate but it doesn't
work..
Best Regards,
Reez

\documentclass{article}


\usepackage{enumitem}


\begin{document}


\setitemize{topsep=-2ex,itemsep=-
\baselineskip,partopsep=-2ex,leftmargin=*}


\def\newitem#1{%
    \begin{itemize}
        \item #1
    \end{itemize}%



}%


\begin{tabular}{|p{0.4\linewidth}|p{0.4\linewidth}|}
    \newitem{this is very neat and it may change next time} &
    \newitem{this is very neat and it may change next time. this is
really a matter of safety and should not
        be taken lightly.} \\[-1em]
    \newitem{rae} & \newitem{rae} \\[-1em]
    \newitem{me} & \newitem{me} \\[-1em]
    \newitem{fa} & \newitem{fa} \\[-1em]
    \newitem{so} & \newitem{here is another long line that should be
formatted as a regular paragraph} \\[-1em]
    \newitem{and the left and right columns both along one another
per
item} & \newitem{la} \\[-1em]
    \newitem{tee} & \newitem{tee} \\[-1em]
    \newitem{\ldots} & \newitem{\ldots}
\end{tabular}

\end{document}



Re: enumerate items in multicolumn table

Postby Peter Flynn » Wed, 20 Aug 2008 05:50:09 GMT



 From the look of it, what you actually want to do is align the items of 
two parallel lists. The fact that they are in a table isn't really relevant.


But you're not using a list environment for the whole list: you are 
restarting it afresh every time, so there is no counter to do this.


You need to use a list environment inside each cell to get the 
enumeration right, and only then look at the alignment. As a general 
rule, try to let{*filter*}do the work for you, and only intervene when 
really necessary (a tip Barbara Beeton once gave me, which has proved 
invaluable).


The array package lets you prefix a column specification with a preamble 
to specify formatting. I have kludged it using \pbs -- I know there's a 
way to do this more neatly but I forget it and I'm out of time for 
looking it up right now.

///Peter

\documentclass{article}
\usepackage{array,calc}
% kludge to allow \raggedright etc in a column preamble
\newcommand{\pbs}[1]{\let\tmp\\#1\let\\\tmp}
% \drop is a correction for the positioning of a \vrule depth
\newlength{\drop}
% gap is the amount of space to leave
\newlength{\gap}
% this macro forces space between items using a vrule
% the argument is in lines (=\baselineskips)
\newcommand{\dl}[1]{\setbox0=\hbox{xy}%
   \setlength{\drop}{\dp0}%
   \setlength{\gap}{#1\baselineskip+\itemsep+\drop}%
   \vrule depth\gap height0pt width0pt}
\begin{document}
% calculate two even columns to close to max width
\begin{tabular}{|*2{>{\pbs{\raggedright}}p{\columnwidth/2 -3\tabcolsep}|}}
   \begin{enumerate}
     \item this is very neat and it may change next time\dl2
     \item rae
     \item me
     \item fa
     \item so\dl2
     \item and the left and right columns both along one another per
       item
     \item tee
     \item \dots
   \end{enumerate}
&
   \begin{enumerate}
     \item this is very neat and it may change next time. this is
       really a matter of safety and should not be taken lightly.
     \item rae
     \item me
     \item fa
     \item here is another long line that should be formatted as a
       regular paragraph
     \item la\dl2
     \item tee
     \item \dots
   \end{enumerate}
\end{tabular}
\end{document}


Similar Threads:

1.Enumerate: automatically set counter to last item of previous list

This is a fairly simple question but obviously I can't figure out the
answer myself.

I want to have 2 lists, with the second one starting where the last
one ended:

L1
1.
2.
3.

L2
4.
5.
6.

This can easily be done by using the Enumerate environment and
specifying \setcounter{enumi}{3} in the second Enumerate set (L2).

However, these lists are meant to be updated often so I'd like LaTeX
to be able to figure out the last item of L1 and to determine the new
counter for L2.

Any idea?

Thanks!

MP

2.avoiding variable vertical space in between enumerate items

Hi,
I've noticed that enumerate sometimes "vertically stretches out" items
over a page (I suppose the idea is to fill the space.) However, I
prefer to keep my lists compact and also the algorithm isn't perfect
because a list that covers multiple pages may have different vertical
spacing which is rather ugly. Anyway, is there a way to disable this
beahviour?
cheers

3.align \item's in enumerate env.

hi all,

i'll be creating a couple of multiple-choice tests in latex and i want to
add check boxes to each of the possible answers. i thought i could simply
do this by redefining \labelenumii:

\renewcommand{\labelenumii}{\Square~~\alph{enumii}.}

however, the result looks ugly, because the boxes aren't lined up properly.
apparently, latex lines up the *right* side of the labels, but i'd need it
to line up the left side. is there any way this can be changed? or is there
another method that i can use to get the effect i want? (preferably one
that automatically numbers the questions and answers for me...)

to see what i mean, run the following example:

=======================================================================

\documentclass{article}

\usepackage{wasysym} % for \Square

\renewcommand{\labelenumii}{\Square~~\alph{enumii}.}

\begin{document}

\begin{enumerate}
\item This is the first question.
  \begin{enumerate}
  \item Answer 1.
  \item Answer 2.
  \item Answer 3.
  \item Answer 4.
  \end{enumerate}
\end{enumerate}

\end{document}

=======================================================================

TIA


-- 
Joost Kremers                                       XXXX@XXXXX.COM 
Selbst in die Unterwelt dringt durch Spalten Licht
EN:SiS(9)

4.style of reference to enumerated list item?

When referring to an item in an enumerated list, how do I make the
reference appear in the same enum style as was used in the original
list?

Here is a minimal example:

\documentclass{article}

\renewcommand{\labelenumi}{\Alph{enumi}.}

\begin{document}

\begin{enumerate}
\item This should appear as item A, and it does.
\item This should appear as item B, and it does.
\label{itemB}
\end{enumerate}

Here, the reference ``point~\ref{itemB}'' appears as ``point~2''.
Naturally, I want it to appear as ``point~B''.
How can I make that happen?

\end{document}

(I sure hope I don't have to keep track of the
enumeration style at the point when I make the reference.
The enumeration depth (hence, style) for a given item can
change across versions of the document.)

Thank you for any suggestions,

5.latex:environment:enumerate:space before items

Hello,

Following page 62 of the 1994 latex-companion, is there a simple way to 
redefine the enumerate environment so that each new entry is indented by 
\parindent? Note that my \leftmargin is zero, as I want it to look like
a normal paragraph.


Thanks,
Bob

6. the word "and" between items in enumerated lists

7. how to change indent on second line of item in enumerate environment

8. Labeling the enumerate items



Return to tex

 

Who is online

Users browsing this forum: No registered users and 50 guest