Re: [NTG-context] upload

2022-05-09 Thread śrīrāma via ntg-context
On 5/9/22 10:06 PM Mikael Sundqvist via ntg-context wrote:
> On Mon, May 9, 2022 at 6:16 PM Alexandre Christe via ntg-context
> 
>  wrote:
> > Sadly I have to report the bibliography is still broken. Could someone
> > else confirm? It's an unfortunate timing since I need to hand in some  
> > report really soon.
> I can confirm that there is a problem. But in the example below it
> goes away if I uncomment the \usebtxdefinitions[aps].
> 
> /Mikael
> 
> \startbuffer[bib]
> @ELECTRONIC{hh2010,
> author = {Hans Hagen},
> year = {2010},
> title = {Metafun. \CONTEXT\ mkiv},
> url = {http://www.pragma-ade.nl/general/manuals/metafun-s.pdf},
> }
> \stopbuffer
> 
> \usebtxdataset[bib.buffer]
> 
> % \usebtxdefinitions[aps]
> 
> \starttext
> \cite[hh2010]
> \placelistofpublications
> \stoptext

Hi Mikael (and others),

[I have not upgraded yet; version: 2022.05.02 16:19, so I don't know if 
anything has changed in the new upload, but:]

In your example if you change the tag 'hh2010' to 'HansHagen2010' or anything 
with uppercase ASCII chars, the bibliography entries will not be correctly 
rendered even if you un-comment '\usebtxdefinitions[aps]' line. [Please see 
attached output example]

This issue seems to have originated in the version after 2022.04.15 when 'tag' 
and 'field' values in publ-ini.lua were string.lower()'ed. Removing those 
statements from the file seems to be a workaround. On the other hand, if the 
tag entries are all lower-case (as they were in your example), then there 
seems to be no issue. I had reported this earlier, please see:
  https://mailman.ntg.nl/pipermail/ntg-context/2022/105585.html

Thanks,
  Sreeram

btx-issue.pdf
Description: Adobe PDF document
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[NTG-context] a cross-reference query

2022-05-09 Thread jbf via ntg-context

Hi list,

In an attempt to make a dictionary interactive in certain ways, perhaps 
I am misusing the \in{}[] command here, but sometimes a reference works 
and sometimes it doesn't. I have no idea why it doesn't. Here is the 
situation:


Each dictionary entry is a section that has been defined as 'entry', 
hence we have a \startentry[title=,marking=,reference=]...\stopentry 
structure. Many entries can refer to other entries in the dictionary (in 
most cases the headword is in Italian, but the definitions, explanations 
are in English in all cases). in 90% of cases my referencing is working, 
so here is an example of one that works when 
\setupinteraction[state=start] is set:


\startentry[title={1aetà},marking={1aetà},reference={eta}]\\

1. youth. 2. first age. {\emnp.} \bullet\enspaceThe age between 
adolescence and maturity and by extension all of the human being’sfirst 
age (as opposed to old age).


Different cultures distinguish} age groupings in different ways. One 
would be unlikely to find, in English, terms like first age, second age 
etc. as recorded here. In fact there are probably only three general 
groupings in English: young, middle-aged, elderly, and the boundaries 
are rather flexible for these. Among the young category, English might 
distinguish infants, children, adolescents young adults. 
\rightarrow\enspace \in{giovani}[giovani]


\stopentry

In other words, there is an entry called 'giovani' and it begins 
\startentry[title={giovani},marking={giovani},reference={giovani}]. That 
correctly gives me a bold green clickable link which takes me to 
'giovani'. There is no number or page reference involved. I simply want 
the link to take me to the entry concerned.


But it does not always work. I have another entry called 'ad nutum' 
(Latin, not Italian in this case) with a reference to 'segretario' many 
pages on. I am absolutely sure I have the reference for segretario 
properly set up, both in its own entry and by calling it as I did for 
'giovani', namely this time as \in{segretario}[segretario] but it is not 
recognized. This is not the only non-working case. There are several.


Can anyone give me a hint as to what I might be doing wrong? I realise 
that usually these references call on page numbers or section numbers, 
but I don't want/need (or do I?) to use those. I simply the reader to be 
able to click on a hyperlink which takes them to the referenced entry.


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

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


Re: [NTG-context] SVG style ignored after double semicolon

2022-05-09 Thread Thangalin via ntg-context
That's another good idea Heinrich.

I certainly could invoke another application to sanitize the SVG, but that
brings with it a number of additional problems: Does the user have it
installed properly? Is it cross-platform? Additionally, the typesetting
code (in Java) would have to be updated to call out to sanitize the file,
plus introducing more error handling for when sanitizing goes wrong.
Cleaning up the input document feels more like a band-aid than solving the
underlying problem, which is to relax the regex ConTeXt uses to parse the
style attribute.

I'm pretty sure I can provide a patch for the regex, I just need to know
how to get debugging information printed to the console when compiling the
document using the context command.

Any ideas about how to log strings after modifying mlib-svg.lmt? I tried
adding print/report statements, but none of them showed up. Does anyone
know if that's even the right file to change to start looking into the
issue?

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

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


Re: [NTG-context] SVG style ignored after double semicolon

2022-05-09 Thread Heinrich Paeßens via ntg-context
ok, let’s get smarter.
how about sanitizing the svg-file from JFreeSVG with svgo or svgcleaner or nano 
or else?
And as a side effect you’d have the file optimized, ie. a smaller size 
(lossless I suppose) …
and are you sure that the ;;-issue is the only bug? After sanitizing you’ll 
never know but that should be ok.

