Re: [NTG-context] How to embed formatting commands into the syntax highlight code generated by scite module?

2016-04-11 Thread Aditya Mahajan

> i want to embed some formatting commands into code highlighted with scite or 
> vim module, but i do not find its option like "escape=yes". Is there a way to 
> do it?
> 

 With the vim module, `escape=yes` should work in the comment region. See the 
documentation:

https://github.com/adityam/filter/blob/master/vim-README.md

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] Interactionmenu not creating a button for the final page

2016-04-11 Thread Brian Ballsun-Stanton
Awesome. Thanks!

On 12 April 2016 at 03:16,  wrote:

>
>
> --
>
> Message: 4
> Date: Mon, 11 Apr 2016 19:05:39 +0200
> From: Hans Hagen 
> To: ntg-context@ntg.nl
> Subject: Re: [NTG-context] Interactionmenu not creating a button for
> the final page
> Message-ID: <570bd963.4050...@wxs.nl>
> Content-Type: text/plain; charset=utf-8; format=flowed
>
> On 4/11/2016 9:47 AM, Brian Ballsun-Stanton wrote:
>
> > it seems that the interactionmenu doesn't have a button for the final
> > page. I'm assuming I did something wrong, but I'm not quite sure what it
> > is.
>
> it's a bug in subpages (reference needs page offset) ... fixed in next
> upload
>
> Hans
>
> -
>Hans Hagen | PRAGMA ADE
>Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>tel: 038 477 53 69 | 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] Warnings while compiling pdf after update

2016-04-11 Thread Hans Hagen

On 4/12/2016 12:52 AM, L.S.-Soc wrote:

Hi guys,

I updated CTX today and now on every pdf compilation i get two warnings:

interfaces  > implementor > warning: 'scanners.setmapfile' is redefined
interfaces  > implementor > warning: 'commands.setmapfile' is redefined

so three CTX runs give me six warnings. is there a way to disable them?


you have to wait till the update (tomorrow)

Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: 038 477 53 69 | 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] \startuseMPgraphic

2016-04-11 Thread Aditya Mahajan

On Mon, 11 Apr 2016, Alan BRASLAU wrote:


By the way, we added colo-imp-crayola having some funky, hallucinogenic
names (according to Hans) as well as colo-imp-ral.
(The first might be of interest to Americans and the second to
Europeans ;-)


These are nice colors. For anyone interested, you can view these using:

\showcolor[crayola]
\showcolor[ral]

I'll update the wiki page on colors.

[BTW, all the links generated using {src:...} on the wiki are wrong. 
First, they point to a really old copy (2014.02.14). I can change the link 
to the bitbucket mirror (by changing the src template), but because of the 
recent reorganization of the source code, all the links will be wrong. So 
all the links to source files will need to be updated manually (or using a 
script).


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
___

[NTG-context] Warnings while compiling pdf after update

2016-04-11 Thread L.S.-Soc

Hi guys,

I updated CTX today and now on every pdf compilation i get two warnings:

interfaces  > implementor > warning: 'scanners.setmapfile' is redefined
interfaces  > implementor > warning: 'commands.setmapfile' is redefined

so three CTX runs give me six warnings. is there a way to disable them?


Greets, Sebastian

My system:
Win10x64
ConTeXt Version: beta-2016.04.10 23:52
LuaTeX Version: beta-0.95.0
___
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] Weird background colors in autogenerated index

2016-04-11 Thread Hans Hagen

On 4/11/2016 8:13 PM, Jan Tosovsky wrote:

On 2016-04-10 Hans Hagen wrote:

On 4/10/2016 11:26 PM, Pablo Rodriguez wrote:

On 04/10/2016 11:00 PM, Jan Tosovsky wrote:

On 2016-04-10 Hans Hagen wrote:

On 4/9/2016 11:22 PM, Jan Tosovsky wrote:


since LuaTeXt 0.81 my back-of-the-book index (register) is
with generated strange background colors. The index title
is typeset in yellowish background and the left column of
the last index page has a blue background, see the attachment.

... It was fine in the version 0.80.


no example


here you have the minimal sample:

\showgrid
\starttext
a\index{b}
\completeindex
\stoptext

Comment the first line and colors background colors will disappear.


a good catch, Pablo, thanks.


indeed, it's tracing related (no bug)


My idea is to have a single PDF source to showcase some ConTeXt features, where 
displaying the grid is handy, yet allow disabling the grid on demand.

So any visible \showgrid related issues, which cannot be switched off together 
with the grid layer, are unacceptable ;-)


well, with tracing one gets what's provided .. after all it's tracing, 
so 'unacceptable' is a kind of unacceptable demand



Is there any chance to improve this a bit?


currently not but you can influence the grid a bit:

  \showgrid[reset,...]

options can be seen with

  context --extra=setups grid

You're lucky that it's only a few lines to add 'columns' options (so in 
some upcoming beta you have to mess with 'reset' and whatever else).


Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: 038 477 53 69 | 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] \startuseMPgraphic

2016-04-11 Thread Alan BRASLAU
Thank you Wolfgang, this is a very good explanation.


One can simplify one's code, perhaps, by defining MP colors from
ConTeXt colors, as in:
color orange ; orange := \MPcolor{orange} ;
Then,  one can use orange. There is not much point in redefining the
other colors (red, green, blue, cyan, magenta, yellow, black, white) as
they are defined using the same rgb values.

In fact, \MPcolor{} simply injects "(r,g,b)" or "(c,m,y,k)" with
explicit values into the MP code.

Defining new MP colors is less general than explicitly using
\MPcolor{...}, for it is limiting, and it would be somewhat silly to
add definitions for all of the wonderful colors found in colo-imp-x11,
for example.

