Re: OK TeXperts... tweaking \item
- From: Ulrike Fischer <news2@xxxxxxxxxxx>
- Date: Thu, 31 May 2007 10:30:04 +0200
Am 30 May 2007 23:35:19 -0700 schrieb J Davis:
\newcommand{\gritem}{\item[\refstepcounter{enumi}%
\llap{\usebox{\mygr}\kern2pt \labelenumi}]}
I implemented both Gual and Dan's suggestions and they looked
identical in the enumerate environment. However, I was in hopes Dan
that your suggestion would make the same thing work if I was at the
second level of an enumerate environment, i.e.
graphic 1. blah blah
(a) xxxx
graphic (b) yyyy
2. zzzzzz
but alas, the implementations above cause the (b) to come out b.
instead (but the graphic was inserted correctly on both).
Suggestions on how to address this? It would help me greatly.
\labelenumi is the label for the first level, you will have to use
\labelenumii for the second (and \labelenumiii and \labelenumiv for
the next). But you will run into problem if you need to reference
the numbers.
I would suggest something like this:
\documentclass{article}
\makeatletter
\newcommand\gritem[1]{%
\let\Orimakelabel\makelabel
\def\makelabel##1{\hss\llap{#1~##1}}
\item\relax
\let\makelabel\Orimakelabel}
\makeatother
\begin{document}
\begin{enumerate}
\item one
\gritem{test} two
\begin{enumerate}
\item a
\gritem{image} b
\gritem c \label{c}
\item d
\gritem{hallo} e
\end{enumerate}
\item three
\gritem{} four \label{4}
\end{enumerate}
1. Level 4: \ref{4}, second level: c: \ref{c}
\end{document}
(The argument of gritem is not necessary, you can replace the #1 by
a fix text instead.)
--
Ulrike Fischer
.
- Follow-Ups:
- Re: OK TeXperts... tweaking \item
- From: J Davis
- Re: OK TeXperts... tweaking \item
- References:
- OK TeXperts... tweaking \item
- From: J Davis
- Re: OK TeXperts... tweaking \item
- From: Werner
- Re: OK TeXperts... tweaking \item
- From: gualnews
- Re: OK TeXperts... tweaking \item
- From: J Davis
- Re: OK TeXperts... tweaking \item
- From: J Davis
- Re: OK TeXperts... tweaking \item
- From: gualnews
- Re: OK TeXperts... tweaking \item
- From: Dan
- Re: OK TeXperts... tweaking \item
- From: J Davis
- OK TeXperts... tweaking \item
- Prev by Date: Re: OK TeXperts... tweaking \item
- Next by Date: Re: overlapping math symbols
- Previous by thread: Re: OK TeXperts... tweaking \item
- Next by thread: Re: OK TeXperts... tweaking \item
- Index(es):