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

2024-05-28 Thread Kip Warner
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?

-- 
Kip Warner
OpenPGP signed/encrypted mail preferred
https://www.thevertigo.com


signature.asc
Description: This is a digitally signed message part
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
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 Kip Warner
On Tue, 2024-05-28 at 15:02 -0700, Kip Warner wrote:
> On Tue, 2024-05-28 at 17:38 +0200, Wolfgang Schuster wrote:
> > Add
> > 
> >  framecolor=colour_text,
> > 
> > to the frame settings.
> 
> Thanks Wolfgang. That does work.
> 
> But another problem I've found is the font and circle are not
> automatically resized when used in a formula:
> 
>    \definecolor[colour_text][r=0.754,g=0.516,b=0.324] % RGB 0xc08453
>    
>    \setupcolors[
>    state=start,
>    textcolor=colour_text,
>    pagecolormodel=rgb] % gray rgb cmyk auto none
>    
>    % Commands for MetaPost interpreter to draw a circle...
>    \startuseMPgraphic{textcircle}
>     draw fullcircle
>     xscaled OverlayWidth
>     yscaled OverlayWidth
>     withcolor OverlayLineColor;
>    \stopuseMPgraphic
>    
>    % Define an overlay using the above image...
>    \defineoverlay[textcircle][\useMPgraphic{textcircle}]
>    
>    % Define a frame we can use via \textcircled{X} that uses as its
>    background
>    %  the above overlay...
>    \defineframed
>   [textcircled]
>   [width=1.4em,
>    height=1.4em,
>    frame=off,
>    background=textcircle,
>    framecolor=colour_text,
>    location=low,
>    offset=none]
>    
>    \starttext
>    Here are the numbers \textcircled{1}, \textcircled{2}, and
>    \textcircled{3}.
>    
>    And when used in formula, \math{\Sigma_{i^b
> x_{\textcircled{3}}^i}}
>    \stoptext
> 
> What I was hoping would happen there was the circled 3 in the formula
> would shrink to look like a subscript for the x variable. Any help
> appreciated.

Wolfgang, please don't tax yourself further on this. I've managed to
find another way of expressing the same ideas in my publication without
having to resort to the above magic. Thanks again.

-- 
Kip Warner
OpenPGP signed/encrypted mail preferred
https://www.thevertigo.com


signature.asc
Description: This is a digitally signed message part
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
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 Kip Warner
On Wed, 2024-05-29 at 00:45 +0200, Aditya Mahajan wrote:
> Hard to say without looking at the bib file, but % is not a comment
> character in bibtex. So, if your file starts with

The first few lines of the file is just a copyright notice, with each
line beginning with %. If that's not an appropriate comment character,
is there any way to put comments in a BibTeX file?

-- 
Kip Warner
OpenPGP signed/encrypted mail preferred
https://www.thevertigo.com


signature.asc
Description: This is a digitally signed message part
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
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: BibTeX choking on comments in database

2024-05-28 Thread Aditya Mahajan
On Tue, 28 May 2024, Kip Warner wrote:

> On Tue, 2024-05-28 at 08:05 +0200, Henning Hraban Ramm wrote:
> > According to the documentation, everything outside of entries is 
> > considered a comment. Inside of entries, there can’t be comments.
> 
> But in this case, is it not warning about text outside of an entry that
> should be treated as a comment?

Hard to say without looking at the bib file, but % is not a comment character 
in bibtex. So, if your file starts with

% @article{key,
% title = {...},
% }

you will get an error from the bib parser.

If you want to comment out an entry, the simplest way is to remove the @. So,

article{key,
  title={...},
}

is a comment (since it is outside the entry). 

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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
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 Kip Warner
On Tue, 2024-05-28 at 17:38 +0200, Wolfgang Schuster wrote:
> Add
> 
>  framecolor=colour_text,
> 
> to the frame settings.

Thanks Wolfgang. That does work.

But another problem I've found is the font and circle are not
automatically resized when used in a formula:

   \definecolor[colour_text][r=0.754,g=0.516,b=0.324] % RGB 0xc08453
   
   \setupcolors[
   state=start,
   textcolor=colour_text,
   pagecolormodel=rgb] % gray rgb cmyk auto none
   
   % Commands for MetaPost interpreter to draw a circle...
   \startuseMPgraphic{textcircle}
