Generalenumerate group item

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
cb2001
Posts: 6
Joined: Mon Sep 15, 2008 10:42 pm

enumerate group item

Post by cb2001 »

hi,

i've another question about the enumerate environment. as this is a little bit more advanced question i apologize beforehand if this is wrong thread to post this.

i've a list like this:

Code: Select all

\begin{enumerate}
    \item This is item 1
    \item This is item 2 
    \item This is item 3
\end{enumerate}
my question is: is it possible to "somehow" group items? i am aware that it is not possible to do this with the enumerate environment but is it possible some other way?
if yes - how?

just to be exact, the result i am looking for is that item 2 and item 3 should be grouped by a curly bracket on the right with some test following it.

e.g.

I. This is item 1
II. This is item 2 \
_______________ } sometext
III. This is item 3 /

many thanks in advance!

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

enumerate group item

Post by gmedina »

Hi,

perhaps there's another option, but you could use minipages to obtain what you desire; take a look at the following example:

Code: Select all

\documentclass{report}
\usepackage{amsmath}

\begin{document}

\begin{minipage}[b]{3cm}
\begin{enumerate}
  \item This is item 1
  \item This is item 2
  \item This is item 3
\end{enumerate}
\end{minipage}
\begin{minipage}[b]{7cm}
  \raisebox{.3cm}{$\left.\vphantom{\rule{1mm}{.6cm}} \right\rbrace$ some text goes here.}
\end{minipage}

\end{document}
1,1,2,3,5,8,13,21,34,55,89,144,233,...
cb2001
Posts: 6
Joined: Mon Sep 15, 2008 10:42 pm

enumerate group item

Post by cb2001 »

thank you, that looks definitely better than the approach i tried, at least at the small scale.

the next problem i encountered regarding this is that list items are more or less filled. which makes the list look ugly using the purposed solution.
the question now is, is there a box that can be "stacked" or moved horizontally over another box to achieve the same effect?

this is the real code and text i am using to show what i mean. the curly-bracket should group item 4 and 5 but should not alter the line break of the items above.

Code: Select all

\begin{minipage}[b]{6.5cm}
\begin{enumerate}
    \item Autocalibration (Chapter )
    \item Image Undistortion (due to camera lens effects) (Chapter ...)
    \item Image Reprojection (Transformation on to a common "image plane") (Chapter ....)
    \item Feature Detection (Chapter ....)
    \item Feature Matching (Chapter ....)
    \item Feature Filtering and Transformation Approximation (Chapter ....)
    \item Image Projection  (Chapter ....)
    \item Stitching (blending overlapping image) (Chapter ..... )
\end{enumerate}
\end{minipage}
\begin{minipage}[b]{7cm}
  \raisebox{.5cm}{$\left.\vphantom{\rule{1mm}{.6cm}} \right\rbrace$ some text goes here.}
\end{minipage}
once again, thanks in advance.
User avatar
gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

enumerate group item

Post by gmedina »

Hi cb2001,

perhaps the following modification could be useful:

Code: Select all

\documentclass{article}

\begin{document}

\begin{enumerate}
  \item Autocalibration (Chapter )
  \item Image Undistortion (due to camera lens effects) (Chapter ...)
  \item Image Reprojection (Transformation on to a common "image plane") (Chapter ....)
  \item Feature Detection (Chapter ....)
  \item Feature Matching (Chapter ....)
  \item Feature Filtering and Transformation Approximation (Chapter ....)

  \begin{minipage}[b]{6cm}
    \item Image Projection  (Chapter ....)
    \item Stitching (blending overlapping image) (Chapter ..... )
  \end{minipage}
  \begin{minipage}[b]{4cm}
    \raisebox{.5cm}{$\left.\vphantom{\rule{1mm}{.9cm}} \right\rbrace$ some text goes here.}
  \end{minipage}

  \item Feature Detection (Chapter ....)
  \item Feature Matching (Chapter ....)
  \item Feature Filtering and Transformation Approximation (Chapter ....)
\end{enumerate}

\end{document} 
I repeated some items of your original list just to illustrate the proposed solution. Also I used the brace for items 7 and 8 (and not 4 and 5 as you mentioned), but you can do the necessary changes.
1,1,2,3,5,8,13,21,34,55,89,144,233,...
cb2001
Posts: 6
Joined: Mon Sep 15, 2008 10:42 pm

Re: enumerate group item

Post by cb2001 »

it's unbelievable that this works! i tried a different approach once where i packed \item into and mbox and got an error about missing \item environment!

this is really ingenious and IT WORKS!

gmedina, thanks you so much for the help!!
Post Reply