Re: [NTG-context] Using MathTime Pro 2 fonts in ConTeXt

2022-08-13 Thread Sebastian Leonardo Molina Diaz via ntg-context
I really like the design of the characters in MathTime, TeX Gyre doesn't do
the work for m, so I would get hands on work only to make it work.

On Sat, Aug 13, 2022, 10:15 Hans Hagen via ntg-context 
wrote:

> On 8/13/2022 4:57 PM, Sebastian Leonardo Molina Diaz via ntg-context wrote:
> > Years ago it was asked if someone could provide a typescript for the
> > MathTime Pro2 fonts. However, the conversation ended nowhere, so I want
> to
> > ask how should I format a typescript to use such fonts. Below is the link
> > of the related conversation:
> >
> > https://mailman.ntg.nl/pipermail/ntg-context/2010/051611.html
> we're now living in an math unicode and math opentype universe so before
> you spend time on this: does texgyre termes works out for you
>
> Hans
>
>
> -
>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 /
> https://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : https://contextgarden.net
>
> ___
>

-- 
*Aviso legal:* El contenido de este mensaje y los archivos adjuntos son 
confidenciales y de uso exclusivo de la Universidad Nacional de Colombia. 
Se encuentran dirigidos sólo para el uso del destinatario al cual van 
enviados. La reproducción, lectura y/o copia se encuentran prohibidas a 
cualquier persona diferente a este y puede ser ilegal. Si usted lo ha 
recibido por error, infórmenos y elimínelo de su correo. Los Datos 
Personales serán tratados conforme a la Ley 1581 de 2012 y a nuestra 
Política de Datos Personales que podrá consultar en la página web 
www.unal.edu.co .* *Las opiniones, informaciones, 
conclusiones y cualquier otro tipo de dato contenido en este correo 
electrónico, no relacionados con la actividad de la Universidad Nacional de 
Colombia, se entenderá como personales y de ninguna manera son avaladas por 
la Universidad.
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] Using MathTime Pro 2 fonts in ConTeXt

2022-08-13 Thread Hans Hagen via ntg-context

On 8/13/2022 4:57 PM, Sebastian Leonardo Molina Diaz via ntg-context wrote:

Years ago it was asked if someone could provide a typescript for the
MathTime Pro2 fonts. However, the conversation ended nowhere, so I want to
ask how should I format a typescript to use such fonts. Below is the link
of the related conversation:

https://mailman.ntg.nl/pipermail/ntg-context/2010/051611.html
we're now living in an math unicode and math opentype universe so before 
you spend time on this: does texgyre termes works out for you


Hans


-
  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 / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


[NTG-context] Using MathTime Pro 2 fonts in ConTeXt

2022-08-13 Thread Sebastian Leonardo Molina Diaz via ntg-context
Years ago it was asked if someone could provide a typescript for the
MathTime Pro2 fonts. However, the conversation ended nowhere, so I want to
ask how should I format a typescript to use such fonts. Below is the link
of the related conversation:

https://mailman.ntg.nl/pipermail/ntg-context/2010/051611.html

Thanks in advance.

-- 
*Aviso legal:* El contenido de este mensaje y los archivos adjuntos son 
confidenciales y de uso exclusivo de la Universidad Nacional de Colombia. 
Se encuentran dirigidos sólo para el uso del destinatario al cual van 
enviados. La reproducción, lectura y/o copia se encuentran prohibidas a 
cualquier persona diferente a este y puede ser ilegal. Si usted lo ha 
recibido por error, infórmenos y elimínelo de su correo. Los Datos 
Personales serán tratados conforme a la Ley 1581 de 2012 y a nuestra 
Política de Datos Personales que podrá consultar en la página web 
www.unal.edu.co .* *Las opiniones, informaciones, 
conclusiones y cualquier otro tipo de dato contenido en este correo 
electrónico, no relacionados con la actividad de la Universidad Nacional de 
Colombia, se entenderá como personales y de ninguna manera son avaladas por 
la Universidad.
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] Keep the right margin in [nothyphenated, flushleft] columns

2022-08-13 Thread Marcin Ciura via ntg-context
Thank you, Denis.
\setupalign[nothyphenated,flushleft,stretch] fixes the problem of overfull
lines.
Marcin

sob., 13 sie 2022 o 00:17 Denis Maier via ntg-context 
napisał(a):

