[NTG-context] Re: luatex doesn't see installed 3rd party module

2024-05-20 Thread Arthur Rosendahl via ntg-context
On Mon, May 20, 2024 at 02:31:29AM +0400, and...@borisov.dev wrote:
> Correction for misspelling : `context --latex` —>  `context --luatex`

  It was a funny typo ;-)

Arthur
___
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: luatex doesn't see installed 3rd party module

2024-05-20 Thread Hans Hagen via ntg-context

On 5/20/2024 12:38 AM, and...@borisov.dev wrote:

Hello!

I’ve installed a 3rd party module by copying its TDS folder structure and 
invoking `context --generate` as described in 
https://wiki.contextgarden.net/Modules#ConTeXt_LMTX

When I compile my project with `context` (using LuaMetaTeX), it's found and 
works just fine; however, when I try to compile with LuaTeX by invoking 
`context --luatex`, it can’t find the module.

Do I need to do something special to make it visible for LuaTeX? I can’t find 
the answer in the wiki.

I use standalone ConTeXt distribution.

Any help would be appreciated 


Did you run

context --generate --luatex

after adding the file?

Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-

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

maillist : ntg-context@ntg.nl / 
https://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: defining hashtag simulator

2024-05-20 Thread Hans Hagen via ntg-context

On 5/20/2024 8:01 AM, seyal.zav...@gmail.com wrote:

Thanks.

What if we want the text to be copied when it is clicked?
I found these link on the stack site for this
https://tex.stackexchange.com/questions/174637/copy-to-clipboard-feature-in-pdf-output/545107#545107

also i defined this:
\def\Hashtag#1{
 \hbox{\tfa\ctxlua{
 str = "#1"
 replacespace = string.gsub(str," ","_")

 context.letterhash()
 context(replacespace)
 }
 }
}
\starttext
\Hashtag{hello}
\stoptext

i used hbox for making phrase unbreakable.

How can you put all the code in the one Lua function and not need to put hbox 
or goto function outside of Lua?


\startluacode
interfaces.implement {
name  = "Hashtag",
public= true,
protected = true,
arguments = "string",
actions   = function(str)
context("{\\nohyphens\\letterhash %s}",string.gsub(str," ","_"))
 -- str = string.gsub(str," ","_")
 -- context.bgroup()
 -- context.nohyphens()
 -- context.letterhash()
 -- context(str)
 -- context.egroup()
end
}
\stopluacode


--

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-

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

maillist : ntg-context@ntg.nl / 
https://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: build_parshape and \getshapetext - need for a deeper understanding

2024-05-19 Thread Hans Hagen via ntg-context

On 5/19/2024 2:29 PM, garu...@azules.eu wrote:

I still get some difficulties with build_parshape, \getshapetex and sectionning.

I though I find a solution by removing \blank with
   \setuphead  [subsection]  [before=,  after=, style=, 
command=\MySubSectionCommand, alternative=text ]

But actually it's not enough : when I add text before the first section, new 
issues appear.

I tried to build a MVE by refactoring and tidying as much as I could.
It build 3 comparative pages (i) basic issue, (ii) solution, (iii) remaining 
issue.

Your guidance are most welcome :-)


you have to fight several issues:

- parshapes being reset at the end paragraph (handled here by luametatex 
context)
- parshapes operate on lines, not dimension (i might add an aletnative 
one day)

- you use a bit old mechanism (checkout the luametafun-paragraphs chapter)

Now, is there a solution? It really depends on the circumstances, so 
here is one.


\setupbodyfont[11pt]

\definemeasure [mywidth]  [7cm]
\definemeasure [mywidtha] [5cm]
\definemeasure [myheight] 
[{\the\dimexpr\baselineskip*37+\lineskip\relax}]
\definemeasure [myheighta] 
[{\the\dimexpr\baselineskip*18+\lineskip*1\relax}]
\definemeasure [myheightb] 
[{\the\dimexpr\baselineskip*25-\lineskip*1\relax}]


\startuseMPgraphic{shape:1}
  path p ;
  numeric mywidth   ; mywidth   := \measure{mywidth};
  numeric mywidtha  ; mywidtha  := \measure{mywidtha};
  numeric myheight  ; myheight  := \measure{myheight};
  numeric myheighta ; myheighta := \measure{myheighta};
  numeric myheightb ; myheightb := \measure{myheightb};
  p := (0,0)-- (mywidth,0) --
   (mywidth,myheighta)  -- (mywidtha,myheighta) --
   (mywidtha,myheightb) -- (mywidth,myheightb) --
   (mywidth,myheight)   -- (0cm,myheight) -- cycle;

build_parshape(p,0,0,0,\baselinedistance,\strutheight,\strutdepth,\topskip) 
;

  path SavedShape ; SavedShape := p ;
\stopuseMPgraphic

\startuseMPgraphic{shape:2}
  SavedShape := SavedShape shifted (0,-ypart urcorner OverlayBox) ;
  SavedShape := SavedShape shifted (0,positiony("test")) ;
  fill SavedShape withcolor red;
 setbounds currentpicture to OverlayBox;
\stopuseMPgraphic

\showframe

\defineoverlay[myoverlay][\useMPgraphic{shape:2}]

\setupbackgrounds[text][text][background=myoverlay]

\startsection[title={test}]

\startshapedparagraph[mp=shape:1]%
\setupalign[verytolerant,stretch]%
\hpos{test}{!}\samplefile{tufte}
\samplefile{tufte}
\stopshapedparagraph

\stopsection

The "test" position is hard coded but should be namespaced, the ! can be 
a \strut instead.


So, more thinking from the end of the text flow.

Hans



-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-

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

maillist : ntg-context@ntg.nl / 
https://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 is only the first frame protruding into the margin?

