[NTG-context] Re: Why don't footnotes appear in floats or figures?

2024-04-24 Thread Pablo Rodriguez via ntg-context


On 4/24/24 02:15, Joel via ntg-context wrote:
> [...] Any idea how I can get current footnote value?

Hi Joel,

current footnote value can be accessed with \rawcountervalue[footnote],
such as in:

  \starttext
  \dorecurse{25}
{\ \footnote{Footnote \recurselevel}:
 \rawcountervalue[footnote]\par}
  \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 / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Why are ConTeXt-SBL endnotes empty?

2024-04-22 Thread Pablo Rodriguez via ntg-context
On 4/22/24 15:51, Joel via ntg-context wrote:
> A few years back, I tried using endnotes with ConTeXt-SBL, and it failed
> to compile. I'm forced to try again (due to some other issue with
> footnotes), and instead of compiling to error, it compiles, but the
> footnote's message ends up being empty. 
>
> Why is it appearing empty? Is there a fix?

Hi Joel,

the bibliography part doesn’t work for me at all.

But notes may be placed as their location is text (and you add a real
footnote).

This works fine:

  \setupnote[footnote][location=text]

  \starttext
 \input knuth
 \footnote{Footnote}
  \cite[clark1989]

  \placenotes[footnote]

  \startchapter[title=Bibliography]
  \placelistofpublications
  \stopchapter
  \stoptext

I never used a bibliography in ConTeXt, so that part is left to you.

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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Why don't footnotes appear in floats or figures?

2024-04-21 Thread Pablo Rodriguez via ntg-context
On 4/22/24 02:45, Joel via ntg-context wrote:
> I'm three days out from sending my work to an editor, and found some
> serious problem: many footnotes just aren't rendering.

Joel,

please provide a minimal sample, otherwise it is really hard to help.

> I've seen some 2+ year old mailing list posts suggesting ConTeXt might
> have issues with footnotes; they appear to be similar to my issue--is
> that still a problem? Is there a fix or workaround? Old fixes I could
> finding in the mailing list don't seem to work with current versions of
> ConTeXt anymore.

\postponenotes and \flushnotes might be an option.

\setlocalfootnotes and \placelocalfootnotes might be another 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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Weird (?) float placement for specific widths of image

2024-04-19 Thread Pablo Rodriguez via ntg-context
On 4/19/24 17:48, Denis Maier via ntg-context wrote:
> Hi again,
>
> just a quick follow up on this one. Can anyone reproduce this?

Hi Denis,

I can reproduce it.

> Would be good to know how this can be fixed. I have this in a real
> document, and as I’m typesetting a XML source I cannot just adjust
> slightly adjust the dimensions to get rid of that.

