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

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

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

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

Alan



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

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



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

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

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


[NTG-context] Re: FreeBSD 13.2

2024-02-28 Thread Alan Braslau via ntg-context
On Sun, 25 Feb 2024 14:23:10 +0100
Henning Hraban Ramm  wrote:

> Am 25.02.24 um 13:12 schrieb Hans Hagen:
> > We could add a flag to the installer that doesn't update the
> > binaries but intead (advices) to build the bins but it assumes
> > Cmake and gcc to be installed (we could cheat and use an existing
> > cmake made make file).  
> 
> Yes please! A platform-independent download would be great.

However, we should not assume gcc: it could be clang.

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

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


[NTG-context] Re: Status of Asymptote

2023-12-30 Thread Alan Braslau via ntg-context

On 30/12/23 30/12/23, 12:04, Shiv Shankar Dayal wrote:


It would be nice to either support Metapost 3D


Very simple MP pseudo 3D is included in
tex/texmf-context/metapost/context/base/mpiv/mp-tres.mpiv

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

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


[NTG-context] Re: APA 7 and https

2023-12-16 Thread Alan Braslau via ntg-context
A "better" solution is to put

doi = {https://doi.org/__doi__},

in your bibtex database

but I would actually use

url = {https://doi.org/__doi__},

Not all editors want the complete url for the doi, but some do.
The current scheme lets the user define url= and doi= as they wish (and
even both) and does not impose a particular format.

Alan



On Fri, 15 Dec 2023 22:07:25 -
rauricast...@gmail.com wrote:

> Hi
> 
> I found a solution to reach APA7 list and links.
> 
> Using
> $PATH/ConTeXtPATH/tex/texmf-context/tex/context/base/mkiv/publ-imp-apa.mkvi
> in line 1306-1312,  where \starttexdefinition mutable protected
> btx:apa:doi \texdefinition {btx:format:goto} {
> url(https://doi.org/\btxflush{doi})
> } {
>\hyphenatedurl{https://\btxflush{doi}}
> }
> \stoptexdefinition
> 
> Change:
> url(http://dx.doi.org/\btxflush{doi}) to
> url(https://doi.org/\btxflush{doi}) and 
> \hyphenatedurl{doi:\btxflush{doi}} to
> \hyphenatedurl{https://\btxflush{doi}}. 
> 
> With this two changes the correct format in the list of publications
> is shown according apa7 and as well https links instead of http links
> will be generated, which is also needed in apa7. Not all apa7
> definitions are yet reach with this changes, but its a small step
> towards.
> 
> Merry Christmas.
> 
> Oliver
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : 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 Alan Braslau via ntg-context
On Wed, 13 Dec 2023 18:55:34 +0100
Wolfgang Schuster  wrote:

> This was added a few years ago (AFAIR to provide something similar to 
> the TikZ color command).

You actually mean similar to the MetaPost color command.

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

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


[NTG-context] Re: Chemistry in LMTX

2023-10-02 Thread Alan Braslau via ntg-context
On Sun, 1 Oct 2023 10:49:34 +0200
Henning Hraban Ramm  wrote:

> >> chem-str.lua seems to be an updated version by Alan & Hans
> >>
> >> Did I miss something?  
> > 
> > work in progress ... i'm working on that (part of the math upgrade)
> > so best wait till we're stable  
> 
> Ok, thank you

The current code is not very broken - I just used it extensively in a
book that was published. There are many quarks in its conception,
dating from the original MKII model.

Alan
___
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: bibliography questions

2023-10-02 Thread Alan Braslau via ntg-context
On Mon, 2 Oct 2023 13:13:52 +0200
Henning Hraban Ramm  wrote:

> Consider:
> @Book {rattenhka,
> author = "Bettina von Arnim and Gisela von Arnim",
> title = "Das Leben der Hochgräfin Gritta von Rattenzuhausbeiuns",
> …
> }
> 
> The authors are usually given as “Bettina and Gisela von Arnim”
> (mother and daughter; similar “Jacob and Wilhelm Grimm” as brothers
> or “Bettina and Achim von Arnim” as a couple) – is there a good
> solution for related authors?

Multiple authors should be treated as multiple authors. That they are
related is not and should not be a consideration in citing works. At
least this is the practice that I know of for academic texts.

You can cheat and try to define one author with a combined first name,
like
author={Eames, Ray & Earl},
but I don't know how that parses as I have never tried it; "and" is a
reserved token used to define multiple authors. I wouldn't do it as I
can think of many examples (Bjaer & Bjaer) where we give both credit,
individually.

Alan
___
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: Bibliography cite

2023-08-04 Thread Alan Braslau via ntg-context

Indeed, one does not need the comma, it is programmed in the style.
You can see this in the manual, on p. 43 documenting citations.

The style is setup to put the righttext inside the parenthesis for 
alternative=authoryear and outside of the year parenthesis for 
alternative=authoryears.


I looked carefully in the APA Style Guide and did not find any 
suggestion that one should use Knuth (1984, p. 3). The variant (Knuth, 
1984, p. 3) is documented.


You can make the following changes (untested)
\setupbtx [apa:cite:author:years] [right=]
\setupbtx [apa:cite:authoryears] [right={)}]
to get the other behavior.

--
Alan


On 01/08/23 01/08/23, 23:26, Robert via ntg-context wrote:

Thank you, Alan for the suggestion.

I tried as you said: \cite[alternative=authoryears,righttext={{, p. 
3}}][Knuth1984].


Yet the result is this: Knuth (1984), , p. 3

If I leave out the first comma, the result is: Knuth (1984), p. 3

Righttext probably refers to the text outside the parentheses.

Thank you in advance,

Robert.


Op 1 aug. 2023, om 22:42 heeft Alan Braslau  
het volgende geschreven:


Using the APA specification:

\usebtxdefinitions
   [apa]


you can then

\cite[alternative=authoryears,righttext={{, p.\nbsp 12}}] [Knuth1984]
mentions ….


The tricky part concerning righttext= is the double {{ }}, needed 
because the text contains a comma. The reason for this is simple, as 
righttext is a comma-separated list, where each entry corresponds to a 
cited reference, as in \cite[righttext={a,b}] [ref1,ref2]

so a is associated with ref1 and b is associated with ref2.

Alan



On 01/08/23 01/08/23, 15:37, Robert via ntg-context wrote:

Dear List members,
For my academic work with context I need the following cite according 
to Apa standards:

Knuth (1984, p. 12) mentions ….
The matrix is this:
AUTHOR (, p.~n).
I reckon this can somehow be accomplished with the \setupbtx command.
(Standard these and other variants are possible: AUTHOR () and 
AUTHOR , p. n.)
I tried different setups: \setupbtx[apa:cite:authoryear], and 
\setupbtx[apa:cite:authoryears], I played with the lefttext, 
righttext and other options, but none of them give the desired result.

Thank you for any suggestions.
Regards,
Robert
@article{Knuth1984,
author={Knuth, Donald E.},
title={Literate Programming},
journal={The Computer Journal}, Volume={27}, Number={2}, year={1984},
Pages={97--111},
}



___
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: Bibliography cite

2023-08-01 Thread Alan Braslau via ntg-context

Using the APA specification:

\usebtxdefinitions
[apa]


you can then

\cite[alternative=authoryears,righttext={{, p.\nbsp 12}}] [Knuth1984]
mentions ….


The tricky part concerning righttext= is the double {{ }}, needed 
because the text contains a comma. The reason for this is simple, as 
righttext is a comma-separated list, where each entry corresponds to a 
cited reference, as in \cite[righttext={a,b}] [ref1,ref2]

so a is associated with ref1 and b is associated with ref2.

Alan



On 01/08/23 01/08/23, 15:37, Robert via ntg-context wrote:

Dear List members,

For my academic work with context I need the following cite according to Apa 
standards:

Knuth (1984, p. 12) mentions ….

The matrix is this:

AUTHOR (, p.~n).

I reckon this can somehow be accomplished with the \setupbtx command.

(Standard these and other variants are possible: AUTHOR () and AUTHOR , 
p. n.)

I tried different setups: \setupbtx[apa:cite:authoryear], and 
\setupbtx[apa:cite:authoryears], I played with the lefttext, righttext and 
other options, but none of them give the desired result.

Thank you for any suggestions.

Regards,

Robert



@article{Knuth1984,
author={Knuth, Donald E.},
title={Literate Programming},
journal={The Computer Journal}, Volume={27}, Number={2}, year={1984},
Pages={97--111},
}

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

2023-07-21 Thread Alan Braslau via ntg-context

Thomas,

I actually set OSFONTDIR=.
which seems to be a sane default. I store specific font files with 
projects (along with a copy of the ConTeXt distribution used to typeset 
the project). This way, I can come back to a project later and make 
minor corrections without running into surprises or the need to update 
my sources.


Alan



On 21/07/23 21/07/23, 16:43, Alan Braslau wrote:

On 19/07/23 19/07/23, 22:51, Hans Hagen via ntg-context wrote:
is looking for system fonts by default the new standard? Is it a good 
idea?


Thank you and all best
it is a tex live thing; you can just set that variable to nothing, in 
the environment or in a local file like in


../tex/texmf-local/web2c/texmfcnf.lua

normally texmf-fonts is where i put fonts and that one should win


A TeX-live thing can be the default for TeX live.

I agree with Thomas, not explicitly including the system fonts by 
default is preferable. Maybe the standalone installation still does this 
- I hope so - but have not checked. If it defauts to including the 
system fonts, I would suggest that this is not necessarily a good idea.


Alan



--
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://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: OSFONTDIR

2023-07-21 Thread Alan Braslau via ntg-context

On 19/07/23 19/07/23, 22:51, Hans Hagen via ntg-context wrote:
is looking for system fonts by default the new standard? Is it a good 
idea?


Thank you and all best
it is a tex live thing; you can just set that variable to nothing, in 
the environment or in a local file like in


../tex/texmf-local/web2c/texmfcnf.lua

normally texmf-fonts is where i put fonts and that one should win


A TeX-live thing can be the default for TeX live.

I agree with Thomas, not explicitly including the system fonts by 
default is preferable. Maybe the standalone installation still does this 
- I hope so - but have not checked. If it defauts to including the 
system fonts, I would suggest that this is not necessarily a good idea.


Alan
___
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: access image properties in Lua

2023-07-17 Thread Alan Braslau via ntg-context

On 17/07/23 17/07/23, 18:20, Henning Hraban Ramm wrote:

Bonus question: how also to handle the case of
\startMPcode
draw figure "MyFigure" xsized TextWidth ;
...
\stopMPcode


Is MyFigure a pixel image?
You could use \externalfigure within MP code.


The MP operator figure calls \externalfigure.
However, the resolution downsampler hooked into externalfigure as you 
suggest would not give the desired resolutions once resized in MP.


A solution might be to use
draw rawtextext("\externalfigure[MyFigure][width=\textwidth") ;
which is OK for this simplified example but would not work when more 
sophisticated MetaPost transformations might be needed.




Along the lines of the conversion downsampler, a resolution reporter and 
manual resampling could be more efficient than reconverting the bitmap 
image at every run, of which there can be many.


--
Alan
___
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: access image properties in Lua

2023-07-17 Thread Alan Braslau via ntg-context

On 13/07/23 13/07/23, 09:19, Hans Hagen wrote:

On 7/11/2023 2:22 PM, Henning Hraban Ramm wrote:
What’s the current approved way to get image properties within a Lua 
function?


very old:
local pic = figures.getinfo(figures.current().status.fullname)

used to work in 2019:
local pic = img.scan{filename = figures.current().status.fullname}

if I understand this right, "img" isn’t valid anymore:
"""
token call, execute: grph-imagelib.lua:37: attempt to index a nil 
value (global 'img')

"""

I’d like to know the pixel size and if possible also the scaled target 
size of an image; either the "current" one or by name.

\ctxlua{inspect(figures.getinfo("t:/sources/mill.png").used)}

\ctxlua{inspect(figures.getinfo("t:/sources/mill.png").status)}

etc .. no more faking the img lib

Hans


Hraban, Hans, and mailing list.

This is interesting. I would find it useful to be able to report these 
properties though a tracker - should be fairly easy if not already 
available.


One works with images having a certain resolution, whatever that may be. 
We also might have a target resolution, say 300 dpi or perhaps better 
for printing. As the images are typically resized when used, the 
resulting resolutions might be anything. Optimizing the resolutions of 
the source images can result in optimal PDF sizes, i.e. not too high nor 
too low resolution.


I can even imagine an automated workflow where high-resolution, say 2400 
dpi or even greater bitmap images, are supplied and the included bitmap 
could be "resampled" resulting in the inclusion of a targeted 
resolution. However, the reporting of the included, likely resized image 
resolutions then used to adjust or resample the source files externally 
and manually case-by-case would be sufficient.


Any suggestions on how to hook-in such reporting?

Bonus question: how also to handle the case of
\startMPcode
draw figure "MyFigure" xsized TextWidth ;
...
\stopMPcode

--
Alan
___
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: Title pages makeup extra blank pages

2023-07-06 Thread Alan Braslau via ntg-context

On 06/07/23 06/07/23, 17:07, Wolfgang Schuster wrote:


Add "doublesided=no" to your makeup settings.

Wolfgang


Thank you.
I have doublesided=no in the makeup, but this makeup is not used by 
\startpagefigure.


The problem is with \startpagefigure that is outside of makeup, that is 
it is using the standard makeup (with doublesided=yes). Is this a bug, 
that is should \startpagefigure use the makeup of the included PDF 
document and ignore the local makeup? Or is this, rather, what is 
intended, requiring one to wrap the included pages in an explicit makeup 
(as I am now doing)?


Alan
___
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: MPcode inserts page

2023-07-06 Thread Alan Braslau via ntg-context

On 06/07/23 06/07/23, 11:23, Henning Hraban Ramm wrote:
Hi, if I use \startMPcode to declare variables etc. that I need in 
several MP graphics, it always inserts an empty page. How can I avoid that?
(Actually, I load an external mp file, and for random value reasons I 
must load it only once. But the MWE already shows the problem.)



"""
\startMPcode
numeric something;
something := 1;
\stopMPcode

\starttext
\chapter{Something}

Anything.

\stoptext
"""


\startMPinitializations % used by ALL MP instances
% also called repeatedly
\stopMPinitializations

\startMPdefinitions
\stopMPdefinitions

This is what you want.

--
Alan

___
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: Title pages makeup extra blank pages

2023-07-06 Thread Alan Braslau via ntg-context

On 06/07/23 06/07/23, 10:14, Henning Hraban Ramm wrote:

Am 06.07.23 um 09:34 schrieb Alan Braslau via ntg-context:
inserts a "blank" page (with header/footer) between the two Coverpages 
and a second "blank" page after the backside title page.


I don’t know if it helps, but did you set
\setupsectionblock[frontpart][page=no]
?


I had \setupsectionblock[frontpart][page=]
and setting page=no does not change anything.

I get the same behavior in my Volume 2 product, which does not have any 
\frontmatter.


I solved the problem by rather using:

 \definemakeup[cover][page][page=no,doublesided=no]
 \definelayout[cover][page]
 \startmakeup [cover]
   \filterpages[Coverpages][1]
 \stoppagemakeup
 \startmakeup [cover]
   \filterpages[Coverpages][2]
 \stoppagemakeup

Thank you for your suggestion!


Maybe it’s also a problem of \startdocument – I always get a first empty 
page and don’t understand why.


One gets an empty first page if there is *any* text content anywhere in 
the setups or environment files before the \startdocument.


--
Alan
___
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] Title pages makeup extra blank pages

2023-07-06 Thread Alan Braslau via ntg-context

Hello,

Trying to use:

\startdocument

\startpagefigure[Coverpages.pdf][page=1]\stoppagefigure
\startpagefigure[Coverpages.pdf][page=2]\stoppagefigure

% before

\startmakeup [titlepage]
front
\stopmakeup

\startmakeup [titlepage]
back
\stopmakeup

\startfrontmatter
...
\stopfrontmatter

...

\stopdocument


inserts a "blank" page (with header/footer) between the two Coverpages 
and a second "blank" page after the backside title page.


Not including the two \startpagefigure lines eliminates the blank page 
following the back side title page (and the other one between the two 
Coverpages, of course).



This is not a MWE as it occurs in a complicated project but not in mwe 
snippets.


I suspect that this artifact is somehow related to the page={...} 
settings later in the document. How can I turn OFF all automatic page 
generation settings for the very beginning of my document? Any ideas?

(Title page makeup has always been somewhat of a mystery to me.)

Alan
___
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: \showmakeup adds unwanted space despite accurate readings; \qquad mandatory before \TeX\

2023-07-05 Thread Alan Braslau via ntg-context

On 05/07/23 05/07/23, 17:53, Carlos wrote:

(sorry for duplicate messages. sending out to mailing list works
sporadically Sometimes works, other times doesn't).


As reported, the contextgarden server was down following a disk 
controller failure and had taken some time to be reconfigured with new 
hardware and brought back online.


However, the request that I read was not about duplicate messages but 
rather to avoid superfluous signature additions when posting to a 
mailing list.


Alan
___
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] setuphead page=right and blank even page.

2023-06-11 Thread Alan Braslau via ntg-context

On 10/06/23 10/06/23, 12:42, Wolfgang Schuster via ntg-context wrote:

Alan Braslau via ntg-context schrieb am 10.06.2023 um 12:28:

Hello,

\setuphead
  [part,chapter,title]
  [page=right]

will start a part, chapter, or title on an odd page (right), inserting 
a "blank" even page if necessary. How can I get this blank even page 
to be truely blank, that is with no headers nor footers?


I tried several thinks and must be missing something really simple and 
obvious.


\setuphead [...] [page={yes,header,footer,right}]


Wolfgang
Thank you for this hint. It works (almost) as expected:
Strangely, I had to add, explicitly,

\startfrontmatter

\component FrontMatterStuff

\page[yes,header,footer,right]

\stopfrontmatter

\startbodymatter

...

\stopbodymatter


In order to get the frontmatter end with a totally blank page before a 
right Chapter 1 header. Using just the setuphead resulted in headers and 
footers on the "blank" left page. No problems for Chapters 2, etc.


--
Alan


___
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] setuphead page=right and blank even page.

2023-06-10 Thread Alan Braslau via ntg-context

Hello,

\setuphead
  [part,chapter,title]
  [page=right]

will start a part, chapter, or title on an odd page (right), inserting a 
"blank" even page if necessary. How can I get this blank even page to be 
truely blank, that is with no headers nor footers?


I tried several thinks and must be missing something really simple and 
obvious.


Thank you.

--
Alan
___
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] knuth

2023-06-05 Thread Alan Braslau via ntg-context

On 05/06/23 05/06/23, 08:50, luigi scarso wrote:



On Mon, 5 Jun 2023 at 15:18, Alan Braslau via ntg-context 
mailto:ntg-context@ntg.nl>> wrote:



On 04/06/23 04/06/23, 15:57, Berend de Boer via ntg-context wrote:
 >> Probably some on this list already checked how well chatgpt answers
 >> questions about domains one knows well and then probably noted
that in
 >> spite of impressive wording, one can run into quite incorrect
answers.
 >
 > I've been using it for ConTeXt, and to be honest, it works amazingly
 > well. It hallucinates sometimes, but it's such a time saver.

Maybe someone should try asking it to write documentation/manuals?

As a teacher, we are accustomed to seeing Google/Wikipedia/etc.
cut-and-paste nonsense; now, this nonsense appears more polished, and
our students are none the wiser. Saves them time, too! ;-)

Who said: "the best way to economize thought is not to think at all"?



not all is bad: sometimes a textual description can replace a formalized 
notation, e.g.
https://fosstodon.org/@t...@mathstodon.xyz/110250604086213386 
<https://fosstodon.org/@t...@mathstodon.xyz/110250604086213386>

I can imagine similar examples with tables.
Of course a very high level text is often ambiguous (as some kind of 
formalized grammars, after all)
but  the example shows that in these cases  it is better to fix 
something already almost ok than  to typeset it from scratch.


As an Artificial Intelligence machine, I cannot speculate why it is so 
hard to write correct LaTeX that does not need to be tweaked in order to 
give an aesthetic result. However, from monitoring the ConTeXt mailing 
list, I have observed that most problems seem to have an answer that 
work correctly when used correctly. In the rare case that ConTeXt users 
report something not working correctly, this usually is revealed to be a 
small typographic error in the macros appearing following a major 
internal code rewrite. I have recorded in all of these rare cases a 
pattern that reoccurs repeatedly with the phrase "fixed in next upload". 
I cannot speculate as to how such fixes appear so rapidly and so 
consistently. My analytical artificial intelligence is thrown off by 
seemingly irrelevant statements about listening to this or that CD. What 
could this possibly mean?


In supplement, I have not yet deciphered what is meant by the acronym 
MWE that also repeatedly occurs. This does not appear to fit with 
something that is reported as being broken.


(Written with the assistance of ChatGPT.)

Alan
___
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] knuth

2023-06-05 Thread Alan Braslau via ntg-context



On 04/06/23 04/06/23, 15:57, Berend de Boer via ntg-context wrote:

Probably some on this list already checked how well chatgpt answers
questions about domains one knows well and then probably noted that in
spite of impressive wording, one can run into quite incorrect answers.


I've been using it for ConTeXt, and to be honest, it works amazingly
well. It hallucinates sometimes, but it's such a time saver.


Maybe someone should try asking it to write documentation/manuals?

As a teacher, we are accustomed to seeing Google/Wikipedia/etc. 
cut-and-paste nonsense; now, this nonsense appears more polished, and 
our students are none the wiser. Saves them time, too! ;-)


