Re: [NTG-context] need defaults for \definehighlight

2015-02-09 Thread Hans Hagen

On 2/9/2015 12:42 AM, Keith Schultz wrote:

Hi Hans, Idris, All,

Then we should call it definetag of definestyletag ! It would describe
its function better!

Like I said I find the command highlight nice because it is alot easier than
define my own commands for setting styles with color!


it's no problem to use the command for that (after all export is a 
rather special thing)


in fact, you can use the description mechanism for non-descriptions and 
itemizes for non-itemizes too etc


Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-
___
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
___

Re: [NTG-context] Disappearing backgrounds/pagenumbers with \page[none]

2015-02-09 Thread Hans Hagen

On 2/9/2015 12:19 AM, Wolfgang Schuster wrote:



Am 09.02.2015 um 00:10 schrieb Wolfgang Schuster
mailto:schuster.wolfg...@gmail.com>>:

Hi,

there was a problem on TeX SE [1]  where page numbers disappear for a
whole chapter when \page[none] is used to hide the numbers on empty
left pages in a double sided document.

As can be seen in the following example the page numbers and
background on the last two pages disappear when “missing” mode is
enabled. This happens when the “blank” option for \page is used
without a change in the page number (we are already at page 3 when
\page[yes,blank,right] is expanded).

 begin example
\setupbackgrounds[page][background=color,backgroundcolor=gray]

%\enablemode[missing]

\starttext

\dorecurse{6}{\input knuth\par}

% End the current page before \page[blank] is called
\doifmode{missing}{\page}

\page[yes,blank,right]

\dorecurse{6}{\input knuth\par}

\stoptext
 end example

[1]
http://tex.stackexchange.com/questions/225603/missing-page-numbers-first-chapter-only-context


BTW: Shouldn’t the following assignment in page-ini.miv be global?

\appendtoks
 \ifcase\pageornamentstate \or
 \pageornamentstate\zerocount
 \fi
\to \everyaftershipout


sure

Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-
___
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
___

Re: [NTG-context] need defaults for \definehighlight

2015-02-09 Thread Alan BRASLAU
On Sun, 8 Feb 2015 13:56:54 +0100
"Keith J. Schultz"  wrote:

> As to setting up defaults, the question is their a generic usage of
> such ways of for so called highlights. These are, basically, by those
> that: 1) like this much fluff
> 2) idiosyncratic terminology
> 
> 1) is supposed to avoided! And basically makes ConTeXt look like Word!

Indeed, it is very poor writing style to make abusive use of visuals.

Alan
___
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
___

Re: [NTG-context] need defaults for \definehighlight

2015-02-09 Thread Keith Schultz
Hi Hans, Idris, All,

fonts and color are as such appearance.
But, when one uses different fonts and colors or mix
then then we add meaning or as you tend to call
it structure. 

If their use does not add to the structure, then only one font style
and color is needed.

So actually, in the end they should be tagged, too!

Wolfgang has mentioned that we have definestyle is that 
tagged or not!

Furthermore, it is possible in ConTeXt to setup for example
the style italic, etc to what ever one cares to! for example one could
make and italic style be mono or bold! (naturally, it is
nonsense to do this).

Also, many authors of text, do think along the lines of markup in their
coding and do use \em, but simply \it, \bf for emphasis!

Similarly, many use quotation characters/glyphs in stead of \quotation
and \quote.

If we are exporting to xml then we should catch these cases!

Basically, any switch of style or font is the designation of the intention of 
an author
for a structural change! That is to make something stand out for one reason or 
the 
other.

regards
Keith.

> Am 08.02.2015 um 22:51 schrieb Hans Hagen :
> 
> On 2/8/2015 8:08 PM, Idris Samawi Hamid ادريس سماوي حامد wrote:
> 
>> Ok. It's clear that I'm doing a lot of guessing, so question: Can you
>> specify exactly what does *not* get tagged in xml-export? What exactly
>> do we need to worry about? Then we can go from there...
> 
> everything that has some structure or meaning gets tagged
> 
> font/colors have no meaning they're appearance so they don't get tagged
> 
> highlights are for the few things left ... but often one can also use 
> \startelement for that
> 

___
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
___

Re: [NTG-context] need defaults for \definehighlight

2015-02-09 Thread Wolfgang Schuster