draw fullcircle
xscaled OverlayWidth
yscaled OverlayWidth
withcolor OverlayLineColor;
   \stopuseMPgraphic
   
   % Define an overlay using the above image...
   \defineoverlay[textcircle][\useMPgraphic{textcircle}]
   
   % Define a frame we can use via \textcircled{X} that uses as its
   background
   %  the above overlay...
   \defineframed
  [textcircled]
  [width=1.4em,
   height=1.4em,
   frame=off,
   background=textcircle,
   framecolor=colour_text,
   location=low,
   offset=none]
   
   \starttext
   Here are the numbers \textcircled{1}, \textcircled{2}, and
   \textcircled{3}.
   
   And when used in formula, \math{\Sigma_{i^b x_{\textcircled{3}}^i}}
   \stoptext

What I was hoping would happen there was the circled 3 in the formula
would shrink to look like a subscript for the x variable. Any help
appreciated.

-- 
Kip Warner
OpenPGP signed/encrypted mail preferred
https://www.thevertigo.com


signature.asc
Description: This is a digitally signed message part
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
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 Kip Warner
On Tue, 2024-05-28 at 17:47 +0200, Pablo Rodriguez wrote:
> fw is a new dimensio unit only available in LMTX (not in LuaTeX).
> 
> Just in case it might help,

Thanks Pablo. I'm using the context package for Ubuntu Mantic which is
version 2021.03.05.20230120+dfsg-2. I'm assuming that doesn't support
the new unit.

-- 
Kip Warner
OpenPGP signed/encrypted mail preferred
https://www.thevertigo.com


signature.asc
Description: This is a digitally signed message part
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
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 Kip Warner
On Tue, 2024-05-28 at 08:17 +0200, Henning Hraban Ramm wrote:
> Am 27.05.24 um 19:20 schrieb Kip Warner:
> > On Mon, 2024-05-27 at 07:09 +0200, Ryszard Kubiak wrote:
> > > Hi Kip,
> > > 
> > > You may try characters with Unicode slots from U+2460 upto
> > > U+2469.
> > > They mean circled digits and are available in many fonts.
> > 
> > Thanks Ryszard. Those would be perfect, except I can't get them to
> > work
> > in ConTeXt. I tried using the \utfchar{0x2460} but it just displays
> > the
> > number 1.
> > 
> > I am assuming it needs a font that supports it, but I'm not sure
> > how to
> > switch to a supporting font just to typeset that character and then
> > revert back. Is there some way to define a macro?
> 
> You could just define a fallback font, like:
> 
> \definefontfallback[SymbolFB]
>    [file:symbola.otf]
>    [0x00300-0x003FF,0x02100-0x02800,0x1F000-0x2] % look up the
> right 
> Unicode ranges!
>    [check=no,force=no]
> 
> \definetypeface [myfonts] [rm] [serif] [times] [default] 
> [fallbacks=SymbolFB]
> 
> And then copy the character from a symbol table, no need for a macro.

Hmm, that's a great idea. But I can't seem to get a minimal to work
with https://context-on-web.eu:

   \definefontfallback[SymbolFB]
  [file:symbola.otf]
  [0x00300-0x003FF,0x02100-0x02800,0x1F000-0x2] % look up the
   right
   Unicode ranges!
  [check=no,force=no]
   
   \definetypeface [myfonts] [rm] [serif] [times] [default]
   [fallbacks=SymbolFB]
   
   \starttext
   \utfchar{0x02460}
   \stoptext

The above just prints the vanilla character '1'. That might be because
the online editor doesn't have access to the font. So I tried compiling
the above locally with the Symbola.otf file in the same directory and
same problem.

-- 
Kip Warner
OpenPGP signed/encrypted mail preferred
https://www.thevertigo.com


signature.asc
Description: This is a digitally signed message part
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
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 Kip Warner
On Mon, 2024-05-27 at 20:15 +0200, vm wrote:
> if you make width and hwight 1.4en instead of 1.5em, the characters
> will align with the running text.

Thank you. I will give that a try.

-- 
Kip Warner
OpenPGP signed/encrypted mail preferred
https://www.thevertigo.com


signature.asc
Description: This is a digitally signed message part
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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

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



On Tue, May 28, 2024 at 06:12:51PM +0200, Pablo Rodriguez via ntg-context wrote:

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
___

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

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


--

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