Who said: "the best way to economize thought is not to think at all"?

Alan
___
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] Moving up a Figure

2023-06-05 Thread Alan Braslau via ntg-context

On 05/06/23 05/06/23, 00:08, Mikael Sundqvist via ntg-context wrote:

On Mon, Jun 5, 2023 at 4:03 AM Jeroen via ntg-context
  wrote:

Not fully, it indeed moves up the figure but a little too much. Is there a more 
granular method?

Not that I know of, but maybe {right,halfline} will do?


Maybe try "location={right,-1*hang},"

Alan

___
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] Is there a way to centrally add a list of indexed items to a sub category?

2023-05-15 Thread Alan Braslau via ntg-context
On Mon, 15 May 2023 01:37:53 + (UTC)
Joel via ntg-context  wrote:

> Such a way would make it so \index{dogs} places an entry for "dog"
> under "d" and "animals --> dogs" under "a".

Might I suggest that an alternate way of handling this could be:

\seeindex{dogs}{animals+dogs}

with

\index{animals+dogs}


It's the author's choice, but this avoids redundant page entries and a very 
long \placeindex.

(Note that we recently extended \seeindex to handle the {...+...}
syntax for both arguments.)

Alan
___
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] 17th ConTeXt Meeting, Prague, 10.–16. 9. 2023: Registration Open

2023-05-15 Thread Alan Braslau via ntg-context
ConTeXt users,

All ConTeXt Meetings are great fun, and the meeting organized by Jano
near Prague is particularly not to be missed!

