[NTG-context] Re: Scale notation base on current font

2024-06-08 Thread Pablo Rodriguez via ntg-context
On 6/8/24 17:09, seyal zavira wrote:
> Thanks
>
> sorry for incomplete example
> the code below shows the problem better:
> \setupinteraction[state=start]

As for the color, it is caused by \setupinteraction.

You can remove it with:

  \setupinteraction[state=start, style=, color=, contrastcolor=,]

This disables default style and color in links (footnote markers are links).

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: Scale notation base on current font

2024-06-08 Thread vm via ntg-context




On 08/06/2024 13:16, seyal.zav...@gmail.com wrote:

\definenote[Mynote][location=text,before={},]
\setupnote[Mynote]
 [location=left,
  textcommand= \scale [height=0.7ex] \raise 0.2ex\hbox,
 ]
\starttext
hello \Mynote{refrence}
\placenotes[Mynote]
\stoptext



add {} this works:

\setupnote[Mnote]
[location=left,
textcommand={\scale[height=0.7ex] \raise 0.2ex\hbox},
]

___
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: Scale notation base on current font

2024-06-08 Thread Pablo Rodriguez via ntg-context
On 6/8/24 13:16, seyal.zav...@gmail.com wrote:
> Hi all,
>
> There's a problem when I want to define the note so that it's
> displayed according to the size and font of the text:

Not sure I’m getting your point.

But this should show a difference in font size:

  \definenote[Mynote]
  \starttext
  \color[green]{\tfd hello \Mynote{refrence} not really required}

  \switchtobodyfont[36pt]
  \color[green]{hello \Mynote{refrence} not really required}
  \stoptext

> but i cannot set it for \tfxx.
> also it's relative to my main body font, and my current font andI
> color doesn't apply to text.
> for example if my current text has color red with another font the
> note doesn't change according to it, and will display identical
> everywhere.

Could you show how the second paragraph above doesn‘t inherit both size
and color from the current font?

Sorry, otherwise I simply don’t get it.

> And when I try to define it like this MWE:
>
> \definenote[Mynote][location=text,before={},]
> \setupnote[Mynote]
> [location=left,
>  textcommand= \scale [height=0.7ex] \raise 0.2ex\hbox,
> ]

I don’t think the text command value is right.

Besides, if you intend the second paragraph from the sample, this
approach looks unnecessarily complex for me.

I hope it might help,

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

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


[NTG-context] Re: ConTeXt source from XML

2024-06-08 Thread Pablo Rodriguez via ntg-context
On 6/8/24 09:49, Wolfgang Schuster wrote:
> Denis Maier via ntg-context schrieb am 08.06.2024 um 09:14:
>> [...] 
>> Hi,
>> I've read Thomas Schmitt's My Way as an excellent introduction in XML
>> processing with ConteXt, but I can't find it anywhere anymore... Does
>> anyone know what happened to it?
>
> https://wiki.contextgarden.net/images/8/8c/xhtml.pdf

Many thanks for the new reference, Wolfgang.

Many thanks for mentioning it, Denis.

