[NTG-context] index sort order (de)

2024-05-14 Thread Henning Hraban Ramm

Hi,
I checked the German index sorting rules, and as far as I can tell, all 
of them are somewhat wrong.


– de, default, or no setting (just mainlanguage de)
– Duden
- DIN 5007-1(:2005)
- DIN 5007-2(:1996)
- de-AT

IMO, "Duden" is obsolete, should be the same as default; it makes no 
sense to have a default setting that doesn’t adhere to the official 
rules. If Û#m not mistaken it’s also the same as DIN 5007-1; maybe there 
was a difference before 2005. (DIN 5007-2 and de-AT have their uses.)


The order of umlauts etc. should be ok.

[ß]
In tex/context/base/mkiv/sort-lan.lua, ß is replaced by s, while it 
should be sorted like ss in default and both DIN versions. (de-AT sorts 
ss after ß.)


[upper-/lowercase]
While casing is not mentioned in Wikipedia 
(https://de.wikipedia.org/wiki/Alphabetische_Sortierung), Duden „Satz 
und Korrektur“ says:


Uppercase characters get sorted the same as lowercase (i.e. mixed), but 
if both appear, lowercase comes first.


ATM all German settings sort lowercase behind uppercase.



Generally, default method seems to be not "default" but "before". Does 
this make sense?


If we look at the method presets, there’s none for {zm,pm,zc,zm,uc} 
(upper like lower, ignore diacritics – basic default for German).


"""
\mainlanguage[de]
\setupregister[index][language=de]

\starttext

\index{Apfel}
\index{Äpfel}
\index{apfel}
\index{äpfel}
\index{aepfel}
\index{Aepfel}
\index{Ápfel}
\index{ápfel}

\page
\completeindex

\stoptext
"""

default order should be:

aepfel
Aepfel
apfel
Apfel
äpfel
Äpfel
ápfel
Ápfel
aqua

DIN 5007-2 sorts like:

aepfel
Aepfel
äpfel
Äpfel
apfel
Apfel
ápfel
Ápfel
aqua

de-AT sorts like:

aepfel
Aepfel
apfel
Apfel
aqua
äpfel
Äpfel
ápfel
Ápfel




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

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


[NTG-context] Re: regular online meet-up

2024-05-08 Thread Henning Hraban Ramm

Reminder: This is tonight!

Am 03.05.24 um 22:40 schrieb Henning Hraban Ramm:

You’re invited to our regular online meet-up, this upcoming
Wednesday, May 8th, 19:00 CEST (UTC+2!)

at https://lecture.senfcall.de/hen-rbr-rku-oke
(same, but shorter: https://u.mtxrun.eu/ctxmtg)

ConTeXt users of all levels are welcome!

Do you have a subject that you’d like to talk about?

I’m hoping to hear about BachoTeX (have fun, everyone who’s there)!

Looking forward to seeing you,
Hraban


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

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


[NTG-context] Re: transparent color

2024-05-06 Thread Henning Hraban Ramm

Am 06.05.24 um 16:01 schrieb Jacob Kauffmann via ntg-context:



Am 06.05.2024 um 10:41 schrieb Hans van der Meer via ntg-context 
:

I would like to use a transparent version of an existing color. Thus
\definecolor[transparentcolor][color,t=0.2,a=1]
instead of
\definecolor[transparentcolor][r=..,g=..,b=..,t=0.2,a=1]
because I do not know the rgb values of the color that must be made 
transparent, only its name.

How to accomplish?


I think like this:

\definecolor[myred][r=.5]
\defineprocesscolor[myredish][myred][a=1,t=.2]


Oh, another one that I didn’t know. (Of course it’s in the source, but 
only Wolfgang knows all of it. ;-)


Hraban

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

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


[NTG-context] Re: transparent color

2024-05-06 Thread Henning Hraban Ramm

Am 06.05.24 um 10:41 schrieb Hans van der Meer via ntg-context:

I would like to use a transparent version of an existing color. Thus
\definecolor[transparentcolor][color,t=0.2,a=1]
instead of
\definecolor[transparentcolor][r=..,g=..,b=..,t=0.2,a=1]
because I do not know the rgb values of the color that must be made 
transparent, only its name.


How to accomplish?


Interesting task. Perhaps via multitone colors?
https://wiki.contextgarden.net/Spot_Colors

Otherwise you can use \definetransparency and \starttransparent around 
\color (or \startcolor).


Hraban

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

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


[NTG-context] Re: Switch number and enumeration text

2024-05-04 Thread Henning Hraban Ramm

Am 04.05.24 um 04:57 schrieb Jethro Djan:

Dear List,

I would like to get something like:

1.1 Theorem instead of Theorem 1.1.

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


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


Did you try:

text=,
stopper={ Theorem},

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

…


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

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


[NTG-context] regular online meet-up

2024-05-03 Thread Henning Hraban Ramm

You’re invited to our regular online meet-up, this upcoming
Wednesday, May 8th, 19:00 CEST (UTC+2!)

at https://lecture.senfcall.de/hen-rbr-rku-oke
(same, but shorter: https://u.mtxrun.eu/ctxmtg)

ConTeXt users of all levels are welcome!

Do you have a subject that you’d like to talk about?

I’m hoping to hear about BachoTeX (have fun, everyone who’s there)!

Looking forward to seeing you,
Hraban


(Same blurb as always:)

[Howto]
* No special software installation required; most modern browsers should 
work (WebRTC required).

* Open the URL above, accept the privacy statement,
* enter your name,
* click "join" (or "start" if you’re the first),
* click "with microphone", allow your browser to access it, check the audio.
* Your microphone is muted if you join. Activate microphone and/or 
camera with the buttons at the bottom.

* Minimize the default presentation with the "screen" button, bottom right.

* If you’d like to share your screen or upload a file, you can make 
yourself the presenter: Click on your user name, change the setting, 
then you’ll see the "screen sharing" button beside the camera button; 
also there’s now "manage presentations" behind the "plus" button.
Beware there is only one presenter at a time, so don’t kill someone 
else’s presentation.


[Technical hints]
* Sound is usually better if you use a headset (less noise for everyone).
* Connection problems are mostly due to low bandwidth or high latency on 
your side, e.g. with mobile connections.

* Sometimes leaving and re-entering helps.
* If audio/video doesn’t work for you, you can still use the text chat.
* Screen sharing needs a lot of bandwidth.
* BigBlueButton documentation applies: 
https://bigbluebutton.org/teachers/tutorials/


[Netiquette]
* Please use a name that we recognize from here. Some feel uncomfortable 
with anonymous lurkers.

* Mute your microphone while you’re not talking.
* It’s nice to show your face at least when you join.
* If there are connection problems, stop camera sharing.
* The room is set to “everyone’s a moderator“, I trust you...
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[NTG-context] Re: more register questions!

2024-05-03 Thread Henning Hraban Ramm

Am 03.05.24 um 22:24 schrieb Thomas A. Schmitz:

Hi Massi,

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


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

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


Would you contribute the complete solution to the wiki?
I find the case quite interesting.

Hraban

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

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


[NTG-context] Re: \par and \startlines

2024-05-01 Thread Henning Hraban Ramm

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


The module provides features like

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


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

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

tags for each line which works better for xml input.


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

Hraban

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

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


[NTG-context] Re: QR Code

2024-04-29 Thread Henning Hraban Ramm

Hi Ben,

I’m not sure if this is your issue, but the zint library’s API used to 
change with every version, so that ConTeXt supports only the “latest” 
few, and probably that’s still 2.10 to 2.12.


I still have 2.12 via MacPorts on MacOS 10.15, and it works.
Can you try an older zint version?

And just for information, MkIV used to call the zint binary, while LMTX 
uses the library to create the structures and converts them via MP into 
PDF objects (no additional files).


Hraban

Am 29.04.24 um 05:03 schrieb Benjamin Buchmuller:

Catching up on an earlier thread by Ursula and Hraban,

I'm also experienceing problems with \usemodule[zint] while \usemodule[t-zint] 
works fine.

Running on macOS (ConTeXt  ver: 2024.04.01 08:59 LMTX  fmt: 2024.4.28).

The issue seems somewhat unrelated to ConTeXt on first glance (??) if this is 
helpful. My code stopped working after I updated the OS (to Sonoma) and my 
homebrew cellar (to zint 2.13.0) while keeping a ConTeXt version from 2022 
which compiled the barcodes perfectly fine before these updates. This being 
said, the newer ConTeXt version doesn't resolve the issue.

Observations:

1) Zint (and Inkscape) is in my PATH and correctly sym-linked as specified in the 
wiki (~/tex/texmf-osx-64/bin/lib/luametatex/zint/libzint.so 
). However, the library was (still) not fount after mtxrun 
--generate

[This seems an odd, but unrelated problem]

2) So, I hardcoded libfile in libs-impzint.lmt to

local libfile = "/usr/local/Cellar/zint/2.13.0/lib/libzint.dylib"

3) Running the wiki example:

   \usemodule[m-zint]
\starttext
\barcode[alternative=isbnx, text=9783865419026, width=4cm]
\barcode[alternative=qrcode, text={https://wiki.contextgarden.net},
width=3cm]
\barcode[alternative=maxicode, text={test}, width=3cm]
\stoptext

* With \usemodule[m-zint], I correctly get:

zint --barcode=qrcode  --output="zint-qrcode-495165e08dbc5ce650aaaf13caa2229f.eps" 
--input="zint-qrcode-495165e08dbc5ce650aaaf13caa2229f.tmp"
zint --barcode=maxicode  --output="zint-maxicode-098f6bcd4621d373cade4e832627b4f6.eps" 
--input="zint-maxicode-098f6bcd4621d373cade4e832627b4f6.tmp"

[Barcodes show up as expected]

* With \usemodule[zint], no success:

optional> using library 
'/usr/local/Cellar/zint/2.13.0/lib/libzint.dylib'
zint> something went wrong: invalid result vector
zint> something went wrong: invalid result
zint> something went wrong: invalid result vector

Maybe this is helpful to pinpoint the issue?


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

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


[NTG-context] Re: Why Difference Between \placefloat and \definefloat

2024-04-28 Thread Henning Hraban Ramm
Where’s the float type "sidebar" defined? AFAIK it’s not a default type. 
And it might interfere with the actual sidebar stuff from 
https://source.contextgarden.net/tex/context/base/mkxl/anch-bar.mkxl, 
see also https://wiki.contextgarden.net/Command/setupsidebar


Hraban

Am 28.04.24 um 19:54 schrieb urba...@ca.rr.com:
I swear I used to understand this stuff.  I plead old age.   Why do I 
get two different results from the float placements here:


\definefloat[mysidebar][mysidebars]
\setupfloat[mysidebar][leftmargindistance=-.25in,rightmargindistance=-.25in,outer,none]

\defineframedtext [sidebartext]
[width=.4\textwidth,bodyfont=small,corner=round,background=color,backgroundcolor=lightgray,align=flushleft]

\starttext
This is a bit of text
\placefloat[sidebar][leftmargindistance=-.25in,rightmargindistance=-.25in,outer,none]{}{
\startsidebartext
This is a short sidebar
\stopsidebartext
}
And something to follow.

A bit of text
\placemysidebar{}{
\startsidebartext
This is a short sidebar
\stopsidebartext
}
And something to follow.

\stoptext


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

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


[NTG-context] Re: statistical charts module re-published

2024-04-28 Thread Henning Hraban Ramm

Hi Tomáš,

thank you, I updated the information at 
https://codeberg.org/fiee/context-statistical-charts and also published 
the new version to https://modules.contextgarden.net (i.e. installation 
with "mtxrun --script install-modules --install statistical-charts" will 
now install the current version).


Best, Hraban

Am 28.04.24 um 13:58 schrieb Tomáš Hála:

Hi Hraban and all,

the server akela at our university is not absolutely down but avialable from
the university intranet (or via VPN) only, unfortunately.

When you wrote the second email (the first one I accidentally missed in the 
flood of other messages, sorry about that)
I was just in the middle of cleaning data and migrating them to other sites.

At the same time, Tamara and I fixed some small things and we publish a new
version of this module containing our work from the last year.

The official site for statistical-charts module
is now   www.thala.cz/statcharts,
available also via  www.konvoj.cz/statcharts,
and mirrored at user.mendelu.cz/thala/statcharts.

