[NTG-context] Re: compatibility between \startshapetext and \startsection ?

2024-05-15 Thread Garulfo

Thanks you Wolfgang.

If it's not possible to use \blank, it appears that using for example 
\strut\par\strut\par is OK (but \par\par is not, )


\dorecurse{5}{
\strut\par\strut\par
\leftaligned{Title for section{\recurselevel}}
\strut\par\strut\par
\darkred\input knuth \par
\darkblue\input ward}

Please, what would be a \setuphead that removes the introduction of 
these "uncompatible" verticals skips ?


I've tried several, but even this one isn't compatible.

\setuphead
  [section]
  [before={}, % also tried \blank[nowhite] and \blank[back]
   inbetween={},
   after={},
   beforesection={},
   aftersection={},
   alternative=text,
   style=\tf]


Le 15/05/2024 à 13:09, Wolfgang Schuster a écrit :

garu...@azules.eu schrieb am 14.05.2024 um 23:13:

Hi all,

\startshapetext works pretty well, but when I use \startsection 
\stopsection, shapes are not respected  anymore.
I use layers, to be able to place the content anywhere, but the issue 
remains without layers.


Any clues ?
(\placeinitial seems also to break the shaping)


Example : 2 pages without sectioning, and after 2 pages by 
uncommenting the \startsection and \stopsection commands.



[...]
\dorecurse{5}{
\startsection[title={Title for section{\recurselevel}}]
\darkred\input knuth \par
\darkblue\input ward
\stopsection
}



The problem aren't the section command but the vertical skips added 
before and after each section, you can reproduce the effect when you add 
\blank to your example.


\dorecurse{5}{
\blank
\leftaligned{Title for section{\recurselevel}}
\blank
\darkred\input knuth \par
\darkblue\input ward
}

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: what am I missing in the typescript?

2024-05-15 Thread Wolfgang Schuster

madiazm.eo...@gmail.com schrieb am 15.05.2024 um 14:01:

indeed! thanks a lot, I'm trying different things since yesterday and got no 
clues...

I just adapted it to the other script that works good (and there reads 
[SerifRegular]...[SerifItalic]...[SerifBold]...

why is no Regular needed here? (just trying to learn)


Below is a snippet from font-unk.mkxl where you can see which names are 
mapped
to a certain font alternative, e.g. \tf (the normal upright style) 
expect a fontsynonym

with the name Serif.

\definebodyfont [default] [rm]
  [\s!tf=Serif    sa 1,
   \s!bf=SerifBold    sa 1,
   \s!it=SerifItalic  sa 1,
   \s!sl=SerifSlanted sa 1,
   \s!bi=SerifBoldItalic  sa 1,
   \s!bs=SerifBoldSlanted sa 1,
   \s!sc=SerifCaps    sa 1] % obsolete, is a font feature now

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: applying style to frame content

2024-05-14 Thread Wolfgang Schuster

seyal.zav...@gmail.com schrieb am 14.05.2024 um 09:57:

Hi all,

what is the better way to apply a metapost effect to a piece of any structure 
text
for example when defining footnotes, frames , etc.
i use this method for frames:

this is my MWE:
\defineframed[Myframe][frame=off]
\starttexdefinition spaces protected Mystyle #1
\startMPcode
  picture tt ; tt:= lmt_outline [
kind = "path",
text = "\Myframe{#1}",
  ];
fill
  for i within tt : pathpart i && endfor cycle
  withshademethod "linear"
  withshadedirection up
  withshadecolors (red,blue);
\stopMPcode
\stoptexdefinition

\starttext
\Mystyle{hello}
\stoptext


but what is the proper way if i want to use this style as simple as \tfb in 
definition of this structures? such as:
\defineframed[Myframe][frame=off,style=\tfb\Mystyle,]


You can't apply commands which take arguments (like \Mystyle) to pass 
content fro TeX to Metapost with the style key. The only solution here 
is to create a new commands which takes the content as argument and 
combine the frame and shade in the command definition.


\defineframed[Myframe][frame=off]

\starttexdefinition spaces protected Mystyle #1
   \startMPcode
 picture tt ; tt:= lmt_outline [
   kind = "path",
   text = "#1",
 ];
   fill
 for i within tt : pathpart i && endfor cycle
 withshademethod "linear"
 withshadedirection up
 withshadecolors (red,blue);
   \stopMPcode
\stoptexdefinition

\define[1]\Mycommand
  {\Myframe{\Mystyle{#1}}}

% \define[1]\Mycommand
%   {\Mystyle{\Myframe{#1}}}

\starttext
\Mycommand{hello}
\stoptext

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] applying style to frame content

2024-05-14 Thread seyal . zavira
Hi all,

what is the better way to apply a metapost effect to a piece of any structure 
text
for example when defining footnotes, frames , etc.
i use this method for frames:

this is my MWE:
\defineframed[Myframe][frame=off]
\starttexdefinition spaces protected Mystyle #1
   \startMPcode
 picture tt ; tt:= lmt_outline [
   kind = "path",
   text = "\Myframe{#1}",
 ];
   fill
 for i within tt : pathpart i && endfor cycle
 withshademethod "linear"
 withshadedirection up
 withshadecolors (red,blue);
   \stopMPcode
\stoptexdefinition

\starttext
\Mystyle{hello}
\stoptext


but what is the proper way if i want to use this style as simple as \tfb in 
definition of this structures? such as:
\defineframed[Myframe][frame=off,style=\tfb\Mystyle,]

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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
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 this description environment not showing the correct title?

2024-05-05 Thread Wolfgang Schuster

Mikael Sundqvist schrieb am 05.05.2024 um 16:45:

Hi

On Sun, May 5, 2024 at 4:40 PM Joel via ntg-context  wrote:


\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

I don't know how you want it to look, exactly, but ending the
paragraph helps with the numbering. There is also a start/stop version
that suggests a bit more structure.


Paragraphs act as delimiter for each description in the old form, the 
environment
form is better in this regards because a) you can now use multiple 
paragraphs as

part of a single description and you can avoid problem like Joel has because
it is clear where each description ends.


\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

\startlatexdesc
   [title={1540}]
   some event happened
\stoplatexdesc

\startlatexdesc
   [title={1541}]
   some other event happened
\stoplatexdesc

\startlatexdesc
   [title={1542}]
   some event happened quite different
\stoplatexdesc

\stoptext


An alternative to descriptions for such simple aligned text are item 
with the \txt option.
Both blocks are the same but the second use the start/stop option for 
each item.


\starttext

\startitemize[width=3em,symstyle=bold]
\txt{1540} some event happened
\txt{1541} some other event happened
\txt{1542} some event happened quite different
\stopitemize

\blank[2*line]

\startitemize[width=3em,symstyle=bold]
\startspecialitem[txt]{1540} some event happened \stopspecialitem
\startspecialitem[txt]{1541} some other event happened \stopspecialitem
\startspecialitem[txt]{1542} some event happened quite different 
\stopspecialitem

\stopitemize

\stoptext

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

2024-05-05 Thread Mikael Sundqvist
Hi

On Sun, May 5, 2024 at 4:40 PM Joel via ntg-context  wrote:
>
>
> \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

I don't know how you want it to look, exactly, but ending the
paragraph helps with the numbering. There is also a start/stop version
that suggests a bit more structure.

\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

\startlatexdesc
  [title={1540}]
  some event happened
\stoplatexdesc

\startlatexdesc
  [title={1541}]
  some other event happened
\stoplatexdesc

\startlatexdesc
  [title={1542}]
  some event happened quite different
\stoplatexdesc

\stoptext

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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
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: Switch number and enumeration text

2024-05-04 Thread Wolfgang Schuster

Jethro Djan schrieb am 04.05.2024 um 04:57:

Dear List,

I would like to get something like:

1.1 Theorem instead of Theorem 1.1.

Seems simple enough but can't figure out how to switch the number and 
the text. I have the following MWE:


\defineenumeration[theorem][
   prefix=chapter,
   text=Theorem,
   style=italic,
   headstyle=bold,
   headcommand=\groupedcommand{}{.},
]


\defineenumeration [theorem]
  [...,
   text=,
   stopper=.,
   numbercommand=\groupedcommand{}{ Theorem},
   ...]

or

\defineenumeration [theorem]
  [...,
   text=,
   stopper=.,
   right={ Theorem},
   ...]

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: Switch number and enumeration text

2024-05-04 Thread Henning Hraban Ramm

Am 04.05.24 um 04:57 schrieb Jethro Djan:

Dear List,

I would like to get something like:

1.1 Theorem instead of Theorem 1.1.

Seems simple enough but can't figure out how to switch the number and 
the text. I have the following MWE:


\defineenumeration[theorem][
   prefix=chapter,
   text=Theorem,
   style=italic,
   headstyle=bold,
   headcommand=\groupedcommand{}{.},
]
\starttext


Did you try:

text=,
stopper={ Theorem},

?
There are so many parameters in 
https://wiki.contextgarden.net/Command/setupenumeration and 
https://wiki.contextgarden.net/Command/setupcounter

…


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] Switch number and enumeration text

2024-05-03 Thread Jethro Djan
Dear List,

I would like to get something like:

1.1 Theorem instead of Theorem 1.1.

Seems simple enough but can't figure out how to switch the number and the
text. I have the following MWE:

\defineenumeration[theorem][
  prefix=chapter,
  text=Theorem,
  style=italic,
  headstyle=bold,
  headcommand=\groupedcommand{}{.},
]
\starttext

\chapter{}
\section{}
\starttheorem
This is a theorem
\stoptheorem
\stoptext

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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
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: more register questions!

2024-05-03 Thread Thomas A. Schmitz

Hi Massi,

yes, that was a very good idea! I can detect if the element  
occurs within a footnote by testing


\xmldoiftext {#1} {ancestor::footnote}

and then apply a processor to these entries. That would be a good 
solution for the time being.


Thanks and all best

Thomas

On 5/2/24 17:55, mf wrote:


I did something like that, with a processor that added a "n" after the 
occurrence page number.


Since you typeset XML, maybe you can detect that an index (register) 
reference happens inside a note from the DOM element you are typesetting.


Then you use a command like this:

\index[NoteProcessor->sortkey]{index term}

where NoteProcessor is defined like this:

\defineprocessor[NoteProcessor][right={\itx n}]

In this case I'm adding a smaller "n" to the right of the page number of 
the occurrence.


Adding the \high style is not difficult:

\defineprocessor[NoteProcessor][right=\high{n}]

but replacing a fixed "n" with the footnote number is quite challenging.

The second argument of \defineprocessor has a "command=\...##1" option 
that could be exploited, but I don't know exactly what gets passed to 
that custom command as ##1; maybe the page number of the occurrence.


In that case, I'd look for a way to store the association between that 
occurrence and the footnote number, and retrieve that in the custom 
command.


Massi


--
Prof. Dr. Thomas A. Schmitz
Institut für Klassische und Romanische Philologie
Universität Bonn
Rabinstr. 8
53111 Bonn
http://www.philologie.uni-bonn.de/de/personal/schmitz

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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
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: more register questions!

2024-05-02 Thread mf



Il 02/05/24 17:01, Thomas A. Schmitz ha scritto:

Hi,

making wonderful progress on my registers and translating from xml. 
There is one thing I can't figure out (and I or some other good soul may 
have asked in the past...). Is it possible to mark occurrences in 
footnotes? Ideally, the entry in the register would look like


p. 100\high{20}

to show that the term occurs in note 20 on p. 100. But if that's asking 
too much, I would be content with applying a processor (say, italic) to 
these register entries. From the looks of the tuc file, Context doesn't 
appear to "know" that a register entry is within a footnote. But Hans 
never ceases to amaze me, so maybe there is a way (short of applying 
special markup to these notes in the source)?




I did something like that, with a processor that added a "n" after the 
occurrence page number.


Since you typeset XML, maybe you can detect that an index (register) 
reference happens inside a note from the DOM element you are typesetting.


Then you use a command like this:

\index[NoteProcessor->sortkey]{index term}

where NoteProcessor is defined like this:

\defineprocessor[NoteProcessor][right={\itx n}]

In this case I'm adding a smaller "n" to the right of the page number of 
the occurrence.


Adding the \high style is not difficult:

\defineprocessor[NoteProcessor][right=\high{n}]

but replacing a fixed "n" with the footnote number is quite challenging.

The second argument of \defineprocessor has a "command=\...##1" option 
that could be exploited, but I don't know exactly what gets passed to 
that custom command as ##1; maybe the page number of the occurrence.


In that case, I'd look for a way to store the association between that 
occurrence and the footnote number, and retrieve that in the custom command.


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

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

Am 01.05.24 um 09:44 schrieb Wolfgang Schuster:
but that should be sufficient, but to repeat Hraban's question: What 
would be the advantage of using the format module?


The module provides features like

     - alignment of the verse lines
     - numbering of the lines (which isn't supported by \startlines 
unless you add the normal linenumbering mechanism)
     - support for lines which don't fit on a single page where the 
consecutive lines are indented


but the module is outdated and relies on an old mkii style code base.

A big difference between the \startlines environment and the format 
module is that the first treats
each line in the input file as a separate line in the output while the 
format module requires begin/end

tags for each line which works better for xml input.


Thank you! Doesn’t sound like I should use it…

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

2024-05-01 Thread Wolfgang Schuster

denisma...@mailbox.org schrieb am 30.04.2024 um 14:28:

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


The module provides features like

    - alignment of the verse lines
    - numbering of the lines (which isn't supported by \startlines 
unless you add the normal linenumbering mechanism)
    - support for lines which don't fit on a single page where the 
consecutive lines are indented


but the module is outdated and relies on an old mkii style code base.

A big difference between the \startlines environment and the format 
module is that the first treats
each line in the input file as a separate line in the output while the 
format module requires begin/end

tags for each line which works better for xml input.

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: Font switching for titles and subtitle not working as expected ?

2024-04-30 Thread Wolfgang Schuster

denis.ma...@unibe.ch schrieb am 30.04.2024 um 14:22:


Hi,

I just jumbled upon this question on tex stackexchange : 
https://tex.stackexchange.com/questions/715799/context-switching-font-for-both-title-and-subject#715804


Using the style key as suggested in the accepted answer works, but 
I’ve had a look in to this, and I don’t understand why the original 
code does not work.


I’ve also tried to find a solution using textcommand instead of 
command, but that makes no difference. Only one setting will be 
accepted. As soon as both, titles and subjects, are changed only the 
first change will be accepted.


Is this a bug, or am I missing something?



When you load a typescript only in a local group (e.g. a section title) 
you should always load it

at the start of the document to avoid such side effects.

    \usebodyfont[chorus] % load the chorus typescript
    \setupbodyfont[modern] % set the default font for the document

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] Font switching for titles and subtitle not working as expected ?

2024-04-30 Thread denis.maier
Hi,
I just jumbled upon this question on tex stackexchange : 
https://tex.stackexchange.com/questions/715799/context-switching-font-for-both-title-and-subject#715804
Using the style key as suggested in the accepted answer works, but I've had a 
look in to this, and I don't understand why the original code does not work.
I've also tried to find a solution using textcommand instead of command, but 
that makes no difference. Only one setting will be accepted. As soon as both, 
titles and subjects, are changed only the first change will be accepted.

Is this a bug, or am I missing something?

Best,
Denis


%
% Original MWE

\define[2]\mytitle{%
  \switchtobodyfont[chorus]%
  #2
}

\define[2]\mysubject{%
  \switchtobodyfont[chorus]%
  #2
}

\setuphead[title][command=\mytitle]
\setuphead[subject][command=\mysubject]

\starttext
\title{In Zapf Chancery}
\subject{Apparently the default font. Why?}

And in the default font, just as expected.
\stoptext
%

%
% Adapted MWE
%

\define[1]\mytitleformat{%
  \switchtobodyfont[chorus]%
  #1
}

%\setuphead[subject,title][textcommand=\mytitleformat]
%\setuphead[title][textcommand=\mytitleformat]
\setuphead[subject][textcommand=\mytitleformat] % this will adapt the format 
for subjects, as long as titles are not changed


\starttext
\title{In Zapf Chancery}
\subject{Apparently the default font. Why?}

And in the default font, just as expected.
\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: 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] Re: How to make superscript text match footnote mark formatting?

2024-04-27 Thread Wolfgang Schuster

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] Re: Combine lua and btx setup, was: Re: Customize citation format of a bibliography (use the short form as reference format)

2024-04-25 Thread Gerion Entrup
I solved it, although it's kinda hacky. I'm pretty sure that
publications.citevariants.short is not meant to be called directly.

Do you know why `context.getdetail(dataset, tag, "author")` does not work in 
render_cite?
It always returns nil.


```
\setupinteraction[state=start]

\startbuffer[testdata]
@Book{knuth1,
author = {Donald E. Knuth},
title = {TEX and METAFONT. New directions in typesetting},
year = {1979},
publisher = {Addison-Wesley},
}
@Article{someother,
author = {Some Person and Some Otherperson},
title = {Another title},
year = {1900},
}
\stopbuffer

% enable tracing
\enabletrackers[publications, publications.crossref, publications.details, 
publications.cite, publications.strings]

\usebtxdataset[main][testdata.buffer]
\usebtxdefinitions[aps]
\setupbtx[dataset=main]
\definebtxrendering[bibrendering][aps][dataset=main, numbering=short]
\setupbtxlist[aps][
  alternative=b,
  distance=.5em,
]

\definebtx[aps:cite:special][aps:cite]
\startluacode
function render_cite(dataset, tag, righttext)
local luadata = publications.datasets[dataset].luadata
local entry = luadata[tag]
local extrasign = ""
if entry.author:lower():find("knuth") then
extrasign = ">"
end
context("[" .. extrasign)
print(righttext)
publications.citevariants.short({dataset = dataset, reference = tag, 
variant = "short", righttext = righttext})
context("]")
end
\stopluacode

\startsetups btx:aps:cite:special
\btxcitereference
\ctxlua{render_cite([==[\currentbtxdataset]==], [==[\currentbtxtag]==], 
[==[\currentbtxrighttext]==])}
\stopsetups
\setupbtx[aps:cite][alternative=special]

\starttext

\def\comma{,}

Knuth developed \TeX~\cite[knuth1]
Several persons said something~\cite[someother].

\placelistofpublications[bibrendering]

\stoptext
```

Gerion

Am Dienstag, 23. April 2024, 16:03:50 MESZ schrieb Gerion Entrup:
> Here is a solution for the first part of my question. This is based on
> https://www.mail-archive.com/ntg-context@ntg.nl/msg101156.html
> and try and error based on publ-imp-aps.mkvi and publ-imp-apa.mkvi:
> 
> It display now the citation _and_ numbering labels in the short form:
> ```
> \setupinteraction[state=start]
> 
> \startbuffer[testdata]
> @Book{knuth1,
>   author = {Donald E. Knuth},
>   title = {TEX and METAFONT. New directions in typesetting},
>   year = {1979},
>   publisher = {Addison-Wesley},
> }
> @Article{someother,
>   author = {Some Person and Some Otherperson},
>   title = {Another title},
>   year = {1900},
> }
> \stopbuffer
> 
> % enable tracing
> \enabletrackers[publications, publications.crossref, publications.details, 
> publications.cite, publications.strings]
> 
> \usebtxdataset[main][testdata.buffer]
> \usebtxdefinitions[aps]
> \setupbtx[dataset=main]
> \definebtxrendering[bibrendering][aps][dataset=main, numbering=short]
> \setupbtxlist[aps][
>   alternative=b,
>   distance=.5em,
> ]
> \setupbtx[aps:cite][alternative=short]
> 
> \starttext
> 
> Knuth developed \TeX \cite[knuth1]
> Several persons said something \cite[someother].
> 
> \placelistofpublications[bibrendering]
> 
> \stoptext
> ```
> 
> The remaining part now is to mark publications of Knuth in a different way.
> I have tried this and failed. Here is my code so far:
> ```
> \startluacode
> function render_cite(short, author)
>   print(author)
>   if author:lower():find("knuth") then
>   context("[>" .. short .. "]")
>   else
>   context("[" .. short .. "]")
>   end
> end
> \stopluacode
> \definebtx[aps:cite:special][aps:cite]
> \startsetups btx:aps:cite:special
>   \btxcitereference
>   \ctxlua{render_cite([==[\btxflush{year}]==], [==[\btxflush{author}]==])}
> \stopsetups
> % use it with \cite[special][knuth1]
> ```
> This has several problems:
> - \btxflush{short} does not work as I expected that. How can I get the short 
> form?
> - \btxflush to pass arguments to lua does not work as intended. On the lua 
> side the
>variable "author" resolves to "\btxflushauthor{author}" and not to "D. E. 
> Knuth".
>How can I pass the data?
> 
> I use Lua only because I find it more convenient as a programming language. 
> If a
> plain tex solution is simpler, I'm happy to use that. 
> 
> 
> Another question that came up while studying the source code:
> What effect have \c!, \s!, and \v!? These commands exist a lot in the above
> cited files.
> 
> Gerion
> 
> 
> Am Mittwoch, 17. Ap

[NTG-context] Define a new command that inherits from multiple other command options

2024-04-25 Thread ai2472206007
hi!

I'm new to ConTeXt. I want to define a command with sidenote function. This 
[setupsidenote] command inherits the options of [setupmargindata], 
[setupcounter] and [setupframed]. just like [setupenumeration] inherits the 
option of [setupcounter].

I've defined the following sidenote command by searching, and I know how to 
define a new option for it. But what I don't know is how to get it to inherit 
the options of other commands and perform these features correctly.

Any clue is warmly welcome.

```
% macros=mkvi
\unprotect
\installnamespace  {sidenote}
\installcommandhandler \sidenote  {sidenote}  \sidenote
\setupsidenote[
   align=,
   conversion=n,
   way=bytext,
   style=,
]

\definecounter[SidenoteMarkNumber] [prefix=no]
\definemargindata [SidenoteContent][outer]
  [margin=margin,width=\outermarginwidth]
\setupmargindata  [SidenoteContent][stack=yes,style=\it]
\def\sidenotemark{\rawcountervalue[SidenoteMarkNumber]}
\def\convertsidenotemark#1{\high{\convertnumber{#1}{\sidenotemark}}}
\def\sidenote{\dosingleempty\dosidenote}
\def\dosidenote[#1]#2{%
\getparameters[SMsidenote]
  [align=\sidenoteparameter{align},
  conversion=\sidenoteparameter{conversion},
  way=\sidenoteparameter{way},
   #1]%
 \setupcounter[SidenoteMarkNumber] [#1]
 \incrementcounter[SidenoteMarkNumber]
 \convertsidenotemark{\SMsidenoteconversion}% mark in text
 \SidenoteContent[#1]{\setscript[hanzi]\setup[\SMsidenotealign]%
  \convertsidenotemark{\SMsidenoteconversion}% mark with 
note
  #2
}}
\protect
\starttext
天地玄黄,宇宙洪荒。日月盈昃,辰宿列张。寒来暑往,秋收冬\sidenote[align=flushleft] {天地玄黄,宇宙洪荒。}
\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] Combine lua and btx setup, was: Re: Customize citation format of a bibliography (use the short form as reference format)

2024-04-23 Thread Gerion Entrup
Here is a solution for the first part of my question. This is based on
https://www.mail-archive.com/ntg-context@ntg.nl/msg101156.html
and try and error based on publ-imp-aps.mkvi and publ-imp-apa.mkvi:

It display now the citation _and_ numbering labels in the short form:
```
\setupinteraction[state=start]

\startbuffer[testdata]
@Book{knuth1,
author = {Donald E. Knuth},
title = {TEX and METAFONT. New directions in typesetting},
year = {1979},
publisher = {Addison-Wesley},
}
@Article{someother,
author = {Some Person and Some Otherperson},
title = {Another title},
year = {1900},
}
\stopbuffer

% enable tracing
\enabletrackers[publications, publications.crossref, publications.details, 
publications.cite, publications.strings]

\usebtxdataset[main][testdata.buffer]
\usebtxdefinitions[aps]
\setupbtx[dataset=main]
\definebtxrendering[bibrendering][aps][dataset=main, numbering=short]
\setupbtxlist[aps][
  alternative=b,
  distance=.5em,
]
\setupbtx[aps:cite][alternative=short]

\starttext

Knuth developed \TeX \cite[knuth1]
Several persons said something \cite[someother].

\placelistofpublications[bibrendering]

\stoptext
```

The remaining part now is to mark publications of Knuth in a different way.
I have tried this and failed. Here is my code so far:
```
\startluacode
function render_cite(short, author)
print(author)
if author:lower():find("knuth") then
context("[>" .. short .. "]")
else
context("[" .. short .. "]")
end
end
\stopluacode
\definebtx[aps:cite:special][aps:cite]
\startsetups btx:aps:cite:special
\btxcitereference
\ctxlua{render_cite([==[\btxflush{year}]==], [==[\btxflush{author}]==])}
\stopsetups
% use it with \cite[special][knuth1]
```
This has several problems:
- \btxflush{short} does not work as I expected that. How can I get the short 
form?
- \btxflush to pass arguments to lua does not work as intended. On the lua side 
the
   variable "author" resolves to "\btxflushauthor{author}" and not to "D. E. 
Knuth".
   How can I pass the data?

I use Lua only because I find it more convenient as a programming language. If a
plain tex solution is simpler, I'm happy to use that. 


Another question that came up while studying the source code:
What effect have \c!, \s!, and \v!? These commands exist a lot in the above
cited files.

Gerion


Am Mittwoch, 17. April 2024, 15:44:12 MESZ schrieb Gerion Entrup:
> Hi,
> 
> > The APS style is an example of a number-based citation system. As you
> > are looking for a tag-based citation, it might be better to start with
> > something like the APA style.
> 
> I'm kind of satisfied with the publication-list layout of the APS style so I 
> chose
> this as a base. If it is simpler to start with the APA style, I can do that.
> 
> My hope is that it is possible to just change the "label" that is used for
> referencing and keep everything else as is.
> 
> > Is there some specification for your short tag-based citation style?
> 
> biblatex implements this with the "alphabetic" style. I'm not aware of
> a specification, though. Does the "short" form in ConTeXt exist for a
> specific reason? :)
> 
> Gerion
> 
> > On Tue, 16 Apr 2024 06:04:35 +0200
> > Gerion Entrup  wrote:
> > 
> > > Hi,
> > > 
> > > I'm trying to customize a cite format in a bibliography. Currently,
> > > I'm using the aps style which fits so far, except of the plain number
> > > as reference. In concrete, I want to change the following:
> > > - Use the first letter of the last name and the year as reference
> > > (this should be exactly the short form). It is more less also
> > > described here [1].
> > > - Highlight publications of a certain author with an extra char (e.g.
> > > '>')
> > > 
> > > Here is a minimal example (lets assume, every occurrence of Knuth
> > > should be highlighted): ```
> > > \setupinteraction[state=start]
> > > 
> > > \startbuffer[testdata]
> > > @Book{knuth1,
> > >   author = {Donald E. Knuth},
> > >   title = {TEX and METAFONT. New directions in typesetting},
> > >   year = {1979},
> > >   publisher = {Addison-Wesley},
> > > }
> > > @Article{someother,
> > >   author = {Some Person and Some Otherperson},
> > >   title = {Another title},
> > >   year = {1900},
> > > }
> > > \stopbuffer
> > > 
> > > % enable tracing
> > > \enabletrackers[publications, publications.crossref,
> > > publications.details, publications.cite, publications.strings]

[NTG-context] Re: Customize citation format of a bibliography (use the short form as reference format)

2024-04-17 Thread Gerion Entrup
Hi,

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

I'm kind of satisfied with the publication-list layout of the APS style so I 
chose
this as a base. If it is simpler to start with the APA style, I can do that.

My hope is that it is possible to just change the "label" that is used for
referencing and keep everything else as is.

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

biblatex implements this with the "alphabetic" style. I'm not aware of
a specification, though. Does the "short" form in ConTeXt exist for a
specific reason? :)

