Re: [NTG-context] section to have different conversion in body part and appendices

2019-05-21 Thread Pablo Rodriguez
On 5/21/19 3:10 PM, Procházka Lukáš Ing. wrote:
> Hello,
>
> is there a way to tell \section (or other heads) to be "number-converted" 
> differently in bodypart and appendices?

Hi Lukáš,

I think this is what you want to achieve:

\definestructureconversionset
[sectionnumbers]
[0,R,n,n,g]
[n]

\definestructureconversionset
[appendix:sectionnumbers]
[0,R,Characters,g,characters]
[n]

\setupheads
[sectionconversionset=sectionnumbers]

\setuphead[section][] % e.g. "appendices:numberconversion=A"?
\starttext
   \startbodymatter
 \section{In body} % To produce "1. In body"
   \stopbodymatter
   \startappendices
 \section{In apps} % To produce "A In apps"
   \stopappendices
\stoptext

I hope it helps,

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] UTF8 chars in attribute values (XML)

2019-05-21 Thread Pablo Rodriguez
On 5/21/19 10:19 AM, Hans Hagen wrote:
> On 5/19/2019 7:38 PM, Pablo Rodriguez wrote:
>> [...]
>> Inspecting buff-imp-xml.lua, I understand that "alsoname" should be
>> added to "key". But I don’t know where or how this could be achieved.
>>
>> Sorry for not providing a patch,
> fixed in next beta

Many thanks for the fix, Hans.

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
___


[NTG-context] UTF8 chars in attribute values (XML)

2019-05-19 Thread Pablo Rodriguez
Hi Hans,

I’m afraid I found another issue with UTF8 chars in attribute values
when printing them.

\starttext
\startTEXpage[offset=1em]
\startXML

\stopXML
\stopTEXpage
\stoptext

Inspecting buff-imp-xml.lua, I understand that "alsoname" should be
added to "key". But I don’t know where or how this could be achieved.

Sorry for not providing a patch,

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] problem with UTF8 chars in XML elements

2019-05-19 Thread Pablo Rodriguez
On 5/5/19 5:25 PM, Axel Kielhorn wrote:
>> Am 05.05.2019 um 14:58 schrieb Pablo Rodriguez:
>> [...]
>> ConTeXt has problems parsing . To the best of my knowledge, this
>> is a valid XML element name (sorry, but I don’t have a better reference:
>> https://en.wikipedia.org/wiki/XML#International_use]).
>
> I had the same problem with an „ä“ in one of my elements.

Hans fixed this in latest beta (so that everybody knows).

Hans, many thanks for the fix.

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] interactive link area and scale in LMTX

2019-05-19 Thread Pablo Rodriguez
On 5/18/19 11:00 PM, Hans Hagen wrote:
> On 5/18/2019 7:12 PM, Pablo Rodriguez wrote:
>> [...]
>> Interactive link areas are fine in latest beta (2019.05.18 10:57) with
>> LuaTeX-1.10, but with LuaTeX-2.0, they aren’t scaled.
>>
>> Could anyone confirm the issue?
> fixed in next beta

Hans,

many thanks for your fix.

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
___


[NTG-context] interactive link area and scale in LMTX

2019-05-18 Thread Pablo Rodriguez
Dear list,

I have the following sample:

\setupinteraction[state=start]

\enabledirectives[references.border]

\def\mypersonalurl#1{\bgroup%
\tt\goto{\hyphenatedurl{#1}}[url(#1)]\egroup}%
\unexpanded\def\href#1#2{\goto{#2} [url(#1)]}

\starttext
\mypersonalurl{wiki.contextgarden.net}

\scale[width=.5\textwidth]
{\mypersonalurl{wiki.contextgarden.net}}
\stoptext

Interactive link areas are fine in latest beta (2019.05.18 10:57) with
LuaTeX-1.10, but with LuaTeX-2.0, they aren’t scaled.

Could anyone confirm the issue?

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] xmldoif, \startSECTION ... \stopSECTION and \setuphead

2019-05-16 Thread Pablo Rodriguez
On 5/16/19 8:45 PM, Wolfgang Schuster wrote:
> Pablo Rodriguez schrieb am 16.05.2019 um 18:43:
>> [...]
>> After checking i-context, the options for the second pair of brackets are:
>>
>>KEY = VALUE
>>
>> Well, I think this is the standard case. Aren’t values inherited from
>> \setuphead? What would be the valid keys for this case?
>
> The second argument is for userdata, i.e. you can use your own keys to
> store information for a section (e.g. the author or a subtitle).

Many thanks for your reply, Wolfgang.

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] xmldoif, \startSECTION ... \stopSECTION and \setuphead

2019-05-16 Thread Pablo Rodriguez
On 5/16/19 6:43 PM, Pablo Rodriguez wrote:
> [...]
> What would be my approach to deal with "\xmldoif{#1}{.[@id='topic' and
> contains(@class,'hidden')]}" in beforesection?
>
> I realize that "\definehead[specialchapter][chapter]" would be a
> workaround, but I would like to find a more proper solution.

It would be a workaround for the sample I submitted, but not for "\xmldoif".

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
___


[NTG-context] xmldoif, \startSECTION ... \stopSECTION and \setuphead

2019-05-16 Thread Pablo Rodriguez
Dear list,

I have the following sample:

\setuphead[chapter]
[beforesection=\TeX,
 aftersection=\TeX]
\starttext
\startchapter[title=Chapter,
beforesection=\ConTeXt,
aftersection=\ConTeXt]
This is my chapter.
\stopchapter
\stoptext

After checking i-context, the options for the second pair of brackets are:

  KEY = VALUE

Well, I think this is the standard case. Aren’t values inherited from
\setuphead? What would be the valid keys for this case?

I need to use \xmldoif in beforesection and aftersection. As far as I
can see, it doesn’t work inside \setuphead.

What would be my approach to deal with "\xmldoif{#1}{.[@id='topic' and
contains(@class,'hidden')]}" in beforesection?

I realize that "\definehead[specialchapter][chapter]" would be a
workaround, but I would like to find a more proper solution.

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] issues with rotated paper size

2019-05-15 Thread Pablo Rodriguez
On 5/15/19 8:59 PM, Wolfgang Schuster wrote:
> Pablo Rodriguez schrieb am 14.05.2019 um 21:39:
>> [...]
>> I see that a more complex method is deployed to get the box sizes.
>>
>> I simply thought that this could be a bug.
>
> What is the reason for this page rotation, maybe there is a better
> solution for this?

I want to avoid enabling auto rotate in the screens where these
documents are viewed.

In any case, as long as I use "\setupinteractionscreen[option={none,
max}]", everything works as expected.

May 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] issues with rotated paper size

2019-05-14 Thread Pablo Rodriguez
On 5/14/19 8:05 PM, Wolfgang Schuster wrote:
> Pablo Rodriguez schrieb am 14.05.2019 um 18:51:
>> [...]
>> I think it might be a bug.
>
> When you add \setupinteractionscreen to your document ConTeXt uses a
> more complex method to save the page size which includes calculations
> for the different box types. Part of these calculations are the width
> and height of the document and paper but when you rotate one of them you
> get unexpected values for them.

Many thanks for your reply, Wolfgang.

I see that a more complex method is deployed to get the box sizes.

I simply thought that this could be a bug.

Many thanks four your help,

Pablo


> \setuppapersize [A4,landscape,90] [A4]
>
> \starttext
>
> \starttabulate
> \NC Printpaperwidth  \EQ \the\printpaperwidth  \NC\NR
> \NC Paperwidth   \EQ \the\paperwidth   \NC\NR
> \TB
> \NC Printpaperheight \EQ \the\printpaperheight \NC\NR
> \NC Paperheight  \EQ \the\paperheight  \NC\NR
> \stoptabulate
>
> \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://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> ___
>


--
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] issues with rotated paper size

2019-05-14 Thread Pablo Rodriguez
On 5/14/19 4:53 PM, Hans Hagen wrote:
> i have no clue what you want to achieve

Hans and Wolfgang,

I think I have found a weird behaviour in ConTeXt (latest beta from
2019.05.12 19:05).

This is a sample of what I want to achieve (thanks to Wolfgang’s help):

\setuppapersize [A4,landscape,90] [A4]
\setupinteractionscreen[option={none, max}]
\showframe
\starttext
\showlayout
\stoptext

If I set "option=max" (instead of "option={none, max}", I get a square
paper of 210x210mm.

These are the right page dimensions in PDF with the sample above:

  /MediaBox [ 0 0 595.2756 841.8898 ]
  /CropBox [ 0 0 595.2756 841.8898 ]
  /TrimBox [ 0 0 595.2756 841.8898 ]

These are the dimensions with "\setupinteractionscreen[option=max]":

  /MediaBox [ 0 0 841.8898 595.2756 ]
  /CropBox [ 0 -246.61417 595.2756 595.2756 ]
  /TrimBox [ 0 -246.61417 595.2756 595.2756 ]

I think it might be a bug.

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] issues with rotated paper size

2019-05-14 Thread Pablo Rodriguez
On 5/14/19 5:16 PM, Wolfgang Schuster wrote:
> Pablo Rodriguez schrieb am 14.05.2019 um 16:12:
>> Dear list,
>>
>> I have the following sample:
>>
>>  \setuppapersize[A4, landscape][A4, 90]
>>  %~ \setupinteractionscreen[option=max]
>>  \showframe
>>  \starttext
>>  \showlayout
>>  \stoptext
>>
>> For some reason, the page is displaced from the paper bottom.
> \setuppapersize [A4,landscape,90] [A4] ?

Many thanks for your reply, Wolfgang.

This is exactly what I want.

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
___


[NTG-context] issues with rotated paper size

2019-05-14 Thread Pablo Rodriguez
Dear list,

I have the following sample:

\setuppapersize[A4, landscape][A4, 90]
%~ \setupinteractionscreen[option=max]
\showframe
\starttext
\showlayout
\stoptext

For some reason, the page is displaced from the paper bottom. And if
fullscreen is set, the real paper size is a square.

I think this may be a bug. Could anyone explain me what I’m doing wrong
or confirm the issue?

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
___


[NTG-context] suggestions for \definefontfamily and \definefallbackfamily

2019-05-12 Thread Pablo Rodriguez
Hi Wolfgang,

as I reported the issue with the fonts and LMTX, I remembered two
suggestions I wanted to post here.

The first one is enabling the use of "method=uppercase" in
\definefallbackfamily (to get fake caps, such as in
https://mailman.ntg.nl/pipermail/ntg-context/2018/092878.html).

The second feature is to enable \definefontfamily to load font files not
part of the font database, the same way as \definefont is able to load them.

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] placing content in footers

2019-05-12 Thread Pablo Rodriguez
On 5/12/19 2:30 PM, Henning Hraban Ramm wrote:
> Am 2019-05-11 um 19:40 schrieb Henning Hraban Ramm:
>> Am 2019-05-11 um 16:35 schrieb Pablo Rodriguez:
>>> [...]
>>> Is there any way to place content in the middle of doublesided footers,
>>> besides left and right contents?
>>
>> \setuppagenumbering[alternative=doublesided]
>> \setupheadertexts[]
>> \setupheadertexts[\setups{text right}][][][\setups{text left}]
>>
>> \startsetups[text right]
>>  \rlap{\pagenumber}
>>  \hfill
>>  \getmarking[chapter]
>>  \hfill
>>  \llap{Un Nom}
>> \stopsetups
>>
>> \startsetups[text left]
>>  \rlap{Una Person}
>>  \hfill
>>  \getmarking[section]
>>  \hfill
>>  \llap{\pagenumber}
>> \stopsetups
>
> Sorry, I didn’t take time to comment on that example – of course it’s
> about headers not footers (they work the same) and shows a way to
> spread three pieces of text instead just centering one, which is much
> easier.

Many thanks for your reply, Hraban.

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] placing content in footers

2019-05-12 Thread Pablo Rodriguez
On 5/11/19 8:26 PM, Wolfgang Schuster wrote:
> Pablo Rodriguez schrieb am 11.05.2019 um 16:35:
>> [...]
>>  \mbox{}\page\mbox{}
>
> Where did you learn to use \mbox?

I don’t remember (probably in my LaTeX times, before moving to ConTeXt).

I know that you don’t like it, but I didn’t know about \page[dummy].

>> Is there any way to place content in the middle of doublesided footers,
>> besides left and right contents?
> \setuppagenumbering
>    [alternative=doublesided]
>
> \setupfootertexts
>    [\doifoddpageelse{right page}{left page}]
>
> \setupfootertexts
>    [inner margin] [outer margin]
>    [outer margin] [inner margin]