> Also stretch might be useful as an additional option for align.
>
> Denis
>
> 
> Von: ntg-context  im Auftrag von Aditya
> Mahajan via ntg-context 
> Gesendet: Freitag, 12. August 2022 23:11:21
> An: Marcin Ciura via ntg-context
> Cc: Aditya Mahajan
> Betreff: Re: [NTG-context] Keep the right margin in [nothyphenated,
> flushleft] columns
>
> On Fri, 12 Aug 2022, Marcin Ciura via ntg-context wrote:
>
> > Dear list,
> >
> > I am typesetting [nothyphenated,flushleft] text in two columns. Some
> words
> > stick through the right margin of the left column, sometimes even
> > overlapping the right column. How can I make Context obey the right
> margin?
>
> (Untested): Try adding 'tolerant' or 'verytolerant' to the align options.
>
> Aditya
>
> ___
> If your question is of interest to others as well, please add an entry to
> the Wiki!
>
> maillist : ntg-context@ntg.nl /
> https://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : https://contextgarden.net
>
> ___
>
> ___
> If your question is of interest to others as well, please add an entry to
> the Wiki!
>
> maillist : ntg-context@ntg.nl /
> https://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : https://contextgarden.net
>
> ___
>
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] Changing the caption on a split table

2022-08-13 Thread Wolfgang Schuster via ntg-context

Bruce Horrocks via ntg-context schrieb am 13.08.2022 um 10:35:

On 3 Aug 2022, at 00:26, Bruce Horrocks via ntg-context  
wrote:

I have a 5-page table placed using

\setupcaption [table] [way=bytext,prefixsegments=none]
\placetable[split]{My long table}{...}

The caption for the first table page is "Table 1a  My Long table"; for the second table page it is 
"Table 1b  My long table" and so on. I'd like to change these to be "Table 1  My Long table" then 
"Table 1 (cont'd) My long table" for the remaining pages.

I've tried \setupcaption[table][suffix={(cont'd)] but that affects all the 
pages. How can I set it for the second and subsequent pages only, please?

The solution turned out to be really simple (for small tables at least - less 
fun if you have hundreds of pages!). Just use:

\defineconversion[Contd][~,{ (cont’d)},{ (cont’d)},{ (cont’d)},{ (cont’d)},{ 
(cont’d)},
   { (cont’d)},{ (cont’d)},{ 
(cont’d)},{ (cont’d)},{ (cont’d)},
   { (cont’d)},{ (cont’d)},{ 
(cont’d)},{ (cont’d)},{ (cont’d)},
   { (cont’d)},{ (cont’d)},{ 
(cont’d)},{ (cont’d)},{ (cont’d)} ]
\setupfloatsplitting[conversion=Contd]

This results in "Table 1 My Long table", "Table 1 (cont’d) My Long table" and 
so on.


There is already a conversion for this numbering style.

\setuplabeltext [en] [continued={ (cont’d)}]

\setupfloatsplitting [conversion=continued]

Wolfgang

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] Changing the caption on a split table

2022-08-13 Thread Bruce Horrocks via ntg-context


> On 3 Aug 2022, at 00:26, Bruce Horrocks via ntg-context  
> wrote:
> 
> I have a 5-page table placed using
> 
> \setupcaption [table] [way=bytext,prefixsegments=none]
> \placetable[split]{My long table}{...}
> 
> The caption for the first table page is "Table 1a  My Long table"; for the 
> second table page it is "Table 1b  My long table" and so on. I'd like to 
> change these to be "Table 1  My Long table" then "Table 1 (cont'd) My long 
> table" for the remaining pages.
> 
> I've tried \setupcaption[table][suffix={(cont'd)] but that affects all the 
> pages. How can I set it for the second and subsequent pages only, please?

The solution turned out to be really simple (for small tables at least - less 
fun if you have hundreds of pages!). Just use:

\defineconversion[Contd][~,{ (cont’d)},{ (cont’d)},{ (cont’d)},{ (cont’d)},{ 
(cont’d)},
   { (cont’d)},{ (cont’d)},{ 
(cont’d)},{ (cont’d)},{ (cont’d)},
   { (cont’d)},{ (cont’d)},{ 
(cont’d)},{ (cont’d)},{ (cont’d)},
   { (cont’d)},{ (cont’d)},{ 
(cont’d)},{ (cont’d)},{ (cont’d)} ]
\setupfloatsplitting[conversion=Contd]

This results in "Table 1 My Long table", "Table 1 (cont’d) My Long table" and 
so on.

—
Bruce Horrocks
Hampshire, UK

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] How to do code listings & sections from XML (AsciiDoc)

2022-08-13 Thread Mojca Miklavec via ntg-context
On Fri, 12 Aug 2022 at 23:20, Aditya Mahajan wrote:
> On Fri, 12 Aug 2022, Mojca Miklavec via ntg-context wrote:
>
> > (a) I don't know how to turn program listing (verbatim code) from xml
> > to (perhaps, vim-based) syntax highlighting (but most importantly, to
> > make sure that line breaks work properly)
>
> Does something like this work:
>
> https://wiki.contextgarden.net/Verbatim_XML

