[OS X TeX] Does {ntheorem} have a bug related to \newshadedtheorem ?

Don Green Dragon fergdc at Shaw.ca
Tue Jan 17 01:55:44 EST 2012


Hi Michael,

>> <<snip>>Well, your hack works here too.
> 
> Sweet.

:-)


>> However, I never would have guessed that your line
>> 
>>> \def\theoremframecommand{\colorbox{yellow}}
>> 
>> would allow for the yellow backgrounds!!! Would you make a few comments about \theoremframecommand or give a reference. From the terminal "texdoc theoremframecommand" gave no results and a CTAN search fared no better!
> 
> There's a throwaway line in the ntheorem documentation (page 8) about it. Both Shaded and Framed theorems use it to draw boxes. The default is the pstricks way, which doesn't play nice with pdfs. I just changed it so that pstricks wasn't needed by using the standard (I think) command \colorbox.

Good guess. I read the line 

\def\theoremframecommand{⟨any box command⟩}

but did not have a clue how to use it and subsequently forgot that piece of information.


>> <<snip>>
>> Upon doing so, everything was fine, including references to an instance of \newframedtheorem via both \ref{...} and \thref{...}. So despite, the comments in May & Schedler, it "appears" (???) that no reference to {pstricks} is needed.

> That's right. pstricks is only needed if thereomframecommand isn't defined, as you discover below.

NO! You discovered it! I recognized the significance only after reading your comment.  :-)


>> However, your line \def\theoremframecommand{\colorbox{yellow}} is crucial if one wants to use the \newshadedtheorem guy. I commented it out and received the error message:
>> ============
>> ./Untitled.tex:27: Undefined control sequence.
>> \thmshaded at framecommand ->\psframebox 
>>                                     [fillstyle=solid, fillcolor=gray, line...
>> l.27 \begin{thmshaded}
>>                     [Named] 	% YellowBackTheorem
>> ============
>> 
>> So why do you refer to your solution as a 'hack'?

> Because it's not as elegant as I would like. It's not really a hack, but I like the word. :)

Good.

> <<snip>>

Thanks again for the good counsel.


Don Green Dragon
fergdc at Shaw.ca






More information about the MacOSX-TeX mailing list