ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* METAFUN+CONTEXT+CUSTOMIZE
@ 2013-05-02 21:31 MANUEL GONZALEZ SUAREZ
  2013-05-02 21:40 ` METAFUN+CONTEXT+CUSTOMIZE Wolfgang Schuster
  0 siblings, 1 reply; 6+ messages in thread
From: MANUEL GONZALEZ SUAREZ @ 2013-05-02 21:31 UTC (permalink / raw)
  To: ntg-context

[-- Attachment #1: Type: text/html, Size: 1497 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
___________________________________________________________________________________

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

* Re: METAFUN+CONTEXT+CUSTOMIZE
  2013-05-02 21:31 METAFUN+CONTEXT+CUSTOMIZE MANUEL GONZALEZ SUAREZ
@ 2013-05-02 21:40 ` Wolfgang Schuster
  0 siblings, 0 replies; 6+ messages in thread
From: Wolfgang Schuster @ 2013-05-02 21:40 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- 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
___________________________________________________________________________________

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

* Re: METAFUN+CONTEXT+CUSTOMIZE
  2013-05-02 22:45 METAFUN+CONTEXT+CUSTOMIZE MANUEL GONZALEZ SUAREZ
@ 2013-05-02 22:52 ` Wolfgang Schuster
  0 siblings, 0 replies; 6+ messages in thread
From: Wolfgang Schuster @ 2013-05-02 22:52 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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


Am 03.05.2013 um 00:45 schrieb MANUEL GONZALEZ SUAREZ <gonzalezsmanuel@uniovi.es>:

> I use TeXLive 2011 and I get the following error (the file name is custo.tex):

Use this definition

\define[2]\ChapterCommand
  {\framed
     [frame=off,bottomframe=on,framecolor=orange,width=fit]
     {#1\hspace[medium]#2}}


In newer versions (the environment form was added a few months ago) you can use

  \startframed … \stopframed

instead of

  \framed{…}

which makes it easier to format code when \framed has more content.

Wolfgang


[-- Attachment #1.2: Type: text/html, Size: 1240 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
___________________________________________________________________________________

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

* METAFUN+CONTEXT+CUSTOMIZE
@ 2013-05-02 22:45 MANUEL GONZALEZ SUAREZ
  2013-05-02 22:52 ` METAFUN+CONTEXT+CUSTOMIZE Wolfgang Schuster
  0 siblings, 1 reply; 6+ messages in thread
From: MANUEL GONZALEZ SUAREZ @ 2013-05-02 22:45 UTC (permalink / raw)
  To: ntg-context

[-- Attachment #1: Type: text/html, Size: 7478 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
___________________________________________________________________________________

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

* Re: METAFUN+CONTEXT+CUSTOMIZE
  2013-05-02 22:27 METAFUN+CONTEXT+CUSTOMIZE MANUEL GONZALEZ SUAREZ
@ 2013-05-02 22:35 ` Wolfgang Schuster
  0 siblings, 0 replies; 6+ messages in thread
From: Wolfgang Schuster @ 2013-05-02 22:35 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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


Am 03.05.2013 um 00:27 schrieb MANUEL GONZALEZ SUAREZ <gonzalezsmanuel@uniovi.es>:

> Wolfgang Thanks for your help.
> Your definition to customize the number of page works, but the command definition \ ChapterCommand gives me a compilation error. (with LuaTeX and MKIV).

I guess you’re using a older context version (TeXLive 2012?) where you have to use

  \unexpanded\def\ChapterCommand#1#2{…}

Wolfgang


[-- Attachment #1.2: Type: text/html, Size: 922 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
___________________________________________________________________________________

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

* METAFUN+CONTEXT+CUSTOMIZE
@ 2013-05-02 22:27 MANUEL GONZALEZ SUAREZ
  2013-05-02 22:35 ` METAFUN+CONTEXT+CUSTOMIZE Wolfgang Schuster
  0 siblings, 1 reply; 6+ messages in thread
From: MANUEL GONZALEZ SUAREZ @ 2013-05-02 22:27 UTC (permalink / raw)
  To: ntg-context

[-- Attachment #1: Type: text/html, Size: 450 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
___________________________________________________________________________________

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

end of thread, other threads:[~2013-05-02 22:52 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-02 21:31 METAFUN+CONTEXT+CUSTOMIZE MANUEL GONZALEZ SUAREZ
2013-05-02 21:40 ` METAFUN+CONTEXT+CUSTOMIZE Wolfgang Schuster
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

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