I’ve checked this. For your example it’s ok.

> svgo in.svg
> in.svg:
> Done in 24 ms!
> 0.091 KiB - 26.9% = 0.066 KiB

> svgcleaner /Users/hp/in2.svg /Users/hp/out2.svg
> Your image is 9.36% smaller now.

 ,__,
 {o,o}
./)_)
 -»-»-

> On 9. May 2022, at 19:01, Heinrich Paeßens via ntg-context 
> mailto:ntg-context@ntg.nl>> wrote:
> 
> Yes, now I see, but isn’t there sth missing in the export from JFreeSVG, that 
> were supposed to fill in between the semicolons? If not, why don’t you just 
> post-process, if possible … 
> … sth like 
> 
> > gsed ’s/;;/;/g' in.svg > out.svg
> 
> ;-)
> 
> 
> 
>> On 9. May 2022, at 17:42, Thangalin > > wrote:
>> 
>> Hi Heinrich,
>> 
>> Use the SVG I provided. R and Renjin use two different SVG generators. 
>> Renjin uses JFreeSVG when exporting as SVG. As you pointed out, there are no 
>> issues with R because it will export an SVG file without any double 
>> semicolons.
>> 
>> In other words, try this:
>> 
>> \startbuffer[svg]
>> 
>>   > style="stroke:rgb(0,0,0);;fill:none" />
>> 
>> \stopbuffer
>> 
>> \starttext
>>   \placefigure{}{\includesvgbuffer[svg][conversion=mp]}
>> \stoptext
>> 
>> If you get a black square, that's the bug. If you get a white square, then 
>> there's something different about our environment setups.
>> 
>> Cheers!
>> 
>> 
>> On Mon, May 9, 2022 at 1:55 AM Heinrich Paeßens > > wrote:
>> Hi there
>> 
>> I can compile your example without any tweaks, hence could not reproduce any 
>> error.
>> 
>> cheers
>> Heinrich
>> 
>> ———
>> 
>> R version 4.2.0 (2022-04-22) -- "Vigorous Calisthenics"
>> Copyright (C) 2022 The R Foundation for Statistical Computing
>> Platform: x86_64-apple-darwin17.0 (64-bit)
>> 
>> [R.app GUI 1.78 (8075) x86_64-apple-darwin17.0]
>> 
>> > svg("/Users/hp/filename.svg");
>> > plot(rnorm(200));
>> > dev.off()
>> null device 
>>   1 
>> > 
>> 
>> ———
>> 
>> % !TEX program = lmtx
>> 
>> \starttext
>>   \externalfigure[/Users/hp/filename.svg][conversion=mp]
>> \stoptext
>> 
>> ———
>> 
>> 
>> 
>> 
>>> On 9. May 2022, at 08:10, Thangalin via ntg-context >> > wrote:
>>> 
>>> Here's a screenshot comparing ConTeXt's PDF output (left) with KeenWrite's 
>>> preview for the same SVG document:
>>> 
>>> https://i.ibb.co/68nqwrg/render-r-plot.png 
>>> 
>>> 
>>> I've filed a bug against Renjin's SVG exporter.
>>> 
>>> Any guidance on how to fix this is greatly appreciated.
>>> 
>>> ___
>>> If your question is of interest to others as well, please add an entry to 
>>> the Wiki!
>>> 
>>> maillist : ntg-context@ntg.nl  / 
>>> http://www.ntg.nl/mailman/listinfo/ntg-context 
>>> 
>>> webpage  : http://www.pragma-ade.nl  / 
>>> http://context.aanhet.net 
>>> archive  : https://bitbucket.org/phg/context-mirror/commits/ 
>>> 
>>> wiki : http://contextgarden.net 
>>> ___
>> 
> 
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl  / 
> http://www.ntg.nl/mailman/listinfo/ntg-context 
> 
> webpage  : http://www.pragma-ade.nl  / 
> http://context.aanhet.net 
> archive  : https://bitbucket.org/phg/context-mirror/commits/ 
> 
> wiki : http://contextgarden.net 
> ___

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

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


[NTG-context] Simple question

2022-05-09 Thread Gerben Wierda via ntg-context
What is the easiest way to have a ‘database’ of translations for strings and 
maybe links?

I now have 4 languages and 2 versions so 8 documents, but I’d like to have all 
translatable strings together so I can maintain these in a single file. Ideally 
I can do a file where the key of the translation is one language (say English) 
and the translations are part of that. 

Something I can call like this

\translatephrase[English phrase][nl]
\translatelocation[../LMTX-Output/without-ids/en/file.pdf][nl][simple]

and where I can maintain all the translations a bit like this:

\translationentry[English phrase]{
\definetranslatephrase[nl]Nederlandse frase]
\definetranslatephrase[fr][Phrase français]
}
}

\translatelocation[../LMTX-Output/without-ids/en/file.pdf][simple][nl][../LMTX-Output/without-ids/nl/file-simple.pdf]]
\translatelocation[../LMTX-Output/without-ids/en/file.pdf][none][nl][../LMTX-Output/without-ids/nl/file.pdf]]


Where the \translatelocation command can be used inside an \externalfigure 
command and \translatephrase can be used as as text.

In the end I’d like to compile with 

context language=fr mode=simple mainfile.tex

Doable?

Gerben Wierda (LinkedIn )
R IT Strategy  (main site)
Book: Chess and the Art of Enterprise Architecture 
Book: Mastering ArchiMate 

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

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


Re: [NTG-context] SVG style ignored after double semicolon