I’m going to fix the wiki links right now
(https://wiki.contextgarden.net/XML).

Many thanks again,

Pablo

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

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


[NTG-context] Re: ConTeXt source from XML

2024-06-08 Thread Pablo Rodriguez via ntg-context
On 6/8/24 10:49, vm via ntg-context wrote:
> in the document
> https://wiki.contextgarden.net/images/8/8c/xhtml.pdf
>
> near the end an essential line got truncated:
> [...]
> how should this line continue ?
> {\externalfigure[\xmlatt{#1}{src}][width=\ctxlua{getmeas("\xmla

As this comes from
https://wiki.contextgarden.net/images/8/8c/xhtml.pdf#page=16 and it
seems to be previously defined on This comes from
https://wiki.contextgarden.net/images/8/8c/xhtml.pdf#page=10, I would say:

  \startxmlsetups xml:img
\placefigure
 [here]
 [\xmlatt{#1}{src}]
   {\xmlatt{#1}{alt}}
   {\externalfigure[\xmlatt{#1}{src}]
 [width=\ctxlua{getmeas("\xmlatt{#1}{width}")}]}
  \stopxmlsetups

But this is my uneducated guess (and not having checked whehter this may
make sense).

Just in case it might help,

Pablo

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

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


[NTG-context] Re: ConTeXt source from XML

2024-06-08 Thread vm via ntg-context

in the document
https://wiki.contextgarden.net/images/8/8c/xhtml.pdf

near the end an essential line got truncated:

\startxmlsetups xml:img
\placefigure[here]
[\xmlatt{#1}{src}]
{\xmlatt{#1}{alt}}
{\externalfigure[\xmlatt{#1}{src}][width=\ctxlua{getmeas("\xmla
\stopxmlsetups




how should this line continue ?
{\externalfigure[\xmlatt{#1}{src}][width=\ctxlua{getmeas("\xmla



.F
___
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 source from XML

2024-06-08 Thread Denis Maier via ntg-context


 
 
  
    
   
   
   
Pablo Rodriguez via ntg-context <ntg-context@ntg.nl> hat am 07.06.2024 21:41 CEST geschrieben:

   
 

   
 

   
Again, xml-mkiv.pdf is documenting the way of handling XML in ConTeXt

   
and it has to be written that way.

   
 

   
It is part of our task (the one reserved to final users) to compose a

   
proper introduction on how to typeset XML sources with ConTeXt.

   
 

   
Borrowing the title from other work, “XML in Proper ConTeXt” (actually

   
taken from https://www.berenddeboer.net/tex/LaTeX2ConTeXt.pdf).

   
 

   
 

   
  
    
   
  
   Hi,
   
  
   I've read Thomas Schmitt's My Way as an excellent introduction in XML processing with ConteXt, but I can't find it anywhere anymore... Does anyone know what happened to it?
   
  
    
   
  
   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: ConTeXt source from XML

2024-06-07 Thread Pablo Rodriguez via ntg-context
On 6/6/24 22:53, Christoph Edenhauser wrote:
>> [...]
>> XPath seems to have as it primary purpose to address the nodes of XML trees.
>> [...]
>> If you don’t want this to happen, you have to encode them in the TEI XML
>> sources.
>
> In my case, the connection to the original source will be lost.  While
> we will still try to backport corrections, the connection will be lost
> at the very moment when we will annotate the source text.

Dear Christoph,

well, in your case, your source will be a new one, the annotated one.

> At the moment I'm leaning strongly towards TEI, also because I could try
> to remove the annotations via XSLT once the work is complete, diff the
> result with the original source and improve it). And besides,
> XML+ConTeXt looks quite elegant from the distance of my ignorance.

If you are familiar with XSLT (and XPath), you will have no problem
typesetting XML sources with ConTeXt.

> (Although reading xml-mkiv.pdf creates a pleasant frictional heat in my
> cerebral convolutions, but leaves at least as many knots in them as XML
> data have nodes).

Well, xml-mkiv.pdf isn’t exactly a piece of cake. It isn’t an
introduction and it has to be written that way.

After trying to read it for the n-th time and having learnt only very
little from it (exclusively my fault), I think it assumes a good XPath
background.

Again, xml-mkiv.pdf is documenting the way of handling XML in ConTeXt
and it has to be written that way.

It is part of our task (the one reserved to final users) to compose a
proper introduction on how to typeset XML sources with ConTeXt.

Borrowing the title from other work, “XML in Proper ConTeXt” (actually
taken from https://www.berenddeboer.net/tex/LaTeX2ConTeXt.pdf).

All I can say is that I have read xml-mkiv.pdf and I know I will learn
way more from this document than the huge amount of things I have
already discovered reading it.

>> [...]
>> Having the text properly formatted and printed on paper helps a lot to
>> spot errors.
>
> Same here: It's the paper!
> (I for myself prefer for the first proof reading a page lots of white
> space, in monospaced font like Courier, while my proofreader wants to
> see the font that will be used in the end.)

Sorry for insisting. If the text is not fully formated, it is very easy
to overlook formatting errors with commands (or simple errors with
commands directly).

The most basic sample may read (wrong spacing after command):

  \starttext
\ConTeXt is awesome!
  \stoptext

This is one in a bunch of errors that may be unnoticed.

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: missing space with French quotation

2024-06-07 Thread Alan Braslau via ntg-context
I have *never* understood how this works and, in fact, have always done
weird stuff like explicitly putting a nbps before double punctuation
(:;) in my document sources. I do this as it makes the sources much
more readable, preventing my text editor from ever breaking lines
before the punctuation (and not having some space in the source looks
awkward when reading French text).

I use:

\setupcharacterspacing
  [frenchpunctuation]
  [language=fr]
\mainlanguage [fr]
\setcharacterspacing [frenchpunctuation] % why necessary?
\setupitemize [symbol=2] % dash rather than bullet

This gives proper spacing with \quotation{} and with \startquotation
... \stopquotation. Also, {\en\quotation{}} and {\de\quotation{}} in
the document correctly do not add spaces.


Is \setupquotation[symstyle=\resetcharacterspacing]
necessary?

Alan



On Fri, 7 Jun 2024 14:18:19 +0200
Wolfgang Schuster  wrote:

> Peter Münster schrieb am 07.06.2024 um 13:31:
> > On Thu, May 30 2024, Peter Münster wrote:
> >   
> >> \mainlanguage[fr]
> >> \setcharacterspacing[frenchpunctuation]
> >> \starttext
> >> bla \quotation{OK} bla\\
> >> bla «OK» bla
> >> \startquotation
> >>Not Ok: a space is missing
> >> \stopquotation
> >> \stoptext  
> > 
> > It seems, that this workaround solves the problem:
> > \setupquotation[before={\setcharacterspacing[reset]}]  
> 
> 
> The quotation environment doesn't rely on the characterspacing
> mechanism to add the spaces before and the after the quotes but uses
> language dependent skips.
> 
> The example below shows how it works and where it fails when you use 
> characterspacing. Resetting spacing (and probably other settings like 
> charcterkerning etc.) when the quotes are added as you noticed fixes
> the problem.
> 
>  begin example
> \starttext
> 
> \dontleavehmode
> \hbox{«\hspace[fr][quotation]}%
> xxx%
> \hbox{\hspace[fr][quotation]»}
> 
> \setcharacterspacing[frenchpunctuation]
> 
> \dontleavehmode
> \hbox{«\hspace[fr][quotation]}%
> xxx%
> \hbox{\hspace[fr][quotation]»}
> 
> \dontleavehmode
> \hbox{\expand\everyresettypesetting\relax «\hspace[fr][quotation]}%
> xxx%
> \hbox{\expand\everyresettypesetting\relax \hspace[fr][quotation]»}
> 
> \stoptext
>  end example
> 
> > What do you think about it? Is this the right way to do it?  
> 
> I would use the symstyle key as hook to disable charcterspacing for
> the quotes in the environment.
> 
>  begin example
> \mainlanguage[fr]
> 
> \setcharacterspacing[frenchpunctuation]
> 
> 

> 
> \starttext
> 
> «xxx»
> 
> \startquotation xxx\stopquotation
> 
> \stoptext
>  end example
> 
> Wolfgang
> ___
> 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: ConTeXt source from XML

2024-06-06 Thread Hans Hagen via ntg-context

On 6/6/2024 5:33 PM, Pablo Rodriguez via ntg-context wrote:

On 6/5/24 20:23, Christoph Edenhauser wrote:

Dear Pablo,

Thank you very much for your very clear, detailed and elaborate
explanations.  - Over the next few days I will meditate on the ConTeXt
way to handle XML and on my workflow and take a look at lpath (never
heard of it). And somehow I have the impression that the next few days
will last a few weeks.


Dear Christoph,

just in case it might help to your meditation.

First of all, lpaths are XPath implemented with Lua in ConTeXt.

XPath seems to have as it primary purpose to address the nodes of XML trees.

About your sources, the real issue here is to define whether you want
TEI or TeX to be the format containing them.

I mean, if you add explaining footnotes to your TeX file(s), XML won’t
be source anymore.

If you don’t want this to happen, you have to encode them in the TEI XML
sources.

One last suggestion about proofreading. This is something I learnt from
personal experience.

The first reading is much better to catch errors in the text than the
subsequent ones.

Having the text properly formatted and printed on paper helps a lot to
spot errors.

Reading source code is cheaper (no doubt), but the results will be
poorer too.

Just in case it might help,
fwiw, context supports 'synctex' to xml files / nodes so that might help 
a bit


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 source from XML

2024-06-06 Thread Pablo Rodriguez via ntg-context
On 6/5/24 20:23, Christoph Edenhauser wrote:
> Dear Pablo,
>
> Thank you very much for your very clear, detailed and elaborate
> explanations.  - Over the next few days I will meditate on the ConTeXt
> way to handle XML and on my workflow and take a look at lpath (never
> heard of it). And somehow I have the impression that the next few days
> will last a few weeks.

Dear Christoph,

just in case it might help to your meditation.

First of all, lpaths are XPath implemented with Lua in ConTeXt.

XPath seems to have as it primary purpose to address the nodes of XML trees.

About your sources, the real issue here is to define whether you want
TEI or TeX to be the format containing them.

I mean, if you add explaining footnotes to your TeX file(s), XML won’t
be source anymore.

If you don’t want this to happen, you have to encode them in the TEI XML
sources.

One last suggestion about proofreading. This is something I learnt from
personal experience.

The first reading is much better to catch errors in the text than the
subsequent ones.

Having the text properly formatted and printed on paper helps a lot to
spot errors.

Reading source code is cheaper (no doubt), but the results will be
poorer too.

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: Combine \setupdelimitedtext with an author (define custom variable?)

2024-06-06 Thread Hans Hagen via ntg-context

On 6/6/2024 4:34 PM, Wolfgang Schuster wrote:

Gerion Entrup schrieb am 06.06.2024 um 12:30:

Hi,

I like to achieve something that looks like this:
```
\definedelimitedtext[extract][blockquote]
\setupdelimitedtext
   [extract]
   [leftmargin=1.5pc,
    style={\italic},
    before={\setupindenting[next]},
    after={\blank[1ex] \hrule \blank[1ex] \startalignment[flushright] 
\tfx\italic{René Descartes} \stopalignment}]


\starttext
\startextract
 Cogito ergo sum.
\stopextract
\stoptext
```

So it should setup a quotation and mentions the author.
However, here the author is hardcoded within the blockquote. I would 
like it to use like this:

```
\definedelimitedtext[extract][blockquote]
\setupdelimitedtext
   [extract]
   [leftmargin=1.5pc,
    style={\italic},
    before={\setupindenting[next]},
    after={\blank[1ex] \hrule \blank[1ex] \startalignment[flushright] 
\tfx\italic{\getcustomvariable{author}} \stopalignment}]


\starttext
\startextract[author=René Descartes]
 Cogito ergo sum.
\stopextract
\stoptext
```

Is there an easy way to achieve that?
I tried with \structureuservariable (like possible in \startchapter) 
but it does not work.


\startsetups [userdata:extract]
     \startnarrower
     \setupindenting[next]
     \getuserdata
     \hairline
     \dontleavehmode\wordright{\itx\userdataparameter{author}}
     \stopnarrower
\stopsetups

\defineuserdataalternative
   [extract]
   [renderingsetup=userdata:extract]

\defineuserdata
   [extract]
   [style=italic,
    alternative=extract]

\starttext

\startextract[author=René Descartes]
     Cogito ergo sum.
\stopextract

\stoptext
ah, i start forgetting about these mechanisms ... i added this example 
to th etest suite


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: Combine \setupdelimitedtext with an author (define custom variable?)

2024-06-06 Thread Hans Hagen via ntg-context

On 6/6/2024 12:30 PM, Gerion Entrup wrote:

Hi,

I like to achieve something that looks like this:
```
\definedelimitedtext[extract][blockquote]
\setupdelimitedtext
   [extract]
   [leftmargin=1.5pc,
style={\italic},
before={\setupindenting[next]},
after={\blank[1ex] \hrule \blank[1ex] \startalignment[flushright] 
\tfx\italic{René Descartes} \stopalignment}]

\starttext
\startextract
 Cogito ergo sum.
\stopextract
\stoptext
```

So it should setup a quotation and mentions the author.
However, here the author is hardcoded within the blockquote. I would like it to 
use like this:
```
\definedelimitedtext[extract][blockquote]
\setupdelimitedtext
   [extract]
   [leftmargin=1.5pc,
style={\italic},
before={\setupindenting[next]},
after={\blank[1ex] \hrule \blank[1ex] \startalignment[flushright] 
\tfx\italic{\getcustomvariable{author}} \stopalignment}]

\starttext
\startextract[author=René Descartes]
 Cogito ergo sum.
\stopextract
\stoptext
```

Is there an easy way to achieve that?
I tried with \structureuservariable (like possible in \startchapter) but it 
does not work.


not all constructs hav ethese user variables (yet)

i'll add an option for arguments tostart/stop so that you can do

\starttext

\definedelimitedtext
  [dextract]
  [blockquote]
  [leftmargin=1.5pc,
   style=italic,
   before=\setupindenting[next],
   after=\setups{extract:whatever}]

\definestartstop
  [extract]
  [arguments=yes,
   before=\setups{extract:start},
   after=\setups{extract:stop}]

\startsetups extract:start
\startdextract
\stopsetups

\startsetups extract:stop
\startstopparameter{author}
\stopdextract
\blank[1ex,samepage]
\hrule
\blank[1ex,samepage]
\dontleavehmode
\wordright{\itx\startstopparameter{author}}
\stopsetups

\starttext

\startextract[author=René Descartes]
Cogito ergo sum.
\stopextract

\stoptext

but first i want Wolfgang to check the patch,

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 source from XML

2024-06-05 Thread Pablo Rodriguez via ntg-context
On 6/4/24 22:09, Hans Hagen wrote:
> [...]
> There is a xml-mkiv-tricks.tex file in the distribution (no pdf is
> seems so I need to add that one.)

Hans,

sorry, I forgot to reply earlier.

I think this is already included in
https://www.pragma-ade.com/general/manuals/xml-mkiv.pdf#page=53 (as
chapter 5 from xml-mkiv.pdf).

The file from the distribution is the same as the one online (same
SHA512, just in 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: ConTeXt source from XML

2024-06-05 Thread Pablo Rodriguez via ntg-context
On 6/5/24 12:00, Christoph Edenhauser wrote:
> [...]
> I realise that it is somehow difficult for me to describe what I would
> like to achieve, perhaps what I have in mind is not even possible.

Hi Christoph,

as far as I know (and as Hraban has already mentioned), this is not
possible.

Either XSLT or pandoc would be a way to do that.

That being said, I would avoid conversion (a second source) in all cases.

I use ConTeXt to typeset XML sources typing Markdown sources.

pandoc generates XML and then ConTeXt typesets these XML sources.

> My Question is, is it possible to generate a second context file2.tex
> with the help of this first xml-mapping file1.tex, where all the
> xml-nodes from the xml file are mapped to contex commands which then
> looks something like this:

I‘m afraid this is not possible (it works in a different way)

> I would then like to edit the Text in such a more "TeXish" result 
> manually, e.g. insert small spaces as in ‘St.\,Martin’, explain unknown
> words in \footnote{comment}, etc.

Different spaces are Unicode characters. As entities,  or 
(narrow no-breaking space and thin space, respectively).

> I know you could or even should do the text corrections in the xml file,
> but XML would overwhelm my proofreader. (He has learnt to leave LaTeX
> code untouched, that should then work with ConTeXt code as well). So for
> me, the main reason for having a TeX-ish file2.tex is, that the Text
> could be corrected directly from the proofreader in this file2.tex file,
> but won't do that in the xml file.

I don’t mean the proofreader personally, but TeX code may not be
inherenlty more readable that XML code.

Compile the following:

  \starttext
  \startXML
  
  St.Martin
  A comprehensive treatise
  The medieval part of the church
  \stopXML

  \startTEX
  \starttext
  \startchapter[title=St.\, Martin] \stopchapter
  \startsection[title=The medieval part of the church]\stopsection
  \stoptext
  \stopTEX
  \stoptext

I think that a text editor with reasonable highlighting for XML is key
to your issue.

I mean, XML sources tend to be highlighted leaving pure text as
uncolored and unformatted (no bold or italics).

In that case, I think the text to be proofread may be recognized as not
having any format at all (besides not enclosed inside "<" and ">").

> And now a second approach to my question:
> Are all these \startxmlsetups like '\startxmlsetup xml:chapter'
> internally mapped to standard context commands like \startchapter
> ... \stopchapter before they are converted to pdf?

No, these are formatting commands after the mapping.

In short, there are three steps involved in XML typesetting.

First, you select which elements you would like to select from the XML
source in an XML setup (with a mapping to your configuration commands).

Second, you register this XML setup.

Third, your configure the selected elements with ConTeXt commands.

Here is a sample (using a buffer instead of an external file):

  \startbuffer[demo]
  
 line 1
 line 2
 line 3
  
  \stopbuffer

  \starttext

  \startxmlsetups abc:def
\xmlsetsetup{#1}{foo|bar}{xyz:*}
  \stopxmlsetups

  \xmlregistersetup{abc:def}

  \startxmlsetups xyz:foo
\xmlflush{#1}
  \stopxmlsetups

  \startxmlsetups xyz:bar
\startparagraph
  \xmlflush{#1}
\stopparagraph
  \stopxmlsetups

  \xmlprocessbuffer{main}{demo}{}

  \stoptext

First of all, XML has no hardcoded names for any element (from a certain
point of view, XML are only rules on how to use the "<>" tags).

This is why,  and  are perfectly valid element names (although
they have no meaning for people).

Second, the mapping may use any name for destination setups.

\xmlsetsetup does the mappings, the second group of parentheses contains
the lpath (an Lua version of XPath [how XML is selected]) and the third
group of parentheses is setups.

The command \xmlsetsetup{#1}{foo|bar}{xyz:*} above is bound to existing
elements (or paths) in the XML source, but both "xyz:foo" and "xzy:bar"
may read as the user wants.

Third, after that you need specify the setup for each mapping (or it
won’t appear in your final document).

The setup is what you defined as the second part of the mapping, may it
be "xml:title" or "xyz:bar".

Nothing here is hardcoded. XML is not HTML (elements with meaning).

In order to deal with XML, ConTeXt has to provide the tools to select
elements (and more complex constructs) and map them to configurable setups.

How both tools (construct selection and setup configurations) may be
deployed, this is up to each individual.

Hardcoding this would be a real problem in the short run.

> If this is the case, can this intermediate context representation be
> exported, and how would this be done?

Nice try, but I’m afraid this is not how it works.

I hope my explanation may be minimally c

[NTG-context] Re: Vanishing floats with location=split and \start ... \stopsplittext within

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

On 6/4/2024 3:57 PM, Давыдов, Кирилл Александрович wrote:

Greetings,

I have run into an issue whilst using \start ... \stopsplittext. I 
intended to use it for large code listings (using the t-vim module), 
however floats with location=split using that environment seem to vanish 
if there is nearly not enough text before the float to fill a page. Not 
only that, a second float like that seems to lead to fatal errors 
related to an unclosed group, however the document compiles regardless. 
The following MWE is an example of this. I am using ConTeXt version 
2024.05.27 18:16.


\definefloat[codelisting][codelistings]
\setupcaption[codelisting][location=top]
\setuplabeltext[english][codelisting=Listing ]

%\showboxes
\starttext

\input knuth
\input knuth
\input knuth
\input knuth
% Filler. Filler. Filler. Filler. % uncomment to push out a full page. 
the float will appear


\startplacecodelisting[
     title=My great C program on display!,
     location=split,
]
\startsplittext
\tt \input zapf
\stopsplittext
\stopplacecodelisting

\input ward

\startplacecodelisting[
     title=My second great C program on display!,
     location=split,
]
\startsplittext
\tt \input ward
\stopsplittext

\stoptext

On a related note, one can also observe that with specific amounts of 
text a float may end up being split in two on a single page, however I 
could not replicate it. Additionally, code listings done with t-vim's 
commands seem to lose line numbering within \start ... \stopsplittext in 
splittable floats, but I figure that's more on the module authors. In 
any case, is there more I can do other than not use floats for code 
listings?

best add a missing \stopplacecodelisting

-
  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 source from XML

2024-06-04 Thread Pablo Rodriguez via ntg-context
On 6/4/24 13:51, Christoph Edenhauser wrote:
> Dear list,
>
> I am currently trying to get into Context and XML. I would like to do
> the typographical fine-tuning in Context and not in the XML document. My
> question is: Is it possible to have ConTeXt output a (preliminary)
> ConTeXt file instead of typesetting a PDF file, for further editing?

Hi Christoph,

not clear to me whether you meant an environment (a format file) with
the ConTeXt generated file.

In that case, this might help:

  context --extra=xml --analyze --template your-file.xml

With that template, you may run:

  context --environment=xml-analyze-template.tex your-file.xml

BTW, there are two typos in xml-analyze-template.tex (lines 8-9):

  - \startxmlsetup should read \startxmlsetups.
  - \xmlsetsetups should read \xmlsetsetup.

But consider that this only flushes text with no formatting (you will
have all text in a single paragraph.

If this is not what you need, a more detailed (or simply more verbose)
explanation) might help.

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] Bibliography: separating different kinds of literature OR Sectioning bibliography by type

2024-06-04 Thread Ben Moon via ntg-context
Hey there,
I would like to place a list of bibliography according to types (article, book, 
in proceedings) in my document. Similar like here:
https://tex.stackexchange.com/questions/112874/sectioning-bibliography-by-type-with-multiple-types-per-section
Sectioning bibliography by type (with multiple types per section)
tex.stackexchange.com

and here:
https://www.mail-archive.com/ntg-context@ntg.nl/msg77056.html
The example provided by Hans doesn’t seem to properly work any more, and I 
cannot make the suggestion work of using two different datasets work as 
suggested in the same thread.
So this is where I’m stuck:

\definebtxdataset[main]
\usebtxdataset[main][maindata.buffer]
\definebtxdataset[images]
\usebtxdataset[images][imagedata.buffer]
\usebtxdefinitions[mycustom, aps]
\setupbtx[dataset=main]
\definebtxrendering[bibrendering][mycustom, aps][dataset=main]
\definebtxrendering[bibimgrendering][mycustom, aps][dataset=images]

\placelistofpublications[bibrendering]
\placelistofpublications[bibimgrendering]

It would be much appreciated if someone could provide a working example?

Thank you very much

Ben
___
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 signing

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

I have the following sample

  \setupinteraction[state=start]
  \definefield[signature][signed]
  \defineoverlay[signature][my signature]
  \starttext
\startTEXpage[offset=1ts,frame=on,framecolor=darkblue]
  sign: \inframed[background=signature,framecolor=darkred]
  {\fieldbody[signature][width=3cm,option=hidden]}
\stopTEXpage
  \stoptext

After compiling, I sign it with the following command (in latest from
2024.05.31 18:50):

 mtxrun --script pdf --sign --certificate=mycert.pfx --password=ABCabc a

It requires the pass phrase (again?) and I get a signed PDF document.

But Acrobat cannot find (or display) any signature in that PDF document.

pdfsig (from poppler-utils-24.02.0) complains about digest mismatch:

  $ pdfsig a.pdf
  Digital Signature Info of: a.pdf
  Signature #1:
- Signature Field Name: signature
- Signer Certificate Common Name: John Doe
- Signer full Distinguished Name: CN=John Doe,O=No Brainer
- Signing Time: Jun 03 2024 16:24:03
- Signing Hash Algorithm: SHA-256
- Signature Type: adbe.pkcs7.detached
- Signed Ranges: [0 - 6428], [10527 - 10912]
- Not total document signed
- Signature Validation: Digest Mismatch.

mutool sign (from mupdf-1.24.1) also complains about modified document
after signing:

  $ mutool sign -v a.pdf
  Verifying signature 3:
Distinguished name: cn=John Doe, o=No Brainer, ou=, email=, c=XX
Certificate error: Self-signed certificate.
Digest error: Signature invalidated by change to document.

Sorry, but what am I doing wrong here?

Many thanks for your help,

Pablo

mycert.pfx
Description: application/pkcs12
___
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: setuphead in connection with the command argument

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

On 6/3/2024 1:36 PM, Gerion Entrup wrote:

Thank you. I think that I understand command vs alternative now.
With try and error, I experienced, that the font/style of the `style`
parameter interleave in a strange way. Therefore I see it as related.
What i mean is:
style: outer level, also sets interline spacing and adapts before after 
blanks


numberstyle and textstyle : specific to the element

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: framed boxes top aligned howto?

2024-05-31 Thread Hans van der Meer via ntg-context
Forget this question: location=top did the trick.
Should have found earlier. Rest of the day contemplating over the fact it took 
me so long to find out 沈

yours sincerely
dr. Hans van der Meer



> On 31 May 2024, at 12:13, Hans van der Meer via ntg-context 
>  wrote:
> 
> I have no problem of aligning two or more \framedtext boxes bottomwise on the 
> baseline, nor centering them vertically within a \vcenter.
> But I do not succeed in placing them with their top aligned without the 
> following trick: typeset them in a box, determine largestheight and then 
> typeset again each within: \vbox to largestheight and \vill'ed to the bottom.
> 
> All very well, but it is disastrous when there are side effects: twice 
> typesetting then fails in some instances.
> I hope I described the question sufficiently clear, because an MWE is not so 
> minimal.
> 
> Therefore my question: how can I align two or more \framedtext's thus:
> 
> |--] |--] |--] ...
> |  ] [  ] [  ]
> |  ] [  ] [  ]
> |  ] [  ] [  ]
> |  ] |--] [  ]
> |  ]  [  ]
> |  ]  [  ]
> |--]  [  ]
>   |--]
> 
> 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
> ___

_______
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] framed boxes top aligned howto?

2024-05-31 Thread Hans van der Meer via ntg-context
I have no problem of aligning two or more \framedtext boxes bottomwise on the 
baseline, nor centering them vertically within a \vcenter.
But I do not succeed in placing them with their top aligned without the 
following trick: typeset them in a box, determine largestheight and then 
typeset again each within: \vbox to largestheight and \vill'ed to the bottom.

All very well, but it is disastrous when there are side effects: twice 
typesetting then fails in some instances.
I hope I described the question sufficiently clear, because an MWE is not so 
minimal.

Therefore my question: how can I align two or more \framedtext's thus:

|--] |--] |--] ...
|  ] [  ] [  ]
|  ] [  ] [  ]
|  ] [  ] [  ]
|  ] |--] [  ]
|  ]  [  ]
|  ]  [  ]
|--]  [  ]
  |--]

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 prevent item appearing in List of Figures