It seems that you can place the figures somehow
(https://www.pragma-ade.nl/general/qrcs/setup-en.pdf#page=169):

See the extreme example:

  \showframe\showgrid\showstruts
  \setupexternalfigures
  [location={local,global,default}]
  \starttext
  \placefigure{A Cow}{\externalfigure[cow][
  height=.5\textheight,
  ]}

  \placefigure{A Cow}{\externalfigure[cow][
  height=.3\textheight,
  %height=.4\textheight,
  ]}

  \placefigure{A Cow}{\externalfigure[cow][
  width=3cm,
  %width=2cm,
  ]}

  \placefigure[inleft]{A Cow}{\externalfigure[cow][width=2cm]}

  \placefigure[inright]{A Cow}{\externalfigure[cow][width=2cm]}
  \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 / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: minwidth not working ?

2024-04-19 Thread Pablo Rodriguez via ntg-context
On 4/19/24 17:51, Denis Maier via ntg-context wrote:
> Hi again,
>
> another follow up. Can anyone confirm this issue? Is there a way to set
> the minimal width of graphics?

Hi Denis,

maximum widht or height work fine, but their minimum counterparts seem
not to be working at all:

  \showframe
  \starttext
  \doloopoverlist{none, width, height, maxwidth, maxheight}
{\externalfigure[cow.pdf][\recursestring=.125\textwidth]}
  \page
  \doloopoverlist{none, width, height, minwidth, minheight}
{\externalfigure[cow.pdf][\recursestring=.33\textwidth]}
  \stoptext

Just to confirm 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 / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: \luaescapestring in proper Lua

2024-04-11 Thread Pablo Rodriguez via ntg-context
On 4/11/24 18:56, Hans Hagen via ntg-context wrote:
> [...]
>>> \protected\def\PrintTheThing{\ctxlua{document.print_the_thing()}}
>>
>> Sorry, but why \protected is required or recommended here?
>
> depends if you want it to be expandable

I see now that "still.pdf" has a full chapter (#3, titled “Scanning
Input”) and page 79 explains exactly 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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: unknown script 'mtx-context.lua' or 'mtx-mtx-context.lua

2024-04-11 Thread Pablo Rodriguez via ntg-context
On 4/11/24 18:56, Hans Hagen via ntg-context wrote:
> [...]
> it searches for mtxrun.lua and context.lua in the same path so you need:
>
> luametatex.exe
> mtxrun.exe (can be link to luametatex.exe)
> context.exe (can be link to luametatex.exe)
> context.lua
> mtxrun.lua
>
> all in the same (bib) path
>
> ... always has been so ...

But now it seems that luatex has disappeared from our bin directories.

Was this intended (because of the issues with the build farm)?

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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: unknown script 'mtx-context.lua' or 'mtx-mtx-context.lua

2024-04-11 Thread Pablo Rodriguez via ntg-context
On 4/11/24 17:39, Denis Maier via ntg-context wrote:
> [...]
> Ok. It wasn't there. I have now copied it from my Miktex installation, but
> it still does not work. (Looks like some path issue. The luatex binary from
> the miktex installation seems to take priority over the one now in the
> ConTeXt installation. Looks like I'm getting somewhere...)

I wonder whether the path order might give priority.

But in any case, I wonder whether it is intended that current latest
(from the ConTeXt distribution) is intended neither to have the latest
LuaTeX nor to have any LuaTeX binary at all.

Hans (or Luigi), are we (just humble users) missing something 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 / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: unknown script 'mtx-context.lua' or 'mtx-mtx-context.lua

2024-04-11 Thread Pablo Rodriguez via ntg-context
On 4/10/24 22:28, Denis Maier wrote:
>> [...]
>>   context --luatex --generate
>
> Thanks, Pablo.
> I've tried it, but it doesn't seem to work...

I get the same result on Win64 when I move the luatex binary from the
tex/texmf-win64/bin/ directory.

This may sound stupid, but could you check whether the bin directory
contain the required binary?

Sorry, "luatex --version" and even "whereis luatex" should give the same
result (but on Windows, it seems to be https://ss64.com/nt/where.html).

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 / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: \luaescapestring in proper Lua

2024-04-11 Thread Pablo Rodriguez via ntg-context
On 4/10/24 21:48, Hans Hagen via ntg-context wrote:
> On 4/10/2024 7:49 PM, Pablo Rodriguez via ntg-context wrote:
>> [...]
>> I wonder whether there is a proper way in the Lua code to avoid
>> [[\luaescapestring{}]] in \ctxlua.
>> [...]
>  context(tokens.scanners.string())

Many thanks for your reply, Hans.

> \protected\def\PrintTheThing{\ctxlua{document.print_the_thing()}}

Sorry, but why \protected is required or recommended 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 / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] \luaescapestring in proper Lua

2024-04-10 Thread Pablo Rodriguez via ntg-context
Dear list,

I have the following sample:

  \starttext
  \startluacode
  function document.print_the_thing(str)
context(str)
  end
  \stopluacode

  \unexpanded\def\PrintTheThing#1{%
\ctxlua{document.print_the_thing([[\luaescapestring{#1}]])}}

  \PrintTheThing{a \em b {c}}
  \stoptext

I wonder whether there is a proper way in the Lua code to avoid
[[\luaescapestring{}]] in \ctxlua.

BTW, [[\luaescapestring{}]] in \ctxlua works better for me, since in my
real world document, I’m using str:match() to check whether the string
ends with interrogation or exclamation marks ("%?!$").

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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: unknown script 'mtx-context.lua' or 'mtx-mtx-context.lua

2024-04-10 Thread Pablo Rodriguez via ntg-context
On 4/10/24 13:59, Denis Maier via ntg-context wrote:
> Hi,
> I wanted to test my earlier example (float placement) also with MKIV, but
> context ---luatex …
> give me this error message :
> unknown script 'mtx-context.lua' or 'mtx-mtx-context.lua
> How can I make it work?

Hi Denis,

as far as I know, this is required first:

  context --luatex --generate

BTW, although LuaTeX 1.18 has been released, my Linux64 ConTeXt contains
version 1.17.x.

In fact, the LuaTeX binary was removed in an update some weeks (or
months) ago. I had to copy it from a backup from a previous version.

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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: incosistent output of --- dash

2024-04-06 Thread Pablo Rodriguez via ntg-context
On 4/6/24 11:43, madiazm.eo...@gmail.com wrote:
> Hi everyone,

Hi Miguel,

> […]
> Am I missing something on the use of this ligature?

I don’t think so.

In some cases you may not get the ligature for a good reason:

  \starttyping
  program --option=value file.ext
  \stoptyping

It would make no sense to get an en-dash there (but I guess you don’t
mean that).

But all OSes provide character maps to get single characters. And also
Unicodia works fine in Windows (https://mercury13.github.io/unicodia/,
just in case it might suit your needs).

Having a single character (emoji, dashes or whatever) is way more
readable than a character combination for a ligature or a TeX command.

This single-character approach also makes easier to copy and paste text
to other formats.

> (the question is just out of curiosity, since I plan to create a
> command that adds a hairspace after or before the dash, since I don't
> like it to stick to some letters like "o").
Just consider that you should add an horizontal box (or pair both space
and hyphen), otherwise you may get a line break between character and
hyphen (instead of the hair space):

  \starttext
  \startTEXpage[offset=2st]
  \hsize\zeropoint
  this —\hairspace or so\hairspace— that

  this \hbox{—\hairspace}or so\hbox{\hairspace—} that
  \stopTEXpage
  \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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: error with \sc

2024-04-04 Thread Pablo Rodriguez via ntg-context
On 4/3/24 07:16, Peter Münster wrote:
> On Tue, Apr 02 2024, Andres Conrado Montoya wrote:
>
>> You shouldn't run context as root in any case.
>
> I don’t run context as root. But I need to erase the cache in
> /opt/context/tex/texmf-cache as root, because the user doesn’t have the
> permission to do that.

Sorry, Peter, but I have a suspicion from what you wrote.

>>   mtxrun --script cache --erase && mtxrun --generate
>
> Thanks. It did not work after doing it as root, but then I saw, that
> there is also a cache in the user home-directory, so I’ve done it as the
> user too, and now it works.

In principle, cache is only written to tex/texmf-cache.

But I guess, when that directory cannot be written by the user, cache is
written to $HOME/texmf.

This may be why you get two cache directories (instead of only
tex/texmf-cache).

Cheers,

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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: error with \sc

2024-04-02 Thread Pablo Rodriguez via ntg-context
On 4/2/24 21:23, Mikael Sundqvist wrote:
> On Tue, Apr 2, 2024 at 9:16 PM Peter Münster  wrote:
>> [...]
>> TIA for any hints,
>
> Hans wrote in his email:
> -- If you have troubles (crash) you need to wipe the cache due to a
> change in lua bytecode storage (no easy way to catch it).
>
> Did you do that? (One way is to remove tex/texmf-cache/*)

Another way is to run (since your test works fine on my laptop):

  mtxrun --script cache --erase && mtxrun --generate

The format file will be generated in the next compilation, so it will
take a bit longer.

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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: ConTeXt on RPI400

2024-03-27 Thread Pablo Rodriguez via ntg-context
On 3/27/24 15:55, h...@hongfeng.ch wrote:
> Hello Pablo,
>
> Tried, the problem still remains.

Weird, if I remove the cache, I get a single line error message:

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

Could you run the "install.sh" script located at
~/WORKSPACE/TOOLS/ConTeXt/ on your computer and then "mtxrun --generate"?

If you still get the error message above, could you give us the output
from "whereis context"?

I hope this 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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: ConTeXt on RPI400

2024-03-26 Thread Pablo Rodriguez via ntg-context
On 3/26/24 18:43, Andres Conrado Montoya wrote:
> Can you try the following: Delete the `texmf-cache` folder
> inside /home/hf/WORKSPACE/TOOLS/ConTeXt/tex/, and then run `mtxrun
> --generate && context --make`? 

In principle, the two following commands should be enough:

  mtxrun --script cache --erase && mtxrun --generate

The format file generation will be run automatically by the next
compilation.

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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] (again) \xmlinlineprettyprinttext double hyphens

2024-03-24 Thread Pablo Rodriguez via ntg-context
Dear list,

I have the following sample:

  \startbuffer[demo]
  mtxrun --script check file
  \stopbuffer

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

  \xmlregistersetup{xml:initialize}

  \startxmlsetups xml:code
\xmlprettyprinttext{#1}{none}
\xmlinlineprettyprinttext{#1}{none}
  \stopxmlsetups

  \definefontfamily[mainface][tt][TeX Gyre Cursor]
[features={default}]

  \setupbodyfont[mainface]

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

Current LMTX (2024.03.11 09:34) is giving different results for double
hyphens with \xmlprettyprinttext and \xmlinlineprettyprinttext.

Since the output of \xmlinlineprettyprinttext is a wrong argument (in
the sample), what am I missing here to get the right output with
\xmlinlineprettyprinttext?

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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Use of marking

2024-03-22 Thread Pablo Rodriguez via ntg-context
On 3/21/24 19:00, Thomas Meyer wrote:
> Hi Pablo and Bruce,
>
> thank you very much for your two solutions. That helps me enormously now.

Hi Thomas,

literally, »nichts zu danken«, since it was Andrés and not me who
provided a solution.

Cheers,

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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Struggling with the distance and right margin text

2024-03-22 Thread Pablo Rodriguez via ntg-context
On 3/22/24 15:57, Ursula Hermann wrote:
> Dear Pablo, 
>
> Many thanks for your example. Sorry for writing so late. 

Dear Ursula,

many thanks for your minimal sample.

> At least I found out, how it works for me .  This is the best way. 
> [...]
> \inrightmargin{\blackrule\\{3.2.2}}\par \dontleavehmode \blackrule

It is not clear to me why you need to remain in horizontal mode after a
paragraph break.

At least, with the following commands, I get the same results:

  \inoutermargin{\blackrule\\{3.2.2}}

  \blackrule

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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] issue with \xmlinlineprettyprinttext

2024-03-20 Thread Pablo Rodriguez via ntg-context
Dear list,

I have the following sample:

  \startbuffer[demo]
  
  a --b c
  a --b c
  
  \stopbuffer

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

  \xmlregistersetup{xml:initialize}

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

  \startxmlsetups xml:code
 \xmlprettyprinttext{#1}{none}
  \stopxmlsetups

  \startxmlsetups xml:inlinecode
 \xmlinlineprettyprinttext{#1}{none}
  \stopxmlsetups

  \definefontfamily[mainface][tt][TeX Gyre Cursor]
 [features={default, quality}]

  \setupbodyfont[mainface]

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

\type{a --b c}
  \stoptext

Using current latest (from 2024.03.11 09:34), LMTX transforms "--" in
"–" (en-dash) only with \xmlinlineprettyprinttext (LuaTeX writes the
en-dash in the three cases).

This issue has been driving me crazy, since it took me a while what was
different here.

Is there something I can do to get \xmlinlineprettyprinttext as
\xmlprettyprinttext in this point?

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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: issue with typing in footnotes

2024-03-18 Thread Pablo Rodriguez via ntg-context
On 3/17/24 23:58, Wolfgang Schuster wrote:
> Pablo Rodriguez via ntg-context schrieb am 17.03.2024 um 17:38:
>> [...]
>> As far as I know, this sample should be compiled without any issue.
>>
>> Could you be so kind to confirm the issue or explain me what am I missing?
>
> The footnote environment is just a fancy way for a command with a
> argument and buffers don't like being part of arguments.
>
> You can put the code in buffer outside of the footnote and type the
> content of the buffer in the footnote.

Many thanks for your reply, Wolfgang.

Everything is clear to me now.

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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] issue with typing in footnotes

2024-03-17 Thread Pablo Rodriguez via ntg-context
Dear list,

I have the following sample (which was on the way of showing another issue):

  \starttext
  a
  \starttyping
  b
  \stoptyping
  c
  \startfootnote
  a
  \starttyping
  b
  \stoptyping
  c
  \stopfootnote
  \stoptext

Current latest (from 2024.03.11 09:34) breaks compilation with both LMTX
and LuaTeX.

As far as I know, this sample should be compiled without any issue.

Could you be so kind to confirm the issue or explain me what am I 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 / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Struggling with the distance and right margin text

2024-03-15 Thread Pablo Rodriguez via ntg-context
On 3/15/24 14:06, Ursula Hermann wrote:
> Dear List, 

Dear Ursula,

this might help you (it isn’t perfect, but you just seem to copy and
paste fragments from your source files):

  %\showframe\showstruts
  \mainlanguage[de-at]
  \setuppagenumbering[alternative=doublesided]
  \definemargindata  [MyInMargin][ininner]
  \definemarginframed[MyInMargin]
[topframe=on,bottomframe=on,rulethickness=1pt,width=1.90cm]
  \defineframed[topruletitle]
[width=max,
 frame=off,
 topframe=on,
 rulethickness=1pt,
 align={justify},
 extras=\dontleavehmode]
  \starttext
  \topruletitle{\MyInMargin {1.1.1}\bf
  Beispiel 3.2.17. (Vertauschung von All- und Existenzquantor).} \par
  \input knuth\page

  \topruletitle{\MyInMargin{3.2.22}{\bf
  Theorem 3.2.22 (Rechenregeln für Quantoren)}. Seien \m P(\m x)und
\input zapf b}
  \stoptext

Sorry for saying that again, but please elaborate both your minimal
samples and your descriptions of the issues you are experiencing.

Some comments on the code fragments you sent.

First of all, please include always code that can be compiled simply
after being copied and pasted.

This requires \starttext (most of the time) and \stoptext (mandatory to
avoid stupid errors).

> \definepapersize[MyBook][width=19cm,height=29.7cm]
> \setuppapersize[MyBook][MyBook] % Prints on paper the size of MyBook
> %\setuppapersize[MyBook][A4] %Would print MyBook-size pages on A4 paper
> \setupbodyfont[modern, 12.50pt]

If these lines are irrelevant for the issue you are experiencing, please
don’t include them.

> \definemargindata  [MyInMargin][inleft]
> \definemarginframed[MyInMargin][topframe=on,bottomframe=on,rulethickness=1pt,width=1.90cm]

You define this margin framed, but your sample makes no use of it.

Sorry, but I don’t get it.

> \defineenumeration
>   [theorem]
>   [
>     text=Theorem,
>     title=yes,
>     width=fit,
>     distance=0.2em,
>     alternative=serried,
>   ]
> \definetextbackground[GrayBackground][
>   location=paragraph,
>   background=color,
>   backgroundcolor=lightgray,
>   leftoffset=.5\bodyfontsize,
>   rightoffset=.5\bodyfontsize,
>   topoffset=.5\bodyfontsize,
>   bottomoffset=.5\bodyfontsize,
>   frame=off,]
>   \margintext{\blackrule[color=black, height=0.10ex, width=1cm]\\}
>   \blackrule[color=black, height=0.10ex, width=13.50cm]

If your sample includes no theorem or text background, please remove
these definitions when sending code.

BTW, avoid include text content (such as margin and body rules [but not
their definitions]) before \starttext.

Also, use \clrf instead of \\ (since the mailing list displays the
relevant line as ("\" instead of "\\"):

>   \margintext{\blackrule[color=black, height=0.10ex, width=1cm]\}

Here starts your text:

> \starttext
> \margintext {1.1.1}
> {\bf Beispiel 3.2.17. (Vertauschung von All- und Existenzquantor).} \par

Your margin text is undefined. Your code has a defined margin text
command, but it isn’t used.

> So  I have here an example from the second page: 

Sorry, but I’m having the impression you are using ConTeXt as a kind of
command-based DTP software (which I think it isn’t at all).

Or, do you define commands for each page?

I think it is better to define a single margin text command and use a
doublesided page setup.

> \definemargindata[inrightmargin][right][margin=margin,width=.50em\rightmarginwidth,style=,color=]
> \definemarginframed[MyInMargin][topframe=on,bottomframe=on,rulethickness=1pt, 
> width=.90cm]

Again, margin text commands defined, but never used.

> \blackrule[color=black, height=0.10ex, width=13.40cm]
> {\blackrule[color=black, height=0.10ex, width=1cm, distance=.90cm]\par

Here you open a brace that is not closed at all.

At least, consider that this won’t be extremely readable for other
people (this is only a sample).

It also may be problematic for you, if you leave the source untouched
for some weeks.

> \defineenumeration
>   [theorem]
>   [
>     text=Theorem,
>     title=yes,
>     width=fit,
>     distance=0.2em,
>     alternative=serried,
>   ]

At least, it would be better not to include a definition inside content
that seems to (or may) be grouped with braces.

BTW, it is exactly the same definition as the one included before.

It isn’t just to be removed in minimal samples, your final code doesn’t
need the duplicated command definition.

> \inright{3.2.22}
> {\bf Theorem 3.2.22 (Rechenregeln für Quantoren)}. Seien \m P(\m x)und 
>
> My problem here is that there is not the same distance between the  the
> text and the  margintext .

Please, always compile the minimal samples that you send to the list.

This is simply to ensure other list subscribers will get the same
results as you.

After adding a final \stoptext command, I had to run:

  mtxrun --script check source-sample.tex

This allowed me to spot the problem with the unclosed brace (mentioned
before).

> And now the margintext should be on the right side. 

I get the second margin text on the right side (after all, 

[NTG-context] Re: update

2024-03-11 Thread Pablo Rodriguez via ntg-context
On 3/11/24 18:48, Hans Hagen wrote:
> Hi,
>
> Todays update has a fix for the compact mode slant interference (as
> explained by Wolfgang a few days ago). Hopefully that works out well.

Many thanks for that fix, Hans.

Pablo

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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: issue with module update

2024-03-11 Thread Pablo Rodriguez via ntg-context
On 3/11/24 17:17, Taco Hoekwater wrote:
>> On 11 Mar 2024, at 16:57, Pablo Rodriguez wrote:
>> [...]
>> Is there something I am missing here?
>
> One of your releases had “changed-name” as its release ‘number’.
>
> The modules site does not know how to deal with non-numeric release
> names all that well; it made a mess of its symlinking stage.
>
> I fixed the symlink manually, it should be fine now.

Really sorry for causing you problems when updating the modules, Taco.

I had no idea that non-numeric releases were problematic with symbolic
linking.

I made that change to avoid having two releases with the same date (I
think this also may give issues with symlinks).

Well, I realize that if I make a wrong release, I have to number the new
version with only numbers (and maybe points instead of hyphens).

Sorry again for giving problems and many thanks for your work,

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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] issue with module update

2024-03-11 Thread Pablo Rodriguez via ntg-context
Dear list,

I have just updated a module named PresVoz.

I get the standard directory
(https://modules.contextgarden.net/dl/presvoz/) and
(https://modules.contextgarden.net/dl/presvoz-{%version%}.zip), but no
https://modules.contextgarden.net/dl/presvoz.zip (with current version).

So when updating the module, I get it only uninstalled.

The two most recent updates (this one and the one before) had this issue.

Is there something I am missing here?

Many thanks your 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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: weird character normalization in the wiki

2024-03-11 Thread Pablo Rodriguez via ntg-context
On 3/11/24 09:31, Taco Hoekwater wrote:
>> On 9 Mar 2024, at 09:35, Pablo Rodriguez via ntg-context 
>>  wrote:
>>
>> Sure, they may be a workaround to type codepoints instead of characters
>> (such as with \utfchar{0x1fbb}, but wouln’t it be possible to disable
>> that character normalization in the wiki?
>
> AFAIK, Wikimedia’s Unicode normalisation can not be turned off.

Hi Taco,

then I have to use the woraround.

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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: \em issue in MkXL (2024.03.05 11:26)

2024-03-10 Thread Pablo Rodriguez via ntg-context
On 3/10/24 10:46, Hans Hagen via ntg-context wrote:
> [...]
> using the low level commands
>
> \glyphscale
> \glyphxscale
> \glyphyscale
> \glyphslant
> \glyphweight
>
> directly can have side efects when at an outer level these are also set,
> so you need to accumulate, like
> [...]
> which you will now wikify...

Many thanks for your reply, Hans.

I will wikify this, once I figure out where it can fit in the wiki (in
due time, since ConTeXt is more and more complex for me lately and my
free time is less and less these days).

I only used \enableexperiments[fonts.compact] and then \em.

I thought when I (mis)read your messages that compact fonts is the way
to go in LMTX.

This was the reason I enabled them (the sooner we test new features
today, the less issues will be faced with them tomorrow).

\glyphslant came into the conversation after experiencing an issue
triggered by enabling compact fonts.

Sorry for being explicitly verbose, but I intend to have the \em
behavior also fixed in compact fonts.

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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: \em issue in MkXL (2024.03.05 11:26)

2024-03-10 Thread Pablo Rodriguez via ntg-context
On 3/9/24 16:04, Wolfgang Schuster wrote:
> Pablo Rodriguez via ntg-context schrieb am 08.03.2024 um 19:39:
>> [...]
>>\enableexperiments[fonts.compact]
>>
>> Which seeems weird to me. Or at least, I thought I read that Hans
>> enabled it by default in LMTX.
>
> AFAIR Hans uses the setting in his own documents.

I have been using it for a while.

I hope the issue with \glyphslant might be fixed to enable it again.

>> Then my question is whether this was caused by simply enabling compact
>> fonts or by doing it twice.
>
> The results happen when you use compact mode and is a result of
> \glyphslant which keeps the value of the italic style even when you
> switch back to the upright style.

Many thanks for your explaination,

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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] weird character normalization in the wiki

2024-03-09 Thread Pablo Rodriguez via ntg-context
Dear list,

https://wiki.contextgarden.net/Greek#Monotonic_and_Acute_Accent includes
two samples that should display the difference betweeen the monotonic
accent and the polytonic acute accent (which generate two different
characters for each such accented vowel).

Excluding other implications, these are two different characters. In
some fonts each pair of different characters for each accented letter
lead to the same glyph, in other fonts those glyphs are different.

This sample shows the difference (there should display two slightly
different accents [unless there is some character normalization on the
way]):

  \definefontfamily[mainface][rm][EBGaramond]
  \setupbodyfont[mainface, 500pt]
  \definecolor [tred]  [r=1,t=.5,a=1]
  \definecolor [tblue] [b=1,t=.25,a=1]
  \starttext
  \startTEXpage[offset=1ex]
  \startoverlay
{\color[tred]{Ά}}
{\color[tblue]{Ά}}
  \stopoverlay
  \stopTEXpage
  \stoptext

The problem that I have is tricky. Thanks to character normalization (at
least in Firefox), searching for "á" will also find "a" (unless “Match
diacritics” is enabled).

I’m afraid the wiki is performing some character normalization, which
renders samples in
https://wiki.contextgarden.net/Greek#Monotonic_and_Acute_Accent useless.

Searching for "Ά" in https://wiki.contextgarden.net/Greek should give
not more than 4 matches (not case-sensitive and with “Match diacritics”
[or similar filter for your browser] enabled). I‘m afraid I get none.

While editing the article searching for "Ά" (case-insensitive and not
normalizing characters), gave me 4 matches, but only in the source (no
ocurrence was found in the preview).

Once changes are saved, "Ά" occurrences dissapear (since they seem to be
normalized).

Sure, they may be a workaround to type codepoints instead of characters
(such as with \utfchar{0x1fbb}, but wouln’t it be possible to disable
that character normalization in the wiki?

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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: \em issue in MkXL (2024.03.05 11:26)

2024-03-08 Thread Pablo Rodriguez via ntg-context
On 3/8/24 19:09, Wolfgang Schuster wrote:
> Pablo Rodriguez via ntg-context schrieb am 08.03.2024 um 18:50:
>> [...]
>> LMTX gets b, c and d in slanted form.
>>
>> LuaTeX gets only b and c in slanted form.
> [...]
> I get b and d in italic which is the expected output.

Sorry, my LuaTeX is getting slanted b and d ("c" was my typo).

But I see what was causing my issue (line from
~/texmf/texmf-local/cont-loc.mkxl):

  \enableexperiments[fonts.compact]

Which seeems weird to me. Or at least, I thought I read that Hans
enabled it by default in LMTX.

Then my question is whether this was caused by simply enabling compact
fonts or by doing it twice.

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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] \em issue in MkXL (2024.03.05 11:26)

2024-03-08 Thread Pablo Rodriguez via ntg-context
Dear list,

the following latest gets differents results when compiled with MkXL and
MkIV (in current latest from 2024.03.05 11:26):

  \definefontfamily[mainface][rm][TeX Gyre Termes]
[features={default, quality},
 it={style: regular, features:{default, quality, slanted}},
 sl={style: regular, features:{default, quality, slanted}}]

  \setupbodyfontenvironment
  [default]
  [em=italic]

  \setupbodyfont[mainface]
  \starttext
  \startTEXpage[offset=1em]
  a\\
  \em b\\
  \em c\\
  \em d\\
  \stopTEXpage
  \stoptext

LMTX gets b, c and d in slanted form.

LuaTeX gets only b and c in slanted form.

I think LMTX may have an issue here.

Could anyone be so kind to confirm 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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: imposition: getting to the last page of a booklet

2024-03-06 Thread Pablo Rodriguez via ntg-context
On 3/6/24 19:50, Wolfgang Schuster wrote:
>> [...]
>> Could you write the first line in plain language?
>
> Look at the second example of the Lua code in the example below for each
> command (the first example is your version), the third example is just a
> condensed version of example 2.

Many thanks for your extended explanation, Wolfgang.

Now it is clearer to me (although I need some time to learn from 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 / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: missing metadata in LMTX

2024-03-06 Thread Pablo Rodriguez via ntg-context
On 3/6/24 17:35, Wolfgang Schuster wrote:
> Pablo Rodriguez via ntg-context schrieb am 06.03.2024 um 16:52:
>> [...]
>> I wonder whether this requires a minimal sample to be fixed.
>
> Yes, a minimal example would help because \setupmetadata works in your
> previous example.

Many thanks for your reply, Wolfgang.

Now I have the minimal sample:

  \startbuffer[demo]
  

  author


  text

  
  \stopbuffer

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

\xmlsetsetup{\xmldocument}
  {(div|section)[@id='header']}
  {xml:meta}

   \xmlsetsetup{\xmldocument}
  {(h2|p)[contains(@class,'author')]}
  {xml:title:author}
  \stopxmlsetups

  \xmlregistersetup{xml:initialize}

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

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

  \startxmlsetups xml:meta
%\aftergrouped{\setupinteraction%
\setupmetadata
 [author={\xmlconcat{#1}{/h2[contains(@class,'author')]}{, }}]
%}
  \stopxmlsetups

  \startxmlsetups xml:title:author
\xmlflush{#1}
  \stopxmlsetups

  \setupinteraction[state=start]
  \xmlprocessbuffer{main}{demo}{}
  \stoptext

With \setupmetadata it breaks compilation.

I know it is not the most elegant code, but in my real environment
xml:title:author outputs text.

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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: missing metadata in LMTX

2024-03-06 Thread Pablo Rodriguez via ntg-context
On 3/6/24 15:54, Hans Hagen wrote:
> [...]
>> \setupmetadata
>>[title=FooBar]
>
> that's for those who go global

Many thanks for the new command, Hans.

I‘m afraid this new command breaks my compilation.

The error message isn’t very helpful for me (see below).

I wonder whether this requires a minimal sample to be fixed.

Many thanks for your help,

Pablo


tex error   > tex error on line 0 in file : Argument of \D9>:title
has an extra }



\par }
 \prerolltostring
#1->\beginlocalcontrol \setbox \b_syst_boxes \hbox {\expand
\everypreroll #1}
\normalexpanded {\setbox \b_syst_boxes \emptybox \endlocalcontrol
\boxtostring \b_syst_boxes }
 \scrn_identity_get
#1->\setidentityvariable {#1}{\prerolltostring
{\interactionparameter {#1}}
}


[[special cmd: end local call]]




I've run across a '}' that doesn't seem to match anything. For example,
'\def\a#1{...}' and '\a}' would produce this error. The '\par' that I've
just
inserted will cause me to report a runaway argument that might be the
root of the
problem.
mtx-context | fatal error: return code: 1
> exit status: 256

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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: imposition: getting to the last page of a booklet

2024-03-05 Thread Pablo Rodriguez via ntg-context
On 2/28/24 19:28, Wolfgang Schuster wrote:
> [...]
> \def\beforequadruplenumber#1%
>{\ifcase\numexpr#1+1;4\relax
>   \number\numexpr#1+4\relax
> \else
>   \number\numexpr#1+3-#1;4\relax
> \fi}

Sorry for not having answered before, Wolfgang.

I’m afraid I don’t get how \ifcase is deployed with as conditional
(being \ifcase used to give numbers for weekdays or months).

The semicolon is also mysterious to me, I don’t know what it does there
in plain language.

Sorry, I know it has to be simple, but the syntax is too cryptic for me.

Could you write the first line in plain language?

Sorry for asking that. I’m afraid this would be the only way I could get
what \ifcase is doing there.

BTW, neither your command, nor mine work in my real world document. But
this would be another 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 / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: issue mixing font features (LMTX & MkIV)

2024-03-05 Thread Pablo Rodriguez via ntg-context
On 3/4/24 11:09, Hans Hagen via ntg-context wrote:
> [...]
> in luametatex we have a bit more advanced mechanism (also relates to
> compact mode) because th eengine is a bit more clever
>
> just make sure that you don't add up features where one calcels the
> other, so use for instance:

Many thanks for the explanation and the fix, Hans.

It seems that the engine is becoming too smart for me .

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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: issues scaling glyphs of Twemoji Mozilla

2024-03-05 Thread Pablo Rodriguez via ntg-context
On 3/4/24 09:08, Hans Hagen via ntg-context wrote:
> On 3/2/2024 1:46 PM, Pablo Rodriguez via ntg-context wrote:
>> [...]
>> Using current latest from both MkIV and LMTX, I cannot scale the emoji flag.
>>
>> Latest font release can be directly download from
>> https://github.com/mozilla/twemoji-colr/releases/latest/download/Twemoji.Mozilla.ttf.
>>
>> Am I missing something to scale the glyph properly?
> You're missing the fact that the font has an issue. I can add a
> workaround, assuming that (as often) issues become features.

Many thanks for your fix, Hans.

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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: missing metadata in LMTX

2024-03-03 Thread Pablo Rodriguez via ntg-context
On 3/4/24 01:18, Wolfgang Schuster wrote:
> Pablo Rodriguez via ntg-context schrieb am 03.03.2024 um 20:02:
>> [...]
>> With LuaTeX, I get PDF metadata. With LuaMetaTeX, I cannot get them.
>> [...]
> I can confirm the issue and it happens because Hans changed they way
> how the values of the \setupinteraction commands are passed to Lua
> side of ConTeXt to be written to the PDF file.

Many thanks for your reply and your explanation, Wolfgang.

> I can provide at the moment solutions which ensure the information
> appear in the PDF but none of the is very elegant and I hope Hans
> can help with a clean solution.

The first one avoids the issue until Hans provides a final fix.

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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] missing metadata in LMTX

2024-03-03 Thread Pablo Rodriguez via ntg-context
Dear list,

this issue has been bugging me for some time:

  \startbuffer[demo]
  

   author
   title


  text

  
  \stopbuffer

  \starttext

  \startxmlsetups xml:initialize
\xmlsetsetup{#1}{code|meta|text}{xml:*}
  \stopxmlsetups

  \xmlregistersetup{xml:initialize}

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

  \startxmlsetups xml:meta
\setupinteraction
  [author={\xmltext{#1}{/author}},
   title={\xmltext{#1}{/title}}]
  \stopxmlsetups

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

  \setupinteraction[state=start]
  \xmlprocessbuffer{main}{demo}{}
  \stoptext

With LuaTeX, I get PDF metadata. With LuaMetaTeX, I cannot get them.

For both, I’m using current latest (from 2024.02.27 09:21).

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 / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] issue mixing font features (LMTX & MkIV)

2024-03-03 Thread Pablo Rodriguez via ntg-context
Dear list,

I have the following sample:

  \definefontfeature[wider][extend=2]

  \definefontfamily[mainface][rm][TeX Gyre Pagella]
[features={default, quality, wider},
 it={style: regular, features:{default, slanted, quality}},
 bf={style: regular, features:{default, boldened-30}},
 bi={style: regular, features:{default, boldened-30, slanted}}]

  \setupbodyfont
[mainface, 30pt]

  \starttext
  \startTEXpage[offset=1ex]
  a
  {\it a}\\
  {\bf a}
  {\bi a}
  \stopTEXpage
  \stoptext

With current latest (2024.02.27 09:21), LuaTeX gets boldened and slanted
for regular (but the other fonts cannot inherit the wider feature and
wider will not mix with boldened-30 [even when specified]).

For some reason, LMTX from current latest cannot get slanted and
boldened-30 (but it mixes the inherited wider feature in all fonts).

This began to behave differently in latest from 2024.01.08 11:23 (which
is my next version after the one from 2023.09.26 18:19).

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 / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: issues scaling glyphs of Twemoji Mozilla

2024-03-02 Thread Pablo Rodriguez via ntg-context
On 3/2/24 14:41, vm via ntg-context wrote:
> On 02/03/2024 13:46, Pablo Rodriguez via ntg-context wrote:
>> Using current latest from both MkIV and LMTX, I cannot scale the emoji flag.
>
> same here

Many thanks for your confirmation.

Pablo

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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] issues scaling glyphs of Twemoji Mozilla

2024-03-02 Thread Pablo Rodriguez via ntg-context
Dear list,

I have the following sample:

  \definefontfamily[mainface][rm][TeX Gyre Termes]
  \definefontfamily[mainface][cg][Twemoji Mozilla][features={color}]
  \setupbodyfont[mainface]
  \starttext
  \scale[width=30em]{a}
  \scale[width=30em]{\cg }
  \stoptext

Using current latest from both MkIV and LMTX, I cannot scale the emoji flag.

Latest font release can be directly download from
https://github.com/mozilla/twemoji-colr/releases/latest/download/Twemoji.Mozilla.ttf.

Am I missing something to scale the glyph properly?

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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Structuring a magazine or booklet

2024-02-28 Thread Pablo Rodriguez via ntg-context
On 2/28/24 15:27, Jean-Pierre Delange wrote:
> Sorry for the noise : I did'nt see the ConTeXt imposition schemas here :
>
> https://wiki.contextgarden.net/Imposition
>
> I'll read and test it.

Hi Jean-Pierre,

in its simplest form, a booklet may be:

  \setuppapersize[A4][A3, landscape]
  \setuparranging[2UP]
  \starttext
  \dorecurse{28}{\section{Section}\input zapf}
  \stoptext

I think this seems to be what you may be aiming at.

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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: imposition: getting to the last page of a booklet

2024-02-28 Thread Pablo Rodriguez via ntg-context
On 2/28/24 12:24, Pablo Rodriguez via ntg-context wrote:
> [...]
> This is why beforequadruple would make sense. I guess some Lua magic
> could do that, computing x to the follwing page that "x % 4 = 3" (and
> then \page[x]).
>
> I will try to find a trick for that, but not now.

Replying to myself, this is a command to compute next numbers before and
after quadruples (with application to \realpageno):

 \starttext
  \def\beforequadruplenumber#1%
{\ifnum\modulonumber{4}{#1} = 1
   \the\numexpr #1 + 2
 \orelse\ifnum\modulonumber{4}{#1} = 2
   \the\numexpr #1 + 1
 \orelse\ifnum\modulonumber{4}{#1} = 3
   \the\numexpr #1 + 4
  \else
   \the\numexpr #1 + 3
 \fi}

  \def\afterquadruplenumber#1%
{\ifnum\modulonumber{4}{#1} = 1
   \the\numexpr #1 + 4
 \orelse\ifnum\modulonumber{4}{#1} = 2
   \the\numexpr #1 + 3
 \orelse\ifnum\modulonumber{4}{#1} = 3
   \the\numexpr #1 + 2
  \else
   \the\numexpr #1 +1
 \fi}

  \dorecurse{25}{\recurselevel: \beforequadruplenumber{\recurselevel}\\}
  \dorecurse{25}{\recurselevel: \afterquadruplenumber{\recurselevel}\\}

  %\page[123]
  %\null
  \page[\beforequadruplenumber{\realpageno}]
  before quadruple
  \page[\afterquadruplenumber{\realpageno}]
  afterquadruple
  \stoptext

Michael, if this fits your needs, please add it to the wiki.

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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: \in, \at, and labletext

2024-02-28 Thread Pablo Rodriguez via ntg-context
On 2/28/24 13:05, Ursula Hermann wrote:
> Dear List,
>
> In the Documentation IntroCTX_eng_s.pdf at page 170 , I found the two
> examples with \in and \at, and also the label.

Dear Uschi,

I guess you mean (a link may be simpler than attaching a single page):

https://raw.githubusercontent.com/contextgarden/not-so-short-introduction-to-context/main/en/introCTX_eng_p.pdf#page=170

https://raw.githubusercontent.com/contextgarden/not-so-short-introduction-to-context/main/en/introCTX_eng_s.pdf#page=170

Sorry, but I don’t know which is the difference between both documents
(hashes are different, but diffpdf is not able to distinguish between
them [in appearance]).

> The Problem is, that in the following sentence only the number (3.1)  is
> a placed formula in an example, should have a link. Without the
> brackets. The sentence says:
>
> Task  1: Formulate equivalents according to rule (3.1):

If the link is missing, you may have missed to enable interaction (see
first line of sample below).

If parentheses (brackets are []) is what you want to remove, please
modify the sample below to display them (I simply don’t get them [sorry,
but this is my first document with a theorem]).

Other than that, I must confess I cannot imagine what is the issue you
might be facing.

But don’t hesitate to ask with a more verbose description.

> Sorry, I have no example.

Here you have one:

  \setupinteraction[state=start, focus=standard]
  \defineenumeration[theorem][text=Theorem, alternative=right]
  \starttext
  \starttheorem[was-noch]
  This theorem has one paragraph.
  \stoptheorem

  \theorem[whatever]
  This theorem has other paragraph.

  In \in{theorem}[whatever] on \at{page}[was-noch].
  \stoptext

I hope 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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: output filename with SHA256

2024-02-28 Thread Pablo Rodriguez via ntg-context
On 2/23/24 16:01, mf wrote:
> [...]
> A new run is started unless:
> [...]
> - the tuc file is identical to the one of the previous run

Hi Massi,

many thanks for your reply.

If ConTeXt relies on that condition to stop compilation, then it would
be great to know how it is performed to invoke os.rename only on when
the condition takes place.

It would be as to write:

  if x or environment.currentrun >= environment.maxnofruns then
os.rename(pdf_file, ("%s-%s.pdf"):format(tex.jobname, sha_pdf))
  end

"x" would be the condition where the .tua/.tuc files are identical.

Do you know where that condition is written in the code, so ConTeXt
doesn’t perform another run?

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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: imposition: getting to the last page of a booklet

2024-02-28 Thread Pablo Rodriguez via ntg-context
On 2/28/24 11:56, Bruce Horrocks wrote:
> [...]
> The sample works for me if you set plain A4 and doublesided, thus:
>
>  \setuppagenumbering[alternative={doublesided}]
>  \starttext
>  \samplefile{lorem}
>  \page[quadruple]
>  page before the quadruple (must be 3, not 4)
>  \page[yes, quadruple]
>  page before the quadruple (must be 7, not 8)
>  \stoptext
>
> This puts the "page before quadruple" text on page 4 which is the
> last side of the first four sides, if that makes sense.

Many thanks for your reply, Bruce.

\page[quadruple] works fine putting content on realpage numbers that can
be divided by 4 (with modulo 0).

As far as I get, Michael was looking to place content on realpage
numbers get modulo 3 when divided by 4.

At least, this is what would fit my needs to place the imprint on the
(excuse the Latin adjective [before the last]) penultima page of a booklet.

This is why beforequadruple would make sense. I guess some Lua magic
could do that, computing x to the follwing page that "x % 4 = 3" (and
then \page[x]).

I will try to find a trick for that, but not now.

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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] \getdocumentfilename or document.files

2024-02-27 Thread Pablo Rodriguez via ntg-context
Dear list,

I have the following sample (saved as "a.tex"):

  \starttext
  \getdocumentfilename{1}
  \cldcontext{document.files[1]}
  \getdocumentfilename{2}
  \cldcontext{document.files[2]}
  \getdocumentfilename{3}
  \cldcontext{document.files[3]}
  \stoptext

I compile it with:

  context --purgeall a b c

"b.tex" is a different file and "c.tex" is a symlink to "a.tex".

I only get the first filename for "a.tex" and the last filename for "c.tex".

Which is the right way to get the second and third filenames when in
"a.pdf" (or the first two ones in "c.pdf")?

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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Works now! At Work, and a question to paragraphs in an Theorem

2024-02-27 Thread Pablo Rodriguez via ntg-context
On 2/27/24 10:10, Ursula Hermann wrote:
>[...]
> I have a question to my paragraphs:
>
> \definetextbackground[Paragaph][
> [...]
>   \startparagraph

Hi Uschi,

if you define Paragaph, then you should use \startParagaph (and
\stopParagaph).

> \starttext

Even if that works, it would be better to nest commands (\starttext
before \startparagraph).

> [...]
> So this is the example. What I like to do: The first paragraph should be
> normal written, but the second one should have more space between the
> words. Because of Math: Is \hspace the right way? The right command? And
> using \startnarrower, \stopnarrower?

Narrower refers to margins. Extra space between words would be something
different (at least, as far as I get it).

That being said, I have no idea how to get different inter-word spacing.

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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Hyperlinks cease working after page selection

2024-02-27 Thread Pablo Rodriguez via ntg-context
On 2/26/24 21:25, Michael Guravage wrote:
> Greetings,
>
> The document in question compiles correctly. Its hyperlinks are correct
> and work as expected. However, if I apply a page selection, the
> hyperlinks in the resulting document, while correctly coloured, no
> longer work.
> [...]
> Processed as follows:
>
> context  mwe.tex
> context --extra=select --selection=1 --result=foobar.pdf mwe.pdf

Hi Michael,

add --interaction as an argument.

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 / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: imposition: getting to the last page of a booklet

2024-02-27 Thread Pablo Rodriguez via ntg-context
On 2/24/24 14:30, Wolfgang Schuster wrote:
> Michael Guravage schrieb am 23.02.2024 um 10:07:
>> Greetings,
>>
>> I would like to use the nextquadruple and beforequadruple
>> pagebreakhandlers described at the bottom of the wiki's imposition
>> page. However, the examples complain of an error invoking the
>> \installpagebreakhandler command.
>>
>> The wiki page was last updated nearly four years ago. Is anyone using
>> updated versions of these?
>
> You can use quadruple out of the box.

Hi Wolfgang,

I’m also interested a solution for this.

I’m afraid I cannot make your sample work:

  \setuppapersize[A5][A4, landscape]
  \setuparranging[2UP]
  \setuppagenumbering[alternative={singlesided,doublesided}]

  \starttext
  \samplefile{lorem}
  \page[quadruple]
  page before the quadruple (must be 3, not 4)
  \page[yes, quadruple]
  page before the quadruple (must be 7, not 8)
  \stoptext

I haven’t tested what
"\setuppagenumbering[alternative={singlesided,doublesided}]" would cause
in my documents.

In any case, I get real quadruple, not before the quadruple.

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 / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: output filename with SHA256

2024-02-27 Thread Pablo Rodriguez via ntg-context
On 2/23/24 23:58, Bruce Horrocks wrote:
>> On 23 Feb 2024, at 13:32, Pablo Rodriguez via ntg-context 
>>  wrote:
>> [...]
>> Is there any way to check if compilation needs any other run?
>> [...]
> Rather than use the wrapup() hook can why not rename the file using
> a second job on the command line?
>
> So your compile command might look like:
>
>   $ context jobname.tex add_sha.tex

Hi Bruce,

this totally makes sense to me.

But (shame on me!) this is the first time I will type context followed
by two files.

This is also the first time when I see that invoking ConTeXt with more
than a file makes sense to me.

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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] output filename with SHA256

2024-02-23 Thread Pablo Rodriguez via ntg-context
Dear list,

I have the following sample file:

\starttext
whatever

\startluacode
luatex.wrapup(
  function()
local t = {}
local pdf_file_name = tex.jobname..".pdf"
local sha_pdf = utilities.sha2.hash256(io.loaddata(pdf_file_name))
local c_r = environment.currentrun
t[c_r] =  sha_pdf
local exists_pdf = ("%s_%s-%s.pdf"):format(c_r-1, tex.jobname, t[c_r-1])
if io.exists(exists_pdf) then os.remove(exists_pdf) end
os.rename(pdf_file_name, ("%s_%s-%s.pdf"):format(c_r, tex.jobname,
sha_pdf))
  end
)
\stopluacode
\stoptext

In short, it adds its SHA256 to the final filename.

Since renames the PDF document in each run, I would like to remove the
output from the previous run.

The table seems not to store the value from a previous run.

I see now that I am creating it again with each run.

Is there any way to check if compilation needs any other run?

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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Sorry for once more asking, i am at Work

2024-02-21 Thread Pablo Rodriguez via ntg-context
On 2/20/24 19:03, Gavin via ntg-context wrote:
> […]
> I don’t know how you are calling PdfLaTeX to typeset your document,
> context-test.tex, but that is what you are doing.

Hi Uschi and Gavin,

I will try to go the same way you propose, Gavin. Otherwise, Uschi may
find it hard to follow totally independent suggestions.

Uschi, if you are compiling your ConTeXt sources using WinEdt, your
issue might be the wrong button (or the wrong keystroke combination).

You might be invoking pdflatex directly, or maybe a button or keystroke
combination is labelled ConTeXt and it may really be invoking pdflatex.

In that case, you have to check WinEdt to see which command is run when
you start the compilation process (which command you really invoke).

Another way to see which ConTeXt binary you invoke would be to type in
the command prompt "context --version" (with no path specified) and
"where context".

But this is independent from the issue that you get pdflatex when you
intend context.

I hope it helps 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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Sorry for once more asking, i am at Work

2024-02-20 Thread Pablo Rodriguez via ntg-context
On 2/20/24 14:45, Ursula Hermann wrote:
> Dear Pablo, Dear List
>
> I have done all you told me yesterday.
>
> What I do not understand is that the Diagnosis in WinEdt 11 says,
> that everything is ok. Also the PDF-Viewer. Sorry, but I can't copy
> it, so I tell what I see. What I do not understand, because there is
> no PDF

Sorry, dear Uschi, but I’m afraid that I’m on Linux and WinEdt is
totally unknown to me.

That being said, if the messages from your computer are in German, there
is no problem with the language (after all, https://www.deepl.com/ is an
option too).

Reading your log (which I simply ignored and Gavin took care to read it
[totally my fault]), the first line you get is:

This is pdfTeX, Version 3.141592653-2.6-1.40.25 (TeX Live 2023)
(preloaded format=pdflatex 2024.2.6)  19 FEB 2024 12:41

The engine you are using is pdfTeX (from TeX Live 2023). In ConTeXt
terms, this is almost ancient (»uralt«).

ConTeXt MkII used pdfTeX as engine. In MkIV, the engine is LuaTeX. The
latest engine is LuaMetaTeX for what is named either LMTX or MkXL.

The format file is for pdfLaTeX, so ConTeXt cannot really do anything
with it. It is consistent that ConTeXt complains about not finding the
format file.

> But now I tried to do what you have told me and the last line, Pablo
> in cmd.exe says the same, what I get, if I compile: no format five
> given, quitting.

If you still happen to have the brand new installation on your desktop
(and "test-doc.tex" [sorry, but redo if required]), open the command
prompt and do the following:

  cd %USERPROFILE%\Desktop
  set PATH=%USERPROFILE%\Desktop\context\tex\texmf-mswin\bin

For that window (or session), your system will be able to find only the
path to the latest ConTeXt.

This will prevent TeX Live 2023 messing with ConTeXt (well, if
system-wide paths are not set for TeX Live [you might check that with
"echo %PATH%" after setting the path as explained in the previous command]).

After that, you may run:

  mtxrun --generate && context test-doc.tex

If this works, the installation of TeX Live seems to set paths in a way
that prevent ConTeXt to work.

In that case, you would have to ask about that on the TeX Live list.

I hope it helps 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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Sorry for once more asking, i am at Work

2024-02-19 Thread Pablo Rodriguez via ntg-context
On 2/19/24 13:06, Ursula Hermann wrote:
> Dear List,
>
> I have done the new download at Work. After compiling is always the same:
>
> Command Line:   context.exe --synctex=-1 "context-test.tex"
> […]
> startup error : no format file given, quitting

Dear Uschi,

it is really hard to know what is wrong with your installation (other
than it ConTeXt is not able to find your format file).

Sorry if this message is painfully verbose, but I will try not to take
anything for granted (so I don’t overlook anything relevant).

Could you save a new "test-doc.tex" file in your desktop directory
(which would be named "%USERPROFILE%\Desktop\test-doc.tex" [including
its full path])?

"%USERPROFILE%\Desktop\test-doc.tex" should contain:

  \starttext
  \input zapf
  \stoptext

Please, compile it by simply invoking ("cd %USEPROFILE%\Desktop\" might
be required before):

  context test-doc

If you get the same error message:

> startup error : no format file given, quitting

You might try (to make the format file):

  context --make --all

Then, try compiling again (run "context test-doc").

If you get the same error message, let’s try a brand-new installation
(not removing any existing one).

Get http://lmtx.pragma-ade.nl/install-lmtx/context-mswin.zip (if you use
Windows 32bt) or
http://lmtx.pragma-ade.nl/install-lmtx/context-win64.zip (for Windows
64bit) into "%USERPROFILE%\Desktop\".

Unzip the downloaded file to a newly created folder in your desktop
("%USERPROFILE%\Desktop\context").

Double-click on "install.bat" that you just uncompressed.

You have to add the new path, so that Windows may find your executables.

Open a new terminal (I guess it is called “command prompt” [or
»Eingabeaufforderung«] in Windows-parlance) and paste (if you have
ConTeXt for 32bit):

  set PATH=%PATH%;%USERPROFILE%\Desktop\context\tex\texmf-mswin\bin

Or this (if you use ConTeXt for 64bit):

  set PATH=%PATH%;%USERPROFILE%\Desktop\context\tex\texmf-win64\bin

Then, on the same window (since this only sets paths for the current
session), run:

  mtxrun --generate && cd %USERPROFILE%\Desktop\ && context test-doc.tex

Just in case you wonder, the first command is required for any brand-new
install. The second command sets the desktop as your current directory
(where you should have "test.doc.tex"). And the third command compiles
that source document.

If none of all my previous suggestions works, sorry but I cannot figure
out what might be preventing ConTeXt from finding the format files.

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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] /AFRelationship for attachments

2024-02-15 Thread Pablo Rodriguez via ntg-context
Dear list,

the new lpdf-wid.lmt contains in lines 302 and 377:

  local relation  = specification.relation or "Unspecified"

  AFRelationship = pdfconstant(relation),

The following sample compiled with current latest:

  \setupinteraction[state=start]
  \starttext
  attachment\attachment[method=hidden, relation=Data, file=xml-mkiv.pdf]
  \stoptext

Gives the following object:

  2 0 obj
  <<
/AFRelationship /Unspecified
/EF <<
  /F 1 0 R
>>
/F (xml-mkiv.pdf)
/Type /Filespec
/UF 
  >>
  endobj

Sorry, but which is the right way to specify the /AFRelationship for
embedded documents?

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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: OT: interview with John Warnock

2024-02-09 Thread Pablo Rodriguez via ntg-context
On 2/6/24 14:04, Henning Hraban Ramm wrote:
> Hi, I came across this interview with John Warnock (founder of Adobe and
> developer of PostScript):
>
> https://archive.computerhistory.org/resources/access/text/2023/08/102738759-05-01-acc.pdf

Many thanks for the reference, Hraban.

This is the first part of the interview, which has a second part in:

https://archive.computerhistory.org/resources/access/text/2023/08/102738854-05-01-acc.pdf

Videos for both (almost five hours in total) are available at

https://invidio.us/fB6UvJLKkWI
https://invidio.us/mNhzjz3PhK4;

Many thanks 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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Square right aligned

2024-02-09 Thread Pablo Rodriguez via ntg-context
On 2/8/24 22:37, Otared Kavian wrote:
> Hi Ursula,
>
> I think you mean the so-called end of the proof sign, or QED (Quod Erat
> Demonstrandum). You can use this:
>
> \definesymbol[QED][\mathematics{\square}]
> \def\qed{\wordright{\symbol[QED]}}
> \starttext
> This is the end of our proof. \qed
> \stoptext
>
> In principle it is included in ConTeXt, but it seems that in the latest
> version I have (2024.01.23), the command \qed is broken.

Hi Otared,

\qed seems to have been disabled (line 988 in strc-con.mklx).

Functionality seems to have been enabled in \QED (line 45 in math-mis.mkxl).

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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: distance in \setupinitial

2024-02-09 Thread Pablo Rodriguez via ntg-context
On 2/9/24 09:53, Thomas Meyer wrote:
> Hi folks,
>
> if I understand it correct it is not necessary to set default parameters.
> In my example it is a difference to set it or not (distance=0pt should
> be default):

Hi Thomas,

the default (as per line 65 in typo-drp.mkxl) is .125\emwidth.

This is the reason why your results differ with distance set to 0pt.

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 / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: \framed{\externalfigure} vs \externalfigure[frame=on]

2024-01-27 Thread Pablo Rodriguez via ntg-context
On 1/27/24 17:44, Jim wrote:
> The wiki page for \setupexternalfigure says
>  "Show frame around image. Most(?) options of \setupframed are usable!"

Hi Jim,

I’m afraid that this is a too generous statement.

https://www.pragma-ade.com/general/qrcs/setup-en.pdf#page=218 shows
which keys and values \setupexternalfigure allows.

> I tried to put a frame around a picture (using \externalfigure with
> frame=on) but I didn't get the frame to play nicely (see example below).  I
> can get the frame where I want it if instead I do
>  \framed[frame=on,...]{\externalfigure...}
> but this leaves me wondering whether
> (1) I am misinterpreting the wiki pages,
> (2) The wiki pages are misleading/wrong, or

I would say, that the offset and frameoffset don’t seem to be available
in \setupexternalfigure.

> (3) There is a bug in some code.
>
> If anyone would care to enlighten me, I would appreciate it.
>
> In particular, the offset=... option of \externalfigure does not seem to be
> consistent with the offset=... option of \framed.

I hope it is clear now.

> Here is the example... one and all should be able to directly run it, but
> the text above and below each picture may make the issues clear without
> having to run the code.  (The result I was looking for is the second figure
> in this example.)

To get offset in the frame of the image, you need a different frame from
the external figure itself (or so it seems).

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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Section number in the margin and the section title followed by paragraph!

2024-01-27 Thread Pablo Rodriguez via ntg-context
On 1/27/24 17:40, Ali Ali wrote:
> Thanks, those seems close to what I wanted but not exactly.
>
> The ASCII graphic (better in typewriter font) may explain what I desired,
> ```
> text width
>  |<>|
>
> ##.   SECTION TITLE paragraph
>   ...
>   .
>
> |<-->|
> margin
> ```
> I wanted paragraph to begin on the same line the section title lies.

Hi Ali,

from what I understand, you need both alternative=inmargin (or margin)
and alternative=text.

I’m afraid they are mutually exclusive alternative modes.

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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: upload

2024-01-20 Thread Pablo Rodriguez via ntg-context
On 1/20/24 09:38, Hans Hagen via ntg-context wrote:
> On 1/19/2024 6:34 PM, Pablo Rodriguez via ntg-context wrote:
>> [...]
>> I get a 404 error for both https://www.pragma-ade.nl/install.htm and
>> https://www.pragma-ade.com/install.htm.
>> [...]
> can you try again?

Many thanks for the fast fix, Hans.

Pablo

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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: upload

2024-01-19 Thread Pablo Rodriguez via ntg-context
On 1/18/24 20:43, Denis Maier via ntg-context wrote:
>> *Von:*Alain Delmotte 
>> *Gesendet:* Donnerstag, 18. Januar 2024 20:04
>> *An:* ntg-context@ntg.nl
>> *Betreff:* [NTG-context] Re: upload
>> [...]
>> When I go to https://www.pragma-ade.nl, I get an 404 Not Found
>> message, so I can't download the new upload !!
> > Works here.

Hi Denis,

I get a 404 error for both https://www.pragma-ade.nl/install.htm and
https://www.pragma-ade.com/install.htm.

I can update my existing installed version, but I wouldn’t be able to
install a brand new distribution.

Do you reach any of the urls included in my first paragraph?

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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Why LuaMetaTex is so slow?

2024-01-18 Thread Pablo Rodriguez via ntg-context
On 1/18/24 18:24, Shiv Shankar Dayal wrote:
> I can process TeXBook in almost an instant using PDFTeX which is about
> 450+ pages but my math book takes around 30 seconds averaging ~40
> pages/second.

Hi Shiv Shankar Dayal,

I guess that “The TeXbook” (having been written by Knuth himself) may be
optimized for speed.

Your math book may use features (I’m guessing again) that require more
resources than the features used by “The TeXbook”.

> Why LuaMetaTeX is so slow? How can I speed it up?

https://www.pragma-ade.com/general/manuals/musings.pdf#page=96 might
explain why Lua(Meta)TeX is slower.

Other chapters in that document from Hans might give you some insight on
the reasons why LMTX has to pay a price for being more feature-rich. I
got such impression when I read it.

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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] scaling tweaked fonts

2024-01-18 Thread Pablo Rodriguez via ntg-context
Hi Hans,

I have the following sample which behaves differently after latest from
2023.09.26 18:19:

\definetweakedfont[wider][xscale=1075]
\starttext
\startTEXpage[align=center]
\contextversion\\
\wider \contextversion
\stopTEXpage
\stoptext

Up to that version, no scaling was 1000, after that one no scaling became 1.

This should be the reason behind my previous issue about too large sizes
in the first latest from 2024
(https://mailman.ntg.nl/archives/list/ntg-context@ntg.nl/thread/JVB7AWJE53NW4AAE3ODUQN6GB34IBO5X/).

I just want to confirm that this change was 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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: issue with fonts in current latest (2024.01.08 11:23)

2024-01-16 Thread Pablo Rodriguez via ntg-context
On 1/15/24 21:43, Mikael Sundqvist wrote:
> Hi,
>
> Try this:
> […]
> \definebodyfontenvironment[16pt]
> […]
> Maybe some check will be added. (On the chat with Hans...)

Many thanks for your help, Mikael.

Your hint solved the issue and having a check that avoids the reported
issue.

BTW, I’m afraid I find too many issues with fonts in current latest, I
need to investigate them further (in order to be able to report them).

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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] issue with fonts in current latest (2024.01.08 11:23)

2024-01-15 Thread Pablo Rodriguez via ntg-context
Dear list,

I have the following sample:

  \definefontfamily[mainface][rm][TeX Gyre Pagella]
  \definefontfamily[coverface][rm][TeX Gyre Termes]
  \setupbodyfont[mainface, 16pt]
  \starttext
  \startmakeup[standard][style=\bf]
  \switchtobodyfont[coverface]
  This is a cover.
  \stopmakeup

  This is text.
  \stoptext

Compiling the sample with current latest (2024.01.08 11:23), LMTX puts
Latin Modern Roman (no bold) and MkIV puts Termes (no bold).

The results with previous latest (2023.09.26 18:19), cover is in Termes
bold with LMTX and in Termes regular with MkIV.

I guess there might be an issue here. Could anyone confirm 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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] too large dimension in current latest

2024-01-15 Thread Pablo Rodriguez via ntg-context
Hi Hans,

after updating to current latest (2024.01.08 11:23), I get the following
error.

This is triggered when compiling XML sources (with extra environment
files), so it is not easy to get a minimal sample file.

I wonder whehter the message itself could reveal what may be wrong here.

Many thanks for your help,

Pablo


tex error   > tex error on line 36 in file : Dimension too large


\emwidth
 \hyphenatedurl
#1->\dontleavehmode \begingroup \expand \everyhyphenatedurl
\normallanguage \zerocount \scratchskipone \zeropoint \s!plus \dimexpr
\emwidth
/12\s!minus \dimexpr \emwidth /24\relax \scratchskiptwo \zeropoint
\s!plus \dimexpr \emwidth /48\s!minus \dime

...\strutdp \relax \setlocationattributes \setstrut \global
\lastsavedreferenceattribute \lastreferenceattribute \c_attr_reference
\lastreferenceattribute \dostarttagged \t!link \empty \urlstyle
{\hyphenatedurl {\xmlflush {main::154}}
}\dostoptagged
 \firstoftwoarguments
#1#-->#1
 \strc_references_goto
...rrentreferencehtdp \strutht \strutdp \relax
\setlocationattributes \setstrut \global \lastsavedreferenceattribute
\lastreferenceattribute \c_attr_reference \lastreferenceattribute
\dostarttagged \t!link \empty #1\dostoptagged }{#1}
\else #1\fi \ ...
 \mypersonalurl
#1#2->\bgroup \goto {\urlstyle {\hyphenatedurl {#2}}}[url(#1)]
\egroup {}
 ...





I can't work with sizes bigger than about 19 feet (45 Theodores as of 2023),
575 centimeters, 2300 Toves, 230 Ediths or 16383 points. Continue and
I'll use
the largest value I can.
mtx-context | fatal error: return code: 1
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] issue with \setuptyping (and XML sources)

2024-01-14 Thread Pablo Rodriguez via ntg-context
Dear list,

the issue I’m experiencing comes from XML sources typeset with ConTeXt.

I have tried, but I found no way to get a minimal sample.

For code fragments in the XML source, I use:

  \bgroup\xmlprettyprinttext{#1}{none}\egroup

To which I apply:

  \setuptyping
[style={\tt\wider},
 margin=yes,
 align={right, broad},
 blank={3*halfline},
 before={\blank[3*halfline]},
 after={\blank[3*halfline]}]

Could anyone be so kind to explain me why the first three options from
\setuptyping work (style, margin and alignment), and the other three
don’t work at all?

Sorry, I think it has to be a stupid mistake of mine (but I don’t know
which one it might be).

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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] install-modules script and git URLs

2023-12-19 Thread Pablo Rodriguez via ntg-context
Hi Hraban and Taco,

the install-modules script doesn’t allow .tar.gz as compression format
to install modules.

.tar.gz seems to be the compression format offered for modules that are
uploaded using a git URL.

Hraban explained in August that thee server could be configured to get
.zip compression for modules in git checkout.

Sorry, I know that you are both very busy, but could it be this issue fixed?

Using git to upload module versions is way more easy than uploading .zip
files.

Many thanks for your help to both,

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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: QR Code

2023-12-18 Thread Pablo Rodriguez via ntg-context
On 12/18/23 20:34, Henning Hraban Ramm wrote:
> [...]
> Are you using MkIV (LuaTeX) or LMTX (LuaMetaTeX)?

Many thanks for your reply, Hraban.

I understood my issue with your reply (I known, your answer is intended
to Uschi).

It is also in the sent file:

 Creator:
   LuaMetaTeX 2.10.11 20230908 + ConTeXt LMTX 2023.09.26 18:19
 PDF Producer:
   LuaMetaTeX-2.10.11

> I guess a missing EPS means you load the MkIV version of the module,
> probably because "m-zint".
>
> I can’t help with Windows; since Hans developed it on Windows, it should
> work (but don’t ask me how).

I will try to explain what I understand from this (intended for Uschi).

Given that there are two modules (m-zint and zint), there are two options:

1. Either you use the LMTX module (\usemodule[zint]) and you need the
Zint library (as explained in
https://wiki.contextgarden.net/Barcodes#Zint_module).

2. Or you use the MkIV module (\usemodule[m-zint]) and you need the Zint
binary installed and CMD should be able to invoke it (already knowing
its past).

You may have the Zint binary installed, ConTeXt may be generating the
required EPS files, but either Inkscape is not installed (or its path is
unknown to the system), or ConTeXt cannot simply find where the
converted PDF versions of the zint images are.

If I have the following source in testing-barcodes.tex:

  \usemodule[m-zint]
  \starttext
  \startTEXpage[offset=1dk]
  \barcode[alternative=isbnx, text=9783865419026, width=4cm]
  \stopTEXpage
  \stoptext

ConTeXt compiles it generating to extra files (when compared to the pure
zint module for LMTX only):

  zint-isbnx-fe90eda0e93cf020312eps
  m_k_i_v_zint-isbnx-fe90eda0e93cf020312_eps_c60ccda70ef.pdf

(Removed some characters in strings so file names fit in a single line.)

The first file is generated by the Zint binary itself. The second one is
the automatic conversion (through Inkscape) that ConTeXt needs to embed
EPS (and SVG) files in the final PDF document.

If m_k_i_v_zint-*.pdf files are missing, the problem might be that
Inkscape isn’t installed (or its path is unknown to the system).

If also zint-*.eps files are missing, you should find where Zint is
generating them.

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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: QR Code

2023-12-18 Thread Pablo Rodriguez via ntg-context
On 12/18/23 17:05, Ursula Hermann wrote:
> […]
> I got what you see in the pdf.

Hi Uschi,

I‘m on Linux64 using LuaMetaTEx.

Contrary to the explanation from
https://wiki.contextgarden.net/Barcodes#Zint_module, I need the zint
package installed on Fedora.

I have safely removed the whole contents of
tex/texmf-linux64/bin/lib/luametatex/lib/zint (actually, I removed
tex/texmf-linux64/bin/lib).

But if Zint is not installed on my system, I get a compilation error,
not a simply not found error.

My error message reads:

  sh: line 1: zint: command not found
  zint --barcode=isbnx  --output= […]

At least on Linux64, it seems that barcode generation with Zint requires
its binary.

For Windows, your ConTeXt distribution might be missing the library (as
described in the wiki link provided).

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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: (again) wrong destination types?

2023-12-06 Thread Pablo Rodriguez via ntg-context
On 12/5/23 00:21, Bruce Horrocks wrote:
>> On 3 Dec 2023, at 15:26, Pablo Rodriguez via ntg-context wrote:
>> […]
>> My issue is that I cannot avoid having "page=name" for links to external
>> documents, but this breaks footnotes and other special operation links.
>
> What are you using for links to external documents? If just a single
> command such as \goto then you might be able to get away with defining a
> wrapper (e.g. \myGoto) that does
> \setupinteraction[state=start,page=name,focus=standard] then the \goto
> command then \setupinteraction[state=start,page=fit,focus=standard]
> afterwards.

Many thanks for your reply, Bruce.

The following code seems to solve my issues:

  \def\MyGoTo#1[#2]{\setupinteraction[state=start, style=,
  display=new, color=, contrastcolor=,
  page={auto,name},
  focus=standard]%
\goto{#1}[#2]}
  \setupinteraction[state=start, style=,
  display=new, color=, contrastcolor=,
  page={no},
  focus=standard]

I didn’t thought this issue would be so easy to be solved.

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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: externalfigure crashed

2023-12-06 Thread Pablo Rodriguez via ntg-context
On 12/4/23 20:44, Hans Hagen via ntg-context wrote:
> On 12/4/2023 5:38 PM, Pablo Rodriguez via ntg-context wrote:
>>> […]
>> Does the above mean that ConTeXt will be able to sign PDF documents with
>> digital certificates?
> Well, that's what singing is, right? The problem is actually less in the
> signing than in the certificates themselves.
>
> Basically one can sign (with some certificate) and then validate.

Many thanks for your explanation, Hans.

These are great news. I wonder whehter it would be feasible to extend
this to use smart cards (through Firefox).

Many thanks the new implementations,

Pablo

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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: externalfigure crashed

2023-12-04 Thread Pablo Rodriguez via ntg-context
On 11/24/23 18:16, Hans Hagen via ntg-context wrote:
> […]
> will do for now ... i can't upload a new installer .. pending the built;
> the advantage is that i can do some experiments that would otherwise
> break the current version (making compact font mode very close to
> normal, pdf signing […]

Sorry, Hans, if I am missing the point.

Does the above mean that ConTeXt will be able to sign PDF documents with
digital certificates?

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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: marginwidths

2023-12-03 Thread Pablo Rodriguez via ntg-context
On 11/22/23 18:03, Wolfgang Schuster wrote:
> Hans van der Meer via ntg-context schrieb am 22.11.2023 um 15:45:
>> But changing the width of the section in the middle is not changing.

dr. van der Meer,

your sample works for me if you add width=fit, such as in:

  \setuplayout[width=fit, leftmargin=6cm,rightmargin=10cm]
  \showframe
  \starttext
  \ConTeXt\space\contextversion\blank
  before the \type{\starttext}:\crlf
  \type{\setuplayout[leftmargin=6cm,rightmargin=10cm]}\crlf
  make no difference in displayed frame
  \showlayout
  \stoptext

I wonder whether I might be missing something, since this option is not
mentioned by Wolfgang.

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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: unwanted blank page

2023-12-03 Thread Pablo Rodriguez via ntg-context
On 11/22/23 09:57, madiazm.eo...@gmail.com wrote:
> Thanks a lot Pablo for your comments, I think my bad English did not
> let me be clear.
Sorry (also for my delay in answering), but it was totally my fault (I
totally missed your point)..

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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: (again) wrong destination types?

2023-12-03 Thread Pablo Rodriguez via ntg-context
On 11/22/23 00:06, Bruce Horrocks wrote:
> [...]
> I changed your example to the following:
> \setupinteraction[state=start, page=name, focus=standard]
> \starttext
> \input knuth \par
> a\footnote{b} \par
> \dorecurse{7}{\input knuth \par}
> \stoptext

Many thanks for your fast reply, Bruce.

I wanted to reply much sooner, but it was really impossible for me.

>From your explanation, the first link (body to footnote, your point b)
has destination to fit the whole page inside the viewer.

The second link (footnote to body, your point c) has the destination to
reach a position inside the page (where the destination lies). This is
what "focus=standard" should achieve.

In PDF terms (simplified), fit to page destinations are /Fit
destinations and placed destinations are /XYZ destinations.

This sample shows what might be the root issue here:

  \setupinteraction[state=start, page=name, focus=standard]
  \starttext
  \completecontent
  \chapter{Chapter}
  a\footnote{b}
  \stoptext

ConTeXt handles internally links in categories. For some reason unknown
to me, "page=name" triggers that special operation links contain /Fit
instead /XYZ destinations.

This is similar to the wrong link destinations (fit instead of standard)
from TOC (but not in footnotes [which are right]) when compiled with MkIV:

  \setupinteraction[state=start, focus=standard]
  \starttext
  \completecontent
  \chapter{Chapter}
  a\footnote{b}
  \stoptext

I hope it is clearer now. Let me know if it is not.

My issue is that I cannot avoid having "page=name" for links to external
documents, but this breaks footnotes and other special operation links.

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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] (again) wrong destination types?

2023-11-20 Thread Pablo Rodriguez via ntg-context
Dear list,

sorry for insisting, but this is important for my documents.

I have the following sample:

 \setupinteraction[state=start, page=name, focus=standard]
  \starttext
  a\footnote{b}
  \stoptext

If page is set to anything different than no in \setupinteractionscreen,
focus=standard will not work (it will be used as focus=fit).

Could anyone confirm the issue or explain me what I’m 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 / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: unwanted blank page

2023-11-20 Thread Pablo Rodriguez via ntg-context
On 11/19/23 23:34, madiazm.eo...@gmail.com wrote:
> sorry if i dont get your problem right understood, but i'm completely
> new to context.

Hi Miguel,

I’m afraid it isn’t entirely clear whether you intend to ask something
or not.

> I use a hack not to get the number not printed in the title page
> (though I define sectionblocks for keeping different numbering systems
> for the table of contents and the document)

Section blocks are intended for that.

Just a comment, if your cover (or title) page involves a one and only
single page, you may use makeups, such as in:

  \starttext
  \startmakeup[standard][pagestate=start]
  \dorecurse{25}{\input knuth}
  \stopmakeup
  \stoptext

My sample explicitly displays that makeups are intended for a single page.

Since actual content for that makeup would fit in six pages without the
makeup, it looks weird inside it.

> I use \setuppagenumbering[location=] for not getting the number
> printed and then I reset the page numbering for the next sections. I
> copy my code so that you know what I do.
> Sorry if it doesnt help

If you are showing your code to list members, fine.

Sorry, but if there is a question here, I’m afraid you need to be more
explicit asking your question.

Just some comments:

> %%
> %%% LOS BLOQUES %
> %%%

In a minimal sample, comments as the previous one don’t provide any clue
to understand your code or the issue you might be dealing with.

It is wiser to keep the sample to its minimal form.

>   \startsectionblock[portada]
>   \setuppagenumbering[location=]
>   \input{03_portadaEval.tex}%this is my title page

It is better to provide actual content than a file name.

BTW, if its contents cannot be in more than a single page, the approach
suggested above might be easier.


> \startfrontmatter[]

Empty brackets are not required here.

> \start
>   \setuplayout[re
>   \setupinterlinespace[.8ex]

I would say that this is extremely small even for an "x" to fit in.

Again, 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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: learning about the grid

2023-11-20 Thread Pablo Rodriguez via ntg-context
On 11/19/23 23:17, madiazm.eo...@gmail.com wrote:
> Thanks, Pablo and Henning
>
> I suppose I am making a mistake with my setupinterlinearspace. My
> school asks for Times New Roman (I use termes) 12pt and
> onehalfspacing. In latex I used linespread{1.3} and so I supposed
> setting ConTeXt with setupinterlinearspace[1.3ex] was the right way.

Hi Miguel,

sorry, but I don’t have any idea what \linespread might mean for LaTeX
in plain English.

Some ConTeXt users may also use LaTeX too, but don’t rely on that.

> (I read somewhere that vertical spaces should be measured in ex and
> horizontal spaces in em; maybe it's not widely accepted).

As far as I know, em is defined by the width of the capital 'M' and ex
is defined by the height of the lowercase 'x'.

With your requirements, I think it is easier to set line spacing to one
and a half line with 1.5em, such as in:

  \setupbodyfont[termes]
  \starttext
  \the\exheight\\
  \the\dimexpr3\exheight\\
  \the\emwidth
  \the\dimexpr1.5\emwidth\\
  \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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: learning about the grid

2023-11-19 Thread Pablo Rodriguez via ntg-context
On 11/19/23 13:27, Miguel Diaz wrote:
> [...]

Hi Miguel,

I don’t use the grid. This is also the default in ConTeXt.

I’m not sure whether I’m getting your point here.

See what the difference between not enabling the grid and enabling it:

  \showframe\showgrid
  \setupwhitespace[medium]
  \starttext
\input knuth
  \setuplayout[grid=yes]\page
\input knuth
  \stoptext

> 1. Why are the lines printed one over the other when grid=no? how do
> profis then use context without grid?

As said, ConTeXt is \setuplayout[grid=no] by default.

As far as I can recall it, the default value is
\setupinterlinespace[line=2.85ex].

I have just discovered that with values such as line=1.3ex,
\setuplayout[grid=yes] behaves very differently than with values such as
line=2ex (and above).

I mean, lines follow the grid when the text fits. See the difference with:

  \showframe\showgrid
  \setupinterlinespace[line=1.3ex]
  \starttext
\dorecurse{25}{asa aeo eau}
  \setuplayout[grid=yes]\page
\dorecurse{25}{asa aeo eau}
  \stoptext

According to https://wiki.contextgarden.net/Grid_typesetting (feel free
to improve the article), a way of solving this would be to wrap your
stuff inside:

  \startlinecorrection
  ...
  \stoplinecorrection

The problem is that your interline space is too small to prevent line
collapsing.

ex is the height of the lowercase 'x'. Are you sure that your school
doesn’t require 1.3em (height of capital 'M') as interline space instead?

You can get yourself the values:

  \starttext
  \the\exheight\\
  %\the \dimexpr1.3\exheight\\
  \the\emwidth
  \stoptext

The first line will give you 1ex is about 5.7pt (with the default font
used by ConTeXt). 1.3ex would be less than 6.75pt.

The value of 1em is the value of the font size. Default for ConTeXt is
12pt, so 1em has to be 12pt.

I think it is clear now that an interline space of 1.3ex calls for line
overlapping.

That being said, I don’t know why the grid avoids collapsing them (if
the person explicitly asks for this).

> 2. Is there a document where I can read how the grid is conceived to
> work for the many options in a simple way?

See the wiki article above. The mailing list is also a way of getting help.

One suggestion, please always provide a minimal working sample (that can
be copied, pasted and compiled automatically), when you ask for help.

How minimal? Well, they cannot lack essential parts to be compiled.
Other than that, they should only contain required content to reproduce
your issue.

This minimal working sample helps the one who reads to understand what
you are dealing with.

Otherwise, it is really hard to understand which kind of issue you might
be facing (consider that no one else may read your mind or be in front
of your computer).

I hope 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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] wrong destination types?

2023-11-17 Thread Pablo Rodriguez via ntg-context
Dear list,

I have the following sample:

  \setupinteraction[state=start, page=name, focus=standard]
  \starttext
  a\footnote{b}
  \stoptext

In \setupinteraction, "focus=standard" is ignored when I use "page=name".

I mean, link destinations are to the full page and they alter the page
view (when the document is not viewed as full page).

Sorry, I don’t have other way to say it. I should get (only named
destination value):

  7 0 obj
  <<
/D [ 6 0 R /XYZ 76.84458 722.7349 null ]
  >>
  endobj

And I’m getting:

  4 0 obj
  <<
/D [ 1 0 R /Fit ]
/S /GoTo
  >>
  endobj

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

BTW, "page=name" is required for references to named destinations in
external documents.

I get the same results with both LMTX and MkIV from current latest
(2023.09.26 18:19).

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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: named destinations in /GoToR

2023-11-14 Thread Pablo Rodriguez via ntg-context
On 11/13/23 23:30, Michal Vlasák wrote:
>> […]
>> With the previous code, the only destination reads in the PDF source:
>>
>>   5 0 obj
>>   <<
>> /D [ 0 /Fit ]
>> /F (whatever.pdf)
>> /S /GoToR
>>   >>
>>   endobj
>
> It seems that the default mode for outer (external file) references is
> the "auto" mode. This one seems to load the whatever.pdf file, check the
> named destinations and decide based on that.

Many thanks for your explanation, Michal.

I was totally ignorant of the page key in \setupinteraction.

It works fine now, with both the options you provided (and the patch,
many thanks for both).

I have accidentally discovered an issue in which users may run in an
uninteded ways.

If many destinations have the same identifier, only the first one is
generated.

Using the following sample:

  \setupinteraction[state=start,
focus=standard]
  \starttext
  \dorecurse{5}{\dorecurse{5}
{\chapter[\recurselevel]{Chapter}
  \section[sec-\recurselevel]{Section}}}
  \stoptext

Of course, this kind of identifiers have to be unique to be useful, but
I wonder whether they may be created adding something like:

  identifier
  identifier-1
  identifier-2
  identifier-3
  …
  identifier-n

This way (or a similar one) all named destinations are created.

Of course, when linking with \goto, \in, \at, \about, the right
identifier should be chosen.

With links within the same document, correcting the identifier (or the
link destination) is a trivial matter.

With links from external documents, there may be no option to generate
the external files again. If destinations are there, inspecting the
external document is an option.

Would it be possible that already given destination identifiers could
automatically have another indentifier to generate a new destination?

I hope my explanation is clear. Let me know if it isn’t and I try to
ellaborate it further (in a clearer way ).

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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] named destinations in /GoToR

2023-11-13 Thread Pablo Rodriguez via ntg-context
Dear list,

imagine I have a PDF document (named "whatever.pdf") such as the one
generated from this source:

  \setupinteraction[state=start,
focus=standard]
  \starttext
  \dorecurse{5}
{\chapter[\recurselevel]{Chapter}
  \section[sec-\recurselevel]{Section}}
  \stoptext

This source only samples PDF documents not generated with ConTeXt. This
means that no .tuc file may be available and named destinations may
contain only digits.

Then I need to access some named destinations from a document such as:

  \setupinteraction[state=start,
focus=standard]
  \starttext
  \dorecurse{5}
{\goto{Chapter \recurselevel}[whatever.pdf::\recurselevel],
  \goto{section \recurselevel}[whatever.pdf::sec-\recurselevel]\par}
  \stoptext

Sorry, but after reading again lpdf-ano.mkxl I’m not sure whether I can
get named destinations (such as "/D (4)" or "/D (sec-3)") and how I
could get them.

With the previous code, the only destination reads in the PDF source:

  5 0 obj
  <<
/D [ 0 /Fit ]
/F (whatever.pdf)
/S /GoToR
  >>
  endobj

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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: \doifemptyelse issue?

2023-11-13 Thread Pablo Rodriguez via ntg-context
On 11/13/23 13:10, Bruce Horrocks wrote:
> The following MWE gives "false false" instead of "false true". I'm
> sure this used to work (18 months or more ago!) as I found it when
> re-processing an old document.> [...]
> There is a work-around using \doiftext instead as that seems to work
> okay with recalled dataset values but I thought I'd raise it.
Hi Bruce,

some time ago Wolfgang explained
(https://mailman.ntg.nl/archives/list/ntg-context@ntg.nl/message/7OO5P34S56RGR5G3K7LXS6DTZWAJGUDZ/):

> \doifempty(else) doesn't expand the argument and any argument counts as
> not empty. To satisfy the command you can expand the first argument
> (\normalexpanded) or you use \doifnothing(else) which expands the argument.

I don’t know whether is what is preveiting your test here, but
\doifnothingelse seems to work fine with your sample.

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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: hard clipping in ConTeXt?

2023-11-13 Thread Pablo Rodriguez via ntg-context
On 11/11/23 11:02, Hans Hagen via ntg-context wrote:
> On 11/10/2023 6:17 PM, Pablo Rodriguez via ntg-context wrote:
>> [...]
>> Is there any way to have a hard clipping in ConTeXt?
>>
>> I mean, that only the contents of the clipped section is added to the
>> resulting PDF document?
>
> one has to render a document (page stream) in order to wee what end up
> where .. a viewer has that info so it can decide to act upon it (apart
> from some gambling with words clipped in the middle of a character)
>
> this is not something for context to provide (it would mean keeping
> track of what gets clipped, and then compensating for it because it can
> still contribute to placement of following stuff, and then how about
> half clipped stuff)

Many thanks for your reply, Hans.

Now it is clear to me that what I asked is too complex to be achieved
with ConTeXt (since it is mainly outside its scope).

> if i had a lifespan of 1000 years or were on a boring trip to another
> planet it might make a nice (although pointless) challenge to keep me
> occupied

From the user perspective, it is important to know that the full page is
included in the document (which may lead to unintended consequences).

I have accidentally discovered this myself the other day and I’m going
to check the wiki to add this information (if not included).

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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] hard clipping in ConTeXt?

2023-11-10 Thread Pablo Rodriguez via ntg-context
Dear list,

I have the following sample:

  \setuplayout[page]
  \starttext
\clip[hoffset=5mm, voffset=5mm, width=15mm, height=15mm]
{\externalfigure[xml-mkiv.pdf]}
  \stopnotmode
  \stoptext

Using PDF.js (from current Firefox), xpdf, Evince, mupdf-gl, the viewer
is able to find "dealing", altough it cannot be displayed.

Okular and Sumatra (with Wine in Linux) are not able to find "dealing".

Is there any way to have a hard clipping in ConTeXt?

I mean, that only the contents of the clipped section is added to the
resulting PDF document?

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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: XRechnung

2023-11-10 Thread Pablo Rodriguez via ntg-context
On 11/10/23 11:29, Henning Hraban Ramm wrote:
> Am 10.11.23 um 09:37 schrieb juh+ntg-context--- via ntg-context:
>> Hi,
>>
>> does anyone produce the XML-based invoice called XRechnung with ConTeXt?
>> I don't know if XRechnung is the european name or only used in Germany?
>
> In German it’s ZUGFeRD, the international name is Factur-X:
> https://www.pdf-tools.com/pdf-knowledge/zugferd-standard-electronic-invoices/

According to https://www.ferd-net.de/standards/zugferd/, they may even
be two different things (but I haven’t checked it).

> I always wanted to implement it, but never actually tried.
> It’s based on PDF/A, and I’m not sure about the proper workflow to get that.

Someone told some time ago that https://github.com/speedata/publisher
implements ZugFeRD. Again, no idea how or to which extent.

https://zugferd.github.io/ provides more info. Version 2 of ZUGFeRD
seems to be Factur-X (according to them).

If you allow me the pun (as a foreigner and non-native speaker), the
name seems to be too near to something like »Zug-Pferd« (I know it is
nonsense in German, but ZUGFeRD seems the name for an act or a
regulation [which German-speaking countries love to do]).

Just in case it might help (for the links),

Pablo




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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: command to process CSV file (database module)

2023-11-05 Thread Pablo Rodriguez via ntg-context
On 11/5/23 13:56, Pablo Rodriguez via ntg-context wrote:
> [...]
> I get an error about an unexpected symbol near "\" in the line of
> "\processdatabasefile".
>
> Could anyone enlighten me about what I am missing here?

Replying to myself, thanks to the wiki
(https://wiki.contextgarden.net/Commands_with_optional_arguments).

It seems that the command has to be defined as unexpanded, such as in:

  \setupinteraction[state=start]
  \setupattachments[method=hidden]
  \usemodule[database]

  \starttext

  \unexpanded\def\ItemContents#1#2#3{\doiftext{#2}
{\item {\em #1}\attachment[file=#2, name=\currentitemnumber-#2]%
  \doiftext{#3}{ (also available at #3)}}}

  \defineseparatedlist
 [test]
 [separator={,},
  quotechar={"},
  before={\startitemize[n]},after={\stopitemize},
  first={\ItemContents},last={.},
  left={\{},right={\}}]

  \processdatabasefile[test][context-documents.csv]

  \stoptext

It is not clear for me why is this needed, but it might be one of the
many aspects of expansion that average users cannot understand from TeX.

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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] command to process CSV file (database module)

2023-11-05 Thread Pablo Rodriguez via ntg-context
Dear list,

These are the following first four lines of a CSV file:

,,
"About \LuaTeX\ and
\ConTeXt","about.pdf","https://www.pragma-ade.com/general/manuals/about.pdf;
"l2r, r2l: A Few
Tips","bidi.pdf","https://www.pragma-ade.com/general/manuals/bidi.pdf;
"Flowcharts","charts-mkiv.pdf",

Faking a command such as \cA, \cB and \cC (for contents of columns A, B
or C) I would like to create a source document with an enumeration that
contains:

  \doiftext{\cB}
{\item {\em\cA}\attachment[file=\cB]%
  \doiftext{\cC}{ (also available at \cC)}.}

I would like to do that with the "database" module.

So far I have adapted the itemize environment, but I don't get the
contents for items right:

  \usemodule[database]

  \starttext

  \def\ItemContents#1#2#3{\doiftext{#2}
{\item {\em #1}\attachment[file=#2]%
  \doiftext{#3}{ (also available at #3)}.}}

  \defineseparatedlist
 [test]
 [separator={,}, % tab
  quotechar={"}, % tab
  before={\startitemize[n]},after={\stopitemize},
  first={\ItemContents},last={.},
  left={\{},right={\}}]

  \processdatabasefile[test][context-documents.csv]

  \stoptext

I get an error about an unexpected symbol near "\" in the line of
"\processdatabasefile".

Could anyone enlighten me about what I am 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 / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: How to encircle text?

2023-11-05 Thread Pablo Rodriguez via ntg-context
On 11/5/23 12:59, anton.chig...@mail.com wrote:
> Wow!
> This certainly is not the noobie version!
> All I wanted was to put a circle around a letter
> for emphasis.

Anton,

it works as you intend:

  \starttext
  \startusableMPgraphic{MetaCirc}
   draw fullcircle
   xyscaled
  (OverlayWidth-OverlayLineWidth,OverlayHeight-OverlayLineWidth)
   withpen pencircle scaled OverlayLineWidth
   withcolor OverlayColor ;
  \stopusableMPgraphic

  \defineoverlay[MetaCirc][\useMPgraphic{MetaCirc}]

  a\dontleavehmode\framed
 [background=MetaCirc,
  backgroundcolor=red,
  frame=off,
  location=bottom,
  rulethickness=1pt]
 {b}c
  \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 / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Double sided pages leave a thin white line on the right side

2023-10-28 Thread Pablo Rodriguez via ntg-context
On 10/28/23 16:26, Mia Bikey wrote:
> Well I was using firefox to open my pdf and did not check it on anything
> else.
> I opened the pdf in sumatra, adobe, microsoft edge and yeah there is no
> white line.
> Seems like it is a firefox issue then.

Hi Mia,

opening your attachment with Firefox 119 (and the version of PDF.js that
comes with it) on Linux, I was not able to find any white line in your
attachment or in the output from the you source (with zoom set to 400%).

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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


Re: [NTG-context] viewer layers (optional content groups, OCG)

2023-06-23 Thread Pablo Rodriguez via ntg-context
On 6/22/23 18:07, Hans Hagen via ntg-context wrote:
> On 6/19/2023 8:41 PM, Henning Hraban Ramm via ntg-context wrote:
>> Checking viewer layers:
>>
>> * \setupviewerlayer doesn’t work; e.g. "state=stop" only works if I put
>> it in \defineviewerlayer
> in next upload

Hans,

since this is related to OCG, a minor improvement.

/Export (inside /Usage) is actually a dictionary with a single entry
(/ExportState) and values /ON and /OFF (from the PDF spec
https://raw.githubusercontent.com/adobe/dc-acrobat-sdk-docs/master/docs/standards/pdfstandards/pdf/PDF32000_2008.pdf#search=ExportState):

The attached patch fixes this issue.

Many thanks for your help,

Pablo
--- lpdf-ren.lmt	2023-06-23 20:08:17.096662826 +0200
+++ mkxl/lpdf-ren.lmt	2023-06-23 20:09:05.358959481 +0200
@@ -78,8 +78,8 @@
 }
 
 local pdf_export = {
-[v_yes] = pdf_on,
-[v_no]  = pdf_off,
+[v_yes] = pdfdictionary { ExportState = pdf_on  },
+[v_no]  = pdfdictionary { ExportState = pdf_on  },
 }
 
 -- We can have references to layers before they are places, for instance from
___
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] Fwd: [veraPDF-users] Development Preview: PDF file checker based on the Arlington PDF Model

2023-06-21 Thread Pablo Rodriguez via ntg-context
Dear list,

it is still early development, but this tool might be extremely useful
to check PDF documents.

Direct link to downloads (version 1.25 doesn’t seem to be available):

  https://software.verapdf.org/develop/arlington/1.23

Just in case it might help,

Pablo

 Forwarded Message 
Subject: [veraPDF-users] Development Preview: PDF file checker based on
the Arlington PDF Model
Date:   Wed, 21 Jun 2023 12:35:12 +0100
  Dear all, 

On the 30th anniversary of PDF technology, we're excited to announce the
availability of the first development preview of a new veraPDF-powered
application. Building on the great work done by the PDF Association
supported by the Defence Advanced Research Projects Agency (DARPA),
veraPDF has developed an open-source PDF checker based on the Arlington
PDF Model. This application is separate from the veraPDF PDF/A and
PDF/UA validator but comprises a very familiar package of GUI and
command-line applications.

*The Arlington PDF Model is an invaluable resource for anyone developing
or testing PDF tools. *Read more about the development here.

 

The veraPDF development team have utilised  Arlington in a way that's
compatible with the veraPDF architecture. The Arlington PDF Model-based
checker can now analyse PDF files against the full PDF 2.0
specification, including errata, by downloading the Java-based installer
(Win, MacOS, Linux, requires Java 8+ JRE installed) at veraPDF Software
Downloads . 

Best wishes,

Helena

--

Helena Watson (she/her), Marketing Officer

Open Preservation Foundation (OPF)  

Twitter | GitHub
| Mailing List



Please note: I work part-time for OPF, please bear with me if I don't
reply to your email right away. I may email you at a time that is
convenient for me, but please don't feel the need to respond outside of
your working hours. 


Discover the benefits of OPF membership


___
veraPDF Users mailing list -- us...@lists.verapdf.org
To unsubscribe send an email to users-le...@lists.verapdf.org

___
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] Mailing list problems

2023-05-31 Thread Pablo Rodriguez via ntg-context
On 5/31/23 16:21, Taco Hoekwater via ntg-context wrote:
> Hi!
>
> Both problems should be fixed now. If you still do not see the new
> posts in the ntg-context html archive page at
> https://mailman.ntg.nl/pipermail/ntg-context/2023/thread.html, force a
> hard reload of the page in your browser.

Hi Taco,

many thanks for your fix.

Best wishes,

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] hyperlinks not working with current latest

2023-05-29 Thread Pablo Rodriguez via ntg-context
On 5/29/23 09:43, Hans Hagen via ntg-context wrote:
> On 5/28/2023 8:57 PM, Pablo Rodriguez via ntg-context wrote:
>> Dear list,
>>
>> in the following sample, hyperlinks for footnotest don’t work with
>> current latest (2023.05.28 18:57) with current LMTX (20230528):
>> [...]
>> Could anyone confirm this issue?
>
> i'll upload a fix later today (some sensitivity to an extra return value
> of a helper)

Many thanks for your fast fix, Hans.

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
___


  1   2   3   4   5   >