By the way, we added colo-imp-crayola having some funky, hallucinogenic
names (according to Hans) as well as colo-imp-ral.
(The first might be of interest to Americans and the second to
Europeans ;-)

Other collections, such as colo-imp-pantone and colo-imp-rosco are not
distributed due to copyright restrictions (but I have made private
copies, shhh!)

Alan




On Mon, 11 Apr 2016 22:27:06 +0200
Wolfgang Schuster  wrote:

> There are two way to define colors for a metapost graphics, the first
> is to define it with metapost itself.
> 
> %% begin example
> \startMPpage
> color myred ; myred := (1,0,0) ;
> fill fullcircle scaled 3cm withcolor myred ;
> \stopMPpage
> %% end example
> 
> The disadvantage is that you can use this color only in your graphics
> but not in your tex code.
> 
> Now comes the second method where I define the color in tex with the
> \definecolor command and access it in metapost with the color
> \MPcolor command.
> 
> %% begin example
> \definecolor[myred][r=1]
> 
> \startMPpage
> fill fullcircle scaled 3cm withcolor \MPcolor{myred} ;
> \stopMPpage
> %% end example
> 
> 
> The second part of the questions concerns metapost variables.
> 
> %% begin example
> \startuseMPgraphic{mycircle}{diameter,color}
> fill fullcircle scaled \MPvariable{diameter} withcolor
> \MPvariable{color} ; \stopuseMPgraphic
> 
> \startTEXpage
> \useMPgraphic{mycircle}{diameter=3cm,color=red}
> \stopTEXpage
> %% end example
> 
> The second argument of the \startuseMPgraphic command initializes
> the variables of your command and the \MPvariable accesses the value
> of the variable. In this case "color" is only the name of the variable
> and doesn’t tell if we want a tex defined color or a metapost defined
> color.
> 
> In my example the color has to be defined in metapost because after
> expansion we end with "withcolor red" in the example. We you want
> a color which has been defined in tex you have put \MPcolor around
> the \MPvariable command, i.e. "\MPcolor{\MPvariable{color}}".

___
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] Ligature color is not reliable

2016-04-11 Thread Jan Tosovsky
On 2016-04-11 Hans Hagen wrote:
> On 4/11/2016 9:06 PM, Jan Tosovsky wrote:
> > On 2016-04-09 Jan Tosovsky wrote:
> >>
> >> for an illustration I wanted to colorize all ligatures, but the
> >> following method is not reliable for three character ligatures
> >> - which ends up black.
> >>
> >> While tested with Palatino, it can be simulated even with
> >> a default font (however there are missing ffi and ffl ligatures).
> >>
> >> \definefontfamily[palatino][rm][Palatino Linotype]
> >> [features={default, quality}]
> >> \setupbodyfont[palatino]
> >>
> >> \starttext
> >> Je{\red ff}, the o{\red ffi}ce on the {\red fi}rst {\red fl}oor
> >> is o{\red ffl}ine.
> >> \stoptext
> >>
> >> What is happening here?
> >>
> >
> > Any idea how to properly colorize those ligatures?
> 
> update

Wow! It works now, thanks a lot!

Jan

___
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] Ligature color is not reliable

2016-04-11 Thread Hans Hagen

On 4/11/2016 9:06 PM, Jan Tosovsky wrote:

On 2016-04-09 Jan Tosovsky wrote:


for an illustration I wanted to colorize all ligatures, but the
following method is not reliable for three character ligatures
- which ends up black.

While tested with Palatino, it can be simulated even with
a default font (however there are missing ffi and ffl ligatures).

\definefontfamily[palatino][rm][Palatino Linotype]
[features={default, quality}]
\setupbodyfont[palatino]

\starttext
Je{\red ff}, the o{\red ffi}ce on the {\red fi}rst {\red fl}oor
is o{\red ffl}ine.
\stoptext

What is happening here?



Any idea how to properly colorize those ligatures?


update

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: 038 477 53 69 | 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] \startuseMPgraphic

2016-04-11 Thread Meer, Hans van der
But why should typing \MPcolor{\MPvar{color}}be necessary or useful when 
\MPvar(color) obviously is sufficient?
Or is there a special reason for the nested macros?

> On 11 Apr 2016, at 19:16, Aditya Mahajan  wrote:
> 
> On Mon, 11 Apr 2016, Meer, Hans van der wrote:
> 
>> 
>> On 11 Apr 2016, at 16:17, Alan BRASLAU 
>> > wrote:
>> 
>> Remember that ConTeXt colors can be accessed in MP as
>> \MPcolor{orange}
>> 
>> Alan
>> 
>> However with the snippet below I see the default black with MPcolor and the 
>> wanted red with \MPvar. Thus?
>> 
>> Hans van der Meer
>> 
>> \starttext
>> \startuseMPgraphic{example1}{color}
>>   pickup pencircle scaled 1mm;
>>   draw unitsquare scaled 1cm
>>withcolor \MPcolor{color};
> 
> This is looking for a color named 'color'. You need \MPcolor{\MPvar{color}}.
> 
> 
>> \stopuseMPgraphic
>> \startuseMPgraphic{example2}{color}
>>   pickup pencircle scaled 1mm;
>>   draw unitsquare scaled 1cm
>>withcolor \MPvar{color};
>> \stopuseMPgraphic
>> \useMPgraphic{example1}{color=red}
>> \useMPgraphic{example2}{color=red}
>> \stoptext
> 
> Aditya

Hans van der Meer




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

2016-04-11 Thread Meer, Hans van der
Wolfgang, Hans,
Thanks for your explanations.
Hans van der Meer

On 11 Apr 2016, at 19:10, Wolfgang Schuster 
> wrote:

Meer, Hans van der
11. April 2016 um 18:49


Could be of course. But the question is: from where the counterintuitive 
behavioud of \hfil and \hfil?
It is my nature to be not satisfied until I know ;-)
It’s easy to explain on the following example.

 begin example
\starttext

\hfil Text\hfil

\hfill Text\hfill

\stoptext
 end example

At the end of a paragraph TeX removes the last skip and inserts the 
\parskipfill [1] value which is by default "0pt plus 1fil".

For the first text line this results in the expected output but not for the 
second line because the inserted “fil” is smaller than the needed “fill”. You 
can check this when you change the \parskipfill stretchability from fil to fill:

 begin example
\starttext

\hfill Text\hfill

\start \parfillskip = 0pt plus 1 fill
\hfill Text\hfill \par
\stop

\stoptext
 end example

[1] https://www.tug.org/utilities/plain/cseq.html#parfillskip-rp

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
___

met vriendelijke groet
Hans van der Meer




___
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] Ligature color is not reliable

2016-04-11 Thread Jan Tosovsky
On 2016-04-09 Jan Tosovsky wrote:
> 
> for an illustration I wanted to colorize all ligatures, but the
> following method is not reliable for three character ligatures 
> - which ends up black.
> 
> While tested with Palatino, it can be simulated even with 
> a default font (however there are missing ffi and ffl ligatures).
> 
> \definefontfamily[palatino][rm][Palatino Linotype]
> [features={default, quality}]
> \setupbodyfont[palatino]
> 
> \starttext
> Je{\red ff}, the o{\red ffi}ce on the {\red fi}rst {\red fl}oor 
> is o{\red ffl}ine.
> \stoptext
> 
> What is happening here?
> 

Any idea how to properly colorize those ligatures?

Thanks, Jan

___
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] Weird background colors in autogenerated index

2016-04-11 Thread Jan Tosovsky
On 2016-04-10 Hans Hagen wrote:
> On 4/10/2016 11:26 PM, Pablo Rodriguez wrote:
> > On 04/10/2016 11:00 PM, Jan Tosovsky wrote:
> >> On 2016-04-10 Hans Hagen wrote:
> >>> On 4/9/2016 11:22 PM, Jan Tosovsky wrote:
> 
>  since LuaTeXt 0.81 my back-of-the-book index (register) is
>  with generated strange background colors. The index title
>  is typeset in yellowish background and the left column of
>  the last index page has a blue background, see the attachment.
> 
>  ... It was fine in the version 0.80.
> >>>
> >>> no example
> >
> > here you have the minimal sample:
> >
> >\showgrid
> >\starttext
> >a\index{b}
> >\completeindex
> >\stoptext
> >
> > Comment the first line and colors background colors will disappear.

a good catch, Pablo, thanks.

> indeed, it's tracing related (no bug)

My idea is to have a single PDF source to showcase some ConTeXt features, where 
displaying the grid is handy, yet allow disabling the grid on demand. 

So any visible \showgrid related issues, which cannot be switched off together 
with the grid layer, are unacceptable ;-)

Is there any chance to improve this a bit?

Thanks, Jan

___
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] \startuseMPgraphic

2016-04-11 Thread Aditya Mahajan

On Mon, 11 Apr 2016, Meer, Hans van der wrote:



On 11 Apr 2016, at 16:17, Alan BRASLAU 
> wrote:

Remember that ConTeXt colors can be accessed in MP as
\MPcolor{orange}

Alan

However with the snippet below I see the default black with MPcolor and the 
wanted red with \MPvar. Thus?

Hans van der Meer

\starttext
 \startuseMPgraphic{example1}{color}
   pickup pencircle scaled 1mm;
   draw unitsquare scaled 1cm
withcolor \MPcolor{color};


This is looking for a color named 'color'. You need 
\MPcolor{\MPvar{color}}.




 \stopuseMPgraphic
 \startuseMPgraphic{example2}{color}
   pickup pencircle scaled 1mm;
   draw unitsquare scaled 1cm
withcolor \MPvar{color};
 \stopuseMPgraphic
 \useMPgraphic{example1}{color=red}
 \useMPgraphic{example2}{color=red}
\stoptext


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] framedtext

2016-04-11 Thread Wolfgang Schuster

Meer, Hans van der 
11. April 2016 um 18:49


Could be of course. But the question is: from where the 
counterintuitive behavioud of \hfil and \hfil?

It is my nature to be not satisfied until I know ;-)

It's easy to explain on the following example.

 begin example
\starttext

\hfil Text\hfil

\hfill Text\hfill

\stoptext
 end example

At the end of a paragraph TeX removes the last skip and inserts the 
\parskipfill [1] value which is by default "0pt plus 1fil".


For the first text line this results in the expected output but not for 
the second line because the inserted "fil" is smaller than the needed 
"fill". You can check this when you change the \parskipfill 
stretchability from fil to fill:


 begin example
\starttext

\hfill Text\hfill

\start \parfillskip = 0pt plus 1 fill
\hfill Text\hfill \par
\stop

\stoptext
 end example

[1] https://www.tug.org/utilities/plain/cseq.html#parfillskip-rp

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] Fourier install fonts

2016-04-11 Thread Hans Hagen

On 4/11/2016 12:43 PM, Fabrice Couvreur wrote:

Hi,
With Latex, just do it  :

\usepackage[T1]{fontenc} \usepackage{fourier}

I'm confused about how to do it with Context.
Thanks for your help.


you need a typescript file for it an dit being 8 bit fonts you also need 
a virtual font definition file (like the px, tx and mathdesign fonts 
have) ... no big deal (one time job) but someone has to do it

(so far no one needed fourier i guess)

Hans