2024-05-30 Thread Charles Doherty via ntg-context
Thanks Hraban,

Tomáš Hála suggested l \starttplacefigure[location={none},...] which works a 
treat. I will keep your suggestion in mind too. I am very grateful to you all.

Thank you,
Charlie

> On 30 May 2024, at 11:41, Henning Hraban Ramm  wrote:
> 
> If you don’t need them in the list and also no caption, I wouldn’t use floats 
> (\placefigure) at all, but just plain \externalfigure.
> 
> Hraban

***
CHARLES DOHERTY
13 BANCROFT ROAD
TALLAGHT
DUBLIN 
D24 YH2V
home: +353 1 2447483
Mobile: +353 863868629
charles.dohe...@icloud.com





___
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] how to prevent item appearing in List of Figures

2024-05-29 Thread Charles Doherty via ntg-context
Hi Mikael,

> I notice that you addressed Wolfgang, but you also sent to the list.
> One way could be to condition on being on a chapter page:
> 
> \setupheadertexts
>  [\doifelsefirstsectionpage{chapter}{\userpagenumber}{}]
> 
> \setupheadertexts
>  [\doifelsefirstsectionpage{chapter}{}{\getmarking[chapter]}]
>  [\doifelsefirstsectionpage{chapter}{}{\userpagenumber}]