2022-05-09 Thread Thangalin via ntg-context
> gsed ’s/;;/;/g' in.svg > out.svg

If a user has an SVG text element where ";;" goes into the document, then
that'd make for an awfully awkward user experience and obscure bug to fix.
For example: plot(rnorm(5), xlab=";;")

Meaning, the document must be loaded, parsed, and all style/class elements
sanitized. KeenWrite performs real-time rendering of documents. The code to
preview the document is shared by the code that exports to XHTML for
ConTeXt to render. Effectively, this would be parsing the SVG document
twice, which would bog down the previewer.

Changing the regexes in mlib-svg.lmt to forgive empty styles seems like the
most efficient and flexible approach, which follows the robustness
principle: "be conservative in what you send, be liberal in what you
accept."

The specs for CSS styles are ambiguous as to whether property declarations
are required:

https://www.w3.org/TR/2001/PR-SVG-20010719/styling.html#StyleAttribute

I've since learned that Renjin uses JFreeSVG to produce the SVG file. I've
logged a bug against JFreeSVG to avoid the double semicolon. However, this
means waiting for a fix from JFreeSVG and then waiting for that fix to be
integrated into Renjin. It'll probably be months before that'll happen.
(The last release of Renjin was like 10 months ago.)

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

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


Re: [NTG-context] SVG style ignored after double semicolon

2022-05-09 Thread Heinrich Paeßens via ntg-context
Yes, now I see, but isn’t there sth missing in the export from JFreeSVG, that 
were supposed to fill in between the semicolons? If not, why don’t you just 
post-process, if possible … 
… sth like 

> gsed ’s/;;/;/g' in.svg > out.svg

;-)



> On 9. May 2022, at 17:42, Thangalin  wrote:
> 
> Hi Heinrich,
> 
> Use the SVG I provided. R and Renjin use two different SVG generators. Renjin 
> uses JFreeSVG when exporting as SVG. As you pointed out, there are no issues 
> with R because it will export an SVG file without any double semicolons.
> 
> In other words, try this:
> 
> \startbuffer[svg]
> 
>style="stroke:rgb(0,0,0);;fill:none" />
> 
> \stopbuffer
> 
> \starttext
>   \placefigure{}{\includesvgbuffer[svg][conversion=mp]}
> \stoptext
> 
> If you get a black square, that's the bug. If you get a white square, then 
> there's something different about our environment setups.
> 
> Cheers!
> 
> 
> On Mon, May 9, 2022 at 1:55 AM Heinrich Paeßens  > wrote:
> Hi there
> 
> I can compile your example without any tweaks, hence could not reproduce any 
> error.
> 
> cheers
> Heinrich
> 
> ———
> 
> R version 4.2.0 (2022-04-22) -- "Vigorous Calisthenics"
> Copyright (C) 2022 The R Foundation for Statistical Computing
> Platform: x86_64-apple-darwin17.0 (64-bit)
> 
> [R.app GUI 1.78 (8075) x86_64-apple-darwin17.0]
> 
> > svg("/Users/hp/filename.svg");
> > plot(rnorm(200));
> > dev.off()
> null device 
>   1 
> > 
> 
> ———
> 
> % !TEX program = lmtx
> 
> \starttext
>   \externalfigure[/Users/hp/filename.svg][conversion=mp]
> \stoptext
> 
> ———
> 
> 
> 
> 
>> On 9. May 2022, at 08:10, Thangalin via ntg-context > > wrote:
>> 
>> Here's a screenshot comparing ConTeXt's PDF output (left) with KeenWrite's 
>> preview for the same SVG document:
>> 
>> https://i.ibb.co/68nqwrg/render-r-plot.png 
>> 
>> 
>> I've filed a bug against Renjin's SVG exporter.
>> 
>> Any guidance on how to fix this is greatly appreciated.
>> 
>> ___
>> If your question is of interest to others as well, please add an entry to 
>> the Wiki!
>> 
>> maillist : ntg-context@ntg.nl  / 
>> http://www.ntg.nl/mailman/listinfo/ntg-context 
>> 
>> webpage  : http://www.pragma-ade.nl  / 
>> http://context.aanhet.net 
>> archive  : https://bitbucket.org/phg/context-mirror/commits/ 
>> 
>> wiki : http://contextgarden.net 
>> ___
> 

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

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


Re: [NTG-context] upload

2022-05-09 Thread Alexandre Christe via ntg-context
Sorry for spamming again, but I've underlooked the message from śrīrāma who
mentioned a workaround: use only lowercase letters in the . Then it works.
I think this bib issue could be downgraded to a low priority.

Le lun. 9 mai 2022 à 18:17, Hans Hagen via ntg-context 
a écrit :

> On 5/9/2022 5:54 PM, mf via ntg-context wrote:
> > I'm downloading it and I see a lot of mkii files and even some Ruby
> files.
> >
> > It looks like some old material got into the update. Is everything right?
> hm, i'm on a different laptop now so maybe some program is not yet
> installed, i'll check it
>
> Hans
>
> -
>Hans Hagen | PRAGMA ADE
>Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
> tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
> -
>
> ___
> If your question is of interest to others as well, please add an entry to
> the Wiki!
>
> maillist : ntg-context@ntg.nl /
> http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
>
> ___
>
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] upload

2022-05-09 Thread Mikael Sundqvist via ntg-context
On Mon, May 9, 2022 at 6:16 PM Alexandre Christe via ntg-context
 wrote:
>
> Sadly I have to report the bibliography is still broken. Could someone else 
> confirm? It's an unfortunate timing since I need to hand in some report 
> really soon.
>

