On Sun, 28 Dec 2008, Brecht Machiels wrote:

Looking at the countless documents that show off ConTeXt, it is obvious that it is very much possible of creating custom layouts. However, I wonder, how much TeX hacking is required?

I have submitted around 3-4 IEEE conference documents using ConTeXt. I am attaching my private t-IEEE.tex module, which takes care of formatting things in IEEE format. I also have a bbl file for formatting in IEEE style, which is used by the above module.

Unfortunately, I do not have any documentation (this was meant to be a private module). It also has a lot of private macros which are not layout specific, but I use them in almost all my documents. I haven't used this style in almost 6 months, so they may not conform to the latest spec. (IEEE keeps on changing specs with time and with conferences, which is a bit frustating).

If others are interested, I can also release it on ConTeXt garden and provide some documentation.

Aditya

PS: In your environment file you have

\setuplayout[
  header          = 0pt,
  footer          = 0pt,
  headerdistance  = 0pt,
  footerdistance  = 0pt,
  top             = 1.125in,
  topdistance     = 0pt,
  bottom          = 1.125in,
  bottomdistance  = 0pt,
  leftedge        = 0.85in,
  rightedge       = 0.85in,
  height          = fit]

ConTeXt will silently ignore all of this. You must not have space between keywords and options. Write this as

\setuplayout[
          header=0pt,
          footer=0pt,
  headerdistance=0pt,
  footerdistance=0pt,
             top=1.125in,
     topdistance=0pt,
          bottom=1.125in,
  bottomdistance=0pt,
        leftedge=0.85in,
       rightedge=0.85in,
          height=fit]

%D \module

%D   [       file=bibl-ieee,

%D        version=2007.06.17,

%D          title=IEEE bibliography style,

%D       subtitle=IEEE Publications,

%D         author={Aditya Mahajan},

%D           date=\currentdate,

%D      copyright={Aditya Mahajan}]



\unprotect



%D The default mnemonics are not compatible with IEEE style.



\setuplabeltext [\s!en] [\v!january  :\s!mnem=Jan.]

\setuplabeltext [\s!en] [\v!february :\s!mnem=Feb.]

\setuplabeltext [\s!en] [\v!march    :\s!mnem=Mar.]

\setuplabeltext [\s!en] [\v!april    :\s!mnem=Apr.]

\setuplabeltext [\s!en] [\v!may      :\s!mnem=May]

\setuplabeltext [\s!en] [\v!june     :\s!mnem=Jun.]

\setuplabeltext [\s!en] [\v!july     :\s!mnem=Jul.]

\setuplabeltext [\s!en] [\v!august   :\s!mnem=Aug.]

\setuplabeltext [\s!en] [\v!september:\s!mnem=Sep.]

\setuplabeltext [\s!en] [\v!october  :\s!mnem=Oct.]

\setuplabeltext [\s!en] [\v!november :\s!mnem=Nov.]

\setuplabeltext [\s!en] [\v!december :\s!mnem=Dec.]



\setupbibtex          [sort=author]

\setuppublicationlist [maybeyear=off]



\setuplistalternative

  [ieee]

  [\c!distance=1em,

      \c!width=2em,

    \c!stretch=0em,

    \c!command=,

  ]



\setuppublicationlist 

  [\c!numbercommand=\!!i...@brackets,

           \c!width=2em,

     \c!alternative=ieee,

      \c!samplesize={99},

  ]