Many thanks for your help. I didn’t know that \setupfootertexts could be
invoked twice.

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
___


[NTG-context] placing content in footers

2019-05-11 Thread Pablo Rodriguez
Dear list,

I have the following sample:

\setuppapersize[A8]
\setuppagenumbering
[alternative=doublesized]
\setupfootertexts
[even-right]
[even-left]
[odd-right]
[odd-left]
%~ [even-middle]
%~ [odd-middle]
\starttext
\mbox{}\page\mbox{}
\stoptext

Is there any way to place content in the middle of doublesided footers,
besides left and right contents?

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] font selection in LMTX

2019-05-10 Thread Pablo Rodriguez
On 5/9/19 10:50 PM, Wolfgang Schuster wrote:
> [...]
> What are the results for the following two calls:
>
> mtxrun --find-file GIL_.TTF
>
> mtxrun --script fonts --list --all gill*

Many thanks for your reply, Wolfgang.

Both commands find the font files.

You have the output below.

Many thanks for your help,

Pablo


> mtxrun --find-file GIL_.TTF && mtxrun --script
fonts --list --all gill* && mtxrun --find-file ARIALN.TTF && mtxrun
--script fonts --list --all arialn*

c:/windows/fonts/GIL_.TTF
system  | lua | compiling
'C:/utilidades/context/tex/texmf-cache/luatex-
cache/context/5fe67e0bfe781ce0dde776fb1556f32e/fonts/data/names.tma'
into 'C:/ut
ilidades/context/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb15
56f32e/fonts/data/names.tmc'
system  | lua | dumping
'C:/utilidades/context/tex/texmf-cache/luatex-ca
che/context/5fe67e0bfe781ce0dde776fb1556f32e/fonts/data/names.tma' into
'C:/util
idades/context/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556
f32e/fonts/data/names.tmc' stripped

identifier  familyname   fontname
filenamesubfont   instances

gillsansmt  gillsansmt   gillsansmt
c:/windows/fonts/GIL_.TTF
gillsansmtbold  gillsansmt
gillsansmtbold
c:/windows/fonts/GILB.TTF
gillsansmtbolditalicgillsansmt
gillsansmtboldi
talic   c:/windows/fonts/GILBI___.TTF
gillsansmtcondensed gillsansmtcondensed
gillsansmtconde
nsedc:/windows/fonts/GILC.TTF
gillsansmtcondensednormal   gillsansmtcondensed
gillsansmtconde
nsedc:/windows/fonts/GILC.TTF
gillsansmtcondensedregular  gillsansmtcondensed
gillsansmtconde
nsedc:/windows/fonts/GILC.TTF
gillsansmtextcondensedbold  gillsansmtextcondensedbold
gillsansmtextra
condensedbold   c:/windows/fonts/GLSNECB.TTF
gillsansmtextcondensedboldnormalgillsansmtextcondensedbold
gillsansmtextra
condensedbold   c:/windows/fonts/GLSNECB.TTF
gillsansmtextcondensedboldregular   gillsansmtextcondensedbold
gillsansmtextra
condensedbold   c:/windows/fonts/GLSNECB.TTF
gillsansmtextracondensedboldgillsansmtextcondensedbold
gillsansmtextra
condensedbold   c:/windows/fonts/GLSNECB.TTF
gillsansmtitalicgillsansmt
gillsansmtitali
c   c:/windows/fonts/GILI.TTF
gillsansmtnormalgillsansmt   gillsansmt
c:/windows/fonts/GIL_.TTF
gillsansmtregular   gillsansmt   gillsansmt
c:/windows/fonts/GIL_.TTF
gillsansultrabold   gillsansultrabold
gillsansultrabo
ld  c:/windows/fonts/GILSANUB.TTF
gillsansultraboldcondensed  gillsansultraboldcondensed
gillsansultrabo
ldcondensed c:/windows/fonts/GILLUBCD.TTF
gillsansultraboldcondensednormalgillsansultraboldcondensed
gillsansultrabo
ldcondensed c:/windows/fonts/GILLUBCD.TTF
gillsansultraboldcondensedregular   gillsansultraboldcondensed
gillsansultrabo
ldcondensed c:/windows/fonts/GILLUBCD.TTF
gillsansultraboldnormal gillsansultrabold
gillsansultrabo
ld  c:/windows/fonts/GILSANUB.TTF
gillsansultraboldregulargillsansultrabold
gillsansultrabo
ld  c:/windows/fonts/GILSANUB.TTF

c:/windows/fonts/ARIALN.TTF

identifier  familyname   fontname
filenam
esubfont   instances

arial   arialarialmt
c:/wind
ows/fonts/arial.ttf
arialblack  arialarialblack
c:/wind
ows/fonts/ariblk.ttf
arialbold   arialarialboldmt
c:/wind
ows/fonts/arialbd.ttf
arialbolditalic arialarialbolditalicmt
c:/wind
ows/fonts/arialbi.ttf
arialbolditalicmt   arialarialbolditalicmt
c:/wind
ows/fonts/arialbi.ttf
arialboldmt arialarialboldmt
c:/wind
ows/fonts/arialbd.ttf
arialitalic arialarialitalicmt
c:/wind
ows/fonts/ariali.ttf
arialitalicmt   arialarialitalicmt
c:/wind
ows/fonts/ariali.ttf
arialmt arialarialmt
c:/wind
ows/fonts/arial.ttf
arialnarrow arialarialnarrow
c:/wind
ows/fonts/ARIALN.TTF
arialnarrowbold arialarialnarrowbold
c:/wind
ows/fonts/ARIALNB.TTF
arialnarrowbolditalic   arialarialnarrowbolditalic
c:/wind
ows/fonts/ARIALNBI.TTF
arialnarrowitalic   arialarialnarrowitalic
c:/wind
ows/fonts/ARIALNI.TTF
arialnormal arialarialitalicmt
c:/wind
ows/fonts/ariali.ttf
arialregulararialarialblack
c:/wind
ows/fonts/ariblk.ttf
arialroundedmtbold 

[NTG-context] font selection in LMTX

2019-05-09 Thread Pablo Rodriguez
Hi Hans,

using the following sample:

\definefontfamily[mainface][rm][TeX Gyre Heros]
\definefontfamily[mainface][mm][TeX Gyre Termes Math]
\definefontfamily[mainface][ss][Gill Sans MT][tf=file:GIL_.TTF]
\definefontfamily[mainface][tt][Cousine]
\definefontfamily[mainface][cg][Arial Narrow][tf=file:ARIALN.TTF]
\setupbodyfont[mainface]
\startbuffer
\ConTeXt\ is awesome!\par
\stopbuffer
\starttext
\startTEXpage[offset=1em]
\getbuffer
\ss\getbuffer
\tt\getbuffer
\cg\getbuffer
\stopTEXpage
\stoptext

I have no problem to get all four fonts with MkIV, but with LMTX I don’t
get \cg or \ss.

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] issue with page numbering

2019-05-08 Thread Pablo Rodriguez
On 5/8/19 9:28 PM, Wolfgang Schuster wrote:
> [...]
>> Is there any way to avoid that \lastsubpagenumber counts the blank page
>> that might be placed among two chapters?
> You have to reset the subpage counter at the end of each chapter.
>
> \startsetups [chapter:after]
>    \page
>    \resetsubpagenumber
> \stopsetups
>
> \setuphead
>    [chapter]
>    [aftersection=\directsetup{chapter:after}]

Many thanks for your fast reply, Wolfgang.

It works perfectly fine. It doesn’t work in my real document, but it
took me a while to realize that I was using \chapter instead of
\startchapter...\stopchapter.

Time to get a break...

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
___


[NTG-context] issue with page numbering

2019-05-08 Thread Pablo Rodriguez
Dear list,

inspired by strc-pag.mkiv, I have the following sample:

\setuppagenumbering[alternative=doublesided]
\setupsubpagenumber[way=bychapter]
\starttext
\dorecurse{5}{\startchapter[title=My Chapter]
\userpagenumber/\lastuserpagenumber---
\subpagenumber/\lastsubpagenumber
\stopchapter}
\stoptext

I need that chapters start on an odd page.

Is there any way to avoid that \lastsubpagenumber counts the blank page
that might be placed among two chapters?

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
___


[NTG-context] problem with UTF8 chars in XML elements

2019-05-05 Thread Pablo Rodriguez
Dear list,

I have the following sample:

\startbuffer[demo]


Title

\stopbuffer