I can confirm that there is a problem. But in the example below it
goes away if I uncomment the \usebtxdefinitions[aps].

/Mikael

\startbuffer[bib]
@ELECTRONIC{hh2010,
author = {Hans Hagen},
year = {2010},
title = {Metafun. \CONTEXT\ mkiv},
url = {http://www.pragma-ade.nl/general/manuals/metafun-s.pdf},
}
\stopbuffer

\usebtxdataset[bib.buffer]

% \usebtxdefinitions[aps]

\starttext
\cite[hh2010]
\placelistofpublications
\stoptext
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] upload

2022-05-09 Thread Alexandre Christe via ntg-context
Sadly I have to report the bibliography is still broken. Could someone else
confirm? It's an unfortunate timing since I need to hand in some report
really soon.

Le lun. 9 mai 2022 à 17:56, mf via ntg-context  a
écrit :

> I'm downloading it and I see a lot of mkii files and even some Ruby files.
>
> It looks like some old material got into the update. Is everything right?
>
> Massi
>
> Il 09/05/22 17:41, Hans Hagen via ntg-context ha scritto:
> > Hi,
> >
> > I uploaded a new version of lmtx (also because some users have to test
> > some new metapost functionality). In the next upload metafun will use
> > 'double' mode (and scaledfun will be the traditional one). The advantage
> > is less dager for overflows and in the meantime running in double mode
> > is often also faster.
> >
>
> ___
> If your question is of interest to others as well, please add an entry to
> the Wiki!
>
> maillist : ntg-context@ntg.nl /
> http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
>
> ___
>
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] upload

2022-05-09 Thread Hans Hagen via ntg-context

On 5/9/2022 5:54 PM, mf via ntg-context wrote:

I'm downloading it and I see a lot of mkii files and even some Ruby files.

It looks like some old material got into the update. Is everything right?
hm, i'm on a different laptop now so maybe some program is not yet 
installed, i'll check it


Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[NTG-context] Cron /var/www/aanhet.net/context/bin/cron/context-mirror

2022-05-09 Thread Cron Daemon via ntg-context
receiving incremental file list
 ./
 ctan.lsr
 document-2.htm
 download-1.htm
 download-2.htm
 logo-ade.png
 logo-cts.png
 logo-pod.png
 rss.xml
 general/manuals/
 general/manuals/columnsets.pdf
 general/manuals/onandon.pdf
 
 sent 29,815 bytes  received 3,096,037 bytes  2,083,901.33 bytes/sec
 total size is 456,811,369  speedup is 146.14
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] upload

2022-05-09 Thread mf via ntg-context

I'm downloading it and I see a lot of mkii files and even some Ruby files.

It looks like some old material got into the update. Is everything right?

Massi

Il 09/05/22 17:41, Hans Hagen via ntg-context ha scritto:

Hi,

I uploaded a new version of lmtx (also because some users have to test 
some new metapost functionality). In the next upload metafun will use 
'double' mode (and scaledfun will be the traditional one). The advantage 
is less dager for overflows and in the meantime running in double mode 
is often also faster.



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

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


Re: [NTG-context] SVG style ignored after double semicolon

2022-05-09 Thread Thangalin via ntg-context
Hi Heinrich,

Use the SVG I provided. R and Renjin use two different SVG generators.
Renjin uses JFreeSVG when exporting as SVG. As you pointed out, there are
no issues with R because it will export an SVG file without any double
semicolons.

In other words, try this:

\startbuffer[svg]

  

\stopbuffer

\starttext
  \placefigure{}{\includesvgbuffer[svg][conversion=mp]}
\stoptext

If you get a black square, that's the bug. If you get a white square, then
there's something different about our environment setups.

Cheers!


On Mon, May 9, 2022 at 1:55 AM Heinrich Paeßens  wrote:

> Hi there
>
> I can compile your example without any tweaks, hence could not reproduce
> any error.
>
> cheers
> Heinrich
>
> ———
>
> R version 4.2.0 (2022-04-22) -- "Vigorous Calisthenics"
> Copyright (C) 2022 The R Foundation for Statistical Computing
> Platform: x86_64-apple-darwin17.0 (64-bit)
>
> [R.app GUI 1.78 (8075) x86_64-apple-darwin17.0]
>
> > svg("/Users/hp/filename.svg");
> > plot(rnorm(200));
> > dev.off()
> null device
>   1
> >
>
> ———
>
> % !TEX program = lmtx
>
> \starttext
>   \externalfigure[/Users/hp/filename.svg][conversion=mp]
> \stoptext
>
> ———
>
>
>
>
> On 9. May 2022, at 08:10, Thangalin via ntg-context 
> wrote:
>
> Here's a screenshot comparing ConTeXt's PDF output (left) with KeenWrite's
> preview for the same SVG document:
>
> https://i.ibb.co/68nqwrg/render-r-plot.png
>
> I've filed a bug against Renjin's SVG exporter.
>
> Any guidance on how to fix this is greatly appreciated.
>
>
> ___
> If your question is of interest to others as well, please add an entry to
> the Wiki!
>
> maillist : ntg-context@ntg.nl /
> http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
>
> ___
>
>
>
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[NTG-context] upload

2022-05-09 Thread Hans Hagen via ntg-context

Hi,

I uploaded a new version of lmtx (also because some users have to test 
some new metapost functionality). In the next upload metafun will use 
'double' mode (and scaledfun will be the traditional one). The advantage 
is less dager for overflows and in the meantime running in double mode 
is often also faster.


Hans



-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] blockligatures removing characters