\def\doverysimplebibnumref#1#2%

   {\refsep

    \ifcase#1\relax \unknownreference{#1}\else

      \def\tempa{#2}\ifx\empty\tempa#1\else#1\docommaordash{#1}{#2}#2\fi

    \fi}%



\def\docommaordash#1#2%

   {\doifelse{\the\numexpr#1+1-#2\relax}{0}%

     {\bibalternative\c!pubsep}%

     {\bibalternative\c!inbetween}}%



\setupcite

       [author,year]

       [\c!andtext={ and },

        \c!otherstext={ et al.},

        \c!pubsep={, },

        \c!lastpubsep={ and },

        \c!compress=\v!no,

        \c!inbetween={ },

        \c!left={(},

        \c!right={)}]



\setupcite

       [authoryear]

       [\c!andtext={ and },

        \c!otherstext={ et al.},

        \c!pubsep={, },

        \c!lastpubsep={ and },

        \c!compress=\v!no,

        \c!inbetween={ },

        \c!left={(},

        \c!right={)}]



\setupcite

       [authoryears]

       [\c!andtext={ and },

        \c!otherstext={ et al.},

        \c!pubsep={, },

        \c!lastpubsep={ and },

        \c!compress=\v!no,

        \c!inbetween={, },

        \c!left={(},

        \c!right={)}]



\setupcite

       [key,serial,authornum,page,short,type,doi,url]

       [\c!andtext={ and },

        \c!otherstext={ et al.},

        \c!pubsep={, },

        \c!lastpubsep={ and },

        \c!compress=\v!no,

        \c!inbetween={ },

        \c!left={[},

        \c!right={]}]



\setupcite

       [num]

       [\c!andtext={ and },

        \c!otherstext={ et al.},

        \c!pubsep={, },

        \c!lastpubsep={ and },

        \c!compress=\v!yes,

        \c!inbetween={]--[},

        \c!left={[},

        \c!right={]}]



%D This is the ugliest way to make sure that the number is right justified.

%D The trouble is that \filename{core-lst.tex} contains an explicit

%D \type|\hfill|.



\def\!!i...@brackets#1%

  {\hbox \ifdim\!!widtha>\zeropoint to \!!widtha \fi

   {\hss[#1]\hskip 0.5em}}



\setuppublications

   [\c!sorttype=cite,

    \c!criterium=,

    \c!refcommand=num,

    \c!numbering=\v!yes,

    \c!numbercommand=\!!i...@brackets,

    monthconversion=month:mnem]



\setuppublicationlist

   [\c!artauthor=\normalshortauthor,

    \c!editor=\normalshortauthor,

    \c!author=\normalshortauthor,

    \c!namesep={, },

    \c!lastnamesep={ and },

    \c!finalnamesep={, and },

    \c!firstnamesep={ },

    \c!juniorsep={ },

    \c!vonsep={ },

    \c!surnamesep={ },

    \c!authoretallimit=5,

    \c!editoretallimit=5,

    \c!artauthoretallimit=5,

    \c!authoretaldisplay=5,

    \c!editoretaldisplay=5,

    \c!artauthoretaldisplay=5,

    \c!authoretaltext={ et al.},

    \c!editoretaltext={ et al.},

    \c!artauthoretaltext={ et al.},

    artauthorcommand=\!!i...@repeatedauthors,

    authorcommand=\!!i...@repeatedauthors,

]



%D Just to be sure



\def\maybeyear#1{}

\def\etalchar#1{#1}



%D Show repeated authors by ------



\def\!!i...@oldauthors{}



\def\!!i...@repeatedauthors#1#2#3%

    {\xdef\!!i...@newauthors{#3}%

      \ifx\!!i...@oldauthors\!!ieee@newauthors

          ------%

       \else

         \dospecialbibinsert{#1}{#2}{#3}%

         \global\let\!!i...@oldauthors\!!ieee@newauthors

       \fi}



\setuppublicationlayout[article]%

 {\insertartauthors {}                 {,} {\insertthekey{}{,}{}}%

  \insertarttitle   {\space\quotation\bgroup}

                                 {,\egroup} {}%

  \insertjournal    {\space\bgroup \it}

                        {\unskip\/\egroup} {}%

  \insertvolume     {,\space vol.~} 

        {\insertissue {,\space no.~} {} {}} {}%

  \insertpages      {,\space pp.\space}       {} {}%

  \insertpubyear    {,\space\insertmonth{}{\space}{}} 

                                         {} {}%

  \insertnote       {.\space}            {.} {.}}



\setuppublicationlayout[conference]%

 {\insertauthors    {}           {,} {\insertthekey{}{,}{}}%

  \insertarttitle   {\space\quotation\bgroup}

                                 {,\egroup} {}%

  \inserttitle      {\space in \bgroup \it}

                        {\unskip\/\egroup}  {}%

  \insertseries     {,\space ser.\space} {} {}%

  \inserteditors    {,\space ed.\space}  {} {}%

  \insertvolume     {,\space vol.~}  

           {\insertissue{,\space no.~}{}{}} {}%

  \insertpubyear    {,\space\insertmonth{}{,\space}{}}

                                         {} {}%

  \insertcity       {,\space}            {} {}%

  \insertpages      {,\space pp.\space}       {} {}%

  \insertnote       {.\space}            {.} {.}}



\setuppublicationlayout[inproceedings]%

 {\insertauthors    {}           {,} {\insertthekey{}{,}{}}%

  \insertarttitle   {\space\quotation\bgroup}

                                 {,\egroup} {}%

  \inserttitle      {\space in \bgroup \it}

                        {\unskip\/\egroup}  {}%

  \insertseries     {,\space ser.\space} {} {}%

  \inserteditors    {,\space ed.\space}  {} {}%

  \insertvolume     {,\space vol.~}  

           {\insertissue{,\space no.~}{}{}} {}%

  \insertpubyear    {,\space\insertmonth{}{,\space}{}}

                                         {} {}%

  \insertcity       {,\space}            {} {}%

  \insertpages      {,\space pp.\space}       {} {}%

  \insertnote       {.\space}            {.} {.}}





\setuppublicationlayout[incollection]%

 {\insertartauthors {}           {,} {\insertthekey{}{,}{}}%

  \insertarttitle   {\space\quotation\bgroup}

                                 {,\egroup} {}%

  \inserttitle      {\space in\space\bgroup\it} 

                                {\/\egroup} {}%

  \insertseries     {,\space ser.\space} {} {}%

  \inserteditors    {,\space ed.\space}  {} {}%

  \insertpubyear    {,\space\insertmonth{}{,\space}{}}

                                         {} {}%

  \insertpublisher  {,\space}            {} {}%

  \insertcity       {,\space}            {} {}%

  \insertpages      {,\space pp.\space}       {}  {}%

  \insertnote       {.\space}           {.} {.}}





\setuppublicationlayout[book]

 {\insertauthors    {}           {,} {\insertthekey{}{,}{}}%

  \inserttitle      {\space\bgroup\it}

                                 {\/\egroup} {}%

  \insertvolume     {,\space vol.~}  

           {\insertissue{,\space no.~}{}{}} {}%

  \insertseries     {,\space ser.\space} {} {}%

  \inserteditors    {,\space ed.\space}  {} {}%

  \insertpubname    {,\space} 

                 {\insertcity{,\space}{}{}} {}%

  \insertpubyear    {,\space\insertmonth{}{,\space}{}}

                                         {} {}%

  \insertnote       {.\space}            {.} {.}}



\setuppublicationlayout[unpublished]

  {\insertauthors    {}           {,} {\insertthekey{}{,}{}}%

   \inserttitle      {\space\bgroup\it}

                                 {\/\egroup} {}%

  \insertpubyear    {,\space\insertmonth{}{,\space}{}}

                                         {} {}%

  \insertnote       {.\space}            {.} {.}}



\setuppublicationlayout[phdthesis]%

 {\insertauthors {}                 {,} {\insertthekey{}{,}{}}%

  \inserttitle      {\space\quotation\bgroup}

                                 {,\egroup} {}%

  \inserttype       {\space}                 {} {\space Ph.D.\ Thesis}%

  \insertpubname    {,\space}                 {} {}%

  \insertcity       {,\space}                 {} {}%

  \insertpubyear    {,\space\insertmonth{}{\space}{}} 

                                         {} {}%

  \insertnote       {.\space}            {.} {.}}



% \setuppublicationlayout[phdthesis]{%

%   \insertauthors{}{}{}%

%   \inserttitle{``}{,''}{}%

%   \inserttype{}{,}{Ph.D.\ Thesis,}%

%   \insertpubname{}{,}{}%

%   \insertcity{}{,}{}%

%   \insertpubyear{\insertmonth{}{, }{}}{.}{.}%

%   \insertnote{}{.}{}%

% }%

%   

% TODO. The rest of this stuff



% \setuppublicationlayout[inbook]{%

%   \insertauthors{}{}{}%

%   \insertchapter{\bgroup \em}{\egroup,}{}%

%   \inserttitle{in }{,}{}%

%   \insertvolume{vol. }{,}{}%

%   \inserteditors{}{ ed%

%                          \ifnum\getvalue{edi...@num}> 1 s\fi.,

%                              \ \global\editedbooktrue 

%                      }{}%

%   \insertseries{ser. }{,}{}%

%   \insertpages{pp. }{,}{}%

%   \insertpubname{}{,}{}%

%   \insertpubyear{}{.}{}%

%   \insertnote{}{.}{}%

% }%





% \setuppublicationlayout[unpublished]{%

%   \insertauthors{}{}{}%

%   \inserttitle{``}{,''}{}%

%   \insertpubyear{\insertmonth{}{, }{}}{,}{.}%

%   \insertnote{}{.}{}%

% }%



% \setuppublicationlayout[proceedings]{%

%   \inserttitle{\bgroup\em}{\egroup,}{}%

%   \insertseries{in }{,}{}%

%   \insertvolume{vol. }{,\insertissue{ no. }{,}{}}{}%

%   \insertpubyear{\insertmonth{}{, }{}}{.}{.}%

%   \insertnote{}{.}{}%

% }%

%   

% \setuppublicationlayout[techreport]{%

%   \insertauthors{}{}{}%

%   \inserttitle{``}{,''}{}%

%   \insertbibtype{}{\insertvolume{ }{}{\unskip},}{}%

%   \insertpubname{}{\unskip,\insertcity{ }{\unskip,}{\unskip}}{}%

%   \insertpubyear{\insertmonth{}{, }{}}{.}{}%

%   \insertnote{}{.}{}%

% }%

\protect

\startmodule  IEEE

\usemodule  [abr-aditya]
\usemodule  [bib]

% Bib Setup {{{

\setuppublications    [alternative=ieee]

\defineblank[ieeebibblank]
            [0.3\baselineskip plus 0.1\baselineskip minus 0.1\baselineskip]

\defineblank[ieeebibitemblank][0pt plus .5pt]

\setuppublicationlist 
  [before={\blank[ieeebibitemblank]}]

\def\initializepubslist
  {\switchtobodyfont[8pt]%
   \setupinterlinespace[line=9pt]%
   \setupwhitespace[none]%
   \blank[ieeebibblank]%
   % There should be a more ConTeXtish way!
   % \sloppy
   \tolerance 9999
   \emergencystretch 3em
   \hfuzz .5\points
   \vfuzz\hfuzz
   \clubpenalty4000
   \widowpenalty4000
   \interlinepenalty500
    \sfcode`\.=1000}

% }}}

% Fonts {{{

\definealternativestyle [emph]     [\em]     []

\loadmapfile[dstroke.map]

\starttypescript [math] [modern,computer-modern,latin-modern,ams] [size]
  \definebodyfont [17.3pt,14.4pt,12pt][mm]
                 [mb=dsrom12 sa 1,
                   mc=rsfs10 sa 1]
  \definebodyfont [11pt,10pt,9pt] [mm]
                  [mb=dsrom10 sa 1,
                   mc=rsfs10 sa 1]
  \definebodyfont [8pt,7pt] [mm]
                  [mb=dsrom8 sa 1,
                   mc=rsfs7 sa 1]
  \definebodyfont [6pt,5pt,4pt] [mm]
                  [mb=dsrom8 sa 1,
                   mc=rsfs5 sa 1]
\stoptypescript

\definefamilysynonym [default] [doublestroke]   [mb]
\definefamilysynonym [default] [scriptfamily] [mc]

\def\dstroke {\fam\purefamily  {doublestroke}}
\def\scr     {\fam\purefamily{scriptfamily}} 


\def\doublestroke#1{{\dstroke#1}}
\def\script      #1{{\scr#1}}    


\startmode[mkii]
\usetypescriptfile  [type-gyr]

\starttypescript [mainface] [texnansi,ec,qx,t5,default]

  \definetypeface [mainface] [rm] [serif] [times]     [default] [encoding=\typescripttwo]
  \definetypeface [mainface] [ss] [sans]  [helvetica] [default] [encoding=\typescripttwo]
  \definetypeface [mainface] [tt] [mono]  [courier]   [default] [encoding=\typescripttwo]
  \definetypeface [mainface] [mm] [math]  [modern]    [modern]  [encoding=\typescripttwo]

  \quittypescriptscanning

\stoptypescript
\stopmode

\startmode[mkiv]
\starttypescript [mainface] 

  \definetypeface [mainface] [rm] [serif] [times]     [default] 
  \definetypeface [mainface] [ss] [sans]  [helvetica] [default] 
  \definetypeface [mainface] [tt] [mono]  [courier]   [default] 
  \definetypeface [mainface] [mm] [math]  [modern]    [modern]  

  \quittypescriptscanning

\stoptypescript
\stopmode

\doifmode{final}{\usetypescript[serif][hanging][normal]}

\doifmode{mkii}{\usetypescript[mainface][texnansi]}
\doifmode{mkiv}{\usetypescript[mainface][features=default]}

\doifmode{final}{\setupalign   [hanging]}

\setupbodyfont[mainface,10pt]

\definefont [sectionfont]    [Times-Caps]
\definefont [titlefont]      [Regular at 24pt]
\let\os=\sectionfont

\setupbodyfontenvironment[default]
                         [em=italic]



% The natural width of space in Times is smaller.
% \def\raggedspaceamount{0.25em}


% Change footnote font size to 8pt.
\setupfootnotes[bodyfont=8pt,width=\textwidth,rule=]
\setupfootnotes[location=lastcolumn]
% }}}

% Section Formatting {{{

\defineblank  [section:before] [1.5ex plus 1.5ex minus 0.5ex]
\defineblank  [section:after]  [0.7ex plus 1ex minus 0ex]

\setupsection [section-3]
              [bodypartconversion=Romannumerals,
              appendixconversion=Characters]

\setupsection [section-4]
              [bodypartconversion=Character,
               previousnumber=no]

\setupsection [section-5]
              [bodypartconversion=numbers,
               previousnumber=no]

\setupsection [section-6]
              [bodypartconversion=character,
               previousnumber=no]

\setuplabeltext [section={{},{.}},
                 subsection={{},{.}},
                 appendix={{Appendix },{.}}]

\setupsectionblock [appendix]  [page=]

\setupheads[indentnext=yes]

\setuphead[section,subject]
          [  align=middle,
                   style=\sectionfont,
           appendixlabel=appendix,
              placehead=yes,
                  before={\blank[section:before]},
                   after={\blank[section:after]},
          ]

\setuphead[subsection]
          [ align=normal,
            style=italic,
           before={\blank[section:before]},
            after={\blank[section:after]},
          ]

\setuphead  [subsubject]  [style=italic,alternative=text,distance=1ex]

%  }}}

% Page Layout {{{
\setuppapersize[letter][letter]

\setuplayout[
                 width=middle,
                height=middle,
              location=middle,
              topspace=.75in,
           bottomspace=0.75in,
          bottomdistance=.25in,
                  bottom=.25in,
             backspace=0.75in,
              cutspace=0.75in,
            leftmargin=0in,
           rightmargin=0in,
    leftmargindistance=0in,
   rightmargindistance=0in,
                header=0in,
                footer=0in,
         headerdistace=0in,
        footerdistance=.15in,
      ]


% No page numbering
\setuppagenumbering[location=]

\setupcolumns[n=2,distance=0.2in,column=lastcolumn]

% }}}

% Variables {{{
\setvariables[article][title=]
\setvariables[article][author=]
\setvariables[article][institute=]
\setvariables[article][email=]

% }}}

% Title {{{
\setuplabeltext[abstract=Abstract,keyword=Keyword]

\startsetups  IEEE:abstract:setup
  \switchtobodyfont[9pt]
\stopsetups

\startsetups IEEE:title:after
    \startalignment[middle]
    \doifsomething{\getvariable{article}{author}}
     \bgroup
      \blank[big]
      \tfa\setupinterlinespace
      \getvariable{article}{author}
      \endgraf\egroup
     \doifsomething{\getvariable{article}{institute}}
     {
     \let\\\crlf
     \blank[small]
     \tf\setupinterlinespace
     \getvariable{article}{institute}
     }
   \stopalignment
   \blank[1.4em]
\stopsetups

\startsetups IEEE:headerandfooters
  \doifsomething{\getvariable{article}{bottom}}
  {\setupbottomtexts
    [\getvariable{article}{bottom}]
  \setupbottomtexts
    [][pagenumber]}
\stopsetups

\startsetups IEEE:interaction
  \setupinteraction
   [
       title={\getvariable{article}{title}},
    subtitle={\getvariable{article}{conference}},
      author={\getvariable{article}{author}}]
\stopsetups
\setuphead  [title]
            [align={middle,broad},
             style=\titlefont,
             before={\blank[force,0.2em]},after=]
\def\article
  {\dosingleargument\doarticle}

\def\doarticle[#1]%
  {\setvariables[article][#1]
   \title{\getvariable{article}{title}}
   \setups[IEEE:title:after]
   \setups[IEEE:headerandfooters]
   \setups[IEEE:interaction]
   \startcolumns
   \appendtoks \stopcolumns \to \everystoptext}

\definestartstop[abstract]
  [before={\bgroup\blank[small]\setups[IEEE:abstract:setup]
          \bold\bgroup{\bolditalic \labeltext{abstract}}---\,},
   after={\egroup\endgraf\egroup\blank[small]}]

% }}}

% Theorems and Proofs {{{

\unprotect
\setvalue{@@descriptionIEEE}[#1]#2%
  {\@@dostartdescription[#1]{\def\\{\crlf}}{#2}%
   \doindenting
   \ifhbox\@@descriptionbox\unhcopy\else\copy\fi\@@descriptionbox
   \hskip\!!widthb % toegevoegd
   \@@dodescription}

\setvalue{@@descriptionIEEEproof}[#1]#2%
  {\@@dostartdescription[#1]{\def\\{\crlf}}{#2}%
   \noindent\hskip 2em
   \ifhbox\@@descriptionbox\unhcopy\else\copy\fi\@@descriptionbox
   \hskip\!!widthb % toegevoegd
   \@@dodescription}
\protect

\setupenumerations
  [location=IEEE,
   sectionnumber=no,
   stopper=:\ ,
   headstyle=italic,
   titlestyle=italic,
   titledistance=1ex,
   title=yes,
   style=normal,
   before={\blank[2pt plus 1pt minus 1pt]},
   after={\blank[2pt plus 1pt minus 1pt]}]
   

\defineenumeration [problem]    [text=Problem]
\defineenumeration [definition] [text=Definition]
\defineenumeration [theorem]    [text=Theorem]
\defineenumeration [lemma]      [text=Lemma]
\defineenumeration [corollary]  [text=Corollary]
\defineenumeration [example]    [text=Example]

\defineenumeration
  [proof]
  [   location=IEEEproof,
          text=Proof,
     headstyle=italic,
    titlestyle=italic,
      distance=1ex,
         style=normal,
        number=no,
     titleleft=,
    titleright=,
       stopper=.,
   closesymbol=\math{\square},
  ]

\definedescription
  [remark]
  [stopper=:,width=broad,location=IEEE]


% }}}

% Itemize {{{
\setupitemize[each][packed,joinedup]

\setupitemgroup
  [itemize]
  [each]
  [margin=1pc,
   distance=0pt,
   itemalign=left,
   headstyle=italic,
   indentnext=no]

\setupitemgroup
  [itemize]
  [each]
  [broad,fit]

% }}}

% Formulas {{{

\optimizedisplayspacingtrue

\defineblank[displayskip][1.5ex plus 4pt minus 2pt]

\setupsubformulas [separator=]
\setupformulas    [indentnext=auto,numberstyle=normal,
                   spacebefore=displayskip,
                   spaceafter=displayskip]

\definereferenceformat  [doeqref]   [left=(,right=)]
\def\eqref[#1]{{\normal \doeqref[#1]}}

\usemodule  [mathsets]
\definemathset[EXP] [text={\doublestroke{E}}]
\definemathset[PR]  [text=\Pr,left=(,right=)]
\definemathset[IND] [text={\doublestroke{1}},left={[},right={]}]
\definemathset[PSP] [text={\doublestroke{P}},left={(},right={)}]
\definemathset[SET]

%D These should go to the core.   

\definemathsymbol [lvert] [open]  [sy] ["6A] [ex] ["0C]
\definemathsymbol [rvert] [close] [sy] ["6A] [ex] ["0C]

% Do not know if there is a mistake in core-mat, but this does look better.
\unexpanded\def\dointertext#1%
  {\penalty\postdisplaypenalty
   \vbox{\forgetall\noindent#1\par}%
   \penalty\predisplaypenalty}

\unexpanded\def\stackrel#1#2%
    {\mathrel{\mathop{#2}\limits^{#1}}}

% Float and Figures {{{

\usemodule      [float-test]
\setupcaptions
    [headstyle=normal,stopper=.,distance=1ex,
     style={\switchtobodyfont[small]}]
\setupfloat     [figure]  [indentnext=auto]

\setuplabeltext [figure=Fig~]

%}}}

% MP Settings {{{
\startMPinclusions
% Arrowhead Modifications for TAOCP. Copied from some webpage of Knuth. 
% These arrows are better in appearance than the default mp arrows.
ahangle := 35;
ahlength := 6;

vardef arrowhead expr p =
  save q, e, f, g; path q; pair e; pair f; pair g;
  e = point length p of p;
  q = gobble(p shifted -e cutafter makepath(pencircle scaled 2ahlength))
    cuttings;
  f = point 0 of (q rotated 0.5ahangle) shifted e;
  g = point length q of (reverse q rotated -0.5ahangle) shifted e;
  f .. {dir (angle direction length q of (q rotated 0.5ahangle) - 0.3ahangle)}e
    & e{dir (angle direction 0 of ((reverse q) rotated -0.5ahangle)+0.3ahangle)} .. g
enddef;

def _finarr text t =
  draw _apth t;
  draw arrowhead _apth t        % do not fill
enddef;

def _findarr text t =
  draw _apth t;
  draw arrowhead _apth withpen currentpen t;
  draw arrowhead reverse _apth withpen currentpen t
enddef;
\stopMPinclusions

% }}}

% Setups {{{
\setupindenting[small,yes]
\setupwhitespace[none]

\setuptolerance[vertical,tolerant]

% General Macros <<<
\def\IE{i.e.}
\def\EG{e.g.}

\stopmodule

% vim: nowrap
___________________________________________________________________________________
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
___________________________________________________________________________________

Reply via email to