Re: [NTG-context] Clipping multiple PDFs

2022-08-21 Thread Pablo Rodriguez via ntg-context
On 8/18/22 02:13, jethro Reuel via ntg-context wrote:
> Hello,
>
> I am trying to put multiple PDF’s that were typeset differently into
> one document without modifying the individual files themselves.
> [...]
> The problem is the original page numbers show and I’d prefer that it
> did not. So I thought maybe I could clip all the page numbers from
> every page (since they are all in the same position across all the
> pages) but I don’t know how to do this with the \clip command. Any
> ideas? I already tried using \input but it gives some weird output in
> some places. It doesn’t have to use this method as long as it does
> what I need it to do.

Hi Jethro,

it works using \clip with \externalfigure inside a loop (\dorecurse).

With \getfiguredimensions you get the number of pages of each PDF
document (\noffigurepages).

The following source both generates the source PDF document and the
imposed result with clipped pages (just to see a sample of the commands
mentioned above):

  \startbuffer[newbuff]
  \setuppapersize[A3]
  \setupbodyfont[sans, 1200pt]
  \starttext
  \dorecurse{8}
  {\startmakeup[page][pagestate=start, align=center, style=\bf]
\recurselevel
   \stopmakeup}
  \stoptext
  \stopbuffer
  \startmode[*first]
  \savebuffer[newbuff][source_page.tex, prefix=no]
  \executesystemcommand{context --purgeall source_page.tex}
  \stopmode
  \setuplayout[page]
  \setuppapersize[A6][A4]
  \setuppaper[nx=2, ny=2]
  \setuparranging [XY]
  \starttext
  \startnotmode[*first]
  \def\Doc{source_page.pdf}
  \getfiguredimensions[\Doc]
  \dorecurse{\noffigurepages}
{\clip[hoffset=96mm, voffset=136mm, width=105mm, height=148mm]
{\externalfigure[\Doc][page=\recurselevel]}}
  \stopnotmode
  \stoptext

Just in case it might help,

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

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


[NTG-context] sync text streams in facing pages

2022-08-15 Thread Pablo Rodriguez via ntg-context
Dear list,

adapting a the sample from mkxl/page-str.mkxl (and code from the list),
I came with the following sample:

  \setuppapersize[A6]
  \showgrid
  %\setuplayout[grid=yes]
  \starttext
  \input tufte
  \startoutputstream[es]
   \dorecurse{25}
{\startlanguage[es]\input cervantes-es\stoplanguage%
  \par\pushoutputstream}
  \enableoutputstream[en]
   \dorecurse{25}
{\input zapf\par\pushoutputstream}
  \disableoutputstream
  \stopoutputstream
  \synchronizestreams[es,en]
  \page \flushoutputstream[es]
  \page \flushoutputstream[en]
  \stoptext

To reorder pages, I rename the output to "wg.pdf" and run the following
code:

  \setuppapersize[A6]
  \setuplayout[page]
  \starttext
  \dorecurse{26}
  {\ifnum\recurselevel = 1
\externalfigure[wg.pdf][page=\recurselevel]\else
\externalfigure[wg.pdf][page=\recurselevel]
\externalfigure[wg.pdf][page={\the\numexpr \recurselevel + 25}]\fi}
  \stoptext

I’m afraid that the paragraph mistmatch is clear (the number of pages is
way different for each versions).

Using the grid, the mismatch is not so evident (but there is still a
different number of pages for each version).

Page reordering would be in this case:

  \setuppapersize[A6]
  \setuplayout[page]
  \starttext
  \dorecurse{20}
  {\ifnum\recurselevel = 1
\externalfigure[wg.pdf][page=\recurselevel]\else
\externalfigure[wg.pdf][page=\recurselevel]
\externalfigure[wg.pdf][page={\the\numexpr \recurselevel + 19}]\fi}
  \stoptext

I would need that for a bilingual edition. I don’t mind reodering the
pages (if there is no other option).

But what am I doing wrong not to get synced text streams for facing pages?

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


Re: [NTG-context] issue with lpath

2022-08-04 Thread Pablo Rodriguez via ntg-context
On 8/4/22 17:32, Taco Hoekwater via ntg-context wrote:
> [...]
> PS This sort of confusing filtering is why I do most of my xml
> processing from the lua end, where it is much clearer to me what is
> what.
Many thanks for clarifying the issue, Taco.

BTW, according to the last slide from
https://meeting.contextgarden.net/2019/talks/02-xmlprocessing/02-xmlprocessing.pdf,
you had plans to document how to deal with XML in proper Lua.

I wonder whether you are still interested in adding this information to
the manual.

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


Re: [NTG-context] issue with lpath

2022-08-04 Thread Pablo Rodriguez via ntg-context