2022-05-09 Thread Denis Maier via ntg-context
So, if IIUC those substitutions can be used to block certain ligatures 
throughout? 

You can load multiple goodies files as in the example below, correct?

Best,
Denis

%%
\startluacode
 local blockthlig = {
 name= "blockthlig",
 options = {
 {
 substitutions = {
 th = "t|h",
 Th = "T|h",
 },
 },
 },
 }
 table.save("blockthlig.llg",blockthlig)
\stopluacode

\setuplanguage[en][goodies={lang-en.llg, blockthlig.llg }]

\setupbodyfont[ebgaramond]

\starttext
 The This These fiets and thisthis thisfiets 
\stoptext
%%


> -Ursprüngliche Nachricht-
> Von: ntg-context  Im Auftrag von Hans Hagen
> via ntg-context
> Gesendet: Montag, 9. Mai 2022 15:03
> An: ntg-context@ntg.nl
> Cc: Hans Hagen 
> Betreff: Re: [NTG-context] blockligatures removing characters
> 
> On 5/9/2022 9:56 AM, Denis Maier via ntg-context wrote:
> > Happens here as well, already on  ConTeXt  ver: 2022.03.12 17:56 LMTX.
> >
> > By the way, this even happens without special fonts:
> >
> > \blockligatures[Th]
> >
> > \definefontfeature[default:blocklig][default][liga=yes,blockligatures=
> > yes]
> >
> > \setupbodyfont[myfont]
> >
> > \starttext
> >
> > \definedfont[Serif*default:blocklig]
> >
> >      The This These are missing the `h'
> >
> > \stoptext
> I'll fix it but it's not the way to do it in lmtx where we have
> 
> \startluacode
>  local demo = {
>  name= "demo",
>  options = {
>  {
>  patterns = {
>  fio  = "f|io",
>  },
>  words = [[ fioot fiots ]],
>  },
>  {
>  patterns = {
>  fio  = "t|h",
>  },
>  words = [[ this that ]],
>  },
>  },
>  }
>  table.save("oeps-fixes.llg",demo)
> \stopluacode
> 
> \setuplanguage[en][goodies={oeps-fixes.llg}]
> 
> \setupbodyfont[ebgaramond]
> 
> \starttext
>  fiets fiots fiats fioot this that
> \stoptext
> 
> I just added (no upload) this
> 
> \startluacode
>  local demo = {
>  name= "demo",
>  options = {
>  {
>  substitutions = {
>  th = "t|h",
>  Th = "T|h",
>  st = "s|t",
>  St = "S|t",
>  fi = "f|i",
>  },
>  },
>  },
>  }
>  table.save("oeps-fixes.llg",demo)
> \stopluacode
> 
> \setuplanguage[en][goodies={oeps-fixes.llg}]
> 
> \setupbodyfont[ebgaramond]
> 
> \starttext
>  The This These fiets and thisthis thisfiets \stoptext
> 
> 
> 
> -
>Hans Hagen | PRAGMA ADE
>Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
> tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
> -
> __
> _
> If your question is of interest to others as well, please add an entry to the
> Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-
> context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net archive  :
> https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> __
> _
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] blockligatures removing characters

2022-05-09 Thread Hans Hagen via ntg-context

On 5/9/2022 9:56 AM, Denis Maier via ntg-context wrote:

Happens here as well, already on  ConTeXt  ver: 2022.03.12 17:56 LMTX.

By the way, this even happens without special fonts:

\blockligatures[Th]

\definefontfeature[default:blocklig][default][liga=yes,blockligatures=yes]

\setupbodyfont[myfont]

\starttext

\definedfont[Serif*default:blocklig]

     The This These are missing the `h'

\stoptext

I'll fix it but it's not the way to do it in lmtx where we have

\startluacode
local demo = {
name= "demo",
options = {
{
patterns = {
fio  = "f|io",
},
words = [[ fioot fiots ]],
},
{
patterns = {
fio  = "t|h",
},
words = [[ this that ]],
},
},
}
table.save("oeps-fixes.llg",demo)
\stopluacode

\setuplanguage[en][goodies={oeps-fixes.llg}]

\setupbodyfont[ebgaramond]

\starttext
fiets fiots fiats fioot this that
\stoptext

I just added (no upload) this

\startluacode
local demo = {
name= "demo",
options = {
{
substitutions = {
th = "t|h",
Th = "T|h",
st = "s|t",
St = "S|t",
fi = "f|i",
},
},
},
}
table.save("oeps-fixes.llg",demo)
\stopluacode

\setuplanguage[en][goodies={oeps-fixes.llg}]

\setupbodyfont[ebgaramond]

\starttext
The This These fiets and thisthis thisfiets
\stoptext



-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] How to place "Content" and other chapter-level titles the same vertical distance from the top?

2022-05-09 Thread Willi Egger via ntg-context
Hi Joel,

I think you can achieve what you want by using \placelist[chapter,section] 
instead of \completecontent. Then you can start the TOC by 
\startchapter[Content] \placelist…. \stopchapter. The same approach can be used 
for other lists/indexes.

Kind regards

Willli