Gerion

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



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

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

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

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

Alan



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

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



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

Conserve energy! ;-)
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[NTG-context] Customize citation format of a bibliography (use the short form as reference format)

2024-04-15 Thread Gerion Entrup
Hi,

I'm trying to customize a cite format in a bibliography. Currently, I'm using 
the aps style which fits so far, except of the plain number as reference.
In concrete, I want to change the following:
- Use the first letter of the last name and the year as reference (this should 
be exactly the short form). It is more less also described here [1].
- Highlight publications of a certain author with an extra char (e.g. '>')

Here is a minimal example (lets assume, every occurrence of Knuth should be 
highlighted):
```
\setupinteraction[state=start]

\startbuffer[testdata]
@Book{knuth1,
author = {Donald E. Knuth},
title = {TEX and METAFONT. New directions in typesetting},
year = {1979},
publisher = {Addison-Wesley},
}
@Article{someother,
author = {Some Person and Some Otherperson},
title = {Another title},
year = {1900},
}
\stopbuffer

% enable tracing
\enabletrackers[publications, publications.crossref, publications.details, 
publications.cite, publications.strings]

\usebtxdataset[main][testdata.buffer]
\usebtxdefinitions[aps]
\setupbtx[dataset=main]
\definebtxrendering[bibrendering][aps][dataset=main]

% this seems to have no effect?
\setupbtx[alternative=short]

\starttext

Knuth developed \TeX \cite[knuth1].
Several persons said something \cite[someother].

\placelistofpublications[bibrendering]

\stoptext
```

It should be rendered as:
```
Knuth developed TeX [>Knu79].
Several persons said something [PO00].

[Knu79] D.E. Knuth, TEX and METAFONT. New directions in typesetting 
(Addi­son-Wesley, 1979).
[PO00]  S. Person and S. Otherperson, Another title, (1900).
```

How can I achieve that \cite[something] always renders in the short form by 
default?
How can I customize that references to Knuth contain this extra '>'?
How can I customize the APS style to also use the short form in the list of 
publications instead of numbers?

Best
Gerion

[1] 
https://tex.stackexchange.com/questions/295444/citation-style-with-first-letters-of-authors-lastname

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: Most recent context doesn't like synctex?

2024-04-15 Thread Jim
Hi Mikael (and other synctex users),

On Sat, Apr 13, 2024 at 22:28 (+0200), Mikael Sundqvist wrote:

> Hi,

> On Sat, Apr 13, 2024 at 7:54 PM Jim  wrote:

>> Thanks for the quick reply.

>> On Sat, Apr 13, 2024 at 09:18 (+0200), Hans Hagen wrote:

>>> On 4/13/2024 12:39 AM, Jim wrote:
>>>> Hi,

>>>> I have both TeXlive 2024 and the stand-alone ConTeXt distribution on my
>>>> system.

>>>> Recently, the stand-alone ConTeXt distribution seems to not create a
>>>> synctex file any more.  Specifically,

>>>>  /usr/local/context/tex/texmf-linux-64/bin/context --once --texutil 
>>>> --synctex=1 --nonstop file.tex

>>>> does not create a .synctex file (and deletes it, if it is there), whereas
>>>> the TeXlive version

>>>>  /usr/local/texlive/2024/bin/x86_64-linux/context --once --texutil 
>>>> --synctex=1 --nonstop nwg_newsletter_2024_04.tex

>>>> does create the .synctex file.


>>>> The ConTeXt distribution version *does* create the file if --nonstop is
>>>> *not* used.  Knowing that, I can work around this for now, although
>>>> emacs+auctex probably won't be happy without --nonstop.

>>>> I updated the stand-alone ConTeXt a few minutes ago, so I'm up to date on
>>>> that.

>>>> Is this a bug introduced by some recent change?

>>> it's more a feature

>> I guess one person's bug is another person's feature.  :-)

>>> - Mikael S and i spend some time with editor/viewer combinations on linux in
>>> order to find ways around the different synctex libs that they use

>>> - as a result we could make most work ok

>> Are these recent changes?  And should emacs+auctex+PDFview work now?

> What will work will depend on the viewers.  We noticed a few weeks ago
> that synctex (pdf -> editor) was not working in a few viewers (okular)
> while it was working in others.  After some debugging, our conclusion
> was that different versions of the library/application were used, or
> different approaches.  We found a way to generate the stuff in the pdf
> to make it work for the failing viewers we had.  Hans did then not
> replace this with the old approach, since then the previously working
> viewers might break.  He therefore added repeat as a key, so
> \setupsynctex[state=repeat] will use the new approach.

Thanks for that clarification.


>>> - we assume that synctex is set up in the document with

>>> \setupsynctex[state=start]
>>> \setupsynctex[state=repeat] % less efficient but gets around issue

>> I haven't been using either of those, since auctex does The Right Thing for
>> me.  Or, at least, it used to.

>>> - when context is run 'headless' (on a server) it's often done in
>>> batchmode because one knows that the style works and in that case synctex
>>> makes no sense so we disable it; this avoids the need to patch the style

>> I (think I) see what you are saying, but if one explicitly uses --synctex
>> on the command line, should that not over-ride the over-ride?  Or, put
>> another way, would the following not make sense:
>> if --synctex is used on the command line
>> create synctex file
>> else if --nonstop is used on the command line
>> do not create the synctex file
>> else if \setupsynctex[...] is used in the source file
>> create the synctex file
>> else
>> do not create the synctex file

>>> - the manual has been updates

> workflows-synctex.tex now suggests:

> "When your viewer doesn't return to the editor, you can try

> \starttyping
> \setupsynctex[state=repeat]
> \stoptyping

> or

> \starttyping
> context --synctex=repeat somefile.tex
> \stoptyping

> This will give a bit larger file that tries to fool the areas resolver in the
> library that the viewer uses."

Looking at two synctex files, it would seem that the state=repeat version
creates a synctex file that has syntax matching the "original" synctex
format.  And you are right, the file is bigger.

In any case, now that I know what is going on, I have convinced auctex to
play nicely with the new way of doing things, and so all is now good.


Question for anyone who made it down this far:
Is there a mailing list or other way that a ConTeXt user can find out about
non-backward-compatible changes like this?  I wasted a fair amount of time
tracking this problem down (*), and if there is some other mailing list I
should be subscribed to, I'd love to know about it.

(*) Unfortunately, this change to ConTeXt happened around the same time I
upgraded emacs from 27.2 to 29.3, and when things didn't work I upgraded
auctex from 13.

[NTG-context] Wiki - question about Command/ pages which start with a space character

2024-04-14 Thread garulfo
Hi all,

Is it on purpose that 128 pages "https://wiki.contextgarden.net/Command/ 
" start with a space character ?
I didn't find an explanation in https://wiki.contextgarden.net/Command

For example, these two pages exist :
- https://wiki.contextgarden.net/Command/startbuffer
- https://wiki.contextgarden.net/Command/_startbuffer

If it is on purpose: 
- What is the purpose, and which page should contain which documentation?

If it is not: 
- Is there a way to automatically merge the content of the couple of pages, and 
to remove the "wrong" pages, or should it be done manually ?

Thanks for your help.

List :
Command/ attachment
Command/ background
Command/ bar
Command/ beginblock
Command/ button
Command/ characterkerning
Command/ comment
Command/ completecombinedlist
Command/ completelistoffloats
Command/ completelistofsorts
Command/ completelistofsynonyms
Command/ completeregister
Command/ copylabeltext
Command/ ctxfunction
Command/ ctxfunctiondefinition
Command/ currentlabel
Command/ delimitedtext
Command/ description
Command/ enumeration
Command/ fence
Command/ fraction
Command/ framed
Command/ framedtext
Command/ getbuffer
Command/ hbox
Command/ help
Command/ high
Command/ highlight
Command/ label
Command/ labellanguage
Command/ labeltext
Command/ labeltexts
Command/ language
Command/ leftlabeltext
Command/ linenote
Command/ low
Command/ lowhigh
Command/ lowmidhigh
Command/ margindata
Command/ mathcommand
Command/ mathdoubleextensible
Command/ mathextensible
Command/ mathframed
Command/ mathmatrix
Command/ mathornament
Command/ mathoverextensible
Command/ mathovertextextensible
Command/ mathradical
Command/ mathtriplet
Command/ mathunderextensible
Command/ mathundertextextensible
Command/ mathunstacked
Command/ nextparagraphs
Command/ note
Command/ ornament
Command/ paragraphs
Command/ placecombinedlist
Command/ placefloat
Command/ placelistoffloats
Command/ placelistofsorts
Command/ placelistofsynonyms
Command/ placement
Command/ placepairedbox
Command/ placeregister
Command/ presetlabeltext
Command/ referenceformat
Command/ register
Command/ rightlabeltext
Command/ script
Command/ section
Command/ seeregister
Command/ setupcombinedlist
Command/ setupitemgroup
Command/ setuplabeltext
Command/ setuppairedbox
Command/ setupregister
Command/ shift
Command/ sorting
Command/ startattachment
Command/ startbackground
Command/ startbuffer
Command/ startcolumnset
Command/ startcomment
Command/ startdelimitedtext
Command/ startdescription
Command/ starteffect
Command/ startenumeration
Command/ startfittingpage
Command/ startfloattext
Command/ startformula
Command/ startframedtext
Command/ starthelp
Command/ startindentedtext
Command/ startitemgroup
Command/ startlabeltext
Command/ startlinenote
Command/ startlines
Command/ startmakeup
Command/ startmathalignment
Command/ startmathcases
Command/ startmathmatrix
Command/ startmixedcolumns
Command/ startnarrower
Command/ startnote
Command/ startpagecolumns
Command/ startparagraphs
Command/ startparallel
Command/ startplacefloat
Command/ startplacepairedbox
Command/ startsection
Command/ startsectionblock
Command/ startstartstop
Command/ startstop
Command/ startstyle
Command/ starttabulate
Command/ starttextbackground
Command/ starttyping
Command/ startviewerlayer
Command/ startxtable
Command/ stoplinenote
Command/ style
Command/ synonym
Command/ textbackground
Command/ textnote
Command/ tooltip
Command/ type
Command/ typebuffer
Command/ unit
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
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: Most recent context doesn't like synctex?

2024-04-13 Thread Mikael Sundqvist
Hi,

On Sat, Apr 13, 2024 at 7:54 PM Jim  wrote:
>
> Thanks for the quick reply.
>
> On Sat, Apr 13, 2024 at 09:18 (+0200), Hans Hagen wrote:
>
> > On 4/13/2024 12:39 AM, Jim wrote:
> >> Hi,
>
> >> I have both TeXlive 2024 and the stand-alone ConTeXt distribution on my
> >> system.
>
> >> Recently, the stand-alone ConTeXt distribution seems to not create a
> >> synctex file any more.  Specifically,
>
> >>  /usr/local/context/tex/texmf-linux-64/bin/context --once --texutil 
> >> --synctex=1 --nonstop file.tex
>
> >> does not create a .synctex file (and deletes it, if it is there), whereas
> >> the TeXlive version
>
> >>  /usr/local/texlive/2024/bin/x86_64-linux/context --once --texutil 
> >> --synctex=1 --nonstop nwg_newsletter_2024_04.tex
>
> >> does create the .synctex file.
>
>
> >> The ConTeXt distribution version *does* create the file if --nonstop is
> >> *not* used.  Knowing that, I can work around this for now, although
> >> emacs+auctex probably won't be happy without --nonstop.
>
> >> I updated the stand-alone ConTeXt a few minutes ago, so I'm up to date on
> >> that.
>
> >> Is this a bug introduced by some recent change?
>
> > it's more a feature
>
> I guess one person's bug is another person's feature.  :-)
>
> > - Mikael S and i spend some time with editor/viewer combinations on linux in
> > order to find ways around the different synctex libs that they use
>
> > - as a result we could make most work ok
>
> Are these recent changes?  And should emacs+auctex+PDFview work now?

What will work will depend on the viewers. We noticed a few weeks ago
that synctex (pdf -> editor) was not working in a few viewers (okular)
while it was working in others. After some debugging, our conclusion
was that different versions of the library/application were used, or
different approaches. We found a way to generate the stuff in the pdf
to make it work for the failing viewers we had. Hans did then not
replace this with the old approach, since then the previously working
viewers might break. He therefore added repeat as a key, so
\setupsynctex[state=repeat] will use the new approach.

>
> > - we assume that synctex is set up in the document with
>
> > \setupsynctex[state=start]
> > \setupsynctex[state=repeat] % less efficient but gets around issue
>
> I haven't been using either of those, since auctex does The Right Thing for
> me.  Or, at least, it used to.
>
> > - when context is run 'headless' (on a server) it's often done in
> > batchmode because one knows that the style works and in that case synctex
> > makes no sense so we disable it; this avoids the need to patch the style
>
> I (think I) see what you are saying, but if one explicitly uses --synctex
> on the command line, should that not over-ride the over-ride?  Or, put
> another way, would the following not make sense:
> if --synctex is used on the command line
> create synctex file
> else if --nonstop is used on the command line
> do not create the synctex file
> else if \setupsynctex[...] is used in the source file
> create the synctex file
> else
> do not create the synctex file
>
> > - the manual has been updates

workflows-synctex.tex now suggests:

"When your viewer doesn't return to the editor, you can try

\starttyping
\setupsynctex[state=repeat]
\stoptyping

or

\starttyping
context --synctex=repeat somefile.tex
\stoptyping

This will give a bit larger file that tries to fool the areas resolver in the
library that the viewer uses."

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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
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: Most recent context doesn't like synctex?

2024-04-13 Thread Jim
Thanks for the quick reply.

On Sat, Apr 13, 2024 at 09:18 (+0200), Hans Hagen wrote:

> On 4/13/2024 12:39 AM, Jim wrote:
>> Hi,

>> I have both TeXlive 2024 and the stand-alone ConTeXt distribution on my
>> system.

>> Recently, the stand-alone ConTeXt distribution seems to not create a
>> synctex file any more.  Specifically,

>>  /usr/local/context/tex/texmf-linux-64/bin/context --once --texutil 
>> --synctex=1 --nonstop file.tex

>> does not create a .synctex file (and deletes it, if it is there), whereas
>> the TeXlive version

