Hi, I wanted to start a proof with "Proof:" in italics and place a figure next to the right margin. There are many ways to accomplish this, but my normal way, {\it Proof:\/}, fails. Is this a bug or am I making a mistake? \starttext \startuseMPgraphic{ProofPQR} numeric u; u:=2.5cm; draw ((0, 0)--(1,0)--(1, 0.7)) scaled u withpen pencircle; dotlabel.bot(textext("$P$"),(0,0)*u); dotlabel.bot(textext("$R$"),(1,0)*u); dotlabel.rt(textext("$Q$"),(1,0.7)*u); \stopuseMPgraphic % MISPLACED \placefigure[right,none]{}{\useMPgraphic{ProofPQR}} {\it Proof:\/} \input knuth \hairline % WORKS \placefigure[right,none]{}{\useMPgraphic{ProofPQR}} %{\it Proof:\/} \input knuth \hairline % WORKS \placefigure[right,none]{}{\useMPgraphic{ProofPQR}} \strut{\it Proof:\/} \input knuth \stoptext Thanks, Michael ________________________________ This e-mail message (including any attachments) is for the sole use of the intended recipient(s) and may contain confidential and privileged information. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this message (including any attachments) is strictly prohibited. If you have received this message in error, please contact the sender by reply e-mail message and destroy all copies of the original message (including attachments).
Am 09.10.2012 um 13:47 schrieb "Rogers, Michael K"
Hi,
I wanted to start a proof with "Proof:" in italics and place a figure next to the right margin. There are many ways to accomplish this, but my normal way, {\it Proof:\/}, fails. Is this a bug or am I making a mistake?
\starttext \startuseMPgraphic{ProofPQR} numeric u; u:=2.5cm; draw ((0, 0)--(1,0)--(1, 0.7)) scaled u withpen pencircle; dotlabel.bot(textext("$P$"),(0,0)*u); dotlabel.bot(textext("$R$"),(1,0)*u); dotlabel.rt(textext("$Q$"),(1,0.7)*u); \stopuseMPgraphic
% MISPLACED \placefigure[right,none]{}{\useMPgraphic{ProofPQR}} {\it Proof:\/} \input knuth
\hairline % WORKS \placefigure[right,none]{}{\useMPgraphic{ProofPQR}} %{\it Proof:\/} \input knuth
\hairline % WORKS \placefigure[right,none]{}{\useMPgraphic{ProofPQR}} \strut{\it Proof:\/} \input knuth \stoptext
That’s a common problem when you use a font switch at the begin of a paragraph, you can avoid this when you force horizontal mode with \dontleavehmode or \strut before the begin of the group. You can avoid this also when you use \italic{…} etc. instead of {\it …} but the best solution in your example is to create a proof environment which prints “Proof: ” as title for the environment. \defineenumeration [proof] [text=Proof:, headstyle=italic, number=no, alternative=serried, width=fit, distance=.5em] \startuseMPgraphic{ProofPQR} numeric u; u:=2.5cm; draw ((0, 0)--(1,0)--(1, 0.7)) scaled u withpen pencircle; dotlabel.bot(textext("$P$"),(0,0)*u); dotlabel.bot(textext("$R$"),(1,0)*u); dotlabel.rt(textext("$Q$"),(1,0.7)*u); \stopuseMPgraphic \starttext \placefigure[right,none]{}{\useMPgraphic{ProofPQR}} \startproof \input knuth \stopproof \stoptext Wolfgang
participants (2)
-
Rogers, Michael K
-
Wolfgang Schuster