-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: 038 477 53 69 | 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] Interactionmenu not creating a button for the final page

2016-04-11 Thread Hans Hagen

On 4/11/2016 9:47 AM, Brian Ballsun-Stanton wrote:


it seems that the interactionmenu doesn't have a button for the final
page. I'm assuming I did something wrong, but I'm not quite sure what it
is.


it's a bug in subpages (reference needs page offset) ... fixed in next 
upload


Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: 038 477 53 69 | 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] framedtext

2016-04-11 Thread Hans Hagen

On 4/11/2016 6:49 PM, Meer, Hans van der wrote:



On 11 Apr 2016, at 18:13, Alan BRASLAU > wrote:

Would it not be better to use ConTeXt alignment, rather than the TeX
primitives \hfil and \hfill?

\startframedtext[left][frame=on,offset=0pt,width=broad,align=flushleft]
left
\stopframedtext


Could be of course. But the question is: from where the counterintuitive
behavioud of \hfil and \hfil?
It is my nature to be not satisfied until I know ;-)


because internally the framed align can inject \hfil \hfill \hss or 
whatever was decided best ... it's already complex enough to write 
macros like \framed that adapt to all cases users throw at it so the 
options (like align) are there for a reason


if you don't want that you need to wrap your stuff in a box in which 
case you can do inside that box what you like


Hans

(you can use \showmakeup to see what is in a \framed box)


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: 038 477 53 69 | 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] framedtext

2016-04-11 Thread Meer, Hans van der

On 11 Apr 2016, at 18:13, Alan BRASLAU 
> wrote:

Would it not be better to use ConTeXt alignment, rather than the TeX
primitives \hfil and \hfill?

\startframedtext[left][frame=on,offset=0pt,width=broad,align=flushleft]
left
\stopframedtext

Could be of course. But the question is: from where the counterintuitive 
behavioud of \hfil and \hfil?
It is my nature to be not satisfied until I know ;-)

Hans van der Meer




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

2016-04-11 Thread Alan BRASLAU
Would it not be better to use ConTeXt alignment, rather than the TeX
primitives \hfil and \hfill?

\starttext

\startframedtext[left][frame=on,offset=0pt,width=broad,align=flushleft]
left
\stopframedtext

\startframedtext[middle][frame=on,offset=0pt,width=broad,align=middle]
centered
\stopframedtext

\startframedtext[right][frame=on,offset=0pt,width=broad,align=flushright]
right
\stopframedtext

\stoptext





On Mon, 11 Apr 2016 13:28:47 +0300
Mari Voipio  wrote:

> On Mon, Apr 11, 2016 at 1:08 PM, Meer, Hans van der
>  wrote:
> 
> > \startframedtext[middle][frame=on,offset=0pt,width=broad]
> > \hfil centered\hfil
> > \stopframedtext
> > \startframedtext[middle][frame=on,offset=0pt,width=broad]
> > \hfill centered\hfill
> > \stopframedtext
> 
> One has \hfil with one l and the other has \hfill with two l:s. \hfil
> with one l seems to produce centering, while \hfill with two l:s makes
> the text end up on the right.
> 
> Don't know if this is a feature or a bug, but this is the reason to
> why those lines differ.

___
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] RTL section heads

2016-04-11 Thread Mohammad Hossein Bateni
Thanks, Hans!  This does solve the problem with the list of numbers.  And
actually if I add a numberstyle field, I can the section heads the way I
like.  Here is the setup that worked.  (I will update Wiki later.)

\setupdirections[bidi=global,method=two]
\setupalign[r2l]

\def\LTR#1{{\lefttoright#1}}
\def\leftpersiandecimals#1{\LTR{\persiandecimals{#1}}}
\defineconversion[leftpersiandecimals][\leftpersiandecimals]
\setuphead[chapter,title,section,subject]
[conversion=leftpersiandecimals,numberstyle=\righttoleft]

\defineseparatorset[dashsep][-,-,-,-]
\setuphead[section][sectionseparatorset=dashsep]

On Mon, Apr 11, 2016 at 10:46 AM, Hans Hagen  wrote:

> On 4/11/2016 4:25 AM, Mohammad Hossein Bateni wrote:
>
>> Hans & Wolfgang,
>>
>> Do you have suggestions here?  How can I get the behavior I want for the
>> section head numbers?
>>
>> In fact, the following may be quite relevant.
>>
>> \usemodule[simplefonts]
>> \setmainfont[ALM Fixed][features=arabic,range=arabic]
>>
>> \setupdirections[bidi=global,method=default]
>> \setupalign[r2l]
>>
>> \starttext
>>
>> اعداد ۱، ۲، ۳ و ۴ را در نظر بگیرید.
>>
>> اعداد 1، 2، 3 و 4 را در نظر بگیرید.
>>
>> اعداد 1, 2, 3 و 4 را در نظر بگیرید.
>>
>> \stoptext
>>
>>
>> I expect the numbers 1, 2, 3 and 4 to appear in the same order from
>> right to left.  However, the visual order that I observe (regardless of
>> whether I use Persian digits or English digits, or whether I use Persian
>> or English commas) is 4, 1, 2, 3 (from left to right).  Is this a bug in
>> the bidi code?  If so, are there any workarounds?
>>
>
> method=two
>
> Thanks,
>> Hossein
>>
>> On Fri, Apr 8, 2016 at 5:20 PM, Mohammad Hossein Bateni
>> > wrote:
>>
>> Hi,
>>
>> This is concerning an RTL text.  I have one chapter and 10 sections
>> under that.  My goal is to achieve the following.
>> 1) The number 10 should appear correctly with '1' visually to the
>> left of '0'.
>> 2) The chapter number should visually appear to the right of the
>> section number.
>> 3) Chapter and section numbers should be separated with a dash.
>>   (This is ignored in this email and I will follow up about it in
>> another thread.  To get a minimal working example, I also do not try
>> to change the numbers to use Persian digits.)
>>
>> In particular, the headings will be visually something like the
>> following (aligned to the right).
>> elpmas 1
>> txet 1-1
>> txet 2-1
>> txet 3-1
>> ...
>> txet 10-1
>>
>> Here's the first attempt.
>>
>> %% Attempt 1
>> \setupalign[r2l]
>>
>> \starttext
>> \placecontent
>>
>> \chapter{sample}
>> \dorecurse{10}{\section{text}}
>> \stoptext
>>
>> The result is:
>> elpmas 1
>> txet 1-1
>> ...
>> txet 01-1
>>
>>
>> Then I add "\setupdirections[bidi=global,method=default]" to the
>> beginning and I get the most strange result (number right-aligned
>> but texts left-aligned):
>> sample1
>> text   1.1
>> ...
>> text 1.10
>>
>>
>> A third attempt gives almost what I want (without period as the
>> separator).
>>
>> %% Attempt 3
>> \setupalign[r2l]
>>
>> \def\LTR#1{{\lefttoright#1}}
>> \def\leftnumbers#1{\LTR{\numbers{#1}}}
>> \defineconversion[leftnumbers][\leftnumbers]
>> \setuphead[chapter,title,section,subject] [conversion=leftnumbers]
>>
>> \starttext
>> \placecontent
>>
>> \chapter{sample}
>> \dorecurse{10}{\section{text}}
>> \stoptext
>>
>>
>> The big problem is that in my RTL documents, I always have the
>> setupdirections command, which messes things up here.  (This makes
>> it difficult to one section name with English title, which should
>> still be typeset on the right-hand side of the page.)  Note that in
>> attempt 2 above, there were two issues:
>> (1) Text and numbers appeared on the two far ends of the screen
>> instead of being close to each other.  This does not happen when I
>> use Farsi text.
>> (2) Chapter number appears to the left of section number.
>>
>>
>> %% Attempt 5
>> \usemodule[simplefonts]
>> \setmainfont[ALM Fixed][features=arabic,range=arabic]
>>
>> \setupdirections[bidi=global,method=default]
>> \setupalign[r2l]
>>
>> \starttext
>> \placecontent
>>
>> \chapter{نمونه}
>> \dorecurse{10}{\section{متن}}
>> \stoptext
>>
>>
>> Interestingly the table of contents looks fine if I put the number
>> inside an LTR macro; still in the main body, the section heads are
>> typeset incorrectly.
>>
>> %% Attempt 6
>> \usemodule[simplefonts]
>> \setmainfont[ALM Fixed][features=arabic,range=arabic]
>>
>> \setupdirections[bidi=global,method=default]
>> \setupalign[r2l]
>>
>> \def\LTR#1{{\lefttoright#1}}
>>

Re: [NTG-context] RTL section heads

2016-04-11 Thread Hans Hagen

On 4/11/2016 4:25 AM, Mohammad Hossein Bateni wrote:

Hans & Wolfgang,

Do you have suggestions here?  How can I get the behavior I want for the
section head numbers?

In fact, the following may be quite relevant.

\usemodule[simplefonts]
\setmainfont[ALM Fixed][features=arabic,range=arabic]

\setupdirections[bidi=global,method=default]
\setupalign[r2l]

\starttext

اعداد ۱، ۲، ۳ و ۴ را در نظر بگیرید.

اعداد 1، 2، 3 و 4 را در نظر بگیرید.

اعداد 1, 2, 3 و 4 را در نظر بگیرید.

\stoptext


I expect the numbers 1, 2, 3 and 4 to appear in the same order from
right to left.  However, the visual order that I observe (regardless of
whether I use Persian digits or English digits, or whether I use Persian
or English commas) is 4, 1, 2, 3 (from left to right).  Is this a bug in
the bidi code?  If so, are there any workarounds?


method=two


Thanks,
Hossein

On Fri, Apr 8, 2016 at 5:20 PM, Mohammad Hossein Bateni
> wrote:

Hi,

This is concerning an RTL text.  I have one chapter and 10 sections
under that.  My goal is to achieve the following.
1) The number 10 should appear correctly with '1' visually to the
left of '0'.
2) The chapter number should visually appear to the right of the
section number.
3) Chapter and section numbers should be separated with a dash.
  (This is ignored in this email and I will follow up about it in
another thread.  To get a minimal working example, I also do not try
to change the numbers to use Persian digits.)

In particular, the headings will be visually something like the
following (aligned to the right).
elpmas 1
txet 1-1
txet 2-1
txet 3-1
...
txet 10-1

Here's the first attempt.

%% Attempt 1
\setupalign[r2l]

\starttext
\placecontent

\chapter{sample}
\dorecurse{10}{\section{text}}
\stoptext

The result is:
elpmas 1
txet 1-1
...
txet 01-1


Then I add "\setupdirections[bidi=global,method=default]" to the
beginning and I get the most strange result (number right-aligned
but texts left-aligned):
sample1
text   1.1
...
text 1.10


A third attempt gives almost what I want (without period as the
separator).

%% Attempt 3
\setupalign[r2l]

\def\LTR#1{{\lefttoright#1}}
\def\leftnumbers#1{\LTR{\numbers{#1}}}
\defineconversion[leftnumbers][\leftnumbers]
\setuphead[chapter,title,section,subject] [conversion=leftnumbers]

\starttext
\placecontent

\chapter{sample}
\dorecurse{10}{\section{text}}
\stoptext


