ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Beautiful source code
@ 2007-06-04 18:16 David Arnold
  2007-06-04 19:39 ` Hans Hagen
  0 siblings, 1 reply; 3+ messages in thread
From: David Arnold @ 2007-06-04 18:16 UTC (permalink / raw)
  To: Context Mailing List List; +Cc: Hans Hagen

Hans,

I'm revisiting the metafun manual and I am marveling at the format of  
the source code. For example:

\starttabulate[|lT|l|]
\HL
\NC \METAPOST\ code     \NC mathematical equivalent \NC \NR
\HL
\NC (x,y) shifted (a,b) \NC $(x+a,y+b)$     \NC \NR
\NC (x,y) scaled  s     \NC $(sx,sy)$       \NC \NR
\NC (x,y) xscaled s     \NC $(sx,y)$        \NC \NR
\NC (x,y) yscaled s     \NC $(x,sy)$        \NC \NR
\NC (x,y) zscaled (u,v) \NC $(xu-yv,xv+yu)$ \NC \NR
\NC (x,y) slanted s     \NC $(x+sy,y)$      \NC \NR
\NC (x,y) rotated r     \NC $(x\cos(r)-y\sin(r),x\sin(r)+y\cos(r))$  
\NC \NR
\HL
\stoptabulate

Pasting into my email program does not do this code snippet justice,  
as in the Metafun source, all of the \NC's are aligned vertically, as  
are the \NR's. How do you do this? Does your editor align these for  
you, or do you painstakenly align them manually with the spacebar?


___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-06-07 12:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-06-04 18:16 Beautiful source code David Arnold
2007-06-04 19:39 ` Hans Hagen
2007-06-07 12:45   ` Karsten Heymann

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).