> On 8 May 2022, at 04:49, Joel via ntg-context  wrote:
> 
> I created a chapter title style with a large number telling the chapter 
> number, and below it the title of the chapter.
> 
> It looks like this:
> 
> -
>1   <--really big chapter number
> === <-- there is a border created by a background image between these
>How to keep  <--chapter title
>fish
> 
> This is the article <-- the article begins
> about how to keep
> fish
> -
> 
> \definefontsize[a]%
> \definefontsize[b]%
> \definefontsize[c]%
> \definefontsize[l]%
> \setupbodyfontenvironment[default]%
>[%
>a=1.200,
>b=1.440,
>c=1.728,
>l=8.916
>]%
> %
> 
> \setuplabeltext[chapter=\strut]
> \setuphead[chapter][style=\ssc,placehead=yes,expansion=yes,page=yes,
> numbercommand=\groupedcommand{}{\blank[1cm]},
> alternative=middle,
> numberstyle=ssl,
> numbercolor=green,
> strut=yes]
> 
> \starttext
> 
>\completecontent
> 
>\chapter{Test}
>\input knuth
> 
>\chapter{Test}
>\input knuth
> 
> \stoptext
> 
> The problem I'm facing, is anytime a chapter title is called, such as 
> "Content" in complete content, or something in the appendix, such as one of 
> the indexes, no number is printed above, so the vertical distance from the 
> top of the page to the top of the chapter title changes. I need these to be 
> consistent, as there is a background image, with vertical lines.
> 
> Basically, if I call \chapter{}, it appears perfectly aligned vertically on 
> the page, with no other settings. But when calling \completecontent or a 
> similar title that won't get a number, because the number isn't placed, it is 
> vertically higher on the page, but I need it to be printed the same height, 
> as it it had an invisible number.
> 
> I've tried adding strut (the code has it in two places), but don't know if 
> I've used it appropriately, and it didn't solve the problem.
> 
> --Joel
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> ___

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

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


[NTG-context] Regular online-meetup

2022-05-09 Thread Henning Hraban Ramm via ntg-context

You’re invited to join this Wednesday, May 11th, 15:00 CEST (UTC+2)

at https://lecture.senfcall.de/hen-rbr-rku-oke

ConTeXt users of all levels are welcome!

Hans will probably give a Q session again – please announce subjects 
you’d like to discuss ASAP, so that he can prepare.


E.g. we can talk a bit about bibliography (citeproc/CSL) and 
widow/orphan control, and I’d like to understand collectors.



(Same blurb as every time:)

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

* Open the above URL, 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, 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.

* If audio/video doesn’t work for you, you can still use the text chat.
* Screen sharing needs a lot of bandwidth.

[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...

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

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


Re: [NTG-context] SVG style ignored after double semicolon

2022-05-09 Thread Heinrich Paeßens via ntg-context
Hi thereI can compile your example without any tweaks, hence could not reproduce any error.cheersHeinrich———R version 4.2.0 (2022-04-22) -- "Vigorous Calisthenics"Copyright (C) 2022 The R Foundation for Statistical ComputingPlatform: x86_64-apple-darwin17.0 (64-bit)[R.app GUI 1.78 (8075) x86_64-apple-darwin17.0]> svg("/Users/hp/filename.svg");> plot(rnorm(200));> dev.off()null device           1 > ———% !TEX program = lmtx\starttext  \externalfigure[/Users/hp/filename.svg][conversion=mp]\stoptext———

tst-svg-mp.pdf
Description: Adobe PDF document
On 9. May 2022, at 08:10, Thangalin via ntg-context  wrote:Here's a screenshot comparing ConTeXt's PDF output (left) with KeenWrite's preview for the same SVG document:https://i.ibb.co/68nqwrg/render-r-plot.pngI've filed a bug against Renjin's SVG exporter.Any guidance on how to fix this is greatly appreciated.
___If your question is of interest to others as well, please add an entry to the Wiki!maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-contextwebpage  : http://www.pragma-ade.nl / http://context.aanhet.netarchive  : https://bitbucket.org/phg/context-mirror/commits/wiki : http://contextgarden.net__
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] blockligatures removing characters

2022-05-09 Thread Denis Maier via ntg-context
Happens here as well, already on  ConTeXt  ver: 2022.03.12 17:56 LMTX.

By the way, this even happens without special fonts:

\blockligatures[Th]
\definefontfeature[default:blocklig][default][liga=yes,blockligatures=yes]

\setupbodyfont[myfont]

\starttext
\definedfont[Serif*default:blocklig]
The This These are missing the `h'
\stoptext



Von: ntg-context  Im Auftrag von Ben Moon via 
ntg-context
Gesendet: Samstag, 7. Mai 2022 17:49
An: Context Mailing List 
Cc: Ben Moon 
Betreff: [NTG-context] blockligatures removing characters

Hi List,

I'm using blockligatures to avoid the 'Th' ligature in some fonts but keep 
others. Recently I've found this removes the 'h' completely, i.e. 'Th' is 
changed to 'T', 'The' becomes 'Te' etc.

Is there a way to restore the blockligatures functionality? I'm on ConTeXt 
version 2022.05.02 16:19.

Here is a MWE using Almendra 
(https://fonts.google.com/specimen/Almendra)
 from Google Fonts.

```
\starttypescriptcollection[myfont]

\starttypescript[myfont]
\definefontsynonym[Serif][Almendra-Regular][features=default]
\stoptypescript

\starttypescript[myfont]
\definetypeface[\typescriptone][rm][serif][myfont][default][]
\stoptypescript

\stoptypescriptcollection

\blockligatures[Th]

\definefontfeature[default][default][liga=yes]
\definefontfeature[default:nolig][default][liga=no]
\definefontfeature[default:blocklig][default][liga=yes,blockligatures=yes]

\setupbodyfont[myfont]

\starttext
The This These have the Th ligature and others (fi)

\definedfont[Serif*default:nolig]
The This These have no ligatures (not fi)

\definedfont[Serif*default:blocklig]
The This These are missing the `h' (fi)
\stoptext
```

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

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


