Re: [NTG-context] [dev-context] type key in \setupattachment

2019-06-20 Thread Pablo Rodriguez
On 6/20/19 10:46 AM, Hans Hagen wrote:
> On 6/19/2019 9:28 PM, Pablo Rodriguez wrote:
>> [...]
>> Would it be possible that the \setupattachment command has a "type" key
>> to specify its MIME type? (Default should be "application/octet-stream"
>> [or so it seems].)
>
> there is a type key

Sorry, Wolfgang and Hans, this was totally my fault.

I even checked scrn-wid.mkiv (lines 76-93) and since I didn’t find
"type", I tought it wasn’t implemented (it’s on line 112.

Sorry for the noise again,

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] ancestors in lpath

2019-06-09 Thread Pablo Rodriguez
Dear list,

I have the following sample:

\startbuffer[demo]

  
Unit 1
text
  
  
Unit 1

  Summary
  summary


  Synopsis
  synopsis

  
  
Unit 2
text
  
  
Unit 2

  Summary
  summary


  Synopsis
  synopsis

  
  
Unit 3
text
  
  
Unit 3

  Summary
  summary


  Synopsis
  synopsis

  

\stopbuffer

\startxmlsetups xml:initialize
\xmlsetsetup{#1}{doc}{xml:*}
\xmlsetsetup{#1}{[contains(@class,'synopsis')]}
{xml:specialtitle}
\stopxmlsetups

\xmlregistersetup{xml:initialize}

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

\startxmlsetups xml:specialtitle
\startpar
  \xmltext{#1}{/h2}·
  \xmltext{#1}{../../div[contains(@class,'appendices')]/h1}
\stoppar
\stopxmlsetups

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

How should I rewrite "{../../div[contains(@class,'appendices')]/h1" to
get only the corresponding unit for each xml:specialtitle?

I need an ancestor, but I don’t know how to invoke 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] question about lpath

2019-06-09 Thread Pablo Rodriguez
On 6/9/19 12:14 PM, Hans Hagen wrote:
> On 6/8/2019 8:17 PM, Pablo Rodriguez wrote:
>> [...]
>>[contains(@class,'level2') and not contains(@id,'sinopsis')]
>>
>> Is there no way to get something as "@id~='sinopsis'" (which intends to
>> have the id attribute "not equal to" sinopsis) in an lpath?.
>
> did you try [. and not (@id == 'sinopsis') .]

Many thanks for your help, Hans.

I had no idea that there was such an option in lpaths.

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 lpath

2019-06-08 Thread Pablo Rodriguez
Dear list,

I have the following lpath:

  [contains(@class,'level2') and not contains(@id,'sinopsis')]

Is there no way to get something as "@id~='sinopsis'" (which intends to
have the id attribute "not equal to" sinopsis) in an lpath?.

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 in latest betas (MkIV & LMTX)

2019-06-02 Thread Pablo Rodriguez
On 6/2/19 2:12 PM, Hans Hagen wrote:
> On 6/2/2019 1:17 PM, Pablo Rodriguez wrote:
>> [...]
>> Compiling exactly the same XML sources (a book on ConTeXt in Spanish),
>> MkIV needs 40s and LMTX more than 52s.
>
> Hm. Is that the first time you compare a MKIV runs with an LMTX run for
> that document? I assume that you time multiple runs.

No, it isn’t the first time I compare and I time multiple runs.

>> This is the first time I get such a difference in compilation times.
>
> On the average LMTX should be faster than MKIV (and definitely not 20%
> slower). I assume it's regular luatex?

Sorry, this was my fault. I thought I was running luatex and it was
luajittex.

MkIV times with luatex are 51.x seconds, which is a tiny bit faster than
LMTX (52.x seconds). But this is perfectly normal.

>> I’m afraid I can’t be sure that output is the same, since different
>> spacing gives different page numbers.
>
> Not sure where that comes from. There are no fundamental changes wrr
> spacing.

Font expansion (as reported in
https://mailman.ntg.nl/pipermail/ntg-context/2019/095175.html).

>> I wonder whether this might be an issue.
> Hard to say without a MWE that exposes the same

Sorry for the noise,

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] Broken kerning if hz is turned on?

2019-06-02 Thread Pablo Rodriguez
On 6/2/19 12:47 PM, Hans Hagen wrote:
> On 6/2/2019 8:36 AM, Mikael P. Sundqvist wrote:
>
>> I attach the output (latest lmtx). The word "endast" shows up as "endas t".
> that one is too weird indeed, might be a bug

I get weird results using TeX Gyre Pagella with expansion.

I’m attaching a single page, typeset with LMTX
(http://pdf.ousia.tk/lmtx.pdf) and MkIV (http://pdf.ousia.tk/mkiv.pdf)
with a comparing file: http://pdf.ousia.tk/diff.pdf [I’m afraid the
total size is too much for attachments to the list]).

On the first line from the first paragraph, "pr" (from "proyecto") has
broken kerning, "al" has also broken kerning. At least "el" has wrong
kerning in the second line. On the third line, "de", "manera" (and I
would say "están" have kerning issues.

I think it is worth to print both pages and to check this on paper.

I don’t know what changed, but probably a default that outputs similar
text in LMTX to the one generated by MkIV would be great.

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
___


[NTG-context] XML in latest betas (MkIV & LMTX)

2019-06-02 Thread Pablo Rodriguez
Dear list,

I have just installed latest betas for both MkIV and LMTX.

Compiling exactly the same XML sources (a book on ConTeXt in Spanish),
MkIV needs 40s and LMTX more than 52s.

This is the first time I get such a difference in compilation times.

I’m afraid I can’t be sure that output is the same, since different
spacing gives different page numbers.

I wonder whether this might be an 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] bookmark expansion again

2019-05-28 Thread Pablo Rodriguez
On 5/27/19 8:46 PM, Wolfgang Schuster wrote:
> [...]
> You can try
>      \setuphead[section][expansion=yes]

Many thanks for your reply, Wolfgang.

This is exactly what I needed.

I promise I checked it (with "expansion=xml" mainly) and I saw no real
expansion.

But I missed something, since it works perfectly fine now.

> or (for documents which use XML as input format)
>      \setuphead[section][expansion=xml]

With "expansion=xml" I don’t get titles in text and bookmarks are wrong.

"expansion=xml" must be needed for something different (I wonder what
could be).

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] bookmark expansion again

2019-05-27 Thread Pablo Rodriguez
Hi Hans,

I have the following sample:

\def\eap{expansion}
\def\MyContent{Expanded \eap}
%~ \enabledirectives[references.bookmarks.preroll]
\setupinteraction[state=start, title={\MyContent}]
\placebookmarks[section]
\starttext
\section{\MyContent}
\startsection[title=\MyContent, bookmark=\MyContent]
\stopsection
\stoptext

I see that now PDF contents are prerolled by default (which I think it
is a great idea [I hope it isn’t a bug]).

But bookmarks alone (when aren’t prerolled. From strc-sec.mkiv, I see
that prerolling is only applied to \currentstructuretitle when
\currentstructurebookmark is empty.

Would it be possible that \currentstructurebookmark could have
prerolling when it is different from \currentstructuretitle?

Sorry for insisting, but I need this to avoid having "main:345{/h2}" as
bookmark for some 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
___


Re: [NTG-context] bug in beta from 2019.05.25 10:45

2019-05-27 Thread Pablo Rodriguez
On 5/26/19 10:12 PM, Hans Hagen wrote:
> On 5/26/2019 9:52 PM, Pablo Rodriguez wrote:
> [...]
> What if you wipe the whole cache?

I’m afraid it doesn’t work either.

But this is weird. I’m able to typeset whole books from XML sources with
environments using luajittex.

> I see you use luajittex. What with luatex?

It works perfectly fine with luatex.

Probably I should move to pure LuaTeX.

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] bug in beta from 2019.05.25 10:45

2019-05-26 Thread Pablo Rodriguez
On 5/26/19 1:49 PM, Hans Hagen wrote:
> On 5/26/2019 10:56 AM, Pablo Rodriguez wrote:
>> \starttext
>>  \input zapf
>>  \stoptext
>
> no error here .. is that really the whole example?

It is the whole example.

I’m attaching the four files.

Just in case it might help,

Pablo
--
http://www.ousia.tk
return {
 ["filename"]="untitled.tex",
 ["lastcontext"]="\
 \\shipoutscratchbox \
\
\\page_shipout_box #1->\\clf_shipoutpage #1\
  \\relax \\global \\setbox #1\\emptybox \\global \\deadcy...\
\\page_shipouts_normal ...hbox }}\\page_shipout_box \\shipoutscratchbox \
  \\else \\page_shipouts_ignor...\
\\page_boxes_shipout ...\\shipoutscratchbox \\box \\shipoutscratchbox }\
  \\fi \\setnextrealpageno \\th...\
\\page_otr_construct_and_shipout ..._shipout {\\page_boxes_constructed_page #1#2}\
  \\page_otr_flush_pending_co...\
\\page_sides_output_routine ->\\page_otr_command_side_float_output \
 \\ifconditional \\c_page_sides_short ...\
...\
l.3 \\stoptext\
",
 ["lastluaerror"]="...ce0dde776fb1556f32e/formats/luajittex/lpdf-ini-macro.lua:1029: attempt to call upvalue 'pdfsetpageresources' (a nil value)",
 ["lasttexerror"]="?",
 ["linenumber"]=1,
 ["luaerrorline"]="1029",
 ["offset"]=10,
}

untitled.pdf
Description: Adobe PDF document
open source > level 1, order 1, name '/home/ousia/ctxbeta/tex/texmf-context/tex/context/base/mkiv/cont-yes.mkiv'
system  >
system  > ConTeXt  ver: 2019.05.25 10:45 MKIV beta  fmt: 2019.5.26  int: english/english
system  >
system  > 'cont-new.mkiv' loaded
open source > level 2, order 2, name '/home/ousia/ctxbeta/tex/texmf-context/tex/context/base/mkiv/cont-new.mkiv'
system  > beware: some patches loaded from cont-new.mkiv
close source> level 2, order 2, name '/home/ousia/ctxbeta/tex/texmf-context/tex/context/base/mkiv/cont-new.mkiv'
system  > files > jobname 'untitled', input './untitled.xml', result 'untitled'
fonts   > latin modern fonts are not preloaded
languages   > language 'en' is active
open source > level 2, order 3, name 'untitled.tex'
fonts   > preloading latin modern fonts (second stage)
fonts   > 'fallback modern-designsize rm 12pt' is loaded
open source > level 3, order 4, name '/home/ousia/ctxbeta/tex/texmf-context/tex/context/sample/common/zapf.tex'
close source> level 3, order 4, name '/home/ousia/ctxbeta/tex/texmf-context/tex/context/sample/common/zapf.tex'
backend > xmp > using file '/home/ousia/ctxbeta/tex/texmf-context/tex/context/base/mkiv/lpdf-pdx.xml'

lua error   > lua error on line 1 in file untitled.tex:

...ce0dde776fb1556f32e/formats/luajittex/lpdf-ini-macro.lua:1029: attempt to call upvalue 'pdfsetpageresources' (a nil value)

1 >>  \starttext
2 \input zapf
3 \stoptext
4

\starttext
\input zapf
\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
___


Re: [NTG-context] Typesetting Markdown

2019-05-26 Thread Pablo Rodriguez
On 5/25/19 9:54 PM, Thangalin wrote:
>[...]
> For the document language, Pandoc provides language variables:
>
> https://pandoc.org/MANUAL.html#language-variables
> [...]
> Intermixing languages is also possible, as per the above link.

As far as I can remember, neither of them were available when I wrote
that (for ConTeXt, I mean).

I think that TeX output is the main problem in the development of
pandoc, because XML is so different from TeX.

But this is another issue and it doesn’t belong here.

Looking forward to seeing your sources and your output documents!

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] bug in beta from 2019.05.25 10:45