2024-05-18 Thread Pablo Rodriguez via ntg-context
On 5/17/24 20:46, madiazm.eo...@gmail.com wrote:
> [...]
> here is the last part of my script (the prior definitions are not
> problematic, since they worked when only using "miFuente". It seems to
> be something in "miCorm" that produces the protruding

Just a comment about typescripts.

At least in how I use ConTeXt, I live happily without having to use them.

See the following sample:

  \definefontfamily[libertin][rm][Libertinus Serif]
  \definefontfamily[libertin][ss][Libertinus Sans]
  \definefontfamily[libertin][tt][Libertinus Mono]
  \definefontfamily[cormora][rm][Cormorant]
  \setupbodyfont[cormora]
  \starttext
  \input zapf\par
  \switchtobodyfont[libertin]
  \doloopoverlist{\rm,\ss,\tt}
  {\recursestring\input zapf\par}
  \stoptext

You may define font families (which are actually typeface families).

I think they may be easier to use than typefaces.

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: Why is only the first frame protruding into the margin?

2024-05-18 Thread Pablo Rodriguez via ntg-context
On 5/17/24 20:22, madiazm.eo...@gmail.com wrote:
> thanks Pablo, but this is strange
> [...]
> The strange thing is that it is only the first section that
> protrudes, the other sections are right (as seen in the link).
> Therefore it must not be the code definition, since in that case all
> sections should protrude...
It might be a buggy code definition, but it may be only triggered by
(yet unknown) special conditions.

> Over the weekend I will slowly move my code to a new file with your
> code adding a bit everytime to try to spot the moment when I get this
> strange behaviour and then I will write again.

I hope you have already solved the issue, but I’m afraid this is the way
testing for new bugs introduced in code works.

> ps. I included the link because there is no attach option here in the
> online-mailing-list. Sorry if it not ok.
Sorry, I no Google fan. But it is essential to provide problematic code
(reduced to a minimal sample) in the messages to the list, not just the
output.

Having the sample code, others can confirm that they are able to
reproduce your issue.

It wouldn’t be the first time for issues only arising in only on a
single installation, on a single computer or on a single OS.

The mailing list (at least when sending from a real email address)
allows attachments up to 100kb. This may be enough for most minimal samples.

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 is only the first frame protruding into the margin?

2024-05-17 Thread Hans Hagen via ntg-context

On 5/17/2024 8:22 PM, madiazm.eo...@gmail.com wrote:

thanks Pablo, but this is strange

If I reproduce your code in a new file I see the perfect alignment of the frames. But I 
had changed the code in my original file as suggested by Wolfgang and I additionally 
commented all lines in the "firstHeadings" definitions following your advice 
and after compiling... the same result.

The strange thing is that it is only the first section that protrudes, the 
other sections are right (as seen in the link). Therefore it must not be the 
code definition, since in that case all sections should protrude...

Over the weekend I will slowly move my code to a new file with your code adding 
a bit everytime to try to spot the moment when I get this strange behaviour and 
then I will write again.

ps. I included the link because there is no attach option here in the 
online-mailing-list. Sorry if it not ok.
thanks
if you do something \switchtobodyfont without ever having loaded it 
(before starttext) spaces can creep in depending on what files are 
loaded for that font


also, in order to avoid grouping issues / side effects you can do this 
before \starttext:


\usebodyfont[foo]

when you use multiple bodyfont sets

Hans



-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-

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

maillist : ntg-context@ntg.nl / 
https://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 is only the first frame protruding into the margin?

2024-05-17 Thread Pablo Rodriguez via ntg-context
On 5/17/24 11:02, madiazm.eo...@gmail.com wrote:
> thanks Wolfgang for your advice and sorry for being so verbose, but
> since the margins are "included" in the problem I decided to put my
> layout there too.
>
> I made your suggested changes and unfortunately it doesnt work, but
> being a bit surprised by the margins I printed a copy of the page
> and still worse...
Hi Miguel,

this should work (also in the sense of a minimal sample):

  \showframe\showgrid
  \defineframedtext[FunnyText]
[frame=on, align=flushright,location=right]

  \def\FrameTitle#1%
  {\setMPtext{FunnyFrame}
{\hbox spread 1em{\hss\strut \color[blue]{\tfx Apartado #1}\hss}}}

  \define[2]\firstHeadings{%
\dontleavehmode \switchtobodyfont[miCorm]%
\FrameTitle#1%

\startFunnyText
  {\switchtobodyfont[miCorm,20.7pt] #2}
\stopFunnyText}

  \setuphead [section] [command=\firstHeadings, indentnext=no]

  \starttext
  \startsection[title=a]
  b
  \stopsection
  \startsection[title=a]
  b
  \stopsection
  \startsection[title=a]
  b
  \stopsection
  \stoptext

BTW, you inadvertely introduce the space here:

  \define[2]\firstHeadings{%
\dontleavehmode \switchtobodyfont[miCorm]%
\FrameTitle#1%

Unless you comment the space after the right bracket, it will be
included in your definition of first headings.

As for external downloads, better avoid unless required.

In any case, the minimal code should be part of your message.

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] expansion question

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

I have the following sample:

\setupinteraction[state=start]
\setupattachments[method=hidden]
\protected\def\PDFfile[#1]%
  {\cldcontext{file.addsuffix("#1", "pdf")}}
\starttext
  \doifelsefile{\PDFfile[xml-mkiv]}
{yes}{no}
  \attachment[file={\PDFfile[xml-mkiv]}]
\stoptext

I need the \PDFfile definition to be \protected for only one case (that
I cannot reproduce in my sample).

Is there any way to define an unprotected command and invoke it as
protected only for a particular case?

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 use fonts without typescripts?

2024-05-15 Thread Henri Menke via ntg-context
On Wed, 2024-05-15 at 20:03 +0530, Shiv Shankar Dayal wrote:
> Hi,
> 
> Defining typescripts to use a font is very painful. How can I use a
> font
> without using a typescript?

Use \definefontfamily which is essentially the successor of the old
simplefonts module.

https://wiki.contextgarden.net/Command/definefontfamily

Cheers, Henri

> 
> _
> __
> 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
> _
> __

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

2024-05-14 Thread Pablo Rodriguez via ntg-context
On 5/9/24 15:18, Pablo Rodriguez via ntg-context wrote:
> [...]
> Many thanks for your improvement, Wolfgang.
>
> It would be great to have it included in standard ConTeXt.

Hans,

many thanks for having added this to current latest (2024.05.13 19:19).

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: Fwd: outlinetext broken?

2024-05-14 Thread Hans Hagen via ntg-context

On 5/13/2024 11:54 PM, Jairo A. del Rio wrote:



-- Forwarded message -
De: *Jairo A. del Rio* >

Date: lun, 13 may 2024 a la(s) 9:53 p.m.
Subject: Re: outlinetext broken?
To: Hans Hagen mailto:j.ha...@xs4all.nl>>


Hi, Hans! Thank you for the update! I'm curious about the following 
issue: when I use Latin Modern (by default), a thick, filled line is 
drawn next to the radical. However, when I use another font such as TeX 
Gyre Schola, I get something similar to outlines-003.pdf, which is, in 
turn, similar to the result of applying PDF effects. So, shouldn't this 
result be the default? Thanks a lot again.
it depends on how a radical is composed; we try create an extensible 
using snippets which looks better in the case of fontd where rules (have 
to) have roun dcorners etc


Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-

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

maillist : ntg-context@ntg.nl / 
https://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 \inlinetypebuffer interaction

2024-05-09 Thread Pablo Rodriguez via ntg-context
On 5/9/24 12:57, Wolfgang Schuster wrote:
> Pablo Rodriguez via ntg-context schrieb am 08.05.2024 um 18:05:
>> [...]
>> Since \type doesn’t collapse hyphens, wouldn’t it be possible to add
>> \nohyphencollapsing to \typeinlinebuffer just for the sake of output
>> consistency?
>
> You can make \typeinlinebuffer behave like \type by adding a second
> initializer which besides other things prevents hyphen collapsing.
>
> buff-ver.mkxl:
>
> \protected\def\buff_verbatim_type_buffer_indeed_inline#1#2%
>{\cdef\currenttype{#1}%
> \buff_verbatim_initialize_type_one
> +  \buff_verbatim_initialize_type_two

Many thanks for your improvement, Wolfgang.

It would be great to have it included in standard ConTeXt.

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: weird \inlinetypebuffer interaction

2024-05-08 Thread Pablo Rodriguez via ntg-context
On 5/7/24 22:37, Wolfgang Schuster wrote:
> [...]
> \typebuffer disables automatic \endash and \emdash with the
> \nohyphencollapsing command
> but the command isn't used for \typeinlinebuffer.
Many thanks for your explanation, Wolfgang.

Since \type doesn’t collapse hyphens, wouldn’t it be possible to add
\nohyphencollapsing to \typeinlinebuffer just for the sake of output
consistency?

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: weird \inlinetypebuffer interaction

2024-05-07 Thread Pablo Rodriguez via ntg-context
On 5/6/24 22:45, Wolfgang Schuster wrote:
> Pablo Rodriguez via ntg-context schrieb am 06.05.2024 um 20:06:
>> Dear list,
>>
>> I have the following sample:
>>
>>\definefontfamily[mainface][tt][TeX Gyre Termes]
>
> Apply the none feature when you set the monospace font, i.e.
>
> \definefontfamily[...][tt][...][features=none]

Many thanks for your reply, Wolfgang.

This solves the issue, but I have two questions.

Why is this only required for \inlinetypebuffer and not for \typebuffer?

Which is the exact font feature that does the hyphen ligatures?

I’m interested in not disabling hz and hanging.

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] weird \inlinetypebuffer interaction

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

I have the following sample:

  \definefontfamily[mainface][tt][TeX Gyre Termes]
  \setupbodyfont[mainface]
  \starttext
  \startbuffer
  context --purgeall
  \stopbuffer
  inline \typeinlinebuffer

  block:
  \typebuffer
  \stoptext

As long as there is no defined font family for mono, \typeinlinebuffer
doesn’t convert -- into an en-dash (the same way as \typebuffer behaves).

But as in the sample above, when a font is defined for mono (at least
with \definefontfamily), \typeinlinebuffer converts -- into en-dashes
(different from \typebuffer).

Sorry, but how could I fix this \typeinlinebuffer?

This is important for me, since two hyphens is one of the most common
ways to marks options when invoking programs (which I try to explain to
others).

BTW, \sciteinlinebuffer seems have the same problem (in the scite module).

Many thanks for your help,

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

maillist : ntg-context@ntg.nl / 
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: transparent color

2024-05-06 Thread Jacob Kauffmann via ntg-context


> Am 06.05.2024 um 10:41 schrieb Hans van der Meer via ntg-context 
> :
> 
> I would like to use a transparent version of an existing color. Thus
> \definecolor[transparentcolor][color,t=0.2,a=1]
> instead of
> \definecolor[transparentcolor][r=..,g=..,b=..,t=0.2,a=1]
> because I do not know the rgb values of the color that must be made 
> transparent, only its name.
> 
> How to accomplish? 

I think like this:

\definecolor[myred][r=.5]
\defineprocesscolor[myredish][myred][a=1,t=.2]
___
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] transparent color

2024-05-06 Thread Hans van der Meer via ntg-context
I would like to use a transparent version of an existing color. Thus
\definecolor[transparentcolor][color,t=0.2,a=1]
instead of
\definecolor[transparentcolor][r=..,g=..,b=..,t=0.2,a=1]
because I do not know the rgb values of the color that must be made 
transparent, only its name.

How to accomplish? 

yours sincerely
dr. Hans van der Meer



___
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 stop ConTeXt from thinking period is at the end of a sentence?

2024-05-05 Thread Denis Maier via ntg-context


 
 
  
   https://wiki.contextgarden.net/French_spacing
   
   
   
Joel via ntg-context  hat am 05.05.2024 00:30 CEST geschrieben:

   
 

   
 



 I noticed that some code is being rendered wrong, most especially apparent in a column environment where sometimes the text can get stretched a bit more to fit the column width nicer.
 

  
 

 If a sentence says "They appeared between c. 1200 BCE and c. 1500 CE." it appears ConTeXt thinks that the period in "c." marks the end of a sentence. As such, when setting the text, sometimes it will give a large space between "c." and "1200 BCE".
 

  
 

 How do I correctly tell ConTeXt that that period doesn't mark the end of a sentence, so shouldn't be given extra space afterwards?
 

  
 

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

___
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: \par and \startlines

2024-04-30 Thread Denis Maier via ntg-context
> -Ursprüngliche Nachricht-
> Von: Wolfgang Schuster 
> Gesendet: Samstag, 27. April 2024 07:40
> An: Denis Maier 
> Cc: mailing list for ConTeXt users 
> Betreff: Re: [NTG-context] Re: \par and \startlines
> 
> Denis Maier schrieb am 26.04.2024 um 19:52:
> 
> > I see. But there's no command that could be used to simulate an empty line?
> > If not, me should I perhaps try to replicate the wrapper structure
> > from the XML source in context? (I'll also look into the format module
> > of
> > course.) What do you think?
> 
> Below is a different solution to your problem with works without \startlines
> because you already mark up each individual line in the poem which make it
> possible to add a linebreak in the output.
> 
> With \blank options (samepage) you can avoid pagebreaks between stanzas.
> 
> \startxmlsetups xml:test
>  \xmlsetsetup{#1}{*}{-}
>  \xmlsetsetup{#1}{doc|poem|stanza|line}{xml:*}
> \stopxmlsetups
> 
> \xmlregistersetup{xml:test}
> 
> \startxmlsetups xml:doc
>  \xmlflush{#1}
> \stopxmlsetups
> 
> \startxmlsetups xml:poem
>  \blank[line]
>  \xmlflush{#1}
>  \blank[back,line]
> \stopxmlsetups
> 
> \startxmlsetups xml:stanza
> \xmlflush{#1}\blank[preference,line]
> \stopxmlsetups
> 
> \startxmlsetups xml:line
>  \xmlflush{#1}\blank[samepage,none]
> \stopxmlsetups
> 
> \startbuffer[test]
> 
> 
> 
> 
> The
> lines
> are
> there!
> 
> 
> The
> lines
> are
> there!
> 
> 
> The
> lines
> are
> there!
> 
> 
> 
> \stopbuffer
> 
> \starttext
> 
> \samplefile{lorem}
> 
> \xmlprocessbuffer{test}{test}{}
> 
> \samplefile{lorem}
> 
> \stoptext

Thanks for this solution. I've had a quick look, and it seems to do exactly 
what I need. My requirements are rather simple at the moment, but that should 
be sufficient, but to repeat Hraban's question: What would be the advantage of 
using the format module? 

Thanks again for your help,
Denis


___
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: unprotecting when defining in Lua

2024-04-29 Thread Pablo Rodriguez via ntg-context
On 4/29/24 19:32, Wolfgang Schuster wrote:
> Pablo Rodriguez via ntg-context schrieb am 29.04.2024 um 18:21:
>> Is \protected the same as \unexpanded?
>
> Yes they are the same (\protected is the primitive and \unexpanded is a
> copy) but this wasn't always the case.
>
> Original TeX didn't provide a mechanism to create protected commands
> and creators of macro packages had to create their own mechanism for
> this, the ConTeXt solution was \unexpanded. With the etex extensions
> the \protected primitive was added and \unexpanded uses the new
> primitive when you used a engine which supported it.

Many thanks for your fast reply and your explanation, Wolfgang.

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: unprotecting when defining in Lua

2024-04-29 Thread Pablo Rodriguez via ntg-context
On 4/29/24 18:04, Wolfgang Schuster wrote:
> Pablo Rodriguez via ntg-context schrieb am 29.04.2024 um 17:22:
>> [...]
>> Which is the right way to use "interfaces.definecommand" to get a simple
>> command as in standard TeX?
>>
>> I mean, no a non \permanent or non \protected command.
>
> You can't create unprotected command with interfaces.definecommand
> but this not a problem because you can just use interfaces.implement
> to create your command which is then unprotected by default. Using
> implement instead of definecommand doesn't matter because
> definecommand is just a wrapper for the implement function with the
> option to create a environment.

Many thanks for your fast reply, Wolfgang.

I’m reading it now in cld-mkiv.pdf.

Is \protected the same as \unexpanded?

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] unprotecting when defining in Lua

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

I have the following sample:

  \starttext
  \startluacode
function document.test(str)
  context(str)
end

interfaces.definecommand {
  name = "testing",
  protected = false,
  macro = document.test,
}
  \stopluacode

  \meaningfull\testing

  \def\test#1{#1}

  \meaningfull\test
  \stoptext

Which is the right way to use "interfaces.definecommand" to get a simple
command as in standard TeX?

I mean, no a non \permanent or non \protected command.

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: \par and \startlines

2024-04-26 Thread Pablo Rodriguez via ntg-context
On 4/26/24 19:52, Denis Maier via ntg-context wrote:
>> Wolfgang Schuster hat am 26.04.2024 19:29 CEST geschrieben:
>> The inbetween setting works because ConTeXt checks at the start of
>> each line whether it's empty (in this case the value is used) or not.
>>
>> When you add a \par you just end the current line/paragraph and it
>> doesn't matter how many \par's you use because TeX just ignores them.
>  
> I see. But there's no command that could be used to simulate an empty line?

Crappy code:

  \starttext
  a\dorecurse{25}{\par}b
  a\dorecurse{25}{\null\par}b
  \stoptext

Just to show it could be achieved,

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: wrong spacing after command with optional arguments

2024-04-26 Thread Pablo Rodriguez via ntg-context
On 4/26/24 19:50, Wolfgang Schuster wrote:
> Pablo Rodriguez via ntg-context schrieb am 26.04.2024 um 19:04:
>> I tried this approach (I hope it isn’t wrong):
>>
>>\starttext
>>\expanded\tolerant\def\MyCommand#_#,#_#,#_#,#_{%
>
> The \expanded modifier is wrong (I guess you meant \unexpanded) but
> which check for the number of arguments you use doesn't matter in a
> document.

You are right, I meant \unexpanded.

> The LMTX version of the \iffourthargument etc. checks is the
> \ifarguments commands where you use \or to set a case for the number of
> argument passed.

Many thanks for explaining this too.

>> But what are these "#_" (which don’t seem to come from TeX)?
>
> Hans added many additions to command parameters in Luametatex and #_
> means the argument to a commands has to be enclosed in braces while #1
> allows you to pass text without it.

I get it now.

> You can find a list with all new command parameters in lowlevel-macros.pdf.

An interesting reading for the weekend.

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: \par and \startlines

2024-04-26 Thread Denis Maier via ntg-context


 
 
  
    
   
   
   
Wolfgang Schuster  hat am 26.04.2024 19:29 CEST geschrieben:

   
 

   
 
Denis Maier schrieb am 26.04.2024 um 19:18:



  
 
 
 
  Wolfgang Schuster  hat am 26.04.2024 18:24 CEST geschrieben:
  
 
   
  
 
   
  Denis Maier via ntg-context schrieb am 26.04.2024 um 18:10: 
  
  
   
   
Pablo Rodriguez via ntg-context <ntg-context@ntg.nl> hat am 26.04.2024 17:25 CEST geschrieben:

   
 

   
 

   
On 4/26/24 15:33, denis.ma...@unibe.ch wrote:



 Hi,
 



 I’m trying to typeset a poem from XML, but I can’t figure out how to
 

 make the inbetween key working here.
 



 As the source is XML, I cannot just add an empty line to start a new
 

 group of lines inside \startlines…\stoplines. I guess, there must be a
 

 command to do that, but \par seems to have no effect here.
 



 How can this be done?
 

   
Hi Denis,

   
 

   
I must confess I don’t get which is your actual question.

   
 

   
\blank works here and you know that (since you included it in your code).

   
 

   
MkIV with \par works in your sample and LMTX with \par doesn’t.

   
 

   
I wonder whether this might be a bug in LMTX.

   
 

   
Just in case it might help,

   
  
    
   
  
   Thanks for your answer and sorry for not being clearer. I was just wondering why the \par seems to have no effect. (I first guessed that it might be related to XML, to but then realized it happens with context markup as well. Usually, you won't run into this because an empty line works, but with XML that's not am option.) As you've said, it looks like a bug then.
   
  
 The lines environment treats each line of the input as paragraph by adding \par at the end of it and adding another \par makes no difference here. 
 
 BTW: ConTeXt has a module for poems which can be loaded with \usemodule[format]. 
 
 Wolfgang 
 
 
 

 Ok. I'll have a look at this module. Just two questions:
 

 1. so did this behavior change? 
 

 2. What is inbetween referring to then? If each line is a paragraph, what's this group of paragraphs then? Can you manually switch to the next one?
 

   The inbetween setting works because ConTeXt checks at the start of each line whether it's empty (in this case the value is used) or not.
   
   When you add a \par you just end the current line/paragraph and it doesn't matter how many \par's you use because TeX just ignores them.
   
   Wolfgang
   
  
    
   
  
   I see. But there's no command that could be used to simulate an empty line?
   
  
   If not, me should I perhaps try to replicate the wrapper structure from the XML source in context? (I'll also look into the format module of course.) What do you think?
   
  
    
   
  
   Thank you so much for your help.
   
  
   Best,
   
  
   Denis 
  
 

___
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: \par and \startlines

2024-04-26 Thread Denis Maier via ntg-context


 
 
  
    
   
   
   
Wolfgang Schuster  hat am 26.04.2024 18:24 CEST geschrieben:

   
 

   
 
Denis Maier via ntg-context schrieb am 26.04.2024 um 18:10:

   
  
 
 
  Pablo Rodriguez via ntg-context <ntg-context@ntg.nl> hat am 26.04.2024 17:25 CEST geschrieben:
  
 
   
  
 
   
  
 
  On 4/26/24 15:33, denis.ma...@unibe.ch wrote:
  
  
  
   Hi,
   
  
  
  
   I’m trying to typeset a poem from XML, but I can’t figure out how to
   
  
   make the inbetween key working here.
   
  
  
  
   As the source is XML, I cannot just add an empty line to start a new
   
  
   group of lines inside \startlines…\stoplines. I guess, there must be a
   
  
   command to do that, but \par seems to have no effect here.
   
  
  
  
   How can this be done?
   
  
 
  Hi Denis,
  
 
   
  
 
  I must confess I don’t get which is your actual question.
  
 
   
  
 
  \blank works here and you know that (since you included it in your code).
  
 
   
  
 
  MkIV with \par works in your sample and LMTX with \par doesn’t.
  
 
   
  
 
  I wonder whether this might be a bug in LMTX.
  
 
   
  
 
  Just in case it might help,
  
 

  
 

 Thanks for your answer and sorry for not being clearer. I was just wondering why the \par seems to have no effect. (I first guessed that it might be related to XML, to but then realized it happens with context markup as well. Usually, you won't run into this because an empty line works, but with XML that's not am option.) As you've said, it looks like a bug then.
  

   The lines environment treats each line of the input as paragraph by adding \par at the end of it and adding another \par makes no difference here.
   
   BTW: ConTeXt has a module for poems which can be loaded with \usemodule[format].
   
   Wolfgang
   
   
   
   
   
  
   Ok. I'll have a look at this module. Just two questions:
   
  
   1. so did this behavior change? 
   
  
   2. What is inbetween referring to then? If each line is a paragraph, what's this group of paragraphs then? Can you manually switch to the next one?
   
  
    
   
  
   Best,
   
  
   Denis 
  
 

___
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: wrong spacing after command with optional arguments

2024-04-26 Thread Pablo Rodriguez via ntg-context
On 4/26/24 18:18, Wolfgang Schuster wrote:
> Pablo Rodriguez via ntg-context schrieb am 26.04.2024 um 17:29:
>> What is wrong in my definition above?
>
> There is nothing wrong, this is just a side effect of the scanner used
> with the \do...groupempty commands. To have more control about this
> behavior use the \tolerant modifier for \def to change it.

Many thanks for your reply, Wolfgang.

I tried this approach (I hope it isn’t wrong):

  \starttext
  \expanded\tolerant\def\MyCommand#_#,#_#,#_#,#_{%
\doiftextelse{#4}%
  {#4}
  {\doiftextelse{#3}
{#3}
{#2}}}

  \MyCommand{}{second}{third}{fourth},\\
  \MyCommand{}{second}{third}{fourth} e,\\

  \MyCommand{}{second}{third},\\
  \MyCommand{}{second}{third} e,\\

  \MyCommand{}{second},\\
  \MyCommand{}{second} e,\\
  \stoptext

BTW, this is the first time I see #_ instead of #1.

There is no way to search for "#_" in the wiki.

Grepping the source, "#_" seems to be used for optional arguments
(mainly in syst-aux.mkxl).

But what are these "#_" (which don’t seem to come 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] Re: \par and \startlines

2024-04-26 Thread Denis Maier via ntg-context


 
 
  
    
   
   
   
Pablo Rodriguez via ntg-context <ntg-context@ntg.nl> hat am 26.04.2024 17:25 CEST geschrieben:

   
 

   
 

   
On 4/26/24 15:33, denis.ma...@unibe.ch wrote:



 Hi,
 



 I’m trying to typeset a poem from XML, but I can’t figure out how to
 

 make the inbetween key working here.
 



 As the source is XML, I cannot just add an empty line to start a new
 

 group of lines inside \startlines…\stoplines. I guess, there must be a
 

 command to do that, but \par seems to have no effect here.
 



 How can this be done?
 

   
Hi Denis,

   
 

   
I must confess I don’t get which is your actual question.

   
 

   
\blank works here and you know that (since you included it in your code).

   
 

   
MkIV with \par works in your sample and LMTX with \par doesn’t.

   
 

   
I wonder whether this might be a bug in LMTX.

   
 

   
Just in case it might help,

   
  
    
   
  
   Thanks for your answer and sorry for not being clearer. I was just wondering why the \par seems to have no effect. (I first guessed that it might be related to XML, to but then realized it happens with context markup as well. Usually, you won't run into this because an empty line works, but with XML that's not am option.) As you've said, it looks like a bug then.
   
  
    
   
  
   Thanks,
   
  
   Denis
   
   
   
 

   
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

   
___

  
 

___
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 spacing after command with optional arguments

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

I have the following sample:

  \starttext
  \def\MyCommand{\doquadruplegroupempty\doMyCommand}

  \def\doMyCommand#1#2#3#4{%
\iffourthargument
  #4%
\orelse\ifthirdargument
  #3%
\else
  #2%
\fi}

  \MyCommand{}{second}{third}{fourth},\\
  \MyCommand{}{second}{third}{fourth} e,\\

  \MyCommand{}{second}{third},\\
  \MyCommand{}{second}{third} e,\\

  \MyCommand{}{second},\\
  \MyCommand{}{second} e,\\
  \stoptext

I don‘t know why only the command gets the space after right only when
the four arguments are provided.

What is wrong in my definition above?

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: \par and \startlines

2024-04-26 Thread Pablo Rodriguez via ntg-context
On 4/26/24 15:33, denis.ma...@unibe.ch wrote:
> Hi,
>
> I’m trying to typeset a poem from XML, but I can’t figure out how to
> make the inbetween key working here.
>
> As the source is XML, I cannot just add an empty line to start a new
> group of lines inside \startlines…\stoplines. I guess, there must be a
> command to do that, but \par seems to have no effect here.
>
> How can this be done?

Hi Denis,

I must confess I don’t get which is your actual question.

\blank works here and you know that (since you included it in your code).

MkIV with \par works in your sample and LMTX with \par doesn’t.

I wonder whether this might be a bug in LMTX.

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: 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: minwidth not working ?

2024-04-22 Thread Denis Maier via ntg-context
> -Ursprüngliche Nachricht-
> Von: Wolfgang Schuster 
> Gesendet: Samstag, 20. April 2024 11:56
> An: Denis Maier 
> Cc: mailing list for ConTeXt users ; denis.ma...@unibe.ch
> Betreff: Re: [NTG-context] Re: minwidth not working ?
> 
> Denis Maier schrieb am 19.04.2024 um 22:55:
> 
> >> Wolfgang Schuster  hat am
> >> 19.04.2024 20:32 CEST geschrieben:
> >> denis.ma...@unibe.ch schrieb am 10.04.2024 um 12:47:
> >>>
> >>> Hi,
> >>>
> >>> Shouldn’t minwidth set a default minimal width for external figures?
> >>> But this here does not work
> >>>
> >>> [...]
> >>>
> >>> Am I missing something here?
> >>
> >> There are no minwidth/minheight values for \externalfigure.
> >>
> >> Wolfgang
> >>
> > So the wiki is wrong here?
> > https://wiki.contextgarden.net/Command/setupexternalfigure
> 
> Yes the comment at the end of page is wrong and the text about the strut
> setting can also be removed, only the orientation value is missing in the
> command table.
> 
> Wolfgang

Thanks you for the clarification, Wolfgang. I've changed the wiki page.
Best,
Denis

___
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-22 Thread Hans Hagen via ntg-context

On 4/22/2024 2:45 AM, 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.


I have a history text that uses ConTeXt-SBL for the citations, as such, 
it has lots of footnotes. Sometimes the footnotes are just in the main 
text, but sometimes also in figure captions, inside floats, inside 
tables that are inside floats, inside tabulations inside floats, etc.


What I find alarming is it is frequently not rendering all of the 
footnote messages at the bottom of the page. The actual footnote number 
within the body is rendered, but no number is listed in at the bottom of 
the page. So I might see a list of footnotes, for instance, on page 1, I 
only get footnotes 1, 2, 3, 5, and 6, but 4 was mysteriously skipped.



---
1 message
2 message
3 message
5 message
6 message

After a lot of trial-and-error and checking logs and checking my BibTeX 
files for errors, running everything through BibTex Tidy, etc., and 
failures to make a minimum working example, I found a single pattern:


If the footnote marker appears on the SAME page as the footnote text, it 
has no problem rendering the footnote. But, if ConTeXt decides to move a 
float a page or two later on--as it frequently seems to do---such that 
the footnote marker and footnote text at bottom of page should be on 
DIFFERENT pages, the footnote message at the bottom of the page won't 
render.


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.

you need to consider the complications of such notes ...

- tex needs to take the notes into account when determining a page break
- it does so by the insert mechanism
- when floats can't be placed they also become inserts (top and bottom)
- when there are inserts in inserts th eproblem becomes more complex (so 
notes inside floats)

- in traditional tex deeply burried inserts disappearm less so in lmtx

There are things that are hard to get right. This works:

\startpostponing
\startplacefigure[location=here,title={test \footnote{oeps 1}}]
\blackrule[width=1tw]
here
\footnote{hello 1} and
\footnote{hello 2} and
\footnote{hello 3} done
\stopplacefigure
\stoppostponing

\dorecurse{10}{\samplefile{tufte}\par}

Because here the inserts (notes) will migrate but even then one can get 
them out of order (unless we renumber, which then is sensitiev for 
oscillation).


I occasionally wonder if top floats could be done more directly but 
bottom notes still would have an out-of-sync problem





-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-

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

maillist : ntg-context@ntg.nl / 
https://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: minwidth not working ?

2024-04-19 Thread Denis Maier via ntg-context


 
 
  
    
   
   
   
Wolfgang Schuster  hat am 19.04.2024 20:32 CEST geschrieben:

   
 

   
 
denis.ma...@unibe.ch schrieb am 10.04.2024 um 12:47:


 
 Hi, 
 Shouldn’t minwidth set a default minimal width for external figures? But this here does not work 
   
 == 
 \setupexternalfigures 
   [ 
   maxwidth=\textwidth, 
   minwidth=\textwidth, 
   location={local,global,default}, 
   ] 
   
 \starttext 
   
 \externalfigure[cow.pdf] 
   
 \externalfigure[cow.pdf][width=\textwidth] 
   
 \stoptext 
 == 
   
 Am I missing something here? 
 

   There are no minwidth/minheight values for \externalfigure.
   
   Wolfgang
   
   
   
   
  
   So the wiki is wrong here? https://wiki.contextgarden.net/Command/setupexternalfigure
   
  
    
   
  
   Denis
  
 

___
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: minwidth not working ?

2024-04-19 Thread Denis Maier via ntg-context
Hi again,

 

another follow up. Can anyone confirm this issue? Is there a way to set the
minimal width of graphics?

 

Best,

Denis

 

Von: Maier, Denis Christian (UB) 
Gesendet: Mittwoch, 10. April 2024 12:47
An: ntg-context@ntg.nl
Betreff: minwidth not working ?

 

Hi,

Shouldn't minwidth set a default minimal width for external figures? But
this here does not work

 

==

\setupexternalfigures

  [

  maxwidth=\textwidth,

  minwidth=\textwidth,

  location={local,global,default},

  ]

 

\starttext

 

\externalfigure[cow.pdf]

 

\externalfigure[cow.pdf][width=\textwidth]

 

\stoptext

==

 

Am I missing something here?

 

Best, 

Denis

___
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 Denis Maier via ntg-context
Hi again,

 

just a quick follow up on this one. Can anyone reproduce this?

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.

 

Best,

Denis

 

 

Von: denisma...@mailbox.org  
Gesendet: Mittwoch, 10. April 2024 13:37
An: 'ntg-context@ntg.nl' 
Betreff: Weird (?) float placement for specific widths of image

 

Hi, 

 

another graphics/floats question: consider the following example

 

%

 

\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{A Cow}{\externalfigure[cow][width=2cm]}

 

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

 

\stoptext%

 

On the first page, the images appear stacked above each other while on the
second page they appear next to each other.

 

It took me some time to reproduce this behaviour, and I can't claim to
understand what is happening. But it seems to be related to the specific
widths of the images. When I change them to other values the behaviour
disappears. Is this a bug? Anything I can do about this?

 

Best

Denis

___
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: Customize citation format of a bibliography (use the short form as reference format)

2024-04-17 Thread Alan Braslau via ntg-context
Hello,

The APS style is an example of a number-based citation system. As you
are looking for a tag-based citation, it might be better to start with
something like the APA style.

Is there some specification for your short tag-based citation style?

Alan



On Tue, 16 Apr 2024 06:04:35 +0200
Gerion Entrup  wrote:

> Hi,
> 
> I'm trying to customize a cite format in a bibliography. Currently,
> I'm using the aps style which fits so far, except of the plain number
> as reference. In concrete, I want to change the following:
> - Use the first letter of the last name and the year as reference
> (this should be exactly the short form). It is more less also
> described here [1].
> - Highlight publications of a certain author with an extra char (e.g.
> '>')
> 
> Here is a minimal example (lets assume, every occurrence of Knuth
> should be highlighted): ```
> \setupinteraction[state=start]
> 
> \startbuffer[testdata]
> @Book{knuth1,
>   author = {Donald E. Knuth},
>   title = {TEX and METAFONT. New directions in typesetting},
>   year = {1979},
>   publisher = {Addison-Wesley},
> }
> @Article{someother,
>   author = {Some Person and Some Otherperson},
>   title = {Another title},
>   year = {1900},
> }
> \stopbuffer
> 
> % enable tracing
> \enabletrackers[publications, publications.crossref,
> publications.details, publications.cite, publications.strings]
> 
> \usebtxdataset[main][testdata.buffer]
> \usebtxdefinitions[aps]
> \setupbtx[dataset=main]
> \definebtxrendering[bibrendering][aps][dataset=main]
> 
> % this seems to have no effect?
> \setupbtx[alternative=short]
> 
> \starttext
> 
> Knuth developed \TeX \cite[knuth1].
> Several persons said something \cite[someother].
> 
> \placelistofpublications[bibrendering]
> 
> \stoptext
> ```
> 
> It should be rendered as:
> ```
> Knuth developed TeX [>Knu79].
> Several persons said something [PO00].
> 
> [Knu79]   D.E. Knuth, TEX and METAFONT. New directions in
> typesetting (Addi­son-Wesley, 1979). [PO00]   S. Person and S.
> Otherperson, Another title, (1900). ```
> 
> How can I achieve that \cite[something] always renders in the short
> form by default? How can I customize that references to Knuth contain
> this extra '>'? How can I customize the APS style to also use the
> short form in the list of publications instead of numbers?
> 
> Best
> Gerion
> 
> [1]
> https://tex.stackexchange.com/questions/295444/citation-style-with-first-letters-of-authors-lastname



-- 
Alan Braslau
816 West Mountain Avenue
Fort Collins, CO 80521 USA
mobile: (970) 237-0957

Conserve energy! ;-)
___
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: Wiki - test/proposal to further clarify documentation

2024-04-16 Thread Peter Hopcroft via ntg-context


> On 17/04/2024, at 7:11 AM, Henning Hraban Ramm  wrote:
> 
> In my poster (still WIP) I wrote:
> …

Excellent 
___
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: Is TIFF image no longer supported?

2024-04-14 Thread Denis Maier via ntg-context


 
 
  
    
   
   
   
Thomas A. Schmitz <thomas.schm...@uni-bonn.de> hat am 14.04.2024 22:18 CEST geschrieben:

   
 

   
 

   
On 4/14/24 22:11, Joel via ntg-context wrote:



 I have a document with PNG, JPG, and TIFF. When I try using
 

 \externalfigure[filename][frame=on, width=.\textwidth] it displays
 

 JPG and PNG fine, but the TIFF files don't render. Is TIFF not supported
 

 in ConTeXt anymore? --Joel
 

   
I don't think tiff has ever be supported?

   
 

   
Thomas

   
  
    
   
  
   At least, this is what 
   
  
   https://wiki.contextgarden.net/Using_Graphics says.
   
  
   But you can do implicit conversion of TIFF to PDF if you have the converter installed. (Maybe you've had that installed before?)
   
  
   Best,
   
  
   Denis
   
   
   
___

   
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

   
___

  
 

___
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: Wiki - test/proposal to further clarify documentation

2024-04-14 Thread Peter Hopcroft via ntg-context
It would be great if the main page actually said what Context does. 

> On 15/04/2024, at 2:18 AM, Henning Hraban Ramm  wrote:
> 
> Hi Garulfo,
> 
> I’m not against the “new order”, but I’d keep the colorful subject tiles. 
> Different accesses are good IMO (as long as it doesn’t get to convoluted).
> 
> I’d say updating, sorting, restructuring pages is more important than a new 
> start page.
> 
> Yes, please sort out reference vs. tutorials!
> 
> Often examples make sense in the reference pages, so the distinction is a bit 
> fuzzy, but there are enough where a subject/tutorial page would make more 
> sense than examples spread over several single command pages.
> 
> We could also define if the “main” reference page (with examples) is 
> \definestuff, \setupstuff, or \stuff – IMO \setupstuff makes the most sense, 
> since usually the others inherit from it.
> 
> Often enough, parameters aren’t explained in the reference pages; sometimes 
> you can find examples using them, but there are too many holes. I tried to 
> fix that where I could, but too often I don’t understand enough of the 
> sources to make sense of some setting.
> 
> For wiki contributors, it might make sense to combine the markup pages – in 
> many pages e.g.  is used where  would make more 
> sense; often \starttext … \stoptext is not necessary and just blows up 
> examples; markup is generally somewhat chaotic (e.g. , , or ``?).
> 
> Hraban
> 
>> Am 14.04.24 um 13:21 schrieb garu...@azules.eu:
>> I just discover the Diátaxis documentation framework :
>> - https://www.diataxis.fr/
>> - 30min video : "What nobody tells you about documentation", 
>> https://www.youtube.com/watch?v=t4vKPhjcMZg  , from Daniele Procida at PyCon 
>> 2017
>> As I understand it, it can help both readers and writers of the 
>> documentation by clarifying the purpose of each element.
>> So I started a potential new "welcome page" :  
>> https://wiki.contextgarden.net/Main_Page2
>> The main lines would be :
>> - Tutorials: installation pages, step by step examples
>> - How-to guides: most of the existing wiki pages which are not 
>> https://wiki.contextgarden.net/Commands/ ...
>> - Discussions and manuals: most of the existing manuals
>> - Reference : the pages dedicated to commands which already include link to 
>> mailing list, stack exchange, ConTeXt's source
>>   - https://wiki.contextgarden.net/Category:Commands
>>   - https://wiki.contextgarden.net/Special:PrefixIndex?prefix=Command%2F
>> To match the logic of Diátaxis, maybe some material from command pages 
>> should be moved from "Reference" to "How-to guides",
>> for example, when the examples go beyond "pure description" and begin to 
>> deal with "how-to" cases, e.g. :
>> - Reference for setuphead: https://wiki.contextgarden.net/Command/setuphead
>> - How-to guides for headings: https://wiki.contextgarden.net/Titles
>> If it make sense, and according to your feedbacks, I can continue to 
>> reallocate existing contents.
>> Thanks for your feedback and thoughts.
>> Garulfo
>> ___
>> 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
>> ___
> 
> ___
> 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
> ___
___
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: \luaescapestring in proper Lua

2024-04-11 Thread Hans Hagen via ntg-context

On 4/11/2024 5:07 PM, Pablo Rodriguez via ntg-context wrote:

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?


depends if you want it to be expandable

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-

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

maillist : ntg-context@ntg.nl / 
https://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 Hans Hagen via ntg-context

On 4/11/2024 5:25 PM, Pablo Rodriguez via ntg-context wrote:

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,

it searches for mtxrun.lua and contextl.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 ...

Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-

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

maillist : ntg-context@ntg.nl / 
https://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 Denis Maier via ntg-context
> -Ursprüngliche Nachricht-
> Von: Pablo Rodriguez via ntg-context 
> Gesendet: Donnerstag, 11. April 2024 17:26
> An: 'mailing list for ConTeXt users' 
> Cc: Pablo Rodriguez 
> Betreff: [NTG-context] Re: unknown script 'mtx-context.lua' or 'mtx-mtx-
> context.lua
> 
> 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

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...)

Thanks for your help,
Denis

___
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] Re: unknown script 'mtx-context.lua' or 'mtx-mtx-context.lua

2024-04-10 Thread Denis Maier via ntg-context
> -Ursprüngliche Nachricht-
> Von: Pablo Rodriguez via ntg-context 
> Gesendet: Mittwoch, 10. April 2024 19:35
> An: ntg-context@ntg.nl
> Cc: Pablo Rodriguez 
> Betreff: [NTG-context] Re: unknown script 'mtx-context.lua' or 'mtx-mtx-
> context.lua
> 
> 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

Thanks, Pablo. 
I've tried it, but it doesn't seem to work...

I'm getting this:

resolvers   | resolving |
resolvers   | resolving | warning: no lua configuration files found
resolvers   | resolving | no texmf paths are defined (using TEXMF)
resolvers   | resolving |
mtxrun  | the resolver databases are not present or outdated

And again:

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

Any ideas?

Best,
Denis

___
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-10 Thread Hans Hagen via ntg-context

On 4/10/2024 7:49 PM, Pablo Rodriguez via ntg-context wrote:

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 ("%?!$").

\starttext
  \startluacode
  function document.print_the_thing()
context(tokens.scanners.string())
  end
  \stopluacode

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

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

bonus:

  test!\removepunctuation ?

Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-

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

maillist : ntg-context@ntg.nl / 
https://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] unknown script 'mtx-context.lua' or 'mtx-mtx-context.lua

2024-04-10 Thread Denis Maier via ntg-context
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?

 

Best,

Denis

___
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 (?) float placement for specific widths of image

2024-04-10 Thread Denis Maier via ntg-context
Hi, 

 

another graphics/floats question: consider the following example

 

%

 

\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{A Cow}{\externalfigure[cow][width=2cm]}

 

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

 

\stoptext%

 

On the first page, the images appear stacked above each other while on the
second page they appear next to each other.

 

It took me some time to reproduce this behaviour, and I can't claim to
understand what is happening. But it seems to be related to the specific
widths of the images. When I change them to other values the behaviour
disappears. Is this a bug? Anything I can do about this?

 

Best

Denis

___
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: PDF/UA-2, WTPDF

2024-04-07 Thread Hans Hagen via ntg-context

On 4/7/2024 9:31 AM, Henning Hraban Ramm wrote:

Am 07.04.24 um 08:06 schrieb Hans Hagen:

On 4/6/2024 5:34 PM, Henning Hraban Ramm wrote:


1. PDF/UA-2
https://pdfa.org/iso-14289-2-pdfua-2/


looks likes one has to pay for it


That’s not how you promote open standards.

should have been an ecma standard instead

Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-

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

maillist : ntg-context@ntg.nl / 
https://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: what about "textdisplay"?

2024-04-02 Thread Hans Hagen via ntg-context

On 4/2/2024 7:44 AM, Henning Hraban Ramm wrote:

Am 01.04.24 um 18:54 schrieb Wolfgang Schuster:

Henning Hraban Ramm schrieb am 01.04.2024 um 18:29:

Am 01.04.24 um 18:21 schrieb Wolfgang Schuster:

Henning Hraban Ramm schrieb am 01.04.2024 um 17:19:
A while ago, I was pointed (by Wolfgang or Hans, I guess) to 
\start/stoptextdisplay to enhance whitespace handling around images.


My guess is Mikael because I saw the command the first time in the 
source of a presentation from him.


Oh, that’s probably where I saw it, too.


Here is a short example which two other solution to get a similar 
effect as \starttextdisplay.


\usemodule[visual]

\setupfloat[figure][location=left]

\starttext

\fakewords{10}{20}
\startlinecorrection
\fakeimage{4cm}{3cm}{6cm}{4cm}
\stoplinecorrection
\fakewords{10}{20}

\blank[2*line]

\fakewords{10}{20}
\startplacefigure[location={force,none}]
\fakeimage{4cm}{3cm}{6cm}{4cm}
\stopplacefigure
\fakewords{10}{20}

\blank[2*line]

\fakewords{10}{20}
\starttextdisplay
\fakeimage{4cm}{3cm}{6cm}{4cm}
\stoptextdisplay
\fakewords{10}{20}

\stoptext


Thank you!
And when would you suggest what?

A float I’d use only if I need caption/numbering or the floating feature.

When I tried line correction, it never helped; probably I used it wrong 
(e.g. around section titles).


linecorrection is older, textdisplay newer and both are mainly meant to 
position boxed content (like images) in a way so that spacing looks 
acceptable ... they are vboxes with spacing around them so not meant for 
e.g. section heads or whatever text; it's for images, framed stuff, 
maybe bTABLE etc


Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-

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

maillist : ntg-context@ntg.nl / 
https://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: San Seriffe

2024-04-01 Thread Hans Hagen via ntg-context

On 4/1/2024 3:56 PM, Henning Hraban Ramm wrote:

in honour of Knuth and the current occasion:
https://realdougwilson.com/writing/san-serriffe

the subject title suggest that you found an open type version

Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-

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

maillist : ntg-context@ntg.nl / 
https://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: Unknown units es and dk

2024-03-24 Thread Jan Ulrich Hasecke via ntg-context



Am 23.03.24 um 19:05 schrieb Hans Hagen:

The es, ts and eu are discussed here:

https://tug.org/TUGboat/tb44-2/tb137egger-edith.pdf

it also discusses how the team callibrated these units by sampling 
texies.



Ah, I see. :-)


Thanks

juh

___
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] Unknown units es and dk

2024-03-23 Thread Jan Ulrich Hasecke via ntg-context

I saw this in (the btw great) bachotex-stepbystep presentation

\definepapersize
[example]
[width=8.5es,
height=11es]


\setuptextbackground
[location=paragraph,
backgroundcolor=MyColors:4,
backgroundoffset=1dk,
frame=off]


The units "es" and "dk" are unknown to me.
What does they mean?


TIA
juh
___
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: Comments placed in the margin

2024-03-19 Thread Hans van der Meer via ntg-context
I am using: \margindata[]{group to isolate change e.g. {\rm \it etc}}

yours sincerely
dr. Hans van der Meer



> On 19 Mar 2024, at 15:38, Jeroen  wrote:
> 
> For comments that are placed in the margin, the \inleft{}, \inouter{} etc 
> will place text in the margin in bold. Can this text be placed in the margin 
> in regular text or possibly in slightly smaller font size compared to the 
> regular text in the document?
> ___
> 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
> ___

___
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: how to include an an svg file?

2024-03-15 Thread Hans Hagen via ntg-context

On 3/13/2024 9:16 AM, Henning Hraban Ramm wrote:

Am 12.03.24 um 23:59 schrieb seyal zavira:
You are correct. when i convert this svg to pdf via inkscape it works 
like a charm.


But what is standard way of including an svg file with context if we 
want to inkscape render the images?


\externalfigure[smile]

without any other settings, but inkscape must be callable on the command 
line (which doesn’t work for me on MacOS any more, must investigate…).

\startMPcode
draw lmt_svg [ filename = "smile.svg"]
\stopMPcode

Now gives the attached but it took me a while to figure out what works. 
An inkscape export adds for instance something (globally applied) that 
is not in the svg file (which actually derived from tiger.svg as 
mentioned in the file).


To be honest this is a horrible file and a good example of making things 
more complex than needed (probably common in wysiwyg applications), 
although we already had the machinery in the mp/pdf converter.


The biggest issue here is that one has to put some constrants in place 
order to make it work in e.g. sumatra (mypdf) and acrobat (which here 
actually does weird erratic things when I play with another test).


As with much complex svg, browsers also differ in interpretation o fsome 
features so it's hard to figure out what to do when there are 
conflicting demands. (Pointing to something that works tomorrow doesn't 
mean it worked when we tried to implement something yesterday.)


For Hraben - who mentioned it - i also added support for group opacity 
and transformed shades.


In the process I tried a few inkscape options (pdf export) but some 
produce faulty files (with missing stuff) so i guess we have a complex 
situation in general. That said, as long as one sticks to reliable and 
clean code (plain svg) it should mostly work out.


Text is another matter because svg dropped glyph support so now 
everything has to go through font features which in turn means that if 
one uses svg as output format one has to specify every character with 
possible abuse of a substitution feature that accesses it. So that is no 
longer a real interesting option, unless of course one exports all text 
as curves, just to be sure.


(I will extend general text suport but it will always be suboptimal but 
then, svg is not a long term archival format anyway.)


No upload yet as i also want to do some cleanup,

ps. For metapost lovers, here is some of the trickery used:

\startMPpage[offset=1ts]

draw image (
fill (unitsquare xscaled 10cm yscaled 4cm)
withcolor svgcolor(0.5,0,0)
;

registerluminositygroup ("test") (
fill (unitsquare scaled 2cm) shifted (1cm,1cm)
withshademethod "circular"
withshadecolors (.6,.1)
) ;

applyluminositygroup ("test") (
fill (unitsquare scaled 2cm) shifted (1cm,1cm)
withshademethod "circular"
) ;

draw luminositygroup (
fill (unitsquare scaled 2cm) shifted (4cm,1cm)
withshademethod "circular"
withshadecolors (.6,.1)
) (
fill (unitsquare scaled 2cm) shifted (4cm,1cm)
withshademethod "circular"
) ;

draw luminosityshade (
(unitsquare scaled 2cm) shifted (7cm,1cm)
) (
withshademethod "circular"
withshadecolors (.6,.1)
) (
withshademethod "circular"
) ;
) ;

\stopMPpage

Not that intuitive and a bit ugly deep down but it works (there was no 
need to extend mp btw as we already have graphic grouping in the engine).


Hans


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-


smile-test.pdf
Description: Adobe PDF document


luminosity.pdf
Description: Adobe PDF document
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
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: Japanese

2024-03-14 Thread Emanuel Han via ntg-context
Dear Otared,

when you read the lua code in the first \directlua{}, you should realize that 
the dimensions of almost all layout elements are depending on the value of my 
lua variable "paperSize".
Thanks to defining the paper size first in lua, I can apply calculations of 
numeric values.

The value of paperSize is later passed on to \setuppapersize via 
\setuppapersize[\directlua{tex.print(paperSize)}]
Emanuel
On März 13 2024, at 3:55 pm, Otared Kavian  wrote:
> Hi Emmanuel,
>
> Thank you so much for the new setup for writing Japanese: I tested with both 
> files, and noticed that with the new version the output looks great.
> I have a question about the code in the \directlua{} part of your setup: why, 
> for instance, the
> paperSize = « B5"
> is defined « by hand » there, instead of being retrieved from the command
> \setuppapersize[B5]
> issued by the user?
>
> Actually I am using your setup for learning Japanese, and at my beginner’s 
> level I do separate words I am learning with spaces. While with the previous 
> version of your setup the lines were breaking womewhat strangely, but now the 
> spaces between words in the output are as I intended them to be (I should 
> also Thank Wolfgang Schuster for his insight with the \script[nihongo], and 
> indeed Hans for fixing so quickly the slightest bug).
> It is really a great pleasure to be in this community where help comes from 
> everyone and features are given on demand !
> Best regards: Otared
> > On 10 Mar 2024, at 17:43, Emanuel Han via ntg-context  
> > wrote:
> >
> > Hi all,
> >
> > I added 
> > https://wiki.contextgarden.net/Chinese_Japanese_and_Korean#Meeting_the_JIS_X_4051_Requirements_for_Japanese_Text_Layout
> > with attached working example code and to-do list.
> >
> > Thanks for any contributions!
> >
> > The working example code is still a work in progress. Its text layout 
> > output meets already some of the requirements (see comments in the code). 
> > Among the ones to still be implemented are:
> >
> > • solid setting (no extra spacing between characters) 
> > https://www.w3.org/TR/jlreq/#fig1_8 if no requirement for line-adjustment 
> > https://www.w3.org/TR/jlreq/#term.line-adjustment
> > • aligning of the lines to the Kihon-hanmen (optimizing the code below in 
> > this regard)
> > • positioning and realm of headings https://www.w3.org/TR/jlreq/#fig3_1_9 
> > https://www.w3.org/TR/jlreq/#fig3_1_15 et al, and 
> > https://www.w3.org/TR/jlreq/#fig3_1_4
> > • positioning of yokugo-ruby https://www.w3.org/TR/jlreq/#fig2_3_24
> > • inline cutting note (warichu) https://www.w3.org/TR/jlreq/#fig2_4_1
> > • emphasis with sesame dot or bullet
> > • itemization https://www.w3.org/TR/jlreq/#fig2_5_6
> > • indenting of quotation paragraphs https://www.w3.org/TR/jlreq/#fig2_5_7
> > • tab setting https://www.w3.org/TR/jlreq/#fig2_6_1
> > • furiwake https://www.w3.org/TR/jlreq/#fig2_7_2
> > • jidori https://www.w3.org/TR/jlreq/#fig2_7_4
> > • math https://www.w3.org/TR/jlreq/#fig2_7_6 and 
> > https://www.w3.org/TR/jlreq/#fig2_7_62
> > • tategaki (writing vertically)
> > Best regards
> >
> > Emanuel
> > On März 2 2024, at 7:00 pm, Wolfgang Schuster 
> >  wrote:
> > Emanuel Han schrieb am 01.03.2024 um 16:23:
> >
> > Dear Wolfgang,
> >
> > thank you for your valuable remarks. I integrated them, see corrected 
> > attached example.
> >
> > Yes, correct layout examples exist. They're all showing vertical writing, 
> > but the rules and principles are exactly the same for horizontal writing.
> >
> > • position of the headers and footers: https://www.w3.org/TR/jlreq/#fig1_30
> >
> > See my attached gongitsune.tex example how you can squeeze text in a very 
> > narrow header/footer.
> >
> > • aligning lines to the text box: https://www.w3.org/TR/jlreq/#fig1_3
> >
> > You can use the lines key for \setuplayout to let ConTeXt calculate the 
> > necessary value for the text height.
> >
> > • protrusion of ruby: https://www.w3.org/TR/jlreq/#fig_ad1_6
> >
> > You're getting this for free because ruby text doesn't take up vertical 
> > space, in case vertical text is working it would now stick into the margins 
> > as expected.
> >
> > \starttext
> > \ruledhbox{a \ruby{x}{y} b}
> > \stoptext
> >
> >
> >
> > In my previous mail, I wrote wrong amounts of lines. They should be 46 
> > lines on one page, while the actual example doesn't show the 46th line.
> >
> > It would be important to identify the reason why only 24 characte

[NTG-context] Re: \intertext and highlighting with \alignhere/\breakhere

2024-03-13 Thread Hans Hagen via ntg-context

On 3/13/2024 12:26 PM, Mikael Sundqvist wrote:

Hi,

On Wed, Mar 13, 2024 at 11:37 AM Max Chernoff  wrote:


Hi Hans,

On Tue, 2024-03-12 at 15:21 +0100, Hans Hagen wrote:

the next upload will support the attached ... so no ugly hacky code needed


"\texthere[inbetween]" looks perfect, thanks!

The "\definebar[...][inlined]" doesn't look quite right though -- the
issue that I'm having is that I can't figure out how to highlight across
both sides of an \alignhere without any questionable hacks. Unless the
new "inlined" does work across an \alignhere and I'm just not seeing it
in the example.

Thanks again,
-- Max


I can confirm that it works over \alignhere. Hans is doing some black
magic, but I guess he did not want to show off by including the whole
line.

Indeed, no need to show of the obvious

\definebar
  [mybar]
  [backgroundbar]
  [height=\strutht,depth=\strutdp,offset=.250ex,color=red]

\definebar
  [yourbar]
  [backgroundbar]
  [height=\strutht,depth=\strutdp,offset=.125ex,color=blue]

\definebar
  [ourbar]
  [backgroundbar]
  [height=\strutht,depth=\strutdp,offset=.125ex,color=green]

\starttext

\startTEXpage[width=4cm]
\startformula
a \alignhere= b + c \breakhere
\mybar {d + \yourbar{e \alignhere=} f \breakhere
g \alignhere \ourbar{=} h} + i
\stopformula
\stopTEXpage

\stoptext

Especially when it would not pass the rigourous accessibility check (esp 
wrt color) of your university,


Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-


inter-001.pdf
Description: Adobe PDF document
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
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: update

2024-03-11 Thread Emanuel Han via ntg-context
Dear developers,
thanks for your hard work!

Thank you Wolfgang for the Japanese line break rule fix in line 831 of 
scrp-cjk.lua:
full_width_open = stretch_break, -- WS, was: nobreak_stretch_break_shrink,

Emanuel

On März 11 2024, at 7:23 pm, Pablo Rodriguez via ntg-context 
 wrote:
> 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
> ___
>

___
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: 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: Japanese

2024-03-10 Thread Emanuel Han via ntg-context
Hi all,

I added 
https://wiki.contextgarden.net/Chinese_Japanese_and_Korean#Meeting_the_JIS_X_4051_Requirements_for_Japanese_Text_Layout
with attached working example code and to-do list.
Thanks for any contributions!
The working example code is still a work in progress. Its text layout output 
meets already some of the requirements (see comments in the code). Among the 
ones to still be implemented are:
solid setting (no extra spacing between characters) 
https://www.w3.org/TR/jlreq/#fig1_8 if no requirement for line-adjustment 
https://www.w3.org/TR/jlreq/#term.line-adjustment
aligning of the lines to the Kihon-hanmen (optimizing the code below in this 
regard)

positioning and realm of headings https://www.w3.org/TR/jlreq/#fig3_1_9 
https://www.w3.org/TR/jlreq/#fig3_1_15 et al, and 
https://www.w3.org/TR/jlreq/#fig3_1_4

positioning of yokugo-ruby https://www.w3.org/TR/jlreq/#fig2_3_24

inline cutting note (warichu) https://www.w3.org/TR/jlreq/#fig2_4_1

emphasis with sesame dot or bullet

itemization https://www.w3.org/TR/jlreq/#fig2_5_6

indenting of quotation paragraphs https://www.w3.org/TR/jlreq/#fig2_5_7

tab setting https://www.w3.org/TR/jlreq/#fig2_6_1

furiwake https://www.w3.org/TR/jlreq/#fig2_7_2

jidori https://www.w3.org/TR/jlreq/#fig2_7_4

math https://www.w3.org/TR/jlreq/#fig2_7_6 and 
https://www.w3.org/TR/jlreq/#fig2_7_62

tategaki (writing vertically)

Best regards

Emanuel
On März 2 2024, at 7:00 pm, Wolfgang Schuster 
 wrote:
> Emanuel Han schrieb am 01.03.2024 um 16:23:
> >
> > Dear Wolfgang,
> > thank you for your valuable remarks. I integrated them, see corrected 
> > attached example.
> > Yes, correct layout examples exist. They're all showing vertical writing, 
> > but the rules and principles are exactly the same for horizontal writing.
> > position of the headers and footers: https://www.w3.org/TR/jlreq/#fig1_30
> See my attached gongitsune.tex example how you can squeeze text in a very 
> narrow header/footer.
> > aligning lines to the text box: https://www.w3.org/TR/jlreq/#fig1_3
> You can use the lines key for \setuplayout to let ConTeXt calculate the 
> necessary value for the text height.
> > protrusion of ruby: https://www.w3.org/TR/jlreq/#fig_ad1_6
> You're getting this for free because ruby text doesn't take up vertical 
> space, in case vertical text is working it would now stick into the margins 
> as expected.
> \starttext
> \ruledhbox{a \ruby{x}{y} b}
> \stoptext
>
>
> >
> > In my previous mail, I wrote wrong amounts of lines. They should be 46 
> > lines on one page, while the actual example doesn't show the 46th line.
> > It would be important to identify the reason why only 24 characters are 
> > used to create a line when 25 could be used. Then we can develop a method 
> > to turn that mechanism off or circumvent it.
> > Quotation from https://www.w3.org/TR/jlreq:
> > In principle, when composing a line with ideographic (cl-19) 
> > (https://www.w3.org/TR/jlreq/#cl-19), hiragana (cl-15) 
> > (https://www.w3.org/TR/jlreq/#cl-15) and katakana (cl-16) 
> > (https://www.w3.org/TR/jlreq/#cl-16) characters, no extra spacing appears 
> > between their character frame 
> > (https://www.w3.org/TR/jlreq/#term.character-frame). This is called solid 
> > setting (see Figure 5 (https://www.w3.org/TR/jlreq/#fig1_8)).
>
>
> 1. ConTeXt has a mechanism to typeset Japanese texts.
> 2. There are flaws in the output it produces but this nothing which can't be 
> fixed.
> 3. To fix the problems someone has to be passionate to fix them and we're 
> willing to help here.
> As you can see in my second example file japanese.tex there is a font feature 
> to create half sized parentheses etc. which isn't supported yet by ConTeXt's 
> mechanism for japanese and in case your willing to improve it this should be 
> taken care of as well.
> Wolfgang

japanese_mwe.tex
Description: TeX document
___
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 Hans Hagen via ntg-context

On 3/10/2024 9:32 AM, Pablo Rodriguez via ntg-context wrote:

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,

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


\starttext

test {\glyphscale 2000 test \glyphscale \numericscaled1.2\glyphscale 
test} test


test {\glyphslant  500 test \glyphslant \numericscaled2.0\glyphslant 
test} test


test {\glyphweight 100 test \glyphweight\numericscaled2.0\glyphweight 
test} test


\stoptext

which you will now wikify ...

Hans


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-

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

maillist : ntg-context@ntg.nl / 
https://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 can I do this?

2024-03-10 Thread Hans Hagen via ntg-context

On 3/8/2024 6:36 PM, Henning Hraban Ramm wrote:

Am 08.03.24 um 17:56 schrieb Otared Kavian:

Hi Ursula,

The reason for which you did not get the expected result is that you 
have « } » missing in your file, that is the closing brace after your 
italic command

« {\it » at the end of your document.
Moreover you did not have a \stoptext in your file, and a math command 
« \m » was not written correctly. Talking of math, I personnaly prefer 
to enclose in-line math between dollar signs $, that is writing « 
$\exists x \in H$ » instead of  « \m{\exists x \in H} ».


Well, better stay with the modern ConTeXt approach of \m{}.
for regular inline math we just use \im{...} (which has an \dm{...} 
companion with displaystyle


Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-

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

maillist : ntg-context@ntg.nl / 
https://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] multicolumn title and abstact (bachotex) using tugboat.mkxl

2024-03-07 Thread Damien Thiriet via ntg-context

Hello,


I am currently writing my paper for last year's BachoTeX proceedings.
I am using tugboat.mkxl module to design the layout.

In bachotex proceedings, the author's data and abstract are on a single 
column and the article is usually typeset on two columns.

Comments in tugboat.mkxl states:

%D We have several column mechanisms and they all serve a different 
purpose. Here we
%D use pagecolumns. They support much of what we can do in single 
columns, but of
%D course there are exceptions. Floats can go into columns of aremoved 
to the top or
%D bottom when there is no room. We don't span mid column. Notes can go 
in columns
%D or at the end. We can start with a single column (for titles and 
such).


I can't figure out which part of the file should be used/adapted to 
start with a single column.
What I did is to put datas and abstract in a frame and use \placefigure. 
As stated in pagecolumns
manual, everything is put on the top of next page. (BTW, there is a 
typo: «of aremoved»)


I don't know, whether this MWE helps is relevant, but just in case, here 
is what I did:


* copy tugboat.mkxl to a new file p-bachotex.mkxl
* changed p-bachotex.mkxl like this:

\startsetups bachotex:naglowek:columns
\defineframedtext [Dane]
\setupframedtext
[Dane]
[width=18cm ,
 align=normal,
 frame=no]
\definenarrower
[Streszczenia]
[2*middle]

\startplacefigure [location={here,none}]
{\startDane
{\tfa\getvariable{tugboat}{author}}\par
\getvariable{tugboat}{address}\par
{\tt\getvariable{tugboat}{email}}\par

\startStreszczenia
\doifelsebufferempty {abstract} {
% no abstract
} {
\blank[line]

\enforced\let\\\endgraf
\setups[tugboat:abstract:setup]
\startAbstracts[title={Abstract}]
\stopAbstracts
}
\stopStreszczenia
\stopDane}
\stopplacefigure
\stopsetups

\startsetups tugboat:article:start

  \starttext

\setups{tugboat:columns:presets}

\setups{tugboat:banner:setup:\getvariable{tugboat}{type}}

\setupheadertexts
[\setups{tugboat:banner:text:article}]
[pagenumber]

\setuppagenumber
[number=\getvariable{tugboat}{page}]

\startmode[columns]
\startpagecolumns
\stopmode

\setups[tugboat:introduction:article]
\doifmodeelse{columns}{
\setups{bachotex:naglowek:columns}
} {
\setups{bachotex:naglowek:nocolumns}
}

\stopsetups

My article begins so:

\enablemode [columns]
\usemodule [bachotex]

% skipped tugboat variables for this MWE

\StartAbstract
  \input tufte
\StopAbstract
\StartArticle
   \input knuth
\StopArticle

Thank you for your help

Damien T
___
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
___


  1   2   3   4   5   6   7   8   9   10   >