I have been to a number of ConTeXt meetings (and organized one in 2015)
and each one has been quite memorable. I strongly recommend trying to
attend if at all possible. (Regretfully, Jano, I do not see how I would
be able to attend this year :-(

Alan 



On Mon, 15 May 2023 19:15:59 +0200
Jano Kula via ntg-context  wrote:

> Dear list members!
> 
> Registration for the 17th ConTeXt Meeting
>  is now open.
> 
> We will meet at our favourite place close to Prague for the 3rd time.
> Come and join us to hear all the great news about new developments of
> ConTeXt and LuaMetaTex, meet developers and friends from this list.
> Better come in person, though registration for online participation
> for the small fee is open, too.
> 
> Important dates:
> 
>- *May 15th 2023,* beginning of registration
>- *July 31st, 2023,* deadline for early bird payment
>- *August 20th, 2023,* registration closes, ask for options after
> this deadline
>- *September 10th–16th, 2023,* 17th ConTEXt Meeting
> 
> Never been to the ConTeXt Meeting? Don't worry, the group of regular
> participants is open and friendly, and you don't know what you are
> missing, unless you come at least once. Different discounts
>  are available.
> 
> See you in September!
> 
> Jano
> on behalf of the ConTeXt Group Board
___
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] Is there a way to centrally add a list of indexed items to a sub category?

2023-05-15 Thread Alan Braslau via ntg-context
On Mon, 15 May 2023 09:40:22 +0200
Hans Hagen via ntg-context  wrote:

> \starttexdefinition tolerant protected IndexB[#1]#:#*#2
>  \index{#2}
>  \doloopoverlist {#1} {
>  \index{##1+#2}
>  }
> \stoptexdefinition

Awesome!

However, I think that Joel was looking for a solution closer to what
Hraban suggested, creating automatic subcategories. I would do that
through a additional macros:

\starttexdefinition protected Animals#1
\index{#1}
\index{animals+#1}
#1
)
\starttexdefinition protected Plants#1
\index{#1}
\index{plants+#1}
#1
)
\Animals{dogs}
\Plants{trees}





I use as a general indexing macro:

\starttexdefinition tolerant protected Index[#1]#:#*#2
 \index[#1]{#2}
 #2
\stoptexdefinition

Alan
___
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] How to print all pages for a single index entry?

2023-05-07 Thread Alan Braslau via ntg-context
On Sun, 7 May 2023 22:26:12 + (UTC)
Joel via ntg-context  wrote:

> I have an index like this:
> 
> \starttext
> \index{butterflies}\index{horses}\index{cows}
> \placeindex
> 
> \stoptext
> The placeindex will place every index.
> Is there a way to say, display an index, but only for a specific
> single entry, or specific list of entries, e.g. \placeindex[horses,
> cows] (would exclude butterflies from the index entries) --Joel

You can use multiple lists, like indexofmammals and indexofarthropods,
and then place one or combine them, as needed.

Alan
___
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] new units

2023-05-07 Thread Alan Braslau via ntg-context
On Sun, 7 May 2023 13:00:18 +0100
Bruce Horrocks via ntg-context  wrote:

> Will there be new units to represent the amount of alcohol that has
> to be imbibed in order to (a) create the joke and (b) understand it?
> 
> I'm not sure which of these needs to be the larger. Perhaps that
> could be the subject of the next research?

The moral of the story is that we all missed something by not attending
BachoTeX - as is the case every year. One should note Hans' reference
to the gala dinner, which is better characterized by an excess of
dishes of food than by an excess of alcohol.

We have an opportunity to make up for this missed occasion this year by
attending the annual ConTeXt meeting. Of course, these two meetings are
complementary and ideally one should aim at attending *both*.

As to the Dutch left and right thumbs, the French word is also "pouce"
for the length of an inchworm. My question is, what is the appropriate
unit for inching forward or inching along? Would this be one inch per
fortnight?

Alan
___
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] new units

2023-05-06 Thread Alan Braslau via ntg-context
On Sat, 06 May 2023 16:10:31 -0800
skyhorse--- via ntg-context  wrote:

> 
> 
> Hans Hagen via ntg-context  wrote:
> >..
> > Oh, so a bug, I'll fix the message. Not really a unit but then, feet
> > is also not one.
> >
> 
> That is incorrect.  Feet is an establish and proper unit of
> measurement, which consists of 12 inches.  It is used by, at least,
> several hundred million people.  It can be said that the ability to
> grok and manipulate fractions has many benefits, which the metric
> system sorely lacks.

The inch is properly defined as *exactly* 2.54cm.
So the foot is a proper unit defined as 12*2.54cm.

Manipulating fractions, I stated, is the entire point of Imperial
measurements.

Now go figure: Physical Review Letters once objected to my publishing a
graph without units on the abscissa. I satisfied the editor by adding
$[m\times m^{-1}]$ (my graph was in radians).

Alan
___
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] new units

2023-05-06 Thread Alan Braslau via ntg-context
The whole point of the so-called "imperial" units is to be based on
fractions, not decimal. May I suggest that we use \sqrt2 as the basis
of our fractions, so as to push the limits of calculation and precision
(that are handled well in the new lmtx engine).

Also, on this day of coronation, post-Brexit, I believe that the ConTeXt
community should get behind the promotion of obscure Imperial units,
relegating the metric system to scientists who have no choice but to
adhere to the Système International.

Alan (who could not participate in the discussions of the committee of
four)


On Thu, 4 May 2023 10:01:25 +0200
Hans Hagen via ntg-context  wrote:

> Hi,
> 
> We now officially have three new units. These were officially
> introducd at the 2023 BachoTeX meeting in a presentation where the
> chair of the four person strong team also did the final live
> callibration (using the edithorial callibration instrument made for
> that purpose). An upcoming article in TB will explain the details of
> the process and also a careful mathematical annalysis of how we
> reached the right value with a high precission. The actual
> implementation is the most boring part.
> 
> \starttext
> 
> \startTEXpage[offset=1ts]
>  Hello World!
> 
>  \the\dimexpr 1ts
> 
>  \the\dimexpr 1es
> 
>  \the\dimexpr 1eu
> 
>  \eufactor20
> 
>  \the\dimexpr 1eu
> \stopTEXpage
> 
> \stoptext
> 
> The es (Edith) unit replaces the inch, and the ts (Tove) is one
> tenths of than (just like we have cm and mm). The eu (European Unit)
> is an adaptive one that defaults to 10 ts == 1es and can be
> multiplied by setting the \eufactor (default 10) which makes it
> possible to define layouts that easilly scale to different output
> media (important for the mobile phone / table generation).
> 
> This means that MWE that use inches will likely no longer be
> considered valid and probably will be dealt with slower (or just
> ignored).
> 
> These units can be used in the current upload. In a next upload the
> "19 feet max" message that tex issues when reaching a maximum will be 
> adapted to a more realistic variant. (Actually, because tex has no
> foot unit, we could as well replace that with a more impressive
> little feet unit but we forgot to measure the smallest foot present
> which i guess was about 3 es so the limit is then some 75 bare
> theodores.)
> 
> Hans

___
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] How to show bibliography only for the chapter?

2023-05-06 Thread Alan Braslau via ntg-context
On Sat, 6 May 2023 12:09:10 + (UTC)
Joel via ntg-context  wrote:

> I am trying to place a bibliography at the end of the chapter, not
> the end of the whole document. I tried various code such as
> `criteria=bychapter` etc., but it will only show the entire
> bibliography for the whole document. How can I limit the list to the
> material falling within that chapter?
> 
>     \starttext
>     \startchapter[title={Robots}]
>     \input knuth    \cite[source1]
>     \placelistofpublications[criteria=bychapter]
>     \placelistofpublications[way=bychapter]
> \placelistofpublications[criteria=chapter] \stopchapter
>     \stoptext
> 
> --Joel

\placelistofpublications [criterium=chapter]

Alan
___
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] Table of contents in the middle of a document

2023-04-17 Thread Alan Braslau via ntg-context
Try:

\completecontent [criterium=all]

Alan


On Tue, 18 Apr 2023 01:06:02 +0200
Kalouguine Andre via ntg-context  wrote:

> Hi, 
> 
> I was trying to have my "Acknowledgements" section/chapter before the
> table of contents but be contained within it. 
> 
> Is it normal that the table of contents is empty if there is a chapter
> that begins before it? 
> 
> ``` 
> 
> \starttext
> \chapter{Acknowledgements}
> Thank you
> 
> \completecontent
> 
> \chapter{Intro}
> 
> \chapter{Problem}
> 
> \chapter{Solution}
> \stoptext 
> 
> ``` 
> 
> I'm mostly looking for an explanation rather than a direct solution,
> I'd like to understand why it's empty. It works when using sections
> instead of chapters. 
> 
> Best regards,
___
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] Nuclear reactions

2023-04-16 Thread Alan Braslau via ntg-context
On Sat, 15 Apr 2023 12:02:28 -0600
Gavin via ntg-context  wrote:

> Hi List,
> 
> I am still interested in knowing if there is a good way to do nuclear
> reactions using \chemical.

>From the chemical manual:

As in mathematical typesetting mode, subscripts and superscripts can
precede text. Thus, isotopes (such as this alpha particle, for
example), can be written as: \chemical{^4_2He^{2+}}. But compare the
alignment of \chemical{_{92}^{238}U} with
\chemical{\lohi[left]{92}{238}U}.

I have not used chemical formulas for some time, but

\chemical{^{235)_{92}U,+,$n$,->,^{94}_{38}Sr,+,^{140}_{54}Xe,+,$2n$}

"->" and "GIVES" are synonyms, as are "+" and "PLUS"
(also MINUS, SINGLE, DOUBLE, TRIPLE, EQUILIBRIUM, MESOMERIC with ascii
and unicode synonyms).

Alignment can be altered using \lohi[left]{92}{235} 
(remember left is flushright)


There is also "display mode" for chemical formulae:

\startchemicalformula
\chemical{text}
\chemical{text}{below}
\chemical{text}{above}{below}
\stopchemicalformula

where above and below can be used for labels, etc.

Alan
___
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] /usr/bin/env texlua no such file or directory; ~/context/tex is not a valid TEXROOT path; no file plain.tex

2023-04-10 Thread Alan Braslau via ntg-context
On Mon, 10 Apr 2023 20:51:58 -0400 (EDT)
Aditya Mahajan via ntg-context  wrote:

> Did you source the `setuptex` script, which sets the correct path.

My PATH is set to
PATH=./context/tex/texmf-freebsd-amd64/bin:/home/MyAccount/context/tex/texmf-freebsd-amd64/bin:...

If my current working directory ("./") is a project that contains its
very own subdirectory ./context/, then this is used to typeset the
project. If not, it falls back on my own general standalone
$HOME/context/, and if that does not exist, then it falls back on, say,
a systemwide TeXlive installation.

This is all that is needed to have many versions coexist.

Alan

P.S. It can be a good practice to keep a ConTeXt standalone version
associated with each project, which can be "frozen" with the project,
assuring that the sources can always be typeset in the future "as is".

P.P.S. This per-project ./context/ subdirectory can include multiple
tex/texmf-system-architecture subdirectories and the project shared
between different machines, all in happy coexistence. (Hans told me a
while ago that they all use unique luametatex caches.)
___
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] update / punctuation / math

2023-04-01 Thread Alan Braslau via ntg-context
Here in Colorado, we need $\widecowboyhat$.
Of course, care should be taken so that it typeset properly in
right-to-left as well.

Alan


On Sat, 1 Apr 2023 10:27:41 +0200
Hans Hagen via ntg-context  wrote:

> Hi,
> 
> There have been some mails about punctuation spacing and a fix was
> added to the engine that related to that. As tests showed it to be
> okay so we made an update. It took a bit longer than normal because
> we were in the middle of some other math stuff: additional fonts and
> extensibles.
> 
> Daniel Flipo maintains a few math fonts (like concrete, xcharter, 
> erewhon, kp, euler) and the last few weeks more extensive support for 
> extensibles was added and concrete became quite nice too, so these
> fonts make a nice benchmark. As they are part of the lmtx install and
> we made sure to support them.
> 
> In the process we adapted our 2023 roadmap of which part is attached
> (we included an example end then decided to show of concrete).
> 
> When we go through the process of 'upgrading' we noticed some 
> interesting names for symbols and 'constructs'. Quite some come from 
> plain and/or amsmath (in the past taco and aditya did some porting to 
> context) and we're not always sure if something is really used (or
> even what it was intended for) so if you notice something weird or
> missing, let us know. Examples are welcome too. It might also be that
> something can go away because it's obsolete or never needed (so far
> we could resist te kick-out-symbole-name temptation when it comes to
> symbol names that we think no sane user can remember or imagine to be
> there).
> 
> When often add extra tests to the test suite (math subsection).
> 
> Hans & Mikael
> 
> ps. Alan and I are still messing around with some cross referencing. 
> That code is still experimental and can have issues that we're
> looking at but hard to nail down (huge complex cross-referencing
> documents). More about that later.
> 
> ==
> 
> We added the tex of the pdf below
> 
> == extract from roadmap ==
> 
> \usemodule[article-basic,abbreviations-logos]
> 
> \setupbodyfont[concrete]
> 
> \starttext
> 
> \startsubject[title=Math in \CONTEXT\ roadmap]
> 
> \startitemize[n]
> 
> \startitem
>  After playing with math support for more than a year, we have
> come to the
>  conclusion that it is time to move on. We have already discarded
> italic correction and now are replacing rules with extensibles. Much
> was already in
>  place (and applied) but experiences with type one antykwas made
> us review
>  some \OPENTYPE\ fonts. Not using rules makes some of them look 
> better. The
>  effect is subtle and probably not \AMS\ compliant, but we think 
> that it will
>  work out well for simple math like fractions of decimal numbers.
>  Consequently, we have added to our shrinking to-do list the
> burden to investigate whether we can remove those obsolete code paths
> from the engine.
>  After all, who needs italic correction, who prefers ugly rules
> to beautiful
>  glyphs, and who understands all these font parameters?
> Furthermore, after all
>  these years, we don't expect \OPENTYPE\ font and \UNICODE\ math 
> technologies
>  to improve much; we don't know if \MICROSOFT\ is developing
> their technology
>  further at all. Therefore, we are confident that what we are
> doing is the way
>  it should have been done when math was upgraded. Hopefully users 
> will notice
>  the improvements.
> \stopitem
> 
> \startitem
>  Math also means physics and units (that topic was brought up 
> recently on the
>  list by Gavin). Therefore, because we're in cleanup mode, we
> decided to eliminate some more. With \ISO\ now in place for a long
> time, we are going to
>  ignore the existence of the inch as unit from now on. The unit
> will probably
>  remain in the engine for nostalgic reasons, but it will no be 
> accepted in
>  MWE. Instead, we will provide some more modern, culturally
> correct, kid-friendly units that we will use in examples, manuals and
> such. Because
>  the four-person strong team dealing with this wants to avoid
> making mistakes,
>  we will go through a careful and scientifically sound process of 
> calibration
>  first, using a selected tex savvy audience. We expect these new 
> units to be
>  stable a month from now. Believe it or not, in the process of 
> documenting all
>  this, we found a buglet in the new math dimension spacing, so it 
> has already
>  paid off. Expect to hear more in a month or so, and enjoy your 
> inches as long
>  as you still can. In case you wonder how this relates to math
> other than
>  mentioned: the math subsystem has 'mu' as adaptive unit, and
> that inspired is
>  to come up with one for text (in addition to two new more or
> less fixed units).
> \stopitem
> 
> \startitem
>  The math family model is a fundamental concept in \TEX\ 

Re: [NTG-context] Numbering of figures after defining a new float

2023-03-30 Thread Alan Braslau via ntg-context
Have you tried:

\setuplist [figure] [partnumber=no]

...

\placelistoffigures [criterium=part]



Alan


On Thu, 30 Mar 2023 17:09:15 +0200
Willi Egger via ntg-context  wrote:

> Hello everybody,
> 
> 
> I am still working on the previously mentioned project, consisting
> out of different parts. There are about 25 chapters in each part and
> most of the chapters contain figures. When using the predefined
> figure environment, then all figures in the figure-list are placed
> correctly though at each part the numbering restarts.
> 
> Now I tried to implement for each part its own float environment,
> which enables me to produce a figure-list per part with subtitels.
> How ever in the newly defined floats there is no continuous numbering
> i.e. chapternumber.serialnumber. Instead each float get the chapter
> number only.
> 
> How to get the numbering right?
> 
> Kind regards
> Willi
> 
> The following example shows what happens:
> 
> \useMPlibrary[dum]
> 
> \definefloat[Afigure][Afigures][figures]
> \definefloat[Bfigure][Bfigures][figures]
> 
> \setuphead
>   [part]
>   [placehead=yes,
>page=yes]
> 
> \setuphead
>   [chapter]
>   [page=no]
> 
> \starttext
> 
> \starttitle[title=List of figures]
>   \startsubject[title=Figures (predefined figureenvironment)]
> \placelistoffigures
>   \stopsubject
> 
>   \startsubject[title=Figures A]
>   \placelistofAfigures
>   \stopsubject
> 
>   \startsubject[title=Figures B]
> \placelistofBfigures
>   \stopsubject
> \stoptitle
> 
> \startpart[title=Part ONE]
> \startchapter[title={Chapter one in part one}] %les21
> 
> \startplaceAfigure
>   [location=left,
>reference=fig:dumA,
>title={Dummy A}]
>   {\externalfigure[dummy][width=0.6\textwidth]}
> \stopplaceAfigure
> 
> \startplacefigure
>   [location=left,
>reference=fig:dumB,
>title={Dummy B}]
>   {\externalfigure[dummy][width=0.6\textwidth]}
> \stopplacefigure
> 
> \startsection[title=Section A]
> 
> \startplaceAfigure
>   [location=left,
>reference=fig:dumC,
>title={Dummy C}]
>   {\externalfigure[dummy][width=0.6\textwidth]}
> \stopplaceAfigure
> 
> \stopsection
> \stopchapter
> \stoppart
> 
> \startpart[title=Part TWO]
> \startchapter[title=Chapter one in part two]
> 
> \startplaceBfigure
>   [location=left,
>reference=fig:dumD,
>title={Dummy D}]
>   {\externalfigure[dummy][width=0.6\textwidth]}
> \stopplaceBfigure
> \stopchapter
> \stoppart
> \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
___


Re: [NTG-context] Bug in searching TTC fonts for the script of mtxrun

2023-03-23 Thread Alan Braslau via ntg-context
On Wed, 22 Mar 2023 08:50:10 +0100
Hans Hagen via ntg-context  wrote:

> I might have missed a link.

https://github.com/notofonts/notofonts.github.io

-- 
Alan
___
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] Absolute positioning of \startcombination... \stopcombination

2023-03-16 Thread Alan Braslau via ntg-context
On Thu, 16 Mar 2023 18:27:53 +0100
Wolfgang Schuster via ntg-context  wrote:

> Keith McKay via ntg-context schrieb am 16.03.2023 um 17:59:
> >
> > Hi,
> >
> > I would like to position a combination of images where the centre
> > of the combination coincides with the centre of the text area of a
> > page. In the example below I have made the combination into a layer
> > thinking that this would be the easiest way to position it where I
> > wanted. However to position in the centre of the page I would need
> > to know the size of the combination and use this to calculate the x
> > and y values for positioning of the layer. I have looked at the
> > Wiki page on image size of combinations but still cant figure out
> > how to do it. Any suggestions on how to go about this or is their a
> > better way?
> >
> > Wiki Page reference: 
> > https://wiki.contextgarden.net/Combinations#Image_Width
> >
> > Thanks
> >
> > Keith McKay
> >
> > %%% example %%%
> >
> > \setuppapersize[A4,portrait]%[A4,portrait]
> >
> > \setuplayout
> >
> > [backspace=2.5cm,
> >
> > topspace=1cm,
> >
> > height=28cm,
> >
> > width=17cm,
> >
> > header=0cm,
> >
> > footer=0.75cm,
> >
> > ]
> >
> > \useMPlibrary [dum]
> >
> > \starttext
> >
> > \definelayer[test3]
> >
> > \setlayer[test3][x=2cm,y=15cm]
> >
> > {\startcombination[nx=3,ny=1,distance=15mm,after=,location=middle]
> >
> > {\externalfigure[dummy]}{}
> >
> > \rotate[rotation=90]{\externalfigure[dummy]}{}
> >
> > {\externalfigure[dummy][]}{}
> >
> > \stopcombination}
> >
> > \flushlayer[test3]
> >
> > \stoptext
> >  
> 
> \useMPlibrary [dum]
> 
> \showframe [text] [text]
> 
> \setuplayout [tight]
> 
> \starttext
> 
> \centerbox
>     {\bTABLE[frame=off,offset=7.5mm,align={middle,lohi}]
>      \bTR
>      \bTD
>      \externalfigure[dummy]
>      \eTD
>      \bTD
>      \rotate[rotation=90]{\externalfigure[dummy]}
>      \eTD
>      \bTD
>      \externalfigure[dummy]
>      \eTD
>      \eTR
>      \eTABLE}
> 
> \stoptext
> 
> Wolfgang

Or you could put the combination in a frame:

\startparagraph [align=middle]
  \startframed [frame=off,offset=\zeropoint]
\startcombination [nx=3,ny=1]
  {first} {}
  {second}{}
  {third} {}
\stopcombination
  \stopframed
\stopparagraph

Alan
___
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] \unit parser ignoring case, in some cases.

2023-03-14 Thread Alan Braslau via ntg-context
On Tue, 14 Mar 2023 12:03:23 -0600
Gavin  wrote:

> I’d really like one of the acceptable forms to be the form prescribed
> by Le Système international d'unités

I believe that this point is essential, regardless of history of use of
the \unit{} command. Non-standard use of units can be *tolerated* as
long as they do not conflict with the SI and do not impose non-standard
syntax.

Alan

P.S. It is our guarded secret that the weather is nice here in
Colorado. I do not know of any other place that has real seasons AND
where it is (almost) always sunny! :-)
___
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] \unit parser ignoring case, in some cases.

2023-03-14 Thread Alan Braslau via ntg-context
On Tue, 14 Mar 2023 15:36:37 +0100
Hans Hagen via ntg-context  wrote:

> > Indeed, I would like to make NONE of them case insensitive. But
> > currently, when I register an upper case key (C=coulomb) it messes
> > up the lower case prefix (“cm" gets typeset as C•m). I was
> > expecting the parser to distinguish between the “C” and “c”, but it
> > doesn’t. Is that intended?  
> I added an option and an extra registers but it's up to you to decide 
> hwo to use it (and how to deal with conflicts in definitions).

There should not be conflicts, for, formally,
c should be 1/100
C should be Coulomb

k should be 1000
K should be Kelvin

n should be 10^{-9}
N should be Newton

m should be meter
M should be 10^6
(but m also means 10^{-3})

etc.

The problems arise as \unit{} presently accepts

Kelvin and kelvin
Newton and newton
Coulomb and coulomb
Watt and watt
etc.

also, mm could be millimeters, or it could be m•m (m^2).

Right now, \unit{1 mm-1} and \unit{1 m m-1} give the same result:
inverse millimeters (whereas the second should be m•m^{-1}, also known
as radians! ;-)

I suggest that it be limited to formal (and well-defined) unit names,
respecting casing.

I also suggest that unrecognized units either give an error message in
stdout and in the log file and show up in the output (as {\tt } to
be coherent with other subsystems), rather than to be simply ignored.

Alan
___
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] \unit parser ignoring case, in some cases.

2023-03-13 Thread Alan Braslau via ntg-context
On Mon, 13 Mar 2023 15:55:50 -0600
Gavin via ntg-context  wrote:

> > you can look at phys-dim and see plenty of short and long keys and
> > making all case insensitive is asking for troubles  
> 
> Indeed, I would like to make NONE of them case insensitive. But
> currently, when I register an upper case key (C=coulomb) it messes up
> the lower case prefix (“cm" gets typeset as C•m). I was expecting the
> parser to distinguish between the “C” and “c”, but it doesn’t. Is
> that intended?

Indeed, \unit{} should allow (and presently does not) K, C, etc.

Alan
___
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] How to extend an existing macro to take optional parameters?

2023-03-13 Thread Alan Braslau via ntg-context
Designating "optional" parameters within [...] is a LaTeX notion.
ConTeXt handles parameters differently.

Alan


> > and I'd like to be able to extend it so that any of the following
> > can be used:
> > 
> >\mycommand{aa}{bb}{cc}
> >\mycommand{aa}{bb}{cc}{dd}
> >\mycommand{aa}{bb}{cc}{dd}[ee]
> > 
> > or
> > 
> >\mycommand[ee]{aa}{bb}{cc}{dd}  % if this is more the ConTeXt way
> > 
> > where {dd} is the optional extra parameter and, if it is present,
> > then [ee] can also be optionally added (because it controls how
> > {dd} is printed).
___
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] Float control

2023-03-01 Thread Alan Braslau via ntg-context
On Thu, 2 Mar 2023 00:12:53 +0100
Hans Hagen via ntg-context  wrote:

> On 2/28/2023 11:45 AM, Denis Maier via ntg-context wrote:
> > Hi everyone,
> > 
> > I’ve recently had to typeset a document that gave me some headaches
> > with the floats. The floats where jumping around, appearing in a
> > different order than in the source file, tables ended up split up
> > at weird points, some positioning keys had not the intended effect
> > (e.g. top), «page» moved the float more than seemed necessary for
> > me... I know, TeX’s float positioning algorithm should be rather
> > reliable and stable, and it’s quite possible that I’m messing
> > things up in my setups–especially since my source files are XML.
> > 
> > Anyway, I’d like to learn more about the whole float issue. Is
> > there anything particular I could read to learn more about the
> > whole thing? Maybe I’m missing out on something fundamental...
> Basically floats are output in order when they fit. You can use force
> to really do that. When there is no room they will migrate. Some
> options like top and bottom might also change the order. Normally you
> start with just placing ('here') and see how that works out. Side
> floats are special and anchored to the text.
> 
> The more complex and confliuctign the demands, the harder it gets for 
> ConTeXt to fulfill all requirements. In that case shifting around the 
> text or places where you ask for a float helps. It's one of the areas 
> where 'fully automated and perfect' are complex as everything can 
> interfere.
> 
> Btw, Mikael S is working on a tutorial that explains some neat
> trickery with specific placements (which also triggered some
> additional features).

A few (important) observations on floats:

\startplacefloat
\stopplacefloat
triggers a paragraph break.

I therefore locate them always at the beginning or at the end of a
paragraph of text.
(A trick is to enclose them in a named buffer within a
paragraph, typically where a figure call -
\in{figure}[figureReference] - is to be located. Then to place
the \getbuffer at the beginning or end of a paragraph. See
example below.)

The keys location=top/bottom will place the float at the top or bottom
of the page IF IT FITS, otherwise it is pushed to the following page.
Thus, a bottom can become a top.

The key location=force will place the figure there, perhaps generating
a page break if it does not fit.

The key location=page will put the figure on a following page. This
situation can sometimes push figures to appear "out of order", if
another figure can somehow fit before the figure pushed to the
following page. This happens if another floating figure "comes too
soon".

The keys location=left and location=right will also generate a page
break if the figure does not fit.

In the end, one needs to tweak a document in final form especially if
it contains many figures, unfortunately. This is done by moving the 
\startfigure...\stopfigure. Here, the use of buffers:

Paragraph text ...
(see \in{figure}[myfigure]).
\startbuffer[myfigure]
  \startfigure[reference=myfigure,
   location=top,
   title=Title]
\externalfigure[myfigure][width=\textwidth]
  \stopfigure
\stopbuffer
More text ...\par
\getbuffer[myfigure]

can make life easier, moving the \getbuffer[myfigure] to an optimal
paragraph beginning or end.

Alan

P.S. It might be nice to be able to anchor a figure not to text but to
a page location, like location=nexttop or location=nextbottom, or even
location={nexttop,right} etc. This gets really complicated (but
anything is do-able).

P.P.S. I'm certain to learn some neat trickery from Mikael's tutorial!
___
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] How to add data from another PDF in index?

2023-02-26 Thread Alan Braslau via ntg-context
Hans needs to confirm, "In the next update..."

Test files (MWEs):

% index-1.tex

\setupinteraction[state=start]

\starttext
test \index{entryWB.1} \page empty \page
test \index{another  WB.1} \page empty \page
test \index{onemore  WB.1} \page empty \page
test \index{whatever WB.1} \page empty \page
test \index{common}\page empty \page
\placeregister[index]
\stoptext


% index-2.tex

\setupinteraction[state=start]

\defineregister[xedni]

\useregister[workbook][index-1][index][WB ]

\starttext
test \index{onemore TB.1} \page
test \index{another TB.1} \page
test \index{entry   TB.1} \page
test \index{common}   \page
test \xedni{onemore TB.2} \page
test \xedni{another TB.2} \page
test \xedni{entry   TB.2} \page
test \xedni{common}   \page
\placeregister[index,xedni,workbook]
\stoptext



This seems to work well - I have applied it to a long and complicated
multi-volume book project to great success!

We need to thank Hans for the quick implementation.

Alan



On Fri, 24 Feb 2023 05:43:01 + (UTC)
Joel via ntg-context  wrote:

> I am making a textbook and workbook set.
> I have this custom index using this code, in both the textbook and
> workbook: %
> \defineregister[learnedshort][compress=yes]
> \setupregister[learnedshort][style=sansbold, textstyle=slanted, n=2,
> pagenumber=yes, indicator=no] %
> \defineregister[learnedlong][compress=yes]
> \setupregister[learnedlong][style=sansbold, textstyle=slanted, n=2,
> pagenumber=yes, indicator=no] %
> \define[1]\learnedis{%
>     \txt{} \getvalue{#1}
>     \learnedshort{#1}
>     \learnedlong{#1}
> }
> \define[1]\learned{%
>     \learnedshort{#1}
>     \learnedlong{\getvalue{#1}}
> }
> 
> \starttext
> 
> \learnedis{blah blah}
> 
> \input knuth
> 
> \learnedis{some more}
> 
> 
>     \startchapter[title=Standards]
>         \placelearnedshort
>     \stopchapter
>     
> \stoptext
> 
> 
> My question is, can I have references to the Workbook page numbers in
> the textbook? And visa-versa?
> 
> For instance, the Textbook index currently looks like this:
> -
> Standards
> blah blah 1
> some more 2
> --
> With the data in the Workbook it might look like this:
>  Standards
> blah blah 1, WB: 1, 3-8
> 
> some more 2, WB: 8-9
> yet more WB: 10, 12
> 
> --
> Is this possible to merge index information like this?
> --Joel



-- 
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://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] How to add data from another PDF in index?

2023-02-24 Thread Alan Braslau via ntg-context
We are currently working on fixing cross-references as well as shared
register information between products in a ConTeXt project structure.
Much is possible, but not all is fully worked out.

My current use is a multi-volume book, sharing Tables of Contents
between the two volumes. As a teaser,

\placelist [part,chapter,section,subsection]
   [criterium=product,reference=VolumeII]

will include the TOC of VolumeII in product VolumeI.

Once we have this figured-out, I will have to create a wiki page.

Alan


On Fri, 24 Feb 2023 05:43:01 + (UTC)
Joel via ntg-context  wrote:

> I am making a textbook and workbook set.
> I have this custom index using this code, in both the textbook and
> workbook: %
> \defineregister[learnedshort][compress=yes]
> \setupregister[learnedshort][style=sansbold, textstyle=slanted, n=2,
> pagenumber=yes, indicator=no] %
> \defineregister[learnedlong][compress=yes]
> \setupregister[learnedlong][style=sansbold, textstyle=slanted, n=2,
> pagenumber=yes, indicator=no] %
> \define[1]\learnedis{%
>     \txt{} \getvalue{#1}
>     \learnedshort{#1}
>     \learnedlong{#1}
> }
> \define[1]\learned{%
>     \learnedshort{#1}
>     \learnedlong{\getvalue{#1}}
> }
> 
> \starttext
> 
> \learnedis{blah blah}
> 
> \input knuth
> 
> \learnedis{some more}
> 
> 
>     \startchapter[title=Standards]
>         \placelearnedshort
>     \stopchapter
>     
> \stoptext
> 
> 
> My question is, can I have references to the Workbook page numbers in
> the textbook? And visa-versa?
> 
> For instance, the Textbook index currently looks like this:
> -
> Standards
> blah blah 1
> some more 2
> --
> With the data in the Workbook it might look like this:
>  Standards
> blah blah 1, WB: 1, 3-8
> 
> some more 2, WB: 8-9
> yet more WB: 10, 12
> 
> --
> Is this possible to merge index information like this?
> --Joel



-- 
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://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] Lettrine module not working?!

2023-02-20 Thread Alan Braslau via ntg-context
On Mon, 20 Feb 2023 16:02:30 +0100
"G.C.H.M. Verhaag via ntg-context"  wrote:

> Hi,
> 
> Yes Hraban it works outside in normal text flow. When I do e.g. 
> *{\InitialCapFont test in normal text flow}* the text '/test in
> normal text flow/' is rendered correctly in the Antykwa-Poltawskiego
> font.
> 
> Found out that the following does work with the *\placeinitial*
> command:
> 
> *\setupinitial[color=MyColor,distance=6pt,n=3,font=name:antpoltcondregular*default
>  
> sa 4]*
> 
> So something weird is happening I suppose!
> 
> Regards,
> Geert Verhaag

I use:

\setupinitial
 [font=Normal cp \measure{initial:n}]

Alan
___
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] Lettrine module not working?!

2023-02-19 Thread Alan Braslau via ntg-context
In mkiv and mkxl, we use

\placeinitial

rather than the obsolete (mkii) lettrine module.

See also \setupinitial.

Alan


On Sun, 19 Feb 2023 17:12:45 +0100
"G.C.H.M. Verhaag via ntg-context"  wrote:

> Dear ConTeXt-user,
> 
> Have been using ConTeXt for quite some time now and did a fresh 
> standalone install today:
> 
> mtx-context | ConTeXt Process Management 1.04
> mtx-context |
> mtx-context | main context file: 
> /home/gverhaag/ConTeXtInstallation/tex/texmf-context/tex/context/base/mkiv/context.mkiv
> mtx-context | current version: 2023.02.14 17:44
> mtx-context | main context file: 
> /home/gverhaag/ConTeXtInstallation/tex/texmf-context/tex/context/base/mkxl/context.mkxl
> mtx-context | current version: 2023.02.14 17:44
> 
> However the *lettrine* module doesn't seem to work anymore!
> 
> I use it like this:
> 
> *\usemodule[lettrine]*
> 
> *\setuplettrine[Lines=3,Image=no,Findent=0.7em,Nindent=0pt,FontHook={\MyColor}]*
> 
> These two commands are in my setup file.
> 
> Following error:
> 
> tex error   > tex error on line 36 in file deel3/hfdst1.tex:
> Control sequence expected instead of undefined
> 
>  \m_syst_parameter_n
>      ... \the \LettrineHeight ] X}}\scratchcounter = \numexpr 
> (100*\LettrineHeight )/(\ht \Lettrinetbox /100) - \relax \ifnum 
> \scratchcounter >0 \def \tempa {1.\the \scratchcounter }\else \def 
> \tempa {1}\fi \LettrineFontHook \!!dimena
>      = \tempa \Let ...
>  \dolettrine
>      ...\Lettrinefindent =\LettrineFindent \relax \Lettrinelines 
> =\LettrineLines \relax \setbox \Lettrinelbox \hbox {{\ifx
> \LettrineImage \v!yes \doLettrineEPS {#2}\else \ifx \LettrineImage
> \v!true \doLettrineEPS {#2}\else \doLettrineFont
>      #2\fi \fi }}\ ...
> 
> \lettrine{H}{et begin} van ...
> 
> Any hint on this would be much of a help! Thanks in advance!
> 
> Regards,
> 
> Geert Verhaag
___
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] setupregister/placeregister

2023-02-10 Thread Alan Braslau via ntg-context
Hello,

The criterium key in setupregister (so placeregister, placeindex, ...)
takes the following values:
criterium   local text current previous all section

all: places all entries of the document
section: (part, chapter, section, ...) places entries associated with
that structure element.

Can someone explain local, text, current, previous
for their scope and perhaps subtle differences are not entirely obvious
to me.

Thank you

Alan
___
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] Wrong prefix in cross references to formulas in external document

2023-01-29 Thread Alan Braslau via ntg-context
I, too, am struggling with external (and internal) references.
I have created (and sent to Hans) a MWE that seems to identify two bugs:

1) External references: in a single product, some of these work, and
*some* do not render the numbers (using \in{} [ref], for example). They
are, however, identified as known or "verified".

2) Internal references: all render but *some* get "missing link target"
errors (in the PDF viewer).

I have not been able to get anywhere with the (lua) code, myself.

Alan




On Sun, 29 Jan 2023 19:03:32 +0300
Yaroslav Beltukov via ntg-context  wrote:

> Dear Hans and all contributors,
> 
> I really appreciate ConTeXt for the right way to obtain high quality
> documents. I'm a theoretical physicist and I'm going to write a book.
> I think ConTeXt is the right choice to work with a number of formulas,
> figures and cross-references. The visual quality of formulas is
> better than in regular LaTeX. The new feature with formula
> autosplitting looks also very promising. For me it is important to
> obtain the high quality without a lot of manual tweaks of each
> formula for each given document format and figure placement.
> 
> However, I have found a problem with references if I compile one
> component only. The references to formulas in other components have
> wrong prefixes, e.g. (2.1) instead of (3.1). Needless to say, the
> right formula references are very important.
> 
> I started looking into this issue. The references to other components
> are taken from the whole product as from an external document. It
> turned out that this is a general problem with references with
> prefixes to external documents. The prefix is stored in a tuc file as
> a reference to a section as a sequential number of the header in the
> document. As a result, the prefix from the external document is
> calculated using the structure of the current document.
> 
> Here is the MWE, which consists of two files:
> foo.tex:
> 
> \defineenumeration[remark][prefix=yes, prefixsegments=chapter:section]
> 
> \starttext
> 
> Equations: \in[eq1], \in[eq2], \in[eq3], \in[eq4]
> 
> Sections: \in[sec1], \in[sec2], \in[sec3], \in[sec4]
> 
> Chapters: \in[chap1], \in[chap2], \in[chap3], \in[chap4]
> 
> Remarks: \in[remark1], \in[remark2]
> 
> \startbodymatter
> 
> \chapter[chap1]{Chapter}
> \placeformula[eq1]\startformula x = y\stopformula
> \chapter[chap2]{Chapter}
> \section[sec1]{Section}
> \section[sec2]{Section}
> \placeformula[eq1]\startformula x = y\stopformula
> \placeformula[eq2]\startformula x = y\stopformula
> 
> \stopbodymatter
> 
> \startappendices
> 
> \chapter[chap3]{Chapter}
> \section[sec3]{Section}
> \placeformula[eq3]\startformula x = y\stopformula
> \section[sec4]{Section}
> \startremark[remark1]\stopremark
> \placeformula[eq4]\startformula x = y\stopformula
> \startremark[remark2]\stopremark
> \chapter[chap4]{Chapter}
> 
> \stopappendices
> 
> \stoptext
> 
> 
> bar.tex:
> 
> \starttext
> 
> Equations: \in[foo::eq1], \in[foo::eq2], \in[foo::eq3], \in[foo::eq4]
> 
> Sections: \in[foo::sec1], \in[foo::sec2], \in[foo::sec3],
> \in[foo::sec4]
> 
> Chapters: \in[foo::chap1], \in[foo::chap2], \in[foo::chap3],
> \in[foo::chap4]
> 
> Remarks: \in[foo::remark1], \in[foo::remark2]
> 
> % any chapters and sections here
> 
> \stoptext
> 
> It is expected to have the same first page on these documents:
> 
> Equations: 1.1, 2.2, A.1, A.2
> Sections: 2.1, 2.2, A.1, A.2
> Chapters: 1, 2, A, B
> Remarks: A.2.1, A.2.2
> 
> However, the bar.tex produces wrong prefixes to formulas and remarks.
> The output depends on the document structure of bar.tex, not foo.tex.
> 
> I started looking into the source code. Thanks to lua, it is not a
> big deal to track the problem. The prefixdata is complemented by the
> sectiondata after the loading the tuc file. So, the question is: is
> it possible to store the full prefixdata with all necessary prefix
> numbers in the tuc file? Here is my proposal to change the source
> code:
> 
> --- strc-lst-old.lmt2023-01-29 11:30:15.610309948 +0300
> +++ strc-lst.lmt2023-01-29 12:10:08.864228923 +0300
> @@ -266,6 +266,16 @@
>  if r and not r.section then
>  r.section = structures.sections.currentid()
>  end
> +-- store sectiondata in prefixdata (necessary for external files)
> +if t.prefixdata and r.section then
> +local sectiondata = structures.sections.collected[r.section]
> +if sectiondata then
> +for k, v in next, sectiondata do
> +t.prefixdata[k] = v
> +end
> +end
> +end
> +--
>  local b = r and t.block
>  if r and not b then
>  local s = r.section
> 
> --- strc-ref-old.lmt2023-01-29 11:30:15.823643904 +0300
> +++ strc-ref.lmt2023-01-29 12:07:45.697109862 +0300
> @@ -2318,7 +2318,17 @@
>  if data then
>  numberdata = lists.reordered(data) -- data.numberdata
>  if numberdata then
> -helpers.prefix(data,prefixspec)
> +   

[NTG-context] bug $\vec{}$

2023-01-20 Thread Alan Braslau via ntg-context
MWE:

\starttext

$\vec{k}$

\stoptext

places the arrow *before* the symbol "k", latest download.

Alan
___
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] Meta(post)/(fun) macro with label position

2023-01-19 Thread Alan Braslau via ntg-context
On Thu, 19 Jan 2023 22:40:13 +0100
Alexandre Christe via ntg-context  wrote:

> def labelT(expr pos)(text t) =
> ...
> enddef;

vardef labelT@#(text t) =
...
enddef ;

Then you can pass on the "suffix" @#

Alan
___
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] multimedia inclusion added to the wiki

2023-01-18 Thread Alan Braslau via ntg-context
On Mon, 16 Jan 2023 19:00:06 +0100
Pablo Rodriguez via ntg-context  wrote:

> Dear list,
> 
> just in case it might help, I have just added a new wiki article about
> how to add multimedia in PDF documents.
> 
>   https://wiki.contextgarden.net/Multimedia_Inclusion
> 
> I hope it helps,
> 
> Pablo

Pablo,

Thank you - this is indeed helpful.

I have two questions:

\userendering[key-name][video/mp4][video.mp4]
  [embed=yes, auto]

It was my understanding that the mix of key=value with (single) option
in the same comma-separated list does not work. Would someone clarify
this?


Secondly, I would have thought that embed=yes would include the
multimedia file in the PDF stream. However,

The resulting PDF document requires a video.mp4 file on the same
directory as your ConTeXt source file.

This should probably say "in the same directory as the PDF file", but
is that true, or does it get embedded?


Alan
___
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] Trouble with latest...

2023-01-10 Thread Alan Braslau via ntg-context
On Mon, 9 Jan 2023 19:08:54 -0700
Alan Braslau via ntg-context  wrote:

> On Mon, 9 Jan 2023 18:40:08 +0100
> Alain Delmotte via ntg-context  wrote:
> 
> > Anytime a new upload is announced, I download the 
> > context-win64.zip unpack it and run install.bat and setpath.bat.
> > 
> > Is it a fresh installation? Or should I from time to time 
> > erase my installation and run install.bat to create a new 
> > distribution?
> 
> This is not a *fresh* install. In fact, you can simply run
> ./install.bat - there is no need to download context-win64.zip.
> 
> Having said that, the latest problem with the update has to do with an
> updated luametatex binary, so your method might have worked by
> updating the binary with the unzip, even if it is not a "fresh"
> install.

For information:

I tried updating by downloading a fresh zip and unpacking it over an
existing installation, then running ./install.bat. This failed with the
latest upload, although unzipping to a new location and running
./install.bat resulting in a good, updated distribution.

The install/update and mtxrun scripts could possibly be improved to
1. start by updating the luametatex binary in a first step,
then rerunning to update the rest of the distribution;
2. systematically clear the luametatex-cache upon update (I
believe that this is a small price to pay for robustness).
However, such changes clearly are not a priority to work out, for now.

Alan
___
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] Trouble with latest...

2023-01-09 Thread Alan Braslau via ntg-context
On Mon, 9 Jan 2023 18:40:08 +0100
Alain Delmotte via ntg-context  wrote:

> Anytime a new upload is announced, I download the 
> context-win64.zip unpack it and run install.bat and setpath.bat.
> 
> Is it a fresh installation? Or should I from time to time 
> erase my installation and run install.bat to create a new 
> distribution?

This is not a *fresh* install. In fact, you can simply run
./install.bat - there is no need to download context-win64.zip.

Having said that, the latest problem with the update has to do with an
updated luametatex binary, so your method might have worked by updating
the binary with the unzip, even if it is not a "fresh" install.

Alan


-- 
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://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] TUG 2023

2023-01-06 Thread Alan Braslau via ntg-context
On Thu, 5 Jan 2023 18:20:14 +0100
Hans Hagen via ntg-context  wrote:

> The only meeting in my agende is the ctx meeting later that year, so
> no plans.

The seventeenth ConTEXt meeting will take place in Prague–Sibřina,
Czech Republic on

September 10th–16th, 2023



Anyone who has not been to Sibřina is missing something!
(I say with likely regret, not expecting to be able to attend.)

Alan
___
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] MP figure continuation

2023-01-06 Thread Alan Braslau via ntg-context
On Fri, 6 Jan 2023 15:43:07 +0100
Alexandre Christe via ntg-context  wrote:

> Dear list,
> 
> Is there a way to "continue" an MP figure? Like keeping the axes,
> etc. and just adding code to the figure?
> 
> Maybe I missed something, otherwise I'd find it super useful.
> 
> Thanks in advance and happy new year,
> Alex

Another solution is to save the picture:

\startMPcode

draw fullcircle scaled 1cm ;
picture mypicture ; mypicture := currentpicture ;

\stopMPcode

Then, the next call to \startMPcode (or whatever you use) will have
access to the saved picture.

\startMPcode

currentpicture := mypicture ;
draw unitsquare scaled 1cm withcolor red ;

\stopMPcode

currentpicture is reset for each MP call.

Of course, you must not use
save mypicture ; picture mypicture ;
because that will make it local.

Alan
___
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] Math bug (maybe) - prime

2022-12-28 Thread Alan Braslau via ntg-context
On Wed, 28 Dec 2022 08:26:24 +0100
Mikael Sundqvist via ntg-context  wrote:

> Note that the 2 sits higher in
> 
> \primed{a}^2
> 
> than it does in
> 
> (a')^2.
> 
> For readability, I really prefer the version with parentheses.

Certain Mathematical writing styles seek to minimize the use of
parenthesis ...

Now, the question is whether a prime is considered an exponent or
rather some sort of accent? One can ask the same question considering
other modifiers such as asterisk/star or even $\hat{a}$. Sometimes,
these can symbolize operators, in other cases they may indicate a
variant (as does prime).

I suspect that Context is currently treating $\primed{a}^2$ as
${a^{\prime}}^2$ (although, maybe the 2 is not made smaller?).

Aesthetically, should $x^2$ and $\hat{x}^2$ display any difference in
the placement of the exponent?

Alan

P.S. As a challenge, consider the following:
\chemical{^{14}_6C^*}
(a chiral carbon-14 atom).
___
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] Math bug (maybe) - prime

2022-12-27 Thread Alan Braslau via ntg-context
On Wed, 28 Dec 2022 00:27:39 +0100
Hans Hagen via ntg-context  wrote:

> What you can do is:
> 
> $\primed{a}^2$
> 
> which basically makes the prime an operation .. a small price to pay
> for more robust handling of primes (also across fonts)

I anticipated that (unicode) prime is a pain to handle, given that
different fonts present it differently.

$\primed{a}...$ is a very readable and reasonable solution (unlike
\mathord{}, which seems to be a messy fix). I will learn and use that.

Thank you!

Alan 

P.S. inverting the order of the "exponents", if prime is some sort of
exponent, was a surprising result.
___
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] Math bug (maybe) - prime

2022-12-27 Thread Alan Braslau via ntg-context
MWE:

\starttext

$a^2′$

$a′^2$

$\mathord{a′}^2$

$a^*^2$

\stoptext


Should the \mathord{} be necessary to get the desired result?
(I would expect the second line to work, just like $a^*^2$.)

Alan
___
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] bottlenecks