Thank you for your suggestion. Along with your suggestion and that of  Wolfgang 
I get what I need. I thought I was sending to the list but I copied and pasted 
from an email and didn’t realise that Wolfgang was included. I have only ever 
written to the list many years ago.

I haven’t typeset a book before and various things are a challenge. The most 
recent is the following.

I have \placelistoffigures some of which are logos (for the publisher and two 
granting bodies) that I have placed with:

   \setupcaptions[number=no]
\starttplacefigure[
 location={middle,high,low},
 reference=fig:logo,
 title=]
{\externalfigure[FCLogo][width=0.045\textwidth]}
\stopplacefigure 

These are not part of the text and I don’t want them to appear in the list.

The caption for the logo doesn’t appear in the List of Figures but the page 
number does. How can I prevent these particular graphics from being listed in 
the List of figures.

Thanks,
Charlie





___
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] slides from 2023 meeting

2024-05-29 Thread Pablo Rodriguez via ntg-context
Hi there,

just out of curiosity, are the slides from the 2023 meeting
(https://meeting.contextgarden.net/2023/programme.shtml) planned for
public release?

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: regular expression as lua pattern

2024-05-29 Thread Pablo Rodriguez via ntg-context
On 5/29/24 13:00, Henning Hraban Ramm wrote:
> [...]
> See also Taco’s introduction to LPEG in
> https://articles.contextgarden.net/journal/2019/77-98.pdf

Many thanks for the reference, Hraban.

I need to start digesting that to learn about LPEG.

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: regular expression as lua pattern

2024-05-29 Thread Pablo Rodriguez via ntg-context
On 5/28/24 20:06, Hans Hagen wrote:
> On 5/28/2024 6:25 PM, Tomáš Hála wrote:
>> Hi Pablo,
>>
>> unfortunately, that it is not possible:
>>
>> http://lua-users.org/wiki/PatternsTutorial, section Limitations.
>
> \starttext
>   \startTEXpage[pagestate=start, offset=1em]
>  \startluacode
>  local pat = (lpeg.Cmt(lpeg.P("this") + lpeg.P("that"),
> function(str,_,s)
>  context(s)
>  return #str
>  end) + lpeg.P(1))^1
>  lpeg.match(pat,"how about this being that")
>
>  local pat = (lpeg.Cmt(lpeg.oneof({ "this", "that" }),
> function(str,_,s)
>  context(s)
>  return #str
>  end) + lpeg.P(1))^1
>  lpeg.match(pat,"how about this being that")
>  \stopluacode
>   \stopTEXpage
> \stoptext

Many thanks for your reply, Hans.

I will have to study it becasue LPEGs is new stuff for me.

Many thanks for your help,

Pablo

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

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


[NTG-context] Re: BibTeX choking on comments in database

2024-05-29 Thread Alan Braslau via ntg-context
On Tue, 28 May 2024 21:54:08 -0700
Kip Warner  wrote:

> On Tue, 2024-05-28 at 17:00 -0600, Alan Braslau wrote:
> > The Context publications reference subsystem reads BibTeX databases
> > but does not use BibTeX at all. I am not sure what your quoted
> > statement means exactly.  
> 
> I see. The first few lines of my BibTeX file just contains a copyright
> notice that is commented out with the % character. If that is not a
> valid comment character, is there no way to write a comment in the
> file?
> 

1) You appear to be using the long-frozen mkii bibliography code.
2) As Aditya wrote, anything outside of a valid entry is ignored.