\startxmlsetups xml:sample
\xmlsetsetup{#1}{doc|título}{xml:*}
\stopxmlsetups

\xmlregistersetup{xml:sample}

\startxmlsetups xml:doc
\xmlflush{#1}
\stopxmlsetups

\startxmlsetups xml:título
\title{\xmlflush{#1}}
\stopxmlsetups

\starttext
 \xmlprocessbuffer{main}{demo}{}
\stoptext

ConTeXt has problems parsing . To the best of my knowledge, this
is a valid XML element name (sorry, but I don’t have a better reference:
https://en.wikipedia.org/wiki/XML#International_use]).

How can I get this parsed with ConTeXt?

Many thanks for your help,

Pablo
--
http://www.ousia.tk
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] XML xmldoif struggle!

2019-05-02 Thread Pablo Rodriguez
On 5/1/19 9:28 PM, Geert Verhaag wrote:
> Hoi Pablo,
>
> Thanks for your prompt reply!
>
> The output Euro set! is printed always, it doesn't matter whether I put
> EURO or DOLLAR first?!

Hi Geert,

my fault, the conditional should read:

\xmldoif{#1}{currency[position()==1 and contains(text(),'EURO')]}
{Euro set!}

I hope it works fine now.

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] underscore hyphenation in LMTX

2019-05-01 Thread Pablo Rodriguez
On 4/29/19 10:57 AM, Hans Hagen wrote:
> On 4/27/2019 1:51 PM, Pablo Rodriguez wrote:
>> [...]
>> I get the underscore hyphenation with latest ConTeXt beta (LuaTeX-1.10),
>> but not with latest LMTX (LuaTeX-2.0).
>>
>> Am I missing something here?
>
> use slot '0' instead of '1' (i'll catch it anyway)

Hans,

many thanks for the trick and the improved code.

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] XML xmldoif struggle!

2019-05-01 Thread Pablo Rodriguez
On 4/30/19 9:58 PM, Geert Verhaag wrote:
> [...]
> \startxmlsetups xml:invoice:invoice
>    \xmlfirst{#1}{currency} \par
>    \xmldoif{\xmlfirst{#1}{currency}}{contains(text(),'EURO')} {
>   Euro set! \par
>    }
> [...]
> But the xmldoif command doesn't cause the Euro set be printed?!
>
> What's wrong here? The manual xml-mkiv.pdf doesn't give me any hint on
> how to make this work!

Hi Geert,

the syntax reads \xmldoif{#1}{lpath}{action}. So your conditional may read:

\xmldoif{#1}{currency[first() and contains(text(),'EURO')]}
{Euro set!}

In a complete sample (with dollar set first [it won’t show the result
unless you set EURO first]):

  \startbuffer[demo]
  

  DOLLAR
  EURO

  
  \stopbuffer

  \startxmlsetups xml:initialize
 \xmlsetsetup{#1}{doc}{xml:*}
  \stopxmlsetups

  \xmlregistersetup{xml:initialize}

  \startxmlsetups xml:doc
\xmlfirst{#1}{currency} \par
\xmldoif{#1}{currency[first() and contains(text(),'EURO')]}
{Euro set!}
  \stopxmlsetups

  \setuppapersize[A8]

  \starttext
 \xmlprocessbuffer{main}{demo}{}
  \stoptext

It is all in xml-mkiv.pdf
(http://www.pragma-ade.com/general/manuals/xml-mkiv.pdf#page=49). I have
just discovered it .

Just in case it helps,

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] LMTX and system fonts

2019-05-01 Thread Pablo Rodriguez
On 4/28/19 5:22 PM, Alan Braslau wrote:
>> On 28Apr19, at 02:55, Pablo Rodriguez wrote:
>>
>> I add the path, otherwise no mtxrun would be found.
>
> Of course, Otared is saying:
>
> $CONTEXTHOME/tex/texmf-osx-64/bin/mtxrun -generate
>
> where osx-64 is the platform.

Many thanks for your reply, Alan.

I’m afraid that LMTX isn’t able to recognize fonts when provided with a
symbolic link inside texmf-fonts in Linux.

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] LMTX and system fonts

2019-04-28 Thread Pablo Rodriguez
On 4/27/19 11:06 PM, Aditya Mahajan wrote:
> On Sat, 27 Apr 2019, Pablo Rodriguez wrote:
>> [...]
>> If the soft symlink for the fonts directory is itself tex/texmf-fonts/,
>> ConTeXt LMTX handles the fonts right.
>
> The texmf-fonts directory must follow TDS (tex document structure).
> Assuming that ~/Documents/ousia-fonts simply contains a bunch of
> directories with opentype fonts...

It contains a bunch of fonts, no directory.

> I'd try symlinking it to
>
> tex/texmf-fonts/font/opentype/data

It doesn’t work.

Adding a link in tex/texmf-fonts/ for each font file is the only thing
that works fine.

And I wonder what may be wrong with the fonts from c:\windows\fonts\ not
being read in Win7.

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] LMTX and system fonts

2019-04-28 Thread Pablo Rodriguez
On 4/27/19 9:50 PM, Otared Kavian wrote:
> Hi Pablo,
>
> I don't know if this may help, but in principle in order to use
> system fonts in LMTX you should invoke the mtxrun in the bin
> directory of your installation of LMTX. For me, working on MacOS, the
> following worked fine:
>
>   /context-osx-64/tex/texmf-osx-64/bin/mtxrun -generate

Hi Otared,

I add the path, otherwise no mtxrun would be found.

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] LMTX and system fonts

2019-04-27 Thread Pablo Rodriguez
On 4/27/19 7:36 PM, Hans Hagen wrote:
> On 4/27/2019 6:25 PM, Pablo Rodriguez wrote:
>> [...]
>> It seems as if LMTX couldn’t follow symlinks for directories in Linux.
>>
>> On Windows, I will have to wait some days to have access to a computer
>> with it.
> I tested linux on wsl and made a (soft) symlink there to a path under
> /mnt/c and it just works. So i need more details.

I wish I could give more details.

Fonts are located in ~/Documents/ousia-fonts/. The soft link is
tex/texmf-fonts/ousia-fonts/.

If the soft symlink for the fonts directory is itself tex/texmf-fonts/,
ConTeXt LMTX handles the fonts right.

I’m going to test this in a Linux live version, but I need to get an
empty USB stick first.

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] LMTX and system fonts

2019-04-27 Thread Pablo Rodriguez
On 4/27/19 6:25 PM, Pablo Rodriguez wrote:
> [...]
> The only workaround I found in Linux is to add a symlinks to each font
> file. This works now.

I mean, to add a symlink in tex/texmf-font/ for each in the original
font directory.

But a symlink in tex/texmf-font/ for the font directory itself doesn’t work.

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] LMTX and system fonts

2019-04-27 Thread Pablo Rodriguez
On 4/27/19 5:37 PM, Hans Hagen wrote:
> On 4/27/2019 2:13 PM, Pablo Rodriguez wrote:
>> [...]
>> In Windows (I installed it again from scratch yesterday), system fonts
>> (from c:/windows/fonts/) are simply ignored (I don’t know why).
>>
>> In Linux, a symlink in tex/texmf-fonts/ to the directory where fonts are
>> stored doesn’t work either.
>>
>> The weird thing is that the ConTeXt Suite in both OSes works fine with
>> system fonts or the mentioned symlink.
>
> mtxrun --generate
> mtxrun --script font --reload

I’m afraid it doesn’t work, Hans.

I even removed tex/texmf-cache/luatex-cache/, but no luck.

The only workaround I found in Linux is to add a symlinks to each font
file. This works now.

It seems as if LMTX couldn’t follow symlinks for directories in Linux.

On Windows, I will have to wait some days to have access to a computer
with it.

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] Strange backgroundcolors with showgrid and luacode

2019-04-27 Thread Pablo Rodriguez
On 4/27/19 4:34 PM, Wolfgang Schuster wrote:
>> [...]
>> Is it intended that all nine lines are black?
>
> Yes, because there are no predefined palets with the names red, green or
> blue.
>
> \definepalet
>    [red]
>    [ light=lightred,
>     normal=middlered,
>   dark=darkred]
Wolfgang,

many thanks for the explanation.

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] Strange backgroundcolors with showgrid and luacode

2019-04-27 Thread Pablo Rodriguez
On 4/27/19 2:03 PM, Wolfgang Schuster wrote:
> [...]
> It's my fault, in this case there is only a single command to create and
> change palet values.

Many thanks for your explanation, Wolfgang.

I found this code in ConTeXt (syst-aux.mkiv):

\starttext
\doloopoverlist {red,green,blue} {
 \setuppalet[\recursestring]
 \doloopoverlist {light,normal,dark} {
 \blackrule[color=\recursestring, width=\textwidth]\par
 }
 }
\stoptext

Is it intended that all nine lines are black?

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
___


[NTG-context] precompose combining characters

2019-04-27 Thread Pablo Rodriguez
Dear list,

I have the following sample:

\setupbodyfont[gentium, 60pt]
\starttext
Combined: τῇ

Precomposed: τῇ
\stoptext

Is there an automatic way in LuaTeX to get the precomposed character
from combining ones without having to add a feature?

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
___


[NTG-context] LMTX and system fonts

2019-04-27 Thread Pablo Rodriguez
Dear list,

fonts are my main problem using LMTX (on both Windows and Linux platforms).

In Windows (I installed it again from scratch yesterday), system fonts
(from c:/windows/fonts/) are simply ignored (I don’t know why).

In Linux, a symlink in tex/texmf-fonts/ to the directory where fonts are
stored doesn’t work either.

The weird thing is that the ConTeXt Suite in both OSes works fine with
system fonts or the mentioned symlink.

What am I missing here?

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
___


[NTG-context] underscore hyphenation in LMTX

2019-04-27 Thread Pablo Rodriguez
Dear list,

I have the following sample:

\startluacode
function document.addfunnyhyphen(tfmdata)
local underscore = utf.byte("_")
local char   = tfmdata.characters[underscore]
tfmdata.characters[0xFE000]   = {
width= 0,
height   = 0,
depth= 0,
commands = {
{ "right", -char.width },
{ "down", char.depth },
{ "slot", 1, underscore },
}
}
end

utilities.sequencers.appendaction("aftercopyingcharacters","after",
"document.addfunnyhyphen")
\stopluacode

\definehyphenationfeatures
  [whatever]
  [righthyphenchar="FE000]

\setuphyphenation[method=traditional]
\sethyphenationfeatures[strict, whatever]

\setuppapersize[A10, lanscape]

\starttext
\startmakeup[standard]
\hsize\zeropoint
\tt definebodyfont
\stopmakeup
\stoptext

I get the underscore hyphenation with latest ConTeXt beta (LuaTeX-1.10),
but not with latest LMTX (LuaTeX-2.0).

Am I missing something here?

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] suggestion for LMTX

2019-04-27 Thread Pablo Rodriguez
On 4/27/19 1:15 PM, Hans Hagen wrote:
> On 4/27/2019 12:22 PM, Pablo Rodriguez wrote:
>> Hi Hans,
>>
>> compiling the following sample with LMTX
>> [...]
>>   \contextmark
>> [...]
>> outputs MKIV.
>>
>> Wouldn’t LMTX be a better option than LMTX?
>
> Why? Although there are some fundamental differences deep down, the LMTX
> version has the MKIV functionality. There might be a point where we bind
> a frozen version of MKIV to LuaTeX, but only when the code base becomes
> too hybrid to my taste. Of course there will be functionality only
> available when you use LMTX, but that is something Wolfgang and I need
> to figure out wrr the interface specification. Also, Alan and I need to
> deal with in the MetaFun code and documentation. At some point Taco and
> Mojca might want granularity in the Wiki. We'll see. I have no clue when
> users will have switched to lmtx for production anyway, as it's not
> something we want to enforce. (fwfw: I run lmtx by default.)

Well, it was only an idea... which seems to be wrong.

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] Strange backgroundcolors with showgrid and luacode

2019-04-27 Thread Pablo Rodriguez
On 4/27/19 12:21 PM, Wolfgang Schuster wrote:
> Marcus Vinicius Mesquita schrieb am 27.04.2019 um 12:18:
>> \definepalet[layout][grid=black]
> \setuppalet
>    [layout]
>    [grid=black]

Many thanks, Marcus Vinicius and Wolfgang, for your replies.

This is the only way it works:

\definepalet[layout][grid=black]
%~ \setuppalet[layout] [grid=black]
\showgrid
\starttext
\ConTeXt\ is awesome!
\stoptext

I don’t know whether I’m missing something, but \showsetups{setuppalet}
only shows this:

\setuppalet [.*.]

* NAME

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
___


[NTG-context] suggestion for LMTX

2019-04-27 Thread Pablo Rodriguez
Hi Hans,

compiling the following sample with LMTX

\starttext
\contextmark

\contextbanner
\stoptext

outputs MKIV.

Wouldn’t LMTX be a better option than LMTX?

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] Strange backgroundcolors with showgrid and luacode

2019-04-27 Thread Pablo Rodriguez
On 4/26/19 2:28 PM, Wolfgang Schuster wrote:
> [...]
> \showgrid highlights different page elements with colors but you can
> change the output
>
> https://www.mail-archive.com/ntg-context@ntg.nl/msg90312.html

Hi Wolfgang,

is there any way to get the lines from \showgrid in black instead of red?

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] wrong intraword spacing

2019-04-27 Thread Pablo Rodriguez
On 4/22/19 6:27 PM, Hans Hagen wrote:
> On 4/22/2019 12:35 PM, Otared Kavian wrote:
>> Hi Pablo,
>>
>> Yes I get the same extra space after ff, with all th eflavors of luatex
>> based ConTeXt (mkiv, lmtx, and ConTeXt from TeXLIve 2018).
>> I attach the PDF.
> fixed in next beta but not extensively tested (no upload today) ..
> pretty old code that i need to review one day in the prespective of
> recent possibilities and so

Hans,

many thanks for the fix.

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] wrong intraword spacing

2019-04-22 Thread Pablo Rodriguez
On 4/22/19 12:35 PM, Otared Kavian wrote:
> Hi Pablo,
>
> Yes I get the same extra space after ff, with all the flavors of luatex
> based ConTeXt (mkiv, lmtx, and ConTeXt from TeXLIve 2018).
> I attach the PDF.

Hi Otared,

many thanks for your confirmation.

I wonder whether this issue might be related to the one Wolfgang
reported (https://mailman.ntg.nl/pipermail/ntg-context/2019/094747.html).

Many thanks for your help,

Pablo

>> On 22 Apr 2019, at 10:50, Pablo Rodriguez wrote:
>>
>> Dear list,
>>
>> I have the following sample:
>>
>>    \definefontfeature
>>    [default]
>>    [default]
>>    [itlc=yes]
>>
>>    \setupitaliccorrection
>>    [always]
>>
>>    \setupbodyfont
>>    %~ [heros]
>>    %~ [pagella]
>>    [termes]
>>
>>    \starttext
>>    \startTEXpage[offset=1em]
>>    \em Dr. Steffan
>>    \stopTEXpage
>>    \stoptext
>>
>> After the ligature, there is an unwanted extra space.
>>
>> Could anyone confirm the issue (I get it with both latest betas LMTX and
>> MkIV)?
>>
>> Many thanks for your help,
>>
>> Pablo
>
>
> ___
> 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
> ___
>


--
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] Processing XML: Header and footer, data manipulation

2019-04-22 Thread Pablo Rodriguez
On 4/22/19 7:57 AM, Axel Kielhorn wrote:
> [...]
> Some questions remain:

Hi Axel,

I have some questions about your source file:

  \startxmlsetups xml:prozess
 \mainlanguage[de]

If this is hardcoded (I mean, you don’t read it from any XML code), I
would avoid setting the \mainlanguage here.

And you already set it in lines 82-83:

  \language[de]
  \mainlanguage[de]

BTW, is there any reason to set both \language and \mainlanguage?
(\mainlanguage should be enough.)