2024-05-28 Thread Kip Warner
On Tue, 2024-05-28 at 08:05 +0200, Henning Hraban Ramm wrote:
> According to the documentation, everything outside of entries is 
> considered a comment. Inside of entries, there can’t be comments.

But in this case, is it not warning about text outside of an entry that
should be treated as a comment?

-- 
Kip Warner
OpenPGP signed/encrypted mail preferred
https://www.thevertigo.com


signature.asc
Description: This is a digitally signed message part
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
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] Re: regular expression as lua pattern

2024-05-28 Thread Tomáš Hála
Hi Pablo,

unfortunately, that it is not possible:

http://lua-users.org/wiki/PatternsTutorial, section Limitations.

The best,

Tomáš


On Tue, May 28, 2024 at 06:12:51PM +0200, Pablo Rodriguez via ntg-context wrote:
> 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
> ___
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
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: Number in a circle

2024-05-28 Thread Wolfgang Schuster

Kip Warner schrieb am 28.05.2024 um 06:29:

On Mon, 2024-05-27 at 19:44 +0200, Wolfgang Schuster wrote:

You can use the \framed solution and modify it to use a metapost
graphic as background, it also easy to replace the circle with a
hexagon etc.

\startuseMPgraphic{textcircle}
  draw fullcircle
  xscaled OverlayWidth
  yscaled OverlayWidth
  withcolor OverlayLineColor ;
\stopuseMPgraphic

\defineoverlay[textcircle][\useMPgraphic{textcircle}]

\defineframed
    [textcircled]
    [  width=1.5em,
  height=1.5em,
  frame=off,
     background=textcircle,
   location=low,
     offset=none]

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


Thank you again Wolfgang. This is very helpful and works well.

One question I have for you is how to set the colour of the circle to
match the other text on my page. I currently do the following in my
environment file:

\definecolor[colour_text][r=0.754,g=0.516,b=0.324]
   
\setupcolors[state=start,textcolor=colour_text,pagecolormodel=rgb]


Add

framecolor=colour_text,

to the frame settings.

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

2024-05-28 Thread Sylvain Hubert
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-28 Thread Henning Hraban Ramm

Am 27.05.24 um 19:20 schrieb Kip Warner:

On Mon, 2024-05-27 at 07:09 +0200, Ryszard Kubiak wrote:

Hi Kip,

You may try characters with Unicode slots from U+2460 upto U+2469.
They mean circled digits and are available in many fonts.


Thanks Ryszard. Those would be perfect, except I can't get them to work
in ConTeXt. I tried using the \utfchar{0x2460} but it just displays the
number 1.

I am assuming it needs a font that supports it, but I'm not sure how to
switch to a supporting font just to typeset that character and then
revert back. Is there some way to define a macro?


You could just define a fallback font, like:

\definefontfallback[SymbolFB]
  [file:symbola.otf]
  [0x00300-0x003FF,0x02100-0x02800,0x1F000-0x2] % look up the right 
Unicode ranges!

  [check=no,force=no]

\definetypeface [myfonts] [rm] [serif] [times] [default] 
[fallbacks=SymbolFB]


And then copy the character from a symbol table, no need for a macro.

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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
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 Henning Hraban Ramm

Am 28.05.24 um 01:24 schrieb Kip Warner:

Hello list,

I am using BibTeX under ConTeXt to typeset a publication. I noticed
while building the publication ConTeXt raises the following non-fatal
warning:

...
This is BibTeX, Version 0.99d (TeX Live 2023/Debian)
The top-level auxiliary file: Secret_Sauce.aux
The style file: cont-au.bst
Database file #1: ./References.bib
I was expecting a `{' or a `('---line 2 of file ./References.bib
 :
 : % See the file Copying for details on copying conditions.
(Error may have been on previous line)
I'm skipping whatever remains of this entry
(There was 1 error message)
publications> loading formatting style from 'bibl-apa'
open source > level 4, order 13, name
'/usr/share/texmf/tex/context/bib/mkii/bibl-apa.tex'
close source> level 4, order 13, name
'/usr/share/texmf/tex/context/bib/mkii/bibl-apa.tex'
...

All that's present on the first few lines of the References.bib BibTeX
database are comments that begin with the '%' character.

Is there a different character that should be used for BibTeX databases
when used with ConTeXt?


According to the documentation, everything outside of entries is 
considered a comment. Inside of entries, there can’t be comments.


Hraban

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

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