@comment{
}

is a good construction.

-- 
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: BibTeX choking on comments in database

2024-05-28 Thread Alan Braslau via ntg-context
On Mon, 27 May 2024 16:24:49 -0700
Kip Warner  wrote:

> I am using BibTeX under ConTeXt to typeset a publication.

The Context publications reference subsystem reads BibTeX databases but
does not use BibTeX at all. I am not sure what your quoted statement
means exactly.

Alan
___
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: regular expression as lua pattern

2024-05-28 Thread Pablo Rodriguez via ntg-context
On 5/28/24 18:25, Tomáš Hála wrote:
> Hi Pablo,
>
> unfortunately, that it is not possible:
>
> http://lua-users.org/wiki/PatternsTutorial, section Limitations.

Many thanks for your reply, Tomáš.

It is clear to me now.

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

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


[NTG-context] regular expression as lua pattern

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

I have the following sample:

\starttext
\startTEXpage[pagestate=start, offset=1em]
\startluacode
local str = "this is that"
        context(str:match("(this|these)"))
\stopluacode
\stopTEXpage
\stoptext

In short, I would like to know whether it is possible to have the
regular expression (this|these) as a Lua pattern.

I mean, I need complete strings and I haven’t found the way to do it.

Many thanks for your help,

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

maillist : ntg-context@ntg.nl / 
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 font scaling in LMTX?