Re: [NTG-context] How to place "Content" and other chapter-level titles the same vertical distance from the top?

2022-05-09 Thread Denis Maier via ntg-context
> -Ursprüngliche Nachricht-
> Von: Taco Hoekwater 
> Gesendet: Montag, 9. Mai 2022 09:48
> An: mailing list for ConTeXt users 
> Cc: Maier, Denis Christian (UB) 
> Betreff: Re: [NTG-context] How to place "Content" and other chapter-level
> titles the same vertical distance from the top?
> 
> 
> 
> > On 9 May 2022, at 09:45, Denis Maier via ntg-context  cont...@ntg.nl> wrote:
> >
> > This example from the wiki does not run anymore with LMTX:
> 
> Still worked ok in:  ConTeXt  ver: 2022.04.19 19:53 LMTX

Or better yet, works again in current LMTX versions. (Looks like I need to 
update again.) 

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

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


Re: [NTG-context] How to place "Content" and other chapter-level titles the same vertical distance from the top?

2022-05-09 Thread Taco Hoekwater via ntg-context


> On 9 May 2022, at 09:45, Denis Maier via ntg-context  
> wrote:
> 
> This example from the wiki does not run anymore with LMTX:

Still worked ok in:  ConTeXt  ver: 2022.04.19 19:53 LMTX