On 8/4/22 12:22, Taco Hoekwater via ntg-context wrote:
>> On 3 Aug 2022, at 15:54, Pablo Rodriguez via ntg-context 
>>  wrote:
>> BTW, is there any way to rephrase "{h3 + blockquote}" in proper Lua?
>
> I was wondering about that as well, and I really had no clue how to
> do that. Some reading and studying later, I realised that there is a
> preceding-sibling:: axis.
>
> That is not documented in xml-mkiv.pdf I think, but it inherited
> from xpath, and that means this works:>
>   \xmlsetsetup{#1}{blockquote/preceding-sibling::h3[-1]/} {xml:section}
>
> “Take all blockquotes, then tests their immediate preceding siblings
> (index [-1]) that are h3."

Many thanks for your reply, Taco.

It isn’t documented, but I have just discovered that it is used inside a
function:

  https://www.pragma-ade.com/general/manuals/xml-mkiv.pdf#search=sibling

> But the CSS version is nicer.

I agree. But using CSS for LPaths feels like cheating to me.

Many thanks for your help again,

Pablo

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

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


Re: [NTG-context] What exactly is lpath?

2022-08-03 Thread Pablo Rodriguez via ntg-context
On 8/3/22 16:39, Denis Maier via ntg-context wrote:
> [...]
> Just like Pablo, I'm from time to time reading through the xml-mkiv
> manual, and I was just wondering if there other places where I can
> other examples or explanations. (If it were a more general Lua thing
> for example...)

Hi Dennis,

my impression is that (at least in my case) the hardest part is to
figure out how XPath actually works.

For that, I wonder whether
https://github.com/sarahalang/Harvard_BeyondTEI_Workshop_SLang2022 may
be helpful.

This is from the LaTeX-Ninja (Sarah A. Lang). But nothing prevents using
it as an exercise for ConTeXt users. I haven’t done it myself.

Just in case it might help,

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

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


Re: [NTG-context] issue with lpath

2022-08-03 Thread Pablo Rodriguez via ntg-context
On 8/3/22 09:09, Taco Hoekwater via ntg-context wrote:
>> On 2 Aug 2022, at 21:14, Pablo Rodriguez via ntg-context 
>>  wrote:
>> [...]
>> I need an lpath to select the h3 node above, but only the one with "h3 +
>> blockquote" as a CSS selector (which could be added the lpath "../h3"
>> after).
>
> Lpath supports CSS selectors between curly braces as parts, so simply:
>
>   \xmlsetsetup{#1}{{h3 + blockquote}/../h3} {xml:section}

Taco,

I knew that, but I wasn’t sure how to mix both. I’d say yesterday I
tried something similar to:

  \xmlsetsetup{#1}{{h3 + blockquote}../h3} {xml:section}

Which, of course, couldn’t work.

> The xml-mkiv.pdf manual has lots of other lpath examples as well.

I know, I have read them many times. And I read them from time to time.
But I’m not smart enough to understand them.

BTW, is there any way to rephrase "{h3 + blockquote}" in proper Lua?

Something like "/h3/../!p/../blockquote" selected both "h3 + p" (which I
didn’t want and "h3 + blockquote" (the one intended).

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


Re: [NTG-context] Forbid footnotes from splitting across pages

2022-08-03 Thread Pablo Rodriguez via ntg-context
On 8/3/22 03:05, Idris Samawi Hamid ادريس سماوي حامد via ntg-context wrote:
> Dear gang,
>
> Objectives:
>
> i)  Prevent footnotes from splitting across a page or pagebreak

Dear Idris,

I wonder whether a \framed[offset=none, frame=off, width=\textwidth]
would make sense here.

At least, it would prevent page breaks.

> ii) Make sure that the footnote reference number in the main text is
> always on the same page as the footnote.

\setupnote[footnote][split=verystrict, scope=text] might help here.

But it cannot achieve what is practically impossible:

  \setupnote[footnote][split=verystrict, scope=text]

  \starttext
  \dorecurse{25}
{ab cd ef\footnote{\input{knuth}}}
  \stoptext

I know that this depends from the publisher, but in these cases endnotes
are a way more viable option.

Just in case it might help,

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

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


[NTG-context] issue with lpath

2022-08-02 Thread Pablo Rodriguez via ntg-context
Dear list,

I have this sample:

  \startbuffer[demo]
  

  One
  Standard paragraph
  
Quoted text
  


  Two
  
Direct quote
  

  
  \stopbuffer

  \startxmlsetups xml:initialize
\xmlsetsetup{#1}
  {p|blockquote}
  {xml:*}
\xmlsetsetup{#1}
  {(div|section)[contains(@class,'level3')]/h3/../!p/../h3}
  {xml:section}
  \stopxmlsetups

  \xmlregistersetup{xml:initialize}

  \startxmlsetups xml:p
\startpar\xmlflush{#1}\stoppar
  \stopxmlsetups

  \startxmlsetups xml:blockquote
\startblockquote\xmlflush{#1}\stopblockquote
  \stopxmlsetups

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

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

I need an lpath to select the h3 node above, but only the one with "h3 +
blockquote" as a CSS selector (which could be added the lpath "../h3"
after).

It would be "Two" and not "Two" in this sample.

Excuse my ignorance, but which is the way to achieve this?

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


Re: [NTG-context] debugging lmtx and firefox (was: TeXGyre Heros on Firefox)

2022-07-26 Thread Pablo Rodriguez via ntg-context
On 7/25/22 20:19, luigi scarso via ntg-context wrote:
> On Mon, Jul 25, 2022 at 7:52 PM Pablo Rodriguez via ntg-context
> wrote:
>
> Sadly, as already reported, LuaTeX doesn’t work on Linux anymore.
>
> hm at least luatex on x86-64 is still ok, as far as  I know.

Luigi,

many thanks for your reply. I was totally wrong.

LuaTeX in LMTX is working fine. It was my fault.

I have just discovered that I wasn’t able to generate the format file,
because texlive-luatex is a dependency in Fedora.

"export PATH=~/context/tex/texmf-linux-64/bin" solves the clash of paths
and it allows to generate the format file.

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


Re: [NTG-context] debugging lmtx and firefox (was: TeXGyre Heros on Firefox)

2022-07-25 Thread Pablo Rodriguez via ntg-context
On 7/25/22 14:00, juh+ntg-context--- via ntg-context wrote:
>
> I reported the bug to Mozilla and they answered very fast.
>
> Sadly up too now without a good solution.

Many thanks for the bug report.

> They hint to LuaMetaTex as the cause of the problem. You can follow the
> discussion here.

I would like to compare the LMTX output with the one from LuaTeX.

Sadly, as already reported, LuaTeX doesn’t work on Linux anymore.

> https://bugzilla.mozilla.org/show_bug.cgi?id=1781022

From the two questions from Jonathan Kew, HTML with TeX Gyre Heros is
displayed fine.

I extracted the font from the PDF output document (with a source
document similar to
https://mailman.ntg.nl/pipermail/ntg-context/2022/106302.html) with
"mutools extract", but some info may be missing and Firefox cannot use
it to display the HTML file.

I extracted the font with Fontforge and it was displayed perfectly fine.
But I guess Fontforge is adding some info when generating the OTF font
(font size is bigger: 4KB and 2.3KB when extracted with mutools).

I’m no font expert, but what astonishes me is that it isn’t clear
whether the font has lost the hinting information or not with LMTX
(sorry if I got this wrong).

I have no idea whether Identity-H may be preventing the FreeType
autohinter from working properly. But ft-view (from freetype-demos)
displays poorly the font extracted without FontForge (unlike the font
extracted with it). I attach the first font.

After switching hinting from on to auto, the autohinter displays the
font way better.

To reproduce the issue "ftview  20 font-0009.otf" and press "a".

Just in case it might help,

Pablo
Title: tgyre




Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur massa turpis, semper quis fringilla ut, viverra nec risus. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Donec nunc lorem, sollicitudin vel sodales eget, vehicula nec mi. Proin ullamcorper rutrum nibh, at porttitor nunc euismod et. Donec faucibus nisi faucibus ipsum porttitor phare­tra. Sed elementum, lectus nec congue imperdiet, ipsum leo viverra nisi, sit amet commodo odio odio id nisl. Fusce sagittis lobortis nisi sed consectetur. Nam eges­tas, sem ut fermentum convallis, ipsum tellus venenatis augue, eget condimentum risus quam id erat. Sed metus dui, sollicitudin pharetra pellentesque sed, placerat eget augue. Mauris sodales pretium tortor vitae rutrum. Proin quam sem, lobortis tincidunt pretium vitae, feugiat eu lacus.




font-0009.otf
Description: font/otf
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] debugging lmtx and firefox (was: TeXGyre Heros on Firefox)

2022-07-22 Thread Pablo Rodriguez via ntg-context
On 7/22/22 12:37, juh+ntg-context--- via ntg-context wrote:
> Dear all,
>
> the firefox pdf viewer has problems with at least two sans serif fonts.
> [...]
>
> Where Libreoffice has type "Type 1", lmtx has "CID Type 0C".
>
> Where Libreoffice has encoding "Builtin", lmtx has "Identity-H".
>
> I have no idea if the difference is the cause of the bad display.

Dear Jan Ulrich,

it may be the font type, the enconding (or who knows what).

> Any ideas how I can achieve this?

I’d rather report the issue (attaching both PDF documents and both
outputs from pdffonts) at https://github.com/mozilla/pdf.js/issues/new.

I reported an issue with PDF.js not displaying the cover of
http://www.pragma-ade.com/general/manuals/xml-mkiv.pdf.

The day after my report the fix was merged.

Just in case it may help,

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

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


Re: [NTG-context] formula reference link undefined

2022-07-21 Thread Pablo Rodriguez via ntg-context
On 7/21/22 19:48, Alan via ntg-context wrote:
> On Fri, 15 Jul 2022 09:10:07 +0200
> Hans Hagen via ntg-context  wrote:
>
>> there will be an update as soon as the mac intel bins are generated
>
> (still broken)

Sorry, Alan, but I get from
https://lmtx.pragma-ade.nl/install-lmtx/texmf-context.zip:

  Last-Modified: Wed, 06 Jul 2022 20:03:53 GMT

I guess there has been no newer release since Hans anonunced that.

I hope it helps,

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

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


Re: [NTG-context] two issues with \sciteinlinebuffer

2022-07-09 Thread Pablo Rodriguez via ntg-context
On 7/9/22 08:42, Hans Hagen via ntg-context wrote:
> On 7/8/2022 7:51 PM, Pablo Rodriguez via ntg-context wrote:
>> [...]
>> Excuse my ignorance, but it is \sciteinlinebuffer the misbehaving
>> command in my code.
> \unexpanded\def\module_scite_buffer_inline[#1][#2]%
>{\dontleavehmode
> \begingroup
> \lettypingparameter\c!margin\zeropoint
> \setcatcodetable\ctxcatcodes % needed in xml
> \ifsecondargument
>   \clf_scitelexbuffer{#2}{#1}%
> \else
>   \clf_scitelexbuffer{#1}{tex}%
> \fi
> \tt
> \installscitecommandsinline
> \module_scite_inherit_typing
> \dontcomplain
> \getbuffer[lex]%
> \removeunwantedspaces
> \endgroup}

Many thanks for the fix, Hans.

It works perfectly fine now.

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

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


Re: [NTG-context] two issues with \sciteinlinebuffer

2022-07-08 Thread Pablo Rodriguez via ntg-context
On 7/7/22 23:30, Hans Hagen via ntg-context wrote:
> On 7/7/2022 6:19 PM, Pablo Rodriguez via ntg-context wrote:
>> [...]
>> 1. Margin is applied to \sciteinlinebuffer.
>>
>> 2. An extra unwanted space is added after \sciteinlinebuffer.
>>
>> Isn’t it intended that \sciteinlinebuffer behaves in a similar way as
>> \typeinlinebuffer?
>>
> \unexpanded\def\module_scite_buffer[#1][#2]%
>{\begingroup
> \setcatcodetable\ctxcatcodes % needed in xml
> \ifsecondargument
>   \clf_scitelexbuffer{#2}{#1}%
> \else
>   \clf_scitelexbuffer{#1}{tex}%
> \fi
> \tt
> \installscitecommandsdisplay
> \module_scite_inherit_typing
> \dontcomplain
> \raggedright
> \startscitelines
> \getbuffer[lex]
> \stopscitelines
> \endgroup}

Many thanks for your code, Hans.

I’m afraid I cannot make it work for the inline buffer.

After checking m-scite.mkiv, the code above isn’t different from
"\module_scite_buffer" defined on lines 433-449 (checked with a visual
diff tool [https://meldmerge.org/]).

Sorry, but isn’t it "\module_scite_buffer_inline" (lines 454-468 from
m-scite.mkiv) the command that needs fixing?

Excuse my ignorance, but it is \sciteinlinebuffer the misbehaving
command in my code.

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


[NTG-context] two issues with \sciteinlinebuffer

2022-07-07 Thread Pablo Rodriguez via ntg-context
Hi Hans,

many thanks for the new release.

I experience two issues with scite buffers:

  \usemodule[scite]
  \setuptyping[margin=yes]
  \starttext
  \startbuffer[b]b\stopbuffer
  \startTEXpage[offset=1em]
  no margin

  a \sciteinlinebuffer[none][b] a

  a \typeinlinebuffer[b][option] a
  \stopTEXpage
  \stoptext

1. Margin is applied to \sciteinlinebuffer.

2. An extra unwanted space is added after \sciteinlinebuffer.

Isn’t it intended that \sciteinlinebuffer behaves in a similar way as
\typeinlinebuffer?

Many thanks for your help and your excellent work,

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
___


Re: [NTG-context] Auto width and height on table cells

2022-06-30 Thread Pablo Rodriguez via ntg-context
On 6/30/22 18:10, Angel M Alganza via ntg-context wrote:
> [...]
> No, you aren't, and it almost does it, except when the fixed width
> column is other than the first one, I'm afraid.

Hi Ángel,

there might be a way to get it, as long as you don’t define height
directly, such as in:

 \starttext
  \showframe
  \startbuffer
  row\currentxtablerow--col\currentxtablecolumn
  \stopbuffer
  \startbuffer[table]
  \startxtable[option={stretch, height}, align={lohi, middle}]
  \startxrow
  \dorecurse{5}
{\startxcell[width=.115\textwidth]\inlinebuffer\stopxcell}
  \startxcell\inlinebuffer\stopxcell
  \stopxrow
  \startxrow
  \dorecurse{5}
{\startxcell\inlinebuffer\stopxcell}
  \startxcell[offset=1em]\input zapf\stopxcell
  \stopxrow
  \dorecurse{5}
  {\startxrow
  \dorecurse{6}
{\startxcell\inlinebuffer\stopxcell}
  \stopxrow}
  \stopxtable
  \stopbuffer
  \getbuffer[table]
  \page
  \setuppapersize[A3, landscape]
  \getbuffer[table]
  \stoptext

Again, just in case it helps,

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
___


Re: [NTG-context] Auto width and height on table cells

2022-06-30 Thread Pablo Rodriguez via ntg-context
On 6/30/22 09:46, Angel M Alganza via ntg-context wrote:
> [...]
> How about the auto row height?  That'd be the only thing I'm missing.

Hi Ángel,

I’m not sure whether I’m totally missing your point, but I think this is
a way that might achieve what you want:

  \starttext
  \showframe
  \startbuffer
  row\currentxtablerow--col\currentxtablecolumn
  \stopbuffer
  \startbuffer[table]
  \startxtable[option={stretch, height}, align={lohi, middle}]
  \startxrow
  \startxcell[width=3cm, option=fixed]\inlinebuffer\stopxcell
  \dorecurse{5}
{\startxcell\inlinebuffer\stopxcell}
  \stopxrow
  \startxrow
  \startxcell[height=3cm, option=fixed]\inlinebuffer\stopxcell
  \dorecurse{5}
{\startxcell\inlinebuffer\stopxcell}
  \stopxrow
  \dorecurse{5}
  {\startxrow
  \dorecurse{6}
{\startxcell\inlinebuffer\stopxcell}
  \stopxrow}
  \stopxtable
  \stopbuffer
  \getbuffer[table]
  \page
  \setuppapersize[A3, landscape]
  \getbuffer[table]
  \stoptext

Just in case it helps,

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
___


[NTG-context] indent in \setuptyping

2022-06-29 Thread Pablo Rodriguez via ntg-context
Dear list,

I have the following sample:

  \showframe
  \setuppapersize[A8]
  \setuptyping
  [align={right,broad},
strip=yes,
   lines=yes,
   blank=halfline]
  \starttext
  \startXML
  
content content content content
  

  
content content
content content
  
  \stopXML
  \stoptext

Which is the option to have the first contents broken and indented
automatically by ConTeXt?

I have tried all possible options from
https://www.pragma-ade.com/general/qrcs/setup-en.pdf#page=266. I had no
luck.

I remember that this worked (but I couldn’t find the message from Hans
where he added the option [years ago...]).

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
___


Re: [NTG-context] the system not working on Linux 32 with Context-lmtx

2022-06-27 Thread Pablo Rodriguez via ntg-context
On 6/27/22 20:00, Henning Hraban Ramm via ntg-context wrote:
> Am 27.06.22 um 19:10 schrieb Alain Delmotte via ntg-context:
>> […]
>> When I run from the console:
>> context sanstitre-2.tex
>> mtxrun  | unknown script 'context.lua' or 'mtx-context.lua'
>> […]
>> What should I do?
> […]
> Try to rebuild the database: mtxrun --generate

Hi Alain,

as Hraban points out, "mtxrun --generate" is your friend.

I can simply reproduce you error with:

  mtxrun --scripts cache --erase

So I get:

  $ context
  mtxrun | unknown script 'mtx-context.lua' or 'mtx-mtx-context.lua'

Everything works fine again after I run:

  mtxrun --generate.

Before the first run after installation, this command is mandatory to
build the database.

I hope it helps,

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
___


Re: [NTG-context] not working "mtxrun --scripts cache --erase"

2022-06-27 Thread Pablo Rodriguez via ntg-context
On 6/27/22 11:35, Hans Hagen via ntg-context wrote:
> On 6/27/2022 12:38 AM, Max Chernoff via ntg-context wrote:
>>> I’m afraid that I have just found out that "mtxrun --scripts cache
>>> --erase" doesn’t delete a single file from the cache.
>> [...]
>> If I change line 81 of
>>
>>      texmf-context/scripts/context/lua/mtx-cache.lua
>> [...]
>> to
>>      if find(filename,"luametatex%-cache") then
>> the problem appears to be fixed.
> maybe can you test with
>
>   LUATEXENGINE .. "%-cache"

Hi Max and Hans,

both approaches work.

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
___


[NTG-context] "mtxrun --scripts cache --erase" not working?

2022-06-26 Thread Pablo Rodriguez via ntg-context
Dear list,

as reported some months ago
(https://mailman.ntg.nl/pipermail/ntg-context/2022/105420.html), "mtxrun
--scripts cache --erase" doesn’t erase the cache at all.

Could anyone confirm this issue (which I experience on both Linux64 and
Win64)?

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
___


[NTG-context] headings in line numbering

2022-06-18 Thread Pablo Rodriguez via ntg-context
Dear list,

I have the following sample:

  \setuppapersize[A6]
  \definelinenote[otherlinenote]
  \setupnote[otherlinenote]
[compress=yes]
  \startsetups[line:notes]
\setupinterlinespace[line=2.9ex]
  \stopsetups
  \setupnote[linenote]
[paragraph=yes, compress=yes, compressmethod=separator]%
  \setupnotation[linenote][alternative=serried, width=broad]
  \starttext
  \startlinenumbering
  \dorecurse{3}{\subject{Heading\linenote{title}}
  \dorecurse{2}{text\linenote{some text}\linenote{another text}\par}}
  \stoplinenumbering
  \stoptext

How can I get headings added to the line numbers?

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
___


Re: [NTG-context] \setuplist only for bodypart

2022-06-18 Thread Pablo Rodriguez via ntg-context
On 6/17/22 18:33, Wolfgang Schuster via ntg-context wrote:
> [...]
> To create separate styles for chapters within the frontmatter and
> bodymatter you have to create a new section command where you can apply
> different list settings.

Many thanks for your reply, Wolfgang.

Now I have learnt that what I tried was the wrong approach to the issue.

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
___


Re: [NTG-context] \setuplist only for bodypart

2022-06-17 Thread Pablo Rodriguez via ntg-context

On 6/16/22 22:36, Henning Hraban Ramm via ntg-context wrote:
> Am 16.06.22 um 21:19 schrieb Pablo Rodriguez via ntg-context:
>
>>\startsectionblockenvironment[bodypart]
>>  ...
>>\stopsectionblockenvironment
>
> This should work according to documentation.

Many thanks for your reply, Hraban.

Using current latest (from 2022.05.11 11:36) with current sample outputs
no different setup for chapters from bodypart:

  \startsectionblockenvironment[bodypart]
\setuplist[chapter]
  [alternative=d]
  \stopsectionblockenvironment
  \starttext
  \completecontent
  \startfrontmatter
  \dorecurse{5}
{\chapter{Chapter \recurselevel}}
  \stopfrontmatter
  \startbodymatter
  \dorecurse{5}
{\chapter{Chapter \recurselevel}}
  \stopbodymatter
  \startbackmatter
  \dorecurse{5}
{\chapter{Chapter \recurselevel}}
  \stopbackmatter
  \stoptext

Just to contribute a sample that helps to confirm the issue.

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
___


[NTG-context] \setuplist only for bodypart

2022-06-16 Thread Pablo Rodriguez via ntg-context
Dear list,

sorry for the very basic question, but I cannot find the way to do it.

Imagine I have the following command:

\setuplist
[chapter]
[alternative=d]

But I only want for sectionblock bodypart (nof for frontpart, backpart
or the appendices).

I have enclosed in:

  \startsectionblockenvironment[bodypart]
...
  \stopsectionblockenvironment

I have also tried:

\setuplist
[bodypart:chapter]
[alternative=d]

But nothing changed.

Which is the right way to do it?

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
___


Re: [NTG-context] Typesetting modern Greek (UTF8) with ConTeXt

2022-06-08 Thread Pablo Rodriguez via ntg-context
On 6/8/22 16:38, Henning Hraban Ramm via ntg-context wrote:
> Am 07.06.22 um 19:30 schrieb Pablo Rodriguez via ntg-context:
>> On 6/7/22 18:32, Henning Hraban Ramm via ntg-context wrote:
>>> [...]
>>> AFAI understand, "el" should be modern greek (post 1982, monotonic),
>>> "grc" Ancient and Medieval Greek (polytonic), and "el-polytonic" should
>>> cover 1453–1982.
>> [...]
>> Instead of creating new languages, I’d rather include monotonic an
>> polytonic Modern Greek patterns in ConTeXt, replace the patterns with
>> the monotonic ones for \language[gr} and leave the rest to users.
>
> Hans added the missing setup, it will probably be fixed in the next upload.

Great news and many thanks for the upcoming fix.

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
___


Re: [NTG-context] Typesetting modern Greek (UTF8) with ConTeXt

2022-06-07 Thread Pablo Rodriguez via ntg-context
On 6/7/22 18:32, Henning Hraban Ramm via ntg-context wrote:
> [...]
> \installlanguage
>[\s!gr]
>[\s!patterns=\s!agr] % ok?
>
> \installlanguage [\s!greek] [\s!gr]
>
> So it seems that is wrong / incomplete.
>
> AFAI understand, "el" should be modern greek (post 1982, monotonic),
> "grc" Ancient and Medieval Greek (polytonic), and "el-polytonic" should
> cover 1453–1982.

Since no one has complained, I think we are not in a hurry.

Instead of creating new languages, I’d rather include monotonic an
polytonic Modern Greek patterns in ConTeXt, replace the patterns with
the monotonic ones for \language[gr} and leave the rest to users.

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
___


Re: [NTG-context] Typesetting modern Greek (UTF8) with ConTeXt

2022-06-07 Thread Pablo Rodriguez via ntg-context
On 6/6/22 22:59, Henning Hraban Ramm via ntg-context wrote:
> Am 06.06.22 um 19:14 schrieb Pablo Rodriguez via ntg-context:
>
>> \language[gr], but beware since it uses patterns for ancient Greek.
>
> That is documented in the manual languages-mkiv.pdf.

This was news to me before reading lang-def.mkxl.

> I can’t remember where I found the information that el-monoton
> (synonymous to el and gr) and el-polyton (synonymous to agr and grc)
> should be available.

Hyphenation patterns for Greek are three: grc, el-monoton and el-polyton.

Ancient and medieval Greek are hyphenated in a different way than
polytonic Greek before 1982 (when monotonic orthography was introduced
by law).

This is the main reason why three patterns are needed.

But if anyone uses ConTeXt to typeset modern Greek, the different
hyphenation was not noticed (or there was no message to the list).

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
___


[NTG-context] pages with facing text

2022-06-06 Thread Pablo Rodriguez via ntg-context
Dear list,

mixing the info that Wolfgang posted on this list some time ago
(https://mailman.ntg.nl/pipermail/ntg-context/2016/087629.html), I tried
to create a sample for facing pages with different streams:

  \showframe\showgrid\showstruts
  \starttext

  \startoutputstream[one]
 \startcolor[darkred]
 \dorecurse{10}{\section{Knuth}\pushoutputstream

 \inouter{first}\input knuth\footnote{note}\par\pushoutputstream}
 \stopcolor
  \stopoutputstream

  \startoutputstream[two]
 \startcolor[darkgreen]
 \dorecurse{10}{\section{Zapf}\pushoutputstream

 \inouter{second}\input zapf\footnote{note}\par\pushoutputstream}
 \stopcolor
  \stopoutputstream

  \synchronizestreams[one,two]

  \setbox\scratchboxone\outputstreambox[one]
  \setbox\scratchboxtwo\outputstreambox[two]

  \input zapf\page

  \doloop
   {\ifvoid\scratchboxone
  \exitloop
\else
  \setbox\scratchboxfour\vsplit\scratchboxone to \textheight
  \vbox to \vsize{\box\scratchboxfour\vss}%
  \setbox\scratchboxfive\vsplit\scratchboxtwo to \textheight
  \vbox to \vsize{\box\scratchboxfive\vss}%
\fi}
  \stoptext

I’m afraid that after my mixture, matching paragraphs don’t even start
at the same page height.

Would it be also possible to have notes, margin data and independent
section numbering for each stream?

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
___


Re: [NTG-context] Typesetting modern Greek (UTF8) with ConTeXt

2022-06-06 Thread Pablo Rodriguez via ntg-context
On 6/6/22 02:19, Gerben Wierda via ntg-context wrote:
> For Russian I have:
> 
> \setuplanguage[ru][patterns={ru}]\mainlanguage[ru]
> \definefallbackfamily
>   [archimate]
>   [ss]
>   [Helvetica]
>   [preset=range:cyrillic,
>    tf=style:light,
>    it=style:lightoblique,
>    bf=style:regular,
>    bi=style:oblique,
>    force=yes,
>  rscale=1.0]
> \definefontfamily [archimate] [ss] [Optima]
> \setupbodyfont[archimate]
> 
> I can’t find out from ConTeXtgarden what code I must use for modern
> Greek (‘el’?) and what range I must use for Greek characters (I guess
> ‘greekandcoptic’ which I’ve seen mentioned somewhere).
> 
> Correct?

Hi Gerben,

\language[gr], but beware since it uses patterns for ancient Greek.

preset=range:greek is what you intend.

Another approach would be to use \setuplanguage[gr] and configure the
font in setups.

Here you have a minimal sample with both approaches:

\mainlanguage[en]
\definefallbackfamily
  [archimate]
  [ss]
  [MgOpenCosmetica]
  [preset=range:greek,
   force=yes]
\definefontfamily [archimate] [ss] [Optima]
\setupbodyfont[archimate]

\definefontfamily
  [mgopencosm]
  [ss]
  [MgOpenCosmetica]
  [preset=range:greek,
   force=yes]
\startsetups[greek-typeface]
\switchtobodyfont[mgopencosm]
\stopsetups

\setuplanguage[agr][setups={greek-typeface}]

\startbuffer
Ο κόσμος θα ήταν απίστευτα φτωχός αν δεν υπήρχαν οι
Έλληνες. Μάλιστα, αν θέλουμε να είμαστε ειλικρινείς, δεν θα
υπήρχε καθόλου κόσμος, χωρίς τις επιστήμες, τη δημοκρατία,
τις πόλεις, τα φωνήεντα, τη φέτα, το φραπέ, το ούζο και το
χταποδάκι στα κάρβουνα.
\stopbuffer

\starttext
\gr \getbuffer\par
\agr \getbuffer
\stoptext

MgOpenCosmetica can be downloaded from
https://web.archive.org/web/20090309063533/www.ellak.gr/fonts/mgopen/index.en.html
(direct link:
https://web.archive.org/web/20090309063533/www.ellak.gr/fonts/mgopen/files/MgOpenCosmetica.tar.gz).

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


Re: [NTG-context] \sciteinlinebuffer inherits margin properties

2022-06-04 Thread Pablo Rodriguez via ntg-context
On 6/4/22 16:13, Otared Kavian via ntg-context wrote:
> Hi Pablo,
>
> Typesetting your two examples, I can reproduce on MacOS and Context
> version 2022.05.11 11:36 what you are reporting.
Many thanks for your help, Otared.

Would you be so kind to confirm the first issue I reported earlier
(https://mailman.ntg.nl/pipermail/ntg-context/2022/105918.html)?

Many thanks for your help again,

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
___


[NTG-context] \sciteinlinebuffer inherits margin properties

2022-06-04 Thread Pablo Rodriguez via ntg-context
Dear list,

I have my third sample with scite:

  \usemodule[scite]
  \setuptyping[margin=yes]
  \starttext
  \startbuffer[b]b\stopbuffer
  \startTEXpage[offset=1em]
  a \sciteinlinebuffer[none][b] a\par
  a \typeinlinebuffer[b][option] a
  \stopTEXpage
  \stoptext

I’m on Linux64 and using current latest from 2022.05.11 11:36.

For some strange reason, \sciteinlinebuffer inherits the margin option
from \setuptyping and it indents the whole paragraph.

Could anyone confirm the issue?

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
___


[NTG-context] extra space after \sciteinlinebuffer

2022-06-04 Thread Pablo Rodriguez via ntg-context
Dear list,

I have the following sample (running current latest from 2022.05.11
11:36 on Linux64):

  \usemodule[scite]
  \starttext
  \startbuffer[b]b\stopbuffer
  \startTEXpage[offset=1em]
  a \sciteinlinebuffer[none][b] a\par
  a \typeinlinebuffer[b][option] a
  \stopTEXpage
  \stoptext

I get an unwanted extra space after \sciteinlinebuffer.

Am I missing something or have I hit a bug?

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
___


[NTG-context] issue with scite module

2022-06-04 Thread Pablo Rodriguez via ntg-context
Dear list,

I have this minimal sample (with current latest from 2022.05.11 11:36 on
Linux64):

  \usemodule[scite]
  \starttext
  \startXML ñ\stopXML
  \stoptext

Commenting out the first line avoids compilation error.

Replacing ñ with n also allows compilation.

I think there may be an error in m-scite.mkiv.

The inclusion of non-ASCII characters in XML code seems to leave an
unclosed argument.

Could anyone confirm the issue or explain me what I am missing?

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
___


Re: [NTG-context] issue with scite module

2022-06-04 Thread Pablo Rodriguez via ntg-context
On 6/3/22 00:52, Max Chernoff via ntg-context wrote:
>> For the sake of consistency (with buff-imp-xml.lua), I think the patch
>> should read
>  > [...]
>> +local alsoname = lpatterns.utf8two + lpatterns.utf8three +
>> lpatterns.utf8four
>
> I think that that pattern is a little too broad, since it will match any
> non-ASCII Unicode character. Things like U+202E (xkcd.com/1137), U+00A0
> (no-break space), etc are valid UTF-8 characters, but not valid XML tag
> names. Neither of these two characters are matched by the TeX catcode
> check. This doesn't make any real difference for a syntax highlighter
> though.

Hi Max,

many thanks for your reply.

At best, the patch is only a suggestion and Hans will merge the code he
sees it fits.

>> +local name = (R("az","AZ","09") + S("_-.") + + alsoname)^1
>
> There's a doubled plus in the middle there. The patch works when I
> remove it.

I noticed it too just after sending the message to the list, but I had
to solve the issue with my installation first.

>> But I’m afraid I cannot make it work on my computer (Linux64).
>>
>> On another Win64 computer, both patches worked perfectly fine.
>
> Hmm, that's really weird. Both patches work for me on my main Win64
> computer (after I fixed the extra plus).

It was a stupid mistake on my side. The patch I sent before points to
the error:

--- scite-context-lexer-xml.lua 2022-06-01 17:24:38.625976000 +0200
+++
context/tex/texmf-context/context/data/scite/context/lexers/scite-context-lexer-xml.lua
2022-06-02 16:37:30.112824947 +0200

I was compiling the sample file in the directory where the unmodified
version of "scite-context-lexer-xml.lua" was running.

ConTeXt was reading the unmodified file and not the modified one, but
that was all my fault.

Now I have to find a MWE for issues I’m experiencing with XML sources
and using the scite module.

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
___


Re: [NTG-context] issue with scite module

2022-06-02 Thread Pablo Rodriguez via ntg-context
On 6/2/22 17:36, Pablo Rodriguez via ntg-context wrote:
> On 6/1/22 23:58, Max Chernoff via ntg-context wrote:
>>
>> local name = (R("az","AZ","09") + S("_-.") + 
>> lpeg.utfchartabletopattern(characters.csletters))^1
>
> I’m afraid I cannot make your proposed fix work.

Even with a brand new install, neither of both patches works for me.

I don’t know what I may be missing on my installation.

Do you have any hint about what I am doing wrong?

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
___


Re: [NTG-context] issue with scite module

2022-06-02 Thread Pablo Rodriguez via ntg-context
On 6/1/22 23:58, Max Chernoff via ntg-context wrote:
>> Now, I still don’t understand LPEG and don’t know if there’s a general
>> “character” class that doesn’t need a list...

Many thanks for your reply, Hraban.

> The easiest way that I found was to just cheat and use everything with
> a TeX catcode 11 ("letters"):
>
>   local name = (R("az","AZ","09") + S("_-.") + 
> lpeg.utfchartabletopattern(characters.csletters))^1

Many thanks for your reply, Max,

I’m afraid I cannot make your proposed fix work.

For the sake of consistency (with buff-imp-xml.lua), I think the patch
should read (also attached to the message to avoid wrong line breaking):

--- scite-context-lexer-xml.lua 2022-06-01 17:24:38.625976000 +0200
+++
context/tex/texmf-context/context/data/scite/context/lexers/scite-context-lexer-xml.lua
2022-06-02 16:37:30.112824947 +0200
@@ -13,7 +13,7 @@
 -- todo: parse entities in attributes

 local global, string, table, lpeg = _G, string, table, lpeg
-local P, R, S, C, Cmt, Cp = lpeg.P, lpeg.R, lpeg.S, lpeg.C, lpeg.Cmt,
lpeg.Cp
+local P, R, S, C, Cmt, Cp, lpatterns = lpeg.P, lpeg.R, lpeg.S, lpeg.C,
lpeg.Cmt, lpeg.Cp, lpeg.patterns
 local type = type
 local match, find = string.match, string.find

@@ -41,7 +41,8 @@
 local equal= P("=")
 local ampersand= P("&")

-local name = (R("az","AZ","09") + S("_-."))^1
+local alsoname = lpatterns.utf8two + lpatterns.utf8three +
lpatterns.utf8four
+local name = (R("az","AZ","09") + S("_-.") + + alsoname)^1
 local openbegin= P("<")
 local openend  = P("") + P(">")

But I’m afraid I cannot make it work on my computer (Linux64).

On another Win64 computer, both patches worked perfectly fine.

Both machines run LMTX current latest. So I have an issue on my
installation that I have to fix first.

Many thanks for your help,

Pablo
--- scite-context-lexer-xml.lua	2022-06-01 17:24:38.625976000 +0200
+++ context/tex/texmf-context/context/data/scite/context/lexers/scite-context-lexer-xml.lua	2022-06-02 16:37:30.112824947 +0200
@@ -13,7 +13,7 @@
 -- todo: parse entities in attributes
 
 local global, string, table, lpeg = _G, string, table, lpeg
-local P, R, S, C, Cmt, Cp = lpeg.P, lpeg.R, lpeg.S, lpeg.C, lpeg.Cmt, lpeg.Cp
+local P, R, S, C, Cmt, Cp, lpatterns = lpeg.P, lpeg.R, lpeg.S, lpeg.C, lpeg.Cmt, lpeg.Cp, lpeg.patterns
 local type = type
 local match, find = string.match, string.find
 
@@ -41,7 +41,8 @@
 local equal= P("=")
 local ampersand= P("&")
 
-local name = (R("az","AZ","09") + S("_-."))^1
+local alsoname = lpatterns.utf8two + lpatterns.utf8three + lpatterns.utf8four
+local name = (R("az","AZ","09") + S("_-.") + + alsoname)^1
 local openbegin= P("<")
 local openend  = P("") + P(">")
___
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 scite module

2022-06-01 Thread Pablo Rodriguez via ntg-context
On 6/1/22 18:58, Henning Hraban Ramm via ntg-context wrote:
> Am 01.06.22 um 18:47 schrieb Pablo Rodriguez via ntg-context:
>> [...]
>> Could anyone confirm the issue?
>
> Hi Pablo,
>
> with LMTX version 2022.05.11, both elements are displayed, but the first
> in blue, the second in red. Apparently the scite highlighter doesn’t
> like non-ASCII characters in elements.

Hi Hraban,

this is exactly what I’m experiencing (and sorry, I forgot to mention
that I was using current latest).

I experienced that without scite and Hans fixed it (in buff-imp-xml.lua).

I mentioned both Geany and Notepad++, because I think it may not be an
issue outside ConTeXt.

But I don’t know which file deals with it (so I could try to submit a
patch).

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
___


[NTG-context] issue with scite module

2022-06-01 Thread Pablo Rodriguez via ntg-context
Dear list,

I have the following sample:

  \usemodule[scite]
  \starttext
  \startTEXpage[offset=1ex]
  \type[option=xml]{}
  \type[option=xml]{<áñß/>}
  \stopTEXpage
  \stoptext

Using scite, I don’t get the second element right.

Without scite, both elements are displayed right.

In both Geany and Notepad++ (which use Scintilla internally), the two
elements are displayed right.

Could anyone confirm the issue?

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
___


Re: [NTG-context] stacking of marginals

2022-05-31 Thread Pablo Rodriguez via ntg-context
On 5/31/22 19:09, Henning Hraban Ramm via ntg-context wrote:
> If you have many marginals, they tend to conflict.
>
> The option stack=yes should enhance the situation.
>
> I don’t expect wonders – if there’s not enough space, then ConTeXt can’t
> solve it. But it used to work better, as I can see in my magazines from
> the last years.
>
> Now I can’t see a difference between stack=yes or no:

Hi Hraban,

I can confirm that, diffpdf (open source version shipped with Fedora)
shows no difference (they appear to be the same).

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


[NTG-context] issue with compress in linenote

2022-05-31 Thread Pablo Rodriguez via ntg-context
Dear list,

I have the following sample:

  \setuppapersize[A6]
  \setuplinenumbering
[width=margin, location=outer, align=middle]
  \setupnote[linenote]
[paragraph=yes, compress=yes, compressmethod=separator]
  \setupnotation[linenote]
[alternative=serried, width=broad]
  \definelinenote[otherlinenote]
  %~ \setupnote[otherlinenote]
%~ [compress=yes]
  \starttext
  \startlinenumbering
  \dorecurse{20}
{uvwxyz\linenote{abcdef} }
  \stoplinenumbering
  \stoptext

For some reason unknown to me, "compress=yes" only works in linenote if
I setup another linenote and set it up with "compress=yes".

Could anyone tell me what I am missing or have I hit a bug?

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
___


[NTG-context] parallel page streams (pag-str.mkxl)

2022-05-28 Thread Pablo Rodriguez via ntg-context
Dear list,

I have this sample:

  \starttext
  \input tufte
  \startoutputstream[es]
   \dorecurse{25}
{\input cervantes-es\par\pushoutputstream}
  \enableoutputstream[en]
   \dorecurse{25}
{\input zapf\par\pushoutputstream}
  \disableoutputstream
  \stopoutputstream
  \synchronizestreams[en,es]
  \page \flushoutputstream[en]
  \page \flushoutputstream[es]
  \stoptext

It is an adaptation from pag-str.mkxl to get parallel texts in facing pages.

What I’m afraid I cannot get is exactly facing pages.

Am I doing something wrong or is this something still to be added?

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
___


Re: [NTG-context] Issue with interactive checkboxes[solved]

2022-05-25 Thread Pablo Rodriguez via ntg-context
On 5/24/22 19:58, Henning Hraban Ramm via ntg-context wrote:
> Am 24.05.22 um 18:43 schrieb Pablo Rodriguez via ntg-context:
>> But what I experienced in Acrobat Reader DC (on a borrowed computer) is
>> that you get the standard image (only when field is enabled) when you
>> click elsewhere in the document.
>>
>> I guess that this may be related to a missing implementation, but first
>> I would like to confirm you are experiencing the same.
>
> Custom checkboxes and radiobuttons used to work many years ago, but
> they’re broken for years – Hans blames Adobe for that.

Many thanks for your reply and your extensive testing, Hraban.

[Sorry for the late reply, but I have to do this on my free time.]

I have the impression that this issue might be more complex than Acrobat
misbehaving (in my opinion).

/Annot /Widget may be missing /MK /CA which contains this description
(https://opensource.adobe.com/dc-acrobat-sdk-docs/standards/pdfstandards/pdf/PDF32000_2008.pdf#nameddest=G11.2096745):

  The widget annotation’s normal caption, which shall be displayed when
  it is not interacting with the user.

But since this value is a text string, I wonder whether its value may be
/T from the parent (/FT /Btn).

Again, I don’t really know what is going on here.

But adding the /T from parent, by manually editing it:

  /MK << /CA  >>

This makes the mark different and permanent in Acrobat (although I don’t
get the right image). You may click on other area and the check mark
doesn’t vanish.

Maybe the issue is that check boxes don’t work exactly the way the rest
of us might have expected.

Sorry, but I’m again in a hurry.

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
___


Re: [NTG-context] Issue with interactive checkboxes[solved]

2022-05-24 Thread Pablo Rodriguez via ntg-context
On 5/24/22 10:18, Jan-Erik Hägglöf via ntg-context wrote:
> HI Again!
>
> I discovered what went wrong, such a silly syntax error, here comes a
> working code:

Hi Jan-Erik,

this will also make it:

  \setupinteraction[state=start]
  \definesymbol [yes] [{\externalfigure[on.svg][conversion=mp]}]
  \definesymbol [no] [{\externalfigure[off.svg][conversion=mp]}]

  \setupfield[setup3][width=2ex, height=2ex]

  \dorecurse{3}
  {\definefield [check-\recurselevel] [check] [setup3] [yes,no] [no]}

  \setupbodyfont[sans, 30pt]

  \starttext
  \startTEXpage[offset=1em, foregroundstyle=\ssbf]

  \dorecurse{3}
{\field[check-\recurselevel]\
  option \recurselevel\blank[1ex]}
  \stopTEXpage
  \stoptext

But what I experienced in Acrobat Reader DC (on a borrowed computer) is
that you get the standard image (only when field is enabled) when you
click elsewhere in the document.

I guess that this may be related to a missing implementation, but first
I would like to confirm you are experiencing the same.

Best,

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
___


Re: [NTG-context] Issue with interactive checkboxes

2022-05-23 Thread Pablo Rodriguez via ntg-context
On 5/23/22 13:11, Jan-Erik Hägglöf via ntg-context wrote:
> HI!
>
> Tried to make a checklist in an interactive document.
>
> The problem seems to be that all checks/uncecks in same click, not each
> individually.
>
> Is there something wrong with my code?

Hi Jan-Erik,

you basically put the same field twice.

Add something like:

  \definefield [check-you] [check] [setup 3] [yes,no] [no]

  \define\chka{\field[check-you]}

  \chka

Checks will be different then.

I hope it helps,

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
___


Re: [NTG-context] ignore not closed tags in XML input

2022-05-21 Thread Pablo Rodriguez via ntg-context
On 5/19/22 17:33, juh via ntg-context wrote:
> Dear Pablo,
>
> sorry for answering late as I am on holidays learning Spanish in
> Salamanca. :-)

Many thanks for your reply, Jan-Ulrich.

I hope you are enjoying your experience in Spain.

> Am Wed, May 18, 2022 at 06:00:20PM +0200 schrieb Pablo Rodriguez via 
> ntg-context:
>> Sorry for explaining myself so poorly.
>>
>> One of the not irrelevant tasks for me is finding examples of XML code.
>
> As I know that you are fluent in German I would recommend
>
> https://deutschestextarchiv.de/

Good advice, since the DTA contains TEI XML sources.

> It is a collection of many, many texts in German with expired
> copyright in TEI XML and other formats.
>
> I had a hard time to convert even one text to ConTeXt, but I've got it
> to work. I had the crazy idea to get a process where I simply can
> download the TEI XML source and make a nice book of the text.

Just a comment. My experience with computers is that the first time
doing anything is the hardest one.

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
___


Re: [NTG-context] ignore not closed tags in XML input

2022-05-21 Thread Pablo Rodriguez via ntg-context
On 5/19/22 00:09, Bruce Horrocks via ntg-context wrote:
>> On 18 May 2022, at 17:00, Pablo Rodriguez via ntg-context wrote:
>> Sorry for explaining myself so poorly.
>>
>> One of the not irrelevant tasks for me is finding examples of XML code.
>
> Perhaps you could start by typesetting a technical source rather
> than prose?
> > I suggest trying to typeset the UK Meteorological Office's Shipping
> Forecast :-)
>
> [...]>
> It's a good (in my opinion) source because it is amenable to being
> printed in several different ways: one might be to simply copy the
> webpage's layout, while another could be to use columns to fit more
> onto a single page of text.

Hi Bruce,

many thanks for your advice.

This could be a good way to practice things that I’m not used to.

After all, the things you can do with pandoc are rather limited when
considered from XML.

> Alternatively, a much more demanding exercise would be to typeset the
> user manual for the XML editing software "Oxygen": 
> <https://www.oxygenxml.com>> > The XML source for the manual is here:
>   <https://github.com/oxygenxml/userguide/blob/master/DITA/UserManual.ditamap>

Many thanks for your tip, but I’m afraid this isn’t my cup of tea.

But this reminded me of the Guidelines from the Text Encoding Initiative
(https://tei-c.org).

The PDF version of these Guidelines are roughly over 2000 pages.

It could be also a good exercise (and also demanding).

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
___


Re: [NTG-context] ignore not closed tags in XML input

2022-05-21 Thread Pablo Rodriguez via ntg-context
On 5/18/22 19:14, Thangalin via ntg-context wrote:
> Hey Pablo,
>
>> One of the not irrelevant tasks for me is finding examples of XML code.
>
> To clarify, XHTML documents /are/ XML documents. XHTML happens to use a
> standardized set of XML element and attribute names. All XHTML examples
> are also XML examples.

Hi Dave,

many thanks for the explanation.

>> But my worries came from having to sanitize HTML sources (which aren’t
>
> That was discussed in the blog post: finding a source of well-formed
> XHTML documents. There are a number of tools to sanitize HTML, as
> mentioned in the thread. KeenWrite uses the Java-based JSoup library
> https://jsoup.org/  to sanitize HTML and then create
> an XHTML version.

After dealing with other (X)HTML sources, I have experienced that not
few of them contain sloppy encoded data (as Taco pointed out).

There are even some mismatches that xmllint doesn’t solve automatically
(as Taco already mentioned too).

Now I understand that I will have also to curate tidy XML sources to
typeset them with ConTeXt.

Many thanks for your help again,

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
___


Re: [NTG-context] ignore not closed tags in XML input

2022-05-18 Thread Pablo Rodriguez via ntg-context
On 5/18/22 03:23, Thangalin via ntg-context wrote:
> […]
>   I wanted to write an introduction on how to typeset XML sources with
>   ConTeXt (at least, in Spanish).
>
> See:
> https://dave.autonoma.ca/blog/2020/04/11/project-gutenberg-projects/
>
> It's English, but describes a fair amount of what you're probably
> looking to accomplish, and there are all sorts of free translation
> services now.

Hi Dave,

many thanks for your reply.

Your introduction clearly states
(https://dave.autonoma.ca/blog/2020/04/11/project-gutenberg-projects/#xhtml-to-markdown):

  Even though ConTeXt can typeset XML documents, we’ll use XSLT—the
  verbose language only gurus grok without gripes—to convert XHTML into
  a Markdown document that pandoc can read to produce a native ConTeXt
  file.

I’m afraid I’m interested in typesetting XML documents with ConTeXt.

Actually, I have been typesetting XHML documents (generated by pandoc
from Markdown sources) for years now.

Sorry for having explained myself like crap. I wanted to write an
introduction on how to typeset XML sources in ConTeXt. I cannot see how
free translation services may be of help here.

>   One of the main issues I face is to find examples.
>
> See:
>
> https://wiki.contextgarden.net/XML
> https://wiki.contextgarden.net/Getting_Started_with_XML_and_ConTeXt_using_TEXML
>
> And themes for my text editor, KeenWrite, in particular:
>
> https://github.com/DaveJarvis/keenwrite-themes/tree/main/xhtml
> https://github.com/DaveJarvis/keenwrite-themes/tree/main/tarmes
> https://github.com/DaveJarvis/keenwrite-themes/tree/main/boschet

Sorry for explaining myself so poorly.

One of the not irrelevant tasks for me is finding examples of XML code.

>   Maybe all XML handling is way more complex than I originally thought.
>
> It takes some elbow grease. Conceptually, it's essentially mapping XML
> elements to xmlsetups, which are used to apply typesetting instructions.

I agree, this is basically the idea.

But my worries came from having to sanitize HTML sources (which aren’t
strict XML-compliant).

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
___


Re: [NTG-context] ignore not closed tags in XML input

2022-05-17 Thread Pablo Rodriguez via ntg-context
On 5/16/22 20:13, Taco Hoekwater via ntg-context wrote:
>> On 16 May 2022, at 18:50, Pablo Rodriguez via ntg-context 
>>  wrote:
>> [...]
>> If I want to typeset the whole book
>> (https://seumasjeltzz.github.io/LinguaeGraecaePerSeIllustrata/), I will
>> have to download and sanitize over 20 HTML files.
>
> Which can be done with a couple of command lines. Xmllint usually does a good
> job of cleaning up dodgy html input:
>
>   xmllint --html --xmlout  > 

Many thanks for your reply, Taco.

Since I have to recursively download the site (with "wget -r"), I hope I
can find a way to pipe and get all in a single invocation.

>> It is really a pity that ConTeXt cannot totally ignore any given XML 
>> elements.
>
> This statement is a little unfair: the problem is exactly that your input is 
> NOT proper XML.

My apologies. I really think ConTeXt rocks.

I wanted to write an introduction on how to typeset XML sources with
ConTeXt (at least, in Spanish).

One of the main issues I face is to find examples.

It seemed natural to me to use HTML edited texts. But it turned out,
it’s way trickier than I first thought.

HTML edited texts could be an eye-candy for some potential interested
people. But if one has to add web crawler plus XML sanitizer to the
dependencies, this makes it way harder (even for myself).

> If it was proper XML, ConTeXt would not have problems with it. ConTeXt 
> explicitly has
> the capability to handle XML files, which your input simply is not. In fact, 
> it is
> sloppy HTML-esque data that modern webbrowsers happen to be able to handle 
> more or less
> correctly. It is not valid HTML either, because valid HTML has to be valid 
> SGML, which your
> input clearly is not.

I agree my input isn’t proper XML, but it is valid SGML. One of the main
differences between both is that SGML allows unclosed tags.

This is why cases such as this one are corner-cases:
https://validator.w3.org/nu/?doc=https%3A%2F%2Fseumasjeltzz.github.io%2FLinguaeGraecaePerSeIllustrata%2F.

Since I considered this a corner-case, I thought that a command such as
\xmlignore{#1}{head/(meta|link)} would make sense.

> That said, Tools like xmllint exist for this stuff. Just write a small batch 
> driver file in
> some scripting language ((power)shell, lua, python, perl, etc.) to preprocess 
> the HTML
> stuff into clean XML, and you should be fine.

Many thanks for your for your reply again.

Maybe all XML handling is way more complex than I originally thought.

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
___


Re: [NTG-context] ignore not closed tags in XML input

2022-05-16 Thread Pablo Rodriguez via ntg-context
On 5/16/22 17:30, Hans van der Meer via ntg-context wrote:
> Can't you use an editor with grep, searching for something like the
> pattern ?

Many thanks for your reply, dr. van der Meer.

If I want to typeset the whole book
(https://seumasjeltzz.github.io/LinguaeGraecaePerSeIllustrata/), I will
have to download and sanitize over 20 HTML files.

And I’m afraid this is only for a single PDF output.

It is really a pity that ConTeXt cannot totally ignore any given XML
elements.

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
___


Re: [NTG-context] ignore not closed tags in XML input

2022-05-16 Thread Pablo Rodriguez via ntg-context
On 5/16/22 17:22, mf via ntg-context wrote:
> See HTML-tidy,
>
> https://www.html-tidy.org/
>
> it could help you pre-processing your HTML files.

Hi Massi,

the problem is that they aren’t my HTML files and that this is a very
common error.

I’m afraid that pre-processing could work for a few files, but this
solution wouldn’t work if I would like to use it with any HTML file that
I could need.

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
___


[NTG-context] ignore not closed tags in XML input

2022-05-16 Thread Pablo Rodriguez via ntg-context
Dear list,

I would like to feed
https://seumasjeltzz.github.io/LinguaeGraecaePerSeIllustrata/001.html as
XML input for ConTeXt.

The problem is that (as many other XML files that I haven’t generated
myself) some  and  tags aren’t closed, such as in:

  
  https://fonts/css?greek; rel="stylesheet">
  

So, all that I get is the following message:

  invalid xml file - parsed text

Unsuccessfully I have tried the following:

  \xmlsetsetup{#1}{html/head/(meta|link)}{-}

Is there no way to make ConTeXt more tolerant, so that it is able to
ignore those tags?

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
___


Re: [NTG-context] issue with two recently added PDF manuals

2022-05-15 Thread Pablo Rodriguez via ntg-context
On 5/15/22 15:34, Günter Kolousek via ntg-context wrote:
> Same here!

Günter,

many thanks for your reply confirming the issue.

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
___


Re: [NTG-context] issue with two recently added PDF manuals

2022-05-15 Thread Pablo Rodriguez via ntg-context
On 5/15/22 10:48, Henning Hraban Ramm via ntg-context wrote:
> Am 15.05.22 um 10:36 schrieb Pablo Rodriguez via ntg-context:
>> I’m experiencing issues to open the following documents added in one of
>> the recent latests.
>>
>>$ mupdf-gl onandon.pdf
>>$ mupdf-gl columnsets.pdf
>>
>> Would anyone be so kind to confirm the issue?
>
> While I can confirm that onandon.pdf is broken, I got no issues with
> columnsets.pdf

Many thanks for your reply, Hraban.

Which PDF viewer are you using?

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
___


[NTG-context] issue with two recently added PDF manuals

2022-05-15 Thread Pablo Rodriguez via ntg-context
Dear list,

I’m experiencing issues to open the following documents added in one of
the recent latests.

Now I’m on Linux 64bit with current latest (2022.05.11 11:36) and
mupdf-gl-1.20.0.rc1.

  $ mupdf-gl onandon.pdf
  error: cannot find startxref
  warning: trying to repair broken xref
  warning: repairing PDF document
  warning: object missing 'endobj' token
  error: cannot find page tree

  $ mupdf-gl columnsets.pdf
  error: expected object number
  warning: repairing PDF document
  error: object is not a stream
  warning: cannot load object (730 0 R) into cache
  error: cannot find XObject resource 'Im92'
  error: cannot find XObject resource 'Im93'
  error: cannot find XObject resource 'Im94'
  error: cannot find XObject resource 'Im95'
  error: cannot find XObject resource 'Im92'
  error: cannot find XObject resource 'Im93'
  error: cannot find XObject resource 'Im94'
  error: cannot find XObject resource 'Im95'
  warning: non-page object in page tree ()
  warning: ... repeated 11 times...
  warning: content stream is not a stream (1045 0 R)
  warning: ... repeated 2 times...
  warning: non-page object in page tree ()
  warning: ... repeated 2 times...
  warning: content stream is not a stream (1048 0 R)
  warning: ... repeated 2 times...
  warning: non-page object in page tree ()
  warning: ... repeated 2 times...
  warning: content stream is not a stream (1055 0 R)
  warning: ... repeated 2 times...
  warning: non-page object in page tree ()
  warning: ... repeated 6 times...

Latest Acrobat Reader DC in Windows isn’t able to open onandon.pdf and
it has problems to display all contents from columnsets.pdf.

Would anyone be so kind to confirm the issue?
___
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] conditionals for font features

2022-05-13 Thread Pablo Rodriguez via ntg-context
Dear list,

I wonder whether there is a conditional for font features similar to
\doifelseitalic.

\doifelsecurrentfonthasfeature checks whether the font supports an
OpenType feature.

\doifunknownfontfeature checks whether the font feature has been defined.

It seems that \doifelsefontfeature checks whether the font feature has
been defined or not.

Could anyone explain me how to check whether c2sc is being used or not
in the following sample?

  \definefontfeature[asc][c2sc=yes, smcp=yes]
  \setupbodyfont[palatino]
  \starttext
  \feature[+][asc] abc\\
  \feature[-][asc] abc
  \stoptext

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
___


[NTG-context] check whether font feature is being used

2022-05-12 Thread Pablo Rodriguez via ntg-context
Dear list,

I have the following sample:

  \setupbodyfont[pagella]
  \definefontfeature[asc]
[c2sc=yes, smcp=yes]
  \starttext
  \startTEXpage[offset=1em]
  text
  \doifelsecurrentfonthasfeature{asc}
{yes}{no}
  \doifelsefontfeature{asc}
{yes}{no}
  \doifunknownfontfeature{asc}
{yes}{no}\\
  \feature[+][asc]
  text
  \doifelsecurrentfonthasfeature{asc}
{yes}{no}
  \doifelsefontfeature{asc}
{yes}{no}
  \doifunknownfontfeature{asc}
{yes}{no}
  \stopTEXpage
  \stoptext

Sorry, but which is the right way to check when the font feature is
being deployed?

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
___


Re: [NTG-context] Custom type-imp file creating empty lines

2022-05-11 Thread Pablo Rodriguez via ntg-context
On 5/11/22 18:42, Alexandre Christe via ntg-context wrote:
> Dear list,
>
> I've played a bit with a custom type-imp file (partly inspired from the
> wiki https://wiki.contextgarden.net/Alegreya_Typescript
> ). However, the file
> I ended up with seems to create some empty lines at the beginning of the
> document (if I use the default or another font this vanishes, so it
> really comes from that file). Could anyone enlighten me?

Hi Alex,

you added an extra option group here:

  \definefallbackfamily [alegreya] [math] [Alegreya]
[superscriptsandsubscripts] [force=yes]

I think this may read:

  \definefallbackfamily [alegreya] [math] [Alegreya]
[range=superscriptsandsubscripts, force=yes]

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


Re: [NTG-context] Can I use language as a mode (set on the command line) and simplify this?

2022-05-11 Thread Pablo Rodriguez via ntg-context
On 5/11/22 18:09, Wolfgang Schuster via ntg-context wrote:
> Pablo Rodriguez via ntg-context schrieb am 11.05.2022 um 17:57:
>> AfaIk, there is not "--language" option from the command line. (This
>> also makes sense to me.)
>
> \doifdocumentargument {language}
>    {\mainlanguage[\getdocumentargument{language}]}

Many thanks for the info, Wolfgang.

I see that literally anything goes:

  \doifdocumentargument{anything}
{\mainlanguage[\getdocumentargument{anything}]}

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
___


Re: [NTG-context] \startXML vs \startPARSEDXML

2022-05-11 Thread Pablo Rodriguez via ntg-context
On 5/11/22 11:47, Denis Maier via ntg-context wrote:
> Hi everyone,
>
> the wikipage on \starttyping
> (https://wiki.contextgarden.net/Command/_starttyping
> ) says there are
> some dedicated commands, e.g. \startXML and \startPARSEDXML. How do they
> differ?

Hi Denis,

yesterday I had to start using xml instead of parsed-xml.

See the difference:

  \setuppapersize[A4, landscape]
  \setupbodyfont[dejavu]
  \starttext
  \startxtable[option=stretch]
  \startxrow[offset=1ex]
  \startxcell
  \startXML
  
  
   

 Anuncio
 
 Belleza

   
  
  \stopXML
  \stopxcell
  \startxcell
  \startPARSEDXML
  
  
   

 Anuncio
 
 Belleza

   
  
  \stopPARSEDXML
  \stopxcell
  \stopxrow
  \stopxtable
  \stoptext

I wonder why attribute values are parsed so. I don’t know whether this
might be a bug (but this is why I replaced "parsed-xml" with "xml" in my
code).

If I could ask you a favor, would you be so kind to confirm whether
\xmlpos and \xmldepth are misbehaving or not (as already reported in
https://mailman.ntg.nl/pipermail/ntg-context/2022/105495.html and
https://mailman.ntg.nl/pipermail/ntg-context/2022/105604.html)?

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
___


Re: [NTG-context] Can I use language as a mode (set on the command line) and simplify this?

2022-05-11 Thread Pablo Rodriguez via ntg-context
On 5/11/22 09:40, Gerben Wierda via ntg-context wrote:
>> On 11 May 2022, at 08:59, Taco Hoekwater  wrote:
>> [...]
>> The language settings trigger a system mode, see
>>
>> https://wiki.contextgarden.net/Modes#System_modes
>
> Thanks, but how do I influence this from the command line? Does it
> work the other way around, so with “—mode=en”?
Hi Gerben,

I think this may do the trick:

  \doiftext{\env{ml}}
{\mainlanguage[\env{ml}]}
  \starttext
   Document main language:
\startmodeset
[**en] {English}
[**es] {Spanish}
[**de] {German}
[**nl] {Dutch}
[**ru] {Russian}
\stopmodeset%
   .
  \stoptext

Of course, "--arguments=ml=nl" would be the right option to pass the
language from the command line.

AfaIk, there is not "--language" option from the command line. (This
also makes sense to me.)

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


[NTG-context] \xmlpos and \xmldepth misbehave? (again)

2022-05-06 Thread Pablo Rodriguez via ntg-context
Dear list,

I have the folloing sample:

  \startbuffer[text]
  first level
  second level
  third level
  third level
  
  second level
  third level
  third level
  
  second level
  third level
  third level
  
  
  \stopbuffer

  \startxmlsetups xml:text
  \xmlsetsetup{#1}{doc|s|ss}{xml:*}
  \stopxmlsetups

  \xmlregistersetup{xml:text}

  \startxmlsetups xml:doc
  \chapter{\xmlpos{#1}\letterat\xmldepth{#1}: \xmlflush{#1}}
  \stopxmlsetups

  \startxmlsetups xml:s
  \section{\xmlpos{#1}\letterat\xmldepth{#1}: \xmlflush{#1}}
  \stopxmlsetups

  \startxmlsetups xml:ss
  \subsection{\xmlpos{#1}\letterat\xmldepth{#1}: \xmlflush{#1}}
  \stopxmlsetups

  \setuphead[chapter,section,subsection][before=,after=,]

  \setuppapersize[A7]
  \setuplayout[width=middle, header=0cm]

  \starttext
  \xmlprocessbuffer{main}{text}{}
  \stoptext

All \xmldepth values are +1 that I think they should be (starting from 2
[instead of 1] up to 4 [instead of 3]).

\xmlpos values seem to count 2, 4, 6… (instead of 1, 2, 3…).

This is with current latest from 2022.05.02 16:19.

Sorry, but could anyone confirm whether I’m missing something or whether
this issue is a bug?

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
___


[NTG-context] fatal error again in LMTX

2022-05-02 Thread Pablo Rodriguez via ntg-context
Hi Hans,

as already reported
(https://mailman.ntg.nl/pipermail/ntg-context/2022/105443.html), LMTX
(from 2022.05.02 16:19) quits messaging only fatal error with such a sample:

  \starttext
  \startitemize
  \item one
  \stoptext

I know that \stopitemize is missing above.

But in real--world documents, this mistake may need hours to be fixed.

Would it be possible that LMTX could provide more verbose information
about unfinished \start-commands?

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
___


[NTG-context] \doifnotdocumentargument in proper Lua

2022-04-29 Thread Pablo Rodriguez via ntg-context
Dear list,

I have the following command in one of my documents:

  \doifnotdocumentargument{no-metadata}
{\ctxlua{document.transfer_metadata(document.main_file)}}

Which would be the right way to write \doifnotdocumentargument in proper
Lua?

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
___


Re: [NTG-context] issue with framed texts

2022-04-25 Thread Pablo Rodriguez via ntg-context
On 4/24/22 21:13, Wolfgang Schuster via ntg-context wrote:
> Pablo Rodriguez via ntg-context schrieb am 24.04.2022 um 20:56:
>> [...]
>> Using current LMTX (2022.04.20 19:18), I’m afraid no format from
>> \setupframedtext is applied to the backcover framed text.
>> [...]
> While you can pass a instance to \starframed (e.g.
> \startframed[backcover]) the same isn't possible with \startframedtext.

Many thanks for your reply, Wolfgang.

I thought I could do that, because
http://www.pragma-ade.com/general/qrcs/setup-en.pdf seems to allow it.

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
___


[NTG-context] issue with framed texts

2022-04-24 Thread Pablo Rodriguez via ntg-context
Dear list,

I have the following sample:

  \defineframedtext[backcover]
  \setupframedtext[backcover]
  [frame=off,
   offset=overlay,
   width=\textwidth]
  \starttext
  \startframedtext[backcover]
  \input zapf
  \stopframedtext
  \stoptext

Using current LMTX (2022.04.20 19:18), I’m afraid no format from
\setupframedtext is applied to the backcover framed text.

Can anyone confirm the issue or explain what I’m doing wrong?

Just in case it may be relevant, I’m on Linux 64bit.

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
___


Re: [NTG-context] Need some hints to fix my standalon installation

2022-04-20 Thread Pablo Rodriguez via ntg-context
On 4/20/22 19:22, Christoph Hintermüller via ntg-context wrote:
>
> That's fine. As soon as post that update is ready for pulling I will
> pull.
> Till then i can wait.

Hi Christoph,

to check when there is a new release I use:

curl -I https://lmtx.pragma-ade.com/install-lmtx/texmf-context.zip 2>&1
| grep -i Last-Modified

Just in case it might help you,

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
___


Re: [NTG-context] Need some hints to fix my standalon installation

2022-04-20 Thread Pablo Rodriguez via ntg-context
On 4/20/22 12:34, Christoph Hintermüller via ntg-context wrote:
> Hi
> Have updated my standalone installation from one of the 2020 releases
> to the latest one running
>
> ./first-setup.sh --context=latest --modules=all

Hi Christoph,

sorry for the obvious suggestion «post facto»: never update ConTeXt
without a backup first.

> [...]
> Therefore i have the following questions
>  - would it help to sacrifice the updated standalone installation and
>do a fresh install

I don’t think it would work, since it only works with LuaMetaTeX.

I got the same results (in Windows [because I cannot make it work in
Linux]) with LuaTeX 1.15 (the one that comes with ConTeXt LMTX).

My suggestion would be a fresh install (in a different directory, no
need to remove anything) of ConTeXt LMTX.

>  - What else i would have to check and probably fix to make the math
>working as expected

Math is being improved in ConTeXt these days. It might be a bug.

I wonder whether Mikael or Hans could review your issue.

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


Re: [NTG-context] xmlpos values doubled

2022-04-20 Thread Pablo Rodriguez via ntg-context
On 4/20/22 11:51, Ben Moon via ntg-context wrote:
> Hello again,
>
> I wonder whether anyone has some thoughts to help with my problem?
> Either why \xmlpos gives double values or alternatives to arrange my
> table format?

Hi Ben,

I think that both \xmlpos and \xmldepth give weird results.

With this minimal sample:

  \startbuffer[text]
  first level
  second level
  third level
  third level
  
  second level
  third level
  third level
  
  second level
  third level
  third level
  
  
  \stopbuffer

  \startxmlsetups xml:text
  \xmlsetsetup{#1}{doc|s|ss}{xml:*}
  \stopxmlsetups

  \xmlregistersetup{xml:text}

  \startxmlsetups xml:doc
  \chapter{\xmlpos{#1}\letterat\xmldepth{#1}: \xmlflush{#1}}
  \stopxmlsetups

  \startxmlsetups xml:s
  \section{\xmlpos{#1}\letterat\xmldepth{#1}: \xmlflush{#1}}
  \stopxmlsetups

  \startxmlsetups xml:ss
  \subsection{\xmlpos{#1}\letterat\xmldepth{#1}: \xmlflush{#1}}
  \stopxmlsetups

  \setuphead[chapter,section,subsection][before=,after=,]
  \starttext
  \xmlprocessbuffer{main}{text}{}
  \stoptext

\xmldepth shows values that I think are +1 than they should be.

\xmlpos counts in pairs and not in units (as you wrote, 2, 4, 6...).

Hans, could you check whether this is working as expected?

Sorry, but if this isn’t a bug, I have no idea of what I may be missing.

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
___


Re: [NTG-context] embed source-file in pdf

2022-04-20 Thread Pablo Rodriguez via ntg-context
On 4/19/22 16:47, Heinrich Paeßens via ntg-context wrote:
> Hi there
>
> just a quick question: 
>
> Is there a command or package to embed the source-file (*.tex) into the
> resulting pdf-file,

Hi Heinrich,

I think this may be what you need:

  \setupinteraction[state=start]
  \attachment[file=\jobname.tex]
  \starttext
  \input zapf
  \stoptext

> just like in LaTeX using package »embedall«

I think it is way better that you explain what you want to achieve.

I’d say that not all ConTeXt users are also proficient in LaTeX. In my
case, I haven’t use it for more than a decade.

I hope it helps,

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
___


Re: [NTG-context] placing (on) layers

2022-04-16 Thread Pablo Rodriguez via ntg-context
On 4/15/22 21:51, Henning Hraban Ramm via ntg-context wrote:
> Hi again,
>
> I’m always struggling with putting stuff on layers, since these just
> never start where I’d expect them to, and the offsets changed a few
> times within the last years.
>
> Please explain how I should define a layer that covers the whole page,
> since the following MWE is wrong (the layer always starts below the
> first line):

Hi Hraban,

slightly modifying your MWE, I think I get what might fit your needs
(see below).

I never used \flushlayer and your sample shows that it doesn’t fit here.

The layer is relative to the page, not to the paper in this case.

And the state is an option for the layer (in \definelayer), not for the
background, being "start" its default value.

Just in case it might help,

Pablo

  \setupexternalfigures
 [location={default,global}]

  \setuppapersize[A5][A4]
  \setuplayout[
 marking=on,
 location=middle,
  ]
  \definemeasure[Bleed][3mm]
  \definemeasure[MaxHeight]
  [{\dimexpr\paperheight + 2\measure{Bleed}\relax}]
  \definemeasure[MaxWidth]
  [{\dimexpr\paperwidth + 2\measure{Bleed}\relax}]

  \definelayer[papier][
 preset=lefttop,
 %x=0mm,y=0mm,
 width=\paperwidth,
 height=\paperheight,
  ]
  \setupbackgrounds[page][background=papier]

  \starttext
  \showframe
  TEST

  \setlayerframed[papier][
 preset=lefttop,
 %x=-\measure{Bleed},
 %y=-\measure{Bleed},
 offset=overlay,
 %frame=off,
 width=\measure{MaxWidth},
 height=\measure{MaxHeight},
  ]{\externalfigure[cow][
 width=\measure{MaxWidth},height=\measure{MaxHeight}
  ]}

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


[NTG-context] to XMP info?

2022-04-16 Thread Pablo Rodriguez via ntg-context
Hi Hans,

I need to access the document language using Poppler’s GObject
introspection.

Right now, the only way to do that would be to have 
(https://raw.githubusercontent.com/adobe/XMP-Toolkit-SDK/main/docs/XMPSpecificationPart1.pdf#search=dc:language)
in the XMP metadata included in the PDF file.

Would it be possible to have  included in the XMP metadata
(besides other DC elements, such as author, title, description or format)?

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
___


Re: [NTG-context] $\sin \theta$ behave differently in metafun

2022-04-16 Thread Pablo Rodriguez via ntg-context
On 4/16/22 13:01, śrīrāma via ntg-context wrote:
> Strangely, my attachments never make it to the list

Sreeram,

as you can check yourself, the list got your attachment
(https://mailman.ntg.nl/pipermail/ntg-context/2022/105466.html).

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


Re: [NTG-context] new upload

2022-04-16 Thread Pablo Rodriguez via ntg-context
On 4/15/22 20:24, Hans Hagen via ntg-context wrote:
> Hi,
>
> I uploaded a new lmtx. Apart from a experimental intersection feature in
> the mp library (and metafun, more will be revealed when MS an I are okay
> with it) there is not that much news.

Many thanks for the new upload, Hans.

I’m afraid I get compilation error with your sample:

 lua error:
  callback error: .../base/mkxl/typo-ada.lmt:78:
attempt to call a nil value (upvalue 'traverseleader')
stack traceback:
  .../base/mkxl/typo-ada.lmt:78: in upvalue 'nodes_adaptive_handle'
[string "local tonut  = nodes.tonut..."]:10: in function
<[string "local tonut  = nodes.tonut..."]:7>
(...tail calls...)
  .../base/mkxl/typo-bld.lmt:208: in function
<.../base/mkxl/typo-bld.lmt:204>

I got the same error message with a brand new installation.

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


Re: [NTG-context] fatal error in LMTX

2022-04-13 Thread Pablo Rodriguez via ntg-context
On 4/13/22 00:27, Bruce Horrocks via ntg-context wrote:
>> On 12 Apr 2022, at 18:14, Pablo Rodriguez via ntg-context 
>>  wrote:
>>
>> I wonder whether it would be possible that ConTeXt or LuaMeTaTeX could
>> be more verbose about an opened environment that isn’t closed.
>
> $ mtxrun --script check  filename.tex
> is something I learned from this list.

Many thanks for your reply, Bruce.

I knew this too, but this doesn’t fit my working conditions.

I’m afraid that it doesn’t work with sources with \input commands.

Contents of 'c.tex':

  \starttext
  \startfrontmatter
  some text...
  \input c1.tex
  \stoptext

Contents of 'c1.tex':

  \stopfrontmatter

Compilation works fine, but checking doesn’t.

Checking doesn’t also work with XML sources typeset with ConTeXt
environments.

XML is the most common format for the sources I use with ConTeXt.

Many thanks for your help again,

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
___


Re: [NTG-context] fatal error in LMTX

2022-04-13 Thread Pablo Rodriguez via ntg-context
On 4/12/22 20:04, Otared Kavian via ntg-context wrote:
> Hi Pablo,
>
> Your example works fine on my machine (MacOS 11.6.4) with LMTX
> version 2022.04.11.
Hi Otared,

many thanks for your reply.

The fatal error prevents an extra run, but it doesn’t prevent the PDF
generation.

In my original document, hyperlinks for footnotes were missing.

Don’t you even get the fatal error message?

> However in your example the \stopfrontmatter is missing.

I knew that. I only provided a minimal sample that I got after more than
two hours dealing with an XML source and two ConTeXt environments.

Cheers,

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
___


[NTG-context] fatal error in LMTX

2022-04-12 Thread Pablo Rodriguez via ntg-context
Hi Hans,

I have a minimal sample that triggers a fatal error in ConTeXt LMTX
(current latest from 2022.04.11 19:27):

  \starttext
  \startfrontmatter
  \input zapf
  \stoptext

This gives the following error message:

  mkiv lua stats  > runtime: 0.386 seconds, 1 processed pages,
1 shipped pages, 2.592 pages/second
  mtx-context | fatal error: return code: 1

The one above is a stupid sample. But it took me about two hours to
discover what was triggering the fatal error message.

I wonder whether it would be possible that ConTeXt or LuaMeTaTeX could
be more verbose about an opened environment that isn’t closed.

Many thanks for your help and your excellent work,

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
___


Re: [NTG-context] right item marks for associative questions?

2022-04-11 Thread Pablo Rodriguez via ntg-context
On 4/11/22 20:46, Damien Thiriet via ntg-context wrote:
> [...]
> I design it as a two-cells xtable with itemized lists inside.
> How can I have the item mark on the right side?

Hi Damien,

I’m not sure I get your point, but this may be helpful:

 \startitem \inrightmargin{\currentitemnumber} Nietzsche\stopitem

Just in case it might give you some inspiration.

Cheers,

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
___


Re: [NTG-context] Switching fonts changes framedtext justification

2022-04-07 Thread Pablo Rodriguez via ntg-context
On 4/7/22 19:50, Thangalin via ntg-context wrote:
> Appreciated, Pablo.
>> The output remains unjustified:
>
> https://i.ibb.co/dM9LFWZ/future-human.png
>
> $ find /usr/share/fonts/ -name "*Emoj*"
> /usr/share/fonts/emoji/OpenSansEmoji.otf

Sorry, I gave you the wrong direction.

The OTF version has to be removed, not the TTF version (it is the one
that works).

I already knew that
(https://mailman.ntg.nl/pipermail/ntg-context/2022/105409.html), but I
mixed (and messed) versions.

Sorry, "OpenSansEmoji.otf" is the one to be removed and
"OpenSansEmoji.ttf" is the one to be installed.

> $ context --version
> mtx-context | current version: 2022.04.01 09:37
>
> $ cat ~/bin/fontcache
> #!/usr/bin/env bash
>
> fc-cache -fv
> mtxrun --generate
> mtxrun --script fonts --reload

I had problems in the past with "mtxrun --script fonts --reload
--force", so I completely remove the contents from
"tex/texmf-cache/luametatex-cache/" (which requires "mtxrun --generate"
after).

"mtxrun --script cache --erase" used to do the same, but I cannot get it
working now (either on Linux or in Windows [as reported in
https://mailman.ntg.nl/pipermail/ntg-context/2022/105420.html]).

> Any other suggestions?

I hope it works now. Sorry for the mess,

Pablo


emoji.pdf
Description: Adobe PDF document
___
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] not working "mtxrun --scripts cache --erase"

2022-04-07 Thread Pablo Rodriguez via ntg-context
On 4/6/22 17:11, Pablo Rodriguez via ntg-context wrote:
> Dear list,
>
> I’m afraid that I have just found out that "mtxrun --scripts cache
> --erase" doesn’t delete a single file from the cache.
> [...]
> I’m using current latest (2022.04.01 09:37) on Linux 64bit.

I have confirmed that the same latest doesn’t delete file from the cache
on Windows 64bit.

I would be surprised to be the only one to experience this issue.

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
___


[NTG-context] not working "mtxrun --scripts cache --erase"

2022-04-06 Thread Pablo Rodriguez via ntg-context
Dear list,

I’m afraid that I have just found out that "mtxrun --scripts cache
--erase" doesn’t delete a single file from the cache.

Here is the output I get:


  $ mtxrun --scripts cache --erase

  mtx-cache   | writable path: /context/tex/texmf-cache/
luametatex-cache/context/5fe67e0bf

  mtx-cache   |

  mtx-cache   | fmt:1

  mtx-cache   | log:1

  mtx-cache   | lua:7

  mtx-cache   | lud:7

  mtx-cache   | lui:1

  mtx-cache   | luv:1

  mtx-cache   | tma:   42

  mtx-cache   | tmd:   42

  mtx-cache   |

  mtx-cache   | total  :  102

  mtx-cache   |

  mtx-cache   | writable path: /context/tex/texmf-cache/
luametatex-cache/context/5fe67e0bf

  mtx-cache   |

  mtx-cache   | fmt:0 gone,0 kept

  mtx-cache   | log:0 gone,0 kept

  mtx-cache   | lua:0 gone,0 kept

  mtx-cache   | lud:0 gone,0 kept

  mtx-cache   | lui:0 gone,0 kept

  mtx-cache   | luv:0 gone,0 kept

  mtx-cache   | tma:0 gone,0 kept

  mtx-cache   | tmd:0 gone,0 kept

  mtx-cache   |


Could anyone confirm the issue?

I’m using current latest (2022.04.01 09:37) on Linux 64bit.

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
___


[NTG-context] two requests for ConTeXt

2022-04-06 Thread Pablo Rodriguez via ntg-context
Hi Hans,

I have a couple of suggestions to be added to a not so distant release

The first one is to allow that ConTeXt LMTX also downloads the available
modules.

The second feature would be the addition of an "emoji" range for font
fallbacks.

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
___


Re: [NTG-context] Switching fonts changes framedtext justification

2022-04-05 Thread Pablo Rodriguez via ntg-context
On 4/5/22 03:16, Thangalin via ntg-context wrote:
>> The font is too old, but the TTF version works just fine on both Linux
>> and Windows.
>
> No dice with LMTX 2022.04.01 09:37 and the TTF file. Using the TTF,
> the emojis don't appear, but the text is justified. Using the OTF, the
> emojis appear, but the text is unjustified.

Both things work on both Linux and Windows systems.

  \definefontfamily[emoj][rm][OpenSansEmoji]
  \setupbodyfont[emoj]
  \starttext
  \startTEXpage[offset=1em, align=center]
  Welcome to the future,\\human !
  \stopTEXpage
  \startframedtext
  \input zapf
  \stopframedtext
  \stoptext

> What version of ConTeXt are you using, Pablo?

Current latest from 2022.04.01 09:37. Binaries for 64bits on both OS.

Just in case it may help, I recommend the following approach.

1. Remove the file OpenSansEmoji.ttf.
2. Remove the directory tex/texmf-cache/luametatex-cache.
3. Run mtxrun --generate.
4. Compile the sample above.

BTW, "mtxrun --scripts cache --erase" doesn’t work for me (just in case
anyone wonders).

I hope it may 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
___


Re: [NTG-context] Switching fonts changes framedtext justification

2022-04-04 Thread Pablo Rodriguez via ntg-context
On 4/4/22 08:40, Henning Hraban Ramm via ntg-context wrote:
> Am 04.04.22 um 01:21 schrieb Thangalin via ntg-context:
>> [...]
>> The .otf file is from:
>>
>> https://github.com/MorbZ/OpenSansEmoji
>
> That’s 9 years old. The linked resources were updated later and are
> still outdated. There must be a better Emoji font out there?

The font is too old, but the TTF version works just fine on both Linux
and Windows.

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


Re: [NTG-context] Switching fonts changes framedtext justification

2022-04-03 Thread Pablo Rodriguez via ntg-context
On 4/3/22 02:36, Thangalin via ntg-context wrote:
> Hi all,
> [...]
> How would you ensure that both text areas remain fully justified?

I think (at least) LMTX has an issue with the font:

  \definefontfamily [TextEmoji] [rm] [OpenSansEmoji]
  \setupbodyfont [TextEmoji]
  \starttext
  \input knuth
  \stoptext

I’m afraid I cannot test this with MkIV.

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
___


Re: [NTG-context] mkiv

2022-04-02 Thread Pablo Rodriguez via ntg-context
On 4/2/22 09:40, Hans Hagen via ntg-context wrote:
> [..]
> and how about
>
> context --luatex --generate

Many thanks for your reply, Hans.

I’m afraid it doesn’t work. It still generates data under
$HOME/.texlive2021/, but it tries to read data (to generate the format
file) from $HOME/backup-context/01062022_context/, which is a backup I
have, instead of $HOME/context (which is the actual directory where
ConTeXt is installed).

Even with the HOME/backup-context/ directory hidden, I get the following
error when Irun "context --luatex document" (after having run "context
--luatex --generate"):

system  > lua > loading of file
'context/tex/texmf-context/tex/context/base/mkiv/luat-exe.lua' failed:
cannot open
context/tex/texmf-context/tex/context/base/mkiv/luat-exe.lua: No such
file or directory
resolvers   > lua > loading file
'context/tex/texmf-context/tex/context/base/mkiv/luat-exe.lua' failed

error loading file: luat-exe.lua (aborting)resolvers   | formats |
resolvers   | formats | binary path  : /usr/bin
resolvers   | formats | format path  :
/home/ousia/.texlive2021/texmf-var/luatex-cache/context/d10b607aa0e9d13dde6602f491b76cbc/formats/luatex
resolvers   | formats | luatex engine: luatex
resolvers   | formats | lua startup file :
/home/ousia/context/tex/texmf-context/tex/context/base/mkiv/luat-cod.lua
resolvers   | formats | context file :
/home/ousia/context/tex/texmf-context/tex/context/base/mkiv/cont-en.mkiv
resolvers   | formats | run time : 0.100 seconds
resolvers   | formats | return value : okay
resolvers   | formats |
mtx-context | error, no format found with name: cont-en, aborting
system  | total runtime: 1.505 seconds

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
___


Re: [NTG-context] mkiv

2022-04-01 Thread Pablo Rodriguez via ntg-context
On 4/1/22 18:20, Hans Hagen via ntg-context wrote:
> [...]
> So, today is the day we kind of formally freeze MKIV.

Just a comment on MkIV.

I don’t remember exactly, but I’m afraid that "context --luatex
document" hasn’t been working on my computers (either running Linux or
Windows) for months now.

This isn’t important for me, but just in case it may be relevant for you.

If I run "context --luatex document", I get a new directory
'$HOME/.texlive2021/texmf-var' created (which includes a "luatex-cache"
directory inside)

When I run "mtxrun --generate", all required files are generated in
"$HOME/context/tex/texmf-cache/luametatex-cache".

I wonder why "mtrun --generate" doesn’t generate a "luatex-cache"
directory in the same directory containing "luametatex-cache".

BTW, the '$HOME/.texlive2021/texmf-var/luatex-cache/" directory only
contains an empty 'context/d10b607aa0e9d13dde6602f491b76cbc/trees/' path.

Just in case it may be relevant and many thanks for ConTeXt,

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
___


Re: [NTG-context] Breaking url into multiple lines results in broken link in rendered PDF

2022-03-31 Thread Pablo Rodriguez via ntg-context
On 3/30/22 19:35, A A via ntg-context wrote:
> I would like to be able to break up URLs into multiple lines in my
> bibliography source file and still get the link to work.

I think this would work as you intend:

  \setupinteraction[state=start]
  \starttext
  \useURL[myUrl][https:%
  //www.%
  goo%
  gle%
  .com]
  \goto{link}[url(myUrl)]
  \stoptext

I hope it helps,

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
___


Re: [NTG-context] Make footnote/endnote number not superscript?

2022-03-21 Thread Pablo Rodriguez via ntg-context
On 3/20/22 22:18, Rik Kabel via ntg-context wrote:
> On 2022-03-20 17:07, Wolfgang Schuster via ntg-context wrote:
>> [...]
>> \setupnote[footnote][textcommand=]
>> [...]
> You might want to define a separate set of notes, for example,
> linknotes, defined as Wolfgang suggests, so
> [...]
> You can define multiple streams of footnotes and endnotes.
Hi Bruce,

following the conversation, this might be a sample of what I think you
intend to achieve:

  \definenote[linknote]
  \setupnote[linknote]
  [textcommand={\ }, textstyle=, location=text]
  \setupnotation[linknote]
  [alternative=serried, numberstyle={\switchtobodyfont[12pt]},
   style={\switchtobodyfont[12pt]}, numbercommand=]
  \starttext

  \dorecurse{25}
  {First\footnote{Footnote one}.
   See my video at link\linknote{yewtu.be/my-great-video.}. }

  \title{Links}
  \placenotes[linknote]

  \stoptext

I hope it may 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
___


Re: [NTG-context] zint module on LMTX

2022-03-17 Thread Pablo Rodriguez via ntg-context
On 3/16/22 22:32, Pablo Rodriguez via ntg-context wrote:
> [...]
> On Windows, I need to check the issue further.

Using latest binary from SF (which is Win32, btw), I get the following
error message:

  error (lmt library): unable to load 'D:/utilidades/context/tex/
texmf-win64/bin/lib/luametatex/zint/libzint.dll', quitting

  mtx-context | fatal error: return code: 1

So, latest version in Windows breaks compilation on my computer.

What am I doing wrong?

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
___


Re: [NTG-context] zint module on LMTX

2022-03-16 Thread Pablo Rodriguez via ntg-context
On 3/16/22 19:11, Adam Reviczky via ntg-context wrote:
> Hi Pablo,
>
> If you use an older version of zint, maybe "isbn" instead of "isbnx"
> would work.

Hi Adam,

I have just installed version 2.10.

"isbn" works, but "isbnx" doesn’t. As already reported is an
unrecognized option that is also listed as available alternative (weird).

> I have used both isbnx and qrcode successfully with zint 2.10 on linux.

As said, for some strange reason, "isbnx" doesn’t work on my Linux machine.

On Windows, I need to check the issue further.

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
___


Re: [NTG-context] zint module on LMTX

2022-03-16 Thread Pablo Rodriguez via ntg-context
On 3/16/22 18:05, Hans Hagen via ntg-context wrote:
> On 3/16/2022 5:37 PM, Pablo Rodriguez via ntg-context wrote:
>> Dear list,
>>
>> using latest LMTX and following the steps from
>> https://wiki.contextgarden.net/Barcodes#Zint_module, I’m afraid I don’t
>> get any barcode either in Linux or Windows.
>>
>> Minimal sample:
>>
>>\starttext
>>\usemodule[zint]
>>\barcode[alternative=isbnx, text=9783865419026, width=4cm]
>>\stoptext
>> [...]
> Are you sure that you have the latest zint? (from sourceforge)

Many thanks for your reply, Hans.

I have version 2.9.2 on Linux and version 2.10 on Windows.

I’ll try to install the new version on Linux and report results here.

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
___


[NTG-context] zint module on LMTX

2022-03-16 Thread Pablo Rodriguez via ntg-context
Dear list,

using latest LMTX and following the steps from
https://wiki.contextgarden.net/Barcodes#Zint_module, I’m afraid I don’t
get any barcode either in Linux or Windows.

Minimal sample:

  \starttext
  \usemodule[zint]
  \barcode[alternative=isbnx, text=9783865419026, width=4cm]
  \stoptext

Error message is rather weird on Linux:

  optional> using library '/home/ousia/context/tex/texmf-linux-
64/bin/lib/luametatex/zint/libzint.so'
  zint> unknown barcode alternative 'isbnx'
  zint>
  zint> valid barcode alternatives:
  zint>
  [...]
  zint>   isbn
  zint>   isbnx
  [...]

It seems that a valid barcode alternative ends up being unknown to the
library.

What am I missing here?

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
___


Re: [NTG-context] paragraph notes located in text

2022-02-01 Thread Pablo Rodriguez via ntg-context
On 1/31/22 10:11 PM, Wolfgang Schuster via ntg-context wrote:
> Pablo Rodriguez via ntg-context schrieb am 31.01.2022 um 19:49:
>> Dear list,
>> [...]
>> Could anyone confirm that the is no way to get paragraph notes when
>> location is text, or tell me what I’m missing?
>
> You forgot
>
>      \setupnotation[footnote][display=no]
>
> otherwise each footnote entry starts at a new line.
Many thanks for your reply, Wolfgang.

I wonder whether it would make sense that the use of "location=text" and
"paragraph=yes" in \setupnote could trigger "\setupnotation[display=no]".

Otherwise, for the average user "display" seems to invoke a similar
function to "placehead" in "\setuphead".

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
___


Re: [NTG-context] doublesided margin page number

2022-01-31 Thread Pablo Rodriguez via ntg-context
On 1/31/22 7:19 PM, Pablo Rodriguez via ntg-context wrote:
> On 1/24/22 2:28 AM, Youssef Cherem via ntg-context wrote:
>> I've managed to put double-sided page numbers -- but numbers are
>> restarting after two, though. What's going on?
>
> Hi Yousesef,
 ^

Sorry for the typo when writing your name, Youssef.

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
___


[NTG-context] paragraph notes located in text

2022-01-31 Thread Pablo Rodriguez via ntg-context
Dear list,

with current latest (2022.01.21 20:13), I cannot get paragraph footnotes
when located in text.

Here you have the mandatory sample:

  \setuppapersize[A6]
  \showframe\showgrid
  %~ \setupnote[footnote][paragraph=yes]
  \setupnote[footnote][location=text, paragraph=yes]
  \setupnotation[footnote][alternative=serried, width=broad]
  \starttext
  \startlinenumbering[step=3]
  \dorecurse{25}
   {a\footnote{b} }
  \stoplinenumbering
   \placenotes[footnote]
  \stoptext

I already asked this twice
(https://mailman.ntg.nl/pipermail/ntg-context/2022/104770.html,
https://mailman.ntg.nl/pipermail/ntg-context/2022/104929.html).

Could anyone confirm that the is no way to get paragraph notes when
location is text, or tell me what I’m missing?

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
___


Re: [NTG-context] doublesided margin page number

2022-01-31 Thread Pablo Rodriguez via ntg-context
On 1/24/22 2:28 AM, Youssef Cherem via ntg-context wrote:
> I've managed to put double-sided page numbers -- but numbers are
> restarting after two, though. What's going on?

Hi Yousesef,

I think this is related to how \setupbackgrounds is invoked.

The following command works:

  \setupbackgrounds[page] [setups=setpagenumber, background=pgnumber]

Of course, you have to place the layer properly.

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


[NTG-context] three suggestions for the statistical-charts module

2022-01-17 Thread Pablo Rodriguez via ntg-context
Hi Tamara, Adriana and Tomáš,

this is my first sample using statistical-charts (I attach the CSV file):

\setupbodyfont[helvetica]
\usemodule[statistical-charts]
\starttext
\setupframed[dotslabels][loffset=1.1cc,
boffset=0.4cc]
\linechart[basic][yscale=.25, xscale=1,
distance=1,
xgridlinesdensity=1,
fillcolor=aquamarine,
line=yes, linecolor=shamrock,
dotscolor=shamrock,
dotswidth=5, dotslabels=yes,
axesunits=yes, xunit={Measurements},
yunit={Temperature}]%
[method=dataset, dsname=main, filename=\jobname.csv,
sep=;, cx={A2:A14},
cy=B2:B14]
\stoptext

I wonder whether this has been already proposed:

1. If the CSV file contains fields with quotes that the module reads,
compilation breaks. Would it be possible that quotes could be ignored by
the module?

2. Could you add an option to ignore the header (the first row), so that
then "cx=A" cwould work without problems?

3. I haven’t found your module in https://modules.contextgarden.net. I
think it would be great to have it there. Otherwise, users may not know
of its existence.

I have other questions, but this will be addressed in a next message.

Many thanks for your excellent work,

Pablo
Main;Secondary
15.6;16
14.8;14.8
16.4;15.7
14.8;14.8
13.9;13.8
15.1;14.7
13.5;13.7
13.3;13.6
14.9;13.9
13.6;13.9
13.6;12.8
15.6;14.4
13.8;13.7___
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 paragraph footnotes when located in text

2022-01-16 Thread Pablo Rodriguez via ntg-context
Dear list,

using current latest (2022.01.15 17:32), I still experience an already
reported issue
(https://mailman.ntg.nl/pipermail/ntg-context/2022/104770.html):

  \setuppapersize[A6]
  \showframe\showgrid
  %~ \setupnote[footnote][paragraph=yes]
  \setupnote[footnote][location=text, paragraph=yes]
  \setupnotation[footnote][alternative=serried, width=broad]
  \starttext
  \startlinenumbering[step=3]
  \dorecurse{25}
   {a\footnote{b} }
  \stoplinenumbering
   \placenotes[footnote]
  \stoptext

I don’t get paragraph notes with "location=text".

Could anyone confirm the issue or tell me what I’m missing?

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
___


<    1   2   3   4   5   6   7   8   9   10   >