The big problem is that in my RTL documents, I always have the
setupdirections command, which messes things up here.  (This makes
it difficult to one section name with English title, which should
still be typeset on the right-hand side of the page.)  Note that in
attempt 2 above, there were two issues:
(1) Text and numbers appeared on the two far ends of the screen
instead of being close to each other.  This does not happen when I
use Farsi text.
(2) Chapter number appears to the left of section number.


%% Attempt 5
\usemodule[simplefonts]
\setmainfont[ALM Fixed][features=arabic,range=arabic]

\setupdirections[bidi=global,method=default]
\setupalign[r2l]

\starttext
\placecontent

\chapter{نمونه}
\dorecurse{10}{\section{متن}}
\stoptext


Interestingly the table of contents looks fine if I put the number
inside an LTR macro; still in the main body, the section heads are
typeset incorrectly.

%% Attempt 6
\usemodule[simplefonts]
\setmainfont[ALM Fixed][features=arabic,range=arabic]

\setupdirections[bidi=global,method=default]
\setupalign[r2l]

\def\LTR#1{{\lefttoright#1}}
\def\leftnumbers#1{\LTR{\numbers{#1}}}
\defineconversion[leftnumbers][\leftnumbers]
\setuphead[chapter,title,section,subject] [conversion=leftnumbers]

\starttext
\placecontent

\chapter{نمونه}
\dorecurse{10}{\section{متن}}
\stoptext


I guess the solution is to get the entire section head number string
(e.g., 1.10) to have RTL direction, however, each individual number
string inside (say, 1 or 10) should be written LTR.  How can this be
achieved?

The six TeX files (with corresponding PDF outputs) are attached.

BTW this is using ConTeXt ver: 2016.04.01 13:01 MKIV beta fmt:
2016.4.7 int: english/english, running LuaTeX, Version beta-0.90.0
(TeX Live 2016) on Mac OS X.

Thanks a lot,
—MHB





--

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: 038 477 53 69 | www.pragma-ade.com | www.pragma-pod.nl

Re: [NTG-context] automatically "smashing" È in xml typesetting

2016-04-11 Thread Hans Hagen

On 4/11/2016 11:29 AM, mass...@fastwebnet.it wrote:

Hello list,
I'm typesetting italian text that contains "E" letters with a grave accent,
like this: "È".

In my "body font environment" the interline space is narrow and those
"È" make their lines taller, making every following line move downwards.

The problem is easily solvable putting "\smash" before "È".

But my sources are XML and typesetting is done through xmlsetups,
so I'm looking for an automatic way to replace every "È" in the text
with "\smash{È}".
Is it possible?


\definefontfeature[default][default][dimensions={0,1.9,0}]

\starttext
\showglyphs
\strut g È\par
\strut g E\par
\strut g È\par
\strut g E\par
\strut g È\par
\strut g E\par
\stoptext


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: 038 477 53 69 | 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] \startuseMPgraphic

2016-04-11 Thread Meer, Hans van der

On 11 Apr 2016, at 16:17, Alan BRASLAU 
> wrote:

Remember that ConTeXt colors can be accessed in MP as
\MPcolor{orange}

Alan

However with the snippet below I see the default black with MPcolor and the 
wanted red with \MPvar. Thus?

Hans van der Meer

\starttext
  \startuseMPgraphic{example1}{color}
pickup pencircle scaled 1mm;
draw unitsquare scaled 1cm
 withcolor \MPcolor{color};
  \stopuseMPgraphic
  \startuseMPgraphic{example2}{color}
pickup pencircle scaled 1mm;
draw unitsquare scaled 1cm
 withcolor \MPvar{color};
  \stopuseMPgraphic
  \useMPgraphic{example1}{color=red}
  \useMPgraphic{example2}{color=red}
\stoptext




mpcolor.pdf
Description: mpcolor.pdf
___
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] \startuseMPgraphic

2016-04-11 Thread Alan BRASLAU
On Mon, 11 Apr 2016 22:10:02 +0900
Jeong Dal  wrote:

> BTW, if I change “orange” to “red” or “green”, it is working fine. I
> think that  “orange” is not the predefined color. There is no color
> “orange” in the  MetaFun manual either.

Defined MP colors are:

color black, white, red, green, blue, cyan, magenta, yellow

As a "bonus", orange is defined by default for ConTeXt in
colo-imp-rgb.mkiv
(it is also defined in colo-imp-x11.mkiv, etc.)

Remember that ConTeXt colors can be accessed in MP as
\MPcolor{orange}

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] \startuseMPgraphic

2016-04-11 Thread Wolfgang Schuster

Meer, Hans van der 
11. April 2016 um 15:30
Thanks Wolfgang.
It appears my memory did some "wishful thinking" in wanting 
\startuseMPgraphic{name}{key=value}. Although that would have been nice.
You get a document with the syntax of metapost related commands when you 
type


context --extra=setups metapost

on the command line.

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] \startuseMPgraphic

2016-04-11 Thread Meer, Hans van der
Thanks Wolfgang.
It appears my memory did some "wishful thinking" in wanting 
\startuseMPgraphic{name}{key=value}. Although that would have been nice.
Hans van der Meer

On 11 Apr 2016, at 14:42, Wolfgang Schuster 
> wrote:

Meer, Hans van der
11. April 2016 um 10:35
I seem to remember the following variations in \startuseMPgraphic.

(1) \startuseMPgraphic{name}{comma separated list of variables}
(2) \startuseMPgraphic{name}{comma separated list of key=value pairs}
In the second case one is able to set a default value to that variable, 
possibly to be overridden with \useMPgraphic{name}{key=value}.
I very much would like to specify default values on the \startuseMPgraphic 
definition of the graphic.