> You get the error message:
> I've run across a '}' that doesn't seem to match anything. For example,
> '\def\a#1{...}' and '\a}' would produce this error. The '\par' that I've just
> inserted will cause me to report a runaway argument that might be the root of 
> the
> problem.
> 
> Maybe some expansion thing. Don't know, but consider this :
> 
> %
> \setuppapersize[A6][A6] 
> \setupbodyfont[8pt] 
> \define[2]\MyChapterCommand{#1 #2} % does work
> %\def\MyChapterCommand#1#2{#1 #2} % does not work
> \setuphead[chapter][ 
>command=\MyChapterCommand, 
>] 
> \starttext 
> \startchapter{test} 
> \input tufte 
> \stopchapter 
> \stoptext
> %
> 
> So, this here should get you started:
> 
> %
> 
> \showframe
> \setuppapersize[A6][A6]
> \setupbodyfont[8pt]
> \define[2]\MyChapterCommand%
>  {\vbox to 15mm\bgroup
>\vss
>{#1\blank #2}
>\egroup}
> \define[1]\MyTitleCommand%
>  {\vbox to 15mm\bgroup
>\vss
>{#1}
>\egroup}
> 
> \setuphead[chapter][command=\MyChapterCommand]
> \setuphead[title][command=\MyTitleCommand]
> \starttext
> \chapter{test} \input tufte
> \title{test} \input tufte
> \stoptext
> %
> 
> I bet there are easier solutions, maybe use framed instead of vbox.
> 
> Denis
> 
> 
>> 
>> 
>> Von: Maier, Denis Christian (UB)
>> Gesendet: Sonntag, 8. Mai 2022 09:24:51
>> An: mailing list for ConTeXt users
>> Cc: Joel
>> Betreff: AW: [NTG-context] How to place "Content" and other chapter-level
>> titles the same vertical distance from the top?
>> 
>> Maybe define your own chapter command and use a vbox.
>> Look at this example from the wiki:
>> 
>> \setuppapersize[A6][A6]
>> \setupbodyfont[8pt]
>> \def\MyChapterCommand#1#2%
>>  {\vbox to 4cm\bgroup
>> {#1\hskip.75em #2}
>> \vss
>> \egroup}
>> \setuphead[chapter][header=nomarking, command=\MyChapterCommand]
>> \starttext \chapter{test} \input tufte \stoptext
>> 
>> That's not exactly what you want, but you can adapt it.
>> 
>> Denis
>> 
>> Von: ntg-context  im Auftrag von Joel via ntg-
>> context 
>> Gesendet: Sonntag, 8. Mai 2022 04:49:32
>> An: ntg-context@ntg.nl
>> Cc: Joel
>> Betreff: [NTG-context] How to place "Content" and other chapter-level titles
>> the same vertical distance from the top?
>> 
>> I created a chapter title style with a large number telling the chapter 
>> number,
>> and below it the title of the chapter.
>> 
>> It looks like this:
>> 
>> -
>>1   <--really big chapter number
>> === <-- there is a border created by a background image between
>> these
>>How to keep  <--chapter title
>>fish
>> 
>> This is the article <-- the article begins about how to keep fish
>> -
>> 
>> \definefontsize[a]%
>> \definefontsize[b]%
>> \definefontsize[c]%
>> \definefontsize[l]%
>> \setupbodyfontenvironment[default]%
>>[%
>>a=1.200,
>>b=1.440,
>>c=1.728,
>>l=8.916
>>]%
>> %
>> 
>> \setuplabeltext[chapter=\strut]
>> \setuphead[chapter][style=\ssc,placehead=yes,expansion=yes,page=yes,
>> numbercommand=\groupedcommand{}{\blank[1cm]},
>> alternative=middle,
>> numberstyle=ssl,
>> numbercolor=green,
>> strut=yes]
>> 
>> \starttext
>> 
>>\completecontent
>> 
>>\chapter{Test}
>>\input knuth
>> 
>>\chapter{Test}
>>\input knuth
>> 
>> \stoptext
>> 
>> The problem I'm facing, is anytime a chapter title is called, such as 
>> "Content"
>> in complete content, or something in the appendix, such as one of the
>> indexes, no number is printed above, so the vertical distance from the top of
>> the page to the top of the chapter title changes. I need these to be
>> consistent, as there is a background image, with vertical lines.
>> 
>> Basically, if I call \chapter{}, it appears perfectly aligned vertically on 
>> the
>> page, with no other settings. But when calling \completecontent or a similar
>> title that won't get a number, because the number isn't placed, it is 
>> vertically
>> higher on the page, but I need it to be printed the same height, as it it 
>> had an
>> invisible number.
>> 
>> I've tried adding strut (the code has it in two places), but don't know if 
>> I've
>> used it appropriately, and it didn't solve the problem.
>> 
>> --Joel
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : 

Re: [NTG-context] How to place "Content" and other chapter-level titles the same vertical distance from the top?

2022-05-09 Thread Denis Maier via ntg-context
This example from the wiki does not run anymore with LMTX:
You get the error message:
I've run across a '}' that doesn't seem to match anything. For example,
'\def\a#1{...}' and '\a}' would produce this error. The '\par' that I've just
inserted will cause me to report a runaway argument that might be the root of 
the
problem.

Maybe some expansion thing. Don't know, but consider this :

%
\setuppapersize[A6][A6] 
\setupbodyfont[8pt] 
\define[2]\MyChapterCommand{#1 #2} % does work
%\def\MyChapterCommand#1#2{#1 #2} % does not work
\setuphead[chapter][ 
command=\MyChapterCommand, 
] 
\starttext 
\startchapter{test} 
\input tufte 
\stopchapter 
\stoptext
%

So, this here should get you started:

%

\showframe
\setuppapersize[A6][A6]
\setupbodyfont[8pt]
\define[2]\MyChapterCommand%
  {\vbox to 15mm\bgroup
\vss
{#1\blank #2}
\egroup}
\define[1]\MyTitleCommand%
  {\vbox to 15mm\bgroup
\vss
{#1}
\egroup}

\setuphead[chapter][command=\MyChapterCommand]
\setuphead[title][command=\MyTitleCommand]
\starttext
\chapter{test} \input tufte
\title{test} \input tufte
\stoptext
%

I bet there are easier solutions, maybe use framed instead of vbox.

Denis

 
> 
> 
> Von: Maier, Denis Christian (UB)
> Gesendet: Sonntag, 8. Mai 2022 09:24:51
> An: mailing list for ConTeXt users
> Cc: Joel
> Betreff: AW: [NTG-context] How to place "Content" and other chapter-level
> titles the same vertical distance from the top?
> 
> Maybe define your own chapter command and use a vbox.
> Look at this example from the wiki:
> 
> \setuppapersize[A6][A6]
> \setupbodyfont[8pt]
> \def\MyChapterCommand#1#2%
>   {\vbox to 4cm\bgroup
>  {#1\hskip.75em #2}
>  \vss
>  \egroup}
> \setuphead[chapter][header=nomarking, command=\MyChapterCommand]
> \starttext \chapter{test} \input tufte \stoptext
> 
> That's not exactly what you want, but you can adapt it.
> 
> Denis
> 
> Von: ntg-context  im Auftrag von Joel via ntg-
> context 
> Gesendet: Sonntag, 8. Mai 2022 04:49:32
> An: ntg-context@ntg.nl
> Cc: Joel
> Betreff: [NTG-context] How to place "Content" and other chapter-level titles
> the same vertical distance from the top?
> 
> I created a chapter title style with a large number telling the chapter 
> number,
> and below it the title of the chapter.
> 
> It looks like this:
> 
> -
> 1   <--really big chapter number
> === <-- there is a border created by a background image between
> these
> How to keep  <--chapter title
> fish
> 
> This is the article <-- the article begins about how to keep fish
> -
> 
> \definefontsize[a]%
> \definefontsize[b]%
> \definefontsize[c]%
> \definefontsize[l]%
> \setupbodyfontenvironment[default]%
> [%
> a=1.200,
> b=1.440,
> c=1.728,
> l=8.916
> ]%
> %
> 
> \setuplabeltext[chapter=\strut]
> \setuphead[chapter][style=\ssc,placehead=yes,expansion=yes,page=yes,
> numbercommand=\groupedcommand{}{\blank[1cm]},
> alternative=middle,
> numberstyle=ssl,
> numbercolor=green,
> strut=yes]
> 
> \starttext
> 
> \completecontent
> 
> \chapter{Test}
> \input knuth
> 
> \chapter{Test}
> \input knuth
> 
> \stoptext
> 
> The problem I'm facing, is anytime a chapter title is called, such as 
> "Content"
> in complete content, or something in the appendix, such as one of the
> indexes, no number is printed above, so the vertical distance from the top of
> the page to the top of the chapter title changes. I need these to be
> consistent, as there is a background image, with vertical lines.
> 
> Basically, if I call \chapter{}, it appears perfectly aligned vertically on 
> the
> page, with no other settings. But when calling \completecontent or a similar
> title that won't get a number, because the number isn't placed, it is 
> vertically
> higher on the page, but I need it to be printed the same height, as it it had 
> an
> invisible number.
> 
> I've tried adding strut (the code has it in two places), but don't know if 
> I've
> used it appropriately, and it didn't solve the problem.
> 
> --Joel
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] SVG style ignored after double semicolon

2022-05-09 Thread Thangalin via ntg-context
Here's a screenshot comparing ConTeXt's PDF output (left) with KeenWrite's
preview for the same SVG document:

https://i.ibb.co/68nqwrg/render-r-plot.png

I've filed a bug against Renjin's SVG exporter.

Any guidance on how to fix this is greatly appreciated.
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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