2022-12-18 Thread Alan Braslau via ntg-context
On Sat, 17 Dec 2022 22:35:04 +0100
Hans Hagen via ntg-context  wrote:

> > mkiv lua stats  > runtime: 17.027 seconds, 578 processed pages, 578
> > shipped pages, 33.946 pages/second  
> 
> that's quite decent i guess

I certainly don't complain!

CPU: 11th Gen Intel(R) Core(TM) i7-11700 @ 2.50GHz (2496.00-MHz
K8-class CPU)
FreeBSD/SMP: Multiprocessor System Detected: 16 CPUs
FreeBSD/SMP: 1 package(s) x 8 core(s) x 2 hardware threads

ZFS file system, pooled.
(system on 2 mirrored SSDs and user files on 3 mirrored HDDs)

> > system  | total runtime: 68.547 seconds of 68.576 seconds  
> the fact that we have multiple runs make any optimization count for
> more than on a single run

Yes, absolutely! :-)

Alan
___
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] Command line arguments on context project

2022-12-18 Thread Alan Braslau via ntg-context
On Fri, 16 Dec 2022 16:14:33 +
Jethro Djan via ntg-context  wrote:

> 2. How do I get CoTeXt to recognise the ref.bib file when I run the
> components not the product?
> 
> For context, I don’t want the references printed at the end of each
> chapter but I would like the in-text citation to work (if that is
> possible). If not, is it possible compile the whole product but only
> output a certain page range?

You need to include the \usebtxdataset [ref.bib] in an environment file
that gets read each run.

A limitation, or rather a design goal, of the bibliography subsystem is
that citations will not work unless you render the bibliography list.
Why is this? The reasoning is that it makes no sense to give list
numbers or list labels (e.g. APA : authoryear) if there is no list, for
these numbers or labels depend on the context (bibliography by chapter,
by part, by volume, or by book, for example).

We have not done much with same page, footnote bibliographic
references. I do not use that style as I always like having a
bibliography list.


Best is to compile the entire product and then use some tool (qpdf,
pdftk, etc.) to select out a certain range of pages. ConTeXt has gotten
fast enough that this should not be a real problem.

Alan
___
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] Structure: multi-volume products

2022-12-18 Thread Alan Braslau via ntg-context
On Fri, 16 Dec 2022 06:57:44 -0700
Alan Braslau via ntg-context  wrote:

> On Fri, 16 Dec 2022 09:08:47 +
>  wrote:
> 
> > Last time I had to do something like this I've kept both books in
> > one master file (actually one master file for part 1, one for part
> > 2, one for both together). With that I could easiliy have a table of
> > contents for both volumes.  
> 
> Thank you. This was my initial approach, although I know that ConTeXt
> can do better!
> 
> I will look into the suggestion sent by Richard Mahoney, as it looks
> like a good solution to the problem.

In fact, Richard does NOT render the TOC of Volume 2 in Volume 1, nor
the TOC of Volume 1 in Volume 2, only the TOC of each volume,
respectively.




I have tried using

\useexternalfile [VolI] [Book_VolumeI] [{Volume I}]

(in Book_VolumeII.tex) to read in the Book_VolumeI.tuc


With this, I can indeed use

\from [VolI]

to add the file::Book_VolumeI.pdf hyperlink with the text "Volume I".

However, \in{Chapter} [VolI::ch:mychapterreference] gives no number
(but ?? does not get substituted and VolII::ch:mychapterreference does
NOT return a missing reference message in the Book_VolumeII.log file).

Alan


P.S.
Once that works, maybe I can figure out how to render the TOC.
I would expect/hope that

\placecontents [criterium=VolI::all]

would be the way to go.
___
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] Change in \vec behavior

2022-12-18 Thread Alan Braslau via ntg-context
On Sun, 18 Dec 2022 19:37:17 +0100
Jean-Philippe Rey via ntg-context  wrote:

> What is the rationale for the change in \vec? Is there a way to get
> the previous behavior back?

I certainly hope that this is a bug (and not a "design choice").

Alan
___
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] bottlenecks

2022-12-17 Thread Alan Braslau via ntg-context
With lots of MetaPost, lots of references, lots of figures, lots of tables, 
lots of bibliography entries, lots of chemical structures, ...


mkiv lua stats  > used config file: selfautoparent:/texmf/web2c/texmfcnf.lua
mkiv lua stats  > used cache path: 
/home/braslau/context/beta/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e
mkiv lua stats  > resource resolver: loadtime 0.003 seconds, 0 scans with 
scantime 0.000 seconds, 0 shared scans, 98 found files, scanned paths: 
mkiv lua stats  > stored bytecode data: 507 modules (0.117 sec), 106 tables 
(0.000 sec), 613 chunks (0.117 sec)
mkiv lua stats  > traced context: maxstack: 5959, freed: 2352, unreachable: 3607
mkiv lua stats  > cleaned up reserved nodes: 101 nodes, 15 lists of 439
mkiv lua stats  > node memory usage: 2491 attribute, 76 boundary, 84 dir, 1167 
glue, 85 gluespec, 430 glyph, 242 hlist, 333 kern, 32 math, 647 mathspec, 238 
par, 328 penalty, 88 rule, 2 temp, 100 vlist, 18 whatsit
mkiv lua stats  > node list callback tasks: 13 unique task lists, 376 instances 
(re)created, 147276 calls
mkiv lua stats  > h-node processing time: 4.724 seconds including kernel
mkiv lua stats  > attribute processing time: 0.202 seconds front- and backend
mkiv lua stats  > driver time: 1.419 seconds 
mkiv lua stats  > used backend: pdf
mkiv lua stats  > jobdata time: 0.224 seconds saving, 0.068 seconds loading
mkiv lua stats  > callbacks: file: 32365, saved: 278423, direct: 486, function: 
259776, value: 579, message: 0, bytecode: 613, late 0, total: 572242 (990 per 
page)
mkiv lua stats  > randomizer: resumed with value 0.86690391712354
mkiv lua stats  > v-node processing time: 0.186 seconds 
mkiv lua stats  > loaded tex modules: 2 requested, all found (*-graph *-three)
mkiv lua stats  > loaded patterns: de::3 en::1 fr::63, load time: 0.000
mkiv lua stats  > interactive elements: 12106 references, 5886 destinations
mkiv lua stats  > loaded fonts: 5 files: cambria.ttc, cambriab.ttf, 
cambriai.ttf, dejavusansmono-oblique.ttf, dejavusansmono.ttf
mkiv lua stats  > font engine: otf 3.131, afm 1.513, tfm 1.000, 73 instances, 
65 shared in backend, 5 common vectors, 60 common hashes, load time 1.571 
seconds 
mkiv lua stats  > body font sizes: defined: 10pt 11pt 12pt 14.4pt 17.3pt 20.7pt 
4pt 5pt 6pt 7pt 8pt 9pt, undefined: 18pt 21.6pt
mkiv lua stats  > metapost: 1.277 seconds, loading: 0.083, execution: 1.260, n: 
881, average: 0.003, instances: 6, luacalls: 108876 (file: 90144, text: 0, 
script: 10120, log: 8568), memory: 30.514 M
mkiv lua stats  > math tweaking time: 0.852 seconds, 96 math goodie tables
mkiv lua stats  > math processing time: 0.158 seconds 
mkiv lua stats  > chemical formulas: 58 chemical structure formulas
mkiv lua stats  > graphics processing time: 0.414 seconds including tex, 264 
processed images, 220 unique asked, 200 bad names
mkiv lua stats  > publications load time: 0.026 seconds, 584341 bytes, 835 
definitions, 14 shortcuts
mkiv lua stats  > pdf annotations: 12106 links (11765 unique), 0 special
mkiv lua stats  > font embedding time: 0.016 seconds, 7 fonts
mkiv lua stats  > result saved in file: Cristaux_Liquides_tome2.pdf, 
compresslevel 1, objectcompresslevel 3
mkiv lua stats  > positions: 2708 collected, 769 deltas, 2645 shared partials, 
484 partial entries
mkiv lua stats  > cross referencing: 13943 identified, 34 unknown
mkiv lua stats  > used platform: freebsd-amd64, type: unix, binary subtree: 
texmf-freebsd-amd64
mkiv lua stats  > used engine: luametatex version: 2.1004, functionality level: 
20221214, format id: 679, compiler: clang
mkiv lua stats  > tex properties: 740852 hash slots used of 2097152, 50741 
control sequences, approximate memory usage: 125 MB
mkiv lua stats  > lua properties: engine: lua 5.4, used memory: 301 MB, ctx: 
275 MB, max: 445 MB, symbol mask: utf (τεχ)
mkiv lua stats  > runtime: 17.027 seconds, 578 processed pages, 578 shipped 
pages, 33.946 pages/second
system  | total runtime: 68.547 seconds of 68.576 seconds