2024-05-28 Thread Pablo Rodriguez via ntg-context
On 5/26/24 20:50, Wolfgang Schuster wrote:
> [...]
> I get the same results with the default font mode in MkIV and LMTX but
> when I add
>
> \enableexperiments[fonts.compact]
>
> the x and xx sizes are wrong.

Many thanks for having fixed that in latest, both Hans and 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: Number in a circle

2024-05-28 Thread Pablo Rodriguez via ntg-context
On 5/28/24 17:47, Pablo Rodriguez via ntg-context wrote:
> On 5/27/24 19:10, Kip Warner wrote:
>> [...]
>>to say pt, for printer's55points. two letters.
>>
>> I'm not sure what it is referring to.
>
> fw is a new dimensio unit only available in LMTX (not in LuaTeX).

Sorry for the noise.

I didn’t see that there were new messages and the proper answer from
Wolfgang among these.

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: Number in a circle

2024-05-28 Thread Pablo Rodriguez via ntg-context
On 5/27/24 19:10, Kip Warner wrote:
> [...]
> Thanks Wolfgang. I gave it a try on https://context-on-web.eu/, but it
> failed:
>
>Dimensions can be in units of em, ex, in, pt, pc, cm, mm, dd, cc,
>bp, dk, or54sp; but yours is a new one! I'll assume that you meant
>to say pt, for printer's55points. two letters.
>
> I'm not sure what it is referring to.

fw is a new dimensio unit only available in LMTX (not in LuaTeX).

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: lua error in `strc-lev.lua`

2024-05-28 Thread Denis Maier via ntg-context
Well, you define less levels than you need.

 

Try this :

 

%

\definesectionlevels

   [default]

   [

%chapter, % uncomment this line to make it work

   section, subsection, subsubsection, subsubsubsection, subsubsubsubsection]

 

\starttext

\startsectionlevel

\startsectionlevel

\startsectionlevel

\startsectionlevel

\startsectionlevel

\startsectionlevel

\startsectionlevel

\stopsectionlevel

\stopsectionlevel

\stopsectionlevel

\stopsectionlevel

\stopsectionlevel

\stopsectionlevel

\stopsectionlevel

\stoptext

%

 

Interestingly, this will also work, although (if I’m counting correctly) there 
are still only 5 levels defined, but 6 are used (just like above):

 



 

\definesectionlevels

   [default]

   [

%chapter, % uncomment this line to make it work

   section, subsection, subsubsection, subsubsubsection, subsubsubsubsection]

 

\starttext

\startsectionlevel

\startsectionlevel

\startsectionlevel

\startsectionlevel

\startsectionlevel

\startsectionlevel

%\startsectionlevel

%\stopsectionlevel

\stopsectionlevel

\stopsectionlevel

\stopsectionlevel

\stopsectionlevel

\stopsectionlevel

\stopsectionlevel

\stoptext

 

 



Von: Sylvain Hubert  
Gesendet: Dienstag, 28. Mai 2024 10:48
An: mailing list for ConTeXt users 
Betreff: [NTG-context] lua error in `strc-lev.lua`

 

ConTeXt LMTX version: 2024.05.27 18:16

 

Reproducible example:

 

\definesectionlevels

   [default]

   [section, subsection, subsubsection, subsubsubsection, subsubsubsubsection]

 

\starttext

\startsectionlevel

\startsectionlevel

\startsectionlevel

\startsectionlevel

\startsectionlevel

\startsectionlevel

\startsectionlevel

\stopsectionlevel

\stopsectionlevel

\stopsectionlevel

\stopsectionlevel

\stopsectionlevel

\stopsectionlevel

\stopsectionlevel

\stoptext

 

lua error   > lua error on line 19 in file ./input.tex:

registered function call [969]: 
...mtx/tex/texmf-context/tex/context/base/mkiv/strc-lev.lua:75: attempt to 
index a nil value (field '?')
stack traceback:
...mtx/tex/texmf-context/tex/context/base/mkiv/strc-lev.lua:75: in 
function <...mtx/tex/texmf-context/tex/context/base/mkiv/strc-lev.lua:66>
(...tail calls...)

 

___
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: Number in a circle

2024-05-27 Thread vm via ntg-context
if you make width and hwight 1.4en instead of 1.5em, the characters will 
align with the running text.




\defineframed
  [textcircled]
  [   width=1.4em,
 height=1.4em,
   location=low,
 corner=round,
%radius=.5fw,
 radius=\dimexpr\framedwidth/2\relax,
 offset=none]

\starttext
\dostepwiserecurse{0}{9}{1}{#1 = \textcircled{#1}\blank}
\stoptext

___
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: bug tracker

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

On 5/27/2024 3:46 PM, Peter Münster wrote:


Is there a bug tracker for ConTeXt?
(It seems, that https://tracker.luatex.org/ is no more used...)
just mail to the list as bugs are normally either solved fast or becoem 
features


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: wrong font scaling in LMTX?

2024-05-26 Thread Pablo Rodriguez via ntg-context
On 5/26/24 20:50, Wolfgang Schuster wrote:
> [...]
> I get the same results with the default font mode in MkIV and LMTX but
> when I add
>
> \enableexperiments[fonts.compact]
>
> the x and xx sizes are wrong.

Many thanks for your reply, Wolfgang.

I tend to forget that I have always compact fonts enabled by default.

Only enabling or disabling it, compilation with sample goes from 2.6s
when enabled to 3.2s when disabled (using --purgeall)

Without your help, I would have been never detected 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] wrong font scaling in LMTX?

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

I have the following sample:

\definefontfamily[mainface][rm][TeX Gyre Pagella]
\definefontfamily[mainface][ss][TeX Gyre Heros]
[scale=0.125]
\setupbodyfont[mainface]
\starttext
\startTEXpage[pagestate=start, offset=1em]
\rm a\ss a\\
{\rm a\ssd a}\\
{\rm a\ssx a}\\
{\rm a\ssxx a}
\stopTEXpage
\stoptext

Scaled \ssx and \ssxx are wrong in LMTX (not scaled at all).

All font sizes are scaled fine in MkIV.

In both cases, I‘m running latest from 2024.05.17 16:32.

Could anyone confirm the issue?

BTW, this is the first time I indent the sample sent to the list with a
single character (one tab) instead of two or four spaces.

If the sample is wrong displayed in the medium you use with the mailing
list, please tell me and I will go back to spaces instead of tabs.

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] page number

2024-05-26 Thread Charles Doherty via ntg-context
Dear Wolfgang,

I have a book in preparation with running heads.


Pagenumber  marking   |marking  Pagenumber

The chapter title page has empty headings. 

The publisher would like the page number centered on the Chapter title page. I 
manage to put it there but I don’t want it to run on the following pages. I 
have made various attempts but can’t manage it.

I have

\setuplayout[location=doublesided]
\setuppagenumbering[location=,alternative=doublesided]

\setupheadertexts[chapter][][pagenumber]
\setupheadertexts[{\getmarking[chapter]}][pagenumber]

Can anyone show me code to achieve this?

Thanks,
Charlie 



___
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: LUA API for page numbers

2024-05-21 Thread vm via ntg-context
just noticed that if the notes need more margin space then are pages 
available by the text, they get lost. e.g. this mwe generates 10 pages 
with 100 par but only 80 notes will show up.



\setupmarginblocks[inbetween=]

\starttext