Best,

Tomáš

On Fri, Apr 05, 2024 at 08:54:46PM +, Henning Hraban Ramm wrote:

Hi,
since the Akela server at Mendel University is down since a while, I got
no response from Tomáš, and it would be a pity to lose this module, I
re-published the statistical charts module at
https://codeberg.org/fiee/context-statistical-charts
I’ll also put it on modules.contextgarden.net

This is version 0.31, tagged by me as 2020-09-11 (date of the presentation).
I’m sure there’s a newer version somewhere, at least at Ramkumar’s, and
I’d like to update the repo to that.
Also the sources for the documentation are missing.

Authors, please help me save your work!

Hraban


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

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


[NTG-context] Re: \par and \startlines

2024-04-27 Thread Henning Hraban Ramm

Am 26.04.24 um 18:24 schrieb Wolfgang Schuster:
BTW: ConTeXt has a module for poems which can be loaded with 
\usemodule[format].


Never heard of it. Version says “ancient” ;)

https://source.contextgarden.net/tex/context/modules/mkiv/m-format.mkiv

What’s the advantage of all this markup over simple "lines" (or even 
\par after each line)?


I’ll need to typeset a book of poetry soon, that will probably need a 
lot of different indentation/aligments…


Hraban

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

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


[NTG-context] Re: \par and \startlines

2024-04-26 Thread Henning Hraban Ramm

Am 26.04.24 um 19:52 schrieb Denis Maier via ntg-context:

I see. But there's no command that could be used to simulate an empty line?


Did you try \vskip{…}?

Hraban

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

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


[NTG-context] Re: start/stopregister

2024-04-25 Thread Henning Hraban Ramm

Am 25.04.24 um 15:44 schrieb Thomas A. Schmitz:

Hi all,

has \startregister been superseded in luametatex or is it not yet 
implemented? I tried to read strc-reg.lmt but couldn't figure out what 
is going on. The following silly minimal test produces the expected 
result with mkiv but not in mkxl.


All best

Thomas

\setuppapersize [A6]

\starttext
 A\index{A} B\startregister [index] [B] {B}
 \dorecurse {10} {\input tufte}
 A\index{A} B\stopregister [index] [B]

\page

\placeregister[index]

\stoptext



I’m using it like

\startregister[index][bibliografie]{Bibliografie}
…
\stopregister[index][bibliografie]

i.e. very similar to your example, and can confirm it doesn’t result in 
a page range in the index. Also gives no error.


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

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


[NTG-context] Re: which parameter is for adjust the distance between items in a list?

2024-04-25 Thread Henning Hraban Ramm

Am 25.04.24 um 10:46 schrieb h...@hongfeng.ch:

thank you.

just tried, not worked out yet.

Here it is my text:

```
setuplist[height=0]
\startitemize[n]
\item It's impossible --- don't waste my time.
\item It's possible, but not worth doing.
\item I said it was a good ideal all along.
\stopitemize
```

Now the distance between the items is equal to the blank space between 
paragraphs.
I want to reduce it equal to the distance between the lines of a paragraph.


You asked for a list, that is e.g. a table of contents (list of numbered 
items like sections or floats).


If you want to affect itemizations, use \setupitemize (same as 
\setupitemgroup[itemize]).

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

Besides, height is a different parameter.

Hraban

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

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


[NTG-context] Re: which parameter is for adjust the distance between items in a list?

2024-04-25 Thread Henning Hraban Ramm

Am 25.04.24 um 10:20 schrieb h...@hongfeng.ch:
which parameter in `\setuplist` is used for adjusting the distance 
between the items of a list?


Usually it’s the general line height.
You can use "inbetween=\blank[3pt]" to insert extra space.
(Untested)

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

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


[NTG-context] Re: documentation: parameters of \setuplist

2024-04-24 Thread Henning Hraban Ramm

Am 23.04.24 um 23:14 schrieb Wolfgang Schuster:

Henning Hraban Ramm schrieb am 23.04.2024 um 21:43:

Am 22.04.24 um 18:09 schrieb Henning Hraban Ramm:
I tried to complete https://wiki.contextgarden.net/Command/setuplist, 
but I don’t understand all parameters.


Can anyone explain these please:

* state (start stop): what does this en-/disable? collecting entries?
* label (yes no none Name): language dependent labels? as a prefix or 
what?


You can use the key to set language dependent texts for the section 
counters in the list entry, with "yes" the values from the document are 
used but you can also set whatever label you want.


Thank you!
So it is related to \setuplabeltext as I suspected, while I didn’t 
understand why we need label _and_ prefix, until I recognized there’s 
only pageprefix… (I had prefix in my list of parameters, maybe some MkII 
leftover).



\setuplabeltext
   [en]
   [chapter=Chapter ,
    appendix=Appendix ,
    hraban=Hraban ]

%\setuplist[chapter][label=hraban,width=3cm]
\setuplist[chapter][label=yes,width=3cm]


Yes, now I understand.

Hraban

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

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


[NTG-context] Re: documentation: parameters of \setuplist

2024-04-24 Thread Henning Hraban Ramm

Am 24.04.24 um 01:00 schrieb Bruce Horrocks:

In the source there is a comment relating to location:

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

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


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


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

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


[NTG-context] Re: documentation: parameters of \setuplist

2024-04-23 Thread Henning Hraban Ramm

Am 22.04.24 um 18:09 schrieb Henning Hraban Ramm:
I tried to complete https://wiki.contextgarden.net/Command/setuplist, 
but I don’t understand all parameters.


Can anyone explain these please:

* state (start stop): what does this en-/disable? collecting entries?
* label (yes no none Name): language dependent labels? as a prefix or what?
* location (none, here): disable placement? when makes this sense?
* symbol (one two three none default): where is this used?


One solved, still 4 to go… Please, anyone who used these?

Hraban

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

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


[NTG-context] Re: documentation: parameters of \setuplist

2024-04-22 Thread Henning Hraban Ramm

Am 22.04.24 um 18:30 schrieb Duncan Hothersall:

Hi Hraban,

I can help with one - aligntitle means an unnumbered section will align 
in the table of contents under the number rather than the title. So for 
example if you have a TOC combining \section and \subject entries, they 
would look like this:


1 ... A section
A subject

rather than

1 ... A section
.. A subject


Thank you! I added it in the wiki.

Hraban

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

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


[NTG-context] documentation: parameters of \setuplist

2024-04-22 Thread Henning Hraban Ramm
I tried to complete https://wiki.contextgarden.net/Command/setuplist, 
but I don’t understand all parameters.


Can anyone explain these please:

* state (start stop): what does this en-/disable? collecting entries?
* label (yes no none Name): language dependent labels? as a prefix or what?
* location (none, here): disable placement? when makes this sense?
* aligntitle (yes no): align which part to what?
* symbol (one two three none default): where is this used?


Expect more questions…

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

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


[NTG-context] [off topic] non-English programming languages: Arab and Cuneiform

2024-04-20 Thread Henning Hraban Ramm

Came across this, I guess some of you might find it interesting:

https://nas.sr/%D9%82%D9%84%D8%A8/

https://github.com/MrLogarithm/emeszida


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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
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: Wiki - test/proposal to further clarify documentation

2024-04-18 Thread Henning Hraban Ramm

Am 17.04.24 um 23:25 schrieb Garulfo:
- exactly, it's not a question of proposing new documents, but of 
proposing another complementary way of accessing and browsing existing 
ones.


- Actually, the wiki is (or can be) a hub for the 4 needs:
   - "Reference" like https://wiki.contextgarden.net/Command/setuphead
   - "How-To Guides" like https://wiki.contextgarden.net/Titles
   - "Tutorials":
 - hosted https://wiki.contextgarden.net/Detailed_Example
 - linked https://github.com/mpsmath/stepbystep
   - "Explanation" : mostly linked manuals and books


https://wiki.contextgarden.net/Command/setuphead
and https://wiki.contextgarden.net/Titles
are examples of how difficult it can be to understand where to find a 
particular information.


It might be worth keeping only the key examples on reference pages
like https://wiki.contextgarden.net/Command/***
and moving the "how-to" examples to a separate page (or pages).


I agree. Let’s accept this as a rule for further wiki editing.

Also, explain parameters with top priority in Command/setup* pages 
(keeping them in Command/define* pages etc. doesn’t hurt, but at least 
experienced users should know where to find something without searching).


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

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


[NTG-context] Re: How to isolate serious errors from warnings?

2024-04-18 Thread Henning Hraban Ramm

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


(1) I tried placing a table inside a startitemize environment, as 
instead of it not compiling, it left a message in the document warning 
that wasn't supported.


(2) In another case, I had an image that ConTeXt couldn't find, as I 
mispelled the filenmame, and it fully compiled and made a PDF, without 
me noticing.


(3) Or maybe in some case, a font couldn't be found for a specific 
character, so a single character in the file isn't displaying.


Those are just some examples; I intended for something to be printed on 
the PDF, but it isn't showing there.


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


You can enable trackers like

\enabletrackers[figures.*]

But that just gives more log messages for debugging.

You get the list of all trackers with:

context --global m-trackers.mkiv


For your use case, directives are more helpful, like

\enabledirectives[logs.errors=*] (i.e. break at every error)

AFAIK that just handles missing characters, references and modules ATM, 
but this information might be outdated.


You get all directives with

context --global m-directives.mkiv


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

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


[NTG-context] Re: Wiki - test/proposal to further clarify documentation

2024-04-17 Thread Henning Hraban Ramm

Am 17.04.24 um 13:57 schrieb Bruce Horrocks:

- There are at least two books, and a third being written but not yet released: 
these fit into the Tutorials and Explanation quadrants.


Which published books do you mean?

I know of Alan Braslau’s book, AFAIK that will be published in French 
“soon” and probably later in English.

My German book is still not ready, while I work on it regularly.

Of course there are a lot of PDFs (most with sources), not only in the 
distribution, but also in 
https://github.com/contextgarden/not-so-short-introduction-to-context


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

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


[NTG-context] Re: Wiki - test/proposal to further clarify documentation

2024-04-17 Thread Henning Hraban Ramm

Am 17.04.24 um 10:36 schrieb Hans Hagen:

On 4/17/2024 8:32 AM, Thomas A. Schmitz wrote:



On 16. Apr 2024, at 21:56, Peter Hopcroft via ntg-context 
 wrote:





On 17/04/2024, at 7:11 AM, Henning Hraban Ramm  wrote:

In my poster (still WIP) I wrote:
…


Excellent


No, I must admit I don’t like the first two paragraphs. The question 
is “what is ConTeXt,” and the answer is “we’re not LaTeX.” And why 
“infamous”?
I agree. It sounds the same as "we're not msword" or "we're not google 
docs". (In the end the only thing that latex and context have in common 
is that they use the tex language / ecosystem.)


In my experience, most people interested in ConTeXt know LaTeX, so it 
makes sense to compare.
And I actually just say “LaTeX is the most known command-based 
typesetting system” (that’s just true) to shortcut explaining what a 
cbts might be.


Your critique applies to JUH’s quote, though.

I used “infamous” as a funny way to say “not famous, but somewhat known” 
(and yes, I know Latin and what the words really mean).


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

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


[NTG-context] Re: Wiki - test/proposal to further clarify documentation

2024-04-16 Thread Henning Hraban Ramm

Am 14.04.24 um 21:45 schrieb Peter Hopcroft via ntg-context:

It would be great if the main page actually said what Context does.


In my poster (still WIP) I wrote:

start
---

The “infamous” alternative to LaTeX

While most designers use graphical tools, there are still areas where 
code-based typesetting systems are fun, make sense or are even superior. 
While LaTeX is the most known of these, ConTeXt is used by a growing 
minority of ambitioned enthusiasts around the world.


The small but active and creative community of ConTeXt users and 
developers is always driving TeX development over new frontiers:

NTS, MetaFun, Oriental TeX, LuaTeX, mplib, LuaMetaTeX…
They’re also dubbed the incisors (AKA cutting edge) of the dinosaur of 
Open Source.


ConTeXt is aimed at creative users, known for advanced features like 
extensive font control and direct XML processing, with a deep 
integration of Lua and MetaPost.


---

