[NTG-context] Re: Accessibility

2024-09-20 Thread Steffen Wolfrum
Hi Pablo,

sorry, I do not understand anything...

> Am 18.09.2024 um 19:47 schrieb Pablo Rodriguez via ntg-context 
> :
> 
> On 9/18/24 08:04, Steffen Wolfrum wrote:
>> It is a «new» European law: European Accessibility Act (EAA). Until
>> 28th of  June 2025  it has to be transposed by EU-members  into
>> national law. E.g. Germany will have a
>> «Barrierefreiheitsstärkungsgesetz» (BFSG) in June 2025.
> 
> Hi Steffen,
> 
> this is Directive UE/2019/882
> (https://data.europa.eu/eli/dir/2019/882/oj), which requires national
> law to be enforced (so it seems weird [at least to me] to call UE
> directives “laws“).
> 
> Incorporation into national law (sorry, this is “transposition” in
> EU-ideolect [https://www.eca.europa.eu/Other
> publications/EN_TERMINOLOGY_PUBLICATION/EN_TERMINOLOGY_PUBLICATION.pdf#page=56])
> was due more than two years ago (28/06/2022).
> 
> These legal texts shall enter into force in 28/06/2025 (according to
> article 31 of the said directive
> [https://eur-lex.europa.eu/legal-content/EN/TXT/HTML/?uri=CELEX:32019L0882#d1e2828-70-1]).
> 
> Incorporations into national law by each State may be found at
> https://eur-lex.europa.eu/legal-content/EN/NIM/?uri=CELEX:32019L0882.
> 
> BTW, according to these data, Germany seems to have changed even its
> »Grundgesetz« because of this accesibility directive.

What do you mean by all of this?
My question was about how «alt text» can be provied by ConTeXt.

Why do you repeat and list all these legal details?



> Just another comment, please avoid hijacking message threads, since they
> break how message threads are displayed.
> 
> When starting a message with a new subject, avoid replying to a message
> from the list erasing the old subject and body.
> 
> In that case, the old message header (with references and in-reply-to
> fields) remains the same.
> 
> In this case, your message contains the in-reply-to the message-id value
> from
> https://mailman.ntg.nl/archives/list/ntg-context@ntg.nl/message/UFWZUB6WLY3PITODFSK2QCKSK3EX7UIE/
> and the reference to the original thread opening
> (https://mailman.ntg.nl/archives/list/ntg-context@ntg.nl/message/A3FVUDZVLZXBVXMWZAY4HYS3XXG57U2O/).
> 
> The more detailed explanation only intends to show why replying to a
> message to create a new thread breaks the display of message threads.

When I click on one of the two links you have posted, it will open «Same font 
for metafun as document».
What is this?

I never saw or read this thread, so why do you think my email hijacked 
something?
What have I done wrong?

Yours, Steffen


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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : 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 tell a single *.tex file to produce separate PDFs?

2024-09-20 Thread Jim
On Fri, Sep 20, 2024 at 02:57 (+), Joel via ntg-context wrote:

> I have a document that's quite long. It uses a recurse function, a bit like 
> this:

> \starttext

>     \dostepwiserecurse{1}{180}{1}{%
>    \input chapter\recurselevel

> }
> \stoptext
> That produces 180  chapters of content.
> Anyway, my boss is upset she has to use a table of contents to navigate to 
> the page she wants, and so wants me to split the file into 180  separate 
> files, which somehow is going to be easier to look at. Honestly, she probably 
> still won't ever actually look at it, but that's her requirement.

> The problem is, I've been splitting the file by using Print --> PDF and 
> choosing a custom print range, and then saving it. If I ned to repeat that 
> 180 times, it not only will have errors, but probably take 5-10 hours.
> Is there something I can put, like \breakpdf or something that will tell it 
> to start a new PDF file? They can be named something like file1.pdf, 
> file2.pdf, etc.
> \starttext

>     \dostepwiserecurse{1}{136}{1}{%
>    \input chapter\recurselevel
> \breakpdf

> }
> \stoptext
> The perhaps "obvious" answer is just make 180  *.tex files, but since the 
> minimal example above is like 0.01% of the complexity of the real file, that 
> isn't so easy...

Joel,

others have suggested mutool and pdftk, which could be half the solution
for you.  (I use pdftk for things like this, but I assume mutool is just as
good.  Either are far less tedious than printing to file.)

If the information of the chapter boundaries is available in the log file,
a judicious use of grep and a few lines of shell script code might do the
trick.  Alternatively, you might be able to use a tool like pdfgrep to find
the page numbers from the PDF file, and then use a few lines of shell code.

If you are a Linux or Mac user, this should be "easy enough".  I don't do
windows, but now that there is (as I understand it) a bash shell available,
you might also be able to use grep and/or pdfgrep there as well.

If the log file isn't currently sufficiently helpful, could you add
something to your "start a new chapter" command to write a comment into the
log file giving you exactly the information you need?

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: upload

2024-09-18 Thread Henning Hraban Ramm

Am 18.09.24 um 20:12 schrieb Pablo Rodriguez via ntg-context:

On 9/17/24 22:12, Henning Hraban Ramm wrote:

[...]
The “discussed things” also involved annotations. Here’s some
documentation:
https://wiki.contextgarden.net/Annotations
Please amend if something’s wrong/missing.



Sorry, but I’m afraid that I had to comment out the link to attachments
information, since there is no such feature.

…

I have a crappy patch that allows only direct links to embedded children
(no file attachment annotations).


Thank you. You’re right, I never checked this. I guess I got it from a 
mailing list message by you and thought it would be in the core.


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: upload

2024-09-18 Thread Pablo Rodriguez via ntg-context
On 9/17/24 22:12, Henning Hraban Ramm wrote:
> [...]
> The “discussed things” also involved annotations. Here’s some
> documentation:
> https://wiki.contextgarden.net/Annotations
> Please amend if something’s wrong/missing.

Many thanks for your explanation, Hraban.

Sorry, but I’m afraid that I had to comment out the link to attachments
information, since there is no such feature.

ConTeXt has a link to external PDF documents (/GoToR actions), but no
link to attachments (/GoToE actions).

An easy way to confirm this is to compile the source and then remove the
 external PDF document. You will have the attached document, but the
link won’t work when the external document isn’t available.

Sorry, but this is why I removed the final part from
https://wiki.contextgarden.net/Annotations#Attachments.

The PDF spec includes some samples of links to attachments:
https://opensource.adobe.com/dc-acrobat-sdk-docs/pdfstandards/PDF32000_2008.pdf#page=429

I have a crappy patch that allows only direct links to embedded children
(no file attachment annotations).

I think it would be worth to allow /GoToE links to children and parents
(using ":>:" and ":<:" instead of "::") and for both embedded files and
file attachments.

I could try to provide some code for this.

As for the feature, it only works for PDF.js and Acrobat.

But I use it on a daily basis. It is the easiest way to make most people
go to an embedded document (without requiring them to understand what an
embedded file or attachments in PDF documents might be).

It would be great whether this feature would be useful to you or any
other from the list members.

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: Accessibility

2024-09-18 Thread Pablo Rodriguez via ntg-context
On 9/18/24 08:04, Steffen Wolfrum wrote:
> It is a «new» European law: European Accessibility Act (EAA). Until
> 28th of  June 2025  it has to be transposed by EU-members  into
> national law. E.g. Germany will have a
> «Barrierefreiheitsstärkungsgesetz» (BFSG) in June 2025.

Hi Steffen,

this is Directive UE/2019/882
(https://data.europa.eu/eli/dir/2019/882/oj), which requires national
law to be enforced (so it seems weird [at least to me] to call UE
directives “laws“).

Incorporation into national law (sorry, this is “transposition” in
EU-ideolect [https://www.eca.europa.eu/Other
publications/EN_TERMINOLOGY_PUBLICATION/EN_TERMINOLOGY_PUBLICATION.pdf#page=56])
was due more than two years ago (28/06/2022).

These legal texts shall enter into force in 28/06/2025 (according to
article 31 of the said directive
[https://eur-lex.europa.eu/legal-content/EN/TXT/HTML/?uri=CELEX:32019L0882#d1e2828-70-1]).

Incorporations into national law by each State may be found at
https://eur-lex.europa.eu/legal-content/EN/NIM/?uri=CELEX:32019L0882.

BTW, according to these data, Germany seems to have changed even its
»Grundgesetz« because of this accesibility directive.

Just another comment, please avoid hijacking message threads, since they
break how message threads are displayed.

When starting a message with a new subject, avoid replying to a message
from the list erasing the old subject and body.

In that case, the old message header (with references and in-reply-to
fields) remains the same.

In this case, your message contains the in-reply-to the message-id value
from
https://mailman.ntg.nl/archives/list/ntg-context@ntg.nl/message/UFWZUB6WLY3PITODFSK2QCKSK3EX7UIE/
and the reference to the original thread opening
(https://mailman.ntg.nl/archives/list/ntg-context@ntg.nl/message/A3FVUDZVLZXBVXMWZAY4HYS3XXG57U2O/).

The more detailed explanation only intends to show why replying to a
message to create a new thread breaks the display of message threads.

Just in case it might help,

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

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


[NTG-context] Re: placement of float captions in margin

2024-08-01 Thread Henning Hraban Ramm

Am 01.08.24 um 16:48 schrieb Henning Hraban Ramm:
Hi, I think this related to Gerion’s problem, but I don’t want to occupy 
the thread.


I’m trying to get captions in the (inner) margin.

With the setup below it works for left (even) pages; on right pages, the 
caption is placed beside the image, but over the text and not in the 
margin. (Yes, the big distance of image and caption is suboptimal, but 
leftfloats are worse, and the layout in question doesn’t have much space 
in the outer margin.)


If I uncomment %command to use \margincaption, and comment location 
instead, the caption is correctly inside the inner margin, but the width 
is always that of the left margin, i.e. too small on left pages.

I didn’t find a combination of options that completely works.


I solved it with an explicit width value.

Sometimes the caption just disappears.

You will see it at the meeting or in the journal…

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] placement of float captions in margin

2024-08-01 Thread Henning Hraban Ramm
Hi, I think this related to Gerion’s problem, but I don’t want to occupy 
the thread.


I’m trying to get captions in the (inner) margin.

With the setup below it works for left (even) pages; on right pages, the 
caption is placed beside the image, but over the text and not in the 
margin. (Yes, the big distance of image and caption is suboptimal, but 
leftfloats are worse, and the layout in question doesn’t have much space 
in the outer margin.)


If I uncomment %command to use \margincaption, and comment location 
instead, the caption is correctly inside the inner margin, but the width 
is always that of the left margin, i.e. too small on left pages.

I didn’t find a combination of options that completely works.

Hraban


\showframe
\usemodule[visual]
\useMPlibrary[dum]

\setuplayout[
  backspace=40mm,
  rightmargin=20mm,
  leftmargin=30mm,
  width=fit,
  height=fit,
]
\setuppagenumbering[alternative=doublesided]

\definemargindata[margincaption][inner][
  margin=margin,
  %width=\innermarginwidth,
  align=flushleft,
  stack=yes,
  voffset=-.5em,
]
\setupmarginframed[inmargin][
  align={flushleft,low},
]

\definefloat[rightfigure][figure]
\setupfloat[rightfigure][
  default=right,
  width=.33\textwidth,
]

\setupcaption[rightfigure][
  align={flushleft},
  width=\innermarginwidth,
  location=innermargin, % comment this
%command={\margincaption[inner]}, % uncomment this
  frame=on,
  framecolor=red,
  style={\ss\tfx},
]

\starttext

\dorecurse{20}{

\section{\fakewords{1}{5}}

\fakewords{10}{100}

\startplacerightfigure[title={\fakewords{2}{10}}]
\externalfigure[dummy][width=.33\textwidth,lines=5]
\stopplacerightfigure

\fakewords{10}{100}

}

\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: comment on the wiki

2024-06-12 Thread Pablo Rodriguez via ntg-context
On 6/13/24 04:17, Max Chernoff wrote:
> Hi Pablo (and others),
>
> On Wed, 2024-06-12 at 18:42 +0200, Pablo Rodriguez wrote:
>> Is there any way in which regular wiki contributions may help in
>> removing the accounts or at least all the pages generated with these
>> accounts?
>
> I also don't have deletion privileges, but I went through the recent
> pages and deleted the spammy content.

After sending my message, I saw that the Gardener group seems to have
permissions to delete pages (not sure about user pages).

I wonder whether this may constitute a formal request (for me and Max
[always when he agrees]) to be considered as candidates for Gardeners.

I know that this is not a privilege, but I would like to be able to
remove spam from the wiki.

Many thanks for your help,

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

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


[NTG-context] Re: comment on the wiki

2024-06-12 Thread Max Chernoff
Hi Pablo (and others),

On Wed, 2024-06-12 at 18:42 +0200, Pablo Rodriguez wrote:
> Is there any way in which regular wiki contributions may help in
> removing the accounts or at least all the pages generated with these
> accounts?

I also don't have deletion privileges, but I went through the recent
pages and deleted the spammy content. These edits should all show up in
"Recent Changes", so _hopefully_ this makes it easier for the Wiki
admins to delete. (If removing the spam makes it harder for the admins
to delete it, please let me know and I won't do it again).

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

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


[NTG-context] comment on the wiki

2024-06-12 Thread Pablo Rodriguez via ntg-context
Dear wiki maintainers (Taco at others),

I have found in the user creation log:

05:40, 7 June 2024 User account FelicaEnyeart34 was created
22:59, 26 May 2024 User account NonaAlber414387 was created
04:33, 26 May 2024 User account Tony83264596 was created
15:17, 24 May 2024 User account WallyGarth was created

I‘m afraid these four users may be only spamming accounts.

I don’t know whether it is worth discussing this issue, but I have two
questions:

Is there any way in which regular wiki contributions may help in
removing the accounts or at least all the pages generated with these
accounts?

Is there any way to fix the display of user contributions (such as mine,
https://wiki.contextgarden.net/Special:Contributions/Ousia)?

I have just discovered that the problem is to search for contributions
in all namespaces (set by default), which triggers the error message:

  Namespaces with negative values are not supported.

If main namespace is selected, everything works fine.

I wonder whether it would be possible to set the main namespace as
default to search for user contributions.

Many thanks for your help,

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

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


[NTG-context] Re: ConTeXt source from XML

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

Hi Christoph,

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

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

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

I use ConTeXt to typeset XML sources typing Markdown sources.

pandoc generates XML and then ConTeXt typesets these XML sources.

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

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

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

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

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

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

Compile the following:

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

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

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

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

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

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

No, these are formatting commands after the mapping.

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

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

Second, you register this XML setup.

Third, your configure the selected elements with ConTeXt commands.

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

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

  \starttext

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

  \xmlregistersetup{abc:def}

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

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

  \xmlprocessbuffer{main}{demo}{}

  \stoptext

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

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

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

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

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

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

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

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

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

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

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

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

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

I h

[NTG-context] Re: ConTeXt source from XML

2024-06-05 Thread Christoph Edenhauser

Dear Hand, dear list

Am 04.06.24 um 22:09 schrieb Hans Hagen:

On 6/4/2024 9:21 PM, Christoph Edenhauser wrote:

Dear Pablo, dear list

That's great, thank you very much for your suggestion.
That seems to me to be a very elegant solution to the next two 
problems that were actually still ahead of me.


And now to my initial question, which I didn't specify precisely enough.

I have the following workflow in mind:
1. I have an XML file (TEI-XML),
2. then, following your brilliant suggestion, I will create an 
xml-analyze-template.tex file and customise it.

3. As you suggest, now one would actually use
 context --environment xml-analyze-template.tex file.xml
 to typeset in a pdf file.
But I would like to convert all the XML nodes into the ConTeXt 
typesetting language, and then edit/correct the text and maybe some 
structure in this *.tex file.


And here comes my question: Can I use context to convert my XML-file 
'file.xml' into a ConTeXt-file 'file.tex' instead of typesetting it 
as a 'file.pdf'.


What do you want to tweak. HEre is the lowest level approach:



    test 1
    
    
    test 2
    
    test 3


But quite some can be done when processing and there are mechanisms to 
inject e.g. page breaks using processing instruction. Probablyh not 
all is documented.


There is a xml-mkiv-tricks.tex file in the distribution (no pdf is 
seems so I need to add that one.)


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
-



I realise that it is somehow difficult for me to describe what I would 
like to achieve, perhaps what I have in mind is not even possible.


Let' say i have an xml File with something like this


St. Martin
A comprehensive treatise
The medieval part of the church

I would now like to create a first file1.tex with all the necessary 
xmlsetups like e.g. something like this


\startxmlsetupsxml:chapter
\startchapter[title={\xmlflush{#1}}]\stopchapter
\stopxmlsetups
\startxmlsetupsxml:section
\startsection[title={\xmlflush{#1}}]\stopsection
\stopxmlsetups

I can now generate a pdf file with context. But:

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


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

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


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


And now a second approach to my question:
Are all these \startxmlsetups like '\startxmlsetup xml:chapter' 
internally mapped to standard context commands like \startchapter ... 
\stopchapter before they are converted to pdf?
If this is the case, can this intermediate context representation be 
exported, and how would this be done?


Thank you very much for your help,

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

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


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

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

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

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

@comment{
}

is a good construction.

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

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

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


[NTG-context] Re: Numbers obtained by commands <\datasetvariable> cannot be copied to counters

2024-05-29 Thread Taco Hoekwater



> On 29 May 2024, at 14:05, ai2472206...@yeah.net wrote:
> 
> I'm defining a command to generate options for multiple choice questions, 
> but at the moment I'm stuck at this step. 
> I want to get a number and assign a value to the counter, but why can't I get 
> it?
> 
> 
> \starttext
> \definedataset [myset]
> \setdataset[myset] [foo=1,boo=4]
> \newcount\tempa
> \datasetvariable{myset}{1}{boo} % definitely get 4
> %\tempa=\datasetvariable{myset}{1}{boo} % why i cannt pass 4 to tempa?
> %\number\tempa
> \stoptext

Works for me (minus comment signs of course):

 ConTeXt  ver: 2024.03.11 09:34 LMTX

Best wishes,
Taco


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

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


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

2024-05-28 Thread Kip Warner
On Tue, 2024-05-28 at 17:00 -0600, Alan Braslau wrote:
> The Context publications reference subsystem reads BibTeX databases
> but does not use BibTeX at all. I am not sure what your quoted
> statement means exactly.

I see. The first few lines of my BibTeX file just contains a copyright
notice that is commented out with the % character. If that is not a
valid comment character, is there no way to write a comment in the
file?

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


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

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


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

2024-05-28 Thread Kip Warner
On Wed, 2024-05-29 at 00:45 +0200, Aditya Mahajan wrote:
> Hard to say without looking at the bib file, but % is not a comment
> character in bibtex. So, if your file starts with

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

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


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

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


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

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

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

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

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

you will get an error from the bib parser.

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

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

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

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

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


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

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

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

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


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

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


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

2024-05-27 Thread Henning Hraban Ramm

Am 28.05.24 um 01:24 schrieb Kip Warner:

Hello list,

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

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

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

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


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


Hraban

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

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


[NTG-context] Re: Why is only the first frame protruding into the margin?

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

Just a comment about typescripts.

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

See the following sample:

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

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

I think they may be easier to use than typefaces.

Just in case it might help,

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

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


[NTG-context] Re: Why is only the first frame protruding into the margin?

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

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

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

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

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

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

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

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

BTW, you inadvertely introduce the space here:

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

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

As for external downloads, better avoid unless required.

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

Just in case it helps,

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

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


[NTG-context] Re: Metapost limitation ?

2024-05-12 Thread Fabrice Couvreur
With Okular, it works !

Le dim. 12 mai 2024 à 17:55, Hans Hagen  a écrit :

> On 5/12/2024 5:36 PM, Fabrice Couvreur wrote:
> > Sorry for the comment !
> > I use Evince
> so how about okular or mupdf
>
> -
>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: Metapost limitation ?

2024-05-12 Thread Hans Hagen

On 5/12/2024 5:36 PM, Fabrice Couvreur wrote:

Sorry for the comment !
I use Evince

so how about okular or mupdf

-
  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: Metapost limitation ?

2024-05-12 Thread Fabrice Couvreur
Sorry for the comment !
I use Evince

Le dim. 12 mai 2024 à 17:30, Hans Hagen  a écrit :

> On 5/12/2024 3:57 PM, Fabrice Couvreur wrote:
> > Hi,
> > When I want to draw the curve which corresponds to n=60 (blue curve), it
> > doesn't seem possible: I don't understand.
> > Thanks
> > Fabrice
> >
> >   \startMPpage[offset=1DK]
> >
> >numeric u;
> >u = 6cm;
> >
> >interim linejoin := mitered;
> >interim ahangle := 30;
> >
> >path xx, yy;
> >xx = ( (-0.3,0) -- 1.4 right) scaled u;
> >yy = ( (-0.1,0) -- 1.8 right) rotated 90 scaled u;
> >
> >def compute_curve(suffix f)(expr xmin, xmax, xinc) =
> >((xmin,f(xmin))
> >for x=xmin+xinc step xinc until xmax:
> > .. (x,f(x))
> >endfor)
> >enddef;
> >
> >
> >for i = 1 upto 4:
> >
> >vardef f(expr x) =x+exp(-i*x) enddef;
> >
> >path curve;
> >
> >curve = compute_curve(f,-0.4,1.4,0.0001) scaled u;
> >
> >draw curve;
> >
> >endfor;
> >
> >vardef f(expr x) =x+exp(-6*x) enddef;
> >
> >path curve;
> >
> >curve = compute_curve(f,-0.4,1.4,0.0001) scaled u;
> >
> >draw curve;
> >
> >vardef f(expr x) =x+exp(-15*x) enddef;
> >
> >path curve;
> >
> >curve = compute_curve(f,-0.4,1.4,0.0001) scaled u;
> >
> >draw curve;
> >
> >
> >vardef f(expr x) =x+exp(-60*x) enddef;
> >
> >path curve;
> >
> >curve = compute_curve(f,-0.4,1.4,0.0001) scaled u; ->>>>> not
> > drawn
>
> best put a comment before the ->>>>>>>
>
> >draw curve withcolor blue;
> >
> >
> >drawarrow (0,0) -- (u,0) withpen pencircle scaled 1.5bp;
> >drawarrow (0,0) -- (0,u) withpen pencircle scaled 1.5bp;
> >
> >
> >label.urt("A",(0,1u));
> >
> >draw xx;
> >draw  yy;
> >
> >draw (1u,0) -- (1u,1.8u);
> >
> >
> >label.llft("0",(0,0));
> >
> > vardef mark_y_axis(expr value, name) =
> >  save p; pair p; p = value * u * up;
> >  draw (left--right) scaled 1 shifted p;
> >  label.lft(name, p shifted 2 left);
> >enddef;
> >
> >for a = 1 upto 1:
> >  mark_y_axis(a, "");
> >endfor
> >
> > mark_y_axis(1, "$1$");
> >
> >
> >   vardef mark_x_axis(expr value, name) =
> > save p; pair p; p = value * u * right;
> > draw (up--down) scaled 1 shifted p;
> > label.bot(name, p shifted 2 down);
> >   enddef;
> >
> >   for a = 1 upto 1:
> > mark_x_axis(a, "");
> >   endfor
> >
> >   mark_x_axis(1, "$1$");
> >
> >
> >path rectangle;
> >rectangle = (-0.3u,-0.4u) -- (1.3u,-0.4u) -- (1.3u,-0.4u) --
> > (1.3u,1.4u) -- (-0.3u,1.4u)--cycle;
> >
> >clip currentpicture to rectangle;
> >   \stopMPpage
> >
> your exp usage:
>
>exp(-60*-0.4)
>
> if you see what huge numbers come out of that, like
>
> -51.006602 11100558579.857309 l
> -50.989594 11034154639.123087 l
> -50.972586 10968147929.149401 l
> -50.955579 10902536073.687559 l
> -50.938571 10837316710.703716 l
>
> you could imagine a viewer crapping out on that because no matter what
> one clips it still is 'kind of drawn', so what viewer do you use?
>
> 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: Metapost limitation ?

2024-05-12 Thread Hans Hagen

On 5/12/2024 3:57 PM, Fabrice Couvreur wrote:

Hi,
When I want to draw the curve which corresponds to n=60 (blue curve), it 
doesn't seem possible: I don't understand.

Thanks
Fabrice

  \startMPpage[offset=1DK]

           numeric u;
           u = 6cm;

           interim linejoin := mitered;
           interim ahangle := 30;

           path xx, yy;
           xx = ( (-0.3,0) -- 1.4 right) scaled u;
           yy = ( (-0.1,0) -- 1.8 right) rotated 90 scaled u;

           def compute_curve(suffix f)(expr xmin, xmax, xinc) =
               ((xmin,f(xmin))
               for x=xmin+xinc step xinc until xmax:
                    .. (x,f(x))
               endfor)
           enddef;


           for i = 1 upto 4:

           vardef f(expr x) =x+exp(-i*x) enddef;

           path curve;

           curve = compute_curve(f,-0.4,1.4,0.0001) scaled u;

           draw curve;

           endfor;

           vardef f(expr x) =x+exp(-6*x) enddef;

           path curve;

           curve = compute_curve(f,-0.4,1.4,0.0001) scaled u;

           draw curve;

           vardef f(expr x) =x+exp(-15*x) enddef;

           path curve;

           curve = compute_curve(f,-0.4,1.4,0.0001) scaled u;

           draw curve;


           vardef f(expr x) =x+exp(-60*x) enddef;

           path curve;

           curve = compute_curve(f,-0.4,1.4,0.0001) scaled u; ->>>>> not 
drawn


best put a comment before the ->>>>>>>


           draw curve withcolor blue;


           drawarrow (0,0) -- (u,0) withpen pencircle scaled 1.5bp;
           drawarrow (0,0) -- (0,u) withpen pencircle scaled 1.5bp;


           label.urt("A",(0,1u));

           draw xx;
           draw  yy;

           draw (1u,0) -- (1u,1.8u);


           label.llft("0",(0,0));

            vardef mark_y_axis(expr value, name) =
             save p; pair p; p = value * u * up;
             draw (left--right) scaled 1 shifted p;
             label.lft(name, p shifted 2 left);
           enddef;

           for a = 1 upto 1:
             mark_y_axis(a, "");
           endfor

            mark_y_axis(1, "$1$");


          vardef mark_x_axis(expr value, name) =
            save p; pair p; p = value * u * right;
            draw (up--down) scaled 1 shifted p;
            label.bot(name, p shifted 2 down);
          enddef;

          for a = 1 upto 1:
            mark_x_axis(a, "");
          endfor

          mark_x_axis(1, "$1$");


           path rectangle;
           rectangle = (-0.3u,-0.4u) -- (1.3u,-0.4u) -- (1.3u,-0.4u) -- 
(1.3u,1.4u) -- (-0.3u,1.4u)--cycle;


           clip currentpicture to rectangle;
          \stopMPpage


your exp usage:

  exp(-60*-0.4)

if you see what huge numbers come out of that, like

-51.006602 11100558579.857309 l
-50.989594 11034154639.123087 l
-50.972586 10968147929.149401 l
-50.955579 10902536073.687559 l
-50.938571 10837316710.703716 l

you could imagine a viewer crapping out on that because no matter what 
one clips it still is 'kind of drawn', so what viewer do you use?


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: what are the interaction between \showframe and \realpageno in \startuseMPgraphic ?

2024-04-24 Thread Wolfgang Schuster

garu...@azules.eu schrieb am 20.04.2024 um 23:00:

I can not figure out why this progress bar only works when \showframe is 
activated.
When you comment on \showframe, it's as if \realpageno is at zero.
(current version: 2024.04.01 08:59)

\showframe

\startuseMPgraphic{MonGraphisme_MP}
   numeric n ; n := \number\realpageno ;
   numeric m ; m := \number\lastpageno ;
   numeric h ; h := \overlayheight ;
   numeric w ; w := \overlaywidth ;
   numeric e ; e := 3mm;
   numeric r ; r := (((n-1)/(m-1))*w);
   fill fullsquare xscaled w yscaled e shifted (w/2, h/2) withcolor darkblue ;
   fill fullsquare xscaled r yscaled e shifted (r/2, h/2) withcolor darkred;
\stopuseMPgraphic

\defineoverlay [MonGraphisme_OL] [\useMPgraphic{MonGraphisme_MP}]

\setupbackgrounds [footer] [rightmargin] [background={MonGraphisme_OL}]

\starttext
\dorecurse{10}{\input tufte\page}
\stoptext

Any clue is warmly welcome


You need

    \setupbackgrounds[state=repeat]

which is set when you use \showframe.

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: documentation: parameters of \setuplist

2024-04-24 Thread Henning Hraban Ramm

Am 24.04.24 um 01:00 schrieb Bruce Horrocks:

In the source there is a comment relating to location:

%D Regular list entries are bound to a specific location in order to get the 
right
%D pagenumber etc.\ associated. When pushing something inbetween (in mkiv) it 
ends
%D up directtly in the list. This is the default because otherwise users will 
wonder
%D why spacing might get messed up (due to an unseen but present node). It is
%D possible to force a location by explicitly setting \type {location} to \type
%D {here}.
%D
%D Another way to force a certain order is to set the \type {order} variable 
when
%D placing a list. The \type {command} option only pushes commands into the 
right
%D order, and \type {all} orders all entries (which might be too much). In this 
case
%D no specific location is needed with the inbetween method. Maybe additional
%D mechanisms show up some day. See \type {inbetween-001.tex} for an example.

I don't really understand what capability the comment is referring to let alone 
be able to create an example demonstrating the difference.


Thank you, so it looks like "location=here" is only used with 
\writebetweenlist to get the current page number.


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: documentation: parameters of \setuplist

2024-04-24 Thread Bruce Horrocks


> On 23 Apr 2024, at 20:43, Henning Hraban Ramm  wrote:
> 
> Am 22.04.24 um 18:09 schrieb Henning Hraban Ramm:
>> I tried to complete https://wiki.contextgarden.net/Command/setuplist, but I 
>> don’t understand all parameters.
>> Can anyone explain these please:
>> * state (start stop): what does this en-/disable? collecting entries?
>> * label (yes no none Name): language dependent labels? as a prefix or what?
>> * location (none, here): disable placement? when makes this sense?
>> * symbol (one two three none default): where is this used?
> 
> One solved, still 4 to go… Please, anyone who used these?

In the source there is a comment relating to location:


%D Regular list entries are bound to a specific location in order to get the 
right
%D pagenumber etc.\ associated. When pushing something inbetween (in mkiv) it 
ends
%D up directtly in the list. This is the default because otherwise users will 
wonder
%D why spacing might get messed up (due to an unseen but present node). It is
%D possible to force a location by explicitly setting \type {location} to \type
%D {here}.
%D
%D Another way to force a certain order is to set the \type {order} variable 
when
%D placing a list. The \type {command} option only pushes commands into the 
right
%D order, and \type {all} orders all entries (which might be too much). In this 
case
%D no specific location is needed with the inbetween method. Maybe additional
%D mechanisms show up some day. See \type {inbetween-001.tex} for an example.

I don't really understand what capability the comment is referring to let alone 
be able to create an example demonstrating the difference.

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

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

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

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

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


[NTG-context] what are the interaction between \showframe and \realpageno in \startuseMPgraphic ?

2024-04-20 Thread garulfo
I can not figure out why this progress bar only works when \showframe is 
activated.
When you comment on \showframe, it's as if \realpageno is at zero.
(current version: 2024.04.01 08:59)

\showframe

\startuseMPgraphic{MonGraphisme_MP}
  numeric n ; n := \number\realpageno ;
  numeric m ; m := \number\lastpageno ;
  numeric h ; h := \overlayheight ;
  numeric w ; w := \overlaywidth ;
  numeric e ; e := 3mm;
  numeric r ; r := (((n-1)/(m-1))*w);
  fill fullsquare xscaled w yscaled e shifted (w/2, h/2) withcolor darkblue ;
  fill fullsquare xscaled r yscaled e shifted (r/2, h/2) withcolor darkred;
\stopuseMPgraphic

\defineoverlay [MonGraphisme_OL] [\useMPgraphic{MonGraphisme_MP}]

\setupbackgrounds [footer] [rightmargin] [background={MonGraphisme_OL}]

\starttext
\dorecurse{10}{\input tufte\page}
\stoptext

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

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


[NTG-context] Re: minwidth not working ?

2024-04-20 Thread Wolfgang Schuster

Denis Maier schrieb am 19.04.2024 um 22:55:

Wolfgang Schuster  hat am 
19.04.2024 20:32 CEST geschrieben:

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


Hi,

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


[...]

Am I missing something here?


There are no minwidth/minheight values for \externalfigure.

Wolfgang

So the wiki is wrong here? 
https://wiki.contextgarden.net/Command/setupexternalfigure


Yes the comment at the end of page is wrong and the text about the strut 
setting can also be removed, only the orientation value is missing in 
the command table.


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

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


[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] context editor support / syntax highlighting for Pulsar

2024-04-01 Thread Henning Hraban Ramm

Hi Hans (et al.),

find attached a slightly extended version of the "interface" script that 
can also generate the list of commands in cson format for Pulsar/Atom.


It just creates a basic list of commands for syntax highlighting; for a 
complete plugin, "grammars" and "settings" are missing, see 
https://codeberg.org/fiee/language-context
(Yes, this approach is oldfashioned and a plugin could do a lot more, 
but I don’t speak TypeScript.)


The generated cson file is for "snippets", like in:
https://codeberg.org/fiee/language-context/src/branch/master/snippets/language-context.cson

There, I added information from the interface files and also from the 
wiki, if existing. I don’t know how to do that in the lua script.


---
function flushers.pulsar(collected)
for interface, whatever in next, collected do
local commands = whatever.commands
local environments = whatever.environments
local result, r = { }, 0
r = r + 1 ; result[r] = "'.text.tex.context':\n"
for i=1,#commands do
r = r + 1 ; result[r] = format("\t'\\%s':\n",commands[i])
r = r + 1 ; result[r] = format("\t\tprefix: 
'%s'\n",commands[i])

-- can we have some information?
--r = r + 1 ; result[r] = format("\t\tdescription: 'level: 
primitive; interface: i-tex.xml'",'')

-- no URL if command starts with "stop"
r = r + 1 ; result[r] = format("\t\tdescriptionMoreURL: 
'https://wiki.contextgarden.net/Command/%s'\n",commands[i])

end
io.savedata(format("language-context-%s.cson",interface), 
concat(result),"\n")

end
end
---

Also, the "en" interface is empty, everything is in "common", so the 
iteration over interfaces makes no sense here.



Actually, Atom/Pulsar could work with a tree sitter parser 
(https://github.com/pmazaitis/tree-sitter-context), but I don’t know how 
to use it.



[TextMate]
For TextMate and other editors that use TM bundles, it might make sense 
to update https://github.com/pgundlach/context.tmbundle
At least the list of commands could be automatically converted from the 
interface files, but it’s more involved than what mtx-interface does.



[Visual Studio Code / VSCodium]
BTW, is the ConTeXt language server for VS Code public anywhere? 
(Ramkumar KB promised…) Or is "mtxrun --script=vscode --lsfile" the same?


Hrabanif not modules then modules = { } end modules ['mtx-cache'] = {
version   = 1.001,
comment   = "companion to mtxrun.lua",
author= "Hans Hagen, PRAGMA-ADE, Hasselt NL",
copyright = "PRAGMA ADE / ConTeXt Development Team",
license   = "see context related readme files"
}

local concat, sort, insert = table.concat, table.sort, table.insert
local gsub, format, gmatch, find, upper = string.gsub, string.format, 
string.gmatch, string.find, string.upper
local utfchar, utfgsub = utf.char, utf.gsub
local sortedkeys, sortedhash, serialize = table.sortedkeys, table.sortedhash, 
table.serialize

local helpinfo = [[


 
  mtx-interface
  ConTeXt Interface Related Goodies
  0.14
 
 
  
   
generate context mkii interface 
files
   
   
equals   
   
   
generate scite interface
generate bbedit interface files
generate jedit interface files
generate pulsar/atom interface 
files
generate textpad interface files
generate vim interface files
create text files for commands and 
environments
report commands to the console
generate check file
report the meaning of commands
show the internal representation of 
commands
   
   
replace named characters by utf
preprocess mkvi files to tex files 
[force,suffix]
   
   
use given suffix for output files
force action even when in doubt
   
   
a pattern for meaning lookups
   
  
 

]]

local application = logs.application {
name = "mtx-interface",
banner   = "ConTeXt Interface Related Goodies 0.13",
helpinfo = helpinfo,
}

local report = application.report

scripts   = scripts   or { }
scripts.interface = scripts.interface or { }

local flushers  = { }
local userinterfaces= { 'en','cs','de','it','nl','ro','fr','pe' }
local messageinterfaces = { 'en','cs','de','it','nl','ro','fr','pe','no' }

local function collect(filename,class,data)
if data then
local result, r = { }, 0
for name, list in sortedhash(data) do
r = r + 1 ; result[r] = format("keywordclass.%s.%s=\\\n",class,name)
for i=1,#list do
if i%5 

[NTG-context] Re: PDF, runner, and TikZ patches

2024-03-18 Thread Hans Hagen

On 3/18/2024 1:31 AM, Jim wrote:

On Sat, Mar 16, 2024 at 15:20 (+0100), Hans Hagen wrote:


On 3/16/2024 2:10 PM, Jim wrote:

On Fri, Mar 15, 2024 at 01:53 (+0100), Aditya Mahajan wrote:



On Thu, 14 Mar 2024, Jim wrote:



Max (et al),



were you hoping the ConTeXt distribution would ship its own
pgfutil-context.def, or were you hoping that someone could convince Henri
to put the RGB change in?



We can patch some of the definitions of pgfutil-context.def in m-tikz if
really needed, but it would be preferable to first check if tikz
maintainers are willing to merge them upstream.



Unfortunately, it seems that the maintainer feels that if we can't deal
with cmyk profiles, we shouldn't have cmyk at all.  I don't agree, but
that's where it ended.  (I was arguing for plain TeX support at the time in
the linked^2 message, but I was able to add the definition for cmyk to my
own macro file, so I was able to process examples with cmyk colours.)

What does the maintainer mean by that ... context


The maintainer's comment was about plain TeX, not context.  Sorry if that
wasn't clear.


ah, good to know


In any case, I should have sent my request to Max alone, rather than the
ntg-context list, because if Max was going to push something there, I was
hoping that a second appeal for cmyk colour support in plain would be
nice.  (I'm not quite ready to give up all of my plain TeX files.)


if it's plain, indeed, too confusing otherwise (it's no problem asking 
plain questions here but in this tikz case kind of confusing)



can add profiles if configured to do so (best not to embed them) ... and
why should there be a profile anyway ... crappy arguments ..


I agree about the colour profile, but the last time I poked that bear, my
pleas fell on deaf ears.


not even plain needs color profiles and i hope tikz doesn't add them


[And in summary, to be clear: I'm good with the colour support in ConTeXt!]

ok

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: PDF, runner, and TikZ patches

2024-03-17 Thread Jim
On Sat, Mar 16, 2024 at 15:20 (+0100), Hans Hagen wrote:

> On 3/16/2024 2:10 PM, Jim wrote:
>> On Fri, Mar 15, 2024 at 01:53 (+0100), Aditya Mahajan wrote:

>>> On Thu, 14 Mar 2024, Jim wrote:

>>> > Max (et al),

>>> > were you hoping the ConTeXt distribution would ship its own
>>> > pgfutil-context.def, or were you hoping that someone could convince Henri
>>> > to put the RGB change in?

>>> We can patch some of the definitions of pgfutil-context.def in m-tikz if
>>> really needed, but it would be preferable to first check if tikz
>>> maintainers are willing to merge them upstream.

>> Unfortunately, it seems that the maintainer feels that if we can't deal
>> with cmyk profiles, we shouldn't have cmyk at all.  I don't agree, but
>> that's where it ended.  (I was arguing for plain TeX support at the time in
>> the linked^2 message, but I was able to add the definition for cmyk to my
>> own macro file, so I was able to process examples with cmyk colours.)
> What does the maintainer mean by that ... context

The maintainer's comment was about plain TeX, not context.  Sorry if that
wasn't clear.

In any case, I should have sent my request to Max alone, rather than the
ntg-context list, because if Max was going to push something there, I was
hoping that a second appeal for cmyk colour support in plain would be
nice.  (I'm not quite ready to give up all of my plain TeX files.)

> can add profiles if configured to do so (best not to embed them) ... and
> why should there be a profile anyway ... crappy arguments ..

I agree about the colour profile, but the last time I poked that bear, my
pleas fell on deaf ears.

[And in summary, to be clear: I'm good with the colour support in ConTeXt!]

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: How to track down source of [entry not flushed] displaying in indexes?

2024-03-13 Thread Joel via ntg-context
 I'm not understanding in a much much larger document how I sold this, as I've 
tired placing \dontleavehmode in different places, but no success. 

On Wednesday, March 13, 2024 at 04:46:54 PM MDT, Wolfgang Schuster 
 wrote:  
 
 Joel via ntg-context schrieb am 13.03.2024 um 23:27:
> 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.

The message appears even without the external file.

> My code is so simple, I can't understand what I've typed wrong.

Indices need an anchor to be flushed. When you put \index entries 
between environments the next anchor appears at the start of a new 
paragraph (I used \dontleavehmode for this in the following example).

\starttext

\index{birds}
\index{insects}

\index{turtles}

\dontleavehmode % comment this line for [entry not flushed]

\placeindex

\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: How to track down source of [entry not flushed] displaying in indexes?

2024-03-13 Thread Joel via ntg-context
 What is an anchor? Does that mean the index needs to me next to some items, 
like placed next to some text?

On Wednesday, March 13, 2024 at 04:46:54 PM MDT, Wolfgang Schuster 
 wrote:  
 
 Joel via ntg-context schrieb am 13.03.2024 um 23:27:
> 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.

The message appears even without the external file.

> My code is so simple, I can't understand what I've typed wrong.

Indices need an anchor to be flushed. When you put \index entries 
between environments the next anchor appears at the start of a new 
paragraph (I used \dontleavehmode for this in the following example).

\starttext

\index{birds}
\index{insects}

\index{turtles}

\dontleavehmode % comment this line for [entry not flushed]

\placeindex

\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: How to track down source of [entry not flushed] displaying in indexes?

2024-03-13 Thread Wolfgang Schuster

Joel via ntg-context schrieb am 13.03.2024 um 23:27:
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.


The message appears even without the external file.


My code is so simple, I can't understand what I've typed wrong.


Indices need an anchor to be flushed. When you put \index entries 
between environments the next anchor appears at the start of a new 
paragraph (I used \dontleavehmode for this in the following example).


\starttext

\index{birds}
\index{insects}

\index{turtles}

\dontleavehmode % comment this line for [entry not flushed]

\placeindex

\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] 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: Strange error at lxml-mms.lmt:749

2024-02-25 Thread Andres Conrado Montoya
e'\n
> ...mtx/tex/texmf-context/tex/context/base/mkxl/lxml-mms.lmt:669: in upvalue
> 'expand'\n ...mtx/tex/texmf-context/tex/context/base/mkxl/lxml-mms.lmt:621:
> in upvalue 'expandone'\n
> ...mtx/tex/texmf-context/tex/context/base/mkxl/lxml-mms.lmt:669: in upvalue
> 'expand'\n ...mtx/tex/texmf-context/tex/context/base/mkxl/lxml-mms.lmt:727:
> in field 'verbose'\n
> ...mtx/tex/texmf-context/tex/context/base/mkxl/math-tag.lmt:939: in field
> 'gettextblob'\n
> ...mtx/tex/texmf-context/tex/context/base/mkxl/lpdf-tag.lmt:391: in upvalue
> 'makeelement'\n
> ...mtx/tex/texmf-context/tex/context/base/mkxl/lpdf-tag.lmt:715: in upvalue
> 'structures_tags_handler'\n [string \"local tonut  = nodes.tonut...\"]:21:
> in function <[string \"local tonut  = nodes.tonut...\"]:12>\n (...tail
> calls...)\n ...mtx/tex/texmf-context/tex/context/base/mkxl/node-shp.lmt:38:
> in function
> <...mtx/tex/texmf-context/tex/context/base/mkxl/node-shp.lmt:37>\n (...tail
> calls...)",
>  ["lasttexerror"]="",
>  ["linenumber"]=85,
>  ["offset"]=10,
>  ["skiplinenumber"]=85,
> }
>
> Also, attached you will find the log files.
>
>
> El dom, 25 feb 2024 a las 15:58, Andres Conrado Montoya (<
> andresconr...@gmail.com>) escribió:
>
>> Another remark: It seems this behavior is consistent: if I comment out
>> the last equation before the one I told you before, again the next formula
>> works fine,
>>
>> El dom, 25 feb 2024 a las 15:38, Andres Conrado Montoya (<
>> andresconr...@gmail.com>) escribió:
>>
>>> A remark: A few lines above the error triggering point, I found a single
>>> digit presented as math: \math{5}. Removing this and leaving the 5 in text
>>> mode removes the error below it.
>>> Could it be a bug in the distribution?
>>>
>>> El dom, 25 feb 2024 a las 15:24, Andres Conrado Montoya (<
>>> andresconr...@gmail.com>) escribió:
>>>
>>>> I keep bumping into this error, I have no idea what may be causing it,
>>>> in a statistics book with lots of math:
>>>>
>>>> registered function call [250]:
>>>> ...mtx/tex/texmf-context/tex/context/base/mkxl/lxml-mms.lmt:749: attempt to
>>>> index a nil value (local 'a2')
>>>>
>>>> I have checked everything. I have tried commenting out many things and
>>>> the weird part is that it fails in a simple math expression: \math{E_{i}j}.
>>>> Even a simple $y$ or \math{a+b} will trigger the error. However, this same
>>>> file Im working on has many formulas before that, those work fine. I
>>>> changed all the $...$ to \math{...} just in case, but with no success.
>>>>
>>>> Already tried remaking, regenerating, updating the distribution.
>>>>
>>>> Do you have any ideas to work this out? I don't know how to provide a
>>>> MWE for this because it's a very big project (statistics book).
>>>>
>>>> I have tried 2 versions, the system-wide one, just upgraded:
>>>> mtx-context | ConTeXt Process Management 1.06
>>>> mtx-context | current version: 2024.02.22 18:31
>>>>
>>>> And a less recent version, attached to the project:
>>>> mtx-context | ConTeXt Process Management 1.05
>>>> mtx-context | current version: 2024.02.14 13:38
>>>>
>>>>
>>>> Any help will be much appreciated.
>>>>
>>>> --
>>>> Andrés Conrado Montoya
>>>> Andi Kú
>>>> andresconr...@gmail.com
>>>> http://sesentaycuatro.com
>>>> http://messier87.com
>>>> http://chiquitico.org
>>>> 
>>>> Los fines no justifican los medios, porque la medida verdadera de
>>>> nuestro carácter está dada por los medios que estamos dispuestos a
>>>> utilizar, no por los fines que proclamamos.
>>>> 
>>>>
>>>> “You develop an instant global consciousness, a people orientation, an
>>>> intense dissatisfaction with the state of the world, and a compulsion to do
>>>> something about it. From out there on the moon, international politics look
>>>> so petty. You want to grab a politician by the scruff of the neck and drag
>>>> him a quarter of a million miles out and say, ‘Look at that, you son of a
>>>> bitch.’” — Apollo 

[NTG-context] Re: Strange error at lxml-mms.lmt:749

2024-02-25 Thread Aditya Mahajan
On Sun, 25 Feb 2024, Andres Conrado Montoya wrote:

> Another remark: It seems this behavior is consistent: if I comment out the
> last equation before the one I told you before, again the next formula
> works fine,

Would it be possible to create a reproducible example?

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

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


[NTG-context] Re: Strange error at lxml-mms.lmt:749

2024-02-25 Thread Andres Conrado Montoya
Another remark: It seems this behavior is consistent: if I comment out the
last equation before the one I told you before, again the next formula
works fine,

El dom, 25 feb 2024 a las 15:38, Andres Conrado Montoya (<
andresconr...@gmail.com>) escribió:

> A remark: A few lines above the error triggering point, I found a single
> digit presented as math: \math{5}. Removing this and leaving the 5 in text
> mode removes the error below it.
> Could it be a bug in the distribution?
>
> El dom, 25 feb 2024 a las 15:24, Andres Conrado Montoya (<
> andresconr...@gmail.com>) escribió:
>
>> I keep bumping into this error, I have no idea what may be causing it, in
>> a statistics book with lots of math:
>>
>> registered function call [250]:
>> ...mtx/tex/texmf-context/tex/context/base/mkxl/lxml-mms.lmt:749: attempt to
>> index a nil value (local 'a2')
>>
>> I have checked everything. I have tried commenting out many things and
>> the weird part is that it fails in a simple math expression: \math{E_{i}j}.
>> Even a simple $y$ or \math{a+b} will trigger the error. However, this same
>> file Im working on has many formulas before that, those work fine. I
>> changed all the $...$ to \math{...} just in case, but with no success.
>>
>> Already tried remaking, regenerating, updating the distribution.
>>
>> Do you have any ideas to work this out? I don't know how to provide a MWE
>> for this because it's a very big project (statistics book).
>>
>> I have tried 2 versions, the system-wide one, just upgraded:
>> mtx-context | ConTeXt Process Management 1.06
>> mtx-context | current version: 2024.02.22 18:31
>>
>> And a less recent version, attached to the project:
>> mtx-context | ConTeXt Process Management 1.05
>> mtx-context | current version: 2024.02.14 13:38
>>
>>
>> Any help will be much appreciated.
>>
>> --
>> Andrés Conrado Montoya
>> Andi Kú
>> andresconr...@gmail.com
>> http://sesentaycuatro.com
>> http://messier87.com
>> http://chiquitico.org
>> 
>> Los fines no justifican los medios, porque la medida verdadera de nuestro
>> carácter está dada por los medios que estamos dispuestos a utilizar, no por
>> los fines que proclamamos.
>> 
>>
>> “You develop an instant global consciousness, a people orientation, an
>> intense dissatisfaction with the state of the world, and a compulsion to do
>> something about it. From out there on the moon, international politics look
>> so petty. You want to grab a politician by the scruff of the neck and drag
>> him a quarter of a million miles out and say, ‘Look at that, you son of a
>> bitch.’” — Apollo 14 astronaut Edgar Mitchell
>>
>
>
> --
> Andrés Conrado Montoya
> Andi Kú
> andresconr...@gmail.com
> http://sesentaycuatro.com
> http://messier87.com
> http://chiquitico.org
> 
> Los fines no justifican los medios, porque la medida verdadera de nuestro
> carácter está dada por los medios que estamos dispuestos a utilizar, no por
> los fines que proclamamos.
> 
>
> “You develop an instant global consciousness, a people orientation, an
> intense dissatisfaction with the state of the world, and a compulsion to do
> something about it. From out there on the moon, international politics look
> so petty. You want to grab a politician by the scruff of the neck and drag
> him a quarter of a million miles out and say, ‘Look at that, you son of a
> bitch.’” — Apollo 14 astronaut Edgar Mitchell
>


-- 
Andrés Conrado Montoya
Andi Kú
andresconr...@gmail.com
http://sesentaycuatro.com
http://messier87.com
http://chiquitico.org

Los fines no justifican los medios, porque la medida verdadera de nuestro
carácter está dada por los medios que estamos dispuestos a utilizar, no por
los fines que proclamamos.


“You develop an instant global consciousness, a people orientation, an
intense dissatisfaction with the state of the world, and a compulsion to do
something about it. From out there on the moon, international politics look
so petty. You want to grab a politician by the scruff of the neck and drag
him a quarter of a million miles out and say, ‘Look at that, you son of a
bitch.’” — Apollo 14 astronaut Edgar Mitchell
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[NTG-context] Re: typing with scite module and escape

2024-02-24 Thread Henning Hraban Ramm

Am 24.02.24 um 13:53 schrieb Henning Hraban Ramm:

Hi,

I’m trying to use escaping in a typing environment. It works until I 
load the scite module. I need that only for btx highlighting, but I 
can’t limit it to that.

What should I do?


\usemodule[scite]
\define[1]\SAY{\hfill{\rm #1}}

\setuptyping[TEX][
   option=tex,% scite sets cld
   escape=yes,
]

\starttext

\startTEX

\starttext/BTEX\SAY{Text starts here}/ETEX
\input tufte
\stoptext/BTEX\SAY{Text ends here}/ETEX

\stopTEX

\stoptext


I tried to load the module only in the section where I need it, that 
lead to strange errors in later sections, apparently there’s no 
encapsulation.


If I comment line 289 in m-scite.mkiv that reads
--visualizers.register("tex",   visualizer)
it works for me.

Would it be possible to unregister a visualizer, or is the call maybe 
unnecessary anyway?


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] How to print the book title and section title where \reference is located?

2024-02-06 Thread Joel via ntg-context
I have an extensive multi-book project. Each book has a nickname, like TB for 
"Textbook", "WB 1" for the "Workbook, Vol. 1":

TB -- 01_textbook.texWB 1 -- 03_workbook.texWB 2 -- 04_workbook.texWB 3 -- 
05_workbook.tex
WB 4 -- 06_workbook.tex
TG -- 08_teachersguide.tex
I have to prove to a government agency that the content meets several 
requirements, so I'm giving them a simple file that says something like 
"Requirement A is met in TB, "Cats", p. 11" basically letting the reader know 
its in the textbook, section called "Cats", on p. 11. To mark the pages, I'm 
simply dropping in macros called "\requirementA" "\requirementB" on whichever 
page of whichever book demonstrates it meets the requirement, then the file 
will aquatically list the book, section, and page number by searching for that 
macro.

\define\requirementA{
    \reference[markerA]{This is a comment.}
}

\define\requirementB{
    \reference[markerB]{This is a comment.}
}

\define\requirementC{
    \reference[markerC]{This is a comment.}
}

\starttext

    \section{Cats}
        \requirementA
        \input knuth
        \requirementC
        \requirementB
    
    \pagebreak
    
    \section{Fish}
        \input knuth
        \input knuth
        \input knuth
        \input knuth
        \requirementC
        \requirementB
    
    \pagebreak
    
    \section{Frogs}
        \input knuth
        \requirementB
    
    \pagebreak
    
    \section{Markers}
    
        \startitemize
            \item Requirement A is met \at{page}[markerA].
            \item Requirement B is met \at{page}[markerB].
            \item Requirement C is met \at{page}[markerC].
        \stopitemize    
    
\stoptext



I have this sample code, but it only works for a single document, and only 
displays page number. I tried looking at the \about and other related command, 
but that requires giving a reference name and referring to the titles, not my 
dropped macro. How can I modify this to display a message like below, plus also 
scans the other files. *It only needs to reference the first found occurrence.*
Here is a sample message what the output should give:
"Requirement A is met in WB 3, "Bears", p. 33."
--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: \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: \starttable questions

2024-01-25 Thread Jim
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.  :-)


> tabulate uses mostly the same syntax as table(s), but as far as I looked
> into the sources, it’s a different (and probably better) implementation.

> I’m quite sure \starttable will stay, it’s just discouraged since
> \startTABLE (natural tables) is better if you need more than \starttabulate.

I looked at that and played with it (briefly), but when I saw there was
something to make tables (i.e., \starttable) which used a syntax close to
what I already know, I thought I'd go with what I know.  At this point my
ConTeXt learning curve is pretty steep already, but perhaps at some point
in the future I'll be able to heed your advice.


>> In a recent answer on this list, Mikael helped someone by pointing out the
>> \HF[...] command.  The \HF command is not listed in the \starttable wiki 
>> page.

>> Q2: Is \HF[] documented anywhere?  If so, can someone point me to that/those
>> document(s)?

> I also don’t know anything about \HF and didn’t find it in the source.
> Are you sure it wasn’t just used in a math context?

It was indeed used in a math context.  Unfortunately, that knowledge
doesn't bring me any closer to finding the documentation.  (Which gets me
back to my learning curve. :-)

>> Perhaps an answer to Q2 will answer this one too, but in case it doesn't...

>> When using Wichura's \BeginTable ... \EndTable macros, I occasionally
>> use the \\+nm feature to add n points above the current line and/or m
>> points below the current line.

>> Q3: Does ConTexT's \starttable ... \endtable have this feature?
>> If so, how does one access this feature?

> Probably not, you don’t use \\ in a ConTeXt table.

That I already knew.

> There’s \TB[] that understands the same parameters as \blank

Thanks for that information.  Unfortunately, it doesn't work well for
tables with vrules, in either \starttabulate or \starttable.  However,
thanks for mentioning it, not all tables have vrules.

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 Henning Hraban Ramm

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.

tabulate uses mostly the same syntax as table(s), but as far as I looked 
into the sources, it’s a different (and probably better) implementation.


I’m quite sure \starttable will stay, it’s just discouraged since 
\startTABLE (natural tables) is better if you need more than \starttabulate.




In a recent answer on this list, Mikael helped someone by pointing out the
\HF[...] command.  The \HF command is not listed in the \starttable wiki page.

Q2: Is \HF[] documented anywhere?  If so, can someone point me to that/those
 document(s)?


I also don’t know anything about \HF and didn’t find it in the source.
Are you sure it wasn’t just used in a math context?


Perhaps an answer to Q2 will answer this one too, but in case it doesn't...

When using Wichura's \BeginTable ... \EndTable macros, I occasionally
use the \\+nm feature to add n points above the current line and/or m
points below the current line.

Q3: Does ConTexT's \starttable ... \endtable have this feature?
 If so, how does one access this feature?


Probably not, you don’t use \\ in a ConTeXt table.
There’s \TB[] that understands the same parameters as \blank

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] \starttable questions

2024-01-25 Thread 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?



In a recent answer on this list, Mikael helped someone by pointing out the
\HF[...] command.  The \HF command is not listed in the \starttable wiki page.

Q2: Is \HF[] documented anywhere?  If so, can someone point me to that/those
document(s)?



Perhaps an answer to Q2 will answer this one too, but in case it doesn't...

When using Wichura's \BeginTable ... \EndTable macros, I occasionally
use the \\+nm feature to add n points above the current line and/or m
points below the current line.

Q3: Does ConTexT's \starttable ... \endtable have this feature?
If so, how does one access this feature?


Thanks.

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: font error in float placement?

2024-01-13 Thread Henning Hraban Ramm

Am 13.01.24 um 19:43 schrieb Henning Hraban Ramm:

(LMTX, latest beta with self-compiled binary on OSX-intel.)

With my book, I run into an Lua error while placing a sidefloat.
If I comment \externalfigure or replace the image with a different one, 
the error disappears.


I can’t reproduce it in a minimal example, so I guess it depends on the 
current surroundings.


Since it points to some font handling and the figure is a PDF containing 
fonts, I guess it might depend on the new handling of fonts in PDFs, but 
it doesn’t change regardless of 
\setupexternalfigures[compact=preset:merge] or other settings.


Here’s the image:
https://yemaya.fiee.net/s/8TqwfcP7mLMmy9p
(In a simple document it works.)


I found a workaround: I opened the file with Inkscape and converted 
everything in curves. The PDF is even smaller now, and it proves that 
the problem was with the fonts. Saving it in Acrobat Pro didn’t help.


BTW the "compact" settings didn’t change anything for my big songbook 
(hundreds of note line PDFs with included fonts); I’m not sure about the 
code examples in my ConTeXt book.


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] font error in float placement?

2024-01-13 Thread Henning Hraban Ramm

(LMTX, latest beta with self-compiled binary on OSX-intel.)

With my book, I run into an Lua error while placing a sidefloat.
If I comment \externalfigure or replace the image with a different one, 
the error disappears.


I can’t reproduce it in a minimal example, so I guess it depends on the 
current surroundings.


Since it points to some font handling and the figure is a PDF containing 
fonts, I guess it might depend on the new handling of fonts in PDFs, but 
it doesn’t change regardless of 
\setupexternalfigures[compact=preset:merge] or other settings.


Here’s the image:
https://yemaya.fiee.net/s/8TqwfcP7mLMmy9p
(In a simple document it works.)

Hraban

"""
lua error   > lua error on line 516 in file de/c_feinheiten.tex:

registered function call [1565]: 
...xmf-context/tex/context/base/mkxl/lpdf-fix-imp-fonts.lmt:596: attempt 
to index a nil value (field 'embed')

stack traceback:
	...xmf-context/tex/context/base/mkxl/lpdf-fix-imp-fonts.lmt:596: in 
local 'handler'
	...xmf-context/tex/context/base/mkxl/lpdf-fix-imp-fonts.lmt:709: in 
upvalue 'plugin'
	...xmf-context/tex/context/base/mkxl/lpdf-fix-imp-fonts.lmt:938: in 
upvalue 'lpdf_epdf_fontplugin'
	[string "local lpdf_epdf_fontplugin = lpdf.epdf.fontpl..."]:3: in local 
'runner'
	...-10/tex/texmf-context/tex/context/base/mkxl/lpdf-fix.lmt:97: in 
upvalue 'lpdf_epdf_contentplugin'
	[string "local lpdf_epdf_contentplugin = lpdf.epdf.con..."]:3: in local 
'runner'
	...-10/tex/texmf-context/tex/context/base/mkxl/lpdf-fix.lmt:119: in 
field 'pageplugin'
	...-10/tex/texmf-context/tex/context/base/mkxl/lpdf-pde.lmt:1371: in 
upvalue 'copypage'
	...-10/tex/texmf-context/tex/context/base/mkiv/grph-chk.lua:112: in 
function <...-10/tex/texmf-context/tex/context/base/mkiv/grph-chk.lua:97>
	...-10/tex/texmf-context/tex/context/base/mkxl/grph-inc.lmt:1680: in 
function <...-10/tex/texmf-context/tex/context/base/mkxl/grph-inc.lmt:1665>

(...tail calls...)
506 \startsubsection[title=Schriftwahl]
…
513
514 \startplacefigure[title={Beispiele für gebrochene Schriften, 
halbherzig von Hand ausgeglichen},location=right,reference=abb:fraktur]

515 \externalfigure[gebrochene_schriften][width=.5\textwidth]
516 >>  \stopplacefigure
"""
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : 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 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] Re: vim syntax highlighting bug?

2024-01-09 Thread Gerion Entrup
Thanks for your effort!
I have the same problem in Neovim and linked the pull request there:
https://github.com/neovim/neovim/issues/26966

Best,
Gerion

Am Montag, 8. Januar 2024, 12:16:14 CET schrieb Vincent Hennebert:
> I was in touch with the maintainer of the context.vim syntax file about 
> this. It turns out to be an issue with the lua.vim file that is included 
> in the context one. Lua.vim highlights trailing parentheses as errors, 
> but that’s done in a way that doesn’t work well when the file is 
> included by other syntax files. It somehow steals the syntax context and 
> makes Vim stay in Lua mode when it should go back to ConTeXt mode (I’m 
> not too savvy of the details).
> 
> The maintainer came up with a workaround [1] to force returning to 
> ConTeXt mode, although the parenthesis remains highlighted as an error.
> 
> That highlight bothers me, so my own workaround is to copy the lua.vim 
> file in my own .vim/syntax folder and comment out the ‘syn match 
> luaParenError ")"’ line (l.61 in my Vim version).
> 
> Maybe playing with the ‘contained’ keyword (in lua.vim) could lead to a 
> proper solution, but I’m happy enough with my workaround that I haven’t 
> felt the need to investigate this issue any further.
> 
> Hope that helps,
> Vincent
> 
> [1] https://github.com/vim/vim/pull/13778
> 
> On 06/01/2024 12:28, Damien Thiriet via ntg-context wrote:
> > Hello,
> > 
> > 
> > Happy New Year!
> > 
> > I got into a bug in my Vim syntax highlighting version.
> > Highlight stays in lua mode after ctxlua macro is closed.
> > Here is a MWE, where «this should not be highlitghted as
> > a comment indeed is.
> > 
> > \starttext
> > 
> > Hello!
> > \ctxlua{context("does the parser work?")}
> > 
> > -- this should not be highlighted as a comment
> > 
> > \stoptext
> > 
> > Do other Vim users come into this?
> > Is my syntax file outdated?
> > 
> > I am using this Vim version on OpenBSD 7.3 -stable:
> > VIM - Vi IMproved 9.0 (2022 Jun 28, compiled Sep  6 2023 08:55:14)
> > Included patches: 1-1876
> > 
> > Best regards,
> > 
> > Damien Thiriet



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: 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: vim syntax highlighting bug?

2024-01-08 Thread Vincent Hennebert
I was in touch with the maintainer of the context.vim syntax file about 
this. It turns out to be an issue with the lua.vim file that is included 
in the context one. Lua.vim highlights trailing parentheses as errors, 
but that’s done in a way that doesn’t work well when the file is 
included by other syntax files. It somehow steals the syntax context and 
makes Vim stay in Lua mode when it should go back to ConTeXt mode (I’m 
not too savvy of the details).


The maintainer came up with a workaround [1] to force returning to 
ConTeXt mode, although the parenthesis remains highlighted as an error.


That highlight bothers me, so my own workaround is to copy the lua.vim 
file in my own .vim/syntax folder and comment out the ‘syn match 
luaParenError ")"’ line (l.61 in my Vim version).


Maybe playing with the ‘contained’ keyword (in lua.vim) could lead to a 
proper solution, but I’m happy enough with my workaround that I haven’t 
felt the need to investigate this issue any further.


Hope that helps,
Vincent

[1] https://github.com/vim/vim/pull/13778

On 06/01/2024 12:28, Damien Thiriet via ntg-context wrote:

Hello,


Happy New Year!

I got into a bug in my Vim syntax highlighting version.
Highlight stays in lua mode after ctxlua macro is closed.
Here is a MWE, where «this should not be highlitghted as
a comment indeed is.

\starttext

Hello!
\ctxlua{context("does the parser work?")}

-- this should not be highlighted as a comment

\stoptext

Do other Vim users come into this?
Is my syntax file outdated?

I am using this Vim version on OpenBSD 7.3 -stable:
VIM - Vi IMproved 9.0 (2022 Jun 28, compiled Sep  6 2023 08:55:14)
Included patches: 1-1876

Best regards,

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


maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.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: multipage metapost output from ConTeXt

2024-01-06 Thread Emanuel Han via ntg-context
t; >>
> > >> path A; A = z0..z1..z2..z3..z4 ;
> > >> pair AStartPoint; AStartPoint = point 0 of A;
> > >> pair AEndPoint; AEndPoint = point 4 of A;
> > >> path B; B = z5..z6;
> > >> pair BStartPoint; BStartPoint = point 0 of B;
> > >> pair BEndPoint; BEndPoint = point 1 of B;
> > >> path C; C = AStartPoint..AEndPoint;
> > >>
> > >> p1:=image(
> > >> draw A withcolor red;
> > >> );
> > >>
> > >> p2:=image(draw A; label(lmt_outline [
> > >> text = "\JapaneseFont 日本語"
> > >> ], AEndPoint););
> > >>
> > >> p3:=image(
> > >> label(textext("\notonaskharabic \textdir TRT دانگ") scaled 1.2, 
> > >> BStartPoint);
> > >> );
> > >>
> > >> p4:=image(draw A; label(lmt_outline [
> > >> text = "\KoreanFont 한국어"
> > >> ], AStartPoint););
> > >>
> > >> p5:=image(
> > >> label(textext("bāng"), BEndPoint);
> > >> draw C withcolor green;
> > >> );
> > >>
> > >> p6:=image(
> > >> draw B withcolor blue;
> > >> );
> > >> \stopMPinclusions
> > >>
> > >> \starttext
> > >>
> > >> \dorecurse{6}{ % Frame
> > >> \setupMPpage[background=color, backgroundcolor=SpringGreen]
> > >> \startMPpage[pagestate=start]
> > >> currentime := #1 ;
> > >> % Just for learning :
> > >> draw TheFrame withpen pencircle scaled .1in withcolor magenta ;
> > >> draw textext("T="&decimal(currentime)) scaled 2 shifted(0,2in) withcolor 
> > >> magenta ;
> > >> for k=1 upto currentime: draw p[k]; endfor
> > >> setbounds currentpicture to TheFrame ;
> > >>
> > >> desiredformat := 1080;% In pixels (will be converted by default at 72dpi)
> > >> currentpicture := currentpicture xysized (desiredformat ,desiredformat );
> > >>
> > >> \stopMPpage
> > >> }
> > >>
> > >> \stoptext
> > >> On Nov. 27 2023, at 11:25 pm, Aditya Mahajan  wrote:
> > >>
> > >> On Mon, 27 Nov 2023, Fabrice L wrote:
> > >>
> > >> > Hi,
> > >> >
> > >> > It is fun fact very easy to do. You just use \startMPpage (…) 
> > >> > \stopMPpage multiple times. Here is an example which build an 
> > >> > animation of a particle moving according to a Brownian motion.
> > >>
> > >> A very similar option is to pass a variable to a metapost drawing. This 
> > >> is what I use:
> > >>
> > >> https://adityam.github.io/context-blog/post/metapost-animation/
> > >>
> > >> It only works when viewed in acrobat, you can just comment out the 
> > >> animation part and wrap it in \startTEXpage .. \stopTEXpage to get 
> > >> multi-page animation.
> > >>
> > >> Aditya___
> > >> If your question is of interest to others as well, please add an entry 
> > >> to the Wiki!
> > >>
> > >> maillist : ntg-context@ntg.nl / 
> > >> https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
> > >> webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
> > >> archive : https://github.com/contextgarden/context
> > >> wiki : https://wiki.contextgarden.net
> > >> ___
> > >>
> > >> ___
> > >> If your question is of interest to others as well, please add an entry 
> > >> to the Wiki!
> > >>
> > >> maillist : ntg-context@ntg.nl / 
> > >> https://mailman.ntg.nl/mailman3/lists/ntg-context.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
> > > ___
> > ___
> > If your question is of interest to others as well, please add an entry to 
> > the Wiki!
> >
> > maillist : ntg-context@ntg.nl / 
> > https://mailman.ntg.nl/mailman3/lists/ntg-context.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
> ___
>

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

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


[NTG-context] Re: vim syntax highlighting bug?

2024-01-06 Thread Christian Prim via ntg-context
Hello

on my installation, it's working:
[image: image.png]
But I'm on an old version on debian:
VIM - Vi IMproved 8.2 (2019 Dec 12 kompiliert am Oct 01 2021 01:51:08)
Inklusive der Patches: 1-2434
Extra Patches: 8.2.3402, 8.2.3403, 8.2.3409, 8.2.3428

Perhaps something has changed in version 9.0...

Hope it helps

Christian

Am Sa., 6. Jan. 2024 um 13:04 Uhr schrieb Damien Thiriet via ntg-context <
ntg-context@ntg.nl>:

> Hello,
>
>
> Happy New Year!
>
> I got into a bug in my Vim syntax highlighting version.
> Highlight stays in lua mode after ctxlua macro is closed.
> Here is a MWE, where «this should not be highlitghted as
> a comment indeed is.
>
> \starttext
>
> Hello!
> \ctxlua{context("does the parser work?")}
>
> -- this should not be highlighted as a comment
>
> \stoptext
>
> Do other Vim users come into this?
> Is my syntax file outdated?
>
> I am using this Vim version on OpenBSD 7.3 -stable:
> VIM - Vi IMproved 9.0 (2022 Jun 28, compiled Sep  6 2023 08:55:14)
> Included patches: 1-1876
>
> Best regards,
>
> Damien Thiriet
>
> ___
> If your question is of interest to others as well, please add an entry to
> the Wiki!
>
> maillist : ntg-context@ntg.nl /
> https://mailman.ntg.nl/mailman3/lists/ntg-context.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] vim syntax highlighting bug?

2024-01-06 Thread Damien Thiriet via ntg-context

Hello,


Happy New Year!

I got into a bug in my Vim syntax highlighting version.
Highlight stays in lua mode after ctxlua macro is closed.
Here is a MWE, where «this should not be highlitghted as
a comment indeed is.

\starttext

Hello!
\ctxlua{context("does the parser work?")}

-- this should not be highlighted as a comment

\stoptext

Do other Vim users come into this?
Is my syntax file outdated?

I am using this Vim version on OpenBSD 7.3 -stable:
VIM - Vi IMproved 9.0 (2022 Jun 28, compiled Sep  6 2023 08:55:14)
Included patches: 1-1876

Best regards,

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

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


[NTG-context] Question about drawing flowchart using chart module

2023-12-27 Thread Jeong Dal via ntg-context
Dear all,

I tried to draw a flow chart using the module[chart].
Following the examples, I draw one.

The problem is that the size of the chart is not changed even though I changed 
the numbers dx,dy, width, height, and maxwidth in the \setupFLOWcharts

Please tell me how to resize the chart.

Thank you.

Dalyoung

%%
\usemodule[chart]

\starttext

\startFLOWchart[bigger]
  \setupFLOWcharts
  [option=test,
   nx=3,
   ny=6,
   dx=\bodyfontsize,
   dy=\bodyfontsize,
   width=6cm,%.5\bodyfontsize,
   height=10cm,%.3\bodyfontsize,
   maxwidth=.5\textwidth
   ]

  \startFLOWcell 
\name{a} \location{2,1} \shape{loop} \text{start}  
\connection[bt]{b}
  \stopFLOWcell
  \startFLOWcell 
\name{b} \location{2,2} \shape{79} \text{input $a,b$} 
\connection[bt]{c} 
  \stopFLOWcell
  \startFLOWcell 
\name{c} \location{2,3} \shape{decision} \text{$a-b > 0$}  
\connection[lt]{d}  \comment[l]{Yes}
\connection[rt]{g}  \comment[r]{No}
  \stopFLOWcell
  \startFLOWcell 
\name{d} \location{1,5} \shape{76} \text{$a$ is bigger \\ than $b$} 
 
\connection[bt]{f}
  \stopFLOWcell
  \startFLOWcell 
\name{e} \location{2,5} \shape{76} \text{$b$ is bigger \\ than $a$} 
 
\connection[bt]{f}
  \stopFLOWcell
  \startFLOWcell 
\name{g} \location{3,4} \shape{decision} \text{$a - b < 0$}  
\connection[lt]{e}\comment[l]{Yes}
\connection[bt]{h}\comment[b]{No}
  \stopFLOWcell
  \startFLOWcell 
\name{h} \location{3,5} \shape{76} \text{$a$ is equal \\ to $b$}  
\connection[bt]{f}
  \stopFLOWcell
  \startFLOWcell 
\name{f} \location{2,6} \shape{loop} \text{stop}  
  \stopFLOWcell
\stopFLOWchart

\placefigure
  [here][fig:bigger]
  {Which is bigger?}
  {\tx\setupFLOWcharts\FLOWchart[bigger]}

\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: error: Control sequence expected instead of undefined

2023-12-25 Thread Jeong Dal via ntg-context
Dear Willi and Wolfgang,

Thank you for the answer.

After adding the fix, no error messages.
I’ll wait the upload of new version.

Best regards,

Dalyoung




> 2023. 12. 26. 오전 1:45, Wolfgang Schuster  
> 작성:
> 
> Jeong Dal via ntg-context schrieb am 25.12.2023 um 16:09:
>> Hi,
>> 
>> I got an error message as following:
>> 
>> Control sequence expected instead of undefined
>> 
>> If I comment out the “\externalfigure[][]” line, then there is no error 
>> message.
>> 
>> I don’t know what is wrong in the sample code.
> 
> The problem was mentioned a while ago
> 
> https://www.mail-archive.com/ntg-context@ntg.nl/msg106078.html 
> <https://www.mail-archive.com/ntg-context@ntg.nl/msg106078.html>
> 
> and Hans provided a fix until a new binary is online
> 
> https://www.mail-archive.com/ntg-context@ntg.nl/msg106095.html 
> <https://www.mail-archive.com/ntg-context@ntg.nl/msg106095.html>
> 
> Wolfgang
> 
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / 
> https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
> webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
> archive  : https://github.com/contextgarden/context
> wiki : https://wiki.contextgarden.net
> ___

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

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


[NTG-context] Re: error: Control sequence expected instead of undefined

2023-12-25 Thread Wolfgang Schuster

Jeong Dal via ntg-context schrieb am 25.12.2023 um 16:09:

Hi,

I got an error message as following:

Control sequence expected instead of undefined

If I comment out the “\externalfigure[][]” line, then there is no 
error message.


I don’t know what is wrong in the sample code.


The problem was mentioned a while ago

    https://www.mail-archive.com/ntg-context@ntg.nl/msg106078.html

and Hans provided a fix until a new binary is online

    https://www.mail-archive.com/ntg-context@ntg.nl/msg106095.html

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: error: Control sequence expected instead of undefined

2023-12-25 Thread Willi Egger
Hello,

I just copied your example code and run it on version 2023-09-26. It compiled 
just fine. 

Cheers

Willi

> On 25 Dec 2023, at 16:09, Jeong Dal via ntg-context  
> wrote:
> 
> Hi,
> 
> I got an error message as following:
> 
> Control sequence expected instead of undefined
> 
> If I comment out the “\externalfigure[][]” line, then there is no error 
> message.
> 
> I don’t know what is wrong in the sample code.
> Please check the code.
> 
> Thank you for reading.
> 
> Best regards,
> 
> Dalyoung
> 
> %%%*
> \starttext
> \in{figure}[fig:kruskal1] is my point.
> 
> \startplacefigure[location=,reference=fig:kruskal1,title={}]
> \externalfigure[cow][width=.5\makeupwidth]
> \stopplacefigure
> \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] error: Control sequence expected instead of undefined

2023-12-25 Thread Jeong Dal via ntg-context
Hi,

I got an error message as following:

Control sequence expected instead of undefined

If I comment out the “\externalfigure[][]” line, then there is no error message.

I don’t know what is wrong in the sample code.
Please check the code.

Thank you for reading.

Best regards,

Dalyoung

%%%*
\starttext
\in{figure}[fig:kruskal1] is my point.

\startplacefigure[location=,reference=fig:kruskal1,title={}]
\externalfigure[cow][width=.5\makeupwidth]
\stopplacefigure
\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: About framedtext

2023-12-13 Thread Henning Hraban Ramm

Am 13.12.23 um 18:19 schrieb Wolfgang Schuster:

Fabrice Couvreur schrieb am 13.12.2023 um 19:03:

Hi,
Is this a bug or not ?
The key to coloring the background of the text seems to no longer work.


There is a problem with the corner option, you can either hope it gets 
fixed in the next release
(corner=round still works) or create your own background as metapost 
graphic with rounded corners.


Oh, yes, here’s Hans’ fix.

Hraban
if not modules then modules = { } end modules ['lpdf-rul'] = {
version   = 1.001,
    comment   = "companion to grph-rul.mkiv",
author= "Hans Hagen, PRAGMA-ADE, Hasselt NL",
copyright = "PRAGMA ADE / ConTeXt Development Team",
license   = "see context related readme files"
}

-- todo: split backend and pdf

local tonumber, tostring, next, type = tonumber, tostring, next, type
local concat, setmetatableindex = table.concat, table.setmetatableindex

local attributes   = attributes
local nodes= nodes

local bpfactor = number.dimenfactors.bp

local nuts = nodes.nuts
local ruleactions  = nuts.rules.ruleactions

local getwhd   = nuts.getwhd

local lefttoright_code = tex.directioncodes.lefttoright

local mpcolor  = attributes.colors.mpcolor

local trace_mp = false  trackers.register("rules.mp", function(v) 
trace_mp = v end)

local report_mp= logs.reporter("rules","mp")

local floor= math.floor
local getrandom= utilities.randomizer.get
local formatters   = string.formatters

local setdimen = tex.setdimen
local isdimen  = tex.isdimen
local setmacro = tokens.setters.macro

local codeinjections   = backends.registered.pdf.codeinjections

local d_rule_width  = isdimen("d_rule_width")
local d_rule_height = isdimen("d_rule_height")
local d_rule_depth  = isdimen("d_rule_depth")
local d_rule_h  = isdimen("d_rule_h")
local d_rule_v  = isdimen("d_rule_v")
local d_rule_line   = isdimen("d_rule_line")
local d_rule_offset = isdimen("d_rule_offset")
local d_rule_factor = isdimen("d_rule_factor")

-- This is very pdf specific. Maybe move some to lpdf-rul.lua some day.

local pdfprint ; pdfprint = function(...) pdfprint = lpdf.print return 
pdfprint(...) end

do

local simplemetapost = metapost.simple
local cachesize  = 0
local maxcachesize   = 256*1024
local cachethreshold = 1024
local caching= false -- otherwise random issues so we need a 
dedicated randomizer first

 -- local maxcachesize   = 8*1024
 -- local cachethreshold = 1024/2

local cache = setmetatableindex(function(t,k)
local v = simplemetapost("rulefun",k) -- w, h, d
cachesize = cachesize + #v
if cachesize > maxcachesize then
 -- print("old",cachesize)
for k, v in next, t do
local n = #v
if n > cachethreshold then
t[k] = nil
cachesize = cachesize - n
end
end
 -- print("new",cachesize)
end
 -- print(cachesize,maxcachesize,cachethreshold,#v)
t[k] = v
return v
end)

local replacer = utilities.templates.replacer

-- todo: RuleColor -> just string ?
-- todo: fetch them instead fo push them

-- local predefined = {
-- ["fake:word"] = replacer [[
-- FakeWord(%width%,%height%,%depth%,%line%,%color%);
-- ]],
-- ["fake:rule"] = replacer[[
-- %initializations%
-- FakeRule(%width%,%height%,%depth%,%line%,%color%);
-- ]],
-- ["fake:rest"] = replacer [[
-- RuleDirection := "%direction%" ;
-- RuleOption := "%option%" ;
-- RuleWidth := %width% ;
-- RuleHeight := %height% ;
-- RuleDepth := %depth% ;
-- RuleH := %h% ;
-- RuleV := %v% ;
-- RuleThickness := %line% ;
-- RuleFactor := %factor% ;
-- RuleOffset := %offset% ;
-- def RuleColor = %color% enddef ;
-- %data%;
-- ]]
-- }

local predefined = {
["fake:word"] = replacer [[
FakeWord(RuleWidth,RuleHeight,RuleDepth,RuleThickness,RuleColor);
]],
["fake:rule"] = replacer[[
%initializations%
FakeRule(RuleWidth,RuleHeight,RuleDepth,RuleThickness,RuleColor);
]],
["fake:rest"] = replacer [[
%data%;
]]
}

local initialized = false ;

local function rule_mp(p,h,v,i,n)
local name  = p.name or "fake:rest"
local ht= p.height or 0
local dp= p.depth  or 0
local total = ht + dp
local code  = (predefined[name] or predefined["fake:rest"]) {
data  = p.data or "",
  -- -- width = p.width * bpfactor,
  -- -- height= p.height * bpfactor,

[NTG-context] Re: multipage metapost output from ConTeXt

2023-12-04 Thread Fabrice L
name:notonaskharabic] 
> >> [features=fea]
> >> \definefontsynonym [notonaskharabic-Bold-Italic] [name:notonaskharabic] 
> >> [features=fea]
> >> \stoptypescript
> >>
> >> \starttypescript [serif] [notonaskharabic]
> >> \usetypescript[serif][fallback]
> >> \definefontsynonym [Serif] [notonaskharabic-Light] [features=fea]
> >> \definefontsynonym [SerifItalic] [notonaskharabic-Italic] [features=fea]
> >> \definefontsynonym [SerifBold] [notonaskharabic-Bold] [features=fea]
> >> \definefontsynonym [SerifBoldItalic] [notonaskharabic-Bold-Italic] 
> >> [features=fea]
> >> \stoptypescript
> >>
> >> \starttypescript [notonaskharabic]
> >> \definetypeface [notonaskharabic] [rm] [serif] [notonaskharabic] [default]
> >> \stoptypescript
> >>
> >> \usetypescript[notonaskharabic]
> >>
> >> \setupbodyfont [RomanFont]
> >>
> >> \usecolors[crayola]
> >>
> >> \startMPinclusions
> >>
> >> picture p[];
> >> path TheFrame ;
> >> TheFrame := fullsquare scaled 5in ;
> >>
> >> z0 = (0,0);
> >> z1 = (60,40);
> >> z2 = (40,90);
> >> z3 = (10,70);
> >> z4 = (30,50);
> >> z5 = (90,70);
> >> z6 = (-10,70);
> >>
> >> path A; A = z0..z1..z2..z3..z4 ;
> >> pair AStartPoint; AStartPoint = point 0 of A;
> >> pair AEndPoint; AEndPoint = point 4 of A;
> >> path B; B = z5..z6;
> >> pair BStartPoint; BStartPoint = point 0 of B;
> >> pair BEndPoint; BEndPoint = point 1 of B;
> >> path C; C = AStartPoint..AEndPoint;
> >>
> >> p1:=image(
> >> draw A withcolor red;
> >> );
> >>
> >> p2:=image(draw A; label(lmt_outline [
> >> text = "\JapaneseFont 日本語"
> >> ], AEndPoint););
> >>
> >> p3:=image(
> >> label(textext("\notonaskharabic \textdir TRT دانگ") scaled 1.2, 
> >> BStartPoint);
> >> );
> >>
> >> p4:=image(draw A; label(lmt_outline [
> >> text = "\KoreanFont 한국어"
> >> ], AStartPoint););
> >>
> >> p5:=image(
> >> label(textext("bāng"), BEndPoint);
> >> draw C withcolor green;
> >> );
> >>
> >> p6:=image(
> >> draw B withcolor blue;
> >> );
> >> \stopMPinclusions
> >>
> >> \starttext
> >>
> >> \dorecurse{6}{ % Frame
> >> \setupMPpage[background=color, backgroundcolor=SpringGreen]
> >> \startMPpage[pagestate=start]
> >> currentime := #1 ;
> >> % Just for learning :
> >> draw TheFrame withpen pencircle scaled .1in withcolor magenta ;
> >> draw textext("T="&decimal(currentime)) scaled 2 shifted(0,2in) withcolor 
> >> magenta ;
> >> for k=1 upto currentime: draw p[k]; endfor
> >> setbounds currentpicture to TheFrame ;
> >>
> >> desiredformat := 1080;% In pixels (will be converted by default at 72dpi)
> >> currentpicture := currentpicture xysized (desiredformat ,desiredformat );
> >>
> >> \stopMPpage
> >> }
> >>
> >> \stoptext
> >> On Nov. 27 2023, at 11:25 pm, Aditya Mahajan  wrote:
> >>
> >> On Mon, 27 Nov 2023, Fabrice L wrote:
> >>
> >> > Hi,
> >> >
> >> > It is fun fact very easy to do. You just use \startMPpage (…) 
> >> > \stopMPpage multiple times. Here is an example which build an animation 
> >> > of a particle moving according to a Brownian motion.
> >>
> >> A very similar option is to pass a variable to a metapost drawing. This is 
> >> what I use:
> >>
> >> https://adityam.github.io/context-blog/post/metapost-animation/
> >>
> >> It only works when viewed in acrobat, you can just comment out the 
> >> animation part and wrap it in \startTEXpage .. \stopTEXpage to get 
> >> multi-page animation.
> >>
> >> Aditya___
> >> If your question is of interest to others as well, please add an entry to 
> >> the Wiki!
> >>
> _

I do not understand why your original code does not work, and I know Mickael 
has offered you a solution, but there is, just for curiosity,  another one to 
achieve your goal using \MPinclusions  :

% 8 < ———

\starttext

\startMPinclusions

 path TheFrame ;
 TheFrame := fullsquare scaled 5in ;

 pair Coord[] ;
 string TheText[] ; 

 TheText[1] := "Word 1" ; Coord[1] := (60,40) ;
 TheText[2] := "Word 2" ; Coord[2] := (40,90) ;
 TheText[3] := "Word 3" ; Coord[3] := (10,70) ;

\stopMPinclusions

\dorecurse{3}{ % Frame
\startMPpage%[pagestate=start]  
 currentime := #1 ;

 % Just for learning :
 draw TheFrame withpen pencircle scaled .1in withcolor magenta ;
 draw textext("T="&decimal(currentime)) scaled 2 shifted(0,2in) withcolor 
magenta ;

 for k=1 upto currentime: 
  draw textext(TheText[k]) shifted Coord[k] ;
  endfor ;
 
\stopMPpage
}

\stoptext
% 8 < ———

Fabrice. 

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

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


[NTG-context] Re: multipage metapost output from ConTeXt

2023-12-02 Thread Emanuel Han via ntg-context
me) which has been used previously in textext() 
> > >> before the for k=1 endfor loop. This overwriting happens only for the 
> > >> first textext() which occurs inside the for k=1 endfor loop. All other 
> > >> textext() inside the for k=1 endfor loop are not drawn at all. If the 
> > >> line « draw textext("T="&decimal(currentime)) scaled 2 shifted(0,2in) 
> > >> withcolor magenta ; » is commented out, the first textext() inside the 
> > >> for k=1 endfor loop is not drawn neither. It must be an issue with 
> > >> textext(), because when I replace textext() by lmt_outline[], the text 
> > >> is drawn.
> > >>
> > >> Adjusted mwe:
> > >>
> > >> \enableregime[utf] % enable unicoded input
> > >>
> > >> \definefontfamily [RomanFont] [rm] [calluna]
> > >>
> > >> \definefontfamily [KoreanFont] [rm] [applemyungjo]
> > >>
> > >> \definefontfamily [JapaneseFont] [rm] [hannotatesc]
> > >>
> > >> \definefontfeature
> > >> [fea]
> > >> [mode=node,language=dflt,script=arab,
> > >> init=yes,
> > >> medi=yes,
> > >> fina=yes,
> > >> isol=yes,
> > >> calt=yes,
> > >> rlig=yes,
> > >> tlig=yes,
> > >> trep=yes,
> > >> curs=yes,
> > >> kern=yes,
> > >> mark=yes
> > >> ]
> > >>
> > >> \starttypescript [serif] [notonaskharabic]
> > >> \definefontsynonym [notonaskharabic-Light] [name:notonaskharabic] 
> > >> [features=fea]
> > >> \definefontsynonym [notonaskharabic-Bold] [name:notonaskharabic] 
> > >> [features=fea]
> > >> \definefontsynonym [notonaskharabic-Italic] [name:notonaskharabic] 
> > >> [features=fea]
> > >> \definefontsynonym [notonaskharabic-Bold-Italic] [name:notonaskharabic] 
> > >> [features=fea]
> > >> \stoptypescript
> > >>
> > >> \starttypescript [serif] [notonaskharabic]
> > >> \usetypescript[serif][fallback]
> > >> \definefontsynonym [Serif] [notonaskharabic-Light] [features=fea]
> > >> \definefontsynonym [SerifItalic] [notonaskharabic-Italic] [features=fea]
> > >> \definefontsynonym [SerifBold] [notonaskharabic-Bold] [features=fea]
> > >> \definefontsynonym [SerifBoldItalic] [notonaskharabic-Bold-Italic] 
> > >> [features=fea]
> > >> \stoptypescript
> > >>
> > >> \starttypescript [notonaskharabic]
> > >> \definetypeface [notonaskharabic] [rm] [serif] [notonaskharabic] 
> > >> [default]
> > >> \stoptypescript
> > >>
> > >> \usetypescript[notonaskharabic]
> > >>
> > >> \setupbodyfont [RomanFont]
> > >>
> > >> \usecolors[crayola]
> > >>
> > >> \startMPinclusions
> > >>
> > >> picture p[];
> > >> path TheFrame ;
> > >> TheFrame := fullsquare scaled 5in ;
> > >>
> > >> z0 = (0,0);
> > >> z1 = (60,40);
> > >> z2 = (40,90);
> > >> z3 = (10,70);
> > >> z4 = (30,50);
> > >> z5 = (90,70);
> > >> z6 = (-10,70);
> > >>
> > >> path A; A = z0..z1..z2..z3..z4 ;
> > >> pair AStartPoint; AStartPoint = point 0 of A;
> > >> pair AEndPoint; AEndPoint = point 4 of A;
> > >> path B; B = z5..z6;
> > >> pair BStartPoint; BStartPoint = point 0 of B;
> > >> pair BEndPoint; BEndPoint = point 1 of B;
> > >> path C; C = AStartPoint..AEndPoint;
> > >>
> > >> p1:=image(
> > >> draw A withcolor red;
> > >> );
> > >>
> > >> p2:=image(draw A; label(lmt_outline [
> > >> text = "\JapaneseFont 日本語"
> > >> ], AEndPoint););
> > >>
> > >> p3:=image(
> > >> label(textext("\notonaskharabic \textdir TRT دانگ") scaled 1.2, 
> > >> BStartPoint);
> > >> );
> > >>
> > >> p4:=image(draw A; label(lmt_outline [
> > >> text = "\KoreanFont 한국어"
> > >> ], AStartPoint););
> > >>
> > >> p5:=image(
> > >> label(textext("bāng"), BEndPoint);
> > >> draw C withcolor green;
> > >> );
> > >>
> > >> p6:=image(
> > >> draw B withcolor blue;
> > >> );
> > >> \stopMPinclus

[NTG-context] Re: multipage metapost output from ConTeXt

2023-12-02 Thread Mikael Sundqvist
d input
> >>
> >> \definefontfamily [RomanFont] [rm] [calluna]
> >>
> >> \definefontfamily [KoreanFont] [rm] [applemyungjo]
> >>
> >> \definefontfamily [JapaneseFont] [rm] [hannotatesc]
> >>
> >> \definefontfeature
> >> [fea]
> >> [mode=node,language=dflt,script=arab,
> >> init=yes,
> >> medi=yes,
> >> fina=yes,
> >> isol=yes,
> >> calt=yes,
> >> rlig=yes,
> >> tlig=yes,
> >> trep=yes,
> >> curs=yes,
> >> kern=yes,
> >> mark=yes
> >> ]
> >>
> >> \starttypescript [serif] [notonaskharabic]
> >> \definefontsynonym [notonaskharabic-Light] [name:notonaskharabic] 
> >> [features=fea]
> >> \definefontsynonym [notonaskharabic-Bold] [name:notonaskharabic] 
> >> [features=fea]
> >> \definefontsynonym [notonaskharabic-Italic] [name:notonaskharabic] 
> >> [features=fea]
> >> \definefontsynonym [notonaskharabic-Bold-Italic] [name:notonaskharabic] 
> >> [features=fea]
> >> \stoptypescript
> >>
> >> \starttypescript [serif] [notonaskharabic]
> >> \usetypescript[serif][fallback]
> >> \definefontsynonym [Serif] [notonaskharabic-Light] [features=fea]
> >> \definefontsynonym [SerifItalic] [notonaskharabic-Italic] [features=fea]
> >> \definefontsynonym [SerifBold] [notonaskharabic-Bold] [features=fea]
> >> \definefontsynonym [SerifBoldItalic] [notonaskharabic-Bold-Italic] 
> >> [features=fea]
> >> \stoptypescript
> >>
> >> \starttypescript [notonaskharabic]
> >> \definetypeface [notonaskharabic] [rm] [serif] [notonaskharabic] [default]
> >> \stoptypescript
> >>
> >> \usetypescript[notonaskharabic]
> >>
> >> \setupbodyfont [RomanFont]
> >>
> >> \usecolors[crayola]
> >>
> >> \startMPinclusions
> >>
> >> picture p[];
> >> path TheFrame ;
> >> TheFrame := fullsquare scaled 5in ;
> >>
> >> z0 = (0,0);
> >> z1 = (60,40);
> >> z2 = (40,90);
> >> z3 = (10,70);
> >> z4 = (30,50);
> >> z5 = (90,70);
> >> z6 = (-10,70);
> >>
> >> path A; A = z0..z1..z2..z3..z4 ;
> >> pair AStartPoint; AStartPoint = point 0 of A;
> >> pair AEndPoint; AEndPoint = point 4 of A;
> >> path B; B = z5..z6;
> >> pair BStartPoint; BStartPoint = point 0 of B;
> >> pair BEndPoint; BEndPoint = point 1 of B;
> >> path C; C = AStartPoint..AEndPoint;
> >>
> >> p1:=image(
> >> draw A withcolor red;
> >> );
> >>
> >> p2:=image(draw A; label(lmt_outline [
> >> text = "\JapaneseFont 日本語"
> >> ], AEndPoint););
> >>
> >> p3:=image(
> >> label(textext("\notonaskharabic \textdir TRT دانگ") scaled 1.2, 
> >> BStartPoint);
> >> );
> >>
> >> p4:=image(draw A; label(lmt_outline [
> >> text = "\KoreanFont 한국어"
> >> ], AStartPoint););
> >>
> >> p5:=image(
> >> label(textext("bāng"), BEndPoint);
> >> draw C withcolor green;
> >> );
> >>
> >> p6:=image(
> >> draw B withcolor blue;
> >> );
> >> \stopMPinclusions
> >>
> >> \starttext
> >>
> >> \dorecurse{6}{ % Frame
> >> \setupMPpage[background=color, backgroundcolor=SpringGreen]
> >> \startMPpage[pagestate=start]
> >> currentime := #1 ;
> >> % Just for learning :
> >> draw TheFrame withpen pencircle scaled .1in withcolor magenta ;
> >> draw textext("T="&decimal(currentime)) scaled 2 shifted(0,2in) withcolor 
> >> magenta ;
> >> for k=1 upto currentime: draw p[k]; endfor
> >> setbounds currentpicture to TheFrame ;
> >>
> >> desiredformat := 1080;% In pixels (will be converted by default at 72dpi)
> >> currentpicture := currentpicture xysized (desiredformat ,desiredformat );
> >>
> >> \stopMPpage
> >> }
> >>
> >> \stoptext
> >> On Nov. 27 2023, at 11:25 pm, Aditya Mahajan  wrote:
> >>
> >> On Mon, 27 Nov 2023, Fabrice L wrote:
> >>
> >> > Hi,
> >> >
> >> > It is fun fact very easy to do. You just use \startMPpage (…) 
> >> > \stopMPpage multiple times. Here is an example which build an animation 
> >> > of a particle moving according to a Brownian motion.
> &g

[NTG-context] Re: multipage metapost output from ConTeXt

2023-12-02 Thread Emanuel Han via ntg-context
tsynonym [SerifItalic] [notonaskharabic-Italic] [features=fea]
> >> \definefontsynonym [SerifBold] [notonaskharabic-Bold] [features=fea]
> >> \definefontsynonym [SerifBoldItalic] [notonaskharabic-Bold-Italic] 
> >> [features=fea]
> >> \stoptypescript
> >>
> >> \starttypescript [notonaskharabic]
> >> \definetypeface [notonaskharabic] [rm] [serif] [notonaskharabic] [default]
> >> \stoptypescript
> >>
> >> \usetypescript[notonaskharabic]
> >>
> >> \setupbodyfont [RomanFont]
> >>
> >> \usecolors[crayola]
> >>
> >> \startMPinclusions
> >>
> >> picture p[];
> >> path TheFrame ;
> >> TheFrame := fullsquare scaled 5in ;
> >>
> >> z0 = (0,0);
> >> z1 = (60,40);
> >> z2 = (40,90);
> >> z3 = (10,70);
> >> z4 = (30,50);
> >> z5 = (90,70);
> >> z6 = (-10,70);
> >>
> >> path A; A = z0..z1..z2..z3..z4 ;
> >> pair AStartPoint; AStartPoint = point 0 of A;
> >> pair AEndPoint; AEndPoint = point 4 of A;
> >> path B; B = z5..z6;
> >> pair BStartPoint; BStartPoint = point 0 of B;
> >> pair BEndPoint; BEndPoint = point 1 of B;
> >> path C; C = AStartPoint..AEndPoint;
> >>
> >> p1:=image(
> >> draw A withcolor red;
> >> );
> >>
> >> p2:=image(draw A; label(lmt_outline [
> >> text = "\JapaneseFont 日本語"
> >> ], AEndPoint););
> >>
> >> p3:=image(
> >> label(textext("\notonaskharabic \textdir TRT دانگ") scaled 1.2, 
> >> BStartPoint);
> >> );
> >>
> >> p4:=image(draw A; label(lmt_outline [
> >> text = "\KoreanFont 한국어"
> >> ], AStartPoint););
> >>
> >> p5:=image(
> >> label(textext("bāng"), BEndPoint);
> >> draw C withcolor green;
> >> );
> >>
> >> p6:=image(
> >> draw B withcolor blue;
> >> );
> >> \stopMPinclusions
> >>
> >> \starttext
> >>
> >> \dorecurse{6}{ % Frame
> >> \setupMPpage[background=color, backgroundcolor=SpringGreen]
> >> \startMPpage[pagestate=start]
> >> currentime := #1 ;
> >> % Just for learning :
> >> draw TheFrame withpen pencircle scaled .1in withcolor magenta ;
> >> draw textext("T="&decimal(currentime)) scaled 2 shifted(0,2in) withcolor 
> >> magenta ;
> >> for k=1 upto currentime: draw p[k]; endfor
> >> setbounds currentpicture to TheFrame ;
> >>
> >> desiredformat := 1080;% In pixels (will be converted by default at 72dpi)
> >> currentpicture := currentpicture xysized (desiredformat ,desiredformat );
> >>
> >> \stopMPpage
> >> }
> >>
> >> \stoptext
> >> On Nov. 27 2023, at 11:25 pm, Aditya Mahajan  wrote:
> >>
> >> On Mon, 27 Nov 2023, Fabrice L wrote:
> >>
> >> > Hi,
> >> >
> >> > It is fun fact very easy to do. You just use \startMPpage (…) 
> >> > \stopMPpage multiple times. Here is an example which build an animation 
> >> > of a particle moving according to a Brownian motion.
> >>
> >> A very similar option is to pass a variable to a metapost drawing. This is 
> >> what I use:
> >>
> >> https://adityam.github.io/context-blog/post/metapost-animation/
> >>
> >> It only works when viewed in acrobat, you can just comment out the 
> >> animation part and wrap it in \startTEXpage .. \stopTEXpage to get 
> >> multi-page animation.
> >>
> >> Aditya___
> >> If your question is of interest to others as well, please add an entry to 
> >> the Wiki!
> >>
> >> maillist : ntg-context@ntg.nl / 
> >> https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
> >> webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
> >> archive : https://github.com/contextgarden/context
> >> wiki : https://wiki.contextgarden.net
> >> ___
> >>
> >> ___
> >> If your question is of interest to others as well, please add an entry to 
>

[NTG-context] Re: multipage metapost output from ConTeXt

2023-12-02 Thread Mikael Sundqvist
ndPoint););
>>
>> p3:=image(
>> label(textext("\notonaskharabic \textdir TRT دانگ") scaled 1.2, 
>> BStartPoint);
>> );
>>
>> p4:=image(draw A; label(lmt_outline [
>> text = "\KoreanFont 한국어"
>> ], AStartPoint););
>>
>> p5:=image(
>> label(textext("bāng"), BEndPoint);
>> draw C withcolor green;
>> );
>>
>> p6:=image(
>> draw B withcolor blue;
>> );
>> \stopMPinclusions
>>
>> \starttext
>>
>> \dorecurse{6}{ % Frame
>>  \setupMPpage[background=color, backgroundcolor=SpringGreen]
>> \startMPpage[pagestate=start]
>>  currentime := #1 ;
>>  % Just for learning :
>>  draw TheFrame withpen pencircle scaled .1in withcolor magenta ;
>>  draw textext("T="&decimal(currentime)) scaled 2 shifted(0,2in) withcolor 
>> magenta ;
>>  for k=1 upto currentime: draw p[k]; endfor
>>  setbounds currentpicture to TheFrame ;
>>
>>  desiredformat := 1080;% In pixels (will be converted by default at 72dpi)
>>  currentpicture := currentpicture xysized (desiredformat ,desiredformat );
>>
>> \stopMPpage
>> }
>>
>> \stoptext
>> On Nov. 27 2023, at 11:25 pm, Aditya Mahajan  wrote:
>>
>> On Mon, 27 Nov 2023, Fabrice L wrote:
>>
>> > Hi,
>> >
>> > It is fun fact very easy to do. You just use \startMPpage (…) \stopMPpage 
>> > multiple times. Here is an example which build an animation of a particle 
>> > moving according to a Brownian motion.
>>
>> A very similar option is to pass a variable to a metapost drawing. This is 
>> what I use:
>>
>> https://adityam.github.io/context-blog/post/metapost-animation/
>>
>> It only works when viewed in acrobat, you can just comment out the animation 
>> part and wrap it in \startTEXpage .. \stopTEXpage to get multi-page 
>> animation.
>>
>> Aditya___
>> If your question is of interest to others as well, please add an entry to 
>> the Wiki!
>>
>> maillist : ntg-context@ntg.nl / 
>> https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
>> webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
>> archive : https://github.com/contextgarden/context
>> wiki : https://wiki.contextgarden.net
>> ___
>>
>> ___
>> If your question is of interest to others as well, please add an entry to 
>> the Wiki!
>>
>> maillist : ntg-context@ntg.nl / 
>> https://mailman.ntg.nl/mailman3/lists/ntg-context.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
> ___
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[NTG-context] Re: multipage metapost output from ConTeXt

2023-12-02 Thread fv leung
 1080;% In pixels (will be converted by default at 72dpi)
>  currentpicture := currentpicture xysized (desiredformat ,desiredformat );
>
> \stopMPpage
> }
>
> \stoptext
> On Nov. 27 2023, at 11:25 pm, Aditya Mahajan  wrote:
>
> On Mon, 27 Nov 2023, Fabrice L wrote:
>
> > Hi,
> >
> > It is fun fact very easy to do. You just use \startMPpage (…)
> \stopMPpage multiple times. Here is an example which build an animation of
> a particle moving according to a Brownian motion.
>
> A very similar option is to pass a variable to a metapost drawing. This is
> what I use:
>
> https://adityam.github.io/context-blog/post/metapost-animation/
>
> It only works when viewed in acrobat, you can just comment out the
> animation part and wrap it in \startTEXpage .. \stopTEXpage to get
> multi-page animation.
>
>
> Aditya___
> If your question is of interest to others as well, please add an entry to
> the Wiki!
>
> maillist : ntg-context@ntg.nl /
> https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
> webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
> archive : https://github.com/contextgarden/context
> wiki : https://wiki.contextgarden.net
>
> ___
>
>
> ___
> If your question is of interest to others as well, please add an entry to
> the Wiki!
>
> maillist : ntg-context@ntg.nl /
> https://mailman.ntg.nl/mailman3/lists/ntg-context.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: multipage metapost output from ConTeXt

2023-12-02 Thread Emanuel Han via ntg-context
So is there a way to circumvent these issues? Or an explanation for this 
behavior, so that I can try to find a solution by myself?

Thanks
Emanuel

On Nov. 29 2023, at 12:25 pm, Emanuel Han via ntg-context  
wrote:
> Dear Aditya and Fabrice,
> thanks for your responses.
>
> I included some of Fabrice's code into mine for testing purpose, and indeed 
> the multipage works now.
> What is bizarre is that issues appear now that didn't appear before:
> Path A is drawn with color red on page 1, and in color black on all following 
> pages, while it should stay red.
>
> textext(, ) is overwriting  with "T="&decimal(currentime) 
> which has been used previously in textext() before the for k=1 endfor loop. 
> This overwriting happens only for the first textext() which occurs inside the 
> for k=1 endfor loop. All other textext() inside the for k=1 endfor loop are 
> not drawn at all. If the line « draw textext("T="&decimal(currentime)) scaled 
> 2 shifted(0,2in) withcolor magenta ; » is commented out, the first textext() 
> inside the for k=1 endfor loop is not drawn neither. It must be an issue with 
> textext(), because when I replace textext() by lmt_outline[], the text is 
> drawn.
>
>
> Adjusted mwe:
>
> \enableregime[utf] % enable unicoded input
> \definefontfamily [RomanFont] [rm] [calluna]
> \definefontfamily [KoreanFont] [rm] [applemyungjo]
> \definefontfamily [JapaneseFont] [rm] [hannotatesc]
> \definefontfeature
> [fea]
> [mode=node,language=dflt,script=arab,
> init=yes,
> medi=yes,
> fina=yes,
> isol=yes,
> calt=yes,
> rlig=yes,
> tlig=yes,
> trep=yes,
> curs=yes,
> kern=yes,
> mark=yes
> ]
>
> \starttypescript [serif] [notonaskharabic]
> \definefontsynonym [notonaskharabic-Light] [name:notonaskharabic] 
> [features=fea]
> \definefontsynonym [notonaskharabic-Bold] [name:notonaskharabic] 
> [features=fea]
> \definefontsynonym [notonaskharabic-Italic] [name:notonaskharabic] 
> [features=fea]
> \definefontsynonym [notonaskharabic-Bold-Italic] [name:notonaskharabic] 
> [features=fea]
> \stoptypescript
>
> \starttypescript [serif] [notonaskharabic]
> \usetypescript[serif][fallback]
> \definefontsynonym [Serif] [notonaskharabic-Light] [features=fea]
> \definefontsynonym [SerifItalic] [notonaskharabic-Italic] [features=fea]
> \definefontsynonym [SerifBold] [notonaskharabic-Bold] [features=fea]
> \definefontsynonym [SerifBoldItalic] [notonaskharabic-Bold-Italic] 
> [features=fea]
> \stoptypescript
>
> \starttypescript [notonaskharabic]
> \definetypeface [notonaskharabic] [rm] [serif] [notonaskharabic] [default]
> \stoptypescript
>
> \usetypescript[notonaskharabic]
> \setupbodyfont [RomanFont]
>
> \usecolors[crayola]
>
> \startMPinclusions
> picture p[];
> path TheFrame ;
> TheFrame := fullsquare scaled 5in ;
>
> z0 = (0,0);
> z1 = (60,40);
> z2 = (40,90);
> z3 = (10,70);
> z4 = (30,50);
> z5 = (90,70);
> z6 = (-10,70);
>
> path A; A = z0..z1..z2..z3..z4 ;
> pair AStartPoint; AStartPoint = point 0 of A;
> pair AEndPoint; AEndPoint = point 4 of A;
> path B; B = z5..z6;
> pair BStartPoint; BStartPoint = point 0 of B;
> pair BEndPoint; BEndPoint = point 1 of B;
> path C; C = AStartPoint..AEndPoint;
>
> p1:=image(
> draw A withcolor red;
> );
>
> p2:=image(draw A; label(lmt_outline [
> text = "\JapaneseFont 日本語"
> ], AEndPoint););
>
> p3:=image(
> label(textext("\notonaskharabic \textdir TRT دانگ") scaled 1.2, BStartPoint);
> );
>
> p4:=image(draw A; label(lmt_outline [
> text = "\KoreanFont 한국어"
> ], AStartPoint););
>
> p5:=image(
> label(textext("bāng"), BEndPoint);
> draw C withcolor green;
> );
>
> p6:=image(
> draw B withcolor blue;
> );
> \stopMPinclusions
>
> \starttext
> \dorecurse{6}{ % Frame
> \setupMPpage[background=color, backgroundcolor=SpringGreen]
> \startMPpage[pagestate=start]
> currentime := #1 ;
> % Just for learning :
> draw TheFrame withpen pencircle scaled .1in withcolor magenta ;
> draw textext("T="&decimal(currentime)) scaled 2 shifted(0,2in) withcolor 
> magenta ;
> for k=1 upto currentime: draw p[k]; endfor
> setbounds currentpicture to TheFrame ;
>
> desiredformat := 1080;% In pixels (will be converted by default at 72dpi)
> currentpicture := currentpicture xysized (desiredformat ,desiredformat );
>
> \stopMPpage
> }
>
> \stoptext
> On Nov. 27 2023, at 11:25 pm, Aditya Mahajan  wrote:
> > On Mon, 27 Nov 2023, Fabrice L wrote:
> >
> > > Hi,
> > >
> > > It is fun fact very easy to do. You just use \startMPpage (…) \stopMPpage 
> > > multiple 

[NTG-context] Re: Bold TeX Gyre Pagella Math results in Math error: parameter 'subshiftdown' with id 48 in style 2 is not set

2023-11-30 Thread Marco Patzer
On Thu, 30 Nov 2023 20:51:42 +0100
Wolfgang Schuster  wrote:

> > %% comment/remove this line and it works
> > \definefontfamily [mainface] [mm] [TeX Gyre Pagella Math]  
> 
> Use the \definetypeface command to load the math font.

That example was taken straight from

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

So that should better read like this: ?

  \definefontfamily [mainface] [rm][TeX Gyre Pagella]
  \definefontfamily [mainface] [ss][TeX Gyre Heros]
  \definetypeface   [mainface] [mm] [math] [pagella]

  \setupbodyfont[mainface]

Should I correct the wiki then?

> Math fonts always use special settings or load additional settings
> which are missing when you use 
> \definefontfamily.
> 
> \definetypeface [mainface] [mm] [math] [pagella]

That works, thanks. However, I discovered that:

%% fails
\definefontfamily [mainface] [mm] [TeX Gyre Pagella Math]

%% works
\definefontfamily [mainface] [mm] [pagella]

So even with \definefontfamily it works, when “TeX Gyre Pagella
Math” is changed to “pagella”. That I do not understand.

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: Bold TeX Gyre Pagella Math results in Math error: parameter 'subshiftdown' with id 48 in style 2 is not set

2023-11-30 Thread Wolfgang Schuster

Marco Patzer schrieb am 30.11.2023 um 20:43:

Hi!

I have a strange issue when TeX Gyre Pagella Math is used together
with bold text. MWE:

\definefontfamily [mainface] [rm] [TeX Gyre Pagella]
\definefontfamily [mainface] [ss] [TeX Gyre Heros]

%% comment/remove this line and it works
\definefontfamily [mainface] [mm] [TeX Gyre Pagella Math]


Use the \definetypeface command to load the math font. Math fonts always 
use special
settings or load additional settings which are missing when you use 
\definefontfamily.


\definetypeface [mainface] [mm] [math] [pagella]

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] Bold TeX Gyre Pagella Math results in Math error: parameter 'subshiftdown' with id 48 in style 2 is not set

2023-11-30 Thread Marco Patzer
Hi!

I have a strange issue when TeX Gyre Pagella Math is used together
with bold text. MWE:

\definefontfamily [mainface] [rm] [TeX Gyre Pagella]
\definefontfamily [mainface] [ss] [TeX Gyre Heros]

%% comment/remove this line and it works
\definefontfamily [mainface] [mm] [TeX Gyre Pagella Math]

\setupbodyfont [mainface]
\definedescription [foo]

\starttext
  %% works, no issues here
  \math{x_y}

  %% fails if TeX Gyre Pagella Math is used
  \bold{\math{x_y}}
\stoptext

The error is:

tex error   > tex error on line 14 in file /tmp/tex-xDj/xDj.mkvi: Math 
error: parameter 'subshiftdown' with id 48 in style 2 is not set

 \math_m_nop 
#1->\relax \ifmmode #1\else \normalstartimath \begingroup #1\endgroup 
\normalstopimath 
\fi 
 
  \bold{\math{x_y}

What is the issue here?

Marco

LMTX 2023.09.04 19:15
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[NTG-context] Re: multipage metapost output from ConTeXt

2023-11-29 Thread Emanuel Han via ntg-context
Dear Aditya and Fabrice,
thanks for your responses.

I included some of Fabrice's code into mine for testing purpose, and indeed the 
multipage works now.
What is bizarre is that issues appear now that didn't appear before:
Path A is drawn with color red on page 1, and in color black on all following 
pages, while it should stay red.

textext(, ) is overwriting  with "T="&decimal(currentime) 
which has been used previously in textext() before the for k=1 endfor loop. 
This overwriting happens only for the first textext() which occurs inside the 
for k=1 endfor loop. All other textext() inside the for k=1 endfor loop are not 
drawn at all. If the line « draw textext("T="&decimal(currentime)) scaled 2 
shifted(0,2in) withcolor magenta ; » is commented out, the first textext() 
inside the for k=1 endfor loop is not drawn neither. It must be an issue with 
textext(), because when I replace textext() by lmt_outline[], the text is drawn.

Adjusted mwe:

\enableregime[utf] % enable unicoded input
\definefontfamily [RomanFont] [rm] [calluna]
\definefontfamily [KoreanFont] [rm] [applemyungjo]
\definefontfamily [JapaneseFont] [rm] [hannotatesc]
\definefontfeature
[fea]
[mode=node,language=dflt,script=arab,
init=yes,
medi=yes,
fina=yes,
isol=yes,
calt=yes,
rlig=yes,
tlig=yes,
trep=yes,
curs=yes,
kern=yes,
mark=yes
]

\starttypescript [serif] [notonaskharabic]
\definefontsynonym [notonaskharabic-Light] [name:notonaskharabic] [features=fea]
\definefontsynonym [notonaskharabic-Bold] [name:notonaskharabic] [features=fea]
\definefontsynonym [notonaskharabic-Italic] [name:notonaskharabic] 
[features=fea]
\definefontsynonym [notonaskharabic-Bold-Italic] [name:notonaskharabic] 
[features=fea]
\stoptypescript

\starttypescript [serif] [notonaskharabic]
\usetypescript[serif][fallback]
\definefontsynonym [Serif] [notonaskharabic-Light] [features=fea]
\definefontsynonym [SerifItalic] [notonaskharabic-Italic] [features=fea]
\definefontsynonym [SerifBold] [notonaskharabic-Bold] [features=fea]
\definefontsynonym [SerifBoldItalic] [notonaskharabic-Bold-Italic] 
[features=fea]
\stoptypescript

\starttypescript [notonaskharabic]
\definetypeface [notonaskharabic] [rm] [serif] [notonaskharabic] [default]
\stoptypescript

\usetypescript[notonaskharabic]
\setupbodyfont [RomanFont]

\usecolors[crayola]

\startMPinclusions
picture p[];
path TheFrame ;
TheFrame := fullsquare scaled 5in ;

z0 = (0,0);
z1 = (60,40);
z2 = (40,90);
z3 = (10,70);
z4 = (30,50);
z5 = (90,70);
z6 = (-10,70);

path A; A = z0..z1..z2..z3..z4 ;
pair AStartPoint; AStartPoint = point 0 of A;
pair AEndPoint; AEndPoint = point 4 of A;
path B; B = z5..z6;
pair BStartPoint; BStartPoint = point 0 of B;
pair BEndPoint; BEndPoint = point 1 of B;
path C; C = AStartPoint..AEndPoint;

p1:=image(
draw A withcolor red;
);

p2:=image(draw A; label(lmt_outline [
text = "\JapaneseFont 日本語"
], AEndPoint););

p3:=image(
label(textext("\notonaskharabic \textdir TRT دانگ") scaled 1.2, BStartPoint);
);

p4:=image(draw A; label(lmt_outline [
text = "\KoreanFont 한국어"
], AStartPoint););

p5:=image(
label(textext("bāng"), BEndPoint);
draw C withcolor green;
);

p6:=image(
draw B withcolor blue;
);
\stopMPinclusions

\starttext
\dorecurse{6}{ % Frame
\setupMPpage[background=color, backgroundcolor=SpringGreen]
\startMPpage[pagestate=start]
currentime := #1 ;
% Just for learning :
draw TheFrame withpen pencircle scaled .1in withcolor magenta ;
draw textext("T="&decimal(currentime)) scaled 2 shifted(0,2in) withcolor 
magenta ;
for k=1 upto currentime: draw p[k]; endfor
setbounds currentpicture to TheFrame ;

desiredformat := 1080;% In pixels (will be converted by default at 72dpi)
currentpicture := currentpicture xysized (desiredformat ,desiredformat );

\stopMPpage
}

\stoptext
On Nov. 27 2023, at 11:25 pm, Aditya Mahajan  wrote:
> On Mon, 27 Nov 2023, Fabrice L wrote:
>
> > Hi,
> >
> > It is fun fact very easy to do. You just use \startMPpage (…) \stopMPpage 
> > multiple times. Here is an example which build an animation of a particle 
> > moving according to a Brownian motion.
>
> A very similar option is to pass a variable to a metapost drawing. This is 
> what I use:
> https://adityam.github.io/context-blog/post/metapost-animation/
> It only works when viewed in acrobat, you can just comment out the animation 
> part and wrap it in \startTEXpage .. \stopTEXpage to get multi-page animation.
> Aditya___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
>
> maillist : ntg-context@ntg.nl / 
> https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
>

[NTG-context] Re: multipage metapost output from ConTeXt

2023-11-27 Thread Aditya Mahajan
On Mon, 27 Nov 2023, Fabrice L wrote:

> Hi,
> 
> It is fun fact very easy to do. You just use \startMPpage (…) \stopMPpage 
> multiple times. Here is an example which build an animation of a particle 
> moving according to a Brownian motion. 

A very similar option is to pass a variable to a metapost drawing. This is what 
I use:

https://adityam.github.io/context-blog/post/metapost-animation/

It only works when viewed in acrobat, you can just comment out the animation 
part and wrap it in \startTEXpage .. \stopTEXpage to get multi-page animation.

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

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


[NTG-context] Re: unwanted blank page

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

Hi Miguel,

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

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

Section blocks are intended for that.

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

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

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

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

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

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

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

Just some comments:

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

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

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

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

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

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


> \startfrontmatter[]

Empty brackets are not required here.

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

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

Again, just in case it might help,

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

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


[NTG-context] Problem with dataset not being populated

2023-11-14 Thread Bruce Horrocks
I produce a small magazine where the source files are organised into a product 
and component structure.

For each issue, I have a main file with \startproduct  and then, 
inside that, several \component[filename] statements, one per article. Each 
article starts in a standard way, including adding some information to a 
dataset.

At the end of the issue, the dataset information is retrieved to be printed and 
this is where strange things start to happen.

Sometimes the whole issue will compile without problems and the dataset 
information is retrieved perfectly. I can make edits to both the  product file 
and/or any of the component files and it all recompiles to produce a PDF each 
time.

But at othertimes, something "breaks" and the dataset can't be retrieved or 
isn't created. Everything else compiles fine but there is simply no data being 
retrieved from the dataset so nothing to print.

If I go back to the product file and comment out most of the components then it 
will (99% of the time) 'unbreak' itself and the dataset gets created. Once it 
has started working again I can then uncomment the rest of the components and 
it will recompile with all the dataset data present ... until the next time.

Has anyone seen anything like this?

I'm using Lua to retrieve the dataset info and, when it goes wrong, the dataset 
returned by Lua is a nil value. But the .tua file (not a .tuc) has the full 
dataset structure included.

I can't produce an MWE as I have no idea what to remove and include - it 
doesn't seem to matter which components are left or removed in order to fix the 
problem just as long as several ar removed. In other words, it's not one 
component file causing the problem. And sometimes commenting out just two 
components will fix it, othertimes I have to do most of them.

It could be a caching issue - when it goes wrong, reprocessing the product file 
causes much less to scroll past on the TeXShop log display. And when it is 
fixed, the first successful run has a much longer log, suggesting that more is 
being processed. 

So, unless someone else has seen the above and has the solution, the first 
question is: does LMTX cache the result of previous runs to save reprocessing 
if nothing has changed? If so, how can I force a full reprocess or remove those 
cache files?

I'm using TeXShop to edit and compile, but running "context 
product_filename.tex" from the command line makes no difference. Version is 
2023.09.26 18:19.

—
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] Adobe Source Typescript With Design Sizes

2023-10-31 Thread Vincent Hennebert
ium = "bold",
semibold   = "black",
bold   = "black",
black  = "black"
}
local i = string.gmatch(typescript, "[^-]*")
i() -- Skip "adobesource"
local explicitdesignsize
local nodesignsize
local weight
local token = i()
if designsizes[token] then
explicitdesignsize = designsizes[token]
weight = i()
elseif token == "nodesignsize" then
nodesignsize = true
weight = i()
else
weight = token
end
weight = weight or "regular"
if style ~= "mono" and weight == "medium" then
weight = "regular"
end
if bold then
weight = boldalternative[weight]
end
local name
if style == "serif" and not (explicitdesignsize or nodesignsize) then
name = "SourceSerif4"
else
name = prefixes[style]
end
if explicitdesignsize then
name = name .. explicitdesignsize
end
name = name .. "-"
if italic then
if weight == "regular" then
return name .. "It"
else
return name .. weight .. "It"
end
else
return name .. weight
end
end
local designsizes = {}
for _, v in ipairs({"ExtraLight", "ExtraLightIt", "Light", "LightIt", 
"Regular", "It",
"Semibold", "SemiboldIt", "Bold", "BoldIt", "Black", "BlackIt"}) do
designsizes["SourceSerif4-"..v] = {
["6.5pt"]   = "file:SourceSerif4Caption-"..v..".otf",
["9.5pt"]   = "file:SourceSerif4SmText-" ..v..".otf",
["12.5pt"]  = "file:SourceSerif4-"   ..v..".otf",
["16.5pt"]  = "file:SourceSerif4Subhead-"..v..".otf",
["16383pt"] = "file:SourceSerif4Display-"..v..".otf",
default = "file:SourceSerif4-"..v..".otf",
}
end
return {
name = "source-serif4",
version = "1.00",
comment = "Design sizes for Adobe Source Serif 4",
designsizes = designsizes,
}
-- vim:filetype=lua
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[NTG-context] problems with comments

2023-09-21 Thread Henning Hraban Ramm

Hi,
I wanted to use PDF comments to leave questions to the author/editor in 
the correction PDF. Unfortunately, the comment is always empty, 
regardless if \comment{} or \startcomment.


Also, the comment always inserts space into the text, I’d like to avoid 
that; the option "space=no" doesn’t help.


The "author" setting is shown, but as soon as I click on the comment, it 
changes to my user name. (Might depend on the viewer, but I get the same 
behavior from Adobe and Apple.) "title" and "subtitle" settings are 
handled differently by viewers, that doesn’t matter.


"location=inmargin": the symbol is at the edge of the text, but not in 
the margin.


Hraban


\setupinteraction[
  state=start,
]
\setupcomment[
  author=Don,
  location=inmargin,
]
\starttext
\samplefile{knuth}
\comment[author=Me]{Here’s a comment.}
\samplefile{knuth}

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

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___

[NTG-context] Re: list of modules: need changes/testing/response

2023-08-31 Thread luigi scarso
On Wed, 30 Aug 2023 at 20:18, Henning Hraban Ramm  wrote:

> Hi all, esp. module authors!
>
> I went through the list of modules on https://modules.contextgarden.net/
> (dl/) and the list that controls module installation for “--script
> install-modules".
>
> I removed all font-related modules from the list (not yet from the
> garden), since they’re probably all obsolete & outdated.
> Consider publishing typescripts in the wiki.
>
>
> The following modules don’t adhere to the necessary structure and need
> changes:
> * t-handlecsv (2023, Pablo)
> * metaducks (2021, Jairo)
> * presvoz (2023, Pablo)
> All of them have a name directory on top of the TDS (tex, doc).
> If you used a git checkout URL, please try again, for me it worked today.
>
>
> Several modules need testing if they still work and make sense.
> If their authors are present, I’d appreciate a comment if we should keep
> them. I’d like to delete at least everything older than 10 years.
>
> * grph-downsample.lua (2019) is known to fail in current LMTX
>(I hope for an integrated solution during the meeting.)
>t-degrade (2018) is AFAIK an older version of it – delete?
>
> * high (2018) and pret-c (2018) are syntax highlighters.
>Are they better than the vim and scite modules?
>Does it make sense to keep/update them?
>
> * t-gm (2015, Luigi)
> * t-gs (2015, Luigi)
>

gm should be included in lmtx / mkiv by means of luaffi.
I cannot maintain them, you can drop them  or wait for the expiration date
of 2025.

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

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___

[NTG-context] Re: list of modules: need changes/testing/response

2023-08-30 Thread Henning Hraban Ramm

Am 30.08.23 um 21:58 schrieb Peter Münster:

On Wed, Aug 30 2023, Henning Hraban Ramm wrote:


If their authors are present, I’d appreciate a comment if we should keep them.


I don't know. My modules are probably all outdated and don't work with
the latest ConTeXt version. On the one hand they are probably no more
useful, on the other hand there could be perhaps some future users
and/or developers, who would like to use them and send patches.
Perhaps a flag like "unmaintained" would do the trick?
But it's no problem for me, if you prefer to delete them.


Thank you!

First step is to don’t install outdated modules any more with "mtxrun 
--script install-modules --all".


They don’t hurt anyone at modules.contextgarden.net, I might just add a 
comment – you’re welcome to do it yourself, if you still know your password.


We will discuss at the meeting how to proceed, if we add more flags or 
whatever. I think we have enough fields & flags and should just use them 
better.


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

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___

[NTG-context] Re: list of modules: need changes/testing/response

2023-08-30 Thread Wolfgang Schuster

Henning Hraban Ramm schrieb am 30.08.2023 um 20:15:

Hi all, esp. module authors!

I went through the list of modules on 
https://modules.contextgarden.net/ (dl/) and the list that controls 
module installation for “--script install-modules".


I removed all font-related modules from the list (not yet from the 
garden), since they’re probably all obsolete & outdated.

Consider publishing typescripts in the wiki.


The following modules don’t adhere to the necessary structure and need 
changes:

* t-handlecsv (2023, Pablo)
* metaducks (2021, Jairo)
* presvoz (2023, Pablo)
All of them have a name directory on top of the TDS (tex, doc).
If you used a git checkout URL, please try again, for me it worked today.


Several modules need testing if they still work and make sense.
If their authors are present, I’d appreciate a comment if we should 
keep them. I’d like to delete at least everything older than 10 years.

[...]
* t-account (2009, Wolfgang)


I have an updated version I can put online but there is no need to keep it.


* t-algorithmic (2013, Wolfgang)


Can be removed.


* t-animation (2013, Wolfgang)


Should stay on the wiki.


* t-annotation (2013, Wolfgang)


Can be removed, the userdata environment is a good alternative for the 
module.



* t-fancybreak (2015, Wolfgang)


Should stay  on the wiki.


* t-fullpage (2017, Wolfgang)


Can be removed, the "tight" layout is a good alternative.


* t-title (2017, Wolfgang)


Can be removed.

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

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___

[NTG-context] Re: list of modules: need changes/testing/response

2023-08-30 Thread Marcus Vinicius Mesquita
Dear Hraban

I'm a regular user of  t-transliterator (2021, Philipp), so please
don't delete it

Marcus Vinicius

On Wed, Aug 30, 2023 at 3:16 PM Henning Hraban Ramm  wrote:
>
> Hi all, esp. module authors!
>
> I went through the list of modules on https://modules.contextgarden.net/
> (dl/) and the list that controls module installation for “--script
> install-modules".
>
> I removed all font-related modules from the list (not yet from the
> garden), since they’re probably all obsolete & outdated.
> Consider publishing typescripts in the wiki.
>
>
> The following modules don’t adhere to the necessary structure and need
> changes:
> * t-handlecsv (2023, Pablo)
> * metaducks (2021, Jairo)
> * presvoz (2023, Pablo)
> All of them have a name directory on top of the TDS (tex, doc).
> If you used a git checkout URL, please try again, for me it worked today.
>
>
> Several modules need testing if they still work and make sense.
> If their authors are present, I’d appreciate a comment if we should keep
> them. I’d like to delete at least everything older than 10 years.
>
> * grph-downsample.lua (2019) is known to fail in current LMTX
>(I hope for an integrated solution during the meeting.)
>t-degrade (2018) is AFAIK an older version of it – delete?
>
> * high (2018) and pret-c (2018) are syntax highlighters.
>Are they better than the vim and scite modules?
>Does it make sense to keep/update them?
>
> * karnaugh (2021, VicSanRoPe; probably OK, I just don’t understand it)
> * t-account (2009, Wolfgang)
> * t-algorithmic (2013, Wolfgang)
> * t-animation (2013, Wolfgang)
> * t-annotation (2013, Wolfgang)
> * t-bnf (2006, Now)
> * t-chromato (2008, Peter)
> * t-construction-plan (2008, Peter)
> * t-crossref (2016, Zenlima)
> * t-cyrillicnumbers (2016, Philipp)
> * t-fancybreak (2015, Wolfgang)
> * t-french (2011, Peter)
> * t-fullpage (2017, Wolfgang)
> * t-gantt (2012, Adam)
> * t-gm (2015, Luigi)
> * t-gnuplot (2013, Mojca)
> * t-greek (2013, Thomas – is this more than fonts?)
> * t-gs (2015, Luigi)
> * t-inifile (2008, Peter)
> * t-layout (2007, Patrick)
> * t-letterspace (2016, Philipp)
> * t-mathsets (2011, Aditya)
> * t-rst (2016, Philipp)
> * t-rsteps (2006, David)
> * t-simplebib (2016, Zenlima)
> * t-taspresent (2008, Thomas – AFAIK an old version of simpleslides)
> * t-title (2017, Wolfgang)
> * t-transliterator (2021, Philipp)
> * t-typearea (2008, Peter)
> * t-visualcounter (2018, Aditya, isn’t there a newer version?)
>
> Modules not mentioned are probably fine.
>
> Hraban
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
>
> maillist : ntg-context@ntg.nl / 
> https://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : https://contextgarden.net
> ___



-- 
Todas as coisas fatigam o corpo, salvo a música, que não fatiga nem o
corpo nem seus membros, por ser descanso da alma, primavera do
coração, distração do aflito, entretenimento do solitário, e viático
do viajante.

Kunnâsh al-Hâ'ik (Cancioneiro de al-Hâ'ik)
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___

[NTG-context] Re: list of modules: need changes/testing/response

2023-08-30 Thread Peter Münster
On Wed, Aug 30 2023, Henning Hraban Ramm wrote:

> If their authors are present, I’d appreciate a comment if we should keep them.

Hi Hraban,

I don't know. My modules are probably all outdated and don't work with
the latest ConTeXt version. On the one hand they are probably no more
useful, on the other hand there could be perhaps some future users
and/or developers, who would like to use them and send patches.
Perhaps a flag like "unmaintained" would do the trick?
But it's no problem for me, if you prefer to delete them.

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

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___

[NTG-context] list of modules: need changes/testing/response

2023-08-30 Thread Henning Hraban Ramm

Hi all, esp. module authors!

I went through the list of modules on https://modules.contextgarden.net/ 
(dl/) and the list that controls module installation for “--script 
install-modules".


I removed all font-related modules from the list (not yet from the 
garden), since they’re probably all obsolete & outdated.

Consider publishing typescripts in the wiki.


The following modules don’t adhere to the necessary structure and need 
changes:

* t-handlecsv (2023, Pablo)
* metaducks (2021, Jairo)
* presvoz (2023, Pablo)
All of them have a name directory on top of the TDS (tex, doc).
If you used a git checkout URL, please try again, for me it worked today.


Several modules need testing if they still work and make sense.
If their authors are present, I’d appreciate a comment if we should keep 
them. I’d like to delete at least everything older than 10 years.


* grph-downsample.lua (2019) is known to fail in current LMTX
  (I hope for an integrated solution during the meeting.)
  t-degrade (2018) is AFAIK an older version of it – delete?

* high (2018) and pret-c (2018) are syntax highlighters.
  Are they better than the vim and scite modules?
  Does it make sense to keep/update them?

* karnaugh (2021, VicSanRoPe; probably OK, I just don’t understand it)
* t-account (2009, Wolfgang)
* t-algorithmic (2013, Wolfgang)
* t-animation (2013, Wolfgang)
* t-annotation (2013, Wolfgang)
* t-bnf (2006, Now)
* t-chromato (2008, Peter)
* t-construction-plan (2008, Peter)
* t-crossref (2016, Zenlima)
* t-cyrillicnumbers (2016, Philipp)
* t-fancybreak (2015, Wolfgang)
* t-french (2011, Peter)
* t-fullpage (2017, Wolfgang)
* t-gantt (2012, Adam)
* t-gm (2015, Luigi)
* t-gnuplot (2013, Mojca)
* t-greek (2013, Thomas – is this more than fonts?)
* t-gs (2015, Luigi)
* t-inifile (2008, Peter)
* t-layout (2007, Patrick)
* t-letterspace (2016, Philipp)
* t-mathsets (2011, Aditya)
* t-rst (2016, Philipp)
* t-rsteps (2006, David)
* t-simplebib (2016, Zenlima)
* t-taspresent (2008, Thomas – AFAIK an old version of simpleslides)
* t-title (2017, Wolfgang)
* t-transliterator (2021, Philipp)
* t-typearea (2008, Peter)
* t-visualcounter (2018, Aditya, isn’t there a newer version?)

Modules not mentioned are probably fine.

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

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___

[NTG-context] Low res output possible?

2023-08-21 Thread Benjamin Buchmuller
Hi Julian,

I had the same question a couple of days ago and I found a thread on the 
mailing list, which I'm reposting here. Although this worked for me, I found 
downsampling of the pdf with gs more convenient.

Hope this helps,


Benjamin

%

if not modules then modules = { } end modules ['grph-downsample'] = {
  version   = 1.101,
  comment   = "companion to grph-inc.mkiv",
  author= "Peter Münster", -- adapted to LMTX by Hraban
  copyright = "PRAGMA ADE / ConTeXt Development Team",
  license   = "see context related readme files"
}

assert(not figures.getinfo2)

figures.getinfo2 = function(name, page) -- [ [NTG-context] Pdf info with 
Lua/Ctx API ]
 if type(name) == "string" then
   name = { name = name, page = page }
 end

 if name.name then
   local data = figures.push(name)
   local info = figures.identify()

   if info.status.status ~= 0 then
 figures.check() -- !Counts pages here!
   end

   figures.pop()

   return --data
  info
 end
end


local format = string.format
-- figures.cachepaths.path = "cache" -- should be setup-option
local function sample_down(oldname, newname, resolution)
  print("DOWNSAMPLE sample_down " .. oldname .. " to " .. newname)
  local request = figures.current().request
  local width = request.width
  local height = request.height
  if resolution == "" then -- or (not width and not height) then
print(format("DOWNSAMPLE Nothing to do: %s, %s, %s dpi, %s x %s px", 
oldname, newname, resolution, width, height))
return
  end
  local TEXpt = 65536
  local inch = 72.27

  -- MkIV:
  -- local image = img.scan{filename = oldname}

  -- LMTX:
  local image = figures.getinfo(oldname,1)
  image = image.status.private

  local xy = image.xsize / image.ysize
  if (not width and not height) then
-- no size requested? use default width
width = 300 * TEXpt
  end
  if not width then
height = height / TEXpt
width = height * xy
  end
  if not height then
width = width / TEXpt
height = width / xy
  end
  width = math.floor(width)
  height = math.floor(height)
  print(format("DOWNSAMPLE image size %dx%dpx. requested %dx%d?", image.xsize, 
image.ysize, width, height))
  local xsize = math.floor(resolution * width / inch)
  local ysize = math.floor(resolution * height / inch)
  print(format("DOWNSAMPLE size %d x %d to %d x %d", image.xsize, image.ysize, 
xsize, ysize))
  if xsize < image.xsize or ysize < image.ysize then
local s = format("gm convert -resize %dx%d -resample %dx%d \"%s\" \"%s\"",
 xsize, ysize, resolution, resolution, oldname, newname)
print("DOWNSAMPLE Conversion: " .. s)
os.execute(s)
  else
print(format("DOWNSAMPLE Nothing to do: %s, %s, %s dpi, %d x %d px", 
oldname, newname, resolution, width, height))
print(format("DOWNSAMPLE xsize = %d, ysize = %d", xsize, ysize))
  end
end

local formats = {"png", "jpg", "gif"}

for _, s in ipairs(formats) do
  figures.converters[s] = figures.converters[s] or {}
  figures.converters[s]["lowres." .. s] = sample_down
end

local function sample_down_pdf(oldname, newname, resolution)
print("DOWNSAMPLE sample_down " .. oldname .. " to " .. newname)

-- MkIV:
-- local image = img.scan{filename = oldname}

-- LMTX:
local image = figures.getinfo(oldname,1)
image = image.status.private

local s = format("gs \
-o \"%s\" \
-sDEVICE=pdfwrite \
-dDownsampleColorImages=true \
-dDownsampleGrayImages=true \
-dDownsampleMonoImages=true \
-dColorImageResolution=%s \
-dGrayImageResolution=%s \
-dMonoImageResolution=%s \
-dColorImageDownsampleThreshold=1.0 \
-dGrayImageDownsampleThreshold=1.0 \
-dMonoImageDownsampleThreshold=1.0 \
\"%s\"",
oldname, resolution, resolution, resolution, newname)
   print("DOWNSAMPLE Conversion: " .. s)
  os.execute(s)
end

figures.converters["pdf"]["lowres." .. "pdf"] = sample_down_pdf

%

\loadluafile[grph-downsample]
\doifmodeelse{print}{%
\def\Resolution{300}
}{%
\def\Resolution{96}
}%
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___

[NTG-context] Re: Applying \sc for smallcaps across styles

2023-08-19 Thread Hamid,Idris
Many thanks, Pablo. Yes, you are right. As mentioned in the reply to Wolfgang, 
will edit the wiki to reflect the legacy\deprecated status of \sc.

As for grep: Normally I use the nice "find in files" feature of Notepad++ -)

Am editing the wiki and have moved the original link to the more general title

https://wiki.contextgarden.net/Small_caps_across_styles_(bold,_italics,_etc.)

Best wishes
Idris

--
Professor Idris Samawi Hamid
Department of Philosophy
Colorado State University
Fort Collins, CO 80523
On Aug 19, 2023, 11:39 AM -0600, Pablo Rodriguez , wrote:
** Caution: EXTERNAL Sender **

On 8/19/23 16:03, Hamid,Idris wrote:
[...]
Yes, there is an easy workaround:

\definefontfeature[smallcaps][smcp=yes]

Hi Idris,

just a minor comment.

This is already defined in lines 96-99 of font-pre.mkxl:

\definefontfeature
[smallcaps]
[always]
[smcp=yes]

And also in lines 77-82 of font-pre.mkiv:

\definefontfeature
[smallcaps]
[always]
[smcp=yes,
tlig=yes,
trep=yes] % texligatures=yes,texquotes=yes

Just in case it helps, grep is a useful tool when applied to
tex/texmf-context/tex/context/base/mkxl (or
/tex/texmf-context/tex/context/base/mkiv, if needed).

Cheers

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

maillist : ntg-context@ntg.nl / 
https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.ntg.nl%2Fmailman%2Flistinfo%2Fntg-context&data=05%7C01%7CIdris.Hamid%40ColoState.EDU%7C4659e610ef78482aa0c608dba0db41c1%7Cafb58802ff7a4bb1ab21367ff2ecfc8b%7C0%7C0%7C638280635786855448%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=O65qArrxT44MNSYNEi%2B7OsejORDTDLkZ5R7TtQIWyL4%3D&reserved=0
webpage : 
https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.pragma-ade.nl%2F&data=05%7C01%7CIdris.Hamid%40ColoState.EDU%7C4659e610ef78482aa0c608dba0db41c1%7Cafb58802ff7a4bb1ab21367ff2ecfc8b%7C0%7C0%7C638280635787011721%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=UC%2Fx86X%2BW2LZXIE56pCTGSRUB7rtvzLnrXjK%2FAJ26PA%3D&reserved=0
 / 
https://nam10.safelinks.protection.outlook.com/?url=http%3A%2F%2Fcontext.aanhet.net%2F&data=05%7C01%7CIdris.Hamid%40ColoState.EDU%7C4659e610ef78482aa0c608dba0db41c1%7Cafb58802ff7a4bb1ab21367ff2ecfc8b%7C0%7C0%7C638280635787011721%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=hk3RuySs6VFwerUtJVUZPI9VRh3uy7Oi8%2FP7hCXusqI%3D&reserved=0
archive : 
https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbitbucket.org%2Fphg%2Fcontext-mirror%2Fcommits%2F&data=05%7C01%7CIdris.Hamid%40ColoState.EDU%7C4659e610ef78482aa0c608dba0db41c1%7Cafb58802ff7a4bb1ab21367ff2ecfc8b%7C0%7C0%7C638280635787011721%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=%2F76KLSob%2BFKJBe0GNDYQbkQrocVRIRBjxVFRV4pkVVc%3D&reserved=0
wiki : 
https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcontextgarden.net%2F&data=05%7C01%7CIdris.Hamid%40ColoState.EDU%7C4659e610ef78482aa0c608dba0db41c1%7Cafb58802ff7a4bb1ab21367ff2ecfc8b%7C0%7C0%7C638280635787011721%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=Vx7%2FNbHk0VmHlTYydydxk7NnB95LfrE%2BUaSsUJNnhsw%3D&reserved=0
___
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___

[NTG-context] Re: Applying \sc for smallcaps across styles

2023-08-19 Thread Pablo Rodriguez
On 8/19/23 16:03, Hamid,Idris wrote:
> [...]
> Yes, there is an easy workaround:
>
> \definefontfeature[smallcaps][smcp=yes]

Hi Idris,

just a minor comment.

This is already defined in lines 96-99 of font-pre.mkxl:

 \definefontfeature
   [smallcaps]
   [always]
   [smcp=yes]

And also in lines 77-82 of font-pre.mkiv:

 \definefontfeature
   [smallcaps]
   [always]
   [smcp=yes,
tlig=yes,
trep=yes] % texligatures=yes,texquotes=yes

Just in case it helps, grep is a useful tool when applied to
tex/texmf-context/tex/context/base/mkxl (or
/tex/texmf-context/tex/context/base/mkiv, if needed).

Cheers

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

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


[NTG-context] Re: An error which is not in .log file

2023-08-15 Thread Wolfgang Schuster
The error message is about line 276 in one of your included files but we 
need the content of the faulty file.
To get the faulty file comment your input line until the error 
disappears, ensure to delete the tuc file (context --purge) because 
sometimes index/register entries are the problem.


There is also something wrong with the structure of your document when 
need \page[yes] after each file.


Wolfgang

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

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


[NTG-context] Re: Very strange error:

2023-08-15 Thread Wolfgang Schuster

Xavier B. schrieb am 14.08.2023 um 23:24:

Thanks, Rik, for the comment. You're right.
Note that I've never been aware of such requirement because always in MKIV I 
use \head without \par.


You have empty lines in your document which have the same effect as \par.

Commands (e.g. descriptions) which end with the end of the paragraph had 
always been problematic and it's better to use the alternative environment.



@all, please comment it out this behaviour in somewhere. The weak point of 
context is documentation: wiki is too bit not updated and reference manual are 
outdated. As a simple user, it could cause nightmares, overall in transition to 
one major version to another.


All of the changes I mentioned are things which have been changed/added 
a long time ago and you're just a decade too late ;)


Wolfgang

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

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


[NTG-context] Re: An error which is not in .log file

2023-08-15 Thread Mikael Sundqvist
Hi,

I suggest to comment out/add \stoptext until the error go,and that way
narrow it down. The usual way...

/Mikael

Den tis 15 aug. 2023 19:50Xavier B.  skrev:

> I don't have line 276. This is what I have (169 lines):
>
> % Fitxer ConTeXt MIV
>
> % carregam les opcions d'entorn
> \environment ng-entorn-minimal.conTeXt
> \environment ng-entorn-taules.conTeXt
> \environment ng-entorn-teoria.conTeXt
> \environment ng-entorn-colors.conTeXt
>
> % bibliografia
> \usebtxdataset[default][ng-bibliografia.bib]
> \setupbtx[dataset=default]
> \usebtxdefinitions[aps]
>
> % el text
>
> \starttext
>
> \startfrontmatter
> \input ng-pre-portada.conTeXt
> \input ng-pre-llicencia.conTeXt
> \input ng-pre-informacio-document.conTeXt
> \completecontent
> \stopfrontmatter
>
>
> \startbodymatter
>
> \startpart[title=Aritmètica]
>
> \input ng-aritmetica-nombres-naturals-operacions.conTeXt
> \page[yes]
> \input ng-aritmetica-divisibilitat.conTeXt
> \page[yes]
> \input ng-aritmetica-sencers-operacions.conTeXt
> \page[yes]
> \input ng-aritmetica-fraccions-operacions.conTeXt
> \page[yes]
> \input ng-aritmetica-fraccions-simplificacio-i-etc.conTeXt
> \page[yes]
> \input ng-aritmetica-percentatges.conTeXt
> \page[yes]
> \input ng-aritmetica-problemes-nombres-sencers.conTeXt
> \page[yes]
> \input ng-aritmetica-problemes-nombres-fraccions.conTeXt
> \page[yes]
> \input ng-aritmetica-arrodoniment-i-truncament.conTeXt
> \page[yes]
> \input ng-aritmetica-representacio-sobre-la-recta-numerica.conTeXt
> \page[yes]
> \input ng-aritmetica-sequencies.conTeXt
> \page[yes]
> \input ng-aritmetica-potencies-exponent-sencer-calcul.conTeXt
> \page[yes]
> \input ng-aritmetica-propietats-de-les-potencies.conTeXt
> \page[yes]
> \input ng-aritmetica-notacio-cientifica-calcul.conTeXt
> \page[yes]
> \input ng-aritmetica-notacio-cientifica-problemes.conTeXt
> \stoppart
>
> \startpart[title=Relacions entre variables]
>
> \input ng-relacions-variables-proporcionalitat-directa.conTeXt
> \page[yes]
> \input ng-relacions-variables-percentatges-problemes.conTeXt
> \page[yes]
> \input ng-relacions-variables-repartiments-proporcionals.conTeXt
> \page[yes]
> \input ng-relacions-variables-proporcionalitat-inversa.conTeXt
> \page[yes]
> \input ng-relacions-variables-conversio-unitats.conTeXt
> \page[yes]
> \input ng-relacions-variables-funcio-lineal-problemes.conTeXt
> \page[yes]
> \input ng-relacions-variables-funcio-afi-problemes.conTeXt
> \page[yes]
> \input ng-relacions-variables-funcio-quadratica-problemes.conTeXt
> \page[yes]
> \input ng-relacions-variables-funcio-exponencial-problemes.conTeXt
> \stoppart
>
> \startpart[title=Àlgebra]
> \input ng-algebra-equacions-primer-grau.conTeXt
> \page[yes]
> \input ng-algebra-equacions-segon-grau.conTeXt
> \page[yes]
> \input ng-algebra-equacions-segon-grau-problemes-geometrics.conTeXt
> \page[yes]
> \input ng-algebra-sistemes-de-equacions-lineals-2-per-2.conTeXt
> \page[yes]
> \input
> ng-algebra-sistemes-de-equacions-lineals-2-per-2-problemes-comparativa.conTeXt
> \stoppart
>
> \startpart[title=Geometria]
>
> \input ng-geometria-teorema-de-Pitagores.conTeXt
> \page[yes]
> \input ng-geometria-teorema-de-Pitagores-problemes.conTeXt
> \page[yes]
> \input ng-proporcionalitat-geometrica-escala-grafica.conTeXt
> \page[yes]
> \input ng-proporcionalitat-geometrica-escala-numerica.conTeXt
> \page[yes]
> \input ng-proporcionalitat-geometrica-figures-semblants.conTeXt
> \page[yes]
> \input ng-proporcionalitat-geometrica-homotecies.conTeXt
> \page[yes]
> \input ng-proporcionalitat-geometrica-teorema-de-tales.conTeXt
> \stoppart
>
> \startpart[title=Estadística]
> \input ng-estadistica-tipus-de-variables.conTeXt
> \page[yes]
> \input ng-estadistica.conTeXt
> \page[yes]
> \input ng-estadistica-parametres-dispersio.conTeXt
> \page[yes]
> \input ng-estadistica-grafics-i-diagrames.conTeXt
> \stoppart
>
> \startpart[title=Probabilitat]
> \input ng-probabilitat-experiments-simples.conTeXt
> \page[yes]
> \input ng-probabilitat-experiments-compostos.conTeXt
> \page[yes]
> \input ng-probabilitat-probabilitat-condicionada.conTeXt
> \page[yes]
> \input ng-probabilitat-algebra-de-successos.conTeXt
> \stoppart
>
> \stopbodymatter
>
>
> \startappendices
>
> \startpart[title=Apunts teòrics]
> \input ng-teoria-proporcionalitat-numerica.conTeXt
> \page[yes]
> \input ng-teoria-equacions-de-segon-grau.conTeXt
> \page[yes]
> \input ng-teoria-funcio-quadratica.conTeXt
> \page[yes]
> \input ng-teoria-teorema-de-Pitagores.conTeXt
> \page[yes]
> \input ng-teoria-apendix-figures-usuals-arees-volums.co

[NTG-context] Re: Very strange error:

2023-08-14 Thread Hans Hagen via ntg-context

On 8/14/2023 11:24 PM, Xavier B. wrote:

Thanks, Rik, for the comment. You're right.
Note that I've never been aware of such requirement because always in MKIV I 
use \head without \par.

@all, please comment it out this behaviour in somewhere. The weak point of 
context is documentation: wiki is too bit not updated and reference manual are 
outdated. As a simple user, it could cause nightmares, overall in transition to 
one major version to another.

the only things that really changed are

- input encodings, still supported but we assume utf8
- font encodings, font features etc that make for different specifications
- some fuzzy argument handling that made sense 25 years ago but not today
- some low level fatures that were never to be used at the user level
- improvements to mechanism that are now possible
- more was added than removed (and believe me: i'd like to remove some)
- if something fails also keep in mind that maybe it was never supossed 
to work but tex is just rather tolerant


take for instance math: we adapt to possibilities, unicode developments 
etc. but overall interfaces are kept (we eventually dropped $$ mkiv 
because it is hard to get spacing right otherwise, een with some nasty 
tricks)


\head is one of these "best use arguments" and les sknown is that we 
also dropped par delimited \section and such (the head one currently can 
be enabled with \autoparagraphmode4)


the main drive is 'better rendering' and 'less complicated coding'

you use for for instance \bigskip which is never going to guarantee good 
spacing as it doesn't cooperate with \blank and friends (it is sort of 
dangerous to mix what oen sees outside context with context commands 
like like loading that lua module, which actually is in none of the 
manuals)


if one wants to get an idea of coding context documents the 'source sof 
manuals' can show some


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://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


[NTG-context] Re: Very strange error:

2023-08-14 Thread Xavier B.
Thanks, Rik, for the comment. You're right.
Note that I've never been aware of such requirement because always in MKIV I 
use \head without \par.

@all, please comment it out this behaviour in somewhere. The weak point of 
context is documentation: wiki is too bit not updated and reference manual are 
outdated. As a simple user, it could cause nightmares, overall in transition to 
one major version to another.

Thanks another time,
Xavier

On Mon, 14 Aug 2023 12:42:59 -0400
Rik Kabel  ha escrit:

> 
> On 8/14/2023 11:41 AM, Xavier B. wrote:
> > After I run context (LMTX version) to my document (attached) I get this 
> > error:
> >
> > tex error   > tex error on line 540 in file ./dev.tex: The file ended 
> > when scanning an argument.
> >
> > I don't know how to start...
> > Can anyone help me?
> >
> > Thanks,
> > Xavier
> >
> > PS: I receive this error after upgrading to MKIV to LMTX. Before with MKIV 
> > I get no errors.
> >
> I suspect that LMTX is a bit more strict about parsing. You have omitted 
> the required \par for each \head.
> 
> -- 
> Rik
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] TiKz with LMTX

2023-06-12 Thread Hans Hagen via ntg-context

On 6/12/2023 6:49 PM, Carlos via ntg-context wrote:

On Thu, Jun 08, 2023 at 11:57:36PM -0400, Aditya Mahajan via ntg-context wrote:

On Thu, 8 Jun 2023, Jigé via ntg-context wrote:


  Thanks a lot Aditya.

The very simple TikZ example with the cross works.
The more complex example with the trigonometric circle from the pgf manual,
quoted in https://wiki.contextgarden.net/TikZ , does not compile
unless you also comment out
  or find(n,"pdftex")
in line 181 of the mtx-install-modules.lua file
before doing mtxrun --script install-modules --install tikz
but I could guess that from a:
  Driver file ``pgfsys-pdftex.def'' not found..
message


Ah so tikz uses both drivers.

@Hans, so the validate function should be:

local function validate(n)
 return not (
find(n,"latex")


what's the point of latex there?


  -- or find(n,"lualatex")


or for that matter this one lualatex too


 or find(n,"plain")
 or find(n,"optex")
  -- or find(n,"luatex")
  -- or find(n,"pdftex")
 )
end


just getting rid of files we don't need

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://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] TiKz with LMTX

2023-06-12 Thread Carlos via ntg-context
On Thu, Jun 08, 2023 at 11:57:36PM -0400, Aditya Mahajan via ntg-context wrote:
> On Thu, 8 Jun 2023, Jigé via ntg-context wrote:
> 
> >  Thanks a lot Aditya.
> > 
> > The very simple TikZ example with the cross works.
> > The more complex example with the trigonometric circle from the pgf manual,
> > quoted in https://wiki.contextgarden.net/TikZ , does not compile
> > unless you also comment out
> >  or find(n,"pdftex")
> > in line 181 of the mtx-install-modules.lua file
> > before doing mtxrun --script install-modules --install tikz
> > but I could guess that from a:
> >  Driver file ``pgfsys-pdftex.def'' not found..
> > message
> 
> Ah so tikz uses both drivers. 
> 
> @Hans, so the validate function should be:
> 
> local function validate(n)
> return not (
>find(n,"latex")

what's the point of latex there? 

>  -- or find(n,"lualatex")

or for that matter this one lualatex too 

> or find(n,"plain")
> or find(n,"optex")
>  -- or find(n,"luatex")
>  -- or find(n,"pdftex")
> )
> end
> 
> 
> Aditya

Through rsync only and by default without mtx-install-modules script,
obviously, it'll simply fall back loading by pgfsys-pdftex

so you'd be better off by just having 

local function validate(n)
return not (
   find(n,"latex")
or find(n,"lualatex")
or find(n,"plain")
or find(n,"optex")
--  or find(n,"luatex")
or find(n,"pdftex")
)
end

instead.  

Also, forget about the curl --ssl or whatever you mentioned earlier.


> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / 
> https://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : https://contextgarden.net
> ___


-- 
Brian Kernighan has an automobile which he helped design.
Unlike most automobiles, it has neither speedometer, nor gas gauge, nor
any of the numerous idiot lights which plague the modern driver.
Rather, if the driver makes any mistake, a giant "?" lights up in the
center of the dashboard.  "The experienced driver", he says, "will
usually know what's wrong."

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

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] TiKz with LMTX

2023-06-09 Thread Aditya Mahajan via ntg-context
On Fri, 9 Jun 2023, Hans Hagen via ntg-context wrote:

> On 6/9/2023 5:57 AM, Aditya Mahajan via ntg-context wrote:
> > On Thu, 8 Jun 2023, Jigé via ntg-context wrote:
> > 
> >>   Thanks a lot Aditya.
> >>
> >> The very simple TikZ example with the cross works.
> >> The more complex example with the trigonometric circle from the pgf
> >> manual,
> >> quoted in https://wiki.contextgarden.net/TikZ , does not compile
> >> unless you also comment out
> >>   or find(n,"pdftex")
> >> in line 181 of the mtx-install-modules.lua file
> >> before doing mtxrun --script install-modules --install tikz
> >> but I could guess that from a:
> >>   Driver file ``pgfsys-pdftex.def'' not found..
> >> message
> > 
> > Ah so tikz uses both drivers.
> > 
> > @Hans, so the validate function should be:
> > 
> > local function validate(n)
> >  return not (
> > find(n,"latex")
> >   -- or find(n,"lualatex")
> >  or find(n,"plain")
> >  or find(n,"optex")
> >   -- or find(n,"luatex")
> >   -- or find(n,"pdftex")
> >  )
> > end
> so an alternative is to ignore deleting those two files
> 
> what is in lualatex that we need? can hardly be something generic

pgf/tikz doesn't have anything with lualatex in the name. The only files that 
match luatex/pdftex are these def files. 

> (it being pretty big makes me wonder if we should have texmf-tikz for it as i
> don't want to polute the modules tree too much - it gets hard to check other
> modules for instance when i want to see if some change has impact)

If it makes things easier to manage, we can definitely do that. We already have 
7 trees, one more isn't going to make any difference :-)

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

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] TiKz with LMTX

2023-06-08 Thread Hans Hagen via ntg-context

On 6/9/2023 5:57 AM, Aditya Mahajan via ntg-context wrote:

On Thu, 8 Jun 2023, Jigé via ntg-context wrote:


  Thanks a lot Aditya.

The very simple TikZ example with the cross works.
The more complex example with the trigonometric circle from the pgf manual,
quoted in https://wiki.contextgarden.net/TikZ , does not compile
unless you also comment out
  or find(n,"pdftex")
in line 181 of the mtx-install-modules.lua file
before doing mtxrun --script install-modules --install tikz
but I could guess that from a:
  Driver file ``pgfsys-pdftex.def'' not found..
message


Ah so tikz uses both drivers.

@Hans, so the validate function should be:

local function validate(n)
 return not (
find(n,"latex")
  -- or find(n,"lualatex")
 or find(n,"plain")
 or find(n,"optex")
  -- or find(n,"luatex")
  -- or find(n,"pdftex")
 )
end

so an alternative is to ignore deleting those two files

what is in lualatex that we need? can hardly be something generic

(it being pretty big makes me wonder if we should have texmf-tikz for it 
as i don't want to polute the modules tree too much - it gets hard to 
check other modules for instance when i want to see if some change has 
impact)


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://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] TiKz with LMTX

2023-06-08 Thread Aditya Mahajan via ntg-context
On Thu, 8 Jun 2023, Jigé via ntg-context wrote:

>  Thanks a lot Aditya.
> 
> The very simple TikZ example with the cross works.
> The more complex example with the trigonometric circle from the pgf manual,
> quoted in https://wiki.contextgarden.net/TikZ , does not compile
> unless you also comment out
>  or find(n,"pdftex")
> in line 181 of the mtx-install-modules.lua file
> before doing mtxrun --script install-modules --install tikz
> but I could guess that from a:
>  Driver file ``pgfsys-pdftex.def'' not found..
> message

Ah so tikz uses both drivers. 

@Hans, so the validate function should be:

local function validate(n)
return not (
   find(n,"latex")
 -- or find(n,"lualatex")
or find(n,"plain")
or find(n,"optex")
 -- or find(n,"luatex")
 -- or find(n,"pdftex")
)
end


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

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


  1   2   3   4   5   6   7   8   9   10   >