ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* About formatting the "Fonts out of ConTEXT" manual
@ 2017-08-15 10:35 Fabrice Couvreur
  2017-08-16  0:13 ` Henri
  2017-08-16  0:16 ` Henri
  0 siblings, 2 replies; 4+ messages in thread
From: Fabrice Couvreur @ 2017-08-15 10:35 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 1657 bytes --]

Hi Hans,
I love the style used for this manual. I tried to do the same thing, but
it's a long way off !
I tried to find the source code to inspire me :-)
I did this :

\startuniqueMPgraphic{titled}
  path p ;
  p := unitsquare xscaled \overlaywidth yscaled \overlayheight ;
  pickup pencircle scaled 1mm ;
  linecap := squared ;
  drawoptions(withcolor \MPcolor{darkred}) ;
  draw ulcorner p -- urcorner p ;
  setbounds currentpicture to p ;
\stopuniqueMPgraphic

\defineoverlay[titled][\uniqueMPgraphic{titled}]

\startuseMPgraphic{triangledone}
fill lltriangle scaled 4cm withcolor darkred;
\stopuseMPgraphic

\defineoverlay[triangledone][\useMPgraphic{triangledone}]

\def\Triangledone#1%
  {\framed
      [background=triangledone,frame=off,offset=overlay]
  {\tfb\color[white]{\bf#1}}}

\startuseMPgraphic{triangledtwo}
fill lrtriangle scaled 4cm withcolor darkred;
\stopuseMPgraphic

\defineoverlay[triangledtwo][\useMPgraphic{triangledtwo}]

\def\Triangledtwo#1%
  {\framed
      [background=triangledtwo,frame=off,offset=overlay]
      {\tfb\color[white]{\bf#1}}}

\setupheadertexts[margin][][\Triangledone\pagenumber][\Triangledtwo\pagenumber][]

\setupfootertexts[margin][]
                 [{\framed
                     [background=titled,frame=off,offset=8pt,align=left,
                      width=\dimexpr\leftmarginwidth-\leftedgewidth\relax]
                      {\darkred\getmarking[section]}}]

\setuppagenumbering[alternative=doublesided,location=]

\setuphead
   [section]
   [color=darkred]

\starttext

\startchapter[title={First Chapter}]
\startsection[title={First section}]
\dorecurse{5}{\input knuth}
\stoptext

Thank you
Fabrice

[-- Attachment #1.2: Type: text/html, Size: 2533 bytes --]

[-- Attachment #2: Type: text/plain, Size: 492 bytes --]

___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

end of thread, other threads:[~2017-08-16  9:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-15 10:35 About formatting the "Fonts out of ConTEXT" manual Fabrice Couvreur
2017-08-16  0:13 ` Henri
2017-08-16  0:16 ` Henri
2017-08-16  9:00   ` Fabrice Couvreur

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