ConTeXt was invented in the 1990s by Hans Hagen and Ton Otten of the 
Dutch company “Pragma Advanced Document Engineering” for typesetting 
schoolbooks. Taco Hoekwater refactored the TeX source code to create 
LuaTeX which was further developed into LuaMetaTeX by Hans Hagen (and 
lately Mikael Sundqvist for refined math typography).


---

“To be fair, switching to the ConTeXt way of thinking and doing things 
was not an overnight process […]. But once I got used to it, I could not 
imagine going back to LaTeX. I’ll go even further and say that, in my 
view, ConTeXt is the future of TeX.

(Prof. Idris Samawi Hamid, 2009)
Source: www.tug.org/interviews/hamid.html

---

“ConTeXt is LaTeX done right. It is simple, flexible and powerful.”
(J. U. Hasecke on Mastodon, 2022)

---

Is ConTeXt for me?

If you want …
* to design your own layout
* best quality math typesetting
* to use Lua functions e.g. for processing data
* deep integration of a graphics language (MetaPost)
* to process XML input
* no package conflicts
* to use OpenType features
* consistent setup commands
* to place stuff on layers
* visual debugging features
* to have a lean, but mighty TeX system
* to typeset much faster than with LaTeX
* high quality Arabic typography
… then ConTeXt is for you!

---
stop

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

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


[NTG-context] Re: Most recent context doesn't like synctex?

2024-04-15 Thread Henning Hraban Ramm

I made it work with Pulsar and the pdfjs-viewer plugin:

The sourcecode of the plugin is broken but easily fixable: 
https://github.com/allefeld/atom-pdfjs-viewer/issues/15


Then pdf->tex works with synctex from TeX live, "--synctex=repeat" and a 
right click in the viewer.


Sigh, should I learn TypeScript to adopt the viewer plugin and enable my 
language-context-lmtx* plugin to run ConTeXt and SyncTeX? (I’ve already 
too many projects and not enough brain capacity.)


Hraban


*) https://codeberg.org/fiee/language-context-lmtx
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
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: Is TIFF image no longer supported?

2024-04-14 Thread Henning Hraban Ramm

Am 14.04.24 um 22:25 schrieb Denis Maier via ntg-context:
Thomas A. Schmitz > hat am 14.04.2024 22:18 CEST 
geschrieben:

On 4/14/24 22:11, Joel via ntg-context wrote:

I have a document with PNG, JPG, and TIFF. When I try using
\externalfigure[filename][frame=on, width=.\textwidth] it displays
JPG and PNG fine, but the TIFF files don't render. Is TIFF not supported
in ConTeXt anymore? --Joel

I don't think tiff has ever be supported?
Thomas