> Am 09.02.2015 um 14:34 schrieb Keith Schultz :
> 
> Hi Hans, Idris, All,
> 
> fonts and color are as such appearance.
> But, when one uses different fonts and colors or mix
> then then we add meaning or as you tend to call
> it structure. 
> 
> If their use does not add to the structure, then only one font style
> and color is needed.
> 
> So actually, in the end they should be tagged, too!
> 
> Wolfgang has mentioned that we have definestyle is that 
> tagged or not!

No.

> Furthermore, it is possible in ConTeXt to setup for example
> the style italic, etc to what ever one cares to! for example one could
> make and italic style be mono or bold! (naturally, it is
> nonsense to do this).

\definefontfamily[mixed][rm][Latin Modern 
Roman][tf=style:bold,it=style:bolditalic,bf=style:italic,bi=style:normal]

\setupbodyfont[mixed]

\starttext
Upright, {\it Italic,} {\bf Bold,} {\bi BoldItalic}
\stoptext

Wolfgang
___
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
___

[NTG-context] Hatch an area with Metapost (Metafun)

2015-02-09 Thread Fabrice Couvreur
Hi,
How hatched trapezoid MBCD ?
Best regards,
Fabrice

\starttext
\startMPcode
path p ;
p=unitsquare scaled 4cm ;
draw p ;
pair z ;
z=point 3.6 of p ;
draw z--urcorner p ;
label.llft(btex B etex,llcorner p) ;
label.lrt(btex C etex,lrcorner p) ;
label.ulft(btex A etex,ulcorner p) ;
label.urt(btex  D etex, urcorner p) ;
label.lft(btex M etex, z) ;
\stopMPcode
\stoptext
___
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
___

[NTG-context] ConTeXt is looking for a non-existent .bbl file (Mac problem?)

2015-02-09 Thread Robert Zydenbos
Yesterday I tried to create a fresh PDF from a revised text using MkII and 
XeTeX (I have been using this combination for several months, because I need to 
use Indic fonts, which are not  -- yet? -- supported in MkIV). As a trick I 
defined an Indic font as a mono font (\tt), so that automatically the size 
would be adjusted correctly in footnotes etc.

To my horror, it no longer works. I stripped down my input file to one called 
kannada-test.tex, and still I got the bizarre error message "file 
kannada-test.bbl not found, waiting for bibtex", and texexec (or a process it 
invokes) freezes. I have never used bibtex input in these documents.

Below I am including the error log. I have changed nothing in the input files 
besides alterations in the text to be printed (not in any commands). The only 
thing that has changed is that in the meantime I installed the new version of 
MacTeX (2014; previously I was using 2013). I removed the entire MacTeX 2014 
version and installed it afresh, but this did not help either.

It seems to be a Mac problem. Ubuntu (14.04) also looks for a bbl file, but 
simply passes over it if none is found (see attachment).

I would be very grateful for suggested solutions. I was using this to prepare 
materials for classes (fortunately we have a recess until April right now).

Robert

This is XeTeX, Version 3.14159265-2.6-0.1 (TeX Live 2014) (preloaded 
format=cont-en)
 restricted \write18 enabled.
