This is not my command but I copied from some other Latex help website. But when I write


I get the error message

\usepackage{titlesec, blindtext, color}

        \item[\hskip \labelsep {\bfseries #1}]}{\end{trivlist}}
        \item[\hskip \labelsep {\bfseries #1}]}{\end{trivlist}}
        \item[\hskip \labelsep {\bfseries #1}]}{\end{trivlist}}
        \item[\hskip \labelsep {\bfseries #1}]}{\end{trivlist}}

\newcommand{\qed}{\nobreak \ifvmode \relax \else
    \ifdim\lastskip<1.5em \hskip-\lastskip
    \hskip1.5em plus0em minus0.5em \fi \nobreak
    \vrule height0.75em width0.5em depth0.25em\fi}
  • 1
    Which error? Most likely the compilations fails because proof is already defined – user31729 Jan 8 '16 at 6:35
  • @ChristianHupfer I guess that the error how do I fix this – Boltzee Jan 8 '16 at 6:59

You've placed all your definitions inside a group {...}, which limits the scope of all newly-defined macros (including environments). That is, they're local and don't survive the group, making the definition useless.

Remove the grouping {...} to fix this problem.

  • while this is true, trying to define \newenvironment{proof} will result in the error ! LaTeX Error: Command \proof already defined. a more subtle approach is needed. – barbara beeton Jan 8 '16 at 18:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.