> I want to set page headers based on information I get from the XML:
>
> \startxmlsetups xml:prozess
>   \setupheadertexts[\bf\xmltext{#1}{/pnr} \xmltext{#1}{/pname}][\date]
>
> This works on the first page (when the document has more than one
> page) but headers and footers are empty on subsequent pages.
>
> Something (xmlflush?) overwrites my setup.
> Any idea how I can fix that?

I have a workaround for that:

  \title{\xmltext{#1}{/pnr} \xmltext{#1}{/pname}}

And in your preamble:

  \setupheadertexts[title][\date]
  \setuphead[title]
[placehead=empty,
 before=,
 after=,
 page=,]

> I want to use xmlconcat here, since there may be more than one docan, but I 
> only get the „, “
>
> \startxmlsetups xml:psoutdoc
> %\inmargin{\xmltext{#1}{/docan} $\Leftarrow$}  {\bf 
> \xmltext{#1}{/docnr}}\xmlflush{#1}
> \inmargin{\xmlconcat{#1}{/docan}{, } $\Leftarrow$}  {\bf 
> \xmltext{#1}{/docnr}}\xmlflush{#1}
> \xmlsave{#1}{outfile.xml}
> \blank
> \stopxmlsetups

I would avoid using:

  \startxmlsetups xml:docname
\xmlflush{#1}
  \stopxmlsetups

instead of "\xmltext{#1}{/docname}" in the proper places.

You need to add to get proper content:

  \startxmlsetups xml:docan
\xmlflush{#1}
  \stopxmlsetups

I would replace docname with docan in both places (xmlsetsetup and its
proper \starxmlsetups).

BTW, what should be child notes to #1? An special lpath or what?

Just in case it helps,

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
___


[NTG-context] wrong intraword spacing

2019-04-22 Thread Pablo Rodriguez
Dear list,

I have the following sample:

\definefontfeature
[default]
[default]
[itlc=yes]

\setupitaliccorrection
[always]

\setupbodyfont
%~ [heros]
%~ [pagella]
[termes]

\starttext
\startTEXpage[offset=1em]
\em Dr. Steffan
\stopTEXpage
\stoptext

After the ligature, there is an unwanted extra space.

Could anyone confirm the issue (I get it with both latest betas LMTX and
MkIV)?

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] optional hyphenation patterns in ancient Greek

2019-04-22 Thread Pablo Rodriguez
On 4/3/19 4:14 PM, Arthur Reutenauer wrote:
> [...] 
>   βμ βν γμ θμ πμ τν φμ χμ
> 
> are the only consonant pairs that require a different treatment.  Would
> you please confirm?

Arthur,

the pairs are (to the best of my knowledge):

βμ βν γμ δλ θμ πμ τν φμ χμ

The patterns would be:

%% βμ
2β1μ
2β1μ'
2β1μ’
2β1μʼ
2β1μ᾽
2β1μ᾿
2ϐ1μ
2ϐ1μ'
2ϐ1μ’
2ϐ1μʼ
2ϐ1μ᾽
2ϐ1μ᾿

%% βν
2β1ν
2β1ν'
2β1ν’
2β1νʼ
2β1ν᾽
2β1ν᾿
2ϐ1ν
2ϐ1ν'
2ϐ1ν’
2ϐ1νʼ
2ϐ1ν᾽
2ϐ1ν᾿

%% γμ
2γ1μ
2γ1μ'
2γ1μ’
2γ1μʼ
2γ1μ᾽
2γ1μ᾿

%% δλ
2δ1λ
2δ1λ'
2δ1λ’
2δ1λʼ
2δ1λ᾽
2δ1λ᾿

%% θμ
2θ1μ
2θ1μ'
2θ1μ’
2θ1μʼ
2θ1μ᾽
2θ1μ᾿
2ϑ1μ
2ϑ1μ'
2ϑ1μ’
2ϑ1μʼ
2ϑ1μ᾽
2ϑ1μ᾿

%% πμ
2π1μ
2π1μ'
2π1μ’
2π1μʼ
2π1μ᾽
2π1μ᾿
2ϖ1μ
2ϖ1μ'
2ϖ1μ’
2ϖ1μʼ
2ϖ1μ᾽
2ϖ1μ᾿

%% τν
2τ1ν
2τ1ν'
2τ1ν’
2τ1νʼ
2τ1ν᾽
2τ1ν᾿

%% φμ
2φ1μ
2φ1μ'
2φ1μ’
2φ1μʼ
2φ1μ᾽
2φ1μ᾿

%% χμ
2χ1μ
2χ1μ'
2χ1μ’
2χ1μʼ
2χ1μ᾽
2χ1μ᾿

I hope they may be useful,

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] Spurious space in \startnarrower

2019-03-31 Thread Pablo Rodriguez
On 3/31/19 10:13 PM, Henri Menke wrote:
> I see that the patch has been applied in current, but could you please also
> apply it in beta (which is what I and probably most others use daily)?

Hi Henri,

I use beta and I update it with:

  ./first-setup.sh --modules=all

At least my latest beta version is 2019.03.21 21:39 (which is actually
the latest current).

Just in case it might help,

Pablo


> On 6/03/19 12:12 PM, Henri Menke wrote:
>> Patch for the core file is attached.
>>
>> Cheers, Henri
>>
>
> ___
> 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
> ___
>


--
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] optional hyphenation patterns in ancient Greek

2019-03-31 Thread Pablo Rodriguez
On 3/31/19 10:18 PM, Wolfgang Schuster wrote:
> Pablo Rodriguez schrieb am 30.03.19 um 15:40:
>> [...]
>> For me, adding the command to the document (or the distribution) would
>> be easier. But this isn’t about my documents or myself.
>
> You can put your extensions in a module and put it on the garden
> or ctan when it should be part of tex live.
>
> When you make a new installation you can download the module together
> with the base files and afterwards load the module in your document.
Many thanks for the reply, Wolfgang.

Since this isn’t about myself or my documents, I guess it is worth to
provide the optional hyphenation set to all TeX users, not only the ones
who use ConTeXt.

Many thanks again 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] optional hyphenation patterns in ancient Greek

2019-03-30 Thread Pablo Rodriguez
On 3/26/19 9:42 AM, Arthur Reutenauer wrote:
> On Mon, Mar 25, 2019 at 08:57:40PM +0100, Pablo Rodriguez wrote:
>> I read your original message when you sent it, but the issue with that
>> kind of hyphenation exceptions is that they are document-based
>
>   No.  Why would they be restricted to a single document?

Where should I add it to have it in all my documents?

I guess that even in that case it would be restricted to the
distribution I’m using. (I mean, I had to add them again if I use
another computer.)

For me, adding the command to the document (or the distribution) would
be easier. But this isn’t about my documents or myself.

>> This is why I asked for the discussion of a new pattern set.
>
>   Well, my contribution was sent five months ago, you didn’t reply to it
> until now, and since you talk about hyphenation exceptions above I
> suspect you haven’t really understood it.

Sorry for my delayed reply, but I don’t have much time to devote it to
these issues (they are pure hobby for me).

I also had to check the reference for the alternate hyphenation (I
didn’t had the book myself and I wasn’t near to a library where I could
lend it).

In my documents, I have been using \registerhyphenationpattern for more
than three years (to enable a hyphenation with a line starting with "no"
at the beginning of the line).

> It doesn’t use exceptions at all, and takes instead advantage of
> LuaTeX’s ability to manipulate the pattern set on the fly.  As such,
> it can actually be a step towards an entirely new pattern set, but it
> is of course not complete.

Sorry for my inaccuracy, I know that \registerhyphenationexception is a
different command from \registerhyphenationpattern.

> I am however not prepared to put even more effort into this unless
> you contribute something too yourself.

I only wanted to discuss the issue before providing the patch with the
patterns (at least) at GitHub.

To avoid misunderstandings, I have just edited the title of the issue at
GitHub (https://github.com/hyphenation/tex-hyphen/issues/34).

>> But I didn’t know that ConTeXt doesn’t allow them. So, this has to be
>> solved before a different pattern set could make sense in ConTeXt.
>
>   This paragraph is either nonsensical or counterfactual.  I don’t
> understand what you’re trying to say.

With “pattern set” I meant an optional pattern set that allows the
hyphenation of all pair of consonants that don’t start a word (γ-μ, but
not γ-ν) which are blocked in the main hyphenation pattern set.

I don‘t know how, but this optional set has to be loaded with the main
hyphenation patterns.

I don’t know how to add those patterns as alternate ones. But I’m going
to provide the patch with the needed hyphenations.

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] issue with symbol in attachments

2019-03-25 Thread Pablo Rodriguez
On 3/25/19 10:48 AM, Hans Hagen wrote:
> On 3/24/2019 6:47 PM, Pablo Rodriguez wrote:
>
>> Can anyone confirm that all attachment symbols are distorted, except the
>> first one?
> hard to say ... support for these symbols / icons in viewers has been an
> inconsistent mess right from the start and one has to keep adapting ...
> (scaling, positioning, decoupled representations, colors) ... a bit of a
> gamble

Many thanks for your reply, Hans.

I find suprising that /Rect entriess aren’t calculated the same way when
no dimension is specified. The following sample shows it:

\setupinteraction[state=start]
\setuppapersize[A9]
\starttext
\attachment[xml-mkiv.pdf]\\
\attachment[xml-mkiv.pdf]
[symbol=Pushpin]\\
\attachment[xml-mkiv.pdf]
[symbol=Default]\\
\stoptext

  /Rect [ 12.48609 117.54327 18.46039 123.51757 ]
  /Rect [ 12.48609 100.805667 54.306196 111.41602 ]
  /Rect [ 12.48609 88.58463 50.351209 97.11594 ]

Could it be possible that all /Rect entries for attachments are
calculated the same way (with a square of about 6×6), no matter which
symbol is used? At least, when no dimension is specified.

BTW, only one attachment is shown in each margin. It seems to be the
last one. I have just discovered it accidentally:

\setupinteraction[state=start]
\starttext
one\attachment[file=onandon, location=inmargin]

two (actually)\attachment[file=notnow, location=inmargin]%
\attachment[file=about, location=rightmargin]%
\attachment[file=onandon, location=leftmargin]%

three\attachment[file=notnow, location=rightmargin]%
\attachment[file=about, location=rightmargin]%
\attachment[file=onandon, location=rightmargin]%

four\attachment[file=about]\attachment[file=about]%
\attachment[file=about]\attachment[file=about]
\stoptext

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] optional hyphenation patterns in ancient Greek

2019-03-25 Thread Pablo Rodriguez
On 3/25/19 3:09 PM, Arthur Reutenauer wrote:
>   Dear Pablo,
>
>   Five months ago I sent you a private email with detailed explanations
> of how you can achieve that in ConTeXt.  I suggest you go through that
> first before we start talking about a new pattern set.  Here is the
> email, with a few updates (the paragraph quoted at the top is by
> myself).

Dear Arthur,

many thanks for your reply.

I read your original message when you sent it, but the issue with that
kind of hyphenation exceptions is that they are document-based (I had
used them before, for Spanish [and German, I think]).

This is why I asked for the discussion of a new pattern set.

But I didn’t know that ConTeXt doesn’t allow them. So, this has to be
solved before a different pattern set could make sense in ConTeXt.

Many thanks for your help,

Pablo
--
http://www.ousia.tk
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[NTG-context] issue with symbol in attachments

2019-03-24 Thread Pablo Rodriguez
Dear list,

I have the following sample:

\setupinteraction[state=start]
\setuppapersize[A9]
\starttext
\attachment[xml-mkiv.pdf]\\
\attachment[xml-mkiv.pdf]
[symbol=Pushpin
 width=fit,
 width=fit,
 depth=fit]\\
\attachment[xml-mkiv.pdf]
[symbol=Default]\\
\attachment[xml-mkiv.pdf]
[symbol=Paperclip]\\
\attachment[xml-mkiv.pdf]
[symbol=Graph]\\
\attachment[xml-mkiv.pdf]
[symbol=Pushpin]\\
\stoptext

Symbols aren’t distorted with comments, although option "Default"
doesn’t seem to work well.

\setupinteraction[state=start]
\setuppapersize[A9]
\starttext
 \comment[xml-mkiv.pdf]\\
a\comment[xml-mkiv.pdf]
[symbol=Default]\\
b\comment[xml-mkiv.pdf]
[symbol=Newparagraph]\\
c\comment[xml-mkiv.pdf]
[symbol=Note]\\
d\comment[xml-mkiv.pdf]
[symbol=Insert]\\
e\comment[xml-mkiv.pdf]
[symbol=Help]\\
\stoptext


Can anyone confirm that all attachment symbols are distorted, except the
first one?

BTW, I’m using latest beta (2019.03.21 21:39).

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
___


[NTG-context] optional hyphenation patterns in ancient Greek

2019-03-24 Thread Pablo Rodriguez
Dear list (especially Thomas and Arthur),

I opened a request for optional hyphenation patterns at GitHub
(https://github.com/hyphenation/tex-hyphen/issues/34).

I’m not advocating changing the default, but only providing hyphenation
patterns that allow hyphenating consonant pairs that cannot be at the
word beginning.

I think it may make sense to discuss the issue there (@ GitHub).

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] Spacing between text and footnote line

2019-03-24 Thread Pablo Rodriguez
On 3/24/19 3:50 PM, Huseyin Özoguz wrote:
> [...]
> Thanks, but that does not work. It only changes the distance between the
> footnote-line and the footnote-text. But I want to manipulate the
> distance above the footnote-line: between the (standard) text and the
> footnote-line.

Hi Huseyin,

it isn’t clear (at least, to me) what you mean with the footnote line
(there is a rule for all footnotes).

I think that the "before" key from \setupnote does exactly what you say
you want: specify the distance between the rule and the main text.

You might use the "before" key in \setupnotation, but that will alter
the space before in all footnotes.

Maybe you might check the i-context.pdf document (on pages 233 and 234)
to check the options for both the \setupnotation (the individual note)
and \setupnote (the notes group). (It comes with the ConTeXt Suite
distribution, tex/texmf-context/tex/context/interface/mkiv/i-context.pdf)

Just in case it might 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
___


[NTG-context] new LuaTeX binaries in latest beta

2019-03-23 Thread Pablo Rodriguez
Dear list,

I have just downloaded the latest beta from the ConTeXt Suite and I
found that it includes the new LuaTeX binaries.

These ones fix the issue reported in
https://mailman.ntg.nl/pipermail/ntg-context/2019/094266.html.

Many thanks to each one involved in the timely release of each version
of the ConTeXt Suite,

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] inmargin for only Roman-numbered items

2019-03-20 Thread Pablo Rodriguez
On 3/20/19 8:50 PM, Wolfgang Schuster wrote:
> Pablo Rodriguez schrieb am 20.03.19 um 20:43:
>> [...]
>> Is there a way with a \setupitemize (or \setupitemgroup) to configure
>> only one kind of numbered (or unnumbered, for that matter) item groups?
>
> You have to create a new itemgroup environment/instance.
>
> \defineitemgroup [romanitemize]
> \setupitemgroup  [romanitemize] [R,inmargin]

Many thanks for your help, Wolfgang.

This is exactly what I needed.

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] inmargin for only Roman-numbered items

2019-03-20 Thread Pablo Rodriguez
On 3/20/19 8:09 PM, Wolfgang Schuster wrote:
> Pablo Rodriguez schrieb am 20.03.19 um 20:03:
>> [...]
>> Is there a way to get only [option=inmargin] for the items that are
>> Roman-numbered?
>
> \startitemize[I,inmargin]

Many thanks for your reply, Wolfgang.

I need a \setup... command, since I’m going to use it in an environment
file to typeset XML sources.

Is there a way with a \setupitemize (or \setupitemgroup) to configure
only one kind of numbered (or unnumbered, for that matter) item groups?

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
___


[NTG-context] inmargin for only Roman-numbered items

2019-03-20 Thread Pablo Rodriguez
Dear list,

I have the following sample:

\showframe
\setupitemize[each][option=inmargin]
\starttext
\startitemize[n]
\dorecurse{5}{\item item}
\stopitemize

\startitemize
\dorecurse{5}{\item item}
\stopitemize

\startitemize[I]
\dorecurse{5}{\item item}
\stopitemize
\stoptext

Is there a way to get only [option=inmargin] for the items that are
Roman-numbered?

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] single command for \ctxlua{context(...)}

2019-03-12 Thread Pablo Rodriguez
On 3/11/19 10:36 PM, Wolfgang Schuster wrote:
> Pablo Rodriguez schrieb am 11.03.19 um 22:23:
>> [...]
>> Is there a single command for \ctxlua{context(...)}?
> 
> \cldcontext{...}

Many thanks for your fast reply, Wolfgang.

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
___


[NTG-context] single command for \ctxlua{context(...)}

2019-03-11 Thread Pablo Rodriguez
Dear list,

I know this has been already posted to the list, but I cannot find it
right now.

Is there a single command for \ctxlua{context(...)}?

Many thanks for your help,

Pablo
-- 
http://www.ousia.tk
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[NTG-context] inmargin attachments from notes

2019-03-10 Thread Pablo Rodriguez
Dear list,

I have the following sample:

\setupinteraction[state=start]
\setupinteractionscreen[option=attachment]
\setuppapersize[A9, landscape]
\starttext
\footnote{attachment\attachment
[xml-mkiv.pdf]
[location=inmargin]}
\stoptext

Using latest beta (from 2019.03.05 15:40), I’m afraid that inmargin
attachments aren’t displayed in footnotes.

It makes no difference with

\setupnotation[footnote][alternative=serried]

Am I missing something or have I hit a bug?

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] expansion inside PDF annotations

2019-03-07 Thread Pablo Rodriguez
On 3/6/19 10:34 PM, Wolfgang Schuster wrote:
> Pablo Rodriguez schrieb am 05.03.19 um 17:44:
>> [...]
>>  \attachment
>>  [http://pragma-ade.com/general/manuals/xtables-mkiv.pdf]
>>  [author={Attached on \currentdate},
>>   title={Attached on \currentdate}]
>>
>> How can I get \currentdate expanded in the PDF annotation?
> 
> Can you try \rawdate[] (the argument is mandatory).

Many thanks for your reply, Wolfgang.

This works fine, but I’m afraid this is a workaround (I mean, I cannot
even add the the \currentime [not to mention other commands]).

Full expansion would be extremely useful with all features that are
enabled by \setupinteraction.

I reported this issue before:
https://mailman.ntg.nl/pipermail/ntg-context/2017/089035.html.

Sorry, I don’t know whether this is real full expansion or prerolling.
This is the way Hans names both directives for bookmarks and PDF
document information:

\enabledirectives[interaction.identity.preroll]
\enabledirectives[references.bookmarks.preroll]

In any case, I think there is a good use for commands inside interactive
contents in ConTeXt.

Many thanks for your help,

Pablo
-- 
http://www.ousia.tk
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] issue with \startattachment...\stopattachment

2019-03-05 Thread Pablo Rodriguez
On 3/5/19 9:17 PM, Wolfgang Schuster wrote:
> Pablo Rodriguez schrieb am 05.03.19 um 20:57:
>> [...]
>> I have a question: shouldn’t be “Attached file.” typeset on the main text?
> 
> No because
> 
> \startattachment ... \stopattachment
> 
> is the same as
> 
> \startbuffer[...] ... \stopbuffer
> 
> \attachment[buffer=...]
> 
> where you combine the buffer and \attachment in a single construct.

Many thanks for your reply, Wolfgang.

I thought it could be used as a kind of link.

> This does also mean the argument you pass to \startattachment is wrong.
Of course, I was thinking of something different.

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
___


[NTG-context] issue with \startattachment...\stopattachment

2019-03-05 Thread Pablo Rodriguez
Dear list,

I have the following sample:

\setupinteraction[state=start]
\starttext
\startTEXpage[offset=1em]
\startattachment
[http://pragma-ade.com/general/manuals/xtables-mkiv.pdf]
Attached file.
\stopattachment
Attached on \currentdate.
\stopTEXpage
\stoptext

I have a question: shouldn’t be “Attached file.” typeset on the main text?

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
___


[NTG-context] expansion inside PDF annotations

2019-03-05 Thread Pablo Rodriguez
Dear list,

I have the following sample:

\setupinteraction[state=start]
\starttext
\startTEXpage[offset=1em]
Attached on \currentdate.
\attachment
[http://pragma-ade.com/general/manuals/xtables-mkiv.pdf]
[author={Attached on \currentdate},
 title={Attached on \currentdate}]
\stopTEXpage
\stoptext

How can I get \currentdate expanded in the PDF annotation?

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
___


[NTG-context] attachment from URL

2019-03-05 Thread Pablo Rodriguez
Dear list,

I have the following sample:

\setupinteraction[state=start]
\setupinteractionscreen[option=attachment]
\starttext
\attachment

[https://eur-lex.europa.eu/legal-content/ES/TXT/PDF/?uri=CELEX:12016E/TXT]
[name=TFUE.pdf]
\stoptext

Is there a way that curl may download it to the specified name?

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
___


[NTG-context] (huge thanks) attaching files from links

2019-03-04 Thread Pablo Rodriguez
Dear list,

I was about to ask how to attach a file from links and I just discovered
that it works perfectly fine.

  \attachment[http://pragma-ade.com/general/manuals/xtables-mkiv.pdf]

I just wanted to thank Hans and all developers for the awesome work with
ConTeXt and LuaTeX. They are outstanding pieces of code.

Sorry for not expressing this clearer and more often.

Many thanks again for your work and your help,

Pablo

PS: I wonder whether ConTeXt/LuaTeX might do my laundry, the dishes,
home cleaning or cooking... .
-- 
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] util-sha.lua misbehaving?

2019-03-04 Thread Pablo Rodriguez
On 3/4/19 9:20 PM, Hans Hagen wrote:
> On 3/4/2019 6:48 PM, Pablo Rodriguez wrote:
>> [...]
>> Sorry for the impatience (the feature is essential for me): when could
>> be the new version expected a beta or stable version of the ConTeXt Suite?
> we found the issue last week so it should be in the garden soon; but you 
> can always use the util-sha.lua method by commenting the test at the top 
> which will then force the lua method

If the new version arrivese to the garden soon, I can wait.

Just for the record, forcing the Lua method (many thanks for the advice)
is much slower (unless I’m doing something wrong [≈ ×20 slower]).

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] util-sha.lua misbehaving?

2019-03-04 Thread Pablo Rodriguez
On 3/4/19 7:33 PM, luigi scarso wrote:
> [...]
>  what does 
> $ luatex --credits 
> say ?

$ luatex --credits
This is LuaTeX, Version 1.09.2 (TeX Live 2019/dev)
[...]
Development id: 7075

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] util-sha.lua misbehaving?

2019-03-04 Thread Pablo Rodriguez
On 3/4/19 7:12 PM, luigi scarso wrote:
> [...] 
> Sorry for the impatience (the feature is essential for me): when could
> be the new version expected a beta or stable version of the ConTeXt
> Suite?
>  
> r7090 | luigi.sca...@gmail.com  |
> 2019-02-28 23:52:43 +0100 (Thu, 28 Feb 2019) | 1 line
> 
> fixed a bug in SHS512 -- trunk 
> 
> Could be that it's  already in beta --- can you check  ?

I have just checked and it isn’t there.

If it is planned for next beta (or stable), I‘ll wait for it.

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] util-sha.lua misbehaving?

2019-03-04 Thread Pablo Rodriguez
On 3/4/19 4:34 PM, luigi scarso wrote:
> On Thu, Feb 28, 2019 at 10:37 PM Hans Hagen wrote:
> 
> On 2/28/2019 6:46 PM, Pablo Rodriguez wrote:
> > Dear list,
> 
> > Could anyone tell me what I am missing here?
> it's bug in the engine ... as a workaround you can uncomment th etop
> lines in util-sha and fall back on pure lua
> 
> it should be fixed  now.

Many thanks for the fix, Luigi.

Sorry for the impatience (the feature is essential for me): when could
be the new version expected a beta or stable version of the ConTeXt Suite?

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
___


[NTG-context] util-sha.lua misbehaving?

2019-02-28 Thread Pablo Rodriguez
Dear list,

I have the following sample:

\startluacode
function document.capture(cmd, raw)
local f = assert(io.popen(cmd, 'r'))
local s = assert(f:read('*a'))
f:close()
if raw then return s end
s = string.gsub(s, '^%s+', '')
s = string.gsub(s, '%s+$', '')
s = string.gsub(s, '[\n\r]+', ' ')
return s
end

function document.sha512(file)
command_output= document.capture("sha512sum -b " .. file)
context(command_output:sub(0,8))
end
\stopluacode

\def\shafive#1{\ctxlua{document.sha512("#1")}}

\doif{\luaversion}{5.3}{\ctxlua{require("util-sha")}}

\def\hashfive#1{%
\ctxlua{context(
utilities.sha2.hash512("#1"):sub(0,8))}}

\def\hashfivefile#1{%
\ctxlua{context(
utilities.sha2.hash512(io.loaddata("#1")):sub(0,8))}}

\def\cB{i-context.pdf}

\starttext
\startTEXpage[offset=2em]
\tt i-context.pdf\ss:
\doifelse{\luaversion}{5.3}
{\hashfivefile{\cB}\\
 {\rm text: }\hashfive{\cB}}
{\shafive{\cB}}
\stopTEXpage
\stoptext

Just accidentally, I discovered today (using latest beta from 2019.02.26
20:04) that file hashing may be wrong in ConTeXt. For the sake of
brevity, I only use the 8 first chars.

"sha512sum i-context.pdf" gives c4cc3840. Using luajittex, I get that
result. But using Lua 5.3 (and util-sha.lua), I get 44241e9d.

I don’t know whether my invocation of io.loaddata is wrong, since the
SHA512 for the text "i-context.pdf" is 2ac2778b, which is the same
result as https://duckduckgo.com/?q=sha512+i-context.pdf.

After discovering that io.loaddata is from l-io.lua, I don’t know what I
may be doing wrong.

This is an essential feature for me in ConTeXt, since it is the way of
showing the integrity of the attached files to a PDF document (mainly
digitally signed documents).

Could anyone tell me what I am missing here?

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] cross references to chapters in a book

2019-02-25 Thread Pablo Rodriguez
On 2/23/19 10:51 AM, Wolfgang Schuster wrote:
> [...]
>> Is this because I am using MkII with XeTeX?
> 
> Is there a reason why you stick with MkII or XeTeX.

Hi Wolfgang,

support for Indic languages seems to be the reason to use MkII.

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] markdown module vs pandoc