entering extended mode
(./kannada-test.tex

ConTeXt  ver: 2013.06.07 17:34 MKII  fmt: 2015.2.8  int: english/english

system  : cont-new.mkii loaded
(/usr/local/texlive/2014/texmf-dist/tex/context/base/cont-new.mkii
systems : beware: some patches loaded from cont-new.mkii
)
system  : cont-sys.tex loaded
(/usr/local/texlive/2014/texmf-config/tex/context/user/cont-sys.tex
(/usr/local/texlive/2014/texmf-dist/tex/context/base/type-siz.mkii)
(/usr/local/texlive/2014/texmf-dist/tex/context/base/type-otf.mkii)
(/usr/local/texlive/2014/texmf-dist/tex/context/base/type-xtx.mkii))
system  : kannada-test.top loaded
(./kannada-test.top)
bodyfont: 12pt rm is loaded
language: patterns nl->default:default->1->2:2 us->default:default->2->
2:3 de->default:default->3->3:3 da->default:default->4->2:2 sv->default:default
->5->2:2 af->default:default->6->2:2 gb->default:default->7->2:2 fr->default:de
fault->8->2:2 es->default:default->9->2:2 ca->default:default->10->2:2 it->defa
ult:default->11->2:2 la->default:default->12->2:2 pt->default:default->13->2:2 
ro->default:default->14->2:2 pl->default:default->15->2:2 cs->default:default->
16->2:2 sk->default:default->17->2:2 hr->default:default->18->2:2 sl->default:d
efault->19->2:2 tr->default:default->20->2:2 tk->default:default->21->1:2 lt->d
efault:default->22->2:2 agr->default:default->24->2:2 fi->default:default->25->
2:2 hu->default:default->26->2:2 ru->default:default->28->2:2 uk->default:defau
lt->29->3:3  loaded
specials: dvips loaded
language: language en is active
specials: loading definition file dpx
(/usr/local/texlive/2014/texmf-dist/tex/context/base/spec-dpx.mkii
specials: loading definition file fdf
(/usr/local/texlive/2014/texmf-dist/tex/context/base/spec-fdf.mkii))
specials: loading definition file xet
(/usr/local/texlive/2014/texmf-dist/tex/context/base/spec-xet.mkii)
(./kannadamanualfonts.tex)This is XeTeX, Version 3.14159265-2.6-0.1 (TeX 
Live 2014) (preloaded format=cont-en)
 restricted \write18 enabled.
entering extended mode
(./kannada-test.tex

ConTeXt  ver: 2013.06.07 17:34 MKII  fmt: 2015.2.8  int: english/english

system  : cont-new.mkii loaded
(/usr/local/texlive/2014/texmf-dist/tex/context/base/cont-new.mkii
systems : beware: some patches loaded from cont-new.mkii
)
system  : cont-sys.tex loaded
(/usr/local/texlive/2014/texmf-config/tex/context/user/cont-sys.tex
(/usr/local/texlive/2014/texmf-dist/tex/context/base/type-siz.mkii)
(/usr/local/texlive/2014/texmf-dist/tex/context/base/type-otf.mkii)
(/usr/local/texlive/2014/texmf-dist/tex/context/base/type-xtx.mkii))
system  : kannada-test.top loaded
(./kannada-test.top)
bodyfont: 12pt rm is loaded
language: patterns nl->default:default->1->2:2 us->default:default->2->
2:3 de->default:default->3->3:3 da->default:default->4->2:2 sv->default:default
->5->2:2 af->default:default->6->2:2 gb->default:default->7->2:2 fr->default:de
fault->8->2:2 es->default:default->9->2:2 ca->default:default->10->2:2 it->defa
ult:default->11->2:2 la->default:default->12->2:2 pt->default:default->13->2:2 
ro->default:default->14->2:2 pl->default:default->15->2:2 cs->default:default->
16->2:2 sk->default:default->17->2:2 hr->default:default->18->2:2 sl->default:d
efault->19->2:2 tr->default:default->20->2:2 tk->default:default->21->1:2 lt->d
efault:default->22->2:2 agr->default:default->24->2:2 fi->default:default->25->
2:2 hu->default:default->26->2:2 ru->default:def

Re: [NTG-context] Disappearing backgrounds/pagenumbers with \page[none]

2015-02-09 Thread Aditya Mahajan

On Mon, 9 Feb 2015, Hans Hagen wrote:


On 2/9/2015 12:19 AM, Wolfgang Schuster wrote:



Am 09.02.2015 um 00:10 schrieb Wolfgang Schuster
mailto:schuster.wolfg...@gmail.com>>:

Hi,

there was a problem on TeX SE [1]  where page numbers disappear for a
whole chapter when \page[none] is used to hide the numbers on empty
left pages in a double sided document.

As can be seen in the following example the page numbers and
background on the last two pages disappear when “missing” mode is
enabled. This happens when the “blank” option for \page is used
without a change in the page number (we are already at page 3 when
\page[yes,blank,right] is expanded).

 begin example
\setupbackgrounds[page][background=color,backgroundcolor=gray]

%\enablemode[missing]

\starttext

\dorecurse{6}{\input knuth\par}

% End the current page before \page[blank] is called
\doifmode{missing}{\page}

\page[yes,blank,right]

\dorecurse{6}{\input knuth\par}

\stoptext
 end example

[1]


http://tex.stackexchange.com/questions/225603/missing-page-numbers-first-chapter-only-context


BTW: Shouldn’t the following assignment in page-ini.miv be global?

\appendtoks
 \ifcase\pageornamentstate \or
 \pageornamentstate\zerocount
 \fi
\to \everyaftershipout


sure


Not sure if this completely fixes the problem. For example:

\definepagebreak
[chapterpagebreak]
[yes, blank, right]

\setuphead [chapter]
   [page=chapterpagebreak]

\showframe

\starttext
\startchapter
[title={First Chapter Title}]

\dorecurse{6}{\input knuth \par}

\stopchapter
\startchapter
[title={Second Chapter Title}]

\dorecurse{6}{\input knuth \par}

\stopchapter
\stoptext

There is no page number on the first page of the first chapter, but there 
is one on the first page of the second chapter.


Aditya___
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
___

Re: [NTG-context] Hatch an area with Metapost (Metafun)

2015-02-09 Thread Hans Hagen

On 2/9/2015 3:30 PM, Fabrice Couvreur wrote:

Hi,
How hatched trapezoid MBCD?
Best regards,
Fabrice

\starttext
\startMPcode
path p ;
p=unitsquare scaled 4cm ;
draw p ;
pair z ;
z=point 3.6 of p ;
draw z--urcorner p ;
label.llft(btex B etex,llcorner p) ;
label.lrt(btex C etex,lrcorner p) ;
label.ulft(btex A etex,ulcorner p) ;
label.urt(btex  D etex, urcorner p) ;
label.lft(btex M etex, z) ;
\stopMPcode
\stoptext



\startMPpage[offset=2pt]
path p, q, r ; pair z ;
p := unitsquare scaled 4cm ;
z := point 3.6 of p ;
q := z--urcorner p ;
r := q -- reverse bottomboundary p -- cycle ;
draw p ;
draw q ;
draw r numberstriped (.25,10,5) withcolor blue ;
draw thetextext.llft("B", llcorner p) ;
draw thetextext.lrt ("C", lrcorner p) ;
draw thetextext.ulft("A", ulcorner p) ;
draw thetextext.urt ("D", urcorner p) ;
draw thetextext.lft ("M", z) ;
\stopMPpage


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-
___
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
___

Re: [NTG-context] Hatch an area with Metapost (Metafun)

2015-02-09 Thread Fabrice

Hi Hans,
Great, but I did not know the macro numberstriped. Is it a Metapostor 
Metafun macro?

Fabrice
___
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
___

Re: [NTG-context] Disappearing backgrounds/pagenumbers with \page[none]

2015-02-09 Thread Wolfgang Schuster

> Am 09.02.2015 um 18:12 schrieb Aditya Mahajan :
> 
> On Mon, 9 Feb 2015, Hans Hagen wrote:
> 
>> On 2/9/2015 12:19 AM, Wolfgang Schuster wrote:
>>> 
 Am 09.02.2015 um 00:10 schrieb Wolfgang Schuster
 mailto:schuster.wolfg...@gmail.com>>:
 
 Hi,
 
 there was a problem on TeX SE [1]  where page numbers disappear for a
 whole chapter when \page[none] is used to hide the numbers on empty
 left pages in a double sided document.
 
 As can be seen in the following example the page numbers and
 background on the last two pages disappear when “missing” mode is
 enabled. This happens when the “blank” option for \page is used
 without a change in the page number (we are already at page 3 when
 \page[yes,blank,right] is expanded).
 
  begin example
 \setupbackgrounds[page][background=color,backgroundcolor=gray]
 
 %\enablemode[missing]
 
 \starttext
 
 \dorecurse{6}{\input knuth\par}
 
 % End the current page before \page[blank] is called
 \doifmode{missing}{\page}
 
 \page[yes,blank,right]
 
 \dorecurse{6}{\input knuth\par}
 
 \stoptext
  end example
 
 [1]
>> http://tex.stackexchange.com/questions/225603/missing-page-numbers-first-chapter-only-context
>>> 
>>> BTW: Shouldn’t the following assignment in page-ini.miv be global?
>>> 
>>> \appendtoks
>>> \ifcase\pageornamentstate \or
>>> \pageornamentstate\zerocount
>>> \fi
>>> \to \everyaftershipout
>> 
>> sure
> 
> Not sure if this completely fixes the problem. For example:

The \global is necessary because otherwise the assignment won’t have any effect 
because
the output routine (and this is where \everyaftershipout is used) forms a group 
but this won’t
fix the problem with \page[none].

> \definepagebreak
>[chapterpagebreak]
>[yes, blank, right]
> 
> \setuphead [chapter]
>   [page=chapterpagebreak]
> 
> \showframe
> 
> \starttext
> \startchapter
>[title={First Chapter Title}]
> 
> \dorecurse{6}{\input knuth \par}
> 
> \stopchapter
> \startchapter
>[title={Second Chapter Title}]
> 
> \dorecurse{6}{\input knuth \par}
> 
> \stopchapter
> \stoptext
> 
> There is no page number on the first page of the first chapter, but there is 
> one on the first page of the second chapter.

You don’t need the \chapter commands because it is a \page problem as can be 
seen in the following example
(the fix above solves the problem only for page 2 and upwards).

\starttext

\page[yes,blank,yes]

\dorecurse{6}{\input knuth\par}

\stoptext


To really fix the problem you have reset the \pageornamentstate value at
the end of the “yes”, „right” etc. keywords, e.g. (page-brk.mkiv)

\installpagebreakmethod \v!yes
  {\ifconditional\c_page_breaks_enabled
 \page_otr_flush_all_floats
 \page_otr_command_next_page
 \ifinsidecolumns   % this will move to MUL
   \page_otr_eject_page % otherwise sometimes no change
 \fi
-  \fi}
+  \fi
+  \global\pageornamentstate\zerocount}

and the automatic reset with \everyaftershipout has to be removed, otherwise
things like following example have page numbers on the page 2 and 3 which
should be empty.

\starttext

\page[yes,blank,+3]

\dorecurse{6}{\input knuth\par}

\stoptext


Wolfgang___
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
___

Re: [NTG-context] Hatch an area with Metapost (Metafun)

2015-02-09 Thread Hans Hagen

On 2/9/2015 7:22 PM, Fabrice wrote:

Hi Hans,
Great, but I did not know the macro numberstriped. Is it a Metapostor
Metafun macro?


yes
-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-
___
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
___

[NTG-context] two features in ViewerPreferences for printing

2015-02-09 Thread Pablo Rodriguez
Hans,

for a small book I’m publishing online
(https://archive.org/download/ensayo-escritura/ensayo-escritura.pdf), it
would be extremely useful to have two features from the PDF spec
implemented.

These are PrintScaling and Duplex (page 364 of the PDF spec). They are
two entries in the ViewerPreferences.

Both features are extremely useful to avoid issues when explaining
double-sided printing and not reducing margins (in some cases, this
reduction to margins is critical [such as in the sample above]).

I think this is not only useful to many users. Could these features be
implemented in ConTeXt?

Many thanks for your help,


Pablo
-- 
http://www.ousia.tk
___
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
___

[NTG-context] setupcite in mkiv to cite two references

2015-02-09 Thread Yu Zhang
Hi list,

I need some help about formatting citations in mkiv.

What I want is something like [3, 4] if I put \cite[ref3,ref4]. However,
what I actually get is [3 and 4]. This only happens if I put two references
in \cite[].

So, does anyone know how to replace 'and' with ', ' in my situation.

best,
Yu
___
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
___

Re: [NTG-context] Hatch an area with Metapost (Metafun)

2015-02-09 Thread John Kitzmiller
On Feb 9, 2015, at 1:46 PM, Fabrice mailto:couvreur.fabr...@wanadoo.fr>> wrote:
> 
> Great, but I did not know the macro numberstriped. Is it a Metapost or 
> Metafun macro?



It is a MetaFun macro in mp-tool, afaik.

The idea of filling a path is sometimes clipping to a path. Here is a way to do 
your task with (almost) only MetaPost:

\startMPpage[offset=2mm]
 path p, q ;
 p := unitsquare scaled 4cm ;
 z1 = point 3.6 of p ;
 q := z1 -- urcorner p -- lrcorner p -- llcorner p -- cycle;
 for i = 8 step -.5 until 0:
   draw (i,0)*cm -- (i-4,4)*cm withpen pencircle scaled 2pt withcolor blue;
 endfor;
 clip currentpicture to q;
 draw p ; draw q ;
 label.llft("B", llcorner p) ;
 label.lrt ("C", lrcorner p) ;
 label.ulft("A", ulcorner p) ;
 label.urt ("D", urcorner p) ;
 label.lft ("M", z1) ;
\stopMPpage

…just in case it helps to clarify.

John___
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
___