At least, this is what
https://wiki.contextgarden.net/Using_Graphics says.
But you can do implicit conversion of TIFF to PDF if you have the 
converter installed. (Maybe you've had that installed before?)


EPS, BMP, GIF, TIFF (and in MkIV, SVG) are only supported via conversion.
For EPS you need GhostScript (gs), for SVG Inkscape, and GraphicsMagick 
(gm convert) for the others.


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

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


[NTG-context] Re: Wiki - test/proposal to further clarify documentation

2024-04-14 Thread Henning Hraban Ramm

Hi Garulfo,

I’m not against the “new order”, but I’d keep the colorful subject 
tiles. Different accesses are good IMO (as long as it doesn’t get to 
convoluted).


I’d say updating, sorting, restructuring pages is more important than a 
new start page.


Yes, please sort out reference vs. tutorials!

Often examples make sense in the reference pages, so the distinction is 
a bit fuzzy, but there are enough where a subject/tutorial page would 
make more sense than examples spread over several single command pages.


We could also define if the “main” reference page (with examples) is 
\definestuff, \setupstuff, or \stuff – IMO \setupstuff makes the most 
sense, since usually the others inherit from it.


Often enough, parameters aren’t explained in the reference pages; 
sometimes you can find examples using them, but there are too many 
holes. I tried to fix that where I could, but too often I don’t 
understand enough of the sources to make sense of some setting.


For wiki contributors, it might make sense to combine the markup pages – 
in many pages e.g.  is used where  would 
make more sense; often \starttext … \stoptext is not necessary and just 
blows up examples; markup is generally somewhat chaotic (e.g. , 
, or ``?).


Hraban

Am 14.04.24 um 13:21 schrieb garu...@azules.eu:

I just discover the Diátaxis documentation framework :
- https://www.diataxis.fr/
- 30min video : "What nobody tells you about documentation", 
https://www.youtube.com/watch?v=t4vKPhjcMZg  , from Daniele Procida at PyCon 2017

As I understand it, it can help both readers and writers of the documentation 
by clarifying the purpose of each element.

So I started a potential new "welcome page" :  
https://wiki.contextgarden.net/Main_Page2

The main lines would be :
- Tutorials: installation pages, step by step examples
- How-to guides: most of the existing wiki pages which are not 
https://wiki.contextgarden.net/Commands/ ...
- Discussions and manuals: most of the existing manuals
- Reference : the pages dedicated to commands which already include link to 
mailing list, stack exchange, ConTeXt's source
   - https://wiki.contextgarden.net/Category:Commands
   - https://wiki.contextgarden.net/Special:PrefixIndex?prefix=Command%2F

To match the logic of Diátaxis, maybe some material from command pages should be moved from 
"Reference" to "How-to guides",
for example, when the examples go beyond "pure description" and begin to deal with 
"how-to" cases, e.g. :
- Reference for setuphead: https://wiki.contextgarden.net/Command/setuphead
- How-to guides for headings: https://wiki.contextgarden.net/Titles

If it make sense, and according to your feedbacks, I can continue to reallocate 
existing contents.

Thanks for your feedback and thoughts.
Garulfo
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


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

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


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

2024-04-14 Thread Henning Hraban Ramm

Am 14.04.24 um 14:46 schrieb Wolfgang Schuster:

garu...@azules.eu schrieb am 14.04.2024 um 12:41:

Hi all,

Is it on purpose that 128 pages 
"https://wiki.contextgarden.net/Command/ " start with a space 
character ?

I didn't find an explanation in https://wiki.contextgarden.net/Command

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

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


The command pages which start with an underscore are probably leftovers
when Taco changed a page from manual command descriptions to auto
generated tables.

In the process to change the page he makes a copy of the current page
with an underscore at the beginning which is deleted after the change
but it's possible he forgot to delete a few of them.

When you notice no difference between both versions of a command page
you can delete all of the forgotten pages.


No!

These are the general pages in opposite to instance pages, e.g. 
"startsection" and "startchapter" are instances of "_startsection"?


https://wiki.contextgarden.net/Command/_placefloat is the general page 
for the instances placefigure, placetable etc.


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

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


[NTG-context] Re: Most recent context doesn't like synctex?

2024-04-14 Thread Henning Hraban Ramm

Am 13.04.24 um 22:28 schrieb Mikael Sundqvist:

What will work will depend on the viewers. We noticed a few weeks ago
that synctex (pdf -> editor) was not working in a few viewers (okular)
while it was working in others. 


Could you please tell us which combinations of viewers and editors you 
checked and how to configure them to make it work?


Hraban

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

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


[NTG-context] Re: Figure reference failing

2024-04-10 Thread Henning Hraban Ramm

Am 10.04.24 um 14:21 schrieb Hans Hagen:

It fails for me as well, when "mode=columns" is used.

compare with and without mode columns:

\starttext

     \enablemode[columns]

     As we see \doifelsemode {columns} {in \in {table} [demo-1]} {below} 
we can have

     more than one cell in a row.

     \startplacetable[mode=columns,reference=demo-1]
     \externalfigure[cow][width=\textwidth]
     \stopplacetable

     \samplefile{tufte}

\stoptext

so basically we have an "at the spot" placement or a float


Is "mode" in floats something new? How is it related to “general” modes?

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

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


[NTG-context] Re: regular online meet-up

2024-04-09 Thread Henning Hraban Ramm

reminder: this is tonight (in European perception).

Am 07.04.24 um 09:37 schrieb Henning Hraban Ramm:

You’re invited to our regular online meet-up, this upcoming
Wednesday, April 10th, 19:00 CEST (UTC+2)

at https://lecture.senfcall.de/hen-rbr-rku-oke
(same, but shorter: https://u.mtxrun.eu/ctxmtg)

ConTeXt users of all levels are welcome!

Do you have a subject that you’d like to talk about?

Looking forward to seeing you,
Hraban


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

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


[NTG-context] Re: Fwd: Re: how to apply gradient color to a piece of text?

2024-04-07 Thread Henning Hraban Ramm

Am 07.04.24 um 19:05 schrieb Hans Hagen:

\startMPpage
     picture tt ; tt := lmt_outline [
     kind = "fillup",
     text = "\definedfont[name:texgyrepagellabold*default]foo f o o",
     ] xsized 12cm ;

     path bb ; bb := boundingbox tt ;
     path pp ; pp := bb enlarged 2cm ;

     fill pp
     withshademethod "linear"
     withshadedirection down
     withshadecolors (red, blue) ;

     draw tt withcolor green ;
\stopMPpage

no need to loop over tt


But the intention was to get a gradient _within_ the text.

Might there be a problem with the latest changes to gradients?

Hraban

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

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


[NTG-context] Re: how to apply gradient color to a piece of text?

2024-04-07 Thread Henning Hraban Ramm

Am 07.04.24 um 15:51 schrieb Keith McKay:
Have a look at the posts starting on the 2 March 2021 with the subject 
heading "Shaded Large Letters in LMTX". Hans gave a great solution.


Neither for the example in
https://mailman.ntg.nl/archives/list/ntg-context@ntg.nl/message/SNL5YJ3NKZNFYAPG3MCZXA2363GWEJA3/
nor for that in
https://wiki.contextgarden.net/Cover_Pages#Empty_or_Transparent_letters
I get any text in the gradient box. The font is loaded.

Does it work for you?

(ConTeXt LMTX 2024.04.01 08:59 with self-compiled binary)
Hraban

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

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


[NTG-context] Re: PDF/UA-2, WTPDF

2024-04-07 Thread Henning Hraban Ramm

Am 07.04.24 um 11:17 schrieb Ulrike Fischer:

Am Sun, 7 Apr 2024 09:31:30 +0200 schrieb Henning Hraban Ramm:


Am 07.04.24 um 08:06 schrieb Hans Hagen:

On 4/6/2024 5:34 PM, Henning Hraban Ramm wrote:


1. PDF/UA-2
https://pdfa.org/iso-14289-2-pdfua-2/


looks likes one has to pay for it


Oh, as usual with PDF association…


Sorry that pdf/UA-2 costs something is due to ISO not to the PDF
association. The PDF association made the WTPDF document which is
for free (and is very similar to pdf/UA-2). And imho they are also
trying to get sponsors for PDF/UA-2 (something they already did for
the PDF 2.0 spec which you now can buy for 0€).


Ok, sorry for barking at the wrong tree!

And I guess DANTE as a member of PDF association has access to the 
documents anyway?


Hraban

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

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


[NTG-context] regular online meet-up

2024-04-07 Thread Henning Hraban Ramm

You’re invited to our regular online meet-up, this upcoming
Wednesday, April 10th, 19:00 CEST (UTC+2)

at https://lecture.senfcall.de/hen-rbr-rku-oke
(same, but shorter: https://u.mtxrun.eu/ctxmtg)

ConTeXt users of all levels are welcome!

Do you have a subject that you’d like to talk about?

Looking forward to seeing you,
Hraban


(Same blurb as always:)

[Howto]
* No special software installation required; most modern browsers should 
work (WebRTC required).

* Open the URL above, accept the privacy statement,
* enter your name,
* click "join" (or "start" if you’re the first),
* click "with microphone", allow your browser to access it, check the audio.
* Your microphone is muted if you join. Activate microphone and/or 
camera with the buttons at the bottom.

* Minimize the default presentation with the "screen" button, bottom right.

* If you’d like to share your screen or upload a file, you can make 
yourself the presenter: Click on your user name, change the setting, 
then you’ll see the "screen sharing" button beside the camera button; 
also there’s now "manage presentations" behind the "plus" button.
Beware there is only one presenter at a time, so don’t kill someone 
else’s presentation.


[Technical hints]
* Sound is usually better if you use a headset (less noise for everyone).
* Connection problems are mostly due to low bandwidth or high latency on 
your side, e.g. with mobile connections.

* Sometimes leaving and re-entering helps.
* If audio/video doesn’t work for you, you can still use the text chat.
* Screen sharing needs a lot of bandwidth.
* BigBlueButton documentation applies: 
https://bigbluebutton.org/teachers/tutorials/


[Netiquette]
* Please use a name that we recognize from here. Some feel uncomfortable 
with anonymous lurkers.

* Mute your microphone while you’re not talking.
* It’s nice to show your face at least when you join.
* If there are connection problems, stop camera sharing.
* The room is set to “everyone’s a moderator“, I trust you...
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[NTG-context] Re: PDF/UA-2, WTPDF

2024-04-07 Thread Henning Hraban Ramm

Am 07.04.24 um 08:06 schrieb Hans Hagen:

On 4/6/2024 5:34 PM, Henning Hraban Ramm wrote:


1. PDF/UA-2
https://pdfa.org/iso-14289-2-pdfua-2/


looks likes one has to pay for it


Oh, as usual with PDF association…

That’s not how you promote open standards.

(Didn’t check, jost forwarded the message.)


2. Well-Tagged PDF (WTPDF)
https://pdfa.org/wtpdf/

well, tagging ...


Of course.

But you asked for wanted accessibility features:

We have \pdfbackendactualtext{visible}{alternative}, can we get 
alternative text (ActualText) for images?
Not automatically, of course (if someone wants AI descriptions they can 
implement a module), just as a keyword in \externalfigure?


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

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


[NTG-context] PDF/UA-2, WTPDF

2024-04-06 Thread Henning Hraban Ramm
Quoting a post by Philipp Kiff, 
https://mastodon.social/@pkiff/11221949350928:



In amongst the release of PDF/UA-2 (PDF for Universal Accessibility) and 
the new Well-Tagged PDF (WTPDF) standard last month, some PDF 
professionals may have missed two other new resources that may help 
explain and view them:


1. Questions and Answers about Tagged PDF from PDF association

2. Acrobat Custom File Info Panels by Peter Wyatt


Last month saw the release of PDF/UA-2 and the new Well-Tagged PDF 
(WTPDF) standard - neither of which revokes PDF/UA-1. And none of those 
are the same as PDF 1.7 vs 2.0. To many, the landscape of PDF specs may 
now seem littered with confusing acronyms and versions!


For some help disentangling it all, the PDF association has a Questions 
and Answers about Tagged PDF:


https://pdfa.org/resource/tagged-pdf-q-a/


In related news, Peter Wyatt released Acrobat Custom File Info Panels. 
This is a free extension for Acrobat that adds new panels to the XMP 
metadata shown when you view File > Properties in Acrobat Pro.


The new panels allow you to view the additional conformance claims and 
dated revisions of ISO standards that can now be included in PDFs, but 
that aren't currently visible in the standard Acrobat panels.


https://pdfa.org/discovering-pdf-metadata/


One thing I realized in reading through the new standards and looking at 
various sample files this week is that I should probably spend some time 
learning LaTeX! Both LaTeX and LibreOffice are already capable of 
producing PDF/UA-2 files, and with some tweaking, LaTeX can produce what 
appear to be really good WTPDF files. Kudos to both those development teams!


https://github.com/latex3/tagging-project/discussions/72


Finally, in case you missed earlier posts from last month, here are 
links to the official sources for the two new PDF standards that these 
other resources relate to:


1. PDF/UA-2
https://pdfa.org/iso-14289-2-pdfua-2/

2. Well-Tagged PDF (WTPDF)
https://pdfa.org/wtpdf/
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
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: blank line and \placefigure

2024-04-06 Thread Henning Hraban Ramm

Am 06.04.24 um 12:48 schrieb Thomas Meyer:

how can I suppress a blank line between a text paragraph and \placefigure?
I get one there, but I don't want it.


Did you try
\setupfloat[figure][spacebefore=,]
?
or "none" or "{disable,nowhite,back}"

https://wiki.contextgarden.net/Command/setupfloat
https://wiki.contextgarden.net/Command/blank

HTH
Hraban

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

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


[NTG-context] Re: incosistent output of --- dash

2024-04-06 Thread Henning Hraban Ramm

Am 06.04.24 um 11:43 schrieb madiazm.eo...@gmail.com:

Hi everyone,
I'm a bit puzzled because I usually don't get an em-dash when I type tree 
hyphens. If I use the command \emdash, no problem but when I use the hyphens 
some days it works... and somedays I see three small hyphens.
I tried it on overleaf and of ContextOnWeb with the same inconsistency. If I 
create a new file it usually works right; but when I overwrite an existing file 
subtituting a hyphen for three where the dash should be I sometimes get it 
right and sometimes wrong.
It is not the pdf viewer since I get good or bad results in all, the overleaf 
pdf preview tool, the context on web preview tool and the mozilla integrated 
pdf viewer.

Am I missing something on the use of this ligature? (the question is just out of 
curiosity, since I plan to create a command that adds a hairspace after or before the 
dash, since I don't like it to stick to some letters like "o".


Generally, “we” try to reduce active characters as much as possible, 
that’s why -- and --- usually /don’t/ produce en or em dashes. You can 
activate these ligatures as a font feature though (AFAIR "latexhyphens", 
can’t find it…).


Some editors and some fonts do automatical replacements.

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

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


[NTG-context] statistical charts module re-published

2024-04-05 Thread Henning Hraban Ramm

Hi,
since the Akela server at Mendel University is down since a while, I got 
no response from Tomáš, and it would be a pity to lose this module, I 
re-published the statistical charts module at 
https://codeberg.org/fiee/context-statistical-charts

I’ll also put it on modules.contextgarden.net

This is version 0.31, tagged by me as 2020-09-11 (date of the presentation).
I’m sure there’s a newer version somewhere, at least at Ramkumar’s, and 
I’d like to update the repo to that.

Also the sources for the documentation are missing.

Authors, please help me save your work!

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

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


[NTG-context] international type design

2024-04-04 Thread Henning Hraban Ramm

Have a look at these beautiful font designs:
https://esadtype.esad-amiens.fr/
Unfortunately the fonts are not available (yet).

Take your time to browse the papers about intention, design process etc.

I just browsed the dissertation about the (Vietnamese) "Dilinh" font and 
found the considerations interesting.


"Gul" has matching Devanagari & Latin, "Tarisel" has variations from 
readable text to abstracted lombardic unciale, and "Wierd" has matching 
deconstructivist outlines for Arabic & Latin…


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

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


[NTG-context] Re: what about "textdisplay"?

2024-04-01 Thread Henning Hraban Ramm

Am 01.04.24 um 18:54 schrieb Wolfgang Schuster:

Henning Hraban Ramm schrieb am 01.04.2024 um 18:29:

Am 01.04.24 um 18:21 schrieb Wolfgang Schuster:

Henning Hraban Ramm schrieb am 01.04.2024 um 17:19:
A while ago, I was pointed (by Wolfgang or Hans, I guess) to 
\start/stoptextdisplay to enhance whitespace handling around images.


My guess is Mikael because I saw the command the first time in the 
source of a presentation from him.


Oh, that’s probably where I saw it, too.


Here is a short example which two other solution to get a similar effect 
as \starttextdisplay.


\usemodule[visual]

\setupfloat[figure][location=left]

\starttext

\fakewords{10}{20}
\startlinecorrection
\fakeimage{4cm}{3cm}{6cm}{4cm}
\stoplinecorrection
\fakewords{10}{20}

\blank[2*line]

\fakewords{10}{20}
\startplacefigure[location={force,none}]
\fakeimage{4cm}{3cm}{6cm}{4cm}
\stopplacefigure
\fakewords{10}{20}

\blank[2*line]

\fakewords{10}{20}
\starttextdisplay
\fakeimage{4cm}{3cm}{6cm}{4cm}
\stoptextdisplay
\fakewords{10}{20}

\stoptext


Thank you!
And when would you suggest what?

A float I’d use only if I need caption/numbering or the floating feature.

When I tried line correction, it never helped; probably I used it wrong 
(e.g. around section titles).



I wanted to document it, but can’t find it in the sources:


The definition is in spac-ver.mkxl.


Thank you!

So, "context --find" does not what I thought it would.


AFAIR the find option searches only the manual sources.


Looks like it. So I should use grep (mtxrun --script grep).

Hraban

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

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


[NTG-context] Re: what about "textdisplay"?

2024-04-01 Thread Henning Hraban Ramm

Am 01.04.24 um 18:21 schrieb Wolfgang Schuster:

Henning Hraban Ramm schrieb am 01.04.2024 um 17:19:
A while ago, I was pointed (by Wolfgang or Hans, I guess) to 
\start/stoptextdisplay to enhance whitespace handling around images.


My guess is Mikael because I saw the command the first time in the 
source of a presentation from him.


Oh, that’s probably where I saw it, too.


I wanted to document it, but can’t find it in the sources:


The definition is in spac-ver.mkxl.


Thank you!

So, "context --find" does not what I thought it would.

Hraban

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

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


[NTG-context] what about "textdisplay"?

2024-04-01 Thread Henning Hraban Ramm
A while ago, I was pointed (by Wolfgang or Hans, I guess) to 
\start/stoptextdisplay to enhance whitespace handling around images.


I wanted to document it, but can’t find it in the sources:

$ context --find=textdisplay
mtx-context | 
…/tex/texmf-context/doc/context/sources/general/manuals/ontarget/ontarget-profiles.tex

mtx-context |
mtx-context |   196  \starttextdisplay
…
mtx-context |   277  \stoptextdisplay
mtx-context |
mtx-context | 
…/tex/texmf-context/doc/context/sources/general/manuals/ontarget/ontarget-standardize.tex

mtx-context |
mtx-context |   888  \starttextdisplay
…
mtx-context |   941  \stoptextdisplay
mtx-context |

These two documents use it and compile flawlessly.

What’s on?

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

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


[NTG-context] Re: OT: San Seriffe

2024-04-01 Thread Henning Hraban Ramm

Am 01.04.24 um 16:34 schrieb Hans Hagen via ntg-context:

On 4/1/2024 3:56 PM, Henning Hraban Ramm wrote:

in honour of Knuth and the current occasion:
https://realdougwilson.com/writing/san-serriffe

the subject title suggest that you found an open type version


Well, I found one, but it‘s not free:
https://commercialtype.com/catalog/guardian_sans

Hraban

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

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


[NTG-context] OT: San Seriffe

2024-04-01 Thread Henning Hraban Ramm

in honour of Knuth and the current occasion:
https://realdougwilson.com/writing/san-serriffe


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

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


[NTG-context] context editor support / syntax highlighting for Pulsar

2024-04-01 Thread Henning Hraban Ramm

Hi Hans (et al.),

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


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


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

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


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

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

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

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

end
end
---

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



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



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



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


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

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

local helpinfo = [[


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

]]

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

local report = application.report

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

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

local function collect(filename,class,data)
if data then
local result, r = { }, 0
for name, list in sortedhash(data) do
r = r + 1 ; result[r] = format("keywordclass.%s.%s=\\\n",class,name)
for i=1,#list do
if i%5 == 0 then
r = r + 1 ; result[r] = "\\\n"
end
r = r + 1 ; result[r] = format("%s ",list[i])
end
r = r + 1 ; result[r] = "\n\n"
end
io.savedata(file.addsuffix(filename,"properties"),concat(result))
io.savedata(file.addsuffix(filename,"lua"),serialize(data,true))
else
os.remove(filename)
end
end

function flushers.scite(collected)
local data 

[NTG-context] Re: How to get an image to fill the maximum available space?

2024-03-30 Thread Henning Hraban Ramm

Am 30.03.24 um 03:15 schrieb Joel via ntg-context:

I have code like this:

     \placefigure[here, force]{my caption}{%
         \externalfigure[#1][frame=on, maxheight=1.2\textwidth, 
maxwidth=\textwidth]%

     }%

I need some images to appear in a book. I need them to keep their proper 
ratios, but scale up to the maximize the available space.


The image can't be more than \textwidth wide, and can't ever be more 
than 1.2\textwidth high.


The problem I am getting with this code, and it does seem to be limiting 
the images to be not bigger than those two dimensions above, is some of 
the images, for reasons I can't understand, are appearing really tiny 
and aren't scaling up to fill as much space as is possible. I can't 
explain why this is happening--the images themselves are very very high 
resolution.


Is there any way to modify the code to make sure the image stretches up 
to be the biggest it can, without exceeding the sizes I've listed?


Hi Joel,

AFAIK, if you don’t set at least either height or width, ConTeXt uses 
the image’s resolution setting to calculate its size, and that is often 
useless.


(Maybe there’s also something wrong with ConTeXt’s max width/height, I 
don’t know; I’m still planning to carefully check all options of image 
processing…)


You could try if "factor=fit" or "factor=max" yields the results you want.

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

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


[NTG-context] Re: Headertext

2024-03-27 Thread Henning Hraban Ramm

Am 26.03.24 um 17:12 schrieb Wolfgang Schuster:

 begin example
\showframe

\definetext
   [chapterheader] % identifier
   [header]    % vertical position (header/footer)
% [text]  % horizontal position (text/margin)
   [This is a custom header for \tex{chapter}] % content

\setuphead[chapter][header=chapterheader]


Thank you, I added that to https://wiki.contextgarden.net/Command/definetext

Hraban

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

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


[NTG-context] Re: Unknown units es and dk

2024-03-23 Thread Hraban Ramm


Am 23.03.24 um 19:05 schrieb Hans Hagen:

On 3/23/2024 2:27 PM, Wolfgang Schuster wrote:

Regarding the dk unit: https://tug.org/TUGboat/tb42-3/tb132hagen-dk.pdf

The es, ts and eu are discussed here:

https://tug.org/TUGboat/tb44-2/tb137egger-edith.pdf


In German, I call these "Spaßeinheiten" (units of measurement = 
"Maßeinheiten"; Spaß = fun; "units of leisurement" might be a good 
translation).


Hraban

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

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


[NTG-context] Re: Use of marking

2024-03-20 Thread Hraban Ramm

\setupheadtext[de][section=Aufgabe]
Rename the section, then you don’t need marking.

Sorry, I'm in a hurry and must look up how to get the number…

Am 20.03.24 um 12:18 schrieb Thomas Meyer:

Hi Hraban,

and thanks.

setuphead[chapter,section][numberwidth=2em] or "fit"
works!

I know \setupheadertexts, but do not know what shall I write here:
\startsection[titel=Aufgabe, marking=?]
If I write marking=Aufgabe I get Aufgabe, no number! For chapter the same.

\setupheadertexts
   [] [{\getmarking[chapter]} - {\getmarking[section]}] 
[{\getmarking[chapter]} - {\getmarking[section]}] []

> Kapitel - Aufgabe


Thanks in advance
Greetings
Thomas


Am 20.03.24 um 09:09 schrieb Hraban Ramm:



Am 20.03.24 um 08:18 schrieb Thomas Meyer:

HI folks,

yesterday while reading along I learned how to suppress the chapter 
numbers in sections. That was something I was looking for myself.


But how do you use marking correctly in startsection? I would like 
to see "1. Kapitel - 1. Aufgabe" in the header on the right. How can 
I automate this with marking?
And how can I reduce the space between the number (1.) and the title 
(Kapitel or Aufgabe)?


Thanks for your help
Thomas


Hi Thomas,

do you know how to use \setupheadertexts?

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

I guess you're using the section level for "Aufgabe"?

Then something like {\getmarking{chapter} – \getmarking{section}} 
might fit your request.


The formatting should be possible with 
\setuphead[chapter,section][numberwidth=2em] or "fit".


Hraban


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

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



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

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

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


[NTG-context] Re: command line arguments

2024-03-20 Thread Hraban Ramm


Am 19.03.24 um 23:53 schrieb Wolfgang Schuster:

Hraban Ramm schrieb am 19.03.2024 um 21:41:
Following up on the other imposition question, I'm trying to make an 
example file that shows an imposition schema according to command 
line arguments.


This way it works for the number of pages, as used in 
\dorecurse{\Pages}{…}, but not for the imposition schema. Typesetting 
\Schema looks right, but \setuparranging doesn’t work. Where's my error?


You forgot about expansion and in your case \doifelsedocumentargument 
is not fully expandable. This doesn't matter for \dorecurse where the 
number parser ignores the flag because \setuparranging does care and 
\Schema fails to expand.

Thank you! Well, I tried \expanded in a few places, and that didn’t work.


\def\Schema{\doifelsedocumentargument{schema}{\getdocumentargument{schema}}{1*8}} 



\def\Pages{\doifelsedocumentargument{numberofpages}{\getdocumentargument{numberofpages}}{16}} 



\setuparranging[\Schema]


\doifelsedocumentargument{schema}
  {\setuparranging[\getdocumentargument{schema}]}
  {\setuparranging[1*8]}


Ok, that works. (Of course, if you say so.)



It does also help to look at the included extra files (e.g. 
mtx-context-arrange.tex) written by Hans.


Well, I don’t know how to use that, it doesn’t compile on its own, any 
hints?


Hraban

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

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


[NTG-context] Re: can we do binding correction?

2024-03-20 Thread Hraban Ramm

Hi Andrés, thank you!

Am 20.03.24 um 06:07 schrieb Andres Conrado Montoya:
I have found with experience that a formula to calculate the binding 
correction for a saddle stitch binding, not more than 4 pages in a 
signature (only one fold in the middle) usually is 1/2 the 
circumference of a circle with radius /r/, being /r/ the thickness of 
the paper times the amount of physical signatures. Something like: 
\frac{π \times t \times s}{2}. I have not tried a formula for more 
folds in a signature.


The thing is, you have to recalculate for each signature fold. The 
innermost will have displacement zero, the second one a little bit 
more, the third a little bit more, and on and on until we reach the 
outermost signature.


However, it is necessary to say that unless you are using a 
particularly thick paper, or you are using too many pages for a saddle 
stitch bind (my personal and professional opinion would be no more 
than 80, but better 60), the displacement is usually negligible.


For example, let's say the paper thickness is 0.1 mm (which is 0.0001 
meters) and there are 40 pages in 10 signatures. The radius would be 
0.0001 meters per signature * 10 signatures = 0.001 meters. Then, half 
the circumference would be 1/2 * 3.14159 * 0.001 meters ≈  0.0016 
meters or 1.6mm at the last signature. Unless there was a displacement 
of more than, say, 4 mm, I wouldn't worry too much about it.


E.g. our Bonn architectural guides 
(https://www.dreiviertelhaus.de/reihen/afb/) are saddle-stitched 
booklets, usually have 60 pages and are printed on 115g coated paper. 
With coated paper you can’t really derivate the thickness from grammage. 
The horizontal page shift is visible if you look carefully. But since 
the paper is not very transparent, you only see the problem if you look 
for it. I don’t arrange the pages myself, don’t know the signature size, 
and I can’t request specials, since we must print cheaply to keep the 
low price (had to raise it from 5 to 8 € anyway, half of it goes to the 
wholesaler).


Hraban

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

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


[NTG-context] Re: Use of marking

2024-03-20 Thread Hraban Ramm


Am 20.03.24 um 08:18 schrieb Thomas Meyer:

HI folks,

yesterday while reading along I learned how to suppress the chapter 
numbers in sections. That was something I was looking for myself.


But how do you use marking correctly in startsection? I would like to 
see "1. Kapitel - 1. Aufgabe" in the header on the right. How can I 
automate this with marking?
And how can I reduce the space between the number (1.) and the title 
(Kapitel or Aufgabe)?


Thanks for your help
Thomas


Hi Thomas,

do you know how to use \setupheadertexts?

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

I guess you're using the section level for "Aufgabe"?

Then something like {\getmarking{chapter} – \getmarking{section}} might 
fit your request.


The formatting should be possible with 
\setuphead[chapter,section][numberwidth=2em] or "fit".


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

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


[NTG-context] Re: can we do binding correction?

2024-03-20 Thread Hraban Ramm

Am 19.03.24 um 23:42 schrieb Willi Egger:

Generally I know for what binding correction is used, I just never tried to set 
it up. If I look carefully at one of our printed booklets, the printshop also 
didn’t. So I'd need pageshift without applying imposition (setting it up 
wouldn’t hurt).

I organise this always with correction to the backspace.

For every single page?



Theoretically the shift value should be the same as the paper thickness (don’t 
you think?), but there’s some deformation involved, so a factor might make 
sense?

I think that this would be quite cumbersome, paper thickness of higly coated 
papers vs. novel-printing paper… I believe one would have to establish this 
thickness for each project unless the same paper is used...


No, I meant, I'd use the actual paper thickness as a parameter, so that 
paper shift could be calculated automatically with a geometrical factor 
according to the imposition schema. Don't you think that makes more 
sense than setting it for single pages?


But while this is an interesting topic, it's one of these overly 
involved niche features in ConTeXt… I didn't care too much myself, and 
laypeople don't see it anyway.





Unfortunately I threw out my old books on printing technology long ago, and my 
newer one doesn’t cover bookbinding (I’m not at home anyway).

I think, that many printshops do not possess neither old books including 
bookbinding nor do they care about the wishes of the binder … Pity, that you 
threw them out, but i understand, that circumstances might be such that you 
have to take decisions…


When we left Switzerland in 2012 for Freiburg (and then again Freiburg 
in 2013 for Kyrgyzstan), we had to drop ballast, and I still had too 
many books (if you can have too many books at all…). I had a lot on art 
techniques like calligraphy that I never used, and my printing 
technology stuff was outdated – well… The antiquarian gave me 30€ for a 
big pile of formerly expensive books, and he probably was generous.


Since then I gained a publishing house and had to move three times, my 
moving helpers were not amused about that many book boxes. (The last 
move was into the 3rd story, or is this 4th?, of an old house with very 
high stories; if visitors arrive panting at my door, I tell them they 
can sign the summit register now…)


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

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


[NTG-context] Re: can we do binding correction?

2024-03-19 Thread Hraban Ramm

Thank you Willi!

Generally I know for what binding correction is used, I just never tried 
to set it up. If I look carefully at one of our printed booklets, the 
printshop also didn’t. So I'd need pageshift without applying imposition 
(setting it up wouldn’t hurt).


I didn’t think about vertical pageshift, but of course that’s also 
needed for cross-folded sheets.


I'm not sure how (horizontal) pageshift is supposed to work with full 
page images without introducing white borders, but bleed at the inner 
edge should be enough.


Theoretically the shift value should be the same as the paper thickness 
(don’t you think?), but there’s some deformation involved, so a factor 
might make sense?


Unfortunately I threw out my old books on printing technology long ago, 
and my newer one doesn’t cover bookbinding (I’m not at home anyway).


Hraban

Am 19.03.24 um 17:01 schrieb Willi Egger:

Hi Hraban,

I think we should clarify this.

Binding correction is a fixed amount of whitespace in the spine added to the 
inner white-space. This is to ensure, that the binding, which is consuming 
white-space, keeps the inner white-space optically as intended..

The page shift mechanism works only with imposition enabled. This ensures, that 
the type-setting area does not creep towards the spine because multiple sheets 
of paper are folded in the spine.

I doubt whether it is enough to have the measure of the thickness do determine 
this creeping effect, because we are making folds which are probably more 
circles than just adding thickness of paper.


Willi


On 18 Mar 2024, at 17:35, Hraban Ramm  wrote:


Am 17.03.24 um 23:54 schrieb Wolfgang Schuster:

Hraban Ramm schrieb am 17.03.2024 um 22:48:

Hi, this question was rised in my ConTeXt beginners workshop* at Chemnitz Linux 
Days today:

Can I configure binding correction for saddle-stitched or thread-bound 
booklets, and if, does it only work with arranging (imposition) or can I enable 
it somehow for the layout (if the printshop does the imposition)?

1. \definepageshift + \setuppageshift

2. \setuplayout[horoffset=]


Also I recognized I'm not sure about the difference of the layout parameters 
backspace and cutspace.

backspace is the inner margin and cutspace the outer


Hi Wolfgang, thank you! Seems like I was too dense to understand the 
description for the \setuplayout parameters in the wiki (and there are more 
that I never used, oh my…), and since I never use ConTeXt’s imposition for 
serious print products (and never set up a scheme myself), I didn’t know about 
pageshift.

Ok, if I leave imposition to the printshop and they don't do binding correction 
in their workflow, I'd need to set horoffset differently for every single page 
(i.e. first, second, second-to-last and last the same; 3th, 4th and from back 
the same etc.). Or is pageshift applied independently from arranging?

And then, it makes no sense to add the same value all the time. I don’t know if BCOR 
works this way in LaTeX, but one value (paper thickness) should be enough in combination 
with an imposition schema. I.e. if I define a paper thickness and the number of pages 
that are in one booklet (as a single booklet or part of a "proper" book), then 
the page shift should work automatically.

Well, for a single booklet, it could. In a book, booklets can have different 
numbers of pages, and then you'd need to define a list… Okay, too complicated. 
It’s the printshops's responsibility anyway, and nobody complained about my 
books so far. (I'm not perfectionist enough to care.)

Hraban


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

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

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

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

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

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

[NTG-context] command line arguments

2024-03-19 Thread Hraban Ramm
Following up on the other imposition question, I'm trying to make an 
example file that shows an imposition schema according to command line 
arguments.


This way it works for the number of pages, as used in 
\dorecurse{\Pages}{…}, but not for the imposition schema. Typesetting 
\Schema looks right, but \setuparranging doesn’t work. Where's my error?


\def\Schema{\doifelsedocumentargument{schema}{\getdocumentargument{schema}}{1*8}}

\def\Pages{\doifelsedocumentargument{numberofpages}{\getdocumentargument{numberofpages}}{16}}

\setuparranging[\Schema]

Find the full example attached, I call it like

context --autopdf=auto --arrange impositiontest.tex --schema=TRYPTICHON 
--numberofpages=32

Hraban
% context --autopdf=auto --arrange --arguments=schema=2\*4,pages=16

\def\Schema{\doifelsedocumentargument{schema}{\getdocumentargument{schema}}{1*8}}
\def\Pages{\doifelsedocumentargument{numberofpages}{\getdocumentargument{numberofpages}}{16}}

\setuppapersize[A9,landscape][A7,landscape]

\setuparranging[\Schema]

\setupbodyfont[ss,10pt]

\setuplayout[margin=0pt, width=fit, header=2.8ex, footer=2.8ex]
\setupalign[middle,hilo]
\setuppagenumbering [alternative=doublesided,location=footer]
\setupheadertexts[\CONTEXT\ imposition test]

\showframe
\setupbackgrounds [text][text][background=color,backgroundcolor=lightgray]

% Where the block of pages is placed on the sheet
% (relevant if there is space left over.)
\setuplayout [location=middle,marking=on]

\startbuffer[Fakepage]
\strut
\blank
\bold{[\Schema]}
\vfill
This is page \recurselevel
\vfill
\stopbuffer

\starttext
\dorecurse{\Pages}{\getbuffer[Fakepage]\page}
\stoptext
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


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

2024-03-19 Thread Hraban Ramm


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



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

I don’t know why the default is bold.

Hraban

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

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


[NTG-context] Re: Adjusted Chapter Headings

2024-03-19 Thread Hraban Ramm

Hi Jeroen,

it might make sense to use

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

instead of ownnumber.

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


HTH, Hraban

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




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

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

\starttext

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

\samplefile{tufte}

\stopchapter

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

\samplefile{tufte}

\stopchapter

\stoptext

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

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

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


[NTG-context] Re: ck hyphenation in old German orthography

2024-03-18 Thread Hraban Ramm

Am 18.03.24 um 00:02 schrieb Wolfgang Schuster:

Hraban Ramm schrieb am 17.03.2024 um 12:06:
Hi, the sample file aesop-de is in old German orthography, there, ck 
should get hyphenated as k-k, this doesn’t work (e.g. Mücke isn’t 
hyphenated at all). Is there something I can configure?


Hraban


\mainlanguage[deo]
\setuplanguage[deo][
   hyphenmin=4,
   lefthyphenmin=2,
   righthyphenmin=2,
]

\starttext

\hyphenatedfile{aesop-de}

\startcolumns
Funktioniert die Trennung? Heckeneckenzecken

\samplefile{aesop-de}

\stopcolumns

\stoptext


Just as a start, the languages manual provides more details about 
hyphenation.


\startexceptions[de]
He{k-}{k}{ck}en-e{k-}{k}{ck}en-ze{k-}{k}{ck}en
\stopexceptions

% \registerhyphenationpattern[de][c1k/k=k]
%
% \setuphyphenation[method=traditional]

\mainlanguage[de]

\starttext
Heckeneckenzecken = \hyphenatedword{Heckeneckenzecken}
\stoptext


Thank you! There’s some information I need to add in the wiki.

Hraban

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

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


[NTG-context] Re: Mikael’s missing math manual

2024-03-18 Thread Hraban Ramm

Am 18.03.24 um 07:36 schrieb Mikael Sundqvist:

Hi,

On Sun, Mar 17, 2024 at 10:57 PM Hraban Ramm  wrote:

… and another thing that came up in my workshops and in discussions at
our booth: the math manual is eagerly awaited! (My book too, but I can’t
answer most questions about math.)

Oh, I see. So, I should really try to get something out. It is
difficult to find enough time working on it, in particular since Hans
is always adding new (not only math) stuff, but I will try. It is fun
to participate in the development, and I do not want to delay it
(somebody has to push him and test, and so on...)

But I should probably get something out, even if that is not really
finished/polished. All the basics are there. Then it can be a
work-in-progress document, adding/modifying new stuff.


Yes, please! The version that you gave me a year ago is already really 
interesting and helpful, and Hans’ manuals are also often "in progress". 
A visible TODO marker might help – I’m using the following in my book to 
keep track of incomplete sections:


\defineregister[todos]
\define[1]\TODO{\inouter{\tt\color[red]{TODO}}\expanded{\todos{\structurevariable{title}}}\color[red]{\bf
 #1}\autoinsertnextspace}

…
\startsection[title=Lists]
\TODO{Research the options of \tex{setupitemgroup}!}
\stopsection
…

\startchapter[title=Work list]
  Sections that still need work.\blank

  \placetodos
\stopchapter

So I get a prominent marker in the content and the title of the affected 
section as an index.



There have been many changes along the way, and maybe at some time
some things were not really working, but later fixed.


I thought so, too.

For promotion I’d like to have a few examples where the difference 
between TeX/LaTeX default rendering and new ConTeXt rendering is visible.


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

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


[NTG-context] Re: can we do binding correction?

2024-03-18 Thread Hraban Ramm


Am 17.03.24 um 23:54 schrieb Wolfgang Schuster:

Hraban Ramm schrieb am 17.03.2024 um 22:48:
Hi, this question was rised in my ConTeXt beginners workshop* at 
Chemnitz Linux Days today:


Can I configure binding correction for saddle-stitched or 
thread-bound booklets, and if, does it only work with arranging 
(imposition) or can I enable it somehow for the layout (if the 
printshop does the imposition)?


1. \definepageshift + \setuppageshift

2. \setuplayout[horoffset=]

Also I recognized I'm not sure about the difference of the layout 
parameters backspace and cutspace.


backspace is the inner margin and cutspace the outer

Hi Wolfgang, thank you! Seems like I was too dense to understand the 
description for the \setuplayout parameters in the wiki (and there are 
more that I never used, oh my…), and since I never use ConTeXt’s 
imposition for serious print products (and never set up a scheme 
myself), I didn’t know about pageshift.


Ok, if I leave imposition to the printshop and they don't do binding 
correction in their workflow, I'd need to set horoffset differently for 
every single page (i.e. first, second, second-to-last and last the same; 
3th, 4th and from back the same etc.). Or is pageshift applied 
independently from arranging?


And then, it makes no sense to add the same value all the time. I don’t 
know if BCOR works this way in LaTeX, but one value (paper thickness) 
should be enough in combination with an imposition schema. I.e. if I 
define a paper thickness and the number of pages that are in one booklet 
(as a single booklet or part of a "proper" book), then the page shift 
should work automatically.


Well, for a single booklet, it could. In a book, booklets can have 
different numbers of pages, and then you'd need to define a list… Okay, 
too complicated. It’s the printshops's responsibility anyway, and nobody 
complained about my books so far. (I'm not perfectionist enough to care.)


Hraban


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

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


[NTG-context] Mikael’s missing math manual

2024-03-17 Thread Hraban Ramm
… and another thing that came up in my workshops and in discussions at 
our booth: the math manual is eagerly awaited! (My book too, but I can’t 
answer most questions about math.)


One participant tested some math alignment examples from an older paper 
by Aditya and found them working in her current LMTX installation but 
not in COW – I know it runs an older version, but Aditya’s article was 
even older…


Hraban

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

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


[NTG-context] can we do binding correction?

2024-03-17 Thread Hraban Ramm
Hi, this question was rised in my ConTeXt beginners workshop* at 
Chemnitz Linux Days today:


Can I configure binding correction for saddle-stitched or thread-bound 
booklets, and if, does it only work with arranging (imposition) or can I 
enable it somehow for the layout (if the printshop does the imposition)?


Also I recognized I'm not sure about the difference of the layout 
parameters backspace and cutspace.


Hraban

*) 8 participants who endured 3 hours of me mostly talking… Further 
questions that I couldn't answer for sure were about PDF/A or PDF/UA and 
how color profiles are handled within ConTeXt and at printshops (my 
monitor is profiled, but I know I have to edit images "too bright" to 
have them look right in print). I need to investigate further before I 
can ask precise questions.


When JUH yesterday had his shorter talk about "corporate publishing with 
Markdown and ConTeXt", the lecture hall was stuffed.


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

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


[NTG-context] ck hyphenation in old German orthography

2024-03-17 Thread Hraban Ramm
Hi, the sample file aesop-de is in old German orthography, there, ck 
should get hyphenated as k-k, this doesn’t work (e.g. Mücke isn’t 
hyphenated at all). Is there something I can configure?


Hraban


\mainlanguage[deo]
\setuplanguage[deo][
  hyphenmin=4,
  lefthyphenmin=2,
  righthyphenmin=2,
]

\starttext

\hyphenatedfile{aesop-de}

\startcolumns
Funktioniert die Trennung? Heckeneckenzecken

\samplefile{aesop-de}

\stopcolumns

\stoptext

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

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


[NTG-context] Re: Why is header page number appearing when I define a header?

2024-03-17 Thread Hraban Ramm

Am 16.03.24 um 22:28 schrieb Marco Patzer:

On Sat, 16 Mar 2024 20:33:33 + (UTC)
Joel via ntg-context  wrote:


How do I remove the page number from the header texts?

   \setupheadertexts []

or

   \setuplayouttext
  [header][text]
  [middletext=]


I’d have guessed

\setuppagenumbering[location=,]

Hraban

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

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


[NTG-context] Re: regular online meet-up

2024-03-13 Thread Henning Hraban Ramm

Reminder: This is tonight!

Am 10.03.24 um 21:51 schrieb Henning Hraban Ramm:

You’re invited to our regular online meet-up, this upcoming
Wednesday, March 13th, 19:00 CET (UTC+1)

at https://lecture.senfcall.de/hen-rbr-rku-oke
(same, but shorter: https://u.mtxrun.eu/ctxmtg)

ConTeXt users of all levels are welcome!

Do you have a subject that you’d like to talk about?

Looking forward to seeing you,
Hraban


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

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


[NTG-context] Re: how to include an an svg file?

2024-03-13 Thread Henning Hraban Ramm

Am 13.03.24 um 13:14 schrieb Jean-Pierre Delange:

Hi Hraban & Seyal

I can confirm that converting the *.svg file into a *.pdf file displays 
the colour shades correctly ...

(I used Gimp to export the smile.svg file to a smile03.pdf file).


Gimp is a really bad choice in this case, since it converts vectors into 
pixels.

And if you place a PDF, no further conversion is needed.

If you have problems with SVGs, use Inkscape (or some commercial 
alternative like Affinity Designer or Adobe Illustrator) for PDF conversion.


The MWE below works correctly, even if you have to make finer 
adjustments to place the figure in a precise position on the page. As 
I'm in the process of enriching and clarifying a few pages of the 
ConTeXt wiki and the French wikibook, I'm interested in the details 
concerning the position of figures, images and photos etc. So please let 
me know (in private mail) how you make your documents (a MWE will do).


Position options:
* relative placement as floats, i.e. \placefigure
* absolute placement on layers, i.e. \setlayer
* relative corrections with \offset (also within floats)

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

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


[NTG-context] Re: how to include an an svg file?

2024-03-13 Thread Henning Hraban Ramm

Am 12.03.24 um 23:59 schrieb seyal zavira:
You are correct. when i convert this svg to pdf via inkscape it works 
like a charm.


But what is standard way of including an svg file with context if we 
want to inkscape render the images?


\externalfigure[smile]

without any other settings, but inkscape must be callable on the command 
line (which doesn’t work for me on MacOS any more, must investigate…).


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

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


[NTG-context] Re: how to include an an svg file?

2024-03-12 Thread Henning Hraban Ramm

Am 12.03.24 um 14:53 schrieb seyal zavira:

 > when i want to put some SVGs in my document the svg does not
render properly here is the code:
 >
 > \starttext
 > \startMPcode
 > draw lmt_svg [
 > filename = "smile.svg"]
 > \stopMPcode
 > \stoptext


I can confirm the problem also with the regular image call

\externalfigure[smile.svg][conversion=mp]

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

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


[NTG-context] Re: Creating a module for calligraphy practice templates

2024-03-12 Thread Henning Hraban Ramm

Am 12.03.24 um 08:57 schrieb Andres Conrado Montoya:

Hello, list!

I've been working on a module to typeset calligraphy practice templates 
using ConTeXt and MetaPost. You are welcome to check it out on github: 
https://github.com/conradolandia/pauta 



Hi Andrés,

this looks interesting (even if I don’t do calligraphy any more).

Sorry, I can’t help you with your questions.

The structure of the module looks good and should work well with the 
module system.


Hraban

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

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


[NTG-context] has the statistical charts module a new home?

2024-03-11 Thread Henning Hraban Ramm

Hi Tomáš et al.,

the site https://akela.mendelu.cz/~thala/statcharts/ and actually the 
whole server disappeared.


Is there a new download location for the charts module?

It would be nice if we could just host it on 
https://modules.contextgarden.net, then it could also get installed via 
the mtxrun script.


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

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


[NTG-context] regular online meet-up

2024-03-10 Thread Henning Hraban Ramm

You’re invited to our regular online meet-up, this upcoming
Wednesday, March 13th, 19:00 CET (UTC+1)

at https://lecture.senfcall.de/hen-rbr-rku-oke
(same, but shorter: https://u.mtxrun.eu/ctxmtg)

ConTeXt users of all levels are welcome!

Do you have a subject that you’d like to talk about?

Looking forward to seeing you,
Hraban


(Same blurb as always:)

[Howto]
* No special software installation required; most modern browsers should 
work (WebRTC required).

* Open the URL above, accept the privacy statement,
* enter your name,
* click "join" (or "start" if you’re the first),
* click "with microphone", allow your browser to access it, check the audio.
* Your microphone is muted if you join. Activate microphone and/or 
camera with the buttons at the bottom.

* Minimize the default presentation with the "screen" button, bottom right.

* If you’d like to share your screen or upload a file, you can make 
yourself the presenter: Click on your user name, change the setting, 
then you’ll see the "screen sharing" button beside the camera button; 
also there’s now "manage presentations" behind the "plus" button.
Beware there is only one presenter at a time, so don’t kill someone 
else’s presentation.


[Technical hints]
* Sound is usually better if you use a headset (less noise for everyone).
* Connection problems are mostly due to low bandwidth or high latency on 
your side, e.g. with mobile connections.

* Sometimes leaving and re-entering helps.
* If audio/video doesn’t work for you, you can still use the text chat.
* Screen sharing needs a lot of bandwidth.
* BigBlueButton documentation applies: 
https://bigbluebutton.org/teachers/tutorials/


[Netiquette]
* Please use a name that we recognize from here. Some feel uncomfortable 
with anonymous lurkers.

* Mute your microphone while you’re not talking.
* It’s nice to show your face at least when you join.
* If there are connection problems, stop camera sharing.
* The room is set to “everyone’s a moderator“, I trust you...
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


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

2024-03-08 Thread Henning Hraban Ramm

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

Dear list,

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

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

   \setupbodyfontenvironment
   [default]
   [em=italic]

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

LMTX gets b, c and d in slanted form.

LuaTeX gets only b and c in slanted form.


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

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


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

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


[NTG-context] Re: How can I do this?

2024-03-08 Thread Henning Hraban Ramm

Am 08.03.24 um 17:56 schrieb Otared Kavian:

Hi Ursula,

The reason for which you did not get the expected result is that you 
have « } » missing in your file, that is the closing brace after your 
italic command

« {\it » at the end of your document.
Moreover you did not have a \stoptext in your file, and a math command « 
\m » was not written correctly. Talking of math, I personnaly prefer to 
enclose in-line math between dollar signs $, that is writing « $\exists 
x \in H$ » instead of  « \m{\exists x \in H} ».


Well, better stay with the modern ConTeXt approach of \m{}.

Also, you can use

mtxrun --script check yourfile.tex

to look for missing braces, stops etc.

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

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


[NTG-context] Re: additional font faces

2024-03-08 Thread Henning Hraban Ramm

Am 08.03.24 um 18:02 schrieb Hans Hagen:

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


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

\starttypescript [sans] [AlegreyaMedium]

and then use

\switchtobodyfont[AlegreyaMedium]\sl

or

\AlegreyaMedium\sl

which is also more efficient than adding more variants


Ok, thank you – that’s what I was usually doing. So I won’t change it.

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

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


[NTG-context] additional font faces

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


% adapted from font-pre.mkxl

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

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

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

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

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

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

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


Is that necessary? And is it enough?


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

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

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

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

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

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

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


[NTG-context] Re: missing metadata in LMTX

2024-03-06 Thread Henning Hraban Ramm

Am 06.03.24 um 11:18 schrieb Marco Patzer:

On Tue, 5 Mar 2024 23:14:04 +0100
Wolfgang Schuster  wrote:


Here is the official solution:

\startxmlsetups xml:meta
\setupmetadata
  [author={\xmltext{#1}{/author}},
   title={\xmltext{#1}{/title}}]
\stopxmlsetups


So now we have:

\setupinteraction
   [title=FooBar]

\setupdocument
   [metadata:title=FooBar]

\setupmetadata
   [title=FooBar]

Are any of those deprecated or the preferred way? I'm starting to
get confused.


There’s also \settaggedmetadata; I actually didn’t know \setupmetadata.
Both are missing in the wiki yet.
Also https://wiki.contextgarden.net/Command/setupinteraction doesn’t 
talk about metadata. Sigh.


AFAIK the metadata from \setupinteraction is used for everything, as 
long as you don’t overwrite it elsewhere.


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

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


[NTG-context] Re: \showsymbolset is noop

2024-03-05 Thread Henning Hraban Ramm

Am 05.03.24 um 23:11 schrieb Wolfgang Schuster:

Henning Hraban Ramm schrieb am 04.03.2024 um 21:24:
The \showsymbolset has no output any more, apparently already for some 
time.


I checked on COW (ConTeXt ver: 2022.12.22 22:17 LMTX fmt: 2022.12.23) 
and my local installation (ConTeXt ver: 2024.02.22 18:31 LMTX fmt: 
2024.2.22).


Can someone try on MkIV?

"""
\usesymbols[nav]
\starttext

\showsymbolset[nav]

\stoptext
"""


You pass the wrong name to \showsymbolset.

\usesymbols[nav]

\starttext

\showsymbolset[navigation 1]\page
\showsymbolset[navigation 2]\page
\showsymbolset[navigation 3]\page

\stoptext

Wolfgang


Ah, thank you! I’ll fix the wiki. Apparently this used to work differently.

To know which sets are included I must look into the sources, or is 
there another command?


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

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


[NTG-context] Re: Local alternative to \input

2024-03-05 Thread Henning Hraban Ramm

Am 04.03.24 um 10:43 schrieb Denis Maier via ntg-context:

Hi,

Aren’t environments used for setups (and not for textual content). Maybe 
a buffer may be what you want ?


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


Yes, buffers are the way to go for (textual) contents, while setups or 
environments are for settings – they handle whitespace differently.


Apparently I misunderstood the intention when I gave the answer about 
environments, sorry!


Hraban

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

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


[NTG-context] \showsymbolset is noop

2024-03-05 Thread Henning Hraban Ramm

The \showsymbolset has no output any more, apparently already for some time.

I checked on COW (ConTeXt ver: 2022.12.22 22:17 LMTX fmt: 2022.12.23) 
and my local installation (ConTeXt ver: 2024.02.22 18:31 LMTX fmt: 
2024.2.22).


Can someone try on MkIV?

"""
\usesymbols[nav]
\starttext

\showsymbolset[nav]

\stoptext
"""


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

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


[NTG-context] enhancing documentation: initials

2024-03-05 Thread Henning Hraban Ramm
Hi, I tried to figure out what the "method" parameter of \setupinitial 
does – it changes the handling of quotation marks at the beginning of 
the text. It’s defined in context/base/mkiv/typo-drp.lua


But I found no difference between first, last, and none; just "auto" 
includes the mark in the initial, and it works only with a few 
languages, e.g. English and French, but not e.g. German or Dutch:


"""
\mainlanguage[de]
\setuppapersize[A6]
\setupinitial[n=2,color=orange,]

\starttext
\start
\setupinitial[method=first]
\placeinitial \quotation{Keine andere Kunst hat mehr Berechtigung, ihren 
Blick auf die zukünftigen Jahrhunderte zu richten als die 
Typographie.}\wordright{Giambattista Bodoni}

\stop

\start
\setupinitial[method=last]
\placeinitial \quotation{Nationalökonomie ist, wenn die Leute sich 
wundern, warum sie kein Geld haben.}\wordright{Kurt Tucholsky}

\stop

\start
\setupinitial[method=auto]
\placeinitial \quotation{Der Mensch wird auf natürlichem Wege 
hergestellt, doch empfindet er dies als unnatürlich und spricht nicht 
gern davon.}\wordright{Kurt Tucholsky}

\stop

\start
\setupinitial[method=none]
\placeinitial \quotation{Keine andere Kunst hat mehr Berechtigung, ihren 
Blick auf die zukünftigen Jahrhunderte zu richten als die 
Typographie.}\wordright{Giambattista Bodoni}

\stop

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

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


[NTG-context] Re: Japanese

2024-03-01 Thread Henning Hraban Ramm

Am 01.03.24 um 16:23 schrieb Emanuel Han via ntg-context:
I made manual corrections to scrp-cjk.lua, but with no effect to the 
ConTeXt output of my example. Do I have to recompile ConTeXt first?


Not compile the engine (luametatex), but re-make the ConTeXt format with
context --make
and to be on the safe side, regenerate the file database with
mtxrun --generate

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

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


[NTG-context] Re: Japanese

2024-02-28 Thread Henning Hraban Ramm

Am 28.02.24 um 20:51 schrieb Emanuel Han via ntg-context:

Thank you all for your suggestions and contributions to the wiki.

I don't intend to nag, but when looking at what ConTeXt is producing, I 
need to state that the result is still far away from a properly typeset 
Japanese text.


That’s the result of apparently nobody having an interest in it and the 
developers not knowing enough about CJK.
(Look at Arabic: Without Idris and the funding for OrientalTeX, the 
support would be just not there.)


Often enough people demand features but don’t stay long enough to evolve 
them until they’re “ready for prime time”.


Now it’s your chance to make it better.
Don’t give up.

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

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


[NTG-context] Re: Japanese

2024-02-28 Thread Henning Hraban Ramm

Am 28.02.24 um 08:34 schrieb Otared Kavian:

Dear Dalyoung,

Thank you very much for your insight. I downloaded the Noto Serif JP 
fonts and set up a fontfamily as you indicated, by adding

\setscript[nihongo]
which solves a problem I had with line breakings. And everything works 
smoothly!


So, for the mail archive, here is what I have and what works fine:

%%% Noto Fonts

\definefontfamily[JapaneseFont][rm][Noto Serif JP]
   [   it={style:regular,features:{*,slanted}},
       sl={style:regular,features:{*,slanted}},
       bi={style:bold,features:{*,slanted}},force=yes]

\definefontfamily[JapaneseFont][ss][Noto Serif JP]
   [   it={style:regular,features:{*,slanted}},
       sl={style:regular,features:{*,slanted}},
       bi={style:bold,features:{*,slanted}},force=yes]

\definefontfamily[JapaneseFont][tt][Noto Serif JP]
   [   it={style:regular,features:{*,slanted}},
       sl={style:regular,features:{*,slanted}},
       bi={style:bold,features:{*,slanted}},force=yes]

\definefontfamily[JapaneseFont][math][Tex Gyre Termes Math]
%\definefontfamily[JapaneseFont][math][Tex Gyre Pagella Math]
%\definefontfamily[JapaneseFont][math][Tex Gyre Aventor]



\setupbodyfont[JapaneseFont,12pt]
\setupruby[location=top,voffset=-2ex]
\setupwhitespace[big]
\setscript[nihongo]

\starttext
\ruby{早}{はや}く。
いきましょう。
\stoptext

Best regards: Otared


Thanks all contributors, I added this to 
https://wiki.contextgarden.net/Chinese_Japanese_and_Korean


I guess you also should set \mainlanguage[ja], I added it, also 
\mainlanguage[kr] for Korean.


I don’t know if the setups for Chinese and Korean are still valid, I 
just removed \setencoding.


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

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


[NTG-context] Re: Japanese

2024-02-26 Thread Henning Hraban Ramm

Am 26.02.24 um 21:08 schrieb Otared Kavian:

Does anyone have a simple setup of fonts to write a small Japanese document 
(possibly with furagana) ? I am using MacOS and I have several Japanese fonts 
on the system.
I have some old examples which do not typeset correctly now, maybe because they 
use the old module simplefonts and  commands such as \setcjkmainfont and 
friends.


Try to replace the simplefonts calls with something like

\definefontfamily[myfonts][rm][SomeFont]
\definefontfamily[myfonts][ss][SomeOtherFont]

\setupbodyfont[myfonts,rm,12pt]

With Latin fonts, it usually works.

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

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


[NTG-context] Re: FreeBSD 13.2

2024-02-26 Thread Henning Hraban Ramm

Am 26.02.24 um 12:22 schrieb Roger Mason:


resolvers   | resolving | variable 'SELFAUTOLOC' set to 
'/usr/home/rmason/context/tex/texmf-freebsd-amd64/bin'
resolvers   | resolving | variable 'SELFAUTODIR' set to 
'/usr/home/rmason/context/tex/texmf-freebsd-amd64'
resolvers   | resolving | variable 'SELFAUTOPARENT' set to 
'/usr/home/rmason/context/tex'
resolvers   | resolving | variable 'TEXMFCNF' set to ''
resolvers   | resolving | variable 'TEXMF' set to ''
resolvers   | resolving | variable 'TEXOS' set to 'texmf-freebsd-amd64'



resolvers   | resolving | found fallback configuration file 
'/usr/home/rmason/context/tex/texmf-context/web2c/contextcnf.lua'



Looks like the unset TEXMF and TEXMFCNF envars are a problem.   What
should they be set to and where should they be set?


Usually, you don’t need to set any variables.
The default configuration file is also fine.

Does "context --version" work?

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

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


[NTG-context] Re: FreeBSD 13.2

2024-02-25 Thread Henning Hraban Ramm

Am 25.02.24 um 20:24 schrieb Roger Mason:

Hello Hraban,

Henning Hraban Ramm  writes:


Am 25.02.24 um 17:08 schrieb Roger Mason:



Do I need mtxrun?  If so, where are the sources and how do I build
it?


Yes, you need it, but it’s just an alias to luametatex:

~/context/tex/texmf-osx-64/bin $ ll
total 7704
-rw-r--r--@ 1 hraban  staff   6,0K 14 Dez 19:11 .DS_Store
lrwxr-xr-x  1 hraban  staff10B 22 Feb 18:47 context@ -> luametatex
-rw-r--r--  1 hraban  staff   1,3K 10 Aug  2023 context.lua
-rwxr-xr-x  1 hraban  staff   2,9M 22 Feb 18:47 luametatex*
lrwxr-xr-x  1 hraban  staff10B 22 Feb 18:47 mtxrun@ -> luametatex
-rw-r--r--  1 hraban  staff   685K 22 Feb 18:47 mtxrun.lua

The mtxrun in ~/context/bin is only used during installation.


What else do I need in ~/context/tex?  Currently I have

.
├── texmf-context
│   └── web2c
│   └── contextcnf.lua
└── texmf-freebsd-amd64
 └── bin
 ├── context -> luametatex
 ├── context.lua
 ├── luametatex
 ├── mtxrun -> luametatex
 └── mtxrun.lua


I guess you’re lacking the main distribution package.

My installation (tree -dL 4, partly shortened):

.
├── bin (installation only)
└── tex
├── texmf-cache (necessary, but auto-created?)
│   ├── luametatex-cache
│   │   └── context
│   └── luatex-cache
│   └── context
├── texmf-context (main tree)
│   ├── colors
│   │   └── icc
│   ├── context
│   │   └── data
│   ├── doc
│   │   ├── context
│   │   └── fonts
│   ├── fonts// (etc.)
│   ├── metapost
│   │   └── context
│   ├── scripts
│   │   └── context
│   ├── source
│   │   └── luametatex
│   ├── tex
│   │   ├── context
│   │   └── generic
│   └── web2c
├── texmf-fonts (not necessary)
├── texmf-local (not necessary)
│   └── doc
│   └── context
├── texmf-modules (not necessary)
│   ├── doc// (etc.)
│   ├── fonts// (etc.)
│   ├── metapost
│   │   └── context
│   ├── scripts
│   │   ├── context
│   │   └── pgfplots
│   ├── source
│   │   ├── context
│   │   └── luatex
│   ├── tex
│   │   ├── context
│   │   ├── generic
│   │   └── luatex
│   └── tpm
├── texmf-osx-64
│   └── bin
└── texmf-project (not necessary)

HTH

Hraban

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

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


[NTG-context] Re: FreeBSD 13.2

2024-02-25 Thread Henning Hraban Ramm

Am 25.02.24 um 17:08 schrieb Roger Mason:

I see that the build does not provide the mtxrun binary that the
installer uses.  Does that mean I dont need mtxrun?


Do I need mtxrun?  If so, where are the sources and how do I build it?


Yes, you need it, but it’s just an alias to luametatex:

~/context/tex/texmf-osx-64/bin $ ll
total 7704
-rw-r--r--@ 1 hraban  staff   6,0K 14 Dez 19:11 .DS_Store
lrwxr-xr-x  1 hraban  staff10B 22 Feb 18:47 context@ -> luametatex
-rw-r--r--  1 hraban  staff   1,3K 10 Aug  2023 context.lua
-rwxr-xr-x  1 hraban  staff   2,9M 22 Feb 18:47 luametatex*
lrwxr-xr-x  1 hraban  staff10B 22 Feb 18:47 mtxrun@ -> luametatex
-rw-r--r--  1 hraban  staff   685K 22 Feb 18:47 mtxrun.lua

The mtxrun in ~/context/bin is only used during installation.

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

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


[NTG-context] Re: FreeBSD 13.2

2024-02-25 Thread Henning Hraban Ramm

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.

Hraban

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

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


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

2024-02-24 Thread Henning Hraban Ramm

Am 24.02.24 um 13:53 schrieb Henning Hraban Ramm:

Hi,

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

What should I do?


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

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

\starttext

\startTEX

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

\stopTEX

\stoptext


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


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

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


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

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


[NTG-context] Re: FreeBSD 13.2

2024-02-24 Thread Henning Hraban Ramm

Am 24.02.24 um 15:20 schrieb Roger Mason:

Hello,

I've been away from ConTeXt for some time but now I want to install it
on my FreeBSD 13.2 system(s) (I have not switched any machines to 14.0
yet).  After unpacking, running the install scripts results in:

ld-elf.so.1: /home/rmason/Software/Context/bin/mtxrun: Undefined symbol
"__libc_start1@FBSD_1.7"

I assume this is because mtxrun is compiled for FreeBSD 14.0.  Thus, I
need (I think) to compile it for 13.2.  Are there instructions somewhere
on how to do this?

If I get a working installation I'm happy to contribute the FreeBSD 13.2
binaries back to the project, if someone will tell me how.


Yes, we need to document it in the wiki…
But it’s easy:
cd into your tex/texmf-context/source/luametatex
and run build.sh
then copy the "luametatex" binary from build/native
into tex/texmf-/bin/

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

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


[NTG-context] typing with scite module and escape

2024-02-24 Thread Henning Hraban Ramm

Hi,

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

What should I do?


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

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

\starttext

\startTEX

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

\stopTEX

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

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


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

2024-02-22 Thread Henning Hraban Ramm

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

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

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


This is nice.
Thank you, will do.

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


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



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

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

draw topboundary withpen pensquare withcolor lightgray;
naturalizepaths;
\stopuseMPgraphic

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

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


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

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

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

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

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

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

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

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

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

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

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



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

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

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

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

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

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

2024-02-21 Thread Henning Hraban Ramm

Am 21.02.24 um 19:43 schrieb Wolfgang Schuster:
… but it would be visible on a colored background. I’m sure you can 
show me a better way…


\startuseMPgraphic{dottedborder}
   draw bottomboundary OverlayBox withpen pencircle scaled 2 dashed 
withdots withcolor "red";

   setbounds currentpicture to OverlayBox;
\stopuseMPgraphic


Thank you!

(I’m sure I already used that somewhere… Must document…)

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

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


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

2024-02-21 Thread Henning Hraban Ramm

Am 19.02.24 um 23:15 schrieb Wolfgang Schuster:

Henning Hraban Ramm schrieb am 19.02.2024 um 22:39:

I guess I asked this a while ago, but I can’t find an answer:
Is it possible to replace the lines of a TABLE with my own MetaPost 
graphics?


ATM I’m trying to place my MP lines behind a frame-less TABLE; it will 
probably work, but it’s a crutch…


The example below draws a custom border for the whole cell but you're 
free to draw only certain sides (leftboundary etc. helps) but don't 
forget to set the boundary box for the graphic (OverlayBox is the size 
of the cell).


 begin example
\startuseMPgraphic{dottedborder}
   draw OverlayBox withpen pencircle scaled 2 dashed withdots withcolor 
"red";

\stopuseMPgraphic

\defineoverlay[dottedborder][\useMPgraphic{dottedborder}]

\starttext

\bTABLE[frame=off,background=dottedborder]


Thank you!

Since I needed only horizontal lines, I forced the height with an 
“invisible“ line:


\startuseMPgraphic{dottedborder}
   draw (0,0)--(0,OverlayHeight) withpen pencircle scaled 0.001 
withcolor white;
   draw (0,0)--(OverlayWidth,0) withpen pencircle scaled 2 dashed 
withdots withcolor "red";

\stopuseMPgraphic

… but it would be visible on a colored background. I’m sure you can show 
me a better way…


My real life example (p.2 in https://yemaya.fiee.net/s/DEEHs5m49yftiqW) 
involves sketchy lines, and there it’s a bit annoying that the row is 
not its own frame that could get a continuous background… Well, it’s 
good enough, I’ll settle for it.


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

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


[NTG-context] Re: Text in Margin

2024-02-19 Thread Henning Hraban Ramm

Am 19.02.24 um 14:14 schrieb Jeroen:
In a textbook I am looking to place a large left margin at every page of 
each chapter. At left printed pages a left margin and at right printed 
pages a right margin, so like a double sided construction. In this 
margin I would like to place:


1. Keywords and small descriptions to emphasize some text from the textflow
2. Figures
3. An expansion of a table that is placed in the main textflow but that 
needs to cover a wider range then the text area so it expands into the 
margin


What is the the easiest way to achieve this?


Generally, you use \inmargin, \inouter etc.

Additional to Wolfgang’s suggestions:

If you need sidefloats that cover not only the margin but should 
decrease the text width, you can move sidefloats into the margin like:


\startplacefigure[title={},location=outer]
\offset[rightoffset=-\marginwidth]{\externalfigure[cow][width=0.5\textwidth]}
\stopplacefigure

Beware: it doesn’t work well with captions (I’ve still no solution that 
always works), and \offset understands only rightoffset and leftoffset, 
not outeroffset.
The example is on a right page; you must “pull” the image into the 
margin (rightmargin with negative value), if you try „pushing“ with 
leftoffset=\marginwidth, the text flow is wrong.


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

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


  1   2   3   4   5   6   7   8   9   10   >