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.

this code doesn't work on my pc, a Windows 7 32 bit installation with miktex, and i can't figure out where i'm wrong with this.

As you can see i'm trying to create a new environment that can help me to keep my text as simply as possible giving me the ability to present the text inside the environment in a frame as quotation.

this is the complete output, my file is named test.tex and is encoded in UTF8:

  pdflatex test.tex
  This is pdfTeX, Version 3.1415926-2.3-1.40.12 (MiKTeX 2.9)
  entering extended mode
  LaTeX2e <2011/06/27>
  Babel <v3.8m> and hyphenation patterns for english, afrikaans, ancientgreek, ar
  abic, armenian, assamese, basque, bengali, bokmal, bulgarian, catalan, coptic,
  croatian, czech, danish, dutch, esperanto, estonian, farsi, finnish, french, ga
  lician, german, german-x-2009-06-19, greek, gujarati, hindi, hungarian, iceland
  ic, indonesian, interlingua, irish, italian, kannada, kurmanji, lao, latin, lat
  vian, lithuanian, malayalam, marathi, mongolian, mongolianlmc, monogreek, ngerm
  an, ngerman-x-2009-06-19, nynorsk, oriya, panjabi, pinyin, polish, portuguese,
  romanian, russian, sanskrit, serbian, slovak, slovenian, spanish, swedish, swis
  sgerman, tamil, telugu, turkish, turkmen, ukenglish, ukrainian, uppersorbian, u
  senglishmax, welsh, loaded.
  ("C:\Program Files\MiKTeX 2.9\tex\latex\base\article.cls"
  Document Class: article 2007/10/19 v1.4h Standard LaTeX document class
  ("C:\Program Files\MiKTeX 2.9\tex\latex\base\size10.clo"))
  ("C:\Program Files\MiKTeX 2.9\tex\latex\framed\framed.sty")
  ("C:\Program Files\MiKTeX 2.9\tex\latex\lipsum\lipsum.sty")
  ! Extra }, or forgotten \endgroup.
  \endMakeFramed ...eight \z@ \penalty -100 \egroup
                                                    \begingroup \fb@put@frame ...
  l.10   \end{nb}

share|improve this question

1 Answer 1

up vote 6 down vote accepted

Your environment finishes with the quotation and framed the wrong way round. If you change it to

  {\end{quotation}\end{framed}} % Note this line

then it works fine.

Whenever you invoke your nb environment with \begin{nb} it calls the code at the beginning


and when you end your environment with \end{nb} it calls


In your code, you had them out of order, so it was trying to end the framed environment before ending the quotation environment, hence the error.

share|improve this answer
Thanks, omitting TeX, LaTeX and all the rest, I think that i really have to go to bed. –  Micro Nov 6 '11 at 0:08

Your Answer


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.