\dorecurse{100}
  {\bold{#1:} \samplefile{ward}%
   \startmarginblock {\bf #1} one two three four five six seven eight 
nine ten eleven twelve thirteen\stopmarginblock

   \par}

\stoptext


___
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: LUA API for page numbers

2024-05-21 Thread vm via ntg-context



On 21/05/2024 15:54, Wolfgang Schuster wrote:

\setupmarginblocks[inbetween=]

\starttext

\dorecurse{100}
   {\bold{#1:} \samplefile{ward}%
    \startmarginblock Note #1\stopmarginblock
    \par}

\stoptext



when I compile this, i get per page with
\par 1..10 -> the notes 1..11
\par 11..20 -> the notes 12..21
\par 21..30 -> the notes 32..31

...

is this expected standard?

i'd expect \par and notes synced on page.
1..10 -> 1..10



___
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 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] How to disable hyphenation at the end of a line?

2024-05-19 Thread Joel via ntg-context
I'm using mostly default ConTeXt settings, but an editor has warned I should 
avoid using hyphenation at the end of lines--at least for my particular 
audience.
I've found manual text that says how to disable specific words from being 
hyphenated.

Is there a whole-document switch to disable it?
--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
___


[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: Special charakter

2024-05-18 Thread vm via ntg-context




On 18/05/2024 12:54, Thomas Meyer wrote:
I know I can copy and paste it, like here (copied from Wikipedia), but 
if I don't have a template in a hurry ...


Your local OS might support some kind of keyboard language typing to 
place accents, dots and strikings. Check your mac os manual.




___
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: Special charakter

2024-05-18 Thread vm via ntg-context



On 18/05/2024 11:17, Thomas Meyer wrote:

How can I write Łódź (on a Mac)?


Just as you wrote it in your mail message?
ConTeXt knows how to deal with utf-8

___
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] Is there any command that equates to "keep with previous paragraph"?

2024-05-15 Thread Joel via ntg-context
If I have text like this, it interprets the gap as needing a paragraph break:
This is some text.
This is some other text, it will appear in a new paragraph.
Is there any macro I can place that will ignore the gap before it, treating the 
next text as if it belongs at the end of that sentence?
Ex.
This is some text.
\ignorebreak This is some other text, it will appear in a new paragraph.
That way output is more like this:
This is some text. This is some other text, it will appear in a new paragraph.
--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
___


[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* <mailto:jairoadelr...@gmail.com>>

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] Is there a way to consolidate index reference numbers by book?

2024-05-10 Thread Joel via ntg-context
\useregister[workbookA][03_workbook][learnedlong][WB~1:~]
\useregister[workbookB][04_workbook][learnedlong][WB~2:~]
\useregister[workbookC][05_workbook][learnedlong][WB~3:~]
\useregister[workbookD][06_workbook][learnedlong][WB~4:~]




    \startchapter[title=Standards]                    
\placeregister[learnedlong,workbookA,workbookB,workbookC,workbookD]
        \stopchapter

I setup a custon index that lists items from four different workbooks. 

The problem is in the indexi, it displays entreis like this:
WHST.1.1: 11, 231, WB 1: 124, WB 1: 133, WB 2: 325, WB 2: 345, etc.
In other words, it says WB 1 in front of every page number from the first 
workbook.
Is there any way to consolidate the page numbers by book, e.g. output instead 
like this:
WHST.1.1: 11, 231, WB1: 124, 133, WB 2: 325, 345
In other words, it list all page numbers for Workbook 1 right after WB 1: 
instead of placing WB 1 in front of every single page from Workbook 1?
--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
___


[NTG-context] How to place text, but make it completely hidden from viewers?

2024-05-09 Thread Joel via ntg-context
I have found a few situations is confusing/breaking ConTeXt:
- Footnotes inside tables, figures, frames, margins (won't render the cited 
item).
- Custom index items inside those items (displays "entry not flushed").
My workaround has been to define a size 0 font \tfz, then put it in a block 
like this:

    {\tfz%    \starteffect[hidden]%
    \cite[author1912]    \stopeffect%
    }%
The problem this seems to create, is sometimes if placed between two passages, 
it interprets a need to create two paragraph breaks:
\input knuth
    {\tfz%    \starteffect[hidden]%
    \cite[author1912]    \stopeffect%
    }%
\input knuth
It creates a paragraph break after the first knuth, then another after the 
hidden text, thereby creating a "double spaced" break between two paragraphs. 
Note the above code is used in many macros, so I don't have full control always 
where it appears, but its making the double-spaced break everywhere.

Is there either (1) something can enter before this code that essentially has 
the effect of "backup to the previous paragraph" or (2) some other method of 
hiding text that makes it present on the page, but just not visible to the 
reader, that won't create a double spaced break, or take up any space 
what-so-ever?
--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
___


[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] Why is this description environment not showing the correct title?

2024-05-05 Thread Joel via ntg-context

\definedescription[latexdesc][headstyle=bold, style=normal, align=flushleft, 
alternative=hanging, width=broad, margin=1cm]

\starttext

    \latexdesc{1540} some event happened
    \latexdesc{1541} some other event happened
    \latexdesc{1542} some event happened quite different

\stoptext


I found the above code (the first line) in the ConTeXt Wiki, as a way to create 
the equivalent of a desc environment from LaTeX. The items inside {} should be 
bold, then there is a gap before the next text.
I am using this to display a simple timeline.
Though the formatting looks perfect, very strangely when I compile it, it 
changes all of the dates to say "1540" (or whatever date was used first).
Why is it showing the wrong title on the desc environment?
--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
___


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

2024-05-04 Thread Joel via ntg-context
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
___


[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: How to make superscript text match footnote mark formatting?

2024-04-27 Thread Joel via ntg-context
 Thank you! --Joel

On Saturday, April 27, 2024 at 12:08:13 PM MDT, Wolfgang Schuster 
 wrote:  
 
 Joel via ntg-context schrieb am 27.04.2024 um 19:16:
> \starttext
>   test\high{1}test\footnote{some text}
> \stoptext
> 
> How can I create a superscript number that has exactly the same 
> formatting as a footnote, but which won't create a footnote. I tried 
> \high{}, which I believe should be the way to superscript text, but if 
> you compile this, you can see the first "1" and second "1" have entirely 
> different formatting. How do I make the first one have the same exact 
> formtating as the real footnote?

Footnotes apply the \tx style to the number in the running text and to 
get the same text size with \high you need \tx before the argument.

Another solution is to create your own \high command where you set the 
text size as default value but now you have to pass \txx as value 
because by default \high already uses style=\tx. When you now combine 
the default \tx from \high and the \tx from the footnote you get the 
\txx size (which is used in the custom \high command).

 begin example
\definehigh[fakenotesymbol][style=\txx]

\starttext

\startlines
test\footnote{\unknown}
test\high{\tx 1}
test\fakenotesymbol{1}
\stoplines

\stoptext
 end example

Wolfgang
  ___
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] How to make superscript text match footnote mark formatting?

2024-04-27 Thread Joel via ntg-context
\starttext
 test\high{1}test\footnote{some text}
\stoptext
How can I create a superscript number that has exactly the same formatting as a 
footnote, but which won't create a footnote. I tried \high{}, which I believe 
should be the way to superscript text, but if you compile this, you can see the 
first "1" and second "1" have entirely different formatting. How do I make the 
first one have the same exact formtating as the real footnote?
--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
___


[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 don't footnotes appear in floats or figures?

2024-04-23 Thread Joel via ntg-context
 Okay, I've been trying many things with this \startpostponing code--if I 
understand what's happening, its moving the figures to a later page. I'm not 
sure that's quite ideal, its not fully working with my actual documents, and 
leaves lots of empty white space, when I'm already in a situation where I need 
to reduce page count.
So I thought an alternative route:
(1) have a code that checks "what is current footnote number?" that sets that 
as a variable
\def\currentfoodnote{\somevariableincontextthatgetsfoodnotenumber}
(2) adjust my placefigure macro such that the footnote is outside the 
placefigure, but color it white so its invisible:
\define\showafigure{

\cite[author2019]<--somehow hide this invisible
 
\placefigure{Caption\superscript{\currentfootnote}}}{\externalfigure[cow][width=\textwidth]}
 <--this places a superscript number inside the caption, but it isn't the true 
marker(3) in the caption, place a superscript number with value to 
\currentfootnoteIts basically a fake footnote, just a superscript number of the 
same value as the real footnote.


Shouldn't this result work? Any idea how I can get current footnote value?
--Joel

   On Monday, April 22, 2024 at 07:22:24 AM MDT, vm via ntg-context 
 wrote:  
 
 

On 22/04/2024 14:38, Joel via ntg-context wrote:
> Is this the correct way to be using the \startpostponing code (see 
> example below)?
> 
> \starttext
>      \input knuth
> \startpostponing
>      \placefigure{Caption\footnote{message 
> A}}{\externalfigure[cow][width=\textwidth]}
> \stoppostponing
> \stoppostponing



double stop ?

___
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: Why are ConTeXt-SBL endnotes empty?

2024-04-22 Thread Joel via ntg-context
 Changing location=none to location=text still left me with the bullet points 
appearing in a big list at the end of my chapter, but without any messages in 
them.

On Monday, April 22, 2024 at 07:54:39 AM MDT, 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?

Here is a minimum working example:
\usemodule[publ-imp-sbl]
\startbuffer [bib]

@Article{na2006,
title={Volcanoes \word{of} New Mexico},
year={2006},
journal={New Mexico Earth Matters},
publisher={New Mexico Bureau \word{of} Geology \word{and} Mineral Resources},
volume={6},
number={1},
location={Socorro, New Mexico}
}

@Book{clark1989,
author = {Clark, William},
title = {Railroads \word{and} railroad towns \word{in} New Mexico},
publisher = {New Mexico Magazine},
year = {1989},
address = {Albuquerque, New Mexico},
isbn = {9780937206126}
}

\stopbuffer

\usebtxdataset[bib.buffer]

\setupbtx[dataset=default]
\usebtxdefinitions[sbl]
\setupbtx[sbl]

\setupnote[footnote][location=none]

\starttext

   \input knuth
    \cite[clark1989]

    \placenotes[footnote]

    
    \startchapter[title=Bibliography]
    \placelistofpublications
    \stopchapter

\stoptext

--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: 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] Why are ConTeXt-SBL endnotes empty?

2024-04-22 Thread Joel via ntg-context
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?

Here is a minimum working example:
\usemodule[publ-imp-sbl]
\startbuffer [bib]

@Article{na2006,
title={Volcanoes \word{of} New Mexico},
year={2006},
journal={New Mexico Earth Matters},
publisher={New Mexico Bureau \word{of} Geology \word{and} Mineral Resources},
volume={6},
number={1},
location={Socorro, New Mexico}
}

@Book{clark1989,
author = {Clark, William},
title = {Railroads \word{and} railroad towns \word{in} New Mexico},
publisher = {New Mexico Magazine},
year = {1989},
address = {Albuquerque, New Mexico},
isbn = {9780937206126}
}

\stopbuffer

\usebtxdataset[bib.buffer]

\setupbtx[dataset=default]
\usebtxdefinitions[sbl]
\setupbtx[sbl]

\setupnote[footnote][location=none]

\starttext

   \input knuth
    \cite[clark1989]

    \placenotes[footnote]

    
    \startchapter[title=Bibliography]
    \placelistofpublications
    \stopchapter

\stoptext

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


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

2024-04-22 Thread vm via ntg-context



On 22/04/2024 14:38, Joel via ntg-context wrote:
Is this the correct way to be using the \startpostponing code (see 
example below)?


\starttext
     \input knuth
\startpostponing
     \placefigure{Caption\footnote{message 
A}}{\externalfigure[cow][width=\textwidth]}

\stoppostponing
\stoppostponing




double stop ?

___
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 Joel via ntg-context
 I've managed to get a minimum working example. If you check, you'll see the 
5th footnote inside a placefigure doesn't render anywhere:
\starttext

    \input knuth
    \placefigure{Caption\footnote{message 
A}}{\externalfigure[cow][width=\textwidth]}
    \input knuth
    \placefigure{Caption\footnote{message 
B}}{\externalfigure[cow][width=\textwidth]}
    \input knuth
    \placefigure{Caption\footnote{message 
C}}{\externalfigure[cow][width=\textwidth]}
    \input knuth
    \placefigure{Caption\footnote{message 
D}}{\externalfigure[cow][width=\textwidth]}
    \input knuth
    \placefigure{Caption\footnote{message 
E}}{\externalfigure[cow][width=\textwidth]}
    \input knuth
    \placefigure{Caption\footnote{message 
F}}{\externalfigure[cow][width=\textwidth]}

\stoptext


Is this the correct way to be using the \startpostponing code (see example 
below)?
\starttext
    \input knuth
\startpostponing
    \placefigure{Caption\footnote{message 
A}}{\externalfigure[cow][width=\textwidth]}
\stoppostponing
\stoppostponing
    \input knuth
\startpostponing
    \placefigure{Caption\footnote{message 
B}}{\externalfigure[cow][width=\textwidth]}
\stoppostponing
    \input knuth
\startpostponing
    \placefigure{Caption\footnote{message 
C}}{\externalfigure[cow][width=\textwidth]}
\stoppostponing
    \input knuth
\startpostponing
    \placefigure{Caption\footnote{message 
D}}{\externalfigure[cow][width=\textwidth]}
\stoppostponing
    \input knuth
\startpostponing
    \placefigure{Caption\footnote{message 
E}}{\externalfigure[cow][width=\textwidth]}
\stoppostponing
    \input knuth
\startpostponing
    \placefigure{Caption\footnote{message 
F}}{\externalfigure[cow][width=\textwidth]}
\stoppostponing
\stoptext




On Monday, April 22, 2024 at 02:31:30 AM MDT, Hans Hagen via ntg-context 
 wrote:  
 
 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
              Ridd

[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] Why don't footnotes appear in floats or figures?

2024-04-21 Thread Joel via ntg-context
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 message2 message3 message5 message6 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.
--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
___


[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] How to isolate serious errors from warnings?

2024-04-17 Thread Joel via ntg-context
I'm about to have a lengthy (2,000+ page) document published. Normally if it 
compiles and looks okay, I regard that as meaning no errors appeared, but I've 
noticed that sometimes ConTeXt will still compile, even if something isn't 
displayed on screen as it should:

(1) I tried placing a table inside a startitemize environment, as instead of it 
not compiling, it left a message in the document warning that wasn't supported.
(2) In another case, I had an image that ConTeXt couldn't find, as I mispelled 
the filenmame, and it fully compiled and made a PDF, without me noticing.
(3) Or maybe in some case, a font couldn't be found for a specific character, 
so a single character in the file isn't displaying.
Those are just some examples; I intended for something to be printed on the 
PDF, but it isn't showing there.

Since a document of this size will have a lot of messages, is there a way to 
adjust the settings, from "show everything" to "show some" to "show only 
serious errors"? Or maybe to use > to send the errors to another file for 
careful study? (using Linux if that matters)

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


  1   2   3   4   5   6   7   8   9   10   >