Re: [NTG-context] mkiv MathML bug?

2019-06-27 Thread Duncan Hothersall
On Thu, 27 Jun 2019, 20:46 Hans Hagen,  wrote:

> On 6/27/2019 6:35 PM, Duncan Hothersall wrote:
> > I'm not sure this is something more general in the MathML module or if
> > it's specific to the vertical bar in this particular context, but here
> > is a minimal example showing that the "=0" at the end of the equation is
> > disappearing:
>
> there is indeed some issue, i'll look into it
>

Thanks Hans.

>
>
> you can also try
>
>  
>B
>C
>

I did try that, it didn't seem to work quite as expected either.

Thanks again.

Duncan

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


Re: [NTG-context] mkiv MathML bug?

2019-06-27 Thread Hans Hagen

On 6/27/2019 6:35 PM, Duncan Hothersall wrote:
I'm not sure this is something more general in the MathML module or if 
it's specific to the vertical bar in this particular context, but here 
is a minimal example showing that the "=0" at the end of the equation is 
disappearing:


there is indeed some issue, i'll look into it


\usemodule[mathml]
\starttext
\xmlprocessdata{}{
         
           A
           
             B
             |
             C
           
           =
           0
         
       }{}
\stoptext


you can also try


  B
  C



And here is a workaround using  instead of  for the vertical 
bar which makes the "=0" magically reappear again:


\usemodule[mathml]
\starttext
\xmlprocessdata{}{
         
           A
           
             B
             |
             C
           
           =
           0
         
       }{}
\stoptext

Flagged up mainly in case it is a bigger problem than just vertical bars 
in this specific context.


Thanks,

Duncan


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




--

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Strange behavior in somewhat complex layout (again)

2019-06-27 Thread Wolfgang Schuster

Andres Conrado Montoya schrieb am 27.06.2019 um 20:53:

Wolfgang... Thank you, man. Thank you so very much. This works perfectly.

As I understand it from your correction, my mistake was that I was not 
doing the page break before everything else, as I should, because in 
any case there will always be a page break in my layout. Then, let the 
rest of the algorithm decide if there will be a left or right page, 
headers and footers, etc. Am I correct?

Yes, it's important to do the page check before the section is inserted.

When you use the before key you perform the check after \startchapter 
finished the previous page and removed the header line, when you insert 
now the colored page the header setting is used for this page and one 
the following page with the section title you get the unwanted header text.


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


Re: [NTG-context] Strange behavior in somewhat complex layout (again)

2019-06-27 Thread Andres Conrado Montoya
Wolfgang... Thank you, man. Thank you so very much. This works perfectly.

As I understand it from your correction, my mistake was that I was not
doing the page break before everything else, as I should, because in any
case there will always be a page break in my layout. Then, let the rest of
the algorithm decide if there will be a left or right page, headers and
footers, etc. Am I correct?

Thank you again for your work.

Andrés Conrado Montoya
Andi Kú
andresconr...@gmail.com
http://sesentaycuatro.com
http://messier87.com
http://chiquitico.org

Los fines no justifican los medios, porque la medida verdadera de nuestro
carácter está dada por los medios que estamos dispuestos a utilizar, no por
los fines que proclamamos.


“You develop an instant global consciousness, a people orientation, an
intense dissatisfaction with the state of the world, and a compulsion to do
something about it. From out there on the moon, international politics look
so petty. You want to grab a politician by the scruff of the neck and drag
him a quarter of a million miles out and say, ‘Look at that, you son of a
bitch.’” — Apollo 14 astronaut Edgar Mitchell


El jue., 27 jun. 2019 a las 13:17, Wolfgang Schuster (<
wolfgang.schuster.li...@gmail.com>) escribió:

> Andres Conrado Montoya schrieb am 27.06.2019 um 19:22:
>
> Hi List, it seems my message went unnoticed, if you can help me out,
> please do. I'm an struggling with this layout.
>
> I'm trying to make something using bits and examples found here and
> elsewhere, but I'm hitting a wall. I know there's a flawed logic in my
> approach, but I can't figure it out. Any help is appreciated.
>
> Expected behavior of the following MWE:
> When starting a new chapter, check if the page is even (left page), if so,
> fill it with color, and start the chapter in the next odd page (right
> page), removing the header but leaving the footer in that start-chapter
> page; and if this is a start-chapter page, use a specific graphic overlay
> for the page, but if if not (if its a regular page), use another graphic.
>
> Result:
> The header still appears in the start-chapter page, if it comes after the
> color filled page. But, if the start-chapter page comes after a regular
> (even) page, everything works as expected (no color-filled page, no header
> in the start-chapter page).
>
> MWE:
>
> %% START MWE
>
> [...]
>
> \startsetups [chapter:before]
>\doifoddpageelse
>  {}
>  {\pushbackground[page]
> \setupbackgrounds[page][background=color,backgroundcolor=rojo]
> \page[yes,right]
>   \popbackground}
> \stopsetups
>
> \startsetups [chapter:before]
>   \page
>   \doifoddpageelse
> {}
> {\pushbackground[page]
>\setupbackgrounds[page][background=color,backgroundcolor=rojo]
>\page[yes,header,footer,right]
>  \popbackground}
> \stopsetups
>
> \setuphead[chapter]
>   [width=20em,
>   before=\directsetup{chapter:before},
>
> Apply the above setup with
>
> beforesection=\directsetup{chapter:before},
>
> 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Strange behavior in somewhat complex layout (again)

2019-06-27 Thread Wolfgang Schuster

Andres Conrado Montoya schrieb am 27.06.2019 um 19:22:
Hi List, it seems my message went unnoticed, if you can help me out, 
please do. I'm an struggling with this layout.


I'm trying to make something using bits and examples found here and 
elsewhere, but I'm hitting a wall. I know there's a flawed logic in my 
approach, but I can't figure it out. Any help is appreciated.


Expected behavior of the following MWE:
When starting a new chapter, check if the page is even (left page), if 
so, fill it with color, and start the chapter in the next odd page 
(right page), removing the header but leaving the footer in that 
start-chapter page; and if this is a start-chapter page, use a 
specific graphic overlay for the page, but if if not (if its a regular 
page), use another graphic.


Result:
The header still appears in the start-chapter page, if it comes after 
the color filled page. But, if the start-chapter page comes after a 
regular (even) page, everything works as expected (no color-filled 
page, no header in the start-chapter page).


MWE:

%% START MWE

[...]

\startsetups [chapter:before]
   \doifoddpageelse
     {}
 {\pushbackground[page]
\setupbackgrounds[page][background=color,backgroundcolor=rojo]
\page[yes,right]
      \popbackground}
\stopsetups

\startsetups [chapter:before]
  \page
  \doifoddpageelse
    {}
    {\pushbackground[page]
   \setupbackgrounds[page][background=color,backgroundcolor=rojo]
   \page[yes,header,footer,right]
 \popbackground}
\stopsetups


\setuphead[chapter]
          [width=20em,
before=\directsetup{chapter:before},

Apply the above setup with

beforesection=\directsetup{chapter:before},

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


[NTG-context] Strange behavior in somewhat complex layout (again)

2019-06-27 Thread Andres Conrado Montoya
Hi List, it seems my message went unnoticed, if you can help me out, please
do. I'm an struggling with this layout.

I'm trying to make something using bits and examples found here and
elsewhere, but I'm hitting a wall. I know there's a flawed logic in my
approach, but I can't figure it out. Any help is appreciated.

Expected behavior of the following MWE:
When starting a new chapter, check if the page is even (left page), if so,
fill it with color, and start the chapter in the next odd page (right
page), removing the header but leaving the footer in that start-chapter
page; and if this is a start-chapter page, use a specific graphic overlay
for the page, but if if not (if its a regular page), use another graphic.

Result:
The header still appears in the start-chapter page, if it comes after the
color filled page. But, if the start-chapter page comes after a regular
(even) page, everything works as expected (no color-filled page, no header
in the start-chapter page).

MWE:

%% START MWE

\definecolor[rojo][h=ED553B]
\definehighlight[rojo][color=rojo]

\startMPinclusions
numeric u ; u := 1.125pt ;
numeric i ; i := 0.125in ;
string prevChapterTitle, currentChapterTitle;
prevChapterTitle := "";
currentChapterTitle := "";
\stopMPinclusions

\startuseMPgraphic{page:background}
StartPage;
currentChapterTitle := "\namedstructurevariable{chapter}{title}";

if currentChapterTitle <> prevChapterTitle :

fill (topboundary Page -- cycle)
enlarged(0,8i)
shifted (0,-4i)
withcolor transparent(4, 0.2, \MPcolor{rojo}) ;

fill (bottomboundary Page -- cycle)
enlarged(0,1u)
shifted (0,6i)
withcolor \MPcolor{rojo} ;

prevChapterTitle := currentChapterTitle ;

else:

fill (topboundary Page -- cycle)
enlarged(0,0.25u)
shifted (0,-7i+3u)
withcolor \MPcolor{rojo} ;

fill (bottomboundary Page -- cycle)
enlarged(0,0.25u)
shifted (0,6i)
withcolor \MPcolor{rojo} ;

fi;
StopPage;
\stopuseMPgraphic

\defineoverlay
  [chapter:background]
  [\useMPgraphic{page:background}]

\setupbackgrounds[page][background=chapter:background]

\definepagebreak[firstpagebreak][yes,header]

\startsetups [chapter:before]
   \doifoddpageelse
 {}
 {\pushbackground[page]
\setupbackgrounds[page][background=color,backgroundcolor=rojo]
\page[yes,right]
  \popbackground}
\stopsetups

\setuphead[chapter]
  [width=20em,
  before=\directsetup{chapter:before},
  align={flushleft,nothyphenated,verytolerant},
  style={\tfd\sansbold},
  header=empty,
  page=yes,
  commandbefore={\blank[1.75in]},
  after={\blackrule[color=rojo,height=4pt,width=6em]\blank[1.25in]}]


\setuppagenumbering[alternative=doublesided,location=]

\setupheadertexts
[]
[{{\small\sans\getmarking[chapter]}}]
[{{\small\sans\getmarking[chapter]}}]
[]

\setupfootertexts
[]
[{\rojo{\small\sansbold\pagenumber}}]
[{\rojo{\small\sansbold\pagenumber}}]
[]

\starttext

\dorecurse{4}{%
  \startchapter[title={A chapter with a really long, long title}]
  \dorecurse{9}{\input{tufte}}
  \stopchapter
  \startchapter[title={A different chapter with a really long, long title}]
  \dorecurse{6}{\input{tufte}}
  \stopchapter}

\stoptext

%% STOP MWE

Thank you for your time.

Andrés Conrado Montoya
___
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
___


[NTG-context] mkiv MathML bug?

2019-06-27 Thread Duncan Hothersall
I'm not sure this is something more general in the MathML module or if it's
specific to the vertical bar in this particular context, but here is a
minimal example showing that the "=0" at the end of the equation is
disappearing:

\usemodule[mathml]
\starttext
\xmlprocessdata{}{

  A
  
B
|
C
  
  =
  0

  }{}
\stoptext

And here is a workaround using  instead of  for the vertical bar
which makes the "=0" magically reappear again:

\usemodule[mathml]
\starttext
\xmlprocessdata{}{

  A
  
B
|
C
  
  =
  0

  }{}
\stoptext

Flagged up mainly in case it is a bigger problem than just vertical bars in
this specific context.

Thanks,

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


Re: [NTG-context] IEEE Citation Style

2019-06-27 Thread Alan Braslau
On Thu, 27 Jun 2019 06:39:56 -0400 (EDT)
Aditya Mahajan  wrote:

> On Thu, 27 Jun 2019, Julian Gompper wrote:
> 
> > Hello everyone,
> >
> > I am currently writing a technical documentation with ConTeXt, and I 
> > would like to use the IEEE citation style.
> >
> > I have found this file on github, although it does not seem to work and 
> > it was last created in July 2017 ( 
> > https://gist.github.com/adityam/afda949f76676055e7906679599ec937 ).
> >
> > Is there a more up-to-date version available, or should I try to make my 
> > own?  
> 
> I haven't updated this style since then. If you want to use some bib types 
> that are not there, please let me know. It is relatively easy to add them 
> (once the exact style is known).

And if the bibliography rendering style is of general use
with a published specification that one can refer to
then we ought to integrate it into the core distribution.

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


Re: [NTG-context] issue with italic correction (again)

2019-06-27 Thread Pablo Rodriguez
On 6/27/19 10:54 AM, Taco Hoekwater wrote:
>> On 26 Jun 2019, at 21:53, Pablo Rodriguez wrote:
>> [...]
>> I guess I must be doing something wrong.
>
> No, it is not you.
>
> The problem is that \definefontfamily always expands its arguments
> completely, so by the time you call the body font up, it will already
> contain the actual font name instead of the macro \DefinedFont.
>
> (I had to test that for myself first)
>
> Also, it seems that \definefontfamily does not like redefinitions.
>
> (I had to test that for myself as well)

Many thanks for your detailed explanation, Taco.

I really appreciate to understand how the body font is handled in ConTeXt.

As you wrote, \setupbodyfont is only needed once. I don’t use other body
font command in almost any document. This is a special case, required to
show the difference in italic correction.

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


Re: [NTG-context] IEEE Citation Style

2019-06-27 Thread Aditya Mahajan

On Thu, 27 Jun 2019, Julian Gompper wrote:


Hello everyone,

I am currently writing a technical documentation with ConTeXt, and I 
would like to use the IEEE citation style.


I have found this file on github, although it does not seem to work and 
it was last created in July 2017 ( 
https://gist.github.com/adityam/afda949f76676055e7906679599ec937 ).


Is there a more up-to-date version available, or should I try to make my own?


I haven't updated this style since then. If you want to use some bib types 
that are not there, please let me know. It is relatively easy to add them 
(once the exact style is known).


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


Re: [NTG-context] issue with italic correction (again)

2019-06-27 Thread Taco Hoekwater


> On 26 Jun 2019, at 21:53, Pablo Rodriguez  wrote:
> 
> On 6/25/19 10:08 PM, Taco Hoekwater wrote:
>>> Op 25 jun. 2019 om 21:42 heeft Pablo Rodriguez het volgende geschreven:
>>> 
>>> BTW, I wonder why the second definition of \DesiredFont doesn’t change
>>> the font for the buffer used after it.
>> 
>> Using \switchtobodyfont instead of \setupbodyfont for all except the
>> first call should help. You may need to add a
>> \usebodyfont[mainface_corrected] as well (in the setup block). I
>> cannot actually test right now, on a mobile device...
> 
> Many thanks for your reply, Taco.
> 
> I’m afraid that I cannot make it work.
> 
> I guess I must be doing something wrong.

No, it is not you. 

The problem is that \definefontfamily always expands its arguments
completely, so by the time you call the body font up, it will already
contain the actual font name instead of the macro \DefinedFont. 

(I had to test that for myself first)

Also, it seems that \definefontfamily does not like redefinitions.

(I had to test that for myself as well)

> 
> I’d like to know which are the differences among \setupbodyfont,
> \switchtobodyfont and \usebodyfont.

Generally, you use \setupbodyfont exactly once, in the setup area. 
This sets up the fonts for the whole document, and it also sets up 
some values for the ‘global environment’ (various internals use the body 
font size, for instance).

If you do not call \setupbodyfont yourself, then ConTeXt will do an implicit

  \setupbodyfont[modern,12pt]

at the \starttext command, just to make sure there is a valid
body font defined.


If you want to use other body font definitions as well, you can use 

  \usebodyfont[mainface_corrected] % etc.

which temporarily switches to the specified body font set, but immediately
switches back to whatever was active before. It exists mostly for
cosmetic reasons. ;)


When you want to switch to any of the preloaded body font sets inside your
document, you normally would use \switchtobodyfont. This only affects the 
document text, not headers and footers, and does also not do the global setup.

You could use \setupbodyfont instead, but \switchtobodyfont is usually what 
you want, and it is also a bit faster.


Anyway, about your example: here is a version that does do the switching:

   \definefontfeature[italic][itlc=yes,textitalics=yes]
   \setupitaliccorrection[global, always]
   \starttext
   \startbuffer[chars]
   \definefontfamily
   [mainface\DesiredFont]
   [rm]
   [\DesiredFont]
   \definefontfamily
   [mainface_corrected\DesiredFont]
   [rm]
   [\DesiredFont]
   [features={italic}]
   \startTEXpage[offset=1em]
   \dorecurse{26}
   {\switchtobodyfont[mainface\DesiredFont]%
   [{\em \recurselevel}]
   [{\em \characters{\recurselevel}}]
   [{\em \Characters{\recurselevel}}]
   ({\em \characters{\recurselevel}})
   ({\em \Characters{\recurselevel}})
   \hfill
   \switchtobodyfont[mainface_corrected\DesiredFont]
   [{\em \recurselevel}]
   [{\em \characters{\recurselevel}}]
   [{\em \Characters{\recurselevel}}]
   ({\em \characters{\recurselevel}})
   ({\em \Characters{\recurselevel}})
   \par}
   \stopTEXpage
   \stopbuffer
   \def\DesiredFont{TeX Gyre Termes}
   \getbuffer[chars]
   \def\DesiredFont{TeX Gyre Pagella}
   \getbuffer[chars]
   \stoptext

Best wishes,
Taco



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


[NTG-context] IEEE Citation Style

2019-06-27 Thread Julian Gompper
Hello everyone,

I am fairly new on the mailing list, so I apologize if this topic has already 
been talked about in the past.

I am currently writing a technical documentation with ConTeXt, and I would like 
to use the IEEE citation style.

As I have read on the wiki ( 
https://wiki.contextgarden.net/Bibliography_mkiv#rendering ) and in Chapter 4.2 
of "BIBLIOGRAPHIES THE CONTEXT WAY" ( 
http://pragma-ade.nl/general/manuals/mkiv-publications.pdf ), only apa and aps 
styles are available as of now.

I have found this file on github, although it does not seem to work and it was 
last created in July 2017 ( 
https://gist.github.com/adityam/afda949f76676055e7906679599ec937 ).

Is there a more up-to-date version available, or should I try to make my own?

Best regards,
Julian___
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
___