>>  /usr/local/texlive/2024/bin/x86_64-linux/context --once --texutil 
>> --synctex=1 --nonstop nwg_newsletter_2024_04.tex

>> does create the .synctex file.


>> The ConTeXt distribution version *does* create the file if --nonstop is
>> *not* used.  Knowing that, I can work around this for now, although
>> emacs+auctex probably won't be happy without --nonstop.

>> I updated the stand-alone ConTeXt a few minutes ago, so I'm up to date on
>> that.

>> Is this a bug introduced by some recent change?

> it's more a feature

I guess one person's bug is another person's feature.  :-)

> - Mikael S and i spend some time with editor/viewer combinations on linux in
> order to find ways around the different synctex libs that they use

> - as a result we could make most work ok

Are these recent changes?  And should emacs+auctex+PDFview work now?

> - we assume that synctex is set up in the document with

> \setupsynctex[state=start]
> \setupsynctex[state=repeat] % less efficient but gets around issue

I haven't been using either of those, since auctex does The Right Thing for
me.  Or, at least, it used to.

> - when context is run 'headless' (on a server) it's often done in
> batchmode because one knows that the style works and in that case synctex
> makes no sense so we disable it; this avoids the need to patch the style

I (think I) see what you are saying, but if one explicitly uses --synctex
on the command line, should that not over-ride the over-ride?  Or, put
another way, would the following not make sense:
if --synctex is used on the command line
create synctex file
else if --nonstop is used on the command line
do not create the synctex file
else if \setupsynctex[...] is used in the source file
create the synctex file
else
do not create the synctex file

> - the manual has been updates

Ummm... I hunted around for a while, but I did not find out which manual
was updated.  The synctex wiki page has not been updated, nor has the
"workflow support in context" manual.  Can you tell me which manual I
should go look at?

> - running context in nonstop mode makes little sense

Guessing wildly, I assume the auctex author(s) didn't want processes
sitting there waiting for input on errors, like plain TeX would normally
do.  But perhaps the addition of --nonstopmode for ConTeXt is incorrect
and/or redundant in April of 2024.

> (maybe, as power user, Mikael remembers more details)

Mikael?  Any thoughts to share?


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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
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: Most recent context doesn't like synctex?

2024-04-13 Thread Hans Hagen

On 4/13/2024 12:39 AM, Jim wrote:

Hi,

I have both TeXlive 2024 and the stand-alone ConTeXt distribution on my
system.

Recently, the stand-alone ConTeXt distribution seems to not create a
synctex file any more.  Specifically,

 /usr/local/context/tex/texmf-linux-64/bin/context --once --texutil 
--synctex=1 --nonstop file.tex

does not create a .synctex file (and deletes it, if it is there), whereas
the TeXlive version

 /usr/local/texlive/2024/bin/x86_64-linux/context --once --texutil 
--synctex=1 --nonstop nwg_newsletter_2024_04.tex

does create the .synctex file.


The ConTeXt distribution version *does* create the file if --nonstop is
*not* used.  Knowing that, I can work around this for now, although
emacs+auctex probably won't be happy without --nonstop.

I updated the stand-alone ConTeXt a few minutes ago, so I'm up to date on
that.

Is this a bug introduced by some recent change?

it's more a feature

- Mikael S and i spend some time with editor/viewer combinations on 
linux in order to find ways around the different synctex libs that they use


- as a result we could make most work ok

- we assume that synctex is set up in the document with

\setupsynctex[state=start]
\setupsynctex[state=repeat] % less efficient but gets around issue

- when context is run 'headless' (on a server) it's often done in 
batchmode because one knows that the style works and in that case 
synctex makes no sense so we disable it; this avoids the need to patch 
the style


- the manual has been updates

- running context in nonstop mode makes little sense

(maybe, as power user, Mikael remembers more details)

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: Figure reference failing

2024-04-10 Thread Willi Egger
Hm, I see.

This question appeared while using the tug-boat-style. Taking the example at 
the end of the style I adapted my article accordingly. However I missed the 
point to enable the mode “columns”…

Thanks for the explanation!
Willi

> On 10 Apr 2024, at 14:21, Hans Hagen  wrote:
> 
> On 4/10/2024 1:30 PM, Taco Hoekwater wrote:
>>> On 10 Apr 2024, at 13:04, Willi Egger  wrote:
>>> 
>>> Hello,
>>> 
>>> It seems, that the referencing mechanism is failing. I detected this with 
>>> the January version and the current version: 2024.04.01 08:59.
>>> 
>>> Could some one confirm this?
>> It fails for me as well, when "mode=columns" is used.
> compare with and without mode columns:
> 
> \starttext
> 
>\enablemode[columns]
> 
>As we see \doifelsemode {columns} {in \in {table} [demo-1]} {below} we can 
> have
>more than one cell in a row.
> 
>\startplacetable[mode=columns,reference=demo-1]
>\externalfigure[cow][width=\textwidth]
>\stopplacetable
> 
>\samplefile{tufte}
> 
> \stoptext
> 
> so basically we have an "at the spot" placement or a float
> 
> 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
> ___

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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
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 apply metapost effects to section title?

2024-04-09 Thread Wolfgang Schuster

seyal.zav...@gmail.com schrieb am 09.04.2024 um 14:53:

i want to produce a gradient header
i tried this code but it does not produce any result:

\startext
\def\Mystyle#1{\startMPcode
   picture tt ; tt := lmt_outline [
   kind = "path",
   text = "#1",
   ] ;
   fill
   for i within tt : pathpart i && endfor cycle
  withshademethod "linear"
  withshadedirection up
  withshadecolors (red, blue) ;
\stopMPcode
}

\definehead[Myhead][section]
\setuphead[Myhead][
   style=\Mystyle,
]
\startMyhead[title=sample] a sample text \stopMyhead
\stoptext


You can't use commands with parameters as argument for the style key.

To format single parts (number or title) of a section title you have to 
apply a command to the "deep...command" key but even then you have to 
make manual changes to the vertical alignment of the text.


 begin example
\starttexdefinition spaces Mystyle #1
  \setbox\scratchboxone\hbox{#1}%
  \setbox\scratchboxtwo\hbox\bgroup
\startMPcode
  picture tt ; tt := lmt_outline [
kind = "path",
text = "#1",
  ];
fill
  for i within tt : pathpart i && endfor cycle
  withshademethod "linear"
  withshadedirection up
  withshadecolors (red, blue) ;
\stopMPcode
  \egroup
  \boxyoffset\scratchboxtwo-\dp\scratchboxone
  \box\scratchboxtwo
\stoptexdefinition

\starttext

\setuphead
  [section]
  [
 deeptextcommand=\Mystyle,
%  deepnumbercommand=\Mystyle,
  ]

\startsection[title=Lorem ipsum]
\samplefile{lorem}
\stopsection

\stoptext
 end example


and the code below works but does not colorize numbers of this heads:
\starttext
 
\def\Mystyle#1{\startMPcode

   picture tt ; tt := lmt_outline [
   kind = "path",
   text = "#1",
   ] ;
   fill
   for i within tt : pathpart i && endfor cycle
  withshademethod "linear"
  withshadedirection up
  withshadecolors (red, blue) ;
\stopMPcode
}
 
\def\startMysection#1{\startsection[title=\Mystyle{#1}]}

\def\stopMysection{\stopsection}
 
\startMysection{hello}

what is best method?
\stopMysection
 
\stoptext


what is your suggestion?


To apply the format the the complete section title you have to create 
your own style and apply it with the "command" key, to get the number 
and title for the current section use the \structurenumber and 
\structuretitle macros.


 begin example
\starttexdefinition spaces protected Mystyle #1#2
  \startMPcode
picture tt ; tt := lmt_outline [
  kind = "path",
  text = "\structurenumber\space\structuretitle",
];
  fill
for i within tt : pathpart i && endfor cycle
withshademethod "linear"
withshadedirection up
withshadecolors (red, blue) ;
  \stopMPcode
\stoptexdefinition

\starttext

\setuphead
  [section]
  [command=\Mystyle]

\startsection[title=Lorem ipsum]
\samplefile{lorem}
\stopsection

\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 apply metapost effects to section title?

2024-04-09 Thread seyal . zavira
i want to produce a gradient header
i tried this code but it does not produce any result:

\startext
\def\Mystyle#1{\startMPcode
  picture tt ; tt := lmt_outline [
  kind = "path",
  text = "#1",
  ] ;
  fill
  for i within tt : pathpart i && endfor cycle
 withshademethod "linear"
 withshadedirection up
 withshadecolors (red, blue) ;
\stopMPcode
}

\definehead[Myhead][section]
\setuphead[Myhead][
  style=\Mystyle,
]
\startMyhead[title=sample] a sample text \stopMyhead
\stoptext

and the code below works but does not colorize numbers of this heads:
\starttext  



\def\Mystyle#1{\startMPcode 

  picture tt ; tt := lmt_outline [  

  kind = "path",

  text = "#1",  

  ] ;   

  fill  

  for i within tt : pathpart i && endfor cycle  

 withshademethod "linear"   

 withshadedirection up  

 withshadecolors (red, blue) ;  

\stopMPcode 

}   



\def\startMysection#1{\startsection[title=\Mystyle{#1}]}

\def\stopMysection{\stopsection}



\startMysection{hello}  

what is best method?

\stopMysection  



\stoptext

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

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


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

2024-03-22 Thread Ursula Hermann
Dear Pablo,


Many thanks for your example. Sorry for writing so late.

At least I found out, how it works for me .  This is the best way.


\setuppapersize[A8,landscape]
\setupbodyfont[termes, 12.50pt]
\setuplayout[inrightmargin=5.1cm
 backspace=2.9cm,
 inleftmargin=0cm,width=4cm]
\inrightmargin{\blackrule\\{3.2.2}}\par \dontleavehmode \blackrule
\showframe
\starttext
Me

\stoptext




Von: Pablo Rodriguez via ntg-context 
Gesendet: Freitag, 15. März 2024 20:00:35
An: ntg-context@ntg.nl
Cc: Pablo Rodriguez
Betreff: [NTG-context] Re: Struggling with the distance and right margin text

On 3/15/24 14:06, Ursula Hermann wrote:
> Dear List,

Dear Ursula,

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

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

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

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

Some comments on the code fragments you sent.

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

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

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

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

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

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

Sorry, but I don’t get it.

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

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

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

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

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

Here starts your text:

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

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

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

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

Or, do you define commands for each page?

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

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

Again, margin text commands defined, but never used.

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

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

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

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

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

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

BTW, it is exactly t

[NTG-context] Re: Comments placed in the margin

2024-03-19 Thread Jean-Pierre Delange

Hi Jeroen,

You can try this :

\setupmargindata[inmargin][location=inner, 
style={\ssx\setupinterlinespace[line=2.8ex]}]


\setupmarginframed[inmargin][align=left]


Sorry if I send owls to Athens !


JP


Le 19/03/2024 à 15:38, Jeroen a écrit :
For comments that are placed in the margin, the \inleft{}, \inouter{} 
etc will place text in the margin in bold. Can this text be placed in 
the margin in regular text or possibly in slightly smaller font size 
compared to the regular text in the document?


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

maillist :ntg-context@ntg.nl  
/https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  :https://www.pragma-ade.nl  /https://context.aanhet.net  (mirror)
archive  :https://github.com/contextgarden/context
wiki :https://wiki.contextgarden.net
__
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[NTG-context] Re: Adjusted Chapter Headings

2024-03-19 Thread Wolfgang Schuster

Jeroen schrieb am 19.03.2024 um 12:59:
I have some style adjustments for the chapters. The chapter "numbers" 
need to be Boek I, Boek II, etc. A vertical separator was introduced 
with an inframe. The chapter title at the right side does not vertically 
align properly with the chapter number in the frame (inside the frame is 
vertically centered, the title not). Is there a way to align the chapter 
title with the chapter number?