2019-02-22 Thread Pablo Rodriguez
On 2/21/19 9:59 PM, Gour wrote:
> On Thu, 21 Feb 2019 18:50:41 +0100 Pablo Rodriguez wrote:
> 
>> I’m still behind the environment itself, although I realized that
>> these may not be relevant to everybody. I store the new commits in a
>> private repository.
> 
> Aha...I believe I might be interested. :-)

Hi Gour,

the code in my private repository is unnecessarily complex for too
narrow cases.

I think that the most valuable feature of environment itself (the file
'pandoc-xhtml.tex') is the practical introduction to “Dealing with XML
in ConTeXt” (http://pragma-ade.com/general/manuals/xml-mkiv.pdf).

>> I use the XML handling (generating the XHTML with pandoc) in ConTeXt
>> for almost all the documents I compile with ConTeXt. I think this is
>> the way to go.
> 
> I admit it sounds/looks very good. Morever, it could allow me to e.g. use
> org-mode for my original markup which I use anyway with Emacs and then do
> org-mode --> XHTML.

ConTeXt only requires XML source as input to typeset it.

>> My environment is only an example. You may write another one for your
>> own needs, you don’t have to use mine.
> 
> Heh, for that I must learn some things first. :-)

The published code is fine for what you want. The latest version would
be misleading. It is crappy in many aspects (even for myself).

