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.

Most of my documents start with a couple of quick hacks that save me literally a couple of keystrokes a month:

\let\cite\texcite
\let\epsilon\varepsilon

and so on. Now, I'd like to do a similar thing to globally have my itemize environments behave like the itemize* environment defined by the mdwlist package. This is a little trickier, because itemize is an environment, not a command.

How do I do this?

share|improve this question
add comment

2 Answers

up vote 7 down vote accepted

Generally, in such cases we could achieve it by

\let\newname\name
\let\endnewname\endname

or \renewenvironment.

But here it's not this simple, since the old environment would still be used. We would easily end up with TeX capacity exceeded because of nesting. A solution is to store the old environment in another macro, afterwards we could refer to that. Or easier, use the \makecompactlist command of mdwlist to redefine the original itemize environment.

\documentclass{article}
\usepackage{mdwlist}
\let\stditemize\itemize
\let\endstditemize\enditemize
\let\itemize\undefined
\makecompactlist{itemize}{stditemize}
\begin{document}
\begin{itemize}
\item One
\item Two
\item Three
\end{itemize}
\end{document}

The compact output list:

alt text

share|improve this answer
add comment

Wrong answer (in this case):

If this is LaTeX, then in general something like

\renewenvironment{itemize}{\begin{itemize*}}{\end{itemize*}}

should do the trick. However in this case it will cause nesting problems if itemize* internally uses itemize. (Thanks, Stefan)

share|improve this answer
    
This standard method is not working here, it causes too deep nesting. –  Stefan Kottwitz Aug 12 '10 at 13:08
4  
Added a remark to the answer. I'll leave the answer so that nobody else wastes time by trying this answer. –  Caramdir Aug 12 '10 at 13:21
add comment

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.