Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

My goal is to produce inline lists (itemize and enumerate) in combination with the beamer document class. The symbols of these lists should use the same symbols as their non-inline counterparts to match the look of the beamer template.

For standard document classes, this can be achieved by packages such as shortlst. However, I use shortlst in combination with beamer, no list symbols show up.

Here is a minimal working example:

\documentclass{beamer}

\usepackage{shortlst}

\begin{document}

\begin{frame}{Test}
  % standard enumerate where item symbol style is set by beamer template 
  \begin{enumerate}
    \item this
    \item takes
    \item too
    \item much
    \item space
  \end{enumerate}

  % my goal is to have an inline list which uses the same symbols as the "standard" lists
  % in this example, no list symbols appear at all
  \begin{shortenumerate}
    \item this
    \item one
    \item doesn't
  \end{shortenumerate}
\end{frame}

\end{document}
share|improve this question
    
Welcome to TeX.sx! –  hpesoj626 Jan 19 '13 at 12:35

1 Answer 1

up vote 4 down vote accepted

Hi is this appropriate?

\documentclass[slidestop]{beamer}
\usetheme{Madrid}
\begin{document}


\newcommand{\inlineitem}{%
\leavevmode\usebeamertemplate{itemize item}
}
\newcounter{newenumi}
\setcounter{newenumi}{1}

\newcommand{\inlineenum}{%
 {%
 \setcounter{enumi}{\thenewenumi}%
 \leavevmode\usebeamertemplate{enumerate  item}
 \stepcounter{newenumi}
 \setcounter{enumi}{0}
 }
}

\newcommand{\resetinlineenum}{
 \setcounter{newenumi}{1}
}


\begin{frame}{Test}
 \inlineitem short \inlineitem list test
 \inlineenum test \inlineenum test \resetinlineenum \inlineenum new test
  \begin{block}{in a block} 
  \inlineitem short in a block
 \end{block}
 \begin{enumerate}
  \item normal
  \item 
 \end{enumerate}

\end{frame}

\end{document}

Three new user-commands here: \inlineitem produces just a ball. \inlineenuma inline enumerate label and \resetinlineenum resets it at your will.

enter image description here

For environmentalists:

\documentclass[slidestop]{beamer}
\usetheme{Madrid}

\newenvironment{inlineitemize}{%
 \let\par\relax%
 \def\item{\usebeamertemplate{itemize item}\hspace{1mm}}
 \leavevmode%
}{}

\newenvironment{inlineenumerate}{%
 \let\par\relax%
 \setcounter{enumi}{1}%
 \def\item{\usebeamertemplate{enumerate  item} \stepcounter{enumi}}%
 \leavevmode%
}{%
 \setcounter{enumi}{0}%
}

\begin{document}

\begin{frame}{Test}
\begin{inlineitemize}
\item item
\item 2


\end{inlineitemize}%
\begin{inlineenumerate}
 \item test 

 \item test 

 \item test

\end{inlineenumerate}

  \begin{block}{in a block} 
\begin{inlineenumerate}
 \item test 

 \item test 

 \item test

\end{inlineenumerate}
 \end{block}
 \begin{enumerate}
  \item normal
  \item 
 \end{enumerate}

\end{frame}

\end{document}
share|improve this answer
    
Thank you - not a perfect (i.e. built-in or package-based) solution, but it works. It seems there is no way to achieve this via existing packages. Just curious: is there a nice way to encapsulate above solution into new environments, say itemizebeamerinline and enumeratebeamerinline? –  QkuCeHBH Jan 20 '13 at 11:00
    
If you want it perfect, you need to specify your needs. Basically everything can be achieved. –  bloodworks Jan 20 '13 at 12:26
    
Well, your "environmentalist" solution comes pretty close - thank you very much. –  QkuCeHBH Jan 20 '13 at 13:43
    
@bloodworks, When I use the theme Berlin, the square bullets are in black, while they should be in blue. For the theme Madrid, I get the same result as you have showed above. What should I do? Thanks. –  Vahid Sep 2 at 21:01

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.