>> There are other options, but LaTeX is a real problem for the
>> development of pandoc, because many times users expect pandoc as a
>> layer that spares them the actual dealing with LaTeX.
> 
> ConTeXt is certainly more appealing..

ConTeXt deals with XML natively.

Cheers,

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] markdown module vs pandoc

2019-02-21 Thread Pablo Rodriguez
On 2/19/19 2:22 PM, Gour wrote:
> On Mon, 18 Feb 2019 17:08:44 +0100 Pablo Rodriguez wrote:
> [...] 
>> I convert Markdown to XHTML and then I compile the XML sources with
>> ConTeXt.
> 
> I've tried it and it works nicely. The possibility to have one-source-does-all
> is tempting. ;)
> 
> Now I wonder if you're still behind the tool and/or whether it is still
> actively used by you?

Hi Gour,

sorry for my delayed reply.

I’m still behind the environment itself, although I realized that these
may not be relevant to everybody. I store the new commits in a private
repository.

I use the XML handling (generating the XHTML with pandoc) in ConTeXt for
almost all the documents I compile with ConTeXt. I think this is the way
to go.

My environment is only an example. You may write another one for your
own needs, you don’t have to use mine.

> Another question for both you and Aditya in regard to the point made by Mojca
> (suggesting to use Asciidoc markup) is whether you find that Pandoc's
> (extended) Markdown is semantically rich-enough to cover more complex 
> documents
> or in such cases it would be better to use richer markup like Asciidoc or 
> simpy
> to directly use ConTeXt?

I use extended Markdown even for typesetting a ConTeXt introduction in
Spanish (http://www.aprender-context.tk/).

But there are some basic features that I miss from extended Markdown:

- A lightweight syntax for language (such as [Deutsch]{:de}).
- The ability to place the table of contents.
- The ability to place the footnotes/endnotes.

There may be others, but these are the three ones that first came to my
mind.

> So far, one thing is clear: ConTeXt is the way to go instead of LaTeX and 
> other
> options, but now have to resolve whether to use pandoc's markdown, AsciiDoc or
> just ConTeXt...

There are other options, but LaTeX is a real problem for the development
of pandoc, because many times users expect pandoc as a layer that spares
them the actual dealing with LaTeX.

(La)TeX input sources and XML markup are diverse, this is why I think
that pandoc should generate PDF documents from XML sources (and forget
about (La)TeX support).

But this is only my personal opinion. I hope it might help.

Cheers,

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] interactive tests with AcroJS

2019-02-18 Thread Pablo Rodriguez
On 2/12/19 10:58 AM, Hans Hagen wrote:
> On 2/11/2019 8:16 PM, Pablo Rodriguez wrote:
>> Dear list,
>>
>> is there any way that I can generate PDF document with ConTeXt
>> containing a test with questions and multiple-choice answers and that
>> the user can check the right and wrong answers (using AcroJS)?
>> [...]
>
> i think i have demo code somewhere for that but i haven't played with 
> these javascript driven features for a while (only acrobat anyway)

Many thanks for your reply, Hans.

It would be great to have that code to start experimenting with it.

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] markdown module vs pandoc

2019-02-18 Thread Pablo Rodriguez
On 2/14/19 11:00 PM, Gour wrote:
> Hello,
> 
> I'm interested for using markdown markup and typeset such documents via
> ConTeXt, but wonder whether it is recommended to use Markdown module or do
> markdown --> ConTeXt via Pandoc?

Hi Gour,

I convert Markdown to XHTML and then I compile the XML sources with ConTeXt.

I describe the method at http://www.from-pandoc-to-context.tk/.

Just in case it might 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
___


[NTG-context] interactive tests with AcroJS

2019-02-11 Thread Pablo Rodriguez
Dear list,

is there any way that I can generate PDF document with ConTeXt
containing a test with questions and multiple-choice answers and that
the user can check the right and wrong answers (using AcroJS)?

Sorry for the too general question, but I think it is clear enough.

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] Creating business cards with CSV

2019-02-11 Thread Pablo Rodriguez
On 2/10/19 11:01 AM, Jan U. Hasecke wrote:
> Thanks Pablo,
> 
> great documentation and just the tool I was looking for.

Jan Ulrich,

Jaroslav Hajtmar has done a great job with the handlecsv module.

I have used it and I find it extremely useful. The least I could do was
to write the documentation.

Cheers,

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] Creating business cards with CSV

2019-02-08 Thread Pablo Rodriguez
On 2/7/19 2:27 PM, Jan U. Hasecke wrote:
> Hi all,
> 
> I found some hints to CSV in the wiki, but they all refer to tables.
> 
> What are the building block to create business cards from a csv file?
Hi Jan Ulrich,

there is a module that does it (handlecsv, which comes with the ConTeXt
Suite [I wrote the documentation for it]):

I attach both the ConTeXt source and a sample CSV file. It could be a
good starting point.

Just in case it helps,

Pablo
-- 
http://www.ousia.tk
\usemodule[handlecsv]
\setheader
\opencsvfile{bscard.csv}

\starttext
\startbuffer[bscard]
\startTEXpage[offset=3em]
{\bf \Vorname\ \Name}\\
\Function

\blank

\Company\\
\Street\\
\PLZ-\City\\
\Country\\
Telefon: \TelNo\\
\eMail\\
\URLAddress
\stopTEXpage
\stopbuffer
\doloopif{\cA}{~=}{}{\getbuffer[bscard]}
\stoptext
"Vorname";"Name";"Function";"Company";"Street";"PLZ";"City";"Country";"TelNo";"eMail";"URLAddress"
"Mustermann";"Jan";"Assistant";"Boring";"25 Street";123;"Moscow";"Russian Federation";2323323;"j...@boring.com";"boring.com"
"Musterfrau";"Erika";"CEO";"Awesome";"993 Square Root";212;"Berlin";"Germany";8382939;"e...@awesome.com";"awesome.com"
___
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] 404 error: Not found for first-setup.sh

2019-02-08 Thread Pablo Rodriguez
On 2/8/19 7:02 PM, Marcus Vinicius Mesquita wrote:
> Hi, Taco
> 
> I tried again, but the server still answers with a 404 error. 

Hi Marcus,

I have just updated my ConTeXt Suite to its latest beta.

And the following command downloads the file (I don’t have wget installed):

  $ curl -O http://minimals.contextgarden.net/setup/first-setup.sh

Just in case it helps,

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] Making ConTeXt stop on all or some errors

2019-02-06 Thread Pablo Rodriguez
On 2/5/19 8:07 AM, Jan U. Hasecke wrote:
> Hola Pablo,

Hallo Jan-Ulrich,

> I inserted this in the setupbackend command so that ConTeXt stops with
> the unknown command \colorprofilenotfound I inserted in the else clause.
> 
> But more and more I think that ConTeXt should fail if it does not find
> the color profile, because if you forget to study the log file before
> sending the pdf to the print shop you can loose a lot of money.

But the scenarios in which you could loose a lot of money are many more
than you might think.

Imagine the following:

\startbuffer
A Greek sentence:
χαλεπὰ τὰ καλά
\stopbuffer
\definefallbackfamily[mainface][rm][GFS Didoto]
[preset=range:greek]
\definefontfamily[mainface][rm][Latin Modern Roman]
\definefallbackfamily[amainface][rm][GFS Didot]
[preset=range:greek]
\definefontfamily[amainface][rm][TeX Gyre Pagella]
\definefallbackfamily[smainface][rm][GFS Didot]
[preset=range:greek, force=yes]
\definefontfamily[smainface][rm][TeX Gyre Pagella]
\setupbodyfont[mainface]
\starttext
\startTEXpage[offset=2em]
\getbuffer\\
\amainface\getbuffer\\
\smainface\getbuffer
\stopTEXpage
\stoptext

Not embedding all glyphs for the fallback font (failing to type
"force=yes") could lead to weird results. Not to mention when a font
isn’t embedded at all.

> And as we use ConTeXt in a group where people have different ConTeXt
> knowledge the generation should be bullet proofed.

I totally agree with that. But it mainly relies on how source documents
are written. ConTeXt cannot type the source for us.

> The behaviour of ConTeXt is AFAICS the following.
> If you install icc-profiles in texmf-context they get lost during the
> next update of ConTeXt. But ConTeXt will not stop the complilation only
> warning that there is no profile file.
> 
> ConTeXt only stops to compile if you delete a profile which was present
> during installation/update or which was present during a "mtxrun
> --generate" (Thanks to Mojca for this hint). Then the file is registered
> and ConTeXt wants to access it, failing if it is not there.
> 
> If you install profiles in texmf-local and then do a "mtxrun --generate"
> you are quite safe as long as you do not install ConTeXt from scratch.

No computer can read your mind. Or a brand-new installation cannot guess
whether you are up to some auxiliary files (name them color profiles,
fonts, or whatever you want).

> If you want to compile a ConTeXt project on an other computer you have
> to study the log file to see that it does not find a color profile. And
> this is dangerous, because none expects this to be a problem. I think
> ConTeXt should fail and stop if the profile is not there.

But checking if the file exists is a safe way to know whehter it can be
embedded in the output PDF document.

Another scenario would be attaching files to a PDF document using the
\attachment command. I have done it myself.

With some of my documents, I had to attach a variable number of extra
documents to the final PDF. The only way to secure the attachment was
\doiffileelse{file.pdf}{\attach[file.pdf]}{\ssbf\color[red]{missing
attachment}}.

Just in case it helps,

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] Making ConTeXt stop on all or some errors

2019-02-04 Thread Pablo Rodriguez
On 2/4/19 7:30 AM, Jan U. Hasecke wrote:
> Hi all,
> 
> yesterday I asked about where to put color profiles.
> 
> My problem was that ConTeXt for some unknown reason didn't find the
> color profiles I downloaded. But most annoying was the fact that I
> didn't saw the error in the log because ConTeXt only complains about not
> finding the profile.
> 
> Is there a way to make ConTeXt stop if it does not find the profile like
> it stops if I use a unknown command?
> 
> I want to avoid that we send a pdf without a profile to the print shop,
> because we overlook a message in the logs.

Hi Jan Ulrich,

