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.

I have a document with many description environments. I would like to change all these description environments to LaTeXdescription environments, without manually changing all the occurrences of description.

Is there a way to tell LaTeX that I want the description environment to be just a synonym for LaTeXdescription?

share
add comment

2 Answers

up vote 4 down vote accepted

This should work:

\renewenvironment{description}{\begin{LaTeXdescription}}{%
    \end{LaTeXdescription}\ignorespacesafterend% as suggested above
}
share
1  
You probably want to add \ignorespacesafterend as the last token in the end code if you define it that way as the nested environment form defeats LaTeX's white space handling. –  David Carlisle Nov 15 '12 at 15:23
    
@DavidCarlisle Thanks, I will remember your advice. Is there a big difference between your solution and mine? –  Lionel MANSUY Nov 15 '12 at 15:45
4  
As always with newcommand and let the main difference is if the definition of LaTeXdescription is later changed. If it is changed then your definition will pick up the new version, mine will pick up the old. I suppose we will find out which one the OP wants by who gets the green tick. I +1 yours anyway as it is a perfectly valid answer. –  David Carlisle Nov 15 '12 at 16:23
add comment

It depends a bit on how you define , specifically whether you define it in terms of the existing description but assuming LaTeXdescription is not defined to expand to something involving description you should be able to do

\let\description\LaTeXdescription
\let\enddescription\endLaTeXdescription
share
add comment

This site is currently not accepting new answers.

Not the answer you're looking for? Browse other questions tagged .