* adding an icon (flushed left) in a displayed formula with equation number @ 2006-08-05 20:37 David Arnold 2006-08-07 10:27 ` Taco Hoekwater 0 siblings, 1 reply; 3+ messages in thread From: David Arnold @ 2006-08-05 20:37 UTC (permalink / raw) All, We have: \placeformula[eq:commonb] \startformula (1)^2+(\sqrt{4x+13})^2=(2x)^2, \stopformula This gives us a centered equation with an number pushed to the right edge of the page (I probably should say text area). What we'd like to do, just in this one example (not globally), is add a little "smiley face" icon on the same line as the displayed equation and equation number, but pushed to the left edge of the page (I probably should say text area). Possible? ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: adding an icon (flushed left) in a displayed formula with equation number 2006-08-05 20:37 adding an icon (flushed left) in a displayed formula with equation number David Arnold @ 2006-08-07 10:27 ` Taco Hoekwater 2006-08-07 15:40 ` Aditya Mahajan 0 siblings, 1 reply; 3+ messages in thread From: Taco Hoekwater @ 2006-08-07 10:27 UTC (permalink / raw) David Arnold wrote: > All, > > We have: > > \placeformula[eq:commonb] > \startformula > (1)^2+(\sqrt{4x+13})^2=(2x)^2, > \stopformula > > > This gives us a centered equation with an number pushed to the right > edge of the page (I probably should say text area). > > What we'd like to do, just in this one example (not globally), is add > a little "smiley face" icon on the same line as the displayed > equation and equation number, but pushed to the left edge of the page > (I probably should say text area). > > Possible? It should be possible to do this using a special version of \startalign, but I cannot figure it out. Maybe Aditya can help? Taco ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: adding an icon (flushed left) in a displayed formula with equation number 2006-08-07 10:27 ` Taco Hoekwater @ 2006-08-07 15:40 ` Aditya Mahajan 0 siblings, 0 replies; 3+ messages in thread From: Aditya Mahajan @ 2006-08-07 15:40 UTC (permalink / raw) On Mon, 7 Aug 2006, Taco Hoekwater wrote: > > David Arnold wrote: >> All, >> >> We have: >> >> \placeformula[eq:commonb] >> \startformula >> (1)^2+(\sqrt{4x+13})^2=(2x)^2, >> \stopformula >> >> >> This gives us a centered equation with an number pushed to the right >> edge of the page (I probably should say text area). >> >> What we'd like to do, just in this one example (not globally), is add >> a little "smiley face" icon on the same line as the displayed >> equation and equation number, but pushed to the left edge of the page >> (I probably should say text area). >> >> Possible? > > It should be possible to do this using a special version of \startalign, > but I cannot figure it out. Maybe Aditya can help? Here is one solution. Explaination inline. % I do not know what you want for a smiley, so I use square instead \def\smiley{\square} \starttext This is the basic idea. Have an alignment structure with three blocks, each block of 1 column, put the simley in the first block, the equation in the second block, and keep the third block empty. The trick here is to have {\em 1 fil} in the distance. \definemathalignment[dosmiley] [n=1,m=3,distance=3em plus 1 fil] \placeformula[+] \startformula \startdosmiley \NC \smiley \NC (1)^2 + (\sqrt{4x+13})^2 = (2x)^2 \NC \NR[+] \stopdosmiley \stopformula Ah, it works. So we can add some syntax sugar around this, so that the formula is easier to key in. \def\startsmileyformula% {\startformula \startdosmiley \NC \smiley \NC} \def\stopsmileyformula% {\NC \NR[+] \stopdosmiley \stopformula} \placeformula[+] \startsmileyformula (1)^2 + (\sqrt{4x+13})^2 = (2x)^2 \stopsmileyformula If you only want a smiley without the equation, it also works. :-) \startsmileyformula (1)^2 + (\sqrt{4x+13})^2 = (2x)^2 \stopsmileyformula \stoptext Can you send me how you make a smiley. I will then put the code in myway on alignment. Aditya ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2006-08-07 15:40 UTC | newest] Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2006-08-05 20:37 adding an icon (flushed left) in a displayed formula with equation number David Arnold 2006-08-07 10:27 ` Taco Hoekwater 2006-08-07 15:40 ` Aditya Mahajan
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).