maybe testing if the file is there may work for you.

Here is a sample:

\starttext
\doiffileelse{srgb.icc}{fine now}{\red\ss\bfd HUGE MISTAKE}

\doiffileelse{srgb.icca}{fine now}{\red\ss\bfd HUGE MISTAKE}
\stoptext

The first profile is provided within the ConTeXt Suite, the second one
is a wrong file name.

Just in case it might 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] fontloader error in latex: attempt to call upvalue 'getdirection' (a nil value)

2019-01-10 Thread Pablo Rodriguez
On 1/7/19 12:40 AM, Ulrike Fischer wrote:
> I just tried to import the fontloader from 2019-01-03 into latex,
> and get on a simple document the error
> 
>  (./test-utf8.aux)error:
> ...ad/texmf/tex/luatex/luaotfload/fontloader-2019-01-03.lua:23868:
> attempt to call upvalue 'getdirection' (a nil value)
> [...]
> I have no idea (yet) if this is latex specific or if it could affect
> context too but thought I better mention it. The line refers to this
> part of the code:
> 
>   pardirstate=function(start)
> local nxt=getnext(start)
> local dir=getdirection(start) --<--
> if dir==lefttoright then
>   return nxt,1,1

Many thanks for your report, Ulrike.

This was the same problem that prevented the compilation of the
following code:

\setupdirections[bidi=on, method=two]
\starttext
\input zapf
\stoptext

After your report, Hans fixed the issue (which I tried to report twice,
but the mailing list rejected my messages).

Many thanks for your report and for the fix from Hans,

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
___

[NTG-context] issue with backend.date

2019-01-10 Thread Pablo Rodriguez
Dear list,

I have the following sample:

\enabledirectives[backend.date=no]
\enabledirectives[backend.info=no]
\enabledirectives[backend.xmp=no]
\starttext
a
\stoptext

At least, backend.date doesn’t work with latest beta (2019.01.07 16:10)
as it used to work before.

I think this might be a bug.

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
___

[NTG-context] issue with initial

2018-12-20 Thread Pablo Rodriguez
Dear list,

I have the following sample:

\definefallbackfamily
[mainface]
[rm]
[GFS Didot]
[preset=range:greek, force=yes]

\definefontfamily
[mainface]
[rm]
[TeX Gyre Pagella]

\setupbodyfont[mainface]

\starttext
\setinitial
Πρῶτον

\blank[5*big]\setinitial
Ὄνομα
\stoptext

I’m afraid I cannot get an initial with a fallback font and a glyph in
the Unicode block for extended Greek.

I think it might be a bug. Sorry for insisting.

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
___

[NTG-context] fallback family not working for \setinitial

2018-12-19 Thread Pablo Rodriguez
Dear list,

I have the following sample:

\mainlanguage[agr]

\setuppapersize[A5]

\definefallbackfamily
[mainface]
[rm]
[GFS Didot]
[preset=range:greek, force=yes]

\definefontfamily
[mainface]
[rm]
[TeX Gyre Pagella]

\setupbodyfont[mainface]

\starttext
\setinitial
Πρῶτον δεῖ θέσθαι τί ὄνομα καὶ τί ῥῆμα, ἔπειτα τί ἐστιν ἀπόφασις
καὶ κατάφασις καὶ ἀπόφανσις καὶ λόγος.

\blank\setinitial
Ὄνομα μὲν οὖν ἐστὶ φωνὴ σημαντικὴ κατὰ συνθήκην ἄνευ χρόνου, ἧς
μηδὲν μέρος ἐστὶ σημαντικὸν κεχωρισμένον·
\stoptext

When the initial is a character from the extended Greek Unicode block,
the fallback family doesn’t work for that initial.

Could anyone confirm that this is a bug?

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

2018-12-18 Thread Pablo Rodriguez
On 12/18/18 12:01 PM, Tomas Hala wrote:
> Hi all,
> 
> I would like to detect hyphen points in a paragraph.
> I hoped that the plain \showhyphens{text} can do it
> but it displays nothing. Is this plain macro available yet,
> or is it covered by other command?

Hi Tomáš,

\hyphenatedword is the command that you need.

I hope it helps,

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] Monospace fallback kerning

2018-12-11 Thread Pablo Rodriguez
On 12/11/18 3:05 PM, Hans Åberg wrote:
> In the example below, multiple spaces do not use the spacing of the
> fallback font for multiple spaces, but instead of the main font it
> seems, despite the ASCII U+0020 being in the forced override. So the
> question is how to force ConTeXt to use the fallback font also for
> multiple spaces.
Hi Hans,

what are you trying to do?

Sorry, but I’m afraid that ConTeXt doesn’t spaces as glyphs.

Would it be easier that you use a proper mono font for typing?

Pablo



> —
> \definefallbackfamily [mainface] [mono] [courier] 
> [range={-00FF},force=yes]
> 
> \definefontfamily [mainface][serif][stix]
> \definefontfamily [mainface][mono][stix]
> \definefontfamily [mainface][math][stix]
> 
> \setupbodyfont[mainface,10pt]
> 
> \starttext
> 
> \starttyping
>   code   code
> . code . code
> . code   code
> code
> . . code
>   code
> . . . code
> code
> . . . . code
>   code
> . code
> \stoptyping
> 
> \stoptext
> —
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> ___
> 


-- 
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] issue with optical bounds (OpenType)

2018-12-10 Thread Pablo Rodriguez
On 12/10/18 10:51 AM, Hans Hagen wrote:
> On 12/9/2018 8:54 PM, Pablo Rodriguez wrote:
>> []
>> My own vectors wouldn’t solve the issue, because the variable would be:
>>
>> lfbd(Ὧ) = glyph.width(Ω) - glyph.width(Ὧ)
>>
>> I need to place glyphs accurately, not characters. Character dimensions
>> wouldn’t help to get hanging diacritics.
> 
> well, these dimensions are available so one could use them in 
> constructing additional lfbd feature specifications (add f eatures 
> runtime)

Many thanks for your reply, Hans.

In order to modify the fonts, it would be helpful to have a function
that can substract two glyph widths of a given font, such as:

function document.hanging_diacritics(char_one, char_two)
return (char_one.glyphwidth - char_two.glyphwidth)
end

I don’t have any idea about how to do it. This way I don’t have to
calculate the value for each glyph feature and I can simply add the
values to the font.

BTW, what kind of specifications you think can be constructed for the
lfbd feature (sorry, but I don’t get it).

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] issue with optical bounds (OpenType)

2018-12-09 Thread Pablo Rodriguez
On 12/9/18 6:53 PM, Hans Hagen wrote:
> On 12/9/2018 5:35 PM, Pablo Rodriguez wrote:
>> [...]
>> -Is there any way that I can apply pure raw lfbd/rtbd values to
>> protrusion with no other protrusion calculation at all in opbd?
> 
> you can create your own vectors if you want

My own vectors wouldn’t solve the issue, because the variable would be:

   lfbd(Ὧ) = glyph.width(Ω) - glyph.width(Ὧ)

I need to place glyphs accurately, not characters. Character dimensions
wouldn’t help to get hanging diacritics.

>> -In order to avoid editing all the Greek fonts to get hanging
>> diacritics: is there any way to replicate the lfbd feature with
>> "fonts.handlers.otf.addfeature"?
> 
> probably with some lua magic one can do a lot but these are typical 
> things i do when i need them (also because one needs to check the whole 
> of unicode and cook up categories, this kind of stuff is: do it all 
> robust and well or don't do it; also one doesn't know how consistent 
> font designs are)

The variable is so simple that the glyph with diacritical marks should
be placed in the beginning of the line as it had no such marks.

If the font has all glyphs for uppercase letters with the same width for
the letter strokes, a general approach (such as the menttioned above, I
guess it) would work.

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] issue with optical bounds (OpenType)

2018-12-09 Thread Pablo Rodriguez
On 12/9/18 2:22 PM, Hans Hagen wrote:
>> [...]
> you confuse mechanism:
> 
> - protrusion only happen at the start and end of the line
> - kerning (like single does) happens everywhere
> 
> so, you need to extend "lfbd" and not use some own kerning feature 
> "leftbounds" which applyu it everywhere while "lfbd" is treated special 
> i.e. sets the protrusion values (when "opbd" is enabled) ... no other 
> way to do this

In that case, I have some questions:

-Is it possible to enable standard protrusion with opbd? (I mean, I
don’t any other character protruded when opbd is enabled.)

-Is there any way that I can apply pure raw lfbd/rtbd values to
protrusion with no other protrusion calculation at all in opbd?

-In order to avoid editing all the Greek fonts to get hanging
diacritics: is there any way to replicate the lfbd feature with
"fonts.handlers.otf.addfeature"?

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] fontfamily not loaded anymore

2018-12-09 Thread Pablo Rodriguez
On 12/9/18 1:52 PM, Wolfgang Schuster wrote:
> Hi Pablo,
> 
> where did you get the files for GFS Didot from because all packages
> I found use the name GFSDidot.otf for the upright style of the font while
> you have a file with the name GFSDidot-Regular.otf on your system.

Hi Wolfgang,

I modified the font myself to add OpenType lfbd values, but the problem
is that I created a new  font (Typographica Didot) with the same XUID
and UniqueID as the already existing GFSDidot.odt.

Although FontForge reported not using them, renewing thee value of the
XUID for Typographica Didot solved the problem.

Sorry for the noise,

Pablo


> Pablo Rodriguez schrieb am 09.12.18 um 09:02:
>> Dear list,
>>
>> I have the following source:
>>
>>  \definefontfamily[mainface][rm][GFS Bodoni]
>>  \definefontfamily[mainface][hw][GFS Artemisia]
>>  \definefontfamily[mainface][ss][GFS Neohellenic]
>>  \definefontfamily[mainface][tt][GFS Didot]
>>  %[tf=file:{GFSDidot-Regular.otf}]
>>  \setupbodyfont[mainface]
>>  \startbuffer
>>α β γ δ ε ζ\\
>>{\em α β γ δ ε ζ}\\
>>{\bf α β γ δ ε ζ}\\
>>{\bf α β γ δ ε ζ}\\
>>  \stopbuffer
>>  \starttext
>>\startTEXpage[offset=1em]
>>  \getbuffer
>>  \tt\getbuffer
>>  \ss\getbuffer
>>  \hw\getbuffer
>>\stopTEXpage
>>  \stoptext
>>
>> All typefaces are loaded fine, except GFS Didot. Unless I specify the
>> file for tf, any GFS Didot font isn’t loaded. I’m experiencing this with
>> the latest betas.
>>
>> The error I get from ConTeXt is:
>>
>> selectfont  > The requested font 'GFS Didot' has no files for the
>> 'tf' alternative, Latin Modern is used instead.
>>
>> "mtxrunjit --script --fonts --list --all" shows in the relevant lines:
>>
>> gfsartemisiabold  gfsartemisia   gfsartemisiabold   GFSArtemisiaBold.otf
>> gfsartemisiabolditalic   gfsdidot  gfsartemisiabolditalic
>> GFSArtemisiaBoldIt.otf
>> gfsartemisiaitalic  gfsartemisia   gfsartemisiaitalicGFSArtemisiaIt.otf
>> gfsartemisianormal  gfsartemisia   gfsartemisiaregular   GFSArtemisia.otf
>> gfsartemisiaregulargfsartemisia   gfsartemisiaregular   GFSArtemisia.otf
>> gfsbodonibold   gfsbodoni gfsbodoniboldGFSBodoniBold.otf
>> gfsbodonibolditalicgfsbodoni gfsbodonibolditalic   GFSBodoniBoldIt.otf
>> gfsbodoniitalic   gfsbodoni gfsbodoniitalic  GFSBodoniIt.otf
>> gfsbodoninormal   gfsbodoni gfsbodoniregular   GFSBodoni.otf
>> gfsbodoniregular  gfsbodoni gfsbodoniregular   GFSBodoni.otf
>> gfsdidotboldgfsdidot  gfsdidotbold   GFSDidotBold.otf
>> gfsdidotbolditalic  gfsdidot  gfsdidotbolditalicGFSDidotBoldItalic.otf
>> gfsdidotitalicgfsdidot  gfsdidotitalic   GFSDidotItalic.otf
>> gfsdidotnormalgfsdidot  gfsdidotregular  GFSDidot-Regular.otf
>> gfsdidotregular   gfsdidot  gfsdidotregular  GFSDidot-Regular.otf
>> gfsneohellenicbold  gfsneohellenic   gfsneohellenicbold
>> GFSNeohellenicBold.otf
>> gfsneohellenicbolditalic   gfsneohellenic   gfsneohellenicbolditalic
>> GFSNeohellenic-BoldItalic.otf
>> gfsneohellenicitalic   gfsneohellenic   gfsneohellenicitalic
>> GFSNeohellenicIt.otf
>> gfsneohellenicnormal   gfsneohellenic   gfsneohellenicregular
>> GFSNeohellenic.otf
>> gfsneohellenicregulargfsneohellenic   gfsneohellenicregular
>> GFSNeohellenic.otf
>>
>> Why is the specification of the file for the tf style with GFS Didot needed?
>>
>> 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] issue with optical bounds (OpenType)