Alan
___
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] Structure: multi-volume products

2022-12-16 Thread Alan Braslau via ntg-context
On Fri, 16 Dec 2022 22:31:59 +1300
Richard Mahoney | Indica et Buddhica 
wrote:

> Alan,
> 
> I'm attaching the two master files used for the following (also ran
> cross refs between
> each vol.):
> 
> Murugaiyan, Appasamy & Parlier-Renault, Édith (2021) (Eds) Whispering
> of Inscriptions:
> South Indian Epigraphy and Art History: Papers from an International
> Symposium in
> memory of Professor Noboru Karashima (Paris, 12–13 October 2017).
> Oxford: Indica et
> Buddhica. (2 vols)
> 
> https://indica-et-buddhica.com/publications/murugaiyan-appasamy-parlier-renault-edith/whispering-of-inscriptions-south-indian-epigraphy-and-art-history
> 
> 
> Best, Richard
> 
> 

Shared to the list, without the attached files. Based on the command:

\useexternaldocument
https://wiki.contextgarden.net/Command/useexternaldocument

I'll make a solution Wiki page on the garden once I learn how this
works.

Alan
___
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] Structure: multi-volume products

2022-12-16 Thread Alan Braslau via ntg-context
On Fri, 16 Dec 2022 13:59:20 +
 wrote:

> What was his approach? Did he probably send it off-list?
> 
It was sent on the list:

To: ntg-context@ntg.nl
Subject: Re: [NTG-context] Structure: multi-volume products
Date: Fri, 16 Dec 2022 22:31:59 +1300

Alan
___
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] Structure: multi-volume products

2022-12-16 Thread Alan Braslau via ntg-context
Thank you,

This looks like a good solution!
I will try it later, as soon as I can.

Alan


On Fri, 16 Dec 2022 22:31:59 +1300
Richard Mahoney | Indica et Buddhica 
wrote:

> Alan,
> 
> I'm attaching the two master files used for the following (also ran
> cross refs between
> each vol.):
> 
> Murugaiyan, Appasamy & Parlier-Renault, Édith (2021) (Eds) Whispering
> of Inscriptions:
> South Indian Epigraphy and Art History: Papers from an International
> Symposium in
> memory of Professor Noboru Karashima (Paris, 12–13 October 2017).
> Oxford: Indica et
> Buddhica. (2 vols)
> 
> https://indica-et-buddhica.com/publications/murugaiyan-appasamy-parlier-renault-edith/whispering-of-inscriptions-south-indian-epigraphy-and-art-history
> 
> 
> Best, Richard

___
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] Structure: multi-volume products

2022-12-16 Thread Alan Braslau via ntg-context
On Fri, 16 Dec 2022 09:08:47 +
 wrote:

> Last time I had to do something like this I've kept both books in one
> master file (actually one master file for part 1, one for part 2, one
> for both together). With that I could easiliy have a table of
> contents for both volumes.

Thank you. This was my initial approach, although I know that ConTeXt
can do better!

I will look into the suggestion sent by Richard Mahoney, as it looks
like a good solution to the problem.

Alan

-- 
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://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] Structure: multi-volume products

2022-12-15 Thread Alan Braslau via ntg-context
Hello,

I have a book project that is being cut into two volumes (because it is
too long and will be sold as a boxed set).

Each volume is presently a separate *product* in the project structure.
I presently set the counters in the second volume using:

\setupheadnumber
  [part] [2]

\setupheadnumber
  [chapter] [5]

(I have multiple [5] parts in the project, and the first volume ends
with part 2 and chapter 5.)


1) Is this the right way to be handling this?

2) Any suggestions on how I can put a Table of Contents for the first
volume in the second volume?

Thanks!

Alan
___
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] new upload

2022-10-18 Thread Alan Braslau via ntg-context

On 18/10/2022 09:40, Pablo Rodriguez via ntg-context wrote:

A complete install has revealed the real cause of the slow download: the
antivirus software (that works like crap).


My antivirus software is called ... Unix ;-)
___
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] atan2 function

2022-10-14 Thread Alan Braslau via ntg-context
On Fri, 14 Oct 2022 16:09:41 -0700
Thangalin  wrote:

> Would making the conditional part of the API be useful to others?

Of course, $\tan^{-1}(\pm 1)$ is undefined (mathematically).

Alan
___
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] atan2 function

2022-10-14 Thread Alan Braslau via ntg-context
On Fri, 14 Oct 2022 11:59:49 -0700
Thangalin  wrote:

> I don't think an atantwo is needed. I *thought* I had read somewhere
> that atan( y, x ) was equivalent to calling atan2 in Lua. Ensuring
> there's no breakage when x == y would be nice, though. It was a little
> surprising to see angle return degrees rather than radians, but it
> does simplify my code:
> 
>   dc := vbc - vac;
>   dr := vbr - var;
>   vi := 0;
> 
>   if not( dc == dr ):
> vi := round( angle( dc, dr ) / 60 );
>   fi;
> 
>   % Compute the direction towards the first segment (to vertex of
> an edge). vangle := vi * 60 * pi / 180;
> 
> Even simpler would be:
> 
>   dc := vbc - vac;
>   dr := vbr - var;
>   vi := round( angle( dc, dr ) / 60 ); % returns 0 when dc == dr
> 
>   % Compute the direction towards the first segment (to vertex of
> an edge). vangle := vi * 60 * pi / 180;
> 
> Or accepting a third argument as the return value in the special case:
> 
>   vi := round( angle( dc, dr, 0 ) / 60 ); % returns 0 when dc ==
> dr
> 
> Cheers!

vi := if (dc = dr) : 0 else : round (angle(dc,dr)/60) fi ;

Alan
___
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] issues with current latest

2022-10-14 Thread Alan Braslau via ntg-context
On Fri, 14 Oct 2022 16:33:12 -0600
Max Chernoff  wrote:

> Do you know how to rebuild the format? I've tried the following to no
> avail:
> 
> --script mtx-context

I believe that you have to give the full script path here to mtxrun

Alan
___
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] issues with current latest

2022-10-14 Thread Alan Braslau via ntg-context
On Fri, 14 Oct 2022 15:38:52 -0600
Max Chernoff via ntg-context  wrote:


   $ context --luatex test.tex
   mtx-context | redirect luametatex -> luatex: luatex --luaonly 
"/opt/context/tex/texmf-linux-64/bin/mtxrun.lua" --script mtx-context --luatex 
test.tex --redirected
   mtxrun  | unknown script 'mtx-context.lua' or
'mtx-mtx-context.lua'

This happens when the luatex cache is cleared and the context format is not 
rebuilt properly.

Alan

___
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] (any) neovim users?

2022-10-14 Thread Alan Braslau via ntg-context
On Fri, 14 Oct 2022 18:59:24 - (UTC)
Nicola via ntg-context  wrote:

> Yours is a valid concern, but maintaining (Neo)Vim plugins is
> a community effort. I took over the development of the ConTeXt plugin
> because I wanted to improve the support for ConTeXt in Vim, and at the
> time the plugin had no active maintainer. In the same way, an
> unsatisfied user might take over the development of a ConTeXt plugin
> for NeoVim, or maybe even for both systems. Anyone can submit a
> patch, and I would welcome a co-maintainer, or even someone who would
> like to take over. I alone simply do not have enough capacity to wet
> my feet in two rivers.
> 
> Indeed, if you or someone reading this would like to steer the
> direction of future development of those plugins, let me know!

I thank you and any/everyone in the community who contributes in an
way, and of course my question was not meant as a critique of any tool
or package or plugin.


In fact, I do *not* use any plugin functionality such as async
typesetting. I do find syntax (color) highlighting helpful, sometimes
(when it works ;-) It generally presently has many problems.

Neovim integrates a lua parser. Unfortunately, I believe that it is
still lua 5.1. Nevertheless, it could possibly benefit from the
(maintained) lpeg Context syntax parser.

Getting an error message now with %@context is annoying. Hopefully,
somebody on this mailing list may know and care something about this.

Alan
___
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] (any) neovim users?

2022-10-14 Thread Alan Braslau via ntg-context
On Fri, 14 Oct 2022 18:59:24 - (UTC)
Nicola via ntg-context  wrote:

> > I wonder why a lua error is reported?  
> 
> Sorry, I should have said that I am only *assuming* that what I wrote
> may be the reason for the error. In fact, I have now tried to open
> a file starting with %, and I get no error. This with NeoVim
> v0.7.2.

The error has appeared with neovim v.0.8.0.

Alan
___
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] (any) neovim users?

2022-10-14 Thread Alan Braslau via ntg-context
On Fri, 14 Oct 2022 16:48:42 - (UTC)
Nicola via ntg-context  wrote:

> On 2022-10-14, Alan Braslau via ntg-context 
> wrote:
> > A recent upgrade of the editor neovim leads to the following error
> > when using % identification at the head of .tex source
> > files.  
> 
> The ConTeXt plugin (as well as MetaPost and MetaFont ones) has
> recently been rewritten in Vim 9 script (the new scripting language
> embedded in Vim), which NeoVim does not support, afaik. See this
> thread: https://github.com/vim/vim/issues/10968.
> 
> One thing you can do is: grab the old runtime files and put them in
> you own ~/.vim directory (following a similar layout). You may get
> those from the `runtime` folder of the Vim project:
> https://github.com/vim/vim, or from NeoVim repo. Just checkout
> a revision with the old scripts (searching for "update runtime" in the
> commit logs should help you filter the relevant commits).
> 
> Nicola

Thank you,

I wonder why a lua error is reported?

I also worry that %@context support has now diverged (for whatever reason) and 
that Context highlighting is now limited to the one "vim" variant of the vi 
editor. Using old runtime files in one's personal .vim directory locks one into 
unmaintained (by the Context community) syntax. I wish that a better solution 
were available.

Beyond this, I would think that neovim with lua scripting would be greatly 
preferable to vim9scripting. Indeed, while I do not know anything about the 
details, perhaps it could even use the same lpeg code as developed for the 
Scite editor.

Alan
___
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] (any) neovim users?

2022-10-14 Thread Alan Braslau via ntg-context
A recent upgrade of the editor neovim leads to the following error
when using % identification at the head of .tex source files. 


Error detected while processing BufReadPost Autocommands for "*":
Error executing lua callback: 
/usr/local/share/nvim/runtime/lua/vim/filetype/detect.lua:1248: attempt to 
index local 'format' (a number
 value)
stack traceback:
/usr/local/share/nvim/runtime/lua/vim/filetype/detect.lua:1248: in 
function 'ft'
vim/filetype.lua:2362: in function 'dispatch'
vim/filetype.lua:2522: in function 'match'
/usr/local/share/nvim/runtime/filetype.lua:12: in function


Has anyone encountered this? (perhaps it has been fixed upstream?)

Alan


-- 
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://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] atan2 function

2022-10-14 Thread Alan Braslau via ntg-context
On Fri, 14 Oct 2022 10:07:19 +0200
Hans Hagen via ntg-context  wrote:

> So you suggest to add atantwo? As side note, you can redure your 
> definition to:
> 
>  vardef atantwo(expr dy, dx) =
>  if dx == 0 :
>  if dy < 0 : - fi pi / 2
>  else :
>  atan(dy/dx) if dx > 0 : if dy < 0 : - else : + fi pi fi
>  fi
>  enddef ;
> 
> going further makes us end up in an one-line obscurity

An absurdity, as further discussion on this thread has shown:
atan is derived from angle, which is essentially atan2.
There is no need to circle around.