However, I cannot get option (2) working. Do I have a bad memory (possible of 
course ;-), Has it to be done otherwise?

\startuseMPgraphic{hans}{color}
  pickup pencircle scaled 1mm;
  draw unitsquare scaled 1cm withcolor \MPvar{color};
\stopuseMPgraphic

\setupMPvariables[hans][color=red]

\starttext

\useMPgraphic{hans}

\useMPgraphic{hans}{color=blue}

\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] \startuseMPgraphic

2016-04-11 Thread Jeong Dal
Dear Hans van der Meer,

Thank you for your sample code.
I learned how to pass the value of the variables.
BTW, if I change “orange” to “red” or “green”, it is working fine. I think that 
 “orange” is not the predefined color. There is no color “orange” in the  
MetaFun manual either.

Thank you.

Best regards, 
Dalyoung


> \starttext
> \startuseMPgraphic{myname1}{color}
>  pickup pencircle scaled 1mm;
>  draw unitsquare scaled 1cm withcolor \MPvar{color};
> \stopuseMPgraphic
> 
> \startuseMPgraphic{myname2}{color=red}
>  pickup pencircle scaled 1mm;
>  draw unitsquare scaled 1cm withcolor \MPvar{color};
> \stopuseMPgraphic
> 
> \useMPgraphic{myname1}{color=blue}
> \useMPgraphic{myname2}{color=orange}
> 
> \stoptext
> 
> Hans van der Meer
> 

___
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] \startuseMPgraphic

2016-04-11 Thread Wolfgang Schuster

Meer, Hans van der 
11. April 2016 um 10:35
I seem to remember the following variations in \startuseMPgraphic.

(1) \startuseMPgraphic{name}{comma separated list of variables}
(2) \startuseMPgraphic{name}{comma separated list of key=value pairs}
In the second case one is able to set a default value to that 
variable, possibly to be overridden with \useMPgraphic{name}{key=value}.
I very much would like to specify default values on the 
\startuseMPgraphic definition of the graphic.


However, I cannot get option (2) working. Do I have a bad memory 
(possible of course ;-), Has it to be done otherwise?
In the example below the graphic myname1 is ok, but myname2 gives the 
following error:

metapost > error:
>> orange
! Improper type.

   ;
<*> ...raw unitsquare scaled 1cm withcolor orange;

minimal example:

\starttext
\startuseMPgraphic{myname1}{color}
  pickup pencircle scaled 1mm;
  draw unitsquare scaled 1cm withcolor \MPvar{color};
\stopuseMPgraphic

\startuseMPgraphic{myname2}{color=red}
  pickup pencircle scaled 1mm;
  draw unitsquare scaled 1cm withcolor \MPvar{color};
\stopuseMPgraphic

\useMPgraphic{myname1}{color=blue}
\useMPgraphic{myname2}{color=orange}

\stoptext

\startuseMPgraphic{hans}{color}
  pickup pencircle scaled 1mm;
  draw unitsquare scaled 1cm withcolor \MPvar{color};
\stopuseMPgraphic

\setupMPvariables[hans][color=red]

\starttext

\useMPgraphic{hans}

\useMPgraphic{hans}{color=blue}

\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] Fourier install fonts

2016-04-11 Thread Fabrice Couvreur
Hi,
With Latex, just do it :

\usepackage[T1]{fontenc}\usepackage{fourier}

I'm confused about how to do it with Context.
Thanks for your help.

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] framedtext

2016-04-11 Thread Meer, Hans van der

> On 11 Apr 2016, at 12:28, Mari Voipio  wrote:
>
> On Mon, Apr 11, 2016 at 1:08 PM, Meer, Hans van der  
> wrote:
>
>> \startframedtext[middle][frame=on,offset=0pt,width=broad]
>> \hfil centered\hfil
>> \stopframedtext
>> \startframedtext[middle][frame=on,offset=0pt,width=broad]
>> \hfill centered\hfill
>> \stopframedtext
>
> One has \hfil with one l and the other has \hfill with two l:s. \hfil
> with one l seems to produce centering, while \hfill with two l:s makes
> the text end up on the right.
>
> Don't know if this is a feature or a bug, but this is the reason to
> why those lines differ.

Indeed, but that is just what puzzles me and why I posted my question.
\hfill is stronger than \hfil and thus it seems all the more strange that the 
left and right \hfill do not produce the same centering as the \hfil's do.

Hans van der Meer





framedtext-middle.pdf
Description: framedtext-middle.pdf
___
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] framedtext

2016-04-11 Thread Mari Voipio
On Mon, Apr 11, 2016 at 1:08 PM, Meer, Hans van der  wrote:

> \startframedtext[middle][frame=on,offset=0pt,width=broad]
> \hfil centered\hfil
> \stopframedtext
> \startframedtext[middle][frame=on,offset=0pt,width=broad]
> \hfill centered\hfill
> \stopframedtext

One has \hfil with one l and the other has \hfill with two l:s. \hfil
with one l seems to produce centering, while \hfill with two l:s makes
the text end up on the right.

Don't know if this is a feature or a bug, but this is the reason to
why those lines differ.



Mari
___
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] framedtext

2016-04-11 Thread Meer, Hans van der
I am getting an unexpected results with framedtexts.Why is the second 
"centered" not centered?

\starttext
\startframedtext[left][frame=on,offset=0pt,width=broad]
left\hfill
\stopframedtext
\startframedtext[middle][frame=on,offset=0pt,width=broad]
\hfil centered\hfil
\stopframedtext
\startframedtext[middle][frame=on,offset=0pt,width=broad]
\hfill centered\hfill
\stopframedtext
\startframedtext[right][frame=on,offset=0pt,width=broad]
\hfill right
\stopframedtext
\startframedtext[none][frame=on,offset=0pt,width=broad]
none
\stopframedtext
\stoptext

