From: Wolfgang Schuster <schuster.wolfgang@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: METAFUN+CONTEXT+CUSTOMIZE
Date: Thu, 2 May 2013 23:40:34 +0200 [thread overview]
Message-ID: <24E78FA6-F7E2-46EB-A8DD-C215CE464D8C@gmail.com> (raw)
In-Reply-To: <cb1994dd5b2917d2.5182f747@uniovi.es>
[-- Attachment #1.1: Type: text/plain, Size: 1558 bytes --]
Am 02.05.2013 um 23:31 schrieb MANUEL GONZALEZ SUAREZ <gonzalezsmanuel@uniovi.es>:
>
> Hi everyone.
>
> I would like to pose the following question: I would like to know how I can customize the page number using an embedded graphic made with METAFUN. I mean, I wish someone would send me a simple example to do that, for example, a page number or headers (chapter, section, etc..) may appear with a color background or something else. The METAFUN manual provides, for example, the page number within an ellipse, and the sections are underlined in orange.
>
> Thank you all for your patience and sorry for my poor English and my poor knowledge of ConTeXt, but I'm studying hard reference manuals ConTeXt and hope to go slowly improving, although I am not expert in computer programming languages or even less in mathematics.
>
> Thanks very much.
>
These are only simple styles but the show how you can customize the heading and pagenumber.
\define[2]\ChapterCommand
{\startframed[frame=off,bottomframe=on,framecolor=orange,width=fit]
#1\hspace[medium]#2
\stopframed}
\setuphead[chapter][command=\ChapterCommand]
\startuseMPgraphic{pagenumber}
draw fullcircle xyscaled(OverlayWidth,OverlayHeight) withcolor \MPcolor{blue} ;
\stopuseMPgraphic
\defineoverlay[pagenumber][\useMPgraphic{pagenumber}]
\define[1]\PagenumberCommand
{\framed[frame=off,background=pagenumber]{#1}}
\setuppagenumbering[command=\PagenumberCommand]
\starttext
\chapter{This is a chapter}
\stoptext
Wolfgang
[-- Attachment #1.2: Type: text/html, Size: 2840 bytes --]
[-- Attachment #2: Type: text/plain, Size: 485 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://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
next prev parent reply other threads:[~2013-05-02 21:40 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-02 21:31 METAFUN+CONTEXT+CUSTOMIZE MANUEL GONZALEZ SUAREZ
2013-05-02 21:40 ` Wolfgang Schuster [this message]
2013-05-02 22:27 METAFUN+CONTEXT+CUSTOMIZE MANUEL GONZALEZ SUAREZ
2013-05-02 22:35 ` METAFUN+CONTEXT+CUSTOMIZE Wolfgang Schuster
2013-05-02 22:45 METAFUN+CONTEXT+CUSTOMIZE MANUEL GONZALEZ SUAREZ
2013-05-02 22:52 ` METAFUN+CONTEXT+CUSTOMIZE Wolfgang Schuster
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=24E78FA6-F7E2-46EB-A8DD-C215CE464D8C@gmail.com \
--to=schuster.wolfgang@gmail.com \
--cc=ntg-context@ntg.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).