As a side point, I now use MP doubleprecision mode by default, although
I do believe that it is still preferable to use classic scaled integer
mode (and minifun) for text graphical embellishments. The only
practical point to consider when using doubleprecision mode for me is
the need to explicitly use format with "decimal i" to round the text
rendering of numbers.

Alan
___
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] new upload

2022-10-14 Thread Alan Braslau via ntg-context
On Fri, 14 Oct 2022 16:14:01 +0200
Pablo Rodriguez via ntg-context  wrote:

> I have discovered that it includes in
> tex/texmf-context/source/luametatex what should be the LMTX source
> (about 11MB).
> 
> I wonder whether this could be made optional. Internet speed is not
> constant where I live and it was impossible for me to update at work
> (after many attempts to download the newer version).

Subsequent installs should only download source files that have been
changed, so the download should be faster (also for the font files :-)

I applaud the inclusion, by default, of the luametatex source files.

Thank you everyone who has contributed to this.

Alan
___
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] atan2 function

2022-10-14 Thread Alan Braslau via ntg-context

Are you using MP in scaled integer or in doubleprecision mode?

I have not looked into the MP angle operator code, but my suspicion is 
that it is based on some super-clever John Hobby scheme optimized for 
scaled integer calculations.


Hans has integrated the entire math library (and more) into lmtx.

On 13/10/22 13/10/22, 13:51, Thangalin via ntg-context wrote:

Thank you, Max.

The angle function doesn't appear to provide the same calculation as
my atantwo in all cases.

https://pdfhost.io/v/Oqj7XmibJ_scaled

The shorter line segment should be directed towards the vertex closest
to the longer line segment. I tried using both:

 theta := angle( dx, dy );
 theta := angle( dy, dx );

Neither made a difference, in some cases the angle differs from what I'd expect.

My implementation is based on the first version given here:

https://en.wikipedia.org/wiki/Atan2#Definition_and_computation

I have something that works, so this is more of a curiosity as to
there being a difference between my implementation of atantwo and the
angle function.

Here's an example with many lines and the angle function:
https://pdfhost.io/v/1T4jgBnxh_scaled

On Wed, Oct 12, 2022 at 11:42 PM Max Chernoff  wrote:


Hi,


How is atan2 called? I rolled my own as follows:



Is atan with two parameters supposed to behave like atan2?


At mp-math.mpxl:167 there is:

vardef atan   primary x = angle(1,x)   enddef ;

The MetaPost manual says:

The angle operator takes a pair and computes the two-argument
arctangent; i.e., angle is the inverse of the dir operator

So it looks like "angle" is the function that you want for "atan2".

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


\

___
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] Spacing in \unit - degrees

2022-10-13 Thread Alan Braslau via ntg-context
On Wed, 12 Oct 2022 21:14:52 -0600
Gavin  wrote:

> As a recovering string theorist, I cannot help but speculate that
> this rule extends to spherical coordinates in any number of
> dimensions. However, if you don’t want the space, you can use
> 135\unit{℃}, which does not add a space.

Will 135\unit{℃} ever break between the digits 135 and the "unit"?
I agree that \unit should probably use an \mbox to prevent unwanted
breaks.

The other role of \unit, I understand, is to uniformize the
representation of numbers (digits).

> > Related,
> > \unit{90°} does not seem to introduce a space, as indeed it should
> > not.  

So ℃ needs to be registered as a degree and prevent any spacing.

> Also related, using \unit for just the units, and not the number, is
> useful when they follow something that is not a number, like a
> vector: $ \vec v = (4.0, -3.2, 1.5)\unit{m/s} $. You frequently do
> not want a space in that situation.

Why would one not want a (small) space before m/s in the above
example?

Alan
___
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] Spacing in \unit - degrees

2022-10-12 Thread Alan Braslau via ntg-context
Further \unit question(s):

\unit{135℃} adds a space after the digits 135.
I do not believe that this is correct
(for ℃ is *not* a "real" unit, unlike \unit{408.15 K} which *is* a real
unit).

Also,
\unit{135°C} drops the "C". Is this a parsing bug?

Related,
\unit{90°} does not seem to introduce a space, as indeed it should not.

Alan
___
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] \quotation, protrusion and linebreaking

2022-10-12 Thread Alan Braslau via ntg-context

On 12/10/22 12/10/22, 14:25, Wolfgang Schuster via ntg-context wrote:

Denis Maier via ntg-context schrieb am 12.10.2022 um 21:17:

Instead of what?


By default the symbols are placed with a box because you aren't limited
to normal quotation marks.

\setupexternalfigure [location=default]

\setupdelimitedtext
   [quotation]
   [ left={\externalfigure[cow][height=\strutht]},
    right={\externalfigure[cow][height=\strutht]}]


I *like* cow delimiters (but shouldn't the right one be reflected?) ;-)

Alan

___
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] Spacing in \unit

2022-10-09 Thread Alan Braslau via ntg-context
On Sat, 8 Oct 2022 11:59:04 -0600
Gavin via ntg-context  wrote:

> I’m trying to fix four issues:
>   - No space between the number and the following units. Should be a
> thin space.
>   - No space between the units and the following symbol (+ and =
> above). Should be appropriate “bin" or “rel" space.
>   - Too much space around the \cdot in the units. Should be treated
> like an “ord" when used to separate units.
>   - Too much space around the \times in the scientific notation.
> Should be treated like an "ord" when used in scientific notation.
> (I'm not sure there is consensus on this.)

Gavin (and the mailing list),

I would very strongly argue that the space between the number and the
following units be UNBREAKABLE. Perhaps a thin space (preference), but
most certainly non-breakable.

Similarly around the times in scientific notation.

I further cannot imagine that a line break be acceptable around a \cdot
in composite units.

This can possibly lead to overfill and underfill, something that I find
*infinitely* more acceptable then breaking numbers and units.

I do not know or use the \units command. Maybe it uses unbreakable
spaces, maybe not. I would never use it unless it could be configured
to only use nonbreakable spaces. 

Perhaps others feel differently?

Alan
___
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] Command for specifying et al limit

2022-09-27 Thread Alan Braslau via ntg-context
On Tue, 27 Sep 2022 13:33:20 +
jethro Reuel via ntg-context  wrote:

> I want something like:
> 
> Bronstein et al. says in their paper…
> 
> I found the etaldisplay affects the display of the references and I
> don’t want that. 

Try

\setupbtx[apa:cite]

and leave [apa:list] alone.

Alan
___
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] Command for specifying et al limit

2022-09-26 Thread Alan Braslau via ntg-context
On Mon, 26 Sep 2022 21:40:14 -0600
Alan Braslau via ntg-context  wrote:

> On Sat, 24 Sep 2022 18:57:25 +
> Jethro Djan via ntg-context  wrote:
> 
> > \setupbtx[
> >   dataset=ref,
> >   etaldisplay = 1,
> >   etallimit = 1,
> > ]
> 
> Remove extra spaces.

Sorry,

Try

\setupbtx
  [apa:list]
  [etaldisplay=1,
   etallimit=1]

and drop the 

\definebtxrendering
  [ref]


I have not tested your example, but the bibliography subsystem creates
many inherited namespaces, so changing parameters in a general
namespace after inheritance has occurred (in the definitions) has no
effect.

Of course, the etaldisplay and etallimits are set to the APA standard
in the APA definitions.

Alan
___
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] Command for specifying et al limit

2022-09-26 Thread Alan Braslau via ntg-context
On Sat, 24 Sep 2022 18:57:25 +
Jethro Djan via ntg-context  wrote:

> \setupbtx[
>   dataset=ref,
>   etaldisplay = 1,
>   etallimit = 1,
> ]

Remove extra spaces.

Alan
___
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] PDF viewer

2022-09-22 Thread Alan Braslau via ntg-context
On Thu, 22 Sep 2022 18:47:50 -0600
Max Chernoff via ntg-context  wrote:

> I've been using pdf.js almost exclusively for the past few years
> either via Firefox or VS Code, and I've never really had any
> problems. The only real issue that I've had is that it gets fairly
> slow with documents over a few thousand pages long. Otherwise, it
> seems pretty fast and stable, and it supports nearly every feature
> that I tend to need.

I have never used firefox to display pdf files. I just tried it and
find that it has an interesting feature of caching rendered pages.

Pages with complicated graphics (think MetaPost with hundreds of
thousands of objects) get rendered pretty quickly, although one can see
the very many objects being drawn the first time the page is displayed.
Subsequently displays of these pages have no lag whatsoever.

Alan
___
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] How can I make a Gentoo Linux package for ConTeXt LMTX?

2022-08-15 Thread Alan Braslau via ntg-context

I believe that you are missing the point of LMTX.

LMTX Context is intended to be a self-contained AND PORTABLE directory 
tree. It does not need system installation paths and such and is 
designed to happily co-exist with system installed TeX (using packages) 
or TeXlive or others, without interference. The LMTX directory tree is 
very light-weight and indeed many production users might keep a separate 
copy with EACH major TeX project, thus ensuring that the project will 
continue to compile without changes as LMTX evolves. This strategy can 
be a successful insurance that very old projects will continue to 
compile yielding the same results many years later.


Not that you need to go that far.

Many users install LMTX for a system-wide use in some commonly 
accessible location. This is totally portable: only the PATH needs to be 
set to find the correct context executable.


LMTX does not go the route of system packages as this relies on package 
maintainers. ConTeXt mkiv with luatex continues to be made available and 
updated with TeXlive, so any system packages that provide TeXlive can 
provide ConTeXt.


Alan



On 15/08/2022 07:54, amano.kenji via ntg-context wrote:

 From my perspective, a few optimizations for system installation need to 
happen for ConTeXt.

contextcnf.lua needs to support system installation paths.

Arch Linux texlive-core packages has its own patched version of texmfcnf.lua 
that sets TEXMFSYSVAR=/var/lib/texmf, TEXMFOS=/usr/share, 
TEXMFDIST=/usr/share/texmf-dist, and TEXMFSYSCONFIG=/etc/texmf.

TexLive's own version of texmfcnf.lua is not suitable for system-wide 
installation.

contexcnf.lua assumes all paths are relative to /path/to/extracted-archive 
which is definitely not a system-wide installation.

A system-wide installation is installed to absolute paths.

On top of that, there needs to be a document called INSTALLATION or BUILD that 
offers a simplified version of build/installation instructions contained in 
install.sh, mtx-install.lua, and mtxrun.lua. It seems mtxrun can be used to 
build and install ConTeXt without internet access as long as all dependencies 
are already present.

If ConTeXt is optimized for system-wide installation by modifying 
contextcnf.lua and adding INSTALL or BUILD, then all POSIX-like operating 
systems will be able to easily make packages for ConTeXt. Not just Gentoo Linux.

Can anyone help me with optimizing ConTeXt for system-wide installation?

--- Original Message ---
On Monday, August 15th, 2022 at 12:12 PM, Bruce Horrocks  
wrote:



On 15 Aug 2022, at 13:03, amano.kenji via ntg-context ntg-context@ntg.nl wrote:

TexLive has texmfcnf.lua that doesn't really work with texlive-context 
installed by linux distributions.

Arch Linux has its own patched version of texmfcnf.lua.

It seems I'd be better off with a linux package for ConTeXt LMTX.

How can I build and install ConTeXt LMTX on Gentoo Linux or any linux 
distribution?

I wish it was as simple as ./configure, make, and make install.



Install instructions for LMTX on Linux are here:
https://wiki.contextgarden.net/Installation


It's pre-built so there are no make steps.

Try it and ask again if you have problems. :-)

—
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://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
___



--
--
Alan
___
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] How to display these characters

2022-08-08 Thread Alan Braslau via ntg-context

On 05/08/22 05/08/22, 12:13, Henning Hraban Ramm via ntg-context wrote:


I recently had the same problem and was wondering if there isn’t a 
Metapost module for directory trees?


There is a Metapost/Context module for drawing flow charts that should 
handle this nicely.


There is also a Metapost module for drawing relational charts ("nodes") 
that could be another approach.


--
Alan
___
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] mp-geo Metapost package with ConTeXt

2021-07-27 Thread Alan Braslau via ntg-context

On 27/07/21 08:12, Gavin via ntg-context wrote:

Hi All,

Getting Closer I asked:


2) While I’m having good luck with paths, colors are causing trouble. In the 
data set the color information is in strings with French names of the color, 
like “rouge.” If I hand this string to MetaPost, MetaPost doesn’t expand it 
into a color. It does work if it is a native color, like “red,” but not if it 
is a defined color and not if the color is in a Lua variable. Any suggestions?


Aditya suggested:


\definecolor[rouge][red] should work. A better option will be use color 
palettes.


This solves my problem of translating French colors into English, but not the 
problem of passing colors from Lua to MetaPost. If the string giving the color 
name is in a variable, it doesn’t go through. A path in a variable works.

I’ve reduced my MWE below – no French, no MPinclusions, no new colors. Both pie 
slices should be red, but one is black. Any ideas on getting the color “red” 
passed from Lua to MetaPost when mycolor=“red”?


I am not looking closely at the code, but in general we use

fill fullcircle scaled 1cm withcolor red ;

and this takes Metapost's knowledge of red, the rgb triplet (1,0,0).
One can also use

fill fullcircle scaled 1cm withcolor "red" ;

as a string (quotation) and this passes Context's definition of the color.

Alan



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

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