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 am planning to have a .sty file for scibing notes. When modifying one that already exists online, I found that I could not use

 \renewcommand{\qedsymbol}{\blacksquare}

or

 \renewcommand{\qedsymbol}{\ensuremath{\blacksquare}}

either to change the usual white square to the black one. So, how would I do this?

On a similar note, if I wanted to add a blacktriangle, how would I do this?

In case, the answer depends on how the rest of the .sty file looks, I am most willing to point to the file I am modifying.

My .sty file:

 \newtheoremstyle{myplain}      {10pt}{10pt}{\itshape}{}{\scshape}{.}{.5em}{}
 \newtheoremstyle{mydefinition} {10pt}{10pt}{}{}{\scshape}{.}{.5em}{}
 \newtheoremstyle{myremark}     {10pt}{10pt}{}{}{\scshape}{.}{.5em}{}

 \renewcommand{\qedsymbol}{\blacksquare}   %replacing this line with 
                                           %\renewcommand{\qedsymbol}{\ensuremath{\blacksquare}} 
                                           % does not work either.

 \newcounter{lecture}
 \theoremstyle{myplain}
 \newtheorem{thm}{Theorem}[lecture]
 \newtheorem{lem}         [thm]{Lemma}
 \newtheorem{pro}         [thm]{Proposition}
 \newtheorem{cor}         [thm]{Corollary}
 \newtheorem{claim}       [thm]{Claim}
 \newtheorem{fact}        [thm]{Fact}

 \theoremstyle{mydefinition}
 \newtheorem{defn}       [thm]{Definition}
 \newtheorem{eg}         [thm]{Example}
 \newtheorem{assumption} [thm]{Assumption}
 \newtheorem{openproblem}[thm]{Open Problem}
 \newtheorem{problem}    [thm]{Problem}

 \theoremstyle{myremark}
 \newtheorem{remark}        [thm]{Remark}
 \newtheorem{conjecture}    [thm]{Conjecture}

 \numberwithin{equation} {lecture}
 \numberwithin{figure}   {lecture}
 \numberwithin{table}    {lecture}

 \renewcommand{\fnum@figure}{\textsc{Figure~\thefigure}}
 \renewcommand{\fnum@table}{\textsc{Table~\thetable}}

 \renewcommand{\thesection}{\thelecture.\arabic{section}}
 \renewcommand{\thepage}{\thelecture-\arabic{page}}
share|improve this question
    
I am sure my tags are off. Will someone please fix it for me? –  kan May 13 '12 at 11:59
    
Would you please add a MWE? –  egreg May 13 '12 at 12:30
    
Sure, I'll do @egreg –  kan May 13 '12 at 12:47
add comment

1 Answer

up vote 3 down vote accepted

You probably forgot to load amssymb:

\documentclass{amsart} % just to have `amsthm` preloaded
\usepackage{amssymb}
\renewcommand{\qedsymbol}{$\blacksquare$}
\begin{document}
\begin{proof}
a
\end{proof}
\end{document}
share|improve this answer
    
Oh, OK. It works. I have to load amssymb before loading my .sty file and use \ensuremath{}! –  kan May 13 '12 at 13:17
    
@KannappanSampath You don't have to use \ensuremath: use $\blacksquare$, which is the correct way. –  egreg May 13 '12 at 13:55
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.