2019-05-26 Thread Pablo Rodriguez
On 5/26/19 10:56 AM, Pablo Rodriguez wrote:
> [...]
> And here the error I get:
>
> lua error   > lua error on line 1 in file a.tex:
> ...ce0dde776fb1556f32e/formats/luajittex/lpdf-ini-macro.lua:1029:
>  attempt to call upvalue 'pdfsetpageresources' (a nil value)
>  1 >>  \starttext

BTW, I have just noticed that this only affects to MkIV, not to LMTX.

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] bug in beta from 2019.05.25 10:45

2019-05-26 Thread Pablo Rodriguez
Hi Hans,

here is my minimal sample:

\starttext
\input zapf
\stoptext

And here the error I get:

lua error   > lua error on line 1 in file a.tex:
...ce0dde776fb1556f32e/formats/luajittex/lpdf-ini-macro.lua:1029:
 attempt to call upvalue 'pdfsetpageresources' (a nil value)
 1 >>  \starttext
 2 \input zapf
 3 \stoptext

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] Typesetting Markdown

2019-05-25 Thread Pablo Rodriguez
On 5/24/19 5:37 AM, Thangalin wrote:
> Hi Gour,
>
> I added an abstract, an overview section with the plan, and an RSS feed:
>
> https://dave.autonoma.ca/blog/2019/05/22/typesetting-markdown-part-1/
>
> One of the reasons I chose Pandoc's Markdown is for its support of
> classes and annotations. I looked into the pandoc-xhtml link and it
> looked both incomplete and lacking support for typesetting mathematics.

Hi Dave,

pandoc-xhtml is only a poor example about handling XML as input source.
I only use Markdown and pandoc, because they provide a limited way of
XML code easily.

The real thing is that you can feed ConTeXt with XML sources to typeset
what you want.

My use of XML typesetting is basic when compared to that of Hans, Taco,
Thomas Schmitz and Hans van der Meer.

Of course, other approaches are perfectly fine. My comment was only
about not focusing on pandoc-xhtml (which I should rewrite from scratch
when I find time for that), but on what makes it thick.

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] no bookmark prerollling in bookmark option

2019-05-23 Thread Pablo Rodriguez
Dear list,

I have the following sample:

\def\MyContent{This is expanded content}
\enabledirectives[references.bookmarks.preroll]
\setupinteraction[state=start, title={\MyContent}]
\placebookmarks[section]
\starttext
\section{\MyContent}
\startsection[title=\MyContent]
\stopsection
\startsection[title=\MyContent, bookmark=\MyContent]
\stopsection
\stoptext

Bookmarks aren’t prerolled when the bookmark option from \startSECTION
is used.

I think it may be a bug. Could anyone confirm 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] 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
___

  1   2   3   4   5   6   7   8   9   10   >