Yes, awesome, this does exactly what I want, thank you very much.

I used the following code:

\usemodule[vim]
% this breaks if directory doesn't exist before
\setupvimtyping[directory=output/]
% it would be potentially useful to have some predefined vimtyping
already present in the module
\definevimtyping
[programlisting]
[syntax=]

\startluacode
function xml.functions.processprogramlisting(t)
buffers.assign("listing","\\startprogramlisting[syntax=cpp]\n"
.. tostring(xml.text(t)) .. "\n\\stopprogramlisting")
context.getbuffer { "listing" }
end
\stopluacode

\startxmlsetups xml:programlisting
\pushcatcodetable
\setcatcodetable\ctxcatcodes
\xmlfunction{#1}{processprogramlisting}
\popcatcodetable
\stopxmlsetups


Now I need to get the "cpp" and "unnumbered" part processed
automatically, so that it will work for any language:

// test.cpp:
int main()
{
return 0;
}

which would then be transformed into

\startprogramlisting[syntax=cpp,numbering=no]
int main()
{
return 0;
}
\stopprogramlisting

For some reason the syntax highlighting doesn't work on the full
document, but it works inside the minimal example, so I still need to
investigate what's going on with the full document.



On an unrelated note:

I cannot make \startnarrow[middle=1cm] (or left=... for that matter)
produce any offset on the left. I was playing with the following
code, but the frame refuses to be shifted to the right

\setupvimtyping
[before={
\startnarrow[left=1cm,before={\blank[10pt]}]
\switchtobodyfont[8pt]
\startframed
[align=flushleft,
 background=color,
 backgroundcolor=gray,
 frame=off,
 leftframe=on,
 rulethickness=2pt,
 framecolor=darkgray,
 width=local,
 offset=1ex]},
  after={\stopframed\stopnarrow}]

Hello
\startprogramlisting[syntax=cpp,numbering=yes]
int main()
{
return 0;
}
\stopprogramlisting


Mojca
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] How to do code listings & sections from XML (AsciiDoc)

2022-08-13 Thread Mojca Miklavec via ntg-context
On Fri, 12 Aug 2022 at 23:20, Aditya Mahajan wrote:
> On Fri, 12 Aug 2022, Mojca Miklavec via ntg-context wrote:
>
> > Hi,
> >
> > Hans helped me out with some asciidoc processing a while ago.
> >
> > I played a bit further, but I'm currently facing two minor issues:
> >
> > (a) I don't know how to turn program listing (verbatim code) from xml
> > to (perhaps, vim-based) syntax highlighting (but most importantly, to
> > make sure that line breaks work properly)
>
> Does something like this work:
>
> https://wiki.contextgarden.net/Verbatim_XML

Yes, awesome, this does exactly what I want, thank you very much.

I used the following code:

\usemodule[vim]
% this breaks if directory doesn't exist before
\setupvimtyping[directory=output/]
% it would be potentially useful to have some predefined vimtyping
already present in the module
\definevimtyping
[programlisting]
[syntax=]

\startluacode
function xml.functions.processprogramlisting(t)
buffers.assign("listing","\\startprogramlisting[syntax=cpp]\n"
.. tostring(xml.text(t)) .. "\n\\stopprogramlisting")
context.getbuffer { "listing" }
end
\stopluacode

\startxmlsetups xml:programlisting
\pushcatcodetable
\setcatcodetable\ctxcatcodes
\xmlfunction{#1}{processprogramlisting}
\popcatcodetable
\stopxmlsetups


Now I need to get the "cpp" and "unnumbered" part processed
automatically, so that it will work for any language:

// test.cpp:
int main()
{
return 0;
}

which would then be transformed into

\startprogramlisting[syntax=cpp,numbering=no]
int main()
{
return 0;
}
\stopprogramlisting

For some reason the syntax highlighting doesn't work on the full
document, but it works inside the minimal example, so I still need to
investigate what's going on with the full document.



On an unrelated note:

I cannot make \startnarrow[middle=1cm] (or left=... for that matter)
produce any offset on the left. I was playing with the following
example, but the frame refuses to be shifted to the right

\setupvimtyping
[before={
\startnarrow[left=1cm,before={\blank[10pt]}]
\switchtobodyfont[8pt]
\startframed
[align=flushleft,
 background=color,
 backgroundcolor=gray,
 frame=off,
 leftframe=on,
 rulethickness=2pt,
 framecolor=darkgray,
 width=local,
 offset=1ex]},
  after={\stopframed\stopnarrow}]

Hello
\startprogramlisting[syntax=cpp,numbering=yes]
int main()
{
return 0;
}
\stopprogramlisting


Mojca
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___