This is LuaTeX, Version beta-0.90.0 (TeX Live 2016)
ConTeXt  ver: 2016.04.01 13:01 MKIV beta  fmt: 2016.4.5  int: english/english

Hans van der Meer





framedtext-middle.pdf
Description: framedtext-middle.pdf
___
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] automatically "smashing" È in xml typesetting

2016-04-11 Thread massifr
Hello list,
I'm typesetting italian text that contains "E" letters with a grave accent, 
like this: "È".

In my "body font environment" the interline space is narrow and those
"È" make their lines taller, making every following line move downwards.

The problem is easily solvable putting "\smash" before "È".

But my sources are XML and typesetting is done through xmlsetups,
so I'm looking for an automatic way to replace every "È" in the text 
with "\smash{È}".
Is it possible?

Thanks, Massi

___
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] \startuseMPgraphic

2016-04-11 Thread Meer, Hans van der
I seem to remember the following variations in \startuseMPgraphic.

(1) \startuseMPgraphic{name}{comma separated list of variables}
(2) \startuseMPgraphic{name}{comma separated list of key=value pairs}
In the second case one is able to set a default value to that variable, 
possibly to be overridden with \useMPgraphic{name}{key=value}.
I very much would like to specify default values on the \startuseMPgraphic 
definition of the graphic.

However, I cannot get option (2) working. Do I have a bad memory (possible of 
course ;-), Has it to be done otherwise?
In the example below the graphic myname1 is ok, but myname2 gives the following 
error:
metapost> error:
>> orange
! Improper type.

   ;
<*> ...raw unitsquare scaled 1cm withcolor orange;

minimal example:

\starttext
\startuseMPgraphic{myname1}{color}
  pickup pencircle scaled 1mm;
  draw unitsquare scaled 1cm withcolor \MPvar{color};
\stopuseMPgraphic

\startuseMPgraphic{myname2}{color=red}
  pickup pencircle scaled 1mm;
  draw unitsquare scaled 1cm withcolor \MPvar{color};
\stopuseMPgraphic

\useMPgraphic{myname1}{color=blue}
\useMPgraphic{myname2}{color=orange}

\stoptext

Hans van der Meer

___
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] Interactionmenu not creating a button for the final page

2016-04-11 Thread Brian Ballsun-Stanton
Given the following code:

\enableregime [utf]
> \mainlanguage [en]
> \definepapersize[sheet][width=1280px, height=960px]
> \setuppapersize[sheet][sheet]
> \setupexternalfigures[directory={img,
> /home/ubuntu/EGU2016-Presentation,
> /home/ubuntu/ConTeXt/img}]
> \usemodule[simplefonts]
> \setmainfont[Adventor][expansion=quality,protrusion=quality]
> \setupcolors[state=start]
> \definecolor[faimsblue][h=1B3E93]
> \definecolor[faimsorange][h=F68E1E]
> \setuphead[section][placehead=yes, page=yes, number=no, align=middle,
> style={\setupbodyfont[40pt]}]
>
> \setuplayout[
> backspace=.01\pagewidth,
> header=0pt,
> footer=.02\pageheight,
> topspace=.185\pageheight,
> cutspace-.1\pagewidth,
> width=.87\pagewidth,
> height=.798\pageheight,
> bottomspace=.8cm,
> bottom=12pt
> ]
> \setuppagenumbering[location=]
> \setupinteraction
>   [page=yes,
>color=faimsblue,
>contrastcolor=faimsorange,
>menu=on,
>state=start]
> \setupsubpagenumber
>   [way=bytext,
>state=start]
> \startinteractionmenu[bottom]
> {\interactionbar[alternative=f,width=\makeupwidth,height=2ex]}
> \stopinteractionmenu
> \starttext
> \input knuth
> \section{section 1}
> \input knuth
>
> \section{section 2}
> \input knuth
>
>
> \section{section 3}
> \input knuth
>
>
> \section{section 4}
> \input knuth
> \stoptext


(used in a real presentation:
http://context.fedarch.org/Context/presentation.pdf with environment at
https://github.com/FAIMS/EGU2016-Presentation/blob/master/envpresentation.tex
)

it seems that the interactionmenu doesn't have a button for the final page.
I'm assuming I did something wrong, but I'm not quite sure what it is.
___
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] Redirect compilation to another .pdf?

2016-04-11 Thread Procházka Lukáš Ing .

Hello,

On Sun, 10 Apr 2016 23:43:30 +0200, Hans Hagen  wrote:


On 4/10/2016 9:49 PM, Lukáš Procházka wrote:


- the option "--jobname" is not listed when you type "context.exe" (=
help), so it seems like a "hidden" option;


it's not supported as engine flag


- Suggestion: would it be possible to use "--result=OutputFileName" as
the name for the output stream immediately,
 i.e. not to produce "default PDF file" + rename it to
"OutputFileName" (= --result),
 but to use the "OutputFileName" initially as the output stream?


maybe ... but it has to wait till after tex live code freeze (because it
demands an extra flag to the engine --output-file

so remind me in a month or so


I will ... It would be very handy.

Best regards,

Lukas


Hans



--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz
Bezová 1658
147 14 Praha 4

Tel: +420 241 096 751
Fax: +420 244 461 038

___
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] How to embed formatting commands into the syntax highlight code generated by scite module?

2016-04-11 Thread 李延瑞
Hi,

i want to embed some formatting commands into code highlighted with scite
or vim module, but i do not find its option like "escape=yes". Is there a
way to do it?

-- 
Best regards,

Li Yanrui (李延瑞)
___
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
___