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 can't figure out how to embed a command like \textbf or something in a newly created environment, I have:

\newenvironment{definition}
  {\begin{quote}}
  {\end{quote}}

I want to customize my definition environment with some additional commands, but if I try something simple like:

\newenvironment{definition}
  {\textbf{\begin{quote}}
  {\end{quote}}}

pdflatex refuses to compile a PDF. Where am I wrong? Is there a limit for a newly created environment?

share|improve this question
add comment

1 Answer

up vote 11 down vote accepted

Use a declaration instead:

\newenvironment{definition}
  {\bfseries\begin{quote}}
  {\end{quote}}

Declarations are like switches, their effect ends when the environment is closed.

share|improve this answer
    
thanks, just to know, where i can find the complete reference to this basic commands for latex? –  Micro Nov 6 '11 at 21:37
    
@Micro: In LaTeX: A Document Preparation System by Leslie Lamport, the creator of LaTeX. For freely available online sources, have a look at Introductions and Guides to LaTeX. There should be links on this site as well. –  Stefan Kottwitz Nov 6 '11 at 21:44
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.