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}


1 Answer 1


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.

  • Thanks, omitting TeX, LaTeX and all the rest, I think that i really have to go to bed.
    – Micro
    Commented Nov 6, 2011 at 0:08

You must log in to answer this question.

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