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 was trying to use the package fancyvrb.

However with

\usepackage{breqn}

\usepackage{fancyvrb}
\DefineVerbatimEnvironment{code}{Verbatim}{fontsize=\small}
\DefineVerbatimEnvironment{example}{Verbatim}{fontsize=\small}

latex always reports

Missing number, treated as zero. to be read again

But it changes to work if I exchange the order between the two parts:

\usepackage{fancyvrb}
\DefineVerbatimEnvironment{code}{Verbatim}{fontsize=\small}
\DefineVerbatimEnvironment{example}{Verbatim}{fontsize=\small}

\usepackage{breqn}

I was wondering why the problem happens?

Thanks and regards!

share|improve this question

2 Answers 2

up vote 2 down vote accepted

From the breqn documentation: "As it pushes the envelope of what is possible within the context of LaTeX2e, the breqn package will tend to break other packages when used in combination with them, or to fail itself, when there are any areas of internal overlap; successful use may in some cases depend on package loading order."

I'm not at all knowledgable about (La)TeX internals, but I suspect that there are so many variables being defined in breqn that loading it first breaks one of the other packages.

share|improve this answer

I have no problem with your first code (TeXLive 2010):

\listfiles
\documentclass{article}
\usepackage{breqn}    
\usepackage{fancyvrb}
\DefineVerbatimEnvironment{code}{Verbatim}{fontsize=\small}
\DefineVerbatimEnvironment{example}{Verbatim}{fontsize=\small}

\begin{document}
\begin{code}
foo
\end{code}
\end{document}

the file list from the end of the log file:

 *File List*
 article.cls    2007/10/19 v1.4h Standard LaTeX document class
  size10.clo    2007/10/19 v1.4h Standard LaTeX file (size option)
   breqn.sty    2009/08/07 v0.98a Breaking equations
   expl3.sty    2010/11/13 v2083 L3 Experimental code bundle wrapper
 l3names.sty    2011/01/08 v2122 L3 Experimental Naming Scheme for TeX Primitiv
es
    etex.sty    1998/03/26 v2.0 eTeX basic definition package (PEB)
l3basics.sty    2010/10/03 v2063 L3 Experimental basic definitions
 l3expan.sty    2010/09/20 v2037 L3 Experimental Argument Expansion module
    l3tl.sty    2011/01/26 v2138 L3 Experimental Token Lists
   l3int.sty    2011/01/07 v2121 L3 Experimental Integer module
 l3quark.sty    2010/09/20 v2036 L3 Experimental Quark Commands
   l3seq.sty    2010/03/29 v1879 L3 Experimental sequences and stacks
  l3toks.sty    2010/09/20 v2037 L3 Experimental Token Registers
   l3prg.sty    2011/01/07 v2121 L3 Experimental control structures
 l3clist.sty    2010/10/09 v2071 L3 Experimental comma separated lists
 l3token.sty    2010/10/03 v2063 L3 Experimental token investigation and manipu
lation
  l3prop.sty    2010/11/23 v2087 L3 Experimental Property Lists
   l3msg.sty    2010/10/02 v2052 L3 Experimental LaTeX Messages module
    l3io.sty    2010/10/03 v2063 L3 Experimental i/o module
  l3skip.sty    2011/01/07 v2121 L3 Experimental skip registers
   l3box.sty    2010/09/26 v2048 L3 Experimental Box module
l3keyval.sty    2010/04/11 v1890 L3 Experimental keyval processing
  l3keys.sty    2010/11/11 v2082 L3 Experimental key-value support
l3precom.sty    2010/02/09 v1793 L3 Experimental precompilation module
  l3xref.sty    2010/02/09 v1786 L3 Experimental cross referencing
  l3file.sty    2010/03/21 v1853 L3 Experimental file loading
    l3fp.sty    2011/01/10 v2129 L3 Experimental floating-point operations
l3luatex.sty    2010/07/18 v1985 L3 Experimental LuaTeX functions
    calc.sty    2007/08/22 v4.3 Infix arithmetic (KKT,FJ)
flexisym.sty    2010/09/17 v0.97b Make math characters macros
  cmbase.sym    2007/12/19 v0.92
mathstyle.sty    2010/11/17 v0.89
  keyval.sty    1999/03/16 v1.13 key=value parser (DPC)
fancyvrb.sty    2010/05/14
 ***********
share|improve this answer

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.