2018-12-09 Thread Pablo Rodriguez
On 12/7/18 11:25 PM, Hans Hagen wrote:
> On 12/7/2018 9:14 PM, Pablo Rodriguez wrote:
>> [...]
>> The issue is that, although opbd values are used, that results from opbd
>> and from single placement in addfeature are different (although LuaTeX
>> reports the same values for lfbd).
> 
> because you implement it as kerning and not as opbd (protrusion is not 
> kerning) ... you can try to change the name to "lfbd" (if you would 
> enable lfbd as feature for sure you would get funny kerning so opbd 
> picks up from those instead)

If protrusion has to apply other values than the ones besides opbd, the
values for optical bounds aren’t reliable for accurate glyph
positioning. Sorry, but otherwise there is no need for optical margins
in OpenType (standard protrusion would be all that is needed).

Kerning might be selectively applied, such as in:

\startluacode
fonts.handlers.otf.addfeature {
name = "leftbounds",
type = "single",
data = {
Ἠ = { -212, 0, -212, 0 },
Ὧ = { -196, 0, -196, 0 },
}
}
\stopluacode
\definefontfeature[default][default][protrusion=quality]
\definefontfeature[leftbounds][leftbounds=yes]
\setupfirstline
   [alternative=word, n=1, style={\feature[+][leftbounds]}]
\showframe
\setuplayout[page]
\definefontfamily[mainface][rm][Typographica Old Standard]
\definefontfamily[mainface][tt][Latin Modern Mono]
\setupbodyfont[mainface, 300pt]
\setupalign[hanging]
\startbuffer
«a\par
«b\par
Ω\par
Ὧ\par
Ἠ\par
\stopbuffer
\starttext
\setupparagraphintro[each][\setfirstline]
\getbuffer
\stoptext

At least to get Greek hanging diacritics, I think this is the way to go.
It would be extremely useful to enable a \setuplineintro for verse.

It would be also useful to have a function that substracts the width of
two given glyphs. (This is exactly the amount to get hanging diacritics
properly kerned.)

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
___

[NTG-context] fontfamily not loaded anymore

2018-12-09 Thread Pablo Rodriguez
Dear list,

I have the following source:

\definefontfamily[mainface][rm][GFS Bodoni]
\definefontfamily[mainface][hw][GFS Artemisia]
\definefontfamily[mainface][ss][GFS Neohellenic]
\definefontfamily[mainface][tt][GFS Didot]
%[tf=file:{GFSDidot-Regular.otf}]
\setupbodyfont[mainface]
\startbuffer
  α β γ δ ε ζ\\
  {\em α β γ δ ε ζ}\\
  {\bf α β γ δ ε ζ}\\
  {\bf α β γ δ ε ζ}\\
\stopbuffer
\starttext
  \startTEXpage[offset=1em]
\getbuffer
\tt\getbuffer
\ss\getbuffer
\hw\getbuffer
  \stopTEXpage
\stoptext

All typefaces are loaded fine, except GFS Didot. Unless I specify the
file for tf, any GFS Didot font isn’t loaded. I’m experiencing this with
the latest betas.

The error I get from ConTeXt is:

selectfont  > The requested font 'GFS Didot' has no files for the
'tf' alternative, Latin Modern is used instead.

"mtxrunjit --script --fonts --list --all" shows in the relevant lines:

gfsartemisiabold  gfsartemisia   gfsartemisiabold   GFSArtemisiaBold.otf
gfsartemisiabolditalic   gfsdidot  gfsartemisiabolditalic
GFSArtemisiaBoldIt.otf
gfsartemisiaitalic  gfsartemisia   gfsartemisiaitalicGFSArtemisiaIt.otf
gfsartemisianormal  gfsartemisia   gfsartemisiaregular   GFSArtemisia.otf
gfsartemisiaregulargfsartemisia   gfsartemisiaregular   GFSArtemisia.otf
gfsbodonibold   gfsbodoni gfsbodoniboldGFSBodoniBold.otf
gfsbodonibolditalicgfsbodoni gfsbodonibolditalic   GFSBodoniBoldIt.otf
gfsbodoniitalic   gfsbodoni gfsbodoniitalic  GFSBodoniIt.otf
gfsbodoninormal   gfsbodoni gfsbodoniregular   GFSBodoni.otf
gfsbodoniregular  gfsbodoni gfsbodoniregular   GFSBodoni.otf
gfsdidotboldgfsdidot  gfsdidotbold   GFSDidotBold.otf
gfsdidotbolditalic  gfsdidot  gfsdidotbolditalicGFSDidotBoldItalic.otf
gfsdidotitalicgfsdidot  gfsdidotitalic   GFSDidotItalic.otf
gfsdidotnormalgfsdidot  gfsdidotregular  GFSDidot-Regular.otf
gfsdidotregular   gfsdidot  gfsdidotregular  GFSDidot-Regular.otf
gfsneohellenicbold  gfsneohellenic   gfsneohellenicbold
GFSNeohellenicBold.otf
gfsneohellenicbolditalic   gfsneohellenic   gfsneohellenicbolditalic
GFSNeohellenic-BoldItalic.otf
gfsneohellenicitalic   gfsneohellenic   gfsneohellenicitalic
GFSNeohellenicIt.otf
gfsneohellenicnormal   gfsneohellenic   gfsneohellenicregular
GFSNeohellenic.otf
gfsneohellenicregulargfsneohellenic   gfsneohellenicregular
GFSNeohellenic.otf

Why is the specification of the file for the tf style with GFS Didot needed?

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] issue with optical bounds (OpenType)

2018-12-07 Thread Pablo Rodriguez
On 12/7/18 8:15 PM, Hans Hagen wrote:
> On 12/7/2018 7:54 PM, Pablo Rodriguez wrote:
>> Shouldn’t be the output from both methods be exactly the same?
> 
> maybe you need to choose a script and/or language

Many thanks for your reply, Hans.

I modified the font myself and the Greek script is required and selected
(with the Latin script, that OT opbd property doesn’t work at all).

The issue is that, although opbd values are used, that results from opbd
and from single placement in addfeature are different (although LuaTeX
reports the same values for lfbd).

Just in case it helps,

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
___

[NTG-context] issue with optical bounds (OpenType)

2018-12-07 Thread Pablo Rodriguez
Dear list,

I’m experiencing a weird issue with optical bounds in OpenType.

Here you have the mandatory sample (font avaiable at
https://gitlab.com/ousia/greek-lfbd/raw/master/TypographicaOStandard-Regular.otf):

\startluacode
fonts.handlers.otf.addfeature {
name = "leftbounds",
type = "single",
data = {
Ἀ = { -32, 0, -32, 0 },
Ἁ = { -32, 0, -32, 0 },
Ἂ = { -70, 0, -70, 0 },
Ἃ = { -70, 0, -70, 0 },
Ἄ = { -50, 0, -50, 0 },
Ἅ = { -50, 0, -50, 0 },
Ἇ = { -42, 0, -42, 0 },
Ἆ = { -42, 0, -42, 0 },
Ἠ = { -212, 0, -212, 0 },
Ἡ = { -212, 0, -212, 0 },
Ἢ = { -258, 0, -258, 0 },
Ἣ = { -258, 0, -258, 0 },
Ἥ = { -286, 0, -286, 0 },
Ἤ = { -286, 0, -286, 0 },
Ἦ = { -246, 0, -246, 0 },
Ἧ = { -246, 0, -246, 0 },
Ὧ = { -196, 0, -196, 0 },
}
}
\stopluacode
\enabletrackers[fonts.protrusion]
\definefontfeature[default][default]
[script=greek, protrusion=quality, opbd=yes]
\definefontfeature[leftbounds][leftbounds=yes]
\showframe
\setuplayout[page]
\definefontfamily[mainface][rm][Typographica Old Standard]
\definefontfamily[mainface][tt][Latin Modern Mono]
\setupbodyfont[mainface, 300pt]
\setupalign[hanging]
\startbuffer
\ifnum\pagenumber=1{\ttxx opbd}\else{\ttxx -opbd}\fi\page
Ω\\
Ὧ\\
Α\\Ἀ\\Α\\Ἁ\\Α\\Ἂ\\Α\\Ἃ\\Α\\Ἄ\\Α\\Ἅ\\Α\\Ἆ\\Α\\Ἇ\\
Ἠ\\Η\\Ἡ\\Η\\Ἢ\\Η\\Ἣ\\Η\\Ἤ\\Η\\Ἥ\\Η\\Ἦ\\Η\\Ἧ\\Η
\stopbuffer
\starttext
\getbuffer

\setupalign[nothanging]
\feature[+][leftbounds]
\getbuffer
\stoptext

OpenType optical bounds are read from the font right:

fonts   > protrusions > left factor 1, right factor 1
fonts   > protrusions > setting left using lfbd
fonts   > protrusions > lfbd -> 0.032 Ἀ (U+01F08)
fonts   > protrusions > lfbd -> 0.032 Ἁ (U+01F09)
fonts   > protrusions > lfbd -> 0.070 Ἂ (U+01F0A)
fonts   > protrusions > lfbd -> 0.070 Ἃ (U+01F0B)
fonts   > protrusions > lfbd -> 0.050 Ἄ (U+01F0C)
fonts   > protrusions > lfbd -> 0.050 Ἅ (U+01F0D)
fonts   > protrusions > lfbd -> 0.042 Ἆ (U+01F0E)
fonts   > protrusions > lfbd -> 0.042 Ἇ (U+01F0F)
fonts   > protrusions > lfbd -> 0.196 Ὧ (U+01F6F)
fonts   > protrusions > lfbd -> 0.246 Ἧ (U+01F2F)
fonts   > protrusions > lfbd -> 0.286 Ἦ (U+01F2E)
fonts   > protrusions > lfbd -> 0.246 Ἥ (U+01F2D)
fonts   > protrusions > lfbd -> 0.258 Ἤ (U+01F2C)
fonts   > protrusions > lfbd -> 0.286 Ἣ (U+01F2B)
fonts   > protrusions > lfbd -> 0.258 Ἢ (U+01F2A)
fonts   > protrusions > lfbd -> 0.212 Ἡ (U+01F29)
fonts   > protrusions > lfbd -> 0.212 Ἠ (U+01F28)

I’m afraid that they aren’t applied accurately.

The same values are used with the property "leftbounds" and they are
perfect in that feature.

Shouldn’t be the output from both methods be exactly the same?

In all glyph pairs, both accented and unaccented glyphs should end in
exactly the same point.

I think this may be a bug, although I may be missing something.

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
___

[NTG-context] glyph width and bearings of a given glyph?

2018-12-06 Thread Pablo Rodriguez
Dear list,

how can I get the value in Lua of width and the bearings of a given
glyph (such as Ὧ)?

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] question about fonts.handlers.otf.addfeature

2018-12-06 Thread Pablo Rodriguez
On 12/6/18 11:03 PM, Hans Hagen wrote:
> On 12/6/2018 9:55 PM, Pablo Rodriguez wrote:
>> Dear list,
>>
>> as far as I know, fonts.handlers.otf.addfeature has the following types:
>> substitution, alternate, multiple, ligature, kern and chainsubstitution.
>>
>> Is there a type of feature that simply moves a single glyph when activated?
> 
> i think that there are examples in the test suite of pairwise or single 
> positioning

You are right, Hans.

\startluacode
fonts.handlers.otf.addfeature {
name = "stest",
type = "single",
data = {
a = { -500, 0, -500, 0 },
}
}
\stopluacode

Sorry, but I forgot to consider the test suite.

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
___

[NTG-context] question about fonts.handlers.otf.addfeature

2018-12-06 Thread Pablo Rodriguez
Dear list,

as far as I know, fonts.handlers.otf.addfeature has the following types:
substitution, alternate, multiple, ligature, kern and chainsubstitution.

Is there a type of feature that simply moves a single glyph when activated?

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
___

  1   2   3   4   5   6   7   8   9   10   >