\starttexdefinition MyNumberChapterCommand #1
     \inframed[frame=off,rightframe=on,framecolor=black,
      rulethickness=1px,height=30pt]{#1\enspace}
\stoptexdefinition

\setuphead[chapter][style={\bfc},numbercommand=\MyNumberChapterCommand,
     page=no]


\define[2]\MyNumberChapterCommand
  {#1\space\blackrule[width=1pt,height=22pt,depth=8pt]\space#2}

\setuphead
  [chapter]
  [   page=no,
   command=\MyNumberChapterCommand,
 style=\bfc]

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

2024-03-19 Thread Wolfgang Schuster

Jeroen schrieb am 19.03.2024 um 19:34:

This one unbolds the margin text:

\setupmargindata[inouter][style=\tf]

This one works well, it unbolds and reduces the size of the margin text:

\setupmargindata
   [inouter]
   [style={\switchtobodyfont[8pt]}]

This one does not seem to make a change:

\setupmargindata[inmargin][style={\tf}]



It does for me but but unless you want a certain style it is better to 
use a empty argument for the style key.


\starttext

\inmargin{Bold?}\samplefile{lorem}

\setupmargindata[inmargin][style=]

\inmargin{Bold?}\samplefile{lorem}

\stoptext

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: Adjusted Chapter Headings

2024-03-19 Thread Jeroen
I have been able to achieve it as following, but the first frame width is
fixed so will cause problems with other chapter numbers such as VIII


\unexpanded\def\HeadTitle#1#2%
{\hbox to \hsize \bgroup
\hfill
\setupframed[offset=.5em,frame=off]
\tbox{\framed[width=22mm,align=right]{#1}}%
\tbox{\framed[width=130mm,align=right,leftframe=on,
rulethickness=0.8pt]{#2}}%
\egroup}

\setuplabeltext[chapter=Boek~]

\setuphead[chapter][style={\bfc}, command=\HeadTitle, textstyle=bold]

...

\startchapter
  [title={Algemene Beginselen},
   ownnumber={I}]

Op di 19 mrt 2024 om 15:49 schreef Hraban Ramm :

> Hi Jeroen,
>
> it might make sense to use
>
> \setuphead[chapter][
>   conversion=R,
> ]
> \setuplabeltext[nl][chapter={Boek }]
>
> instead of ownnumber.
>
> I would use one command for number and title and put both in the same kind
> of frame. Probably you should use a \strut in the text or
> \inframed[strut=yes] to assure the same text height.
>
> HTH, Hraban
> Am 19.03.24 um 12:59 schrieb Jeroen:
>
> I have some style adjustments for the chapters. The chapter "numbers" need
> to be Boek I, Boek II, etc. A vertical separator was introduced with an
> inframe. The chapter title at the right side does not vertically align
> properly with the chapter number in the frame (inside the frame is
> vertically centered, the title not). Is there a way to align the chapter
> title with the chapter number?
>
>
>
> \starttexdefinition MyNumberChapterCommand #1
> \inframed[frame=off,rightframe=on,framecolor=black,
>  rulethickness=1px,height=30pt]{#1\enspace}
> \stoptexdefinition
>
> \setuphead[chapter][style={\bfc},numbercommand=\MyNumberChapterCommand,
> page=no]
>
> \starttext
>
> \startchapter
>   [title={Algemene Beginselen},
>ownnumber={Boek I}]
>
> \samplefile{tufte}
>
> \stopchapter
>
> \startchapter
>   [title={Organisatorische Structuren},
>ownnumber={Boek II}]
>
> \samplefile{tufte}
>
> \stopchapter
>
> \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
> ___
>
>
> ___
> If your question is of interest to others as well, please add an entry to
> the Wiki!
>
> maillist : ntg-context@ntg.nl /
> https://mailman.ntg.nl/mailman3/lists/ntg-context.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: Comments placed in the margin

2024-03-19 Thread Jeroen
This one unbolds the margin text:

\setupmargindata[inouter][style=\tf]

This one works well, it unbolds and reduces the size of the margin text:

\setupmargindata
  [inouter]
  [style={\switchtobodyfont[8pt]}]

This one does not seem to make a change:

\setupmargindata[inmargin][style={\tf}]

Also the inline options seems to unbold the inline text nicely:

\margindata[inouter]{\rm \it example}


Op di 19 mrt 2024 om 16:17 schreef Marco Patzer :

> On Tue, 19 Mar 2024 15:38:16 +0100
> Jeroen  wrote:
>
> > Can this text be placed in the margin in regular text or possibly
> > in slightly smaller font size compared to the regular text in the
> > document?
>
>   \setupmargindata
> [inleft]
> [style=\tfx]
>
> Marco
>
> ___
> If your question is of interest to others as well, please add an entry to
> the Wiki!
>
> maillist : ntg-context@ntg.nl /
> https://mailman.ntg.nl/mailman3/lists/ntg-context.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: Comments placed in the margin

2024-03-19 Thread Marco Patzer
On Tue, 19 Mar 2024 15:38:16 +0100
Jeroen  wrote:

> Can this text be placed in the margin in regular text or possibly
> in slightly smaller font size compared to the regular text in the
> document?

  \setupmargindata
[inleft]
    [style=\tfx]

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

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


[NTG-context] Re: Comments placed in the margin

2024-03-19 Thread Wolfgang Schuster




Jeroen schrieb am 19.03.2024 um 15:38:
For comments that are placed in the margin, the \inleft{}, \inouter{} 
etc will place text in the margin in bold. Can this text be placed in 
the margin in regular text or possibly in slightly smaller font size 
compared to the regular text in the document?


\setupmargindata[inouter][style=]

or

\setupmargindata[inleft][style={\switchtobodyfont[8pt]}]

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

2024-03-19 Thread Hraban Ramm


Am 19.03.24 um 15:38 schrieb Jeroen:
For comments that are placed in the margin, the \inleft{}, \inouter{} 
etc will place text in the margin in bold. Can this text be placed in 
the margin in regular text or possibly in slightly smaller font size 
compared to the regular text in the document?



Try \setupmargindata[inmargin][style={\tf}]

I don’t know why the default is bold.

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: Adjusted Chapter Headings

2024-03-19 Thread Hraban Ramm

Hi Jeroen,

it might make sense to use

\setuphead[chapter][
  conversion=R,
]
\setuplabeltext[nl][chapter={Boek }]

instead of ownnumber.

I would use one command for number and title and put both in the same 
kind of frame. Probably you should use a \strut in the text or 
\inframed[strut=yes] to assure the same text height.


HTH, Hraban

Am 19.03.24 um 12:59 schrieb Jeroen:
I have some style adjustments for the chapters. The chapter "numbers" 
need to be Boek I, Boek II, etc. A vertical separator was introduced 
with an inframe. The chapter title at the right side does not 
vertically align properly with the chapter number in the frame (inside 
the frame is vertically centered, the title not). Is there a way to 
align the chapter title with the chapter number?




\starttexdefinition MyNumberChapterCommand #1
    \inframed[frame=off,rightframe=on,framecolor=black,
     rulethickness=1px,height=30pt]{#1\enspace}
\stoptexdefinition

\setuphead[chapter][style={\bfc},numbercommand=\MyNumberChapterCommand,
    page=no]

\starttext

\startchapter
  [title={Algemene Beginselen},
   ownnumber={Boek I}]

\samplefile{tufte}

\stopchapter

\startchapter
  [title={Organisatorische Structuren},
   ownnumber={Boek II}]

\samplefile{tufte}

\stopchapter

\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
__
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[NTG-context] Adjusted Chapter Headings

2024-03-19 Thread Jeroen
I have some style adjustments for the chapters. The chapter "numbers" need
to be Boek I, Boek II, etc. A vertical separator was introduced with an
inframe. The chapter title at the right side does not vertically align
properly with the chapter number in the frame (inside the frame is
vertically centered, the title not). Is there a way to align the chapter
title with the chapter number?



\starttexdefinition MyNumberChapterCommand #1
\inframed[frame=off,rightframe=on,framecolor=black,
 rulethickness=1px,height=30pt]{#1\enspace}
\stoptexdefinition

\setuphead[chapter][style={\bfc},numbercommand=\MyNumberChapterCommand,
page=no]

\starttext

\startchapter
  [title={Algemene Beginselen},
   ownnumber={Boek I}]

\samplefile{tufte}

\stopchapter

\startchapter
  [title={Organisatorische Structuren},
   ownnumber={Boek II}]

\samplefile{tufte}

\stopchapter

\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: Struggling with the distance and right margin text

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

Dear Ursula,

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

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

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

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

Some comments on the code fragments you sent.

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

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

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

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

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

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

Sorry, but I don’t get it.

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

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

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

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

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

Here starts your text:

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

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

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

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

Or, do you define commands for each page?

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

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

Again, margin text commands defined, but never used.

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

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

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

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

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

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

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

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

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

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

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

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

  mtxrun --script check source-sample.tex

This allowed me to sp

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

2024-03-15 Thread Ursula Hermann
Dear List,



On the first page I had this example:
\definepapersize[MyBook][width=19cm,height=29.7cm]
\setuppapersize[MyBook][MyBook] % Prints on paper the size of MyBook 
%\setuppapersize[MyBook][A4] %Would print MyBook-size pages on A4 paper
\setupbodyfont[modern, 12.50pt]
\definemargindata  [MyInMargin][inleft]
\definemarginframed[MyInMargin][topframe=on,bottomframe=on,rulethickness=1pt,width=1.90cm]
\defineenumeration
  [theorem]
  [
text=Theorem,
title=yes,
width=fit,
distance=0.2em,
alternative=serried,
  ]
\definetextbackground[GrayBackground][
  location=paragraph,
  background=color,
  backgroundcolor=lightgray,
  leftoffset=.5\bodyfontsize,
  rightoffset=.5\bodyfontsize,
  topoffset=.5\bodyfontsize,
  bottomoffset=.5\bodyfontsize,
  frame=off,]
  \margintext{\blackrule[color=black, height=0.10ex, width=1cm]\\}
  \blackrule[color=black, height=0.10ex, width=13.50cm]
\starttext
\margintext {1.1.1}
{\bf Beispiel 3.2.17. (Vertauschung von All- und Existenzquantor).} \par


So  I have here an example from the second page:


\definemargindata[inrightmargin][right][margin=margin,width=.50em\rightmarginwidth,style=,color=]

\definemarginframed[MyInMargin][topframe=on,bottomframe=on,rulethickness=1pt, 
width=.90cm]
\blackrule[color=black, height=0.10ex, width=13.40cm]
{\blackrule[color=black, height=0.10ex, width=1cm, distance=.90cm]\par
\defineenumeration
  [theorem]
  [
text=Theorem,
title=yes,
width=fit,
distance=0.2em,
alternative=serried,
  ]
\inright{3.2.22}
{\bf Theorem 3.2.22 (Rechenregeln für Quantoren)}. Seien \m P(\m x)und

My problem here is that there is not the same distance between the  the text 
and the  margintext .

And now the margintext should be on the right side.

So maybe someone could help me please.
Many thanks.



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

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


[NTG-context] Re: Japanese

2024-03-15 Thread luigi scarso
[probably off-topic , my apologies ]
For a project in my spare time (i.e. no deadlines)
I am collecting all kind of info I can find on the net (so free/non free
fonts, books , specs, images raster /vectorial..whatever)   on the
Kaiti (楷体) or “Regular style”
https://fonts.google.com/knowledge/type_in_china_japan_and_korea/type_classification_in_cjk_chinese

Any help would be greatly appreciated; there are no secrets, so we can use
this ml or write to me privately, as you prefer.

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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
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 track down source of [entry not flushed] displaying in indexes?

2024-03-13 Thread Joel via ntg-context
 After many hours of trial-and-error, I was able to recreate the problem in a 
minimum working example:
file main.tex only contains:

\starttext

    \index{birds}
    \index{insects}
    
    \input secondary
    
    \placeindex
    
\stoptext
file secondary.tex only contains:


   \index{turtles}

For reasons I can't understand, the index produces the same [entry not flushed] 
error. It seems here happening when contents are input.
My code is so simple, I can't understand what I've typed wrong.

--Joel


On Wednesday, March 13, 2024 at 12:51:56 PM MDT, Joel via ntg-context 
 wrote:  
 
  Okay, I maybe made some progress. I traced the code back and back through the 
various documents and found I have some items inside:

\startnointerference\startnointerference
My intent is to have items that are "there" but invisible to viewers, taking up 
no space on screen, but treated as being present, so the index will still point 
to that particular page.
This solution seems to be what's causing the [entry not flushed] error in the 
index.
Is there another solution instead of startnointerferencethat will hide text or 
any content but still allow page references to link to that blank spot?

--Joel

On Wednesday, March 13, 2024 at 07:53:21 AM MDT, Joel via ntg-context 
 wrote:  
 
 I have some custom registers that I use to index some information. When 
compiled, it just prints [entry not flushed] instead of printing some of the 
page numbers.
I have tens of thousands of lines of code, so have no idea how to break the 
problem down to a minimal example. What does [entry not flushed] mean? What 
kind of feature in my document do I need to search for that might explain why 
this is appearing?

Here is the minimal code used in my index, as you see it isn't showing the 
error, so something else in the document is causing it:

 \setvalue{W3}{this is text for W3}


\defineregister[learnedshort][compress=yes]
\setupregister[learnedshort][style=sansbold, textstyle=slanted, n=3, 
pagenumber=yes, indicator=no]
%
\defineregister[learnedlong][compress=yes]
\setupregister[learnedlong][style=sansbold, textstyle=slanted, n=2, 
pagenumber=yes, indicator=no]
%
\define[1]\learnedis{%
    \txt{} \getvalue{#1}
    \learnedshort{#1}
    \learnedlong{#1}
}
\define[1]\learned{%
    \textreference[textref#1]{\expanded{\currentstructuretitle}}
    \reference[ref#1]{}%
%
    \learnedshort{#1}
    \learnedlong{\getvalue{#1}}
}

\starttext

\learned{W3}

    \startchapter[title=Standards]
  \placeregister[learnedlong]
    \stopchapter
\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
___
  
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.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: How to track down source of [entry not flushed] displaying in indexes?

2024-03-13 Thread Joel via ntg-context
 Okay, I maybe made some progress. I traced the code back and back through the 
various documents and found I have some items inside:

\startnointerference\startnointerference
My intent is to have items that are "there" but invisible to viewers, taking up 
no space on screen, but treated as being present, so the index will still point 
to that particular page.
This solution seems to be what's causing the [entry not flushed] error in the 
index.
Is there another solution instead of startnointerferencethat will hide text or 
any content but still allow page references to link to that blank spot?

--Joel

On Wednesday, March 13, 2024 at 07:53:21 AM MDT, Joel via ntg-context 
 wrote:  
 
 I have some custom registers that I use to index some information. When 
compiled, it just prints [entry not flushed] instead of printing some of the 
page numbers.
I have tens of thousands of lines of code, so have no idea how to break the 
problem down to a minimal example. What does [entry not flushed] mean? What 
kind of feature in my document do I need to search for that might explain why 
this is appearing?

Here is the minimal code used in my index, as you see it isn't showing the 
error, so something else in the document is causing it:

 \setvalue{W3}{this is text for W3}


\defineregister[learnedshort][compress=yes]
\setupregister[learnedshort][style=sansbold, textstyle=slanted, n=3, 
pagenumber=yes, indicator=no]
%
\defineregister[learnedlong][compress=yes]
\setupregister[learnedlong][style=sansbold, textstyle=slanted, n=2, 
pagenumber=yes, indicator=no]
%
\define[1]\learnedis{%
    \txt{} \getvalue{#1}
    \learnedshort{#1}
    \learnedlong{#1}
}
\define[1]\learned{%
    \textreference[textref#1]{\expanded{\currentstructuretitle}}
    \reference[ref#1]{}%
%
    \learnedshort{#1}
    \learnedlong{\getvalue{#1}}
}

\starttext

\learned{W3}

    \startchapter[title=Standards]
  \placeregister[learnedlong]
    \stopchapter
\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
___
  ___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
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 track down source of [entry not flushed] displaying in indexes?

2024-03-13 Thread Joel via ntg-context
I have some custom registers that I use to index some information. When 
compiled, it just prints [entry not flushed] instead of printing some of the 
page numbers.
I have tens of thousands of lines of code, so have no idea how to break the 
problem down to a minimal example. What does [entry not flushed] mean? What 
kind of feature in my document do I need to search for that might explain why 
this is appearing?

Here is the minimal code used in my index, as you see it isn't showing the 
error, so something else in the document is causing it:

 \setvalue{W3}{this is text for W3}


\defineregister[learnedshort][compress=yes]
\setupregister[learnedshort][style=sansbold, textstyle=slanted, n=3, 
pagenumber=yes, indicator=no]
%
\defineregister[learnedlong][compress=yes]
\setupregister[learnedlong][style=sansbold, textstyle=slanted, n=2, 
pagenumber=yes, indicator=no]
%
\define[1]\learnedis{%
    \txt{} \getvalue{#1}
    \learnedshort{#1}
    \learnedlong{#1}
}
\define[1]\learned{%
    \textreference[textref#1]{\expanded{\currentstructuretitle}}
    \reference[ref#1]{}%
%
    \learnedshort{#1}
    \learnedlong{\getvalue{#1}}
}

\starttext

\learned{W3}

    \startchapter[title=Standards]
  \placeregister[learnedlong]
    \stopchapter
\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: \em issue in MkXL (2024.03.05 11:26)

2024-03-10 Thread Hans Hagen

On 3/10/2024 11:48 AM, Wolfgang Schuster wrote:

Hans Hagen via ntg-context schrieb am 10.03.2024 um 10:46:

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

On 3/9/24 16:04, Wolfgang Schuster wrote:

Pablo Rodriguez via ntg-context schrieb am 08.03.2024 um 19:39:

[...]
    \enableexperiments[fonts.compact]

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


AFAIR Hans uses the setting in his own documents.


I have been using it for a while.

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


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


The results happen when you use compact mode and is a result of
\glyphslant which keeps the value of the italic style even when you
switch back to the upright style.


Many thanks for your explaination,

using the low level commands

\glyphscale
\glyphxscale
\glyphyscale
\glyphslant
\glyphweight

directly can have side efects when at an outer level these are also 
set, so you need to accumulate, like


\starttext

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


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


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


\stoptext


The problem is that compact mode uses them to apply the slanted feature 
without any manual use of the commands from a user.


\enableexperiments[fonts.compact]

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

\setupbodyfont[mainface]

\starttext

\startstyle[style=italic]normal {\em emphasized} normal\stopstyle

\stoptext

The only way to mask the effect is to create a new fontfeature with the 
minimum slant value and apply it to the upright style.


\definefontfeature [unslanted] [slant=0.001]

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

ok, i'll fix that (build is down so no update)

Hans

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

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

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


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

2024-03-10 Thread Wolfgang Schuster

Hans Hagen via ntg-context schrieb am 10.03.2024 um 10:46:

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

On 3/9/24 16:04, Wolfgang Schuster wrote:

Pablo Rodriguez via ntg-context schrieb am 08.03.2024 um 19:39:

[...]
    \enableexperiments[fonts.compact]

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


AFAIR Hans uses the setting in his own documents.


I have been using it for a while.

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


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


The results happen when you use compact mode and is a result of
\glyphslant which keeps the value of the italic style even when you
switch back to the upright style.


Many thanks for your explaination,

using the low level commands

\glyphscale
\glyphxscale
\glyphyscale
\glyphslant
\glyphweight

directly can have side efects when at an outer level these are also set, 
so you need to accumulate, like


\starttext

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


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


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


\stoptext


The problem is that compact mode uses them to apply the slanted feature 
without any manual use of the commands from a user.


\enableexperiments[fonts.compact]

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

\setupbodyfont[mainface]

\starttext

\startstyle[style=italic]normal {\em emphasized} normal\stopstyle

\stoptext

The only way to mask the effect is to create a new fontfeature with the 
minimum slant value and apply it to the upright style.


\definefontfeature [unslanted] [slant=0.001]

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

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: \em issue in MkXL (2024.03.05 11:26)

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

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

On 3/9/24 16:04, Wolfgang Schuster wrote:

Pablo Rodriguez via ntg-context schrieb am 08.03.2024 um 19:39:

[...]
\enableexperiments[fonts.compact]

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


AFAIR Hans uses the setting in his own documents.


I have been using it for a while.

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


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


The results happen when you use compact mode and is a result of
\glyphslant which keeps the value of the italic style even when you
switch back to the upright style.


Many thanks for your explaination,

using the low level commands

\glyphscale
\glyphxscale
\glyphyscale
\glyphslant
\glyphweight

directly can have side efects when at an outer level these are also set, 
so you need to accumulate, like


\starttext

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


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


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


\stoptext

which you will now wikify ...

Hans


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

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

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


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

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

I have been using it for a while.

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

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

Many thanks for your explaination,

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

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


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

2024-03-09 Thread Wolfgang Schuster

Pablo Rodriguez via ntg-context schrieb am 08.03.2024 um 19:39:

On 3/8/24 19:09, Wolfgang Schuster wrote:

Pablo Rodriguez via ntg-context schrieb am 08.03.2024 um 18:50:

[...]
LMTX gets b, c and d in slanted form.

LuaTeX gets only b and c in slanted form.

[...]
I get b and d in italic which is the expected output.


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

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

   \enableexperiments[fonts.compact]

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


AFAIR Hans uses the setting in his own documents.


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


The results happen when you use compact mode and is a result of 
\glyphslant which keeps the value of the italic style even when you 
switch back to the upright style.


\enableexperiments[fonts.compact]

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

\setupbodyfont[mainface]

\starttext
\tf h\showcurrentfont[]\crlf
\it h\showcurrentfont[]\crlf
%\glyphslant\zerocount
\tf h\showcurrentfont[]\crlf
\it h\showcurrentfont[]
\stoptext

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: \em issue in MkXL (2024.03.05 11:26)

2024-03-08 Thread Henning Hraban Ramm

Am 08.03.24 um 18:50 schrieb Pablo Rodriguez via ntg-context:

Dear list,

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

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

   \setupbodyfontenvironment
   [default]
   [em=italic]

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

LMTX gets b, c and d in slanted form.

LuaTeX gets only b and c in slanted form.


With latest LMTX (2024.03.05), b and d are slanted, as I would expect.

This might be just a test case, but I’d avoid switches like \em without 
grouping.


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: \em issue in MkXL (2024.03.05 11:26)

2024-03-08 Thread Wolfgang Schuster

Pablo Rodriguez via ntg-context schrieb am 08.03.2024 um 18:50:

Dear list,

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

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

   \setupbodyfontenvironment
   [default]
   [em=italic]

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

LMTX gets b, c and d in slanted form.

LuaTeX gets only b and c in slanted form.

I think LMTX may have an issue here.

Could anyone be so kind to confirm this?


I get b and d in italic which is the expected output.

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] \em issue in MkXL (2024.03.05 11:26)

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

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

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

  \setupbodyfontenvironment
  [default]
  [em=italic]

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

LMTX gets b, c and d in slanted form.

LuaTeX gets only b and c in slanted form.

I think LMTX may have an issue here.

Could anyone be so kind to confirm this?

Many thanks for your help,

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

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


[NTG-context] Re: additional font faces

2024-03-08 Thread Hans Hagen

On 3/8/2024 5:55 PM, Henning Hraban Ramm wrote:
Hi, if I need an additional pair of upright and italic font faces, e.g. 
a Medium or Light version, would it make sense to define them like this:


I'd just define a new typeface / bodyfont, using fo rinstance

\starttypescript [sans] [AlegreyaMedium]

and then use

\switchtobodyfont[AlegreyaMedium]\sl

or

\AlegreyaMedium\sl

which is also more efficient than adding more variants

Hans


% adapted from font-pre.mkxl

\definefontalternative[md]
\definefontalternative[mi]
\definefontalternative[ms]

\definealternativestyle [medium] [\md] []
\definealternativestyle [mediumitalic,italicmedium]  [\mi] []
\definealternativestyle [mediumslanted,slantedmedium][\ms] []

\definealternativestyle [sansmedium]  [\ss\md] []
\definealternativestyle [serifmedium] [\rm\md] []
\definealternativestyle [monomedium]  [\tt\md] []

%\definealternativestyle [mediumface]    [\mediumface]    []

\unexpanded\def\normalmd{\let\fontalternative\md\font_helpers_synchronize_font}
\unexpanded\def\normalmi{\let\fontalternative\mi\font_helpers_synchronize_font}
\unexpanded\def\normalms{\let\fontalternative\ms\font_helpers_synchronize_font}

\let\md\normalmd
\let\mi\normalmi
\let\ms\normalms

\definehighlight[medium   ] [command=no,style=medium]
\definehighlight[mediumitalic ] [command=no,style=mediumitalic]
\definehighlight[mediumslanted] [command=no,style=mediumslanted]


Is that necessary? And is it enough?


\starttypescript [sans] [alegreya]
   \definefontsynonym[AlegreyaSans-Regular][name:AlegreyaSans-Regular]
   \definefontsynonym[AlegreyaSans-Italic][name:AlegreyaSans-Italic]
   \definefontsynonym[AlegreyaSans-Caps][name:AlegreyaSansSC-Regular]
   \definefontsynonym[AlegreyaSans-ItalicCaps][name:AlegreyaSansSC-Italic]
   \definefontsynonym[AlegreyaSans-Medium][name:AlegreyaSans-Medium]

\definefontsynonym[AlegreyaSans-MediumItalic][name:AlegreyaSans-MediumItalic]
   \definefontsynonym[AlegreyaSans-MediumCaps][name:AlegreyaSansSC-Medium]

\definefontsynonym[AlegreyaSans-MediumItalicCaps][name:AlegreyaSansSC-MediumItalic]
   \definefontsynonym[AlegreyaSans-Bold][name:AlegreyaSans-Bold]
   
\definefontsynonym[AlegreyaSans-BoldItalic][name:AlegreyaSans-BoldItalic]

   \definefontsynonym[AlegreyaSans-BoldCaps][name:AlegreyaSansSC-Bold]

\definefontsynonym[AlegreyaSans-BoldItalicCaps][name:AlegreyaSansSC-BoldItalic]
\stoptypescript

\starttypescript [sans] [alegreya] [name]
   \definefontsynonym [Sans]   [AlegreyaSans-Regular] []
   \definefontsynonym [SansItalic] [AlegreyaSans-Italic]  []
   \definefontsynonym [SansSlanted]    [AlegreyaSans-Italic]  []
   \definefontsynonym [SansMedium]   [AlegreyaSans-Medium] []
   \definefontsynonym [SansMediumItalic] [AlegreyaSans-MediumItalic][]
   \definefontsynonym [SansMediumSlanted][AlegreyaSans-MediumItalic][]
   \definefontsynonym [SansBold]   [AlegreyaSans-Bold]    []
   \definefontsynonym [SansBoldItalic] [AlegreyaSans-BoldItalic]  []
   \definefontsynonym [SansBoldSlanted][AlegreyaSans-BoldItalic]  []
   \definefontsynonym [SansCaps]   [AlegreyaSans-Caps] \stoptypescript
___
If your question is of interest to others as well, please add an entry 
to the Wiki!


maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.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] additional font faces

2024-03-08 Thread Henning Hraban Ramm
Hi, if I need an additional pair of upright and italic font faces, e.g. 
a Medium or Light version, would it make sense to define them like this:


% adapted from font-pre.mkxl

\definefontalternative[md]
\definefontalternative[mi]
\definefontalternative[ms]

\definealternativestyle [medium] [\md] []
\definealternativestyle [mediumitalic,italicmedium]  [\mi] []
\definealternativestyle [mediumslanted,slantedmedium][\ms] []

\definealternativestyle [sansmedium]  [\ss\md] []
\definealternativestyle [serifmedium] [\rm\md] []
\definealternativestyle [monomedium]  [\tt\md] []

%\definealternativestyle [mediumface][\mediumface][]

\unexpanded\def\normalmd{\let\fontalternative\md\font_helpers_synchronize_font}
\unexpanded\def\normalmi{\let\fontalternative\mi\font_helpers_synchronize_font}
\unexpanded\def\normalms{\let\fontalternative\ms\font_helpers_synchronize_font}

\let\md\normalmd
\let\mi\normalmi
\let\ms\normalms

\definehighlight[medium   ] [command=no,style=medium]
\definehighlight[mediumitalic ] [command=no,style=mediumitalic]
\definehighlight[mediumslanted] [command=no,style=mediumslanted]


Is that necessary? And is it enough?


\starttypescript [sans] [alegreya]
  \definefontsynonym[AlegreyaSans-Regular][name:AlegreyaSans-Regular]
  \definefontsynonym[AlegreyaSans-Italic][name:AlegreyaSans-Italic]
  \definefontsynonym[AlegreyaSans-Caps][name:AlegreyaSansSC-Regular]
  \definefontsynonym[AlegreyaSans-ItalicCaps][name:AlegreyaSansSC-Italic]
  \definefontsynonym[AlegreyaSans-Medium][name:AlegreyaSans-Medium]

\definefontsynonym[AlegreyaSans-MediumItalic][name:AlegreyaSans-MediumItalic]
  \definefontsynonym[AlegreyaSans-MediumCaps][name:AlegreyaSansSC-Medium]

\definefontsynonym[AlegreyaSans-MediumItalicCaps][name:AlegreyaSansSC-MediumItalic]
  \definefontsynonym[AlegreyaSans-Bold][name:AlegreyaSans-Bold]
  \definefontsynonym[AlegreyaSans-BoldItalic][name:AlegreyaSans-BoldItalic]
  \definefontsynonym[AlegreyaSans-BoldCaps][name:AlegreyaSansSC-Bold]

\definefontsynonym[AlegreyaSans-BoldItalicCaps][name:AlegreyaSansSC-BoldItalic]
\stoptypescript

\starttypescript [sans] [alegreya] [name]
  \definefontsynonym [Sans]   [AlegreyaSans-Regular] []
  \definefontsynonym [SansItalic] [AlegreyaSans-Italic]  []
  \definefontsynonym [SansSlanted][AlegreyaSans-Italic]  []
  \definefontsynonym [SansMedium]   [AlegreyaSans-Medium] []
  \definefontsynonym [SansMediumItalic] [AlegreyaSans-MediumItalic][]
  \definefontsynonym [SansMediumSlanted][AlegreyaSans-MediumItalic][]
  \definefontsynonym [SansBold]   [AlegreyaSans-Bold][]
  \definefontsynonym [SansBoldItalic] [AlegreyaSans-BoldItalic]  []
  \definefontsynonym [SansBoldSlanted][AlegreyaSans-BoldItalic]  []
  \definefontsynonym [SansCaps]   [AlegreyaSans-Caps] 
\stoptypescript

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

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


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

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

On 3/3/2024 11:54 AM, Pablo Rodriguez via ntg-context wrote:

Dear list,

I have the following sample:

   \definefontfeature[wider][extend=2]

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

   \setupbodyfont
 [mainface, 30pt]

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

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

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

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

Could anyone confirm the issue?
accumulating these effects is dependent on how the features that you use 
are defined


in luametatex we have a bit more advanced mechanism (also relates to 
compact mode) because th eengine is a bit more clever


just make sure that you don't add up features where one calcels the 
other, so use for instance:


\definefontfeature[wide] [extend=2]
\definefontfeature[wideslant][extend=2,slant=.2]
\definefontfeature[widebold] [extend=2,weight=.1]
\definefontfeature[wideboldslant][extend=2,weight=.1,slant=.2]

\definefontfamily[mainface][rm][TeX Gyre Pagella]
  [tf={style:regular,features:{default,quality,wide}},
   it={style:regular,features:{default,quality,wideslant}},
   bf={style:regular,features:{default,quality,widebold}},
   bi={style:regular,features:{default,quality,wideboldslant}}]

\setupbodyfont
  [mainface,30pt]

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



-
  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] issue mixing font features (LMTX & MkIV)

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

I have the following sample:

  \definefontfeature[wider][extend=2]

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

  \setupbodyfont
[mainface, 30pt]

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

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

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

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

Could anyone confirm the issue?

Many thanks for your help,

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

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


[NTG-context] Re: Japanese

2024-03-02 Thread Wolfgang Schuster

Emanuel Han schrieb am 01.03.2024 um 16:23:

Dear Wolfgang,

thank you for your valuable remarks. I integrated them, see corrected 
attached example.


Yes, correct layout examples exist. They're all showing vertical 
writing, but the rules and principles are exactly the same for 
horizontal writing.


 *
position of the headers and footers:
https://www.w3.org/TR/jlreq/#fig1_30


See my attached gongitsune.tex example how you can squeeze text in a 
very narrow header/footer.



 *
aligning lines to the text box: https://www.w3.org/TR/jlreq/#fig1_3


You can use the lines key for \setuplayout to let ConTeXt calculate the 
necessary value for the text height.



 *
protrusion of ruby: https://www.w3.org/TR/jlreq/#fig_ad1_6


You're getting this for free because ruby text doesn't take up vertical 
space, in case vertical text is working it would now stick into the 
margins as expected.


\starttext
\ruledhbox{a \ruby{x}{y} b}
\stoptext


In my previous mail, I wrote wrong amounts of lines. They should be 46 
lines on one page, while the actual example doesn't show the 46th line.


It would be important to identify the reason why only 24 characters 
are used to create a line when 25 could be used. Then we can develop a 
method to turn that mechanism off or circumvent it.

Quotation from https://www.w3.org/TR/jlreq:
/In principle, when composing a line with //ideographic (cl-19) 
<https://www.w3.org/TR/jlreq/#cl-19>//, //hiragana (cl-15) 
<https://www.w3.org/TR/jlreq/#cl-15>// and //katakana (cl-16) 
<https://www.w3.org/TR/jlreq/#cl-16>// characters, no extra spacing 
appears between their //character frame 
<https://www.w3.org/TR/jlreq/#term.character-frame>//. This is called 
solid setting (see //Figure 5 <https://www.w3.org/TR/jlreq/#fig1_8>//)./


1. ConTeXt has a mechanism to typeset Japanese texts.

2. There are flaws in the output it produces but this nothing which 
can't be fixed.


3. To fix the problems someone has to be passionate to fix them and 
we're willing to help here.


As you can see in my second example file japanese.tex there is a font 
feature to create half sized parentheses etc. which isn't supported yet 
by ConTeXt's mechanism for japanese and in case your willing to improve 
it this should be taken care of as well.


Wolfgang

\definefontfeature [halt] [halt=yes]

\starttext

\setscript[nihongo]

\begingroup \showmakeup[glyph,fontkern]

% \startfont[file:notosanscjkjpregular*default]「うわアぬすと狐め」と、どなりたてました。\stopfont
% 
% \startfont[file:notosanscjkjpregular*default]「「うわアぬすと狐め」と、「どなりたてました」。\stopfont
% 
% 
\startfont[file:notosanscjkjpregular*default,halt]「うわアぬすと狐め」と、どなりたてました。\stopfont
% 
% 
\startfont[file:notosanscjkjpregular*default,halt]「「うわアぬすと狐め」と、「どなりたてました」。\stopfont

\startfont[name:notosansjpregular*default]「うわアぬすと狐め」と、どなりたてました。\stopfont

\startfont[name:notosansjpregular*default]「「うわアぬすと狐め」と、「どなりたてました」。\stopfont

\startfont[name:notosansjpregular*default,halt]「うわアぬすと狐め」と、どなりたてました。\stopfont

\startfont[name:notosansjpregular*default,halt]「「うわアぬすと狐め」と、「どなりたてました」。\stopfont

\endgroup

\stoptext
% \definefontfeature [fixeddimensions] [dimensions={1,1.8,0}]
% 
% \definefontfamily [noto_japanese] [rm] [Noto Serif CJK JP] 
[features={default,fullprotrusion,fixeddimensions}]
% \definefontfamily [noto_japanese] [ss] [Noto Sans CJK JP]  
[features={default,fullprotrusion,fixeddimensions}]

% \definefontfamily [noto_japanese] [rm] [Noto Serif CJK JP] 
[features={default,fullprotrusion}]
% \definefontfamily [noto_japanese] [ss] [Noto Sans CJK JP]  
[features={default,fullprotrusion}]

\definefontfamily [noto_japanese] [rm] [Noto Serif JP] 
[features={default,fullprotrusion}]
\definefontfamily [noto_japanese] [ss] [Noto Sans JP]  
[features={default,fullprotrusion}]

\setupbodyfont
  [noto_japanese]

\setscript
  [nihongo]

\setupalign
  [hanging]

\setupindenting
  [yes,1em]

\setupinterlinespace
  [line=2\bodyfontsize,
   height=0.9,
   depth=0.1]

\setupruby
  [style={\switchtobodyfont[6pt]}]

\setuppagenumbering
  [alternative=doublesided,
   location=none]

\setuphead
  [title,subject]
  [align=middle]

\startsetups [header:rightpage]

  \startframed [
  frame=off,
  strut=no,
  height=\headerheight,
  offset=none,
  align=low,
  roffset=1em,
  ]

\getmarking[subject]

  \stopframed

\stopsetups

\startsetups [header:leftpage]

  \startframed [
  frame=off,
  strut=no,
  height=\headerheight,
  offset=none,
  align=low,
  loffset=1em,
  ]

\getmarking[title]

  \stopframed

\stopsetups

\startsetups [footer:rightpage]

  \startframed [
  frame=off,
  strut=no,
  height=\headerheight,
  offset=none,
  align=low,
  roffset=1em,
  ]

\prefixedpagenumber

  \stopframed

\stopsetups

\startsetups [footer:leftpage]

  \startframed [
  frame=off,
  strut=no,
  height=\headerheight,
  offset=none,
  align=low,
  loffset=1em,
  ]

\pre

[NTG-context] Wiki page : Mixed languages sample (French, Ancient Greek, Arabic, Chinese)

2024-03-01 Thread Jean-Pierre Delange

Dear List,

Several years ago I tried to write documents, mainly lectures, but also 
essays, in which I tried to make several languages (Romance and 
non-Romance) coexist.
Here below is an example of an attempt to compose an acceptable 
document, in the form of an exercise in which Arabic and Chinese are 
introduced into a document written in French. With footnotes and a few 
framed lines.


I submit this example for your perusal and ask you whether it could 
possibly appear on a wiki page devoted to the combination of 
non-European languages in the same text. In English translation, of course.


%We are giving below an example of a text written in a Latin language, 
in which we want to print here and there some text in ancient Greek, 
Arabic and Chinese.


\setuplanguage[fr][patterns={fr,agr}]

\mainlanguage[fr]

\setuplayout [backspace=40mm]

\setuppagenumbering[alternative=doublesided, location={header, inmargin}]

\setupmargindata[inmargin][location=inner, 
style={\ssx\setupinterlinespace[line=2.8ex]}]


\setupmarginframed[inmargin][align=right]

\setupbodyfontenvironment[default][em=italic]

% Use Theano Didot as Ancient Greek font

\definefallbackfamily[mainface][serif][Theano Didot][preset=range:greek, 
it={Old Standard Italic}, force=yes]


% Choose between Ipaexmincho font and NotoSansTC (Traditional Chinese)

%\definefallbackfamily [mainface] [rm] [ipaexmincho] 
[range=cjkunifiedideographs]


\definefallbackfamily [mainface] [rm] [notosanstc] 
[range=cjkunifiedideographs]


% Choose between two Arabic fonts

%\definefallbackfamily[mainface] [serif] [nafeesnastaleeq] [range=arabic]

\definefallbackfamily[mainface] [serif] [hussaininastaleeq] [range=arabic]

\definefontfamily [mainface] [serif] [GaramondNo8][sc=NewG8 Regular SC]

\definefontfamily [mainface] [sans] [FreeSans] [rscale=0.7]

\definefontfamily[mainface] [serif] [GFS Didot]

\setupbodyfont[mainface]

\setupindenting[1.5em]

\setupindenting[yes]

\setupcolors[state=start]


\defineframedtext

[MyFrame]

[before={\blank},

after={\blank},

frame=off,

background=MyFrame,

%width=\textwidth,

width=max,

height=fit,

style=italic]


\definelabel

[Définition]

[headstyle=\bf\smallcaps]


\startuseMPgraphic{MyFrame}

path b;

picture p;

%p := textext.rt("\white\Définition");

p := textext.rt("\white\framedtextparameter{Title}");

%p := textext.rt("\white\getvariable{text}{text1}");

p := p shifted (2BodyFontSize,OverlayHeight-ypart center p+.25ExHeight);

b := boundingbox p leftenlarged .5EmWidth rightenlarged .5EmWidth;

fill OverlayBox withcolor lightgray; %\MPcolor{

fill b withcolor darkred;

draw bottomboundary OverlayBox withpen pencircle scaled 1pt withcolor

darkred;

draw topboundary OverlayBox withpen pencircle scaled 1pt withcolor

darkred;

draw p;

setbounds currentpicture to boundingbox currentpicture enlarged 2mm;

\stopuseMPgraphic


\defineoverlay

[MyFrame]

[\useMPgraphic{MyFrame}]



\setupwhitespace[medium]

\setupinterlinespace[line=3.2ex]


\setupitemize[each][margin=yes]


\setuphead[title][header=empty]


\setupheader[style={\sc}]

\setupfooter[style={\itxx}]

\setupheadertexts[Utilisation de plusieurs langues dans un même texte 
avec \ConTeXt][][][{\getmarking[section]}]


\setupfootertexts[][][][© J.-P. Delange, 2016 — La reproduction de ce 
texte est soumise à autorisation.]


\defineparagraphs[TwoColumns][n=2, align={hz, hanging}]

\setupparagraphs[TwoColumns][1][width=210pt, style=rm, align=left]

\starttext

\title{\ConTeXt, ou comment imprimer des langues non-romanes}

\section {\sc Préambule}


Lorsqu'il s'agit de proposer un document dans une langue nationale (le 
français), tout va bien. Lorsqu'il s'agit de rédiger en français un 
document un peu complexe, avec des citations — ou des références — dans 
une autre langue, qui en particulier n'a pas les mêmes exigences que le 
français, ni les mêmes {\em signes diacritiques} on se heurte à quelques 
difficultés. Les suites logicielles comme Microsoft Office ou 
LibreOffice ne manquent pas de puissance, mais à vrai dire, dès que nous 
entrons dans les exigences de l'édition professionnelle, qui consistent 
à présenter un texte lisible et enrichi (en notes, etc.), la situation 
devient vite techniquement assez pénible. La situation la plus courante 
que nous rencontrons dans les Lettres, en Philosophie, en Histoire, et 
plus généralement dans les Humanités, est celle d'un texte dans lequel 
il y a des citations d'auteurs grecs ou latin, avec des références en 
notes de bas de page, qui contiennent du grec. Cela pourrait être 
quelque chose comme ceci :


\blank\startnarrower[1*left,1*right]\tfx\setupinterlinespace

\noindent \quotation{Ἔφη γάρ οἱ Σωκράτη ἐντυχεῖν λελουμένον τε καὶ τὰς 
βλαύτας ὑποδεδεμένον, ἃ ἐκεῖνος ὀλιγάκις ἐποίει· καὶ ἐρέσθαι αὐτὸν ὅποι 
ἴοι οὕτω καλὸς γεγενημένος. καὶ τὸν εἰπεῖν ὅτι· Ἐπὶ δεῖπνον εἰς 
Ἀγάθωνος. χθὲς γὰρ αὐτὸν διέφυγον τοῖς ἐπινικίοις, φοβηθεὶς τὸν ὄχλον· 
ὡμολόγησα δ᾽ εἰς τήμερον παρέσεσθα

[NTG-context] Re: A new problem with space in third itemize

2024-02-29 Thread Ursula Hermann
Dear Mikael,


Many Thanks, works perfect.


Many Regards

Uschi


Von: Mikael Sundqvist 
Gesendet: Donnerstag, 29. Februar 2024 16:45:03
An: mailing list for ConTeXt users
Betreff: [NTG-context] Re: A new problem with space in third itemize

Hi Uschi,

Your coding style is interesting. I do not understand the purpose of
the \it for example. I did put something together that you can try,
but I don't know if this is what you are looking for.

\starttext
\startitemize[n]
\startitem
\m{\forall n \in \naturalnumbers\mtp{:} n^2 > n \implies n > 1},
\stopitem
\startitem
\m{\forall n \in \naturalnumbers\mtp{:} 3\divides n \implies 4 \divides n},
\stopitem
\startitem
\m{\forall n \in \naturalnumbers\mtp{:} n^3 \mtext{ ungerade }
\implies n \mtext{ ungerade}}.
\stopitem
\stopitemize
\stoptext

To quote Pablo, I hope it helps.

/Mikael

On Thu, Feb 29, 2024 at 4:10 PM Ursula Hermann
 wrote:
>
> Dear List,
>
>
> This is my little example: the problem is, that everything was fine, in 
> itemize 1 and  2. In the third itemize  i have a problem, because after n^3 
> and after \Rightarrow  there should be a spaace , if I want to write : 
> \Rightarrow n ungerade, but it says nungerade, what I dont want,.
>
>
> \startitemize[n]
> {\it \item \m{\forall n ∈ \naturalnumbers:n^2 >n\Rightarrow>1,\par}\nospace
> \par \item \m{\forall n ∈ \naturalnumbers:3\mid n\Rightarrow 4 \mid n,\par} 
> \nospace
> \par \item \m{\forall n ∈ \naturalnumbers:n^3  ungerade \Rightarrow n  
> ungerade \par}
>
> Uschi
>
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
>
> maillist : ntg-context@ntg.nl / 
> https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
> webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
> archive  : https://github.com/contextgarden/context
> wiki : https://wiki.contextgarden.net
> ___
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[NTG-context] Re: A new problem with space in third itemize

2024-02-29 Thread Mikael Sundqvist
Hi Uschi,

Your coding style is interesting. I do not understand the purpose of
the \it for example. I did put something together that you can try,
but I don't know if this is what you are looking for.

\starttext
\startitemize[n]
\startitem
\m{\forall n \in \naturalnumbers\mtp{:} n^2 > n \implies n > 1},
\stopitem
\startitem
\m{\forall n \in \naturalnumbers\mtp{:} 3\divides n \implies 4 \divides n},
\stopitem
\startitem
\m{\forall n \in \naturalnumbers\mtp{:} n^3 \mtext{ ungerade }
\implies n \mtext{ ungerade}}.
\stopitem
\stopitemize
\stoptext

To quote Pablo, I hope it helps.

/Mikael

On Thu, Feb 29, 2024 at 4:10 PM Ursula Hermann
 wrote:
>
> Dear List,
>
>
> This is my little example: the problem is, that everything was fine, in 
> itemize 1 and  2. In the third itemize  i have a problem, because after n^3 
> and after \Rightarrow  there should be a spaace , if I want to write : 
> \Rightarrow n ungerade, but it says nungerade, what I dont want,.
>
>
> \startitemize[n]
> {\it \item \m{\forall n ∈ \naturalnumbers:n^2 >n\Rightarrow>1,\par}\nospace
> \par \item \m{\forall n ∈ \naturalnumbers:3\mid n\Rightarrow 4 \mid n,\par} 
> \nospace
> \par \item \m{\forall n ∈ \naturalnumbers:n^3  ungerade \Rightarrow n  
> ungerade \par}
>
> Uschi
>
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
>
> maillist : ntg-context@ntg.nl / 
> https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
> webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
> archive  : https://github.com/contextgarden/context
> wiki : https://wiki.contextgarden.net
> ___
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[NTG-context] Re: Issue with italics

2024-02-26 Thread Jean-Pierre Delange

Thanks to Thomas and Denis,

That's it: use GFS Didot for the French text and Theano Didot for the 
Greek. In my working text I have this preamble (and other things):


\setuplanguage[fr][patterns={fr,agr}]
\mainlanguage[fr]
\setcharacterspacing[frenchpunctuation]]
\setuplayout [backspace=40mm]
\setuppagenumbering[alternative=doublesided, location={header, inmargin}]
\setupmargindata[inmargin][location=inner, 
style={setupinterlinespace[line=2.8ex]}]

\setupmarginframed[inmargin][align=right]
\setupbodyfontenvironment[default][em=italic]
\definefallbackfamily[mainface][rm][Theano 
Didot][preset=range:greek,force=yes]

\definefontfamily[mainface][rm][GFS Didot]
\setupbodyfont[mainface, 11pt]

I'm currently working on MS Windows 11 for the moment (as a test beside 
Linux). I didn't try to compile this text under Linux, but I don't think 
there is an issue with the OS.


As far as GFS Didot is concerned, I have installed the most recent 
version. But what amazes me the most is that by only keeping a font like 
EBGaramond without writing :

\definefallbackfamily
 [mainface]
[rm]
[Theano Didot]
[preset=range:greek,force=yes]
So, using EBGaramond only, I have the French text (with italics), as 
well as the Greek text...


Try this :

\setuplanguage

\mainlanguage[fr,agr]

\definefontfamily

[mainface]

[rm]

[EBGaramond]

\setupbodyfont[mainface, 12pt]

\setupbodyfontenvironment[default][em=italic]


\starttext

Socrate est descendu au Pirée et affirme sa satisfaction du culte rendu 
à cette nouvelle déesse par les Thraces; néanmoins, {\em il ne nous dit 
rien des prières} qu'il a lui-même rendues à la déesse avec les autres 
participants, dont il fait pourtant état. Sur le chemin du retour, il 
est arrêté par Polémarque qui leur apprend qu'une retraite aux flambeaux 
à cheval est prévue par les Thraces, ainsi qu'une fête de nuit 
\quote{qui vaut la peine d'être vue} (ἣν ἄξιον θεάσασθαι; {\em èn 
axion théasasthai} - 328a).


\blank


Κάθε άνθρωπος δικαιούται να επικαλείται όλα τα δικαιώματα και όλες τις 
ελευθερίες που προκηρύσσει η παρούσα Διακήρυξη, χωρίς καμία απολύτως 
διάκριση, ειδικότερα ως προς τη φυλή, το χρώμα, το φύλο, τη γλώσσα, τις 
θρησκείες, τις πολιτικές ή οποιεσδήποτε άλλες πεποιθήσεις, την εθνική ή 
κοινωνική καταγωγή, την περιουσία, τη γέννηση ή οποιαδήποτε άλλη κατάσταση.



Δεν θα μπορεί ακόμα να γίνεται καμία διάκριση εξαιτίας του πολιτικού, 
νομικού ή διεθνούς καθεστώτος της χώρας από την οποία προέρχεται κανείς, 
είτε πρόκειται για χώρα ή εδαφική περιοχή ανεξάρτητη, υπό κηδεμονία ή 
υπεξουσία, ή που βρίσκεται υπό οποιονδήποτε άλλον περιορισμό κυριαρχίας.


\stoptext


I've found a solution, with Segoeui (Windows font) as the main font and 
Theano Didot for the Greek text.
But I don't understand why setting the fonts to GFS Didot and Theano 
Didot prevents italics from being displayed ...



Best//JP





Le 26/02/2024 à 15:02, Thomas A. Schmitz a écrit :

I just tried your example with the latest version of GFSDidot (the older 
version I had on my system did not show some diacritics; this problem 
disappeared when I installed the latest), and the italics are there, I don’t 
see any problem in the pdf. If you want the Greek displayed in Theano, you will 
have to add “force=yes” to your definition of the fallback family:

\definefallbackfamily
 [mainface]
 [rm]
 [Theano Didot]
 [preset=range:greek,force=yes]

Your text cannot have two main languages, so

\mainlanguage[fr]

If you want hyphenation for your Greek passages, you can add

\setuplanguage [fr] [patterns={fr,agr}]

The line where you have polytonic Greek does not use precomposed characters, 
but combinations of greek characters and diacritics; this will probably not 
work in recent context versions that expect actual unicode input.

I hope I have really understood what you want: GFSDIdot for the French text and 
Theano for Greek?

HTH

Thomas


On 26. Feb 2024, at 13:32, Jean-Pierre Delange  wrote:

Dear list,

When handling the preamble to a document in which I would like to treat the 
text in French, with sometimes italics text and phrases in ancient Greek, I 
encounter the following difficulty:
if I use TeX Gyre Pagella as the main font, everything works fine, except for 
the Ancient Greek text, which I don't like the look of. But the Greek text is 
displayed, as are the French italics. On the other hand, if I use GFS Didot as 
the main font and Theano Didot for the Greek, the italics disappear and the 
Greek text looks better. The CTX version I use is: mtx-context | current 
version: 2024.01.24 22:39.

Herewith are two MWE attachments (*.tex + *.pdf) with different fonts. What am 
I missing ? Thanks for your answers.

JP



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

maillist :ntg-context@ntg.nl  
/https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  :https

[NTG-context] Re: MetaPost lines in tables?

2024-02-22 Thread Henning Hraban Ramm

Am 22.02.24 um 18:35 schrieb Hans Hagen via ntg-context:

On 2/21/2024 7:47 PM, Henning Hraban Ramm wrote:

(I’m sure I already used that somewhere… Must document…)
ok, new feature dedicated to Hraban ... who then of course has to 
document it.


This is nice.
Thank you, will do.

(Actually I’m not much interested in dashed borders but to have lines 
affected by my sketchy style - courtesy of Aditya et al., see below)


Taco, will the syntax pages in the wiki update automatically to a newer 
version?



"""
\startuseMPgraphic{mp:sketchy}
input mp-sketch.mp;
sketchypaths;

sketch_amount := 1 + (uniformdeviate 2);
sketch_passes := 3;
sketch_segments := 2 + (uniformdeviate 3);
sketch_length := OverlayWidth / 3;

draw topboundary withpen pensquare withcolor lightgray;
naturalizepaths;
\stopuseMPgraphic

\defineoverlay[sketchylines][\useMPgraphic{mp:sketchy}]

\setupTABLE[r][first][style=bold]
\setupTABLE[r][each][
topoffset=1em,bottomoffset=0.5em,
background=sketchylines,
% would be nice if the background wouldn’t start at each column
]
\setupTABLE[c][each][frame=off]
\bTABLE[]
\bTR
\bTD{Stadt}\eTD
\bTD{Land}\eTD
\bTD{Fluss}\eTD
\eTR
\dorecurse{10}{
\bTR
\bTD\strut \eTD\bTD \eTD\bTD \eTD
\eTR
}
\eTABLE
"""


Hraban%D \module
%D   [   file=mp-sketch.mp
%Dversion=2021.05.13
%D  title=\CONTEXT\ \METAPOST\ graphics,
%D   subtitle=Sketch drawing,
%D author=Aditya Mahajan,
%D   date=\currentdate,
%D  copyright={Aditya Mahajan}]

%D This metapost module is inspired by a TeX.SE question:
%D http://tex.stackexchange.com/q/39296/323
%D
%D I thought that it would be fun to implement a similar feature in MetaPost.
%D
%D To use this package in MetaPost:
%D
%D \starttyping
%Dinput mp-sketch;
%D
%Dbeginfig(1)
%D  sketchypaths; % Make draw and fill sketchy
%D  ...
%D  naturalizepaths; % Restore the value of draw and fill
%D  ...
%Dendfig
%D \stoptyping
%D
%D The code is heavily inspired by Hans Hagen's Metafun macros.
%D
%D The macro \type{sketchypaths} is modeled after \type{visualizepaths} from
%D \filename{mp-tool}.

def sketchypaths =
let draw = sketchdraw ;
let fill = sketchfill ;
enddef ;

%D Check if \filename{mp-tool} is loaded
if not known context_tool :
  let normaldraw = draw;
  let normalfill = fill;

  def naturalizepaths =
  let fill = normalfill ;
  let draw = normaldraw ;
  enddef ;
fi

%D The variable \type{sketch_amount} determines the amount of randomness in the
%D drawing
numeric sketch_amount; sketch_amount := 0.75bp;

%D The variable \type{sketch_passes} determines the number of times the path
%D is drawn
numeric sketch_passes; sketch_passes := 1;

%D Based on \type{randomized}. Assumes p is path:
numeric sketch_segments; sketch_segments := 20;

%D Length (time) of line segments:
numeric sketch_length; sketch_length := 5mm;

primarydef p sketchrandomized s = (
if path p :
for t = 0 step 1/sketch_segments until 1-1/sketch_segments :
((point   (t*arclength(p)) on p) 
randomshifted s) .. controls
((postcontrol (t*arclength(p)) on p) 
randomshifted s) and
((precontrol  ((t+1/sketch_segments)*arclength(p)) on p) 
randomshifted s) ..
endfor
% TODO: beide Ansätze kombinieren. Eckpunkte erhalten!

%for t = 0 step sketch_length until arclength p:
%  (point (arctime t of p) of p) randomshifted s ..
%endfor
if cycle p : % funktioniert nicht
  cycle
else :
  ((point   (arclength(p)) on p) randomshifted 
s)
  %(point (arctime t of p) of p) randomshifted s
fi
else :
p
fi
) enddef ;



%D The macro \type{sketchdraw} draws the randomized path. The
%D \type{expr} ... \type{text} trick is copied from the definition of
%D \type{drawarrow}
def sketchdraw expr p =
   do_sketchdraw(p)
enddef;

def do_sketchdraw(expr p) text t =
  if (path p) :
  for i = 1 upto max(1,sketch_passes) :
normaldraw p
   sketchrandomized sketch_amount
   withtransparency ("multiply", 1/max(1,sketch_passes))
   t ;
  endfor;
  else :
  normaldraw p t;
  fi
enddef;

%D The macro \type{sketchfill} randomizes the path before filling it.
def sketchfill expr p =
  do_sketchfill(p)
enddef ;

def do_sketchfill(expr p) text t =
  if (path p) :
  for i = 1 upto max(1,sketch_passes) :
normalfill p
   sketchrandomized sketch_amount
   withtransparency ("multiply", 1/max(1,sketch_passes))
   t ;
  endfor;
  else :
  normalfill p t;
  fi
enddef;

picture NoisePattern;
NoisePattern := image(
  pickup pencircle xyscaled 0.5bp;
  numeric pmax ; pmax := 7 ;
  numeric x ; numeric y ;
for i = 1 upto pmax:
for j = 1 upto pmax:
  

[NTG-context] Re: Memory consumption in new upload

2024-02-17 Thread Hans Hagen

On 2/17/2024 10:50 PM, Shiv Shankar Dayal wrote:
I assume you would have created typescripts for those fonts. Can you 
please add them to

ConTeXt distribution, at least for the popular fonts?


Many of those are covered by typescripts. Those that are not, are on my 
machine because we needed them (often long ago) for a project (these are 
commercial fonts, in most cases typeone and of such a collection 
actually a few were used then). There are also some commercial fonts 
that I got for free. Then there are fonts that I have to check because 
users had an issue (public ones, of different quality and useability). 
Of those 'trying to cover all of unicode with  different fonts of the 
same design' I tested subsets. And of course the fonts that come with 
the operating system (basically all fonts that context can access during 
a run).


We're not going to make typescripts for every combination as in practice 
for most documents one needs a single setup and therefore only a handful 
of lines of code (and likely use some typescript file for a math font). 
There's also the selectfont mechanism that uses heuristics to do the 
same. There are plenty of examples in the distribution and for a 
specific style that demands certain fonts one can also put the 
definitions in the style.


On Sun, Feb 18, 2024 at 3:12 AM Shiv Shankar Dayal 
mailto:shivshankar.da...@gmail.com>> wrote:


The only change I made was that I started using a 9pt modern font
than a 10 pt modern font.

My document decreased from 580+ pages to 500 pages after that.

About your document, I assume you had a lot of Graphics because text
only 180MB is too high.
I have only few diagrams and my file size is only 3MB.

On Sun, Feb 18, 2024 at 2:13 AM Hans Hagen mailto:j.ha...@xs4all.nl>> wrote:

On 2/17/2024 6:17 PM, Shiv Shankar Dayal wrote:
 > Thanks for new upload. I see that memory consumption is much
less than
 > previous version. So
 > once again, thanks a lot.
 >
 > I am curious about what has changed in recent upload, that
memory
 > consumption is about 60% of earlier versions.
it's hard to tell what exact consumpiton is becaue for instance
when lua
creates tables, they grow by factors two when then have to
(maybe 5.5 is
a bit less consuming)

on the one hand luametatex is more efficient than luatex due to
all kind
of ímprovements' but some nodes are larger so that takes more
memory,
which is only noticed when one has lots of text on a page (or keeps
boxes stuff around)

anyway, not that much changed since the previous upload, so
maybe you
just stay below a threshold

I recently generated a 180MB document with 2500 fonts + metapost
outlines of them and that could bump mem usage (with empty
cache) to 30
GB (less after fonts were cached) but normally we stay around
125 MB for
a document. Anyway, tex mem consumption can often be neglected
compared
to other applications.

Hans


-
                                            Hans Hagen | PRAGMA ADE
                Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
         tel: 038 477 53 69 | www.pragma-ade.nl
<http://www.pragma-ade.nl> | www.pragma-pod.nl
<http://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 <mailto:ntg-context@ntg.nl> /
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
<https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl>
webpage  : https://www.pragma-ade.nl <https://www.pragma-ade.nl>
/ https://context.aanhet.net <https://context.aanhet.net> (mirror)
archive  : https://github.com/contextgarden/context
<https://github.com/contextgarden/context>
wiki     : https://wiki.contextgarden.net
<https://wiki.contextgarden.net>

___



-- 
Respect,

Shiv Shankar Dayal



--
Respect,
Shiv Shankar Dayal

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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : http

[NTG-context] BUG: colour spilling in btxrendering

2024-02-01 Thread Alexandre Christe
Dear list,

It seems with one of the latest lmtx this old reported issue 
(https://www.mail-archive.com/ntg-context@ntg.nl/msg84988.html) is back.

MWE:

\setupinteraction[state=start,color=red,style=]
\setupbtx[aps:cite][alternative=entry]
\usebtxdefinitions[aps]

\startbuffer [bib]
@ARTICLE{67533,
 author={De Doncker, R.W.A.A. and Divan, D.M. and Kheraluwala, M.H.},
 journal={IEEE Transactions on Industry Applications},
 title={A three-phase soft-switched high-power-density DC/DC converter for 
high-power applications},
 year={1991},
 volume={27},
 number={1},
 pages={63-73},
 keywords={DC-DC power converters;Resonance;Switching 
frequency;Inverters;Filters;Snubbers;Circuit topology;Thyristors;Switching 
converters;Industry Applications Society},
 doi={10.1109/28.67533}}

}
\stopbuffer
\usebtxdataset [bib.buffer]

\starttext

\cite[alternative=entry][67533]

\startnointerference
 \placelistofpublications
\stopnointerference

\stoptext

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

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

2024-01-25 Thread Jim
On Thu, Jan 25, 2024 at 22:22 (+0100), Wolfgang Schuster wrote:

> Jim schrieb am 25.01.2024 um 22:01:
>> Hi Henning,

>> On Thu, Jan 25, 2024 at 17:16 (+0100), Henning Hraban Ramm wrote:

>>> Am 25.01.24 um 16:12 schrieb Jim:
>>> > Hi, I was wondering if anyone here could help me with these three things:
>>> > For a long time I have been using Wichura's TaBle macros (i.e., what one
>>> > gets with
>>> >   \input table
>>> > in plain TeX) and would like to use what appears to be ConTeXt's version 
>>> > of
>>> > those (i.e., what one gets with \starttable ... \stoptable).

>>> > However, https://wiki.contextgarden.net/Command/starttable says
>>> > The environment \starttable ... \stoptable is and (sic) old and
>>> > nearly obsolete way to handle tabular material
>>> > Q1: are there plans to remove \starttable ... \endtable from ConTeXt any
>>> > time "soon", or is that wiki comment gratuitously pessimistic?

>>> Hans suggests to use tabulate as long as it fits.
>> I just gave that a try, using the same syntax as \starttable:

>> \starttable[|c|c|]
>> \HL
>> \VL \bf Year \VL \bf Citizens \VL\SR
>> \HL
>> \VL 1675 \VL ˜428 \VL\FR
>> \VL 1795 \VL 1124 \VL\MR
>> \VL 1880 \VL 2405 \VL\MR
>> \VL 1995 \VL 7408 \VL\LR
>> \HL
>> \stoptable

>> \starttabulate[|c|c|]
>> \HL
>> \VL \bf Year \VL \bf Citizens \VL\SR
>> \HL
>> \VL 1675 \VL ˜428 \VL\FR
>> \VL 1795 \VL 1124 \VL\MR
>> \VL 1880 \VL 2405 \VL\MR
>> \VL 1995 \VL 7408 \VL\LR
>> \HL
>> \stoptabulate

>> While tabulate produced a table with the above input, it needs some work to
>> make the table look good.  (The columns are too narrow, the vrules don't
>> meet the hrules, ...).

>> Perhaps these can be fixed with some tweaking, but I notice that in all of
>> https://wiki.contextgarden.net/Command/starttabulate
>> and
>> https://wiki.contextgarden.net/Tabulate
>> and
>> http://www.ntg.nl/maps/22/28.pdf
>> there is a conspicuous lack of examples with vrules.  And the tables in the
>> (at least) the starttabulate wiki page which use vrules don't use tabulate
>> to create the tables.

>> Coincidence?  I think not.  :-)

> Table which rely on rules to make the content readable have a serious
> problem
> (read Edward Tufte books how you can improve the visual style) but the
> better
> alternative in this case are either natural tables or extreme tables.

> Below is a example which uses the table like wrapper for natural tables
> which makes adding rules and changing the padding around text very
> simple because each table cell is a \framed block with all its options.

> \starttext

> \startsetups[ruledtable]
>   \setupTABLE [frame=off,align=middle,loffset=.5em,roffset=.5em]
>   \setupTABLE [column] [each]  [leftframe=on,rightframe=on]
>   \setupTABLE [row]    [first]
> [topframe=on,bottomframe=on,foregroundstyle=bold]
>   \setupTABLE [row]    [last]  [bottomframe=on]
> \stopsetups

> \startTABLE[setups=ruledtable]
> \NC Year \NC Citizens \NC\NR
> \NC 1675 \NC ˜428 \NC\NR
> \NC 1795 \NC 1124 \NC\NR
> \NC 1880 \NC 2405 \NC\NR
> \NC 1995 \NC 7408 \NC\NR
> \stopTABLE

> \stoptext

Wolfgang,

thanks for the response and the sample code.

[ Note to anyone else trying out this example: there are non-breakable
  spaces above, and depending on your system if you copy and paste them
  into a file, they will cause this code to fail.  ]


I won't argue with you about readability of tables, but if I am typesetting
something for someone and they want it a certain way, I don't want to get
into an argument about it with them either.  :-)


The nice thing about your setup above is that it is nice and structured.
But if a table calls for some row, column or cell to be treated
differently, I guess I am in for some more reading.

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

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

2024-01-25 Thread Wolfgang Schuster

Jim schrieb am 25.01.2024 um 22:01:

Hi Henning,

On Thu, Jan 25, 2024 at 17:16 (+0100), Henning Hraban Ramm wrote:


Am 25.01.24 um 16:12 schrieb Jim:

Hi, I was wondering if anyone here could help me with these three things:
For a long time I have been using Wichura's TaBle macros (i.e., what one
gets with
  \input table
in plain TeX) and would like to use what appears to be ConTeXt's version of
those (i.e., what one gets with \starttable ... \stoptable).



However, https://wiki.contextgarden.net/Command/starttable says
The environment \starttable ... \stoptable is and (sic) old and
nearly obsolete way to handle tabular material
Q1: are there plans to remove \starttable ... \endtable from ConTeXt any
time "soon", or is that wiki comment gratuitously pessimistic?



Hans suggests to use tabulate as long as it fits.

I just gave that a try, using the same syntax as \starttable:

\starttable[|c|c|]
\HL
\VL \bf Year \VL \bf Citizens \VL\SR
\HL
\VL 1675 \VL ˜428 \VL\FR
\VL 1795 \VL 1124 \VL\MR
\VL 1880 \VL 2405 \VL\MR
\VL 1995 \VL 7408 \VL\LR
\HL
\stoptable

\starttabulate[|c|c|]
\HL
\VL \bf Year \VL \bf Citizens \VL\SR
\HL
\VL 1675 \VL ˜428 \VL\FR
\VL 1795 \VL 1124 \VL\MR
\VL 1880 \VL 2405 \VL\MR
\VL 1995 \VL 7408 \VL\LR
\HL
\stoptabulate

While tabulate produced a table with the above input, it needs some work to
make the table look good.  (The columns are too narrow, the vrules don't
meet the hrules, ...).

Perhaps these can be fixed with some tweaking, but I notice that in all of
https://wiki.contextgarden.net/Command/starttabulate
and
https://wiki.contextgarden.net/Tabulate
and
http://www.ntg.nl/maps/22/28.pdf
there is a conspicuous lack of examples with vrules.  And the tables in the
(at least) the starttabulate wiki page which use vrules don't use tabulate
to create the tables.

Coincidence?  I think not.  :-)


Table which rely on rules to make the content readable have a serious 
problem
(read Edward Tufte books how you can improve the visual style) but the 
better

alternative in this case are either natural tables or extreme tables.

Below is a example which uses the table like wrapper for natural tables
which makes adding rules and changing the padding around text very
simple because each table cell is a \framed block with all its options.

\starttext

\startsetups[ruledtable]
  \setupTABLE [frame=off,align=middle,loffset=.5em,roffset=.5em]
  \setupTABLE [column] [each]  [leftframe=on,rightframe=on]
  \setupTABLE [row]    [first] 
[topframe=on,bottomframe=on,foregroundstyle=bold]

  \setupTABLE [row]    [last]  [bottomframe=on]
\stopsetups

\startTABLE[setups=ruledtable]
\NC Year \NC Citizens \NC\NR
\NC 1675 \NC ˜428 \NC\NR
\NC 1795 \NC 1124 \NC\NR
\NC 1880 \NC 2405 \NC\NR
\NC 1995 \NC 7408 \NC\NR
\stopTABLE

\stoptext

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: Why LuaMetaTex is so slow?

2024-01-18 Thread Hans Hagen

On 1/18/2024 7:56 PM, Shiv Shankar Dayal wrote:




In comparison to LaTeX with LuaHBTeX, ConTeXt with LuaMetaTeX is
lightning fast.

pdfTeX is 8bit, and Knuth’s plain TeX is very low level – for a fairer
comparison, try the TeXbook on LuaMetaTeX (I don’t know if “plain”
works
though).

I understand that why it is slow, but the problem is that the difference 
is too high.

My book has lots of math, so perhaps that is the reason.

You can run the texbook with \tracingall and see what actually happens.

The texbook uses plain tex (very lightweight) with a dedicated style 
(also lightweight). On the contrary context uses layers of abstraction, 
a more complex font, math, structure, page etc etc etc sytstem.


In fact, plain tex had to be as it is because otherwise it would take 
ages to process teh texbook. On a pc one could see the page numbers 
crawl so in the end wr're quite okay nowadays.


If you run context with \tracingall you'll see that more goes on.

For me 40 pps sounds not that bad. If you use only text you can get to 
500 pps but that's not realistic. Maybe your style is suboptimal.


Also, open type fonts, opentype math, unicode, color, etc etc comes at a 
price. And, compared to pdftex, in most cases luametatex is faster on 
documents of average complexity. If you also use xml and/or metapost you 
migh tbe dragged down to a few pages per second while lmtx doesn't 
suffer much.


Anyway, if you think it can be made faster you can always post code to 
this list that identifies bottlenecks.


Of course we'll never be as fast as (pure) plain tex (no layers added) 
or latex (which often is advocated as faster than context).


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] Suggestions and problems of the manuals

2024-01-17 Thread Gerion Entrup
ollected, 0 deltas, 0 shared partials, 
0 partial entries
mkiv lua stats  > used platform: linux-64, type: unix, binary subtree: 
texmf-linux-64
mkiv lua stats  > used engine: luametatex version: 2.10.11, 
functionality level: 20231231, format id: 698, compiler: gcc
mkiv lua stats  > tex properties: 807097 hash slots used of 2097152, 
50666 control sequences, approximate memory usage: 49 MB
mkiv lua stats  > lua properties: engine: lua 5.4, used memory: 84 MB, 
ctx: 80 MB, max: 80 MB, symbol mask: utf (τεχ)
mkiv lua stats  > runtime: 0.528 seconds, 1 processed pages, 1 shipped 
pages, 1.895 pages/second
mtx-context | purged files: 
math-mkiv-t-b-ce3b35636ef01ee62897a2beb76049e0.log, 
math-mkiv-t-b-ce3b35636ef01ee62897a2beb76049e0.tmp, 
math-mkiv-t-b-ce3b35636ef01ee62897a2beb76049e0.tuc
system  | total runtime: 1.044 seconds of 1.071 seconds

buffers > typeset > no changes in 'demo-4', processing skipped
floatblocks > '3' limited
floatblocks > 3 saved
pages   > flushing realpage 14, userpage 12, subpage 14
floatblocks > 1 moved
floatblocks > 2 moved
floatblocks > 3 moved
pages   > flushing realpage 15, userpage 13, subpage 15
pages   > flushing realpage 16, userpage 14, subpage 16
pages   > flushing realpage 17, userpage 15, subpage 17
pages   > flushing realpage 18, userpage 16, subpage 18
pages   > flushing realpage 19, userpage 17, subpage 19
structure   > sectioning > section @ level 3 : 0.3.1 -> Scripts
tex error   > tex error on line 370 in file 
/home/gerion/src/context/doc/context/sources/general/manuals/math/math-spacing.tex:
 Math error: parameter 'subshiftdown' with id 49 in style 2 is not set

 \math_m_nop
#1->\relax \ifmmode #1\else \normalstartimath 
\usemathstyleparameter \mathematicsparameter \c!mathstyle \expand 
\everyinsidemathematics \relax \begingroup #1\endgroup \normalstopimath
\fi

{\switchtobodyfont [cambria]\math{F_j = \int\nolimits _a^b}
} {Cambria}

360 font can be very detailed in where italic correction is to be 
applied and how
361 advanced stepwise kerns are used, but not many fonts have 
extensive information.
362 Here are some differences in rendering. In \OPENTYPE\ the 
super- and subscript of
363 an integral are moved right and left half of the italic 
correction.
364
365 \startlinecorrection
366 \startcombination[6*1]
367 {\switchtobodyfont  [modern]\math{F_j = \int\nolimits 
_a^b}} {Latin Modern}
368 {\switchtobodyfont [pagella]\math{F_j = \int\nolimits 
_a^b}} {Pagella}
369 {\switchtobodyfont  [dejavu]\math{F_j = \int\nolimits 
_a^b}} {Dejavu}
370 >>  {\switchtobodyfont [cambria]\math{F_j = \int\nolimits 
_a^b}} {Cambria}
371 {\switchtobodyfont[lucidaot]\math{F_j = \int\nolimits 
_a^b}} {Lucida OT}
372 {\switchtobodyfont[xits]\math{F_j = \int\nolimits 
_a^b}} {Xits}
373 \stopcombination
374 \stoplinecorrection
375
376 \stopsection
377
378 \startsection[title=Bad fonts]
379
380 There might be fonts out there where the italic correction is 
supposed to be
Sorry, but I can't typeset math unless various parameters have been 
set. This is
normally done by loading special math fonts into the math family slots. 
Your font
set is lacking at least the parameter mentioned earlier.
mtx-context | fatal error: return code: 1
- I tried to find a prebuild version and found 
https://mirror.contextgarden.net/general/manuals/math-mkiv.pdf.
  However, this document seems to be from 2021 and has a kind of wobbly
  rendering in Okular/Poppler (I remember the same phenomena with early
  LMTX). See the screenshot attached (math-mkiv-online.png). Is there a
  newer version somewhere? Maybe it is meaningful to delete the old
  version.


Best
Gerion
From 187f2bf0901d414bf55869054d29ee2c4bec1a64 Mon Sep 17 00:00:00 2001
From: Gerion Entrup 
Date: Tue, 16 Jan 2024 23:40:40 +0100
Subject: [PATCH] units-mkiv: improve

- typos
- remove getbuffer without context
- demonstrate usage of pm and to
---
 doc/context/sources/general/manuals/units/units-mkiv.tex | 8 +++-
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/doc/context/sources/general/manuals/units/units-mkiv.tex b/doc/context/sources/general/manuals/units/units-mkiv.tex
index d70c7221f..a1631aadb 100644
--- a/doc/context/sources/general/manuals/units/units-mkiv.tex
+++ b/doc/context/sources/general/manu

[NTG-context] Re: Math alignment issue

2024-01-17 Thread Otared Kavian
nce you do not show the source.
>>> From last upload, there is location=packed for align, so now that can
>>> be used "inline" in formulas. See attached. I hope it helps.
>>> 
>>> Best, Mikael
>>> 
>>> On Tue, Jan 16, 2024 at 9:41 PM Otared Kavian >> <mailto:ota...@gmail.com>> wrote:
>>>> 
>>>> Hi Mickael,
>>>> 
>>>> I wish you a happy new year !
>>>> I apologize for writing you outside the mailing list: this is du eto the 
>>>> fact that I am attaching two screenshots in order to show the problem I 
>>>> encounter, and these documents cannot go through the mailing list.
>>>> 
>>>> In a document written a year and half ago I have the following definition:
>>>> 
>>>> \definemathmatrix[alignedcases]
>>>> [align={right,left,left},
>>>> distance=3pt,
>>>> left={\left\{},
>>>> right={\right.},
>>>> style=\displaystyle]
>>>> in order to typeset multi-lines formulas regrouped with a left brace. This 
>>>> is analogous to math-cases, but I need three columns instead of two.
>>>> 
>>>> When the alignment in maths changed I changed the above definition to the 
>>>> following:
>>>> 
>>>> \definemathsimplealign[alignedcases]
>>>> [left={\startmathfenced[cases]},
>>>> right=\stopmathfenced,
>>>> align={1:right,2:left,3:left},
>>>> strut=yes]
>>>> 
>>>> 
>>>> The result of the typesetting with LMTX in 2022 is shown in the attached 
>>>> document « math-align-2022.pdf »,
>>>> 
>>>> But when the same documentis  typeset with the latest version from 
>>>> 2024-01-08, it does not show the formulas correctly, as one can see in the 
>>>> attached screenshot « math-align-2024-01-08.pdf ».
>>>> 
>>>> I cannot reproduce the issue on a short document, but since there have 
>>>> been some changes in the way the math alignment is treated now, I wonder 
>>>> whether you can help me how to change my definitions accordingly.
>>>> In order to let th elist be informed, once the issue may be solved without 
>>>> the screenshots, I may post a message there.
>>>> 
>>>> Thanks in advance, and best regards: Otared
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>> <240117-1.mkxl><240117-1.pdf>
>> 
>> Otared Kavian
>> e-mail: ota...@gmail.com <mailto:ota...@gmail.com>
>> Phone: +33 6 88 26 70 95
>> 
>> 
>> 
>> 
> 
> Otared Kavian
> e-mail: ota...@gmail.com <mailto:ota...@gmail.com>
> Phone: +33 6 88 26 70 95
> 
> 
> 
> 

Otared Kavian
e-mail: ota...@gmail.com
Phone: +33 6 88 26 70 95




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

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

2024-01-17 Thread Otared Kavian
Hi Mikael,Thank you for your reply. When I typeset the example you sent me, that is%begin 240117-1-bis.tex\definemathsimplealign[alignedcases]		[left={\startmathfenced[cases]},		right=\stopmathfenced,		align={1:right,2:left,3:left},		strut=yes]\setupformula  [location=left]\starttext\samplefile{knuthmath}\startplaceformula	\startformula		\startalignedcases			\NC u'(t) - \nabla \cdot (a(x)\nabla u) + Vu \NC = 0      \NC \mtext{bla bla bla}     \NR			\NC u(x,0)                                   \NC = u_0(x) \NC \mtext{bla bla}         \NR      \NC u(t,\sigma)                              \NC = 0      \NC \mtext{bla bla bla bla} \NR		\stopalignedcases	\stopformula\stopplaceformula\samplefile{knuthmath}\startplaceformula	\startformula		\startalign[location=packed,n=2,m=2,align={1:right,2:left},fences=cases]			\NC u'(t) - \nabla \cdot (a(x)\nabla u) + Vu \NC = 0      \NC \NC \mtext{bla bla bla}     \NR			\NC u(x,0)                                   \NC = u_0(x) \NC \NC \mtext{bla bla}         \NR      \NC u(t,\sigma)                              \NC = 0      \NC \NC \mtext{bla bla bla bla} \NR		\stopalign	\stopformula\stopplaceformula\samplefile{knuthmath}\stoptext% end 240117-1-bis.texI get something different than the PDF you sent me: the formulas run into the text just above them, as you can see in the attached PDF. I am using ConTeXt LMTX version 2024.01.08 on MacOS 11.7.10. I don’t see what is wrong with my installation…Best regards: Otared

240117-1-bis.pdf
Description: Adobe PDF document
On 17 Jan 2024, at 09:47, Mikael Sundqvist <mic...@gmail.com> wrote:Hi Otared,I'm not sure how you get that code, since you do not show the source.From last upload, there is location=packed for align, so now that canbe used "inline" in formulas. See attached. I hope it helps.Best, MikaelOn Tue, Jan 16, 2024 at 9:41 PM Otared Kavian <ota...@gmail.com> wrote:Hi Mickael,I wish you a happy new year !I apologize for writing you outside the mailing list: this is du eto the fact that I am attaching two screenshots in order to show the problem I encounter, and these documents cannot go through the mailing list.In a document written a year and half ago I have the following definition:\definemathmatrix[alignedcases][align={right,left,left},distance=3pt,left={\left\{},right={\right.},style=\displaystyle]in order to typeset multi-lines formulas regrouped with a left brace. This is analogous to math-cases, but I need three columns instead of two.When the alignment in maths changed I changed the above definition to the following:\definemathsimplealign[alignedcases][left={\startmathfenced[cases]},right=\stopmathfenced,align={1:right,2:left,3:left},strut=yes]The result of the typesetting with LMTX in 2022 is shown in the attached document « math-align-2022.pdf »,But when the same documentis  typeset with the latest version from 2024-01-08, it does not show the formulas correctly, as one can see in the attached screenshot « math-align-2024-01-08.pdf ».I cannot reproduce the issue on a short document, but since there have been some changes in the way the math alignment is treated now, I wonder whether you can help me how to change my definitions accordingly.In order to let th elist be informed, once the issue may be solved without the screenshots, I may post a message there.Thanks in advance, and best regards: Otared<240117-1.mkxl><240117-1.pdf>
Otared Kaviane-mail: ota...@gmail.comPhone: +33 6 88 26 70 95

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

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


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

2024-01-15 Thread Mikael Sundqvist
Hi,

Try this:

On Mon, Jan 15, 2024 at 6:17 PM Pablo Rodriguez via ntg-context
 wrote:
>
> Dear list,
>
> I have the following sample:
>
>   \definefontfamily[mainface][rm][TeX Gyre Pagella]
>   \definefontfamily[coverface][rm][TeX Gyre Termes]

\definebodyfontenvironment[16pt]

>   \setupbodyfont[mainface, 16pt]
>   \starttext
>   \startmakeup[standard][style=\bf]
>   \switchtobodyfont[coverface]
>   This is a cover.
>   \stopmakeup
>
>   This is text.
>   \stoptext
>
> Compiling the sample with current latest (2024.01.08 11:23), LMTX puts
> Latin Modern Roman (no bold) and MkIV puts Termes (no bold).
>
> The results with previous latest (2023.09.26 18:19), cover is in Termes
> bold with LMTX and in Termes regular with MkIV.
>
> I guess there might be an issue here. Could anyone confirm this?
>
> Many thanks for your help,
>
> Pablo

Maybe some check will be added. (On the chat with Hans...)

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

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


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

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

I have the following sample:

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

  This is text.
  \stoptext

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

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

I guess there might be an issue here. Could anyone confirm this?

Many thanks for your help,

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

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


[NTG-context] OT: special ToC

2024-01-15 Thread Henning Hraban Ramm


I came across a table of contents style that’s hardly possible with TeX:

https://historians.social/@dbellingradt/111760591144801241
(image is too big for the ML)


(Yes of course you can do it with manual references and MetaPost lines…)


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

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


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

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

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

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

For code fragments in the XML source, I use:

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

To which I apply:

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

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

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

Many thanks for your help,

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

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


[NTG-context] Re: Do we have a geometry library for Metafun?

2024-01-13 Thread Gavin via ntg-context
Hi Shiv,

The author of tikz-euclide has another package, tikz-elements, which looks like 
it could be used to do all of these calculations for MetaFun.

The tikz-elements package, in spite of its name, appears to contain exactly one 
line of TikZ code. This line is in the very simple style file, 
tkz-elements.sty. Everything else is written in Lua. I think we could write a 
simple ConTeXt environment file that would replace tkz-elements.sty, making all 
of the tikz-elements package available for MetaFun rather than TikZ.

This would not give you the pretty drawing features of tikz-euclide, since 
those features really are written in TikZ. I do not know of a MetaPost package 
that does the same thing, but there might be one.

One pretty MetaPost drawing option is the byrne package by Sergey Slyusarev, 
which he used (with ConTeXt) to reproduce Oliver Byrne’s 1847 quirky edition on 
the first six books of Euclid’s “Elements”. All of the drawing is in MetaPost, 
and would work with MetaFun (I think). The LaTeX package is in TeX Live, and 
the ConTeXt version is at https://github.com/jemmybutton/byrne-euclid/.

Gavin


> On Jan 12, 2024, at 6:27 PM, Shiv Shankar Dayal  
> wrote:
> 
> 
> No library that I know of, but drawing tangents (and therefore, 
> perpendiculars) is straight-forward:
> 
>https://tex.stackexchange.com/a/108060/323
> 
> Circumcircle, orthocenter, etc... are you thinking of triangles or general 
> polynomails?
> 
> Triangles. I understand that most of it is very easy, but still a library 
> will help new users.
> Tikz has Tikz-Euclide and Asymptote has a Geometry package. A similar library 
> for Metafun
> will be very useful.
>  -- 
> Respect,
> Shiv Shankar Dayal
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / 
> https://mailman.ntg.nl/mailman3/lists/ntg-context.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: LMTX schema for poster

2024-01-11 Thread Henning Hraban Ramm

Am 11.01.24 um 22:04 schrieb Bruce Horrocks:


1. "ConTeXt" should be the biggest word - or as an obvious title for the 
poster, away from the actual drawing.


This will be only a part of the poster. I imagine a 3x3 grid with a 
title above and some information (website etc.) below.

The 9 elements of the grid will be
- such a diagram that explains the building blocks / general workflow
– the diagram of the layout areas
– the project structure (environment, product, component)
– some examples of code and results
I wanted to use the “christmas card” squares for borders around and 
inbetween.



2. Don't add the "MkXL" bit - it's a distracting detail that no one needs to know at this 
stage. Also it looks like "Mk 40" in Roman numerals, or extra large.


ok. But “extra large” is intentional, I guess.


3. I though Hans had stopped using the TeX style capitalisation now i.e. just 
"Context"?


Hans uses different versions.
We use “context group”, but I keep ConTeXt; esp. in the context of LaTeX 
(DANTE booth!), I’d like to stress that it’s still TeX.



4. It's not clear whether the intersecting boxes are simply decorative or meant 
to present some sort of logical structure. I'm happy for it to be decorative, 
in which case fewer labels might be better.


ConTeXt “wraps” the LuaMetaTeX binary, since it handles the input as 
well as the output. I wasn’t sure how to show what controls what.



5. Similar to the box structure comment is that it's not clear which words I 
should be looking at. Ask yourself: what word(s) do I want the viewer to 
remember when they walk away?

6. Consider swapping the TeX and MetaPost circles so that Lua, MetaPost and TeX are read 
left to right as they appear in the acronym LMTX. Perhaps invert the "triangle" 
so that there are two circles at the top.


My first idea was to show that TeX and MP are under Lua control, but 
Hans disagreed. So while the 3 subsystems interact, I wanted to keep TeX 
on top.



7. It doesn't really tell the viewer that Context is a typesetting system - it 
looks like it is a system for producing XMLs and PDFs. (Which is what it is 
but... much more)


I’ll show some typography on the poster, and there will be books around.


8. Don't forget space for a URL and/or a QR code to the Contextgarden website.


See above.


Sorry if the above sounds harsh - not meant to be - just brain storming.


No problem, thank you!


I have a suggestion though. Use the Christmas card code / memory game code to 
produce patterns to use as the dots in the QR code? If the QR is large enough 
for people to distinguish the individual dots then it would provide a talking 
point? Or maybe have a copy of the card game to hand and challenge them to find 
a randomly drawn card in the QR code?


I don’t think I understand your intention. I wouldn’t construct a QR 
code out of other stuff, it would become too big.


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: LMTX schema for poster

2024-01-11 Thread vm via ntg-context




On 12/01/2024 00:18, Bruce Horrocks wrote:
3. I though Hans had stopped using the TeX style capitalisation now i.e. 
just "Context"?



Maybe this is the time to change to a 'ctx' token instead of 'context'
(e.g. a lot ambiguity when searching online)

ctx as in cee-tee-ex
or if you want it to texify: cTx
where the T is like an umbrella (in the world of typesetting ;-)

.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: LMTX schema for poster

2024-01-11 Thread Bruce Horrocks


> On 11 Jan 2024, at 19:15, vm via ntg-context  wrote:
> 
> 
> 
> On 11/01/2024 19:52, Henning Hraban Ramm wrote:
>> Here’s a preliminary schema of LMTX. What do you think?
> 
> as is, it is difficult to understand where to look.
> what does is describe?
> 
> e.g. what is the distinction between the 'source' (lua tex) and the 
> 'resources' (fonts icc lib) and the 'frontend' (tex xml png ...mp)
> (no lua?)

Agreed.

In no particular order:

1. "ConTeXt" should be the biggest word - or as an obvious title for the 
poster, away from the actual drawing.

2. Don't add the "MkXL" bit - it's a distracting detail that no one needs to 
know at this stage. Also it looks like "Mk 40" in Roman numerals, or extra 
large.

3. I though Hans had stopped using the TeX style capitalisation now i.e. just 
"Context"?

4. It's not clear whether the intersecting boxes are simply decorative or meant 
to present some sort of logical structure. I'm happy for it to be decorative, 
in which case fewer labels might be better.

5. Similar to the box structure comment is that it's not clear which words I 
should be looking at. Ask yourself: what word(s) do I want the viewer to 
remember when they walk away?

6. Consider swapping the TeX and MetaPost circles so that Lua, MetaPost and TeX 
are read left to right as they appear in the acronym LMTX. Perhaps invert the 
"triangle" so that there are two circles at the top.

7. It doesn't really tell the viewer that Context is a typesetting system - it 
looks like it is a system for producing XMLs and PDFs. (Which is what it is 
but... much more)

8. Don't forget space for a URL and/or a QR code to the Contextgarden website.

Sorry if the above sounds harsh - not meant to be - just brain storming.

I have a suggestion though. Use the Christmas card code / memory game code to 
produce patterns to use as the dots in the QR code? If the QR is large enough 
for people to distinguish the individual dots then it would provide a talking 
point? Or maybe have a copy of the card game to hand and challenge them to find 
a randomly drawn card in the QR code?

—
Bruce Horrocks
Hampshire, UK

—
Bruce Horrocks
Hampshire, UK

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

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


[NTG-context] Width of captions and notes in outer margin not correct on even pages

2024-01-09 Thread Milan cel Mare via ntg-context

Hi,

I have observed that the widths of captions and also notes on even pages
is not as I would expect them to be.

Reading through the documentation I figured out that the width for
captions has to be set manually when they are placed in the outer
margin. I did so by setting it to width=\outermarginwidth.

But it seems that for captions the width is derived from the inner
margin width on even pages.

The width of notes in the outer margin placed with \inouter is also off
on even pages. They are too narrow and do not "fill" the available space
(things seems to work for notes in inner margins though).

Here is an example:

\setuppapersize[A4]
\setuplayout[backspace=40mm, width=100mm, leftmargindistance=5mm,
leftmargin=30mm, rightmargindistance=5mm, rightmargin=50mm, topspace=10mm]
\setuppagenumbering[alternative=doublesided]
\setupcaptions[location={outermargin, low}, width=\outermarginwidth,
headcolor=red, color=green, style={\tfx\setupinterlinespace}, align=width]
\setupexternalfigures[location=default]
\setupmargindata[style={\tfx}, stack=yes]
\setupmargindata[inouter][color=orange]
\setupmargindata[ininner][color=blue]

\showframe

\starttext
\section{Margin Tests}
\input knuth
Some more stuff\inouter{Some multi-line text to be placed in the outer
margin to check whether it is positioned correctly.} to
read\inouter{Another multi-line text to be placed in the outer margin to
check whether it is positioned correctly.}.

\startplacefigure[title={A lengthy caption perfectly suited to perform
some tests, which cause lines to wrap.}]
{\externalfigure[cow][maxwidth=80mm]}
\stopplacefigure

More stuff\ininner{A1, A2, A3, A4 are well-known paper formats used in
Europe and in some other places.}.

\input zapf
Some more stuff\inouter{Some multi-line text to be placed in the outer
margin to check whether it is positioned correctly.} to read.

\startplacefigure[title=A SVG test with a long caption to cause line wraps.]
{\externalfigure[cow][maxwidth=70mm]}
\stopplacefigure

More stuff\ininner{A1, A2, A3, A4 are well-known paper formats used in
Europe and in some other places.} to read.

\input knuth

\stoptext


As a workaround the width for captions can be set to
width=\rightmarginwidth, but how can I solve the issue with the notes?

I am running ConteXt 2023.09.26 18:19 on Windows 10.

Thanks and best regards

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

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

2024-01-09 Thread Mikael Sundqvist
Hi,

On Tue, Jan 9, 2024 at 2:45 PM G.C.H.M. Verhaag via ntg-context
 wrote:
>
> Hi,
> The example below works as expected, but within my product it doesn't.
>
> % Subject example before and after!
>
> \setuphead[subject][color=limegreen,before={\blank[none]},after={\blank[none]},align={flushleft,nothyphenated,tolerant}]
>
> \starttext
> A paragraph before calling the subject.
>
> \subject{\sc The subject}
>
> A paragrapf after the subject was called.
> \stoptext
>
> I use the \subject command within a columnset, could that be the problem?

Take the file that is not working. Comment out as much as possible,
but so that you still have something that gives unexpected output. A
sample file that gives correct output is not so easy to help from.

/Mikael

PS The \sc could go into the style= in the setup.
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
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: old style factorial symbol and theorems

2023-12-30 Thread Wolfgang Schuster

Shiv Shankar Dayal schrieb am 30.12.2023 um 09:40:
I tried this for old style factorial, but it appears much below the 
line in which it is used. How can I bring it up?


Replace the \inmframed command with \mcframed.

\define[1]\oldfact
  {\mcframed[frame=off,strut=no,leftframe=on,bottomframe=on]{#1}}

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: old style factorial symbol and theorems

2023-12-30 Thread Shiv Shankar Dayal
I tried this for old style factorial, but it appears much below the line in
which it is used. How can I bring it up?

On Wed, Dec 27, 2023 at 6:18 PM Shiv Shankar Dayal <
shivshankar.da...@gmail.com> wrote:

>
>
> A simple alternative to tikz is the usage of \framed.
>>
>> \define[1]\oldfact
>>   {\inmframed[frame=off,strut=no,leftframe=on,bottomframe=on]{#1}}
>>
>> \starttext
>>
>> \m{\oldfact{n}}
>>
>> \stoptext
>>
>> Wolfgang
>>
>> Thanks a lot. It should work nicely.
>
> --
> Respect,
> Shiv Shankar Dayal
>


-- 
Respect,
Shiv Shankar Dayal
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
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: old style factorial symbol and theorems

2023-12-27 Thread lynx
By "old style" factorial, do you mean the inside corner notation (shaped
like an L )? 

If so, Why? 

On 2023-12-27 05:01, Shiv Shankar Dayal wrote:

> Hi, 
> 
> How can I typeset old style factorial symbol and theorems in ConTeXt. I found 
> https://www.ntg.nl/maps/36/09.pdf but it does not work. What adaptation 
> should I do for it to work? 
> 
> -- 
> 
> Respect,
> Shiv Shankar Dayal 
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / 
> https://mailman.ntg.nl/mailman3/lists/ntg-context.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: old style factorial symbol and theorems

2023-12-27 Thread Mikael Sundqvist
Hi!

Not by computer, and I'm sure Hans (or Wolfgang) has already shown a way to
do the old factorial with the actuarian mechanism when I'm back to the
computer...

/Mikael

Den ons 27 dec. 2023 13:49Shiv Shankar Dayal 
skrev:

>
>
> A simple alternative to tikz is the usage of \framed.
>>
>> \define[1]\oldfact
>>   {\inmframed[frame=off,strut=no,leftframe=on,bottomframe=on]{#1}}
>>
>> \starttext
>>
>> \m{\oldfact{n}}
>>
>> \stoptext
>>
>> Wolfgang
>>
>> Thanks a lot. It should work nicely.
>
> --
> Respect,
> Shiv Shankar Dayal
>
> ___
> If your question is of interest to others as well, please add an entry to
> the Wiki!
>
> maillist : ntg-context@ntg.nl /
> https://mailman.ntg.nl/mailman3/lists/ntg-context.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: old style factorial symbol and theorems

2023-12-27 Thread Shiv Shankar Dayal
A simple alternative to tikz is the usage of \framed.
>
> \define[1]\oldfact
>   {\inmframed[frame=off,strut=no,leftframe=on,bottomframe=on]{#1}}
>
> \starttext
>
> \m{\oldfact{n}}
>
> \stoptext
>
> Wolfgang
>
> Thanks a lot. It should work nicely.

-- 
Respect,
Shiv Shankar Dayal
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
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: old style factorial symbol and theorems

2023-12-27 Thread Wolfgang Schuster

Shiv Shankar Dayal schrieb am 27.12.2023 um 13:31:


What do you expect here to pass as argument to the oldfact command?

I will pass something like n, 5, 10 etc.


A simple alternative to tikz is the usage of \framed.

\define[1]\oldfact
  {\inmframed[frame=off,strut=no,leftframe=on,bottomframe=on]{#1}}

\starttext

\m{\oldfact{n}}

\stoptext

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: old style factorial symbol and theorems

2023-12-27 Thread Shiv Shankar Dayal
What do you expect here to pass as argument to the oldfact command?
>
I will pass something like n, 5, 10 etc.

>
> This works here:
>
> \defineenumeration
>   [proof]
>   [closesymbol={\mathematics{\square}}]
>
> \starttext
>
> \startproof
> \samplefile{lorem}
> \stopproof
>
> \stoptext
>

Thanks. I will test this again.
-- 
Respect,
Shiv Shankar Dayal
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
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: old style factorial symbol and theorems

2023-12-27 Thread Wolfgang Schuster

Shiv Shankar Dayal schrieb am 27.12.2023 um 13:19:

I use following in Latex to generate old factorial symbol:

\newcommand{\oldfact}[1]{%
\tikz[baseline]{\node[anchor=base,inner 
sep=0.3ex](mynode){\ensuremath{#1}};\draw(mynode.north 
west)--(mynode.south west)--(mynode.south east);\path[use as bounding 
box]($(mynode.south west)+(-0.3ex,-0.3ex)$)rectangle($(mynode.north 
east)+(0.3ex,0.3ex)$);}

}


What do you expect here to pass as argument to the oldfact command?

But I do not know how to make it work in ConTeXt as I am not very 
familiar with ConTeXt.


If you see https://www.ntg.nl/maps/36/09.pdf page no. 28 then proof is 
defined as


\defineenumeration
[proof]
[ text=Proof,
number=no,
headstyle=italic,
title=no, %this is the default
closesymbol={\mathematics{\square}},
style=normal]

But the closessymbol does not work.

I will create a minimum working example and post it as soon as possible.


This works here:

\defineenumeration
  [proof]
  [closesymbol={\mathematics{\square}}]

\starttext

\startproof
\samplefile{lorem}
\stopproof

\stoptext

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: old style factorial symbol and theorems

2023-12-27 Thread Shiv Shankar Dayal
I use following in Latex to generate old factorial symbol:

\newcommand{\oldfact}[1]{%
\tikz[baseline]{\node[anchor=base,inner
sep=0.3ex](mynode){\ensuremath{#1}};\draw(mynode.north west)--(mynode.south
west)--(mynode.south east);\path[use as bounding box]($(mynode.south
west)+(-0.3ex,-0.3ex)$)rectangle($(mynode.north east)+(0.3ex,0.3ex)$);}
}

But I do not know how to make it work in ConTeXt as I am not very familiar
with ConTeXt.

If you see https://www.ntg.nl/maps/36/09.pdf page no. 28 then proof is
defined as

\defineenumeration
[proof]
[ text=Proof,
number=no,
headstyle=italic,
title=no, %this is the default
closesymbol={\mathematics{\square}},
style=normal]

But the closessymbol does not work.

I will create a minimum working example and post it as soon as possible.

On Wed, Dec 27, 2023 at 5:44 PM Wolfgang Schuster <
wolfgang.schuster.li...@gmail.com> wrote:

> Shiv Shankar Dayal schrieb am 27.12.2023 um 13:01:
> > Hi,
> >
> > How can I typeset old style factorial symbol and theorems in ConTeXt.
> > I found https://www.ntg.nl/maps/36/09.pdf but it does not work. What
> > adaptation should I do for it to work?
>
> Can you be more precise what you have tried and doesn't work, a complete
> minimal example would be perfect.
>
> Wolfgang
>
>

-- 
Respect,
Shiv Shankar Dayal
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
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: old style factorial symbol and theorems

2023-12-27 Thread Wolfgang Schuster

Shiv Shankar Dayal schrieb am 27.12.2023 um 13:01:

Hi,

How can I typeset old style factorial symbol and theorems in ConTeXt. 
I found https://www.ntg.nl/maps/36/09.pdf but it does not work. What 
adaptation should I do for it to work?


Can you be more precise what you have tried and doesn't work, a complete 
minimal example would be perfect.


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] old style factorial symbol and theorems

2023-12-27 Thread Shiv Shankar Dayal
Hi,

How can I typeset old style factorial symbol and theorems in ConTeXt. I
found https://www.ntg.nl/maps/36/09.pdf but it does not work. What
adaptation should I do for it to work?

-- 
Respect,
Shiv Shankar Dayal
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[NTG-context] Re: QR Code

2023-12-21 Thread Ursula Hermann
termine if using 
environment variables is the best solution, or whether there are faster 
alternatives available.

Environment variables can be set and inspected through the Windows Control 
Panel (System -> Advanced -> Environment Variables). Details depend on your 
version of Windows.

For an application launched from WinEdt it is also possible to set such values 
locally inside WinEdt because WinEdt's environmental block is inherited by them 
(when they are launched from WinEdt). This can be done by adding such 
definitions in the Variables page in the Execution Modes interface. Up to six 
such variables can be maintained through this page; a variable is enabled when 
the corresponding checkbox Var is checked.

[X]

For example, suppose that you want MiKTeX to search for input files in some 
non-standard fixed locations, e.g. C:\MyCurrentTeXProject and C:\MyTeXFiles and 
all subfolders inside this one, while your bibliography (.bib) files are stored 
in C:\MyTeXFiles\Bib directory. After consulting MiKTeX's help, you decide that 
you want to accomplish this by defining the appropriate environment variables 
TEXINPUTS and BIBINPUTS (even though this is not a recommended method as it can 
slow down the compilation). In this page define and enable the variables:

  BIBINPUTS
.;C:/MyTeXFiles/Bib;

  TEXINPUTS
.;C:/MyCurrentTeXProject;C:/MyTeXFiles//;


The list of folders is separated by a semicolon, and "//" at the end indicates 
that all subfolders should be searched as well. Even though latest MiKTeX and 
TeX Live allow Windows-style specification of folders in environment variables, 
it is best to use UNIX-style (TeX usually expects and prefers directories to be 
separated by "/" rather "\" because the backslash is its control character). 
Furthermore, "//" at the end cannot be substituted with "\\".

The initial dot "." is an instruction to search first in the current folder. 
The trailing semicolon ";" means a search in the TeX root if nothing is found 
in the specified folders. While not necessary when using MiKTeX, these are 
absolutely required when using TeX Live (otherwise, the current folder isn't 
searched and files in root folder won't be found)!

Recursing through directories with many files can be pretty slow: you should 
consider faster alternatives (e.g. registering your own root directory) as 
described and recommended in MiKTeX's manual. But this is certainly not a 
WinEdt issue...

Alternative method

WinEdt's Macro Manual (among other things) explains how to use the SetEnvVar 
and GetEnvVar macro functions, should you require more information. And instead 
of using the Variables interface of the Execution Modes dialog, it is possible 
to add code directly to WinEdt's Local Startup macro (accessible through the 
Advanced -> Event Handlers section of the Options Interface):

  SetEnvVar("BIBINPUTS",".;C:/MyTeXFiles/Bib;");
  SetEnvVar("TEXINPUTS",".;C:/MyCurrentTeXProject;C:/MyTeXFiles/"+"/;");


After adding the above lines to WinEdt's Local Startup macro, execute the 
command Run Startup Macro from the Macros menu. That's all. If you now launch a 
compilation from WinEdt, the accessories will use the modified variables.

When in doubt about the value of any environment variable, you can use the 
command Define and Run Macro found in the Macros menu and execute the macro:

  Prompt("%@('Environment Variable');");


Note: This is where WinEdt's involvement with environment variables ends (you 
can set and inspect them through WinEdt's macros or through this interface). 
The meaning of such variables is described in the documentation that comes with 
your accessories or TeX System (e.g. MiKTeX's manual). Whether or not they work 
as you expect depends on your TeX System (but not on WinEdt!). Contrary to what 
many users believe, neither WinEdt's nor the Windows PATH variable have 
anything to do with where TeX is searching for its input files!


Diagnosis

WinEdt displays crucial information about your TeX System and accessories in 
this page. If you encounter problems with launching a certain accessory, this 
report can be used to see if the application is installed and if it can be 
found. If the problem is only with detecting the executable, then the 
information in the Troubleshooting section should guide you in manually fixing 
the problem. If, on the other hand, the executable can be located but it does 
not run properly, it means that there are some problems with it (or your 
document source) outside WinEdt. WinEdt cannot detect and fix this kind of 
problem and you'll have to consult the documentation pertaining to that 
accessory or TeX System.

If WinEdt cannot find any trace of your TeX System or other accessories, it is 
likely that they are not properly installed. Reinstalling the problematic 
software and

[NTG-context] Re: Problem with the paragraph

2023-12-18 Thread Ursula Hermann
Dear Bruce, 

Thank you for your Mail 
It works  perfect. Thank you .
Uschi Hermann 

-Ursprüngliche Nachricht-
Von: Bruce Horrocks  
Gesendet: Freitag, 15. Dezember 2023 14:00
An: ntg-context mailing list 
Betreff: [NTG-context] Re: Problem with the paragraph



> On 14 Dec 2023, at 09:44, Ursula Hermann  wrote:
> 
> If I change the name of the textbackground with my example, I sent yesterday, 
> there is no color in the paragraph. 
> 

Try the following version of your example which incoporates Hraban's and 
Wolfgang's suggestions.
Also take care over changing style so use \bold{this is bold} or {\bf this is 
bold} but not \bf{this is bold}.

\definepapersize[MyBook][width=19cm,height=24cm]
\setuppapersize[MyBook][MyBook] % Prints on paper the size of MyBook 
%\setuppapersize[MyBook][A4] %Would print MyBook-size pages on A4 paper 
\setupbodyfont[Times New Roman, 12.2pt] \definemargindata  
[MyInMargin][inright] 
\definemarginframed[MyInMargin][topframe=on,bottomframe=on,rulethickness=1pt,width=1.90cm]
\defineenumeration
  [theorem]
  [
text=Theorem,
title=yes,
width=fit,
distance=0.2em,
alternative=serried,
  ]
\definetextbackground[GrayBackground][
  location=paragraph,
  background=color,
  backgroundcolor=lightgray,
  leftoffset=.5\bodyfontsize,
  rightoffset=.5\bodyfontsize,
  topoffset=.5\bodyfontsize,
  bottomoffset=.5\bodyfontsize,
  frame=off,]
  \margintext{\blackrule[color=black, height=0.10ex, width=1cm]\\}
  \blackrule[color=black, height=0.10ex, width=13.50cm] \starttext \margintext 
{1.1.1} {\bf Beispiel 3.2.17 (Vertauschung von All- und Existenzquantor).} \par 
Sei M die Menge aller Männer und F die Menge aller Frauen. Die Aussage h(m, f) 
sei ”m ist verliebt in f“. Unter diesen Voraussetzungen machen Sie sich die 
Bedeutung der beiden Aussagen klar.
\par
\startitemize[n]
 \item \m{\forall m ∈ M : ∃f ∈ F : h(m, f)}  \item ∃f ∈ F : ∀m ∈ M : h(m, f).
\stopitemize
% I changed the above to use \startitemize but have a look at \placeformula as 
well

\startGrayBackground
Mitunter ist es aus der Formulierung nur schwer zu erkennen, dass ein 
\m{∃\forall} oder ein \m{\forall\m∃} versteckt ist. Dann ist es besonders 
wichtig, die Formulierung sehr lange zu prüfen und eventuell auch formalisiert 
noch einmal aufzuschreiben.”
\blank
Der Wert von \m{y = f(x)} ist unabhängig von der Wahl\par von \m{x\doubleprime} 
ist gleichbedeutend mit \m{∃y : ∀x : f(x) = y} \par (Beutelspacher [10, S.54]).
\stopGrayBackground
\stoptext

—
Bruce Horrocks
Hampshire, UK

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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.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: Problem with the paragraph

2023-12-15 Thread Bruce Horrocks


> On 14 Dec 2023, at 09:44, Ursula Hermann  wrote:
> 
> If I change the name of the textbackground with my example, I sent yesterday, 
> there is no color in the paragraph. 
> 

Try the following version of your example which incoporates Hraban's and 
Wolfgang's suggestions.
Also take care over changing style so use \bold{this is bold} or {\bf this is 
bold} but not \bf{this is bold}.

\definepapersize[MyBook][width=19cm,height=24cm]
\setuppapersize[MyBook][MyBook] % Prints on paper the size of MyBook
%\setuppapersize[MyBook][A4] %Would print MyBook-size pages on A4 paper
\setupbodyfont[Times New Roman, 12.2pt]
\definemargindata  [MyInMargin][inright]
\definemarginframed[MyInMargin][topframe=on,bottomframe=on,rulethickness=1pt,width=1.90cm]
\defineenumeration
  [theorem]
  [
text=Theorem,
title=yes,
width=fit,
distance=0.2em,
alternative=serried,
  ]
\definetextbackground[GrayBackground][
  location=paragraph,
  background=color,
  backgroundcolor=lightgray,
  leftoffset=.5\bodyfontsize,
  rightoffset=.5\bodyfontsize,
  topoffset=.5\bodyfontsize,
  bottomoffset=.5\bodyfontsize,
  frame=off,]
  \margintext{\blackrule[color=black, height=0.10ex, width=1cm]\\}
  \blackrule[color=black, height=0.10ex, width=13.50cm]
\starttext
\margintext {1.1.1}
{\bf Beispiel 3.2.17 (Vertauschung von All- und Existenzquantor).}
\par Sei M die Menge aller Männer und F die Menge aller Frauen. Die
Aussage h(m, f) sei ”m ist verliebt in f“. Unter diesen Voraussetzungen
machen Sie sich die Bedeutung der beiden Aussagen klar.
\par
\startitemize[n]
 \item \m{\forall m ∈ M : ∃f ∈ F : h(m, f)}
 \item ∃f ∈ F : ∀m ∈ M : h(m, f).
\stopitemize
% I changed the above to use \startitemize but have a look at \placeformula as 
well

\startGrayBackground
Mitunter ist es aus der Formulierung nur schwer zu erkennen, dass
ein \m{∃\forall} oder ein \m{\forall\m∃} versteckt ist. Dann ist es besonders 
wichtig, die
Formulierung sehr lange zu prüfen und eventuell auch formalisiert
noch einmal aufzuschreiben.”
\blank
Der Wert von \m{y = f(x)} ist unabhängig von der Wahl\par
von \m{x\doubleprime} ist gleichbedeutend mit \m{∃y : ∀x : f(x) = y} \par
(Beutelspacher [10, S.54]).
\stopGrayBackground
\stoptext

—
Bruce Horrocks
Hampshire, UK

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

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


[NTG-context] About framedtext

2023-12-13 Thread Fabrice Couvreur
Hi,
Is this a bug or not ?
The key to coloring the background of the text seems to no longer work.
Thanks
Fabrice

\definecolor[MyColorC][s=0.8784]
  \definecolor[MyColorD][m=0.27,y=1]
  \definecolor[ColorA][0.8(white)]
  \definecolor[MyColorB][c=0.00, m=0.62, y=1.00, k=0.00]
  \definecolor[MyColorA][.75(MyColorB,white)]

  \defineframed
  [FrameTitle]
  [frame=off,
   foregroundstyle=\bfx\ss,
   foregroundcolor=white,
   background=color,
   backgroundcolor=MyColorD,
   location=depth]

  \defineframedtext
  [FramedText]
  [offset=0.25em,
   style=\ss,
   toffset=\zeropoint,
   background=color,
   backgroundcolor=MyColorA,
   foregroundstyle={\switchtobodyfont[9pt]},
   align={right, broad},
   frame=off,
   corner=00,
   radius=0.5em,
   width=10cm]

  \definedescription
  [Info]
  [before=,
   after=,
   text=Info,
   title=no,
   width=fit,
   distance=0.5em,
   headcommand=\FrameTitle,
   alternative=serried]

\starttext
   \startFramedText[width=5cm]
\startInfo
 \input{ward}
\stopInfo
\stopFramedText
\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
___


  1   2   3   4   5   6   7   8   9   10   >