[NTG-context] \clip isn’t clipping any more

2021-01-20 Thread Henning Hraban Ramm
In the following example, the image is calculated after the clipped width, but 
the full image is shown:

\setupexternalfigures[location=default]
\showframe

\starttext
\strut
\hfill\clip[width=20mm]{\externalfigure[cow][height=30mm]}

\stoptext

This happens in current LMTX (2020-01-18), it was still ok in LMTX as of 
2020-01-11. It also works in MkIV.


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] running head for TOC

2021-01-19 Thread Henning Hraban Ramm

> Am 19.01.2021 um 10:34 schrieb jbf :
> 
> I had tried that - I tried:
> 
> \definehead
>  [tochead]
>  [chapter]
> 
> and of course combined list does not contain tochead, but chapter. But what 
> happens then is that the Table of Contents disappears altogether) except for 
> the actually head 'Table of Contents')!

Please try to come up with a MWE.

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] running head for TOC

2021-01-19 Thread Henning Hraban Ramm


> Am 19.01.2021 um 05:55 schrieb jbf :
> 
> I have a very long Table of Contents (runs across five pages) and the author 
> would like the running head on recto pages for this to be 'Table of Contents'.
> 
> I am using the following to create the TOC head:
> 
> \definehead
>   [tochead]
>   [title]
> 
> \starttochead[title={Table of Contents}]
> \setupheader[state=start]
>   \placecombinedlist[content]
> \stoptochead
> 
> And I use the following to set up the headertexts for the book as a whole:
> 
> \setupheadertexts
>   [{\hfill\getmarking[chapter]\hfill}][] %recto pages
>   [{\hfill\documentvariable{metadata:title}\hfill}][] %verso pages
> 
> The problem is that I am unable to get 'Table of Contents' as a running head 
> for the two recto pages where I need it. I realise I need to get 'tochead' 
> recognised somehow for this.  If I set up a separate \setupheadertexts 
> [{\hfill\getmarking[tochead]\hfill}][] then I end up with 'Table of Contents 
> as the running head on all recto pages, which I don't want.
> 
> Can anyone suggest how can I get 'Table of Contents' as the running head just 
> for the two recto pages of a five page TOC?

How about you inherit "tochead" from "chapter" and setup the combined list 
"content" so that it doesn’t include "tochead"?


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] \setupcolors and \underbar bug?

2021-01-14 Thread Henning Hraban Ramm

> Am 14.01.2021 um 21:48 schrieb Henning Hraban Ramm :
> 
> 
> 
>> Am 14.01.2021 um 16:58 schrieb Alan Bowen :
>> 
>> The mwe
>> 
>> \starttext
>> \setupcolors[state=stop]
>> {\darkred Test}
>> 
>> \underbar{Here}
>> \stoptext
>> 
>> fails: “Here” does not appear above the underbar (which has the correct 
>> length).
>> 
>> When \setupcolors[state=stop] is commented out, the file runs as it should.
> 
> It happens also if you set rgb=no, and the result in my project is even worse:

Hans, the fix you sent to Alan fixes the problem for me. Thank 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] \setupcolors and \underbar bug?

2021-01-14 Thread Henning Hraban Ramm


> Am 14.01.2021 um 16:58 schrieb Alan Bowen :
> 
> The mwe
> 
> \starttext
> \setupcolors[state=stop]
> {\darkred Test}
> 
> \underbar{Here}
> \stoptext
> 
> fails: “Here” does not appear above the underbar (which has the correct 
> length).
> 
> When \setupcolors[state=stop] is commented out, the file runs as it should.

It happens also if you set rgb=no, and the result in my project is even worse:



\setupcolors[rgb=no]

\starttext

Liszt bat den Klavierfabrikanten darum, Dankesgrüße für den 
\quotation{\underbar{belorbeerten} schönen Blumenstrauss} anlässlich seines 
Geburtstages auszurichten.
\stoptext


The PDF contains only:

 schönen Blumenstrauss“ anlässlich seines Geburtstages auszurichten.


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] what’s up with \setupdelimitedtext[method=font]?

2021-01-14 Thread Henning Hraban Ramm


> Am 14.01.2021 um 14:58 schrieb Hans Hagen :
> 
> can you test with (in cont-new.mkxl)
> 
> \def\spac_narrower_start_apply#1%
>  {\narrowerparameter\c!before
>   \global\s_spac_narrower_left  \zeropoint
>   \global\s_spac_narrower_right \zeropoint
>   \global\s_spac_narrower_middle\zeropoint
>   \edef\askednarrower{#1}%
>   \ifx\askednarrower\v!reverse
> \ifconditional\s_spac_narrower_last_swap
>   \frozen\leftskip \s_spac_narrower_right_last
>   \frozen\rightskip\s_spac_narrower_left_last
>   \setfalse\s_spac_narrower_last_swap
> \else
>   \frozen\leftskip \s_spac_narrower_left_last
>   \frozen\rightskip\s_spac_narrower_right_last
>   \settrue\s_spac_narrower_last_swap
> \fi
>   \else
> \normalexpanded{\processcommalistwithparameters[\askednarrower]}\spac_narrower_initialize
> \frozen\advance\leftskip \dimexpr\s_spac_narrower_left 
> +\s_spac_narrower_middle\relax
> \frozen\advance\rightskip\dimexpr\s_spac_narrower_right+\s_spac_narrower_middle\relax
>   \fi
>   \seteffectivehsize}
> 

Yes, that works with LMTX, thank you!

MkIV still fails, but cont-new.mkxl is LMTX only, I guess?

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] what’s up with \setupdelimitedtext[method=font]?

2021-01-14 Thread Henning Hraban Ramm


> Am 14.01.2021 um 10:44 schrieb Henning Hraban Ramm :
> 
> Hi again,
> the following example used to work with LMTX (but not MkIV) from September.
> 
> Now I get the "narrower" indentation only if I comment the first line (in 
> both versions) – apparently there’s a setup conflict, and I don’t know any 
> more why I needed this setup.
> 
> Could you explain what it does (did, should do)?
> 
> Hraban
> 
> 
> \setupdelimitedtext[quotation][method=font] % hanging quotation marks
> %\setupalign[hanging]
> \setupnarrower[left=2em,right=1.5em]
> 
> \definenarrower[Zitat]
> \setupnarrower[Zitat]
> [left=2em,
>  right=1.5em,
>  before=\dontleavehmode\hskip-0.33em\startquotation,
>  % fake hanging quotation mark
>  after=\stopquotation]
> 
> \usemodule[visual]
> 
> \starttext
> 
> \fakewords{50}{50}
> 
> \startquotation
> quotation \fakewords{100}{100}
> \stopquotation\footnote{about quotation}
> 
> \startZitat
> Zitat \fakewords{100}{100}
> \stopZitat\footnote{about Zitat}
> 
> \stoptext

Ah, I recognized the problem again:

I need the footnote marker at the closing quotation mark. 
\setupdelimitedtext... does that, but kills the indent. Without the setup, I 
get the indent, but the footnote marker moves to the next line.

And there’s a problem with MkIV (--luatex): TeX stops with **, after entering 
\end, I get the PDF, so something’s unclosed.

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
___


[NTG-context] what’s up with \setupdelimitedtext[method=font]?

2021-01-14 Thread Henning Hraban Ramm
Hi again,
the following example used to work with LMTX (but not MkIV) from September.

Now I get the "narrower" indentation only if I comment the first line (in both 
versions) – apparently there’s a setup conflict, and I don’t know any more why 
I needed this setup.

Could you explain what it does (did, should do)?

Hraban


\setupdelimitedtext[quotation][method=font] % hanging quotation marks
%\setupalign[hanging]
\setupnarrower[left=2em,right=1.5em]

\definenarrower[Zitat]
\setupnarrower[Zitat]
 [left=2em,
  right=1.5em,
  before=\dontleavehmode\hskip-0.33em\startquotation,
  % fake hanging quotation mark
  after=\stopquotation]

\usemodule[visual]

\starttext

\fakewords{50}{50}

\startquotation
quotation \fakewords{100}{100}
\stopquotation\footnote{about quotation}

\startZitat
Zitat \fakewords{100}{100}
\stopZitat\footnote{about Zitat}

\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
___


[NTG-context] LMTX problem with \input

2021-01-14 Thread Henning Hraban Ramm
Another LMTX/MkIV difference:

In a component, I include another file with \input, that starts with \page in 
the first line.

With LMTX I get an error:

"""
I can't figure out why you would want to use a tab mark here. If some right 
brace
up above has ended a previous alignment prematurely, you're probably due for 
more
error messages.
"""

It works if I insert a blank line, and it works in MkIV.

Sorry, I can’t reproduce this apparent edge case in a MWE yet.


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
___


[NTG-context] LMTX/MkIV difference in date handling

2021-01-14 Thread Henning Hraban Ramm
ConTeXt  ver: 2021.01.11 17:27 LMTX  fmt: 2021.1.11

The following works in MkIV, but not in LMTX:


\def\Jahr{\currentdate[year]}

\settaggedmetadata[
rights={© \Jahr{} Me}
]

\starttext
\strut
\stoptext


The error message is:

 1 \def\Jahr{\currentdate[year]}
 2 
 3 \settaggedmetadata[
 4 >>   rights={© \Jahr{} Me}
 5 ]
 6 
 7 \starttext
 8 \strut
 9 \stoptext
10 


You've closed more groups than you opened. Such booboos are generally harmless,
so keep going.




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] Continued chapter numbers

2021-01-07 Thread Henning Hraban Ramm

> Am 07.01.2021 um 12:20 schrieb Henning Hraban Ramm :
> 
> 
>> Am 07.01.2021 um 11:29 schrieb Marco Patzer :
>> 
>> Thanks for the info. I updated the wiki.
> 
> https://wiki.contextgarden.net/Titles
> 
> I did some more edits, but the page is still a mess.

I created the command page; not sure if I got the description right:

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

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] Continued chapter numbers

2021-01-07 Thread Henning Hraban Ramm

> Am 07.01.2021 um 11:29 schrieb Marco Patzer :
> 
> Thanks for the info. I updated the wiki.

https://wiki.contextgarden.net/Titles

I did some more edits, but the page is still a mess.

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] dutch calendars 3 months

2021-01-05 Thread Henning Hraban Ramm

> Am 05.01.2021 um 11:46 schrieb luigi scarso :
> 
> I guess this is a challenge for Willi :
> a module to typeset "dutch calendars"
> as in 
> https://www.calendari.it/
> (I am not involved at all with the site, it's the first I have found )
> 
> I like the slim version, with 3 months, the saint(s) of the day, the moon 
> phases, the week number,
> the day from the beginning and to the end of the year 

When I still used paper calendars, I wrote a script (Perl, later ported to 
Python) to generate calendars with arbitrary information – international 
holidays, birthdays, fairs & other long-term dates... – and ConTeXt (MkII) 
templates for the planner sizes of myself, my girlfriend and a general A4 one. 
Daily, weekly, monthly and year overview pages possible.

Since three of my planner pages fit on one A4 sheet, Willi provided a 3UP 
arranging pattern.

I don’t know if it would make sense to use that old code for something new.

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] A not so short introduction to ConTeXt Mark IV

2021-01-04 Thread Henning Hraban Ramm

> Am 04.01.2021 um 14:18 schrieb Ulrike Fischer :
> 
> Am Sun, 3 Jan 2021 23:59:14 +0100 schrieb Henning Hraban Ramm:
> 
>> In LaTeX most problems are solved with “use this or that package”,
> 
> You only need to follow a few days the questions e.g. on tex.sx to
> see that this is not true: Answers about LaTeX are much more varied
> than a simple "use this package" and often include new definitions
> or background explanations.

Yes, sorry, that was overly simplified.

Yes, there are many knowledgeable and helpful LaTeX users who throughly explain 
their suggestions.

But when I’m looking for LaTeX solutions, it very often breaks down to using 
the one or other package (with a few options or configurations provided by 
them).

>> without the need to understand the commands and settings
>> involved,
> 
> The fact that there are so many packages extending LaTeX actually
> means that there is *more* need to understand commands and settings
> than in a system like context where "most problems are solved with
> \setupsomething[somekey=somevalue]". 
> 
> (But it also means that there are many people, who understand enough
> of the innards to write, to document and to explain packages,
> commands and settings.)

Yes, but it’s in the concept of LaTeX that there is a gap between users and 
package writers.

I prefer to copy a few settings (and adapt them to my needs) over using a 
package that might do also other things or is incompatible with some other 
packages that I might need.

>> Of course it helps to understand basic TeX stuff – but you’re not
>> supposed to use (plain) TeX commands in LaTeX, while it is or was
>> much more usual in ConTeXt.
> 
> Well we discourage the use of plain commands to avoid that new users
> trip over bewildering errors from stuff like "abc \hskip 2cm plus
> cde", but it is not forbidden to use them.  

The discouragement sometimes sounds a bit harsh ;) – not your problem.

There are a few old ConTeXt users that use too much basic ("plain") TeX for my 
taste, esp. if there are better ways to solve their problems with simple 
ConTeXt commands.

All the best,
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] A not so short introduction to ConTeXt Mark IV

2021-01-04 Thread Henning Hraban Ramm


> Am 04.01.2021 um 15:30 schrieb Hans Hagen :
> 
> On 1/4/2021 2:18 PM, Ulrike Fischer wrote:
> 
>>> Of course it helps to understand basic TeX stuff – but you’re not
>>> supposed to use (plain) TeX commands in LaTeX, while it is or was
>>> much more usual in ConTeXt.
>> Well we discourage the use of plain commands to avoid that new users
>> trip over bewildering errors from stuff like "abc \hskip 2cm plus
>> cde", but it is not forbidden to use them.
> Hm, \hskip is not a plain command but a language primitive. And there's 
> nothing wrong with using primitives, assuming that one knows how they work 
> (and in this case that a \relax does wonders).
> 
> One of those 'persistent' wrong ideas about context is that it somehow is 
> kind of plain but decided to not waste time arguing that. There are actually 
> not that many commands in 'plain' anyway. Much of plain tex is setting up 
> math (and all macro packages support those symbolic names and the basic math 
> structures), some fonts (all macro package set up some font system and maybe 
> some aliases that make it easier for plain users),
> but as soon as one uses latex or context or ... some different output routine 
> kicks in, table mechanisms show up, \item has a different meaning, etc. (The 
> early macro packages were kind of plain themselves: demanding redefinition of 
> internals and such.)

I don’t know anything about Knuth’s Plain TeX, I always mean plain TeX. ;)
And I mix up primitives and "basic" commands, because it doesn’t matter for me.
My mistake.

What I meant: In ConTeXt code (by users and maybe only in old sources) I see a 
lot of TeX constructs, e.g. you’re using \def (TeX) and not \define (ConTeXt) 
because you know it makes no difference.

And when I can’t achieve the right vertical spacing with \blank[something], I 
use \vskip, because it works.

LaTeX replaces many basic commands/primitives (\vskip -> \vspace), ConTeXt 
might too, but with the same name.

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] Migrating from LaTeX (was: A not so short introduction to ConTeXt Mark IV)

2021-01-04 Thread Henning Hraban Ramm

> Am 04.01.2021 um 14:02 schrieb BPJ :
> 
> I understand all that. I just thought that maybe such resources existed which 
> I didn't know.
> 
> While as you say the approaches differ it would be nice to have like a FAQ 
> "how do you do what LaTeX package X does in ConTeXt?" I guess that that is 
> what I'm after.

But that’s already a wrong approach IMO – you need to think in goals, not in 
paths.

Most ConTeXt users don’t know what any LaTeX package does, so you need to 
explain what you want to achieve.

Regardless which system you are learning, never assume it would work the same 
as some other system you know, even if it does the same or shares some concepts.

E.g. when I was working at a newspaper, they changed the ad management system; 
ad vendors were used to give their customers special kinds of discounts and 
needed some strange workarounds where the old system was lacking. At first, 
management tried (or had IT dept try) to implement all the old stuff, until it 
became clear it just made no sense – vendors had to adapt to the new system 
(that was generally better and more flexible, but of course also lacking a few 
details).

When I recently switched from InDesign/Photoshop to Affinity Publisher/Photo, 
it was the same re-learning for me, and I’m still much slower with AP, also 
because I don’t use it daily any more like I was used with ID several years 
ago. E.g. I needed the experience of several print projects to get colors print 
right again – the whole color management and PDF export setup is just too 
different (without it looking too different).

> I'm basically still using only LaTeX because I know which packages to use to 
> do the things I want. Perhaps that *is* as good a reason as any to stay with 
> LaTeX

yes it is

> but it shouldn't be a barrier to learning ConTeXt which IME it is.

The barrier is in your head. Don’t assume ConTeXt is like LaTeX, but be amazed 
if it does. ;)

> To take but one example: when wearing my linguist hat I deal with obscure 
> scripts and languages, mostly dead languages, which no standard LaTeX index 
> processor can handle (at least not out of the box) so I have my pile of Perl 
> hacks which generate indices using Perl's excellent Unicode capabilities and 
> some excellent modules written by other people.

I don’t know what you’re doing, but since ConTeXt can handle Unicode much 
better than LaTeX, many of your hacks might be dispensable. For others there 
might be better solutions, e.g. implement additional sorting mechanisms in Lua 
within ConTeXt. There should be no need for additional external index 
processing.

> Admittedly it might be just me: I have a hard time knowing where to look in 
> the likewise excellent Vim documentation too: what search terms to use. 
> Finding a LaTeX solution to a problem with Google OTOH usually is pretty fast 
> done — if you can describe your problem in prose you usually don't hit a wall.

Yes, and that’s again true for every system – you need to find your way through 
the documentation.

E.g. GNU LilyPond’s docs are great, but you need to know what’s in the Learning 
Manual, Reference Manual or extension docs, and that you also might look into 
the snippet repository LSR or OpenLilyLib.

You need to learn the lingo of each system, sometimes something has a strange 
name due to historical reasons or because the right term was ambiguous or 
unknown to the developers. – ConTeXt not only calls indexes registers (like 
also in German), but also imposition arranging...

> With knowledge of TeX basics I did not mean a working knowledge of plain TeX 
> but the actual basics: reserved characters, syntax, space after a command is 
> ignored, a blank line makes a paragraph, that sort of things which are common 
> to all flavors.

Yes and no – space handling of course, and, as Hans said, it helps to 
understand the box composition and expansion (I don’t really, and I guess also 
most LaTeX users don’t). Reserved characters are already misleading – ConTeXt 
has far less than LaTeX and uses direct Unicode input as far as possible.

Keep trying.

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] A not so short introduction to ConTeXt Mark IV

2021-01-03 Thread Henning Hraban Ramm

> Am 03.01.2021 um 22:24 schrieb Hans Hagen :
> 
> On 1/3/2021 10:02 PM, BPJ wrote:
>> I understand that and it is all well and good. I am wondering if there 
>> already is *another* text which presupposes basic knowledge of TeX and 
>> general knowledge of LaTeX, perhaps in a by-topic style.
> I think this relates to the question how someone comes to tex and then to 
> context. Are tex macro packages used alongside and such? Are there 'from 
> word/office to tex' or reverse manuals? What could be a motivation to write 
> one.

I guess most ConTeXt users migrated from LaTeX at some point, so that guide 
would really make sense. But I can’t write it either, even if I’m also working 
with LaTeX (but just as a user of one special class).

If I run into a problem in LaTeX that I know to solve in ConTeXt, the approach 
is never right.

I think the similarities of LaTeX and ConTeXt are mostly misleading, you’re 
better off trying to forget everything and start anew.

In LaTeX most problems are solved with “use this or that package”, without the 
need to understand the commands and settings involved, while in ConTeXt most 
problems are solved with \setupsomething[somekey=somevalue].

Of course it helps to understand basic TeX stuff – but you’re not supposed to 
use (plain) TeX commands in LaTeX, while it is or was much more usual in 
ConTeXt.

Writing my book I have users of text processors (Word/LibreOffice) and layout 
applications (InDesign etc.) in mind, even if I assume that most readers (if 
I’ll ever publish it...) will come from LaTeX.



> So, one way out could be to have some collection of tips / suggestions and 
> turn that into a kind of manual. Something to do by those who make some 
> transition or use alongside. The wiki is the place start with that.
> 
> So .. up to users.

Yes, and that means: up to users migrating from LaTeX and documenting their 
struggles.

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] SILE typesetter and other projects

2021-01-03 Thread Henning Hraban Ramm
Also thank you!

Patoline is partly LaTeX based, Speedata Publisher uses LuaTeX, and I know of 
troff and XSL/FO.

I’d be interested to hear about experiences with other code based typesetting 
engines (besides ConTeXt and LaTeX), since I used LinoSetting and 3B2 in 
earlier days.

A healthy and happy new year!
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] drop shadows with metapost/ metafun

2021-01-02 Thread Henning Hraban Ramm


> Am 29.12.2020 um 22:56 schrieb Garulfo :
> 
> Which process would you advice to add « drop shadows » to any kind of metafun 
> / metapost figures like:
> picture p;
> p := textext("MetaPost is fun!") shifted (10cm,10cm);
> 
> 
> My current understanding of the required steps :
> 
> 
> 1- fill p with the shadow color
> 
> 2- write it to an external metapost file (with savebuffer ?) ready for png 
> export (outputformat := "png »;)
> 
> 3- with lua, os.execute, and imagemagick prepare the shadow
>   - extent the png file with a transparent background, to have room for 
> blurring 
>   - blur it
> 
> 4- import this png in context / Metapost (externalfigure), and center it with 
> p figure
> 
> 5- shift it according to the desired shadows distance and angle
> 
> 6- apply the initial bounding box of p to the shadow, draw the shadow, draw 
> the p picture 
> 
> 
> Actually, all this seems long and tedious, and contrasts with the already 
> existing links between MetaPost / MetaFun and cairo + libpng.

I don’t know if that helps, but I’m using a stack of transparent objects to 
simulate drop shadows:
https://wiki.contextgarden.net/Drop_shadows

No pixel images required. But I’d like to have a real text shadow instead of 
that box shadow.


Happy New Year!
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] Regarding XML export and EPUB

2020-12-22 Thread Henning Hraban Ramm


> Am 21.12.2020 um 23:31 schrieb Andres Conrado Montoya 
> :
> 
> Hello, list. 
> I've been experimenting with the export scripts and the instructions and 
> manuals you can find in:
> 
> https://wiki.contextgarden.net/XML
> https://wiki.contextgarden.net/Export
> https://wiki.contextgarden.net/Epub
> https://wiki.contextgarden.net/ePub
> 
> This with the expectation of being able to make an epub file form a context 
> document that epubcheck can accept. I see there is an experimental support 
> for epub, and I have played around with the export options a bit. However, 
> what I would really want to know is. It's possible and if so, how can you map 
> context's elements so they can get translated to specific html tags? I mean, 
> the current export output uses divs with custom attributes and classes, or 
> custom tags; but I would like to map lists to ul, list-items to li, headings 
> to h1, h2, h3, paragraphs to  etc. In the manuals I see that you can do 
> the opposite: map xml/html tags to context's elements; I wonder if you can go 
> the other way around, and a good place to start reading about it. Apologies 
> if I missed something obvious. 

There’s no built-in mechanism.

I’m using XSLT to transform ConTeXt’s exported XML to the HTML I want.
Esp. with references (footnotes etc) it’s not trivial.

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
___


[NTG-context] distance parameter of \setupinitial

2020-12-14 Thread Henning Hraban Ramm
Hi,

I’d like an initial in front of the text block.
It works more or less, but I find the behaviour of the distance parameter 
confusing:

If I set it to -1em (like in the MWE below), the text lines get indented a bit 
on the right side.
With somewhat bigger values, the indent disappears, but the initial is moved to 
the left.
But the initial should nearly touch the first characters, and the text lines 
should be full width.

The behavior is the same with (latest) MkIV and LMTX.

Is there a misunderstanding of the parameters on my side, or is this a bug?


\setupinitial[
distance=-1em,
n=2,
hoffset=1em,
]
\showframe

\starttext

\placeinitial{L}orem ipsum. \input lorem

\stoptext


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
___


[NTG-context] LMTX ignores figure size

2020-12-04 Thread Henning Hraban Ramm
Hi,
with latest LMTX, the size (width) of external figures is ignored in floats, 
while it works outside of floats and with MkIV. It also works with metapost 
figures (e.g. dum library).


\setupexternalfigure[location=default]

\starttext

\startplacefigure[location=here]
\externalfigure[cow][width=2cm]
\stopplacefigure

\stoptext


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] Placing extra bookmarks?

2020-12-01 Thread Henning Hraban Ramm


> Am 01.12.2020 um 15:36 schrieb Bruce Horrocks :
> 
> I have \placebookmarks[chapter] in my doc and all is fine except that I'd 
> like to force an extra bookmark at the top of the list that jumps to the 
> cover page. However there is no chapter title, or other built in style on the 
> cover.
> 
> I tried inserting \bookmark[chapter]{The Cover} but nothing happened - no 
> error, no bookmark.
> 
> Any suggestions please? There's no need to bookmark to a specific point - 
> just going to page 1 would be enough.

Did you enable interactions? \setupinteractions[state=start]

But when I recently tried to manually set some bookmarks instead of visible 
chapter titles, I also didn’t get any; didn’t investigate further yet.

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] Getting the filename which is being typeset

2020-12-01 Thread Henning Hraban Ramm


> Am 01.12.2020 um 16:20 schrieb Otared Kavian :
> 
> Thanks Tomás! Indeed \jobname does the job :-)

In case you need the current component file in a project environment: 
\currentcomponent

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] question about frames

2020-11-26 Thread Henning Hraban Ramm


> Am 25.11.2020 um 22:43 schrieb Pablo Rodriguez :
> 
> Dear list,
> 
> here is a minimal sample of frames to make up labels:
> 
>  \setuplayout[page]
>  \starttext
>  \dorecurse{16}{\dontleavehmode\dorecurse{4}
>  {\framed[width=52.5mm, height=18.5mm, align=right]{\null}}\\}
>  \stoptext
> 
> Which is the way to avoid any vertical space between frames?
> 
> Sorry, this may be obvious, but I don’t know how to do it now.

try offset=overlay
don’t know if that goes all the way.
How about \blank[none,back,disable]?

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] Error with spaces in Argument of \startproduct

2020-11-25 Thread Henning Hraban Ramm

> Am 24.11.2020 um 22:38 schrieb Wolfgang Schuster 
> :
> 
> Jannik Voges schrieb am 24.11.2020 um 22:24:
>> Hello,
>> as the title suggested, I get an error when using spaces in the argument of 
>> \startproduct. For example typesetting
>> \startproduct{foo bar}
> 
> You can have a filename with a space use
> 
>\startproduct [foo bar]
> 
> but you don't even need the filename when you replace it with *, e.g.
> 
>\startproduct *
> 
> or
> 
>\startproduct [*]

Since I learned about *, I used it extensively, but then I recognized, I can’t 
refer to the component filename with \currentcomponent any more. (I use it for 
filter-generated contents like LilyPond music.)
Just as a warning, in case you stumble upon that.

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] temporarily move up a section title

2020-11-07 Thread Henning Hraban Ramm


> Am 08.11.2020 um 03:19 schrieb Sylvain Hubert :
> 
> Dear List,
> 
> I'm trying to move up a section title (section b) 2cm upward:
> 
> \starttext
> \section{a}
> \blank[-2cm,force]\ 
> \section{b}
> \section{c}
> \stoptext
> 
> The empty space (\ ) after the \blank is necessary here, without which the 
> \blank does nothing.
> I would like to ask whether there is a less hacky way to let \blank work than 
> the hidden space.

You could use the low level method of \vskip-2cm

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] force index entries without page number

2020-11-07 Thread Henning Hraban Ramm


> Am 04.09.2020 um 11:59 schrieb Wolfgang Schuster 
> :
> 
> Henning Hraban Ramm schrieb am 03.09.2020 um 10:17:
>> Hi,
>> I’d like to have an (person) index entry like
>> Ramm, Hraban   passim
>> i.e. without actual page number.
>> How can I force that?
>> I also need to be able to refer to it like
>> \seeindex{Hraban}{Ramm, Hraban)
> 
> 
> You can use this when the entry appears only once which replaces the page 
> number with "passim".
> 
> \define[1]\Passim
>  {passim}
> 
> \defineprocessor [passim] [command=\Passim]
> 
> \starttext
> 
> xxx\index{First}
> 
> yyy\index[passim->]{Second}
> 
> zzz\seeindex{Third}{Second}
> 
> \placeindex
> 
> \stoptext

Hi Wolfgang,

forgot to answer: This solution works for me, thank 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] index issues

2020-11-06 Thread Henning Hraban Ramm
> Am 06.11.2020 um 12:22 schrieb Henning Hraban Ramm :
> 
> (2)
> Page/column breaking is odd in that the preferred breaking point seems to be 
> one entry too early, i.e. the last entry of one letter end up in the next 
> column and the previous column is one line too short.
> It doesn’t change with balance=yes/no.

If one of the \index{D...} lines is commented in the following example, the 
last D entry goes into the second column, the columns get balanced, and the 
second line of the last K entry is broken to the next page.
If you uncomment that line, it looks as intended (no balancing, full left 
column).
What’s wrong? Can I influence this e.g. with penalties?

(Screenshots were too big...)

Hraban


\setuppapersize[A6]
\setupbodyfont[16pt]
\setupregister[index][balance=no,indicator=no]
\showframe

\starttext

%\setinjector[index][10][{\column}]
%\showinjector[index] % ERROR!
\index{Danold}
\index{Drum}
%\index{Dapper} % uncomment to test
\index{Kankra}
\index{Kookaburra}

\placeregister[index][criterium=all]
\page

\startregister[index][test]{Knuth}
  \input tufte
  \index{Donald}\index{Drom}\index{Divine}
  \page\index{Dummy}
  \input knuth
  \index{Donald}\index{Dom}\index{Dunno}
  \page
\stopregister[index][test]

\input darwin\index{Darwin}
\page

\dorecurse{5}{
\input knuth
\index{Knuth}\index{Donald}\index{Dixit}
\page\index{Knothing}
}

\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] index issues

2020-11-06 Thread Henning Hraban Ramm


> Am 06.11.2020 um 15:48 schrieb Duncan Hothersall :
> 
> I don't think \showinjector needs an argument. My MWE when I was looking at 
> this has just \showinjector after the register definition but before the 
> \setinjector[...] commands.

Docs say otherwise.
Without argument, I don’t get an error, but also nothing happens.

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] index issues

2020-11-06 Thread Henning Hraban Ramm


> Am 06.11.2020 um 12:54 schrieb Duncan Hothersall :
> 
> Without MWE try \showinjector and \setinjector.
> 
> I would add to that that when experimenting with \showinjector you need to 
> have at least one \setinjector as well otherwise it doesn't show the numbers.
> 

It doesn’t work for me:

lua error   > lua error on line 24 in file inhalt/99anhang.tex:

registered function call [421]: 
...-06/tex/texmf-context/tex/context/base/mkiv/typo-inj.lua:63: attempt to 
index a nil value (field '?')
stack traceback:
...-06/tex/texmf-context/tex/context/base/mkiv/typo-inj.lua:63: in 
function <...-06/tex/texmf-context/tex/context/base/mkiv/typo-inj.lua:57>
(...tail calls...)

23 \setinjector[Person][10][{\column}]
24 >>  \showinjector[Person]


Regardless what I try as parameter of \showinjector (e.g. register, index, my 
own registers, one or a list) and where (in the environment or before 
\placeregister), I always get this error.

Bug?

LMTX version: 2020.09.20 23:02

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] index issues

2020-11-06 Thread Henning Hraban Ramm


> Am 06.11.2020 um 12:54 schrieb Duncan Hothersall :
> 
> 
> 
> On Fri, 6 Nov 2020 at 11:52, Jano Kula  wrote:
> 
> On Fri, 6 Nov 2020 at 12:24, Henning Hraban Ramm  wrote:
> Hello again,
> 
> still struggling with indexes.
> 
> I’ll prepare MWEs, but maybe you can answer some of these without?
> 
> Hello Hraban!
> 
> Without MWE try \showinjector and \setinjector.
> 
> Jano
> 
> I would add to that that when experimenting with \showinjector you need to 
> have at least one \setinjector as well otherwise it doesn't show the numbers.
> 
> Duncan 


Jano, Duncan, thank you!

Injectors were mentioned recently, of course I forgout about them... Will try.

Best, 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
___


[NTG-context] index issues

2020-11-06 Thread Henning Hraban Ramm
Hello again,

still struggling with indexes.

(1)
\setupregister’s before and after go around the indicator.
e.g. \setupregister[][indicator=no,after={XX}]
never shows that XX, since after is only used after the indicator, while before 
also works without.

I was hoping for a hook at the end of a section (to add \testcolumn, \blank 
etc. to work around no.2). Is there any?


(2)
Page/column breaking is odd in that the preferred breaking point seems to be 
one entry too early, i.e. the last entry of one letter end up in the next 
column and the previous column is one line too short.
It doesn’t change with balance=yes/no.

E.g.

p.1
A   A
A   A
A
A   B
A   B
A   B
A   !?

p.2
B   C
B   C
B   C
C
C   
C   D
C   D


(3)
(How) can I otherwise influence page/column breaking? E.g.
- always keep multi line entries together
- break before or after some entry


(4)
Is it possible to combine entries from \index and \startregister[index]?

If I use \start/stopregister and have the same index entry within the range or 
on the same page, I get duplicate pages or page ranges, like 10-12 from 
\startregister and additionally 11, 12-13 from \index entries, makes at the 
moment 10-12, 11, 12-13 instead of just 10-13.



I’ll prepare MWEs, but maybe you can answer some of these without?

Thank you in advance,

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] Why is the textarea not centered by default?

2020-11-05 Thread Henning Hraban Ramm

> Am 05.11.2020 um 16:21 schrieb Pablo Rodriguez :
> 
> I’m not expert on typesetting, but I read somewhere (too long ago to be
> able to remember when) that printed papers should have wider outer
> margins to put your fingers on it.

In classical book layout, the two inner margins (2*backspace) should equal one 
outer margin.

But this makes *only* sense with thread-bound books that you can open 
completely.

In glued (perfect bound) books, the inner margin should be at least the same if 
not bigger than the outer margins to get a similar view.

Modern books, independent of binding techniques, usually don’t use a classical 
book layout, because that uses a lot of whitespace, i.e. more pages = higher 
printing and shipping costs.

It’s still true that margins should be big enough for your fingers – but 
depending on size and content of the book, different uses might suggest 
different space placement. E.g. I’d use a big inner margin for guides that you 
usually keep in one hand, thumb in the middle. For textbooks, a big bottom 
margin makes sense, because you can put it in a stand. A song book / hymnal 
you’d hold in both hands, so it needs big enough outer margins.

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] index entries postponed if sections are empty

2020-11-02 Thread Henning Hraban Ramm
Otared, Jano, thank you for your answers – what finally helped was putting the 
image and the index entries in a vbox together.

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
___


[NTG-context] index entries postponed if sections are empty

2020-10-31 Thread Henning Hraban Ramm
Hi,
I‘m despairing about my index – some sections contain only an image 
(\externalfigure), but I need to set several index entries for the image 
contents.
The index entries get postponed until after the next chapter.
I guess the problem is that there’s no (text) content, but \par and \strut 
didn’t help.

The MWE shows that index entries in empty sections are ignored, i.e. 
“Something” is supposedly only on p.6:


\usemodule[visual]

\starttext

\dorecurse{5}{%
\startchapter[title={\recurselevel}]

\dorecurse{5}{%
\startsection[title={\fakewords{3}{5}}]

\index{Something}\index{A\recurselevel}

}

\stopchapter
}

\completeindex

\stoptext


What can I do?

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] troubles with \enablemode

2020-10-30 Thread Henning Hraban Ramm

> Am 30.10.2020 um 19:26 schrieb Damien Thiriet :
> I don't fully understand the \enablemode mechanism. Given this MWE:
> 
> \startmode[test]
> \setupframedtext [foregroundcolor=white,style={\tfa}]
> \stopmode
> 
> 
> \starttext
> \startframedtext
> ceci est un texte
> \stopframedtext
> \enablemode [test]
> \startframedtext
> ceci est un texte
> \stopframedtext
> \stoptext
> 
> I cannot see the expected effect when I compile, that is both texts are
> in black. When I compile with
> context --mode=test 
> both framed texts are in white, which is what I expect.
> 
> What did I miss?

The processing is more or less sequential, i.e. if you activate your test mode 
in the middle of the text, the setup isn’t involved.
If you call ConTeXt with the mode switch, the mode is enabled from the start, 
and only then your setup is executed.

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] oldstyle numerals in STIX Two Math

2020-10-21 Thread Henning Hraban Ramm


> Am 21.10.2020 um 15:59 schrieb Alan Bowen :
> 
> I am trying to get the STIX Two fonts to display oldstyle numerals. 
> 
> I have the oldstyle numerals in STIX Two Text, the problem is the math font.
> 
> So far, my mwe is:
> \definefontfamily[mainface][rm][STIX Two Text][] %onum=yes does not seem to 
> work
> \definefontfamily[mainface][mm][STIX Two Math][]
> \definefontfeature[f:oldstyle][onum=yes]
> 
> \setupbodyfont[mainface, 18pt]
> \addfeature{f:oldstyle}
> 
> \starttext
> 123456789
> \blank[big]
> $\sqrt{2} + 1234$
> \stoptext
> 
> Any pointers will be greatly appreciated.

mtxrun --script fonts --list --info stixtwomath

shows that STIX Two Math doesn’t provide the onum feature.

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
___


[NTG-context] typos in sort-lan.lua

2020-10-19 Thread Henning Hraban Ramm
I stumbled upon a few typos in the sort order definitions:
In Hebrew and Yiddish, there are many unclosed brackets:

definitions['he'] = {
979entries = {
980['א'] = 'א', ['ב'] = 'ב', ['ג'] = 'ג', ['ד'] = 'ד', ['ה'] = 'ה',
981['ו'] = 'ו', ['ז'] = 'ז', ['ח'] = 'ח', ['ט'] = 'ט', ['י'] = 'י',
982['כ'] = 'כ', ['ל'] = 'ל', ['מ'] = 'מ', ['נ'] = 'נ', ['ס'] = 'ס',
983['ע'] = 'ע', ['פ'] = 'פ', ['צ'] = 'צ', ['ק'] = 'ק', ['ר'] = 'ר',
984['ש'] = 'ש', ['ת'] = 'ת',
985},

etc.

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] Changing the colors of Charts in luametafun

2020-10-18 Thread Henning Hraban Ramm
Hi juh,

> Am 16.10.2020 um 15:34 schrieb Jan U. Hasecke :
> 
> as I'll need to make some business charts in the near future I had a
> look into metafun xl.

you might like the new charts module by Tamara Kocurová & Adriana Kašparová.

Download: https://akela.mendelu.cz/~thala/statcharts/
Manual/presentation also at 
https://meeting.contextgarden.net/2020/talks/2020-09-11-tamara-and-adriana-statistical-charts/AK-TK_charts.pdf


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] text surrounding graphic in columns

2020-10-14 Thread Henning Hraban Ramm


> Am 14.10.2020 um 18:58 schrieb Jan U. Hasecke :
> 
> how can I get a graphic that floats left or right from the text in
> columns or columnsets?

You can’t, sorry.

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] A Spanish introduction to ConTeXt Mark IV

2020-10-14 Thread Henning Hraban Ramm

> Am 14.10.2020 um 12:47 schrieb Niels Meijer :
> 
> I just wanted to voice my support this book, as I feel that such a
> newbie-friendly resource would fill a gaping hole in the current ConTeXt
> ecosystem. I am considering having a stab at learning Spanish in order to
> (attempt to) read your book.

Are you more comfortable with German?

While I still don’t know when my ConTeXt book is ready for publishing, I can 
show you the current state (>280 p.).

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
___


[NTG-context] index issues

2020-10-14 Thread Henning Hraban Ramm
(1)
If I get the same index entry two or more times on a page, sometimes with 
processor formatting, sometimes not, how can I control which version takes 
precedence?

Actual use case: index entries from footnotes should be italics, while those 
from the main text stay upright.
Now, if there is an entry from the main text, the entry from the footnote 
doesn’t matter. Is it possible to control that?
I wouldn’t like to sort out the cases manually and remove the entries from the 
footnotes – there are 981 footnotes in this book, and there are 15 pages of 
index entries.

I’m using a macro (I suppose you’ll remember; I left out the Lua table lookup 
for unified entries):

\defineprocessor[kursiv][style=italicface]

\define[1]\nIndex{\doifmodeelse{*footnote}{%
  \expanded{\index[kursiv->]{#1}}}%
}{%
  \expanded{\index{#1}}}%
}}


(2)
Can I avoid linebreaking of page ranges in \placeindex?

E.g. in

Knuth, Don   23, 35-
  37, 40

I’d like to keep 35–37 together (break before 35).


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] footnotes in captions in floatcombinations

2020-10-11 Thread Henning Hraban Ramm
Hi, I still would be happy about answers to the following questions:

> Am 02.10.2020 um 12:13 schrieb Henning Hraban Ramm :
> 
> - Would it be possible to do the footnote numbering after the float 
> placement, so that a footnote in a float caption keeps the reading order of 
> numbers and gets its place on the right page?
> 
> – As a workaround, how can I use \placefigure in the middle of a paragraph 
> without breaking it?


And I isolated another problem, or even two:


\usemodule[visual]
\definecolor[fakerulecolor][c=.2,m=.1,k=.2]
\useMPlibrary[dum]
\automigrateinserts % nop in LMTX
\showframe
\setupcaptions[
  headstyle={\ss\bfx},
  align={flushleft,high},
  prefixsegments=none,
  location={bottom,low},
  hang=yes,
]
\setupfootnotes[
  width=\textwidth,
]

\starttext

\startplacefigure[location=page,title={\fakewords{5}{7}\footnote{\fakewords{20}{30}}}]%
 rId128
\externalfigure[dummy][width=\textwidth,height=.66\textheight]
\stopplacefigure

\fakewords{5}{10}

\stoptext


In this example, the footnote is broken to the next page, even if there’s 
plenty of space.
How can I avoid that?
If I put it in a \vbox, the footnote number is too low.

Additionally and strangely, the float page is doubled. I experienced that 
sometimes with last pages of documents. That must be a bug.


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] Beamer --> ConTeXt (sample)

2020-10-10 Thread Henning Hraban Ramm

> Am 09.10.2020 um 19:57 schrieb Henning Hraban Ramm :
> 
> 
>> Am 09.10.2020 um 19:01 schrieb Saša Janiška :
> 
>> I'm attaching small Beamer sample and wonder if someone can help by 
>> providing somewhat similar thing for ConText?
> 
> If you need columns, look into columnsets: 
> https://wiki.contextgarden.net/Columns#Column_Sets
> 
> Read https://wiki.contextgarden.net/Layers and play around with layers.
> (But your example doesn’t need layers at all.)
> 
> Here’s an example of the drop shadow:
> https://wiki.contextgarden.net/Drop_shadows
> 
> Also, there’s a number of presentation styles in the distribution.
> The wiki page https://wiki.contextgarden.net/Presentation_Styles is outdated 
> but might give you some hints.
> Feel free to update it.

BTW here’s a very wide presentation style I made for the 2019 meeting:
https://sedna.fiee.net/d/554ff6b974874612b581/ (link valid for 30 days)

env_pres.tex is the style, the other .tex files are presentations and test 
stuff.

Have fun.

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] Beamer --> ConTeXt (sample)

2020-10-09 Thread Henning Hraban Ramm

> Am 09.10.2020 um 19:01 schrieb Saša Janiška :

> I'm attaching small Beamer sample and wonder if someone can help by providing 
> somewhat similar thing for ConText?

If you need columns, look into columnsets: 
https://wiki.contextgarden.net/Columns#Column_Sets

Read https://wiki.contextgarden.net/Layers and play around with layers.
(But your example doesn’t need layers at all.)

Here’s an example of the drop shadow:
https://wiki.contextgarden.net/Drop_shadows

Also, there’s a number of presentation styles in the distribution.
The wiki page https://wiki.contextgarden.net/Presentation_Styles is outdated 
but might give you some hints.
Feel free to update it.

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] Hyphenation patterns

2020-10-09 Thread Henning Hraban Ramm


> Am 09.10.2020 um 08:52 schrieb Denis Maier :
> 
> Am 08.10.2020 um 19:05 schrieb Henning Hraban Ramm:
>> \starttext
>> 
>> {EN: \en\hyphenatedcoloredword{applicable}}
>> 
>> {DE: \de\hyphenatedcoloredword{applicable}}
>> 
>> \stoptext
>> 
> Wow, that's super helpful.

BTW \hyphenatedword works the same. I didn’t see anything colored.
There are some more commands like this, even \hyphenatedfile, see
https://source.contextgarden.net/tex/context/base/mkiv/supp-box.mkiv?search=hyphenated

Usually Arthur’s (hail the emperor of hyphenation and protector of the 
patterns) patterns are flawless, so I guess it’s not a bug but an exception of 
the rules.

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] Disappearing characters with nolig-german-wordlist

2020-10-09 Thread Henning Hraban Ramm


> Am 08.10.2020 um 13:04 schrieb Hans Hagen :
> 
> On 10/8/2020 12:02 PM, Denis Maier wrote:
>> Hi,
>> I do as adviced on the Wiki and input the nolig-german-wordlist.tex to 
>> suppress wrong ligatures. However, I'm seeing strange results:
>> ```
>> \input nolig-german-wordlist.tex
>> \starttext
>> auffasste
>> auffasse
>> \stoptext
>> ```
>> gives me "auffasse auffasse" (see attachment.)
>> I don't really understand what is happening here. Why is the t disappearing.
> 
> who knows ... i don't have that file

It was from my projects (eka = Edition Kritische Ausgabe, a series by Verlag 
Dreiviertelhaus).

(I didn’t remember I uploaded it to the wiki, tried to send it here, but it was 
too big.)


>> ```
>> \replaceword[eka][auffasse][au{ff}asse]
>> \replaceword[eka][auffasste][au{ff}asste]
>> \setreplacements[eka]
>> \starttext
>> auffasste
>> auffasse
>> \stoptext
>> ```
>> This example gives correct results.
> so we're okay

Good luck!

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
___


[NTG-context] Local custom notes affect regular footnotes

2020-10-09 Thread Henning Hraban Ramm
If I use local notes, regular footnotes disappear in the following example:


\definenote[testnote]

\starttext

\startlocalnotes[testnote]

Test\testnote{Custom note}

Other text inbetween with normal footnotes.\footnote{Footnote}

Test\testnote{Another custom note}

Other text afterwards with normal footnotes.\footnote{Other Footnote}

:::\placelocalnotes[testnote] :::

---\placelocalnotes[footnote] --- % just to be sure, no output
%\stoplocalnotes % a NOP?

\stoptext


(LMTX or MkIV 2020.09.20 23:02)

The use case is a commented edition of historical letters. Footnotes of letter 
contents should be local and numbered per letter, while general footnotes 
should behave as usual and are numbered by text.
(This setup works otherwise, no need to explain.)
Actually, the “normal text” part appears only after a letter, but before 
\placelocalnotes.


The logical structure would be:

\startlocalnotes[testnote]

\startnarrower
\input lorem\testnote{bla bla}

\input lorem\testnote{bla bla}
\stopnarrower

\stoplocalnotes % forgets local notes

\input knuth\footnote{Donald dixit}

\placelocalnotes[testnote] % nothing


In the MWE, the footnotes just disappear. In the actual project the problem is 
different, but I couldn’t reproduce it in a MWE. I guess the interference of 
different note types is the cause of both problems.

I tried using the same custom note for the last comment as a workaround, but it 
gets placed twice: once at the bottom of the current page (i.e. like a normal 
footnote, out of order) and once after the other custom notes.
(The letter is in a delimitedtext environment.)



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] Hyphenation patterns

2020-10-08 Thread Henning Hraban Ramm

> Am 08.10.2020 um 17:41 schrieb Denis Maier :
> 
> where can I find the hyphenation patterns used by ConTeXt? I have two wrongly 
> hyphenated words, and I want to check whether this is due to incorrect 
> patterns. (I tried the source browser... not much luck so far.) The words are:
> 1. applicable => hyphenated as applic-able
> 2. obligated => hyphenated as oblig-ated
> 
> I know I can use \hyphenation to correct that, but I wanted to check the 
> patterns nevertheless.

I guess it’s just a valid option.
You can check possible hyphenations like this:

\starttext

{EN: \en\hyphenatedcoloredword{applicable}}

{DE: \de\hyphenatedcoloredword{applicable}}

\stoptext


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] Hyperref-style borders around clickable links

2020-10-08 Thread Henning Hraban Ramm

> Am 08.10.2020 um 10:41 schrieb Denis Maier :
> 
> Ok, found a (partial) solution myself in Pablo's question from yesterday...
> 
> \setupinteraction[state=start]
> \enabledirectives[references.border]
> 
> does that. But how do I configure the borders? Color? Style and so? Couldn't 
> find anything on the Wiki.

\setupinteraction[color=,contrastcolor=,]
lets all links use the basic text color (usually black).
You can also set the style.

The frames are meant for debugging, probably you can redefine the color; ATM 
I’m not patient enough for searching the sources for this (and Wolfgang 
probably knows it from heart anyway).

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] chapter no. in header

2020-10-07 Thread Henning Hraban Ramm

> Am 07.10.2020 um 14:30 schrieb Tomas Hala :
> 
> Hi Hraban,
> 
> \setupheadertexts
>  [{\getmarking[sectionnumber]\getmarking[section]}]
>  [{\pagenumber}]
>  [{\pagenumber}]
>  [{\getmarking[chapternumber]\getmarking[chapter]}]

Thank you! I could have just tried that...

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
___


[NTG-context] chapter no. in header

2020-10-07 Thread Henning Hraban Ramm
This should be simple, but I can’t find it:
I need not only the chapter title, but also the chapter number in my headertext.

ATM I have (minus formatting):

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



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] playing with Windows drag & drop

2020-10-06 Thread Henning Hraban Ramm


> Am 06.10.2020 um 16:18 schrieb Pablo Rodriguez :
> 
> Dear list,
> 
> I have a minimal sample file:
> 
>  \starttext
>\insertpages[\env{PDFdocument}]
>  \stoptext
> 
> I invoke it in Windows, using the following batch file:
> 
>  @echo off
>  REM ~ context --purgeall --arguments="PDFdocument=%1" b.tex
> 
> I’m afraid it only works if the batch file and the PDF document are on
> the same directory.
> 
> I guess this is related to "\" in Windows paths. Is there a way to make
> it work with the sample above?

Did you try with / paths? They usually work on Windows, no need for \s

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] footnotes in captions in floatcombinations

2020-10-02 Thread Henning Hraban Ramm
Coming back to this complex:

> Am 20.09.2020 um 16:38 schrieb Henning Hraban Ramm :
> 
> Didn’t find a setup that changes the alignment, though.

The alignment problem is fixed, can’t remember in which release.


But I still struggle with those footnotes, unfortunately I can’t tell the 
author “footnotes in captions are evil, don’t do that”. And I know it’s a 
really tricky edge case.

FiCiFC work, if ...
- there’s enough space on the page where the float is placed
– page breaks don’t disturb the order of footnotes

The latter means:
If I use \placefigure[top]... in front of a paragraph full of footnotes, the 
paragraph starts on one page and the image gets placed on the next, then the 
footnote in the figure’s caption might have e.g. no.11, the paragraph uses 
footnote no.12 etc. The first footnote(s) of the paragraph find their place on 
the first page, the footnote(s) of the figure will never get placed, because 
its numbering is out of order.

If I put \placefigure in the middle of the paragraph, I can keep the order of 
footnotes and get to see the footnote of the figure, but the paragraph is split 
into two.

- Would it be possible to do the footnote numbering after the float placement, 
so that a footnote in a float keeps the reading order or numbers and gets its 
place on the right page?

– As a workaround, how can I use \placefigure in the middle of a paragraph 
without breaking it?


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
___


[NTG-context] scaling images

2020-09-27 Thread Henning Hraban Ramm
Hi,
I’m struggling with scaling images:

\externalfigure[hacker][width=0.5\textwidth]

looks right.


If I use the scale / xscale / yscale options, the image gets smaller, 
regardless of height/width settings, i.e. with

\externalfigure[hacker][width=0.5\textwidth,yscale=500,xscale=1000]


It looks like scaling resets height/width settings and uses the image size 
defined by its resolution.


In my current project, I can’t seem to manage to y-scale an image in a float, 
but I couldn’t reproduce that in a MWE yet, don’t know it it’s related.

(both LMTX or MkIV, v. 2020.09.20 23:02)

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] Running context-lmtx on Linux

2020-09-25 Thread Henning Hraban Ramm

> Am 25.09.2020 um 13:17 schrieb Alain Delmotte :
> 
> I did want to do the same on an old portable computer running lubuntu 16.04 
> (it's a 32 bits machine with small disk and RAM). I followed all the steps to 
> install it.

Did you follow the French instructions or those from 
https://wiki.contextgarden.net/Installation ?

I don’t understand much of French and didn’t find installation instructions on 
that site.

If your system is 32bit, of course you must use the 32bit Linux package.

> But this didn't work neither in the console (I get the message "Le programme 
> « context » n'est pas encore installé. Vous pouvez l'installer en tapant: 
> sudo apt install context" - but this, I suppose will install the context from 
> the linux distribution) , nor under TeXworks (message: "startup error: no 
> format file given, quitting".

It’s not clear what you did. Apparently your context (or mtxrun) binary is not 
in the PATH.


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] PDF/A conformance

2020-09-22 Thread Henning Hraban Ramm

> Am 22.09.2020 um 16:35 schrieb Henning Hraban Ramm :
> Did you try veraPDF?
> https://openpreservation.org/products/verapdf/

Here you can download it without registration:
https://github.com/veraPDF/veraPDF-apps
i.e. http://downloads.verapdf.org/rel/verapdf-installer.zip

(Java required)

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] PDF/A conformance

2020-09-22 Thread Henning Hraban Ramm


> Am 22.09.2020 um 16:06 schrieb Denis Maier :
> 
> Hi,
> I need to produce PDF/a. I've followed the advice on the Wiki, and the file 
> validates with: https://www.pdf-online.com/osa/validate.aspx
> But Acrobat complains about some problem with the XMP definition.
> Does anyone know more about this?

Different validators have different opinions on valid PDF/A. :-/

But that might be the state of 2017 when Luigi(? or was it Giuseppe?) presented 
his work on PDF/A...

Did you try veraPDF?
https://openpreservation.org/products/verapdf/


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] More table questions

2020-09-22 Thread Henning Hraban Ramm


> Am 22.09.2020 um 10:03 schrieb Denis Maier :
> 
> I usually don't need tables, therefore this maybe stupid question: What is 
> the currently recommended way to typeset tables? Still natural tables? Or 
> extreme tables? (My tables won't be 30 pages long.)

tabulate as far as it fits your needs, then natural tables (Hans dixit in 2019).

> Also, how do you easiest define booktabs style tables? I mean: can you define 
> tables such that the last row end with thicker lines without having to make 
> this explicit? Is there a mechanism for this? (That would make the XML 
> mapping much simpler.)

In tabulate you have several kinds of horizontal lines (\HL, \FL, \ML, \LL), 
but you need to set them and define their width individually.

IMO the different line widths of booktabs are very oldfashioned. Try to avoid 
lines as far as possible, and then use them unobtrusively.
Depending on your product (black printing, CMYK printing, screen only) you can 
use light colors, but be aware that thin, rasterized lines look jagged, while 
you can e.g. use 100% cyan even in 0.25pt, if the resolution of the press 
(offset/digital) works with such thin lines.

Also don’t use indented table lines if you don’t use vertical lines (and you 
should usually avoid those).

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] footnotes in captions in floatcombinations

2020-09-20 Thread Henning Hraban Ramm

> Am 20.09.2020 um 16:22 schrieb Henning Hraban Ramm :
>>>>> In MkIV I get images and footnotes, but the width of the footnotes is 
>>>>> always that of the image.
>>>>> 
>>>>> In LMTX I don’t get anything.
>>>> Current state (v. 2020.09.18 20:32):
>>>> Some progress: Footnotes are still as wide as the image they belong to (in 
>>>> both versions), but in LMTX some footnotes are missing.
>>> mwe missing
>> 
>> Regarding the width it’s still the same MWE (slightly adapted), apparently 
>> not related to floatcombinations but a general problem of footnotes in 
>> captions; couldn’t reproduce “some missing” in an MWE yet.

\setupfootnotes[
  width=\textwidth,
]

actually fixes that problem. Ouch.

Didn’t find a setup that changes the alignment, though.

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] footnotes in captions in floatcombinations

2020-09-20 Thread Henning Hraban Ramm


> Am 20.09.2020 um 13:59 schrieb Henning Hraban Ramm :
>>>> In MkIV I get images and footnotes, but the width of the footnotes is 
>>>> always that of the image.
>>>> 
>>>> In LMTX I don’t get anything.
>>> Current state (v. 2020.09.18 20:32):
>>> Some progress: Footnotes are still as wide as the image they belong to (in 
>>> both versions), but in LMTX some footnotes are missing.
>> mwe missing
> 
> Regarding the width it’s still the same MWE (slightly adapted), apparently 
> not related to floatcombinations but a general problem of footnotes in 
> captions; couldn’t reproduce “some missing” in an MWE yet.

I found another problem with captions in floatcombinations: They are always 
bottom-aligned to each other, so that the distance between image and caption 
differs. This is the same in current LMTX and MkIV.

Hraban


\usemodule[visual]
\definecolor[fakerulecolor][c=.2,m=.1,k=.2]
\useMPlibrary[dum]
\automigrateinserts % nop in LMTX
\showframe
\setupcaptions[
  headstyle={\ss\bfx},
  align={flushleft,high},
  hang=yes,
]

\starttext

\fakewords{10}{30}

% Footnotes, but no combination
%\startplacefigure[location=none]
%\startfloatcombination[2*1]
\startplacefigure[title={\fakewords{5}{10}\footnote[f:1]{\fakewords{10}{30}}}]
\externalfigure[001][width=.34\textwidth]
\stopplacefigure
\startplacefigure[title={\fakewords{5}{10}\footnote[f:2]{\fakewords{10}{30}}}]
\externalfigure[002][width=.62\textwidth]
\stopplacefigure
%\stopfloatcombination
%\stopplacefigure

\fakewords{20}{30}

% both
\startplacefigure[location=none]
\startfloatcombination[2*1]
\startplacefigure[title={\fakewords{5}{10}\footnote[f:3]{\fakewords{10}{30}}}]
\externalfigure[003][width=.34\textwidth]
\stopplacefigure
\startplacefigure[title={\fakewords{5}{10}\footnote[f:4]{\fakewords{10}{30}}}]
\externalfigure[004][width=.62\textwidth]
\stopplacefigure
\stopfloatcombination
\stopplacefigure

\fakewords{10}{30}

% combination without footnotes
\startplacefigure[location=none]
\startfloatcombination[2*1]
\startplacefigure[title={\fakewords{5}{10}}]
\externalfigure[005][width=.34\textwidth]
\stopplacefigure
\startplacefigure[title={\fakewords{5}{10}}]
\externalfigure[006][width=.62\textwidth]
\stopplacefigure
\stopfloatcombination
\stopplacefigure

\fakewords{5}{10}

\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] footnotes in captions in floatcombinations

2020-09-20 Thread Henning Hraban Ramm


> Am 20.09.2020 um 13:34 schrieb Hans Hagen :
> 
> On 9/19/2020 6:36 PM, Henning Hraban Ramm wrote:
>>> Am 16.09.2020 um 13:48 schrieb Henning Hraban Ramm :
>>> 
>>> In MkIV I get images and footnotes, but the width of the footnotes is 
>>> always that of the image.
>>> 
>>> In LMTX I don’t get anything.
>> Current state (v. 2020.09.18 20:32):
>> Some progress: Footnotes are still as wide as the image they belong to (in 
>> both versions), but in LMTX some footnotes are missing.
> mwe missing

Regarding the width it’s still the same MWE (slightly adapted), apparently not 
related to floatcombinations but a general problem of footnotes in captions; 
couldn’t reproduce “some missing” in an MWE yet.

Hraban


\useMPlibrary[dum]
\automigrateinserts % nop in LMTX
\showframe

\starttext

\input knuth

% Footnotes, but no combination
%\startplacefigure[location=none]
%\startfloatcombination[2*1]
\startplacefigure[title={1 Image with footnote\footnote[f:1]{\input lorem }}]
\externalfigure[001][width=.34\textwidth]
\stopplacefigure
\startplacefigure[title={2 Another image with footnote\footnote[f:2]{\input 
tufte }}]
\externalfigure[002][width=.62\textwidth]
\stopplacefigure
%\stopfloatcombination
%\stopplacefigure

\input lorem

% both
\startplacefigure[location=none]
\startfloatcombination[2*1]
\startplacefigure[title={3 Left Image\footnote[f:3]{\input knuth }}]
\externalfigure[003][width=.34\textwidth]
\stopplacefigure
\startplacefigure[title={4 Right Image\footnote[f:4]{\input dawkins }}]
\externalfigure[004][width=.62\textwidth]
\stopplacefigure
\stopfloatcombination
\stopplacefigure

\input lorem

% combination without footnotes
\startplacefigure[location=none]
\startfloatcombination[2*1]
\startplacefigure[title={5 Left Image}]
\externalfigure[005][width=.34\textwidth]
\stopplacefigure
\startplacefigure[title={6 Right Image}]
\externalfigure[006][width=.62\textwidth]
\stopplacefigure
\stopfloatcombination
\stopplacefigure

\input tufte

\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] footnotes in captions in floatcombinations

2020-09-19 Thread Henning Hraban Ramm


> Am 16.09.2020 um 13:48 schrieb Henning Hraban Ramm :
> 
> In MkIV I get images and footnotes, but the width of the footnotes is always 
> that of the image.
> 
> In LMTX I don’t get anything.

Current state (v. 2020.09.18 20:32):

Some progress: Footnotes are still as wide as the image they belong to (in both 
versions), but in LMTX some footnotes are missing.


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] Error setting up ConTeXt in MacTeX 2020

2020-09-18 Thread Henning Hraban Ramm

> Am 18.09.2020 um 09:41 schrieb Felix Krause :
> 
> Hi all,
> 
> with MacTeX 2020 on a newly installed Mac, I have the problem that ConTeXt 
> doesn't work anymore:
> 
> $ context file.tex
> mtx-context | warning: no format found, forcing remake (commandline 
> driven)
> […] snip lots of lines
> resolvers   | formats | changing to format path 
> '/var/folders/rj/hfjmjx796q102y4v23vh038cgp/T/luatex-cache/context/a86c089b384a3076dc514ba966a1fac9/formats/luatex'
> resolvers   | formats | unable to change to format path 
> '/var/folders/rj/hfjmjx796q102y4v23vh038cgp/T/luatex-cache/context/a86c089b384a3076dc514ba966a1fac9/formats/luatex'
> mtx-context | error, no format found with name: cont-en, aborting
> system  | total runtime: 5.315 seconds

Try to delete the luatex cache (i.e. all of 
/var/folders/rj/hfjmjx796q102y4v23vh038cgp/T/luatex-cache) and try again.

HTH
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] footnotes in captions in floatcombinations

2020-09-16 Thread Henning Hraban Ramm

> Am 16.09.2020 um 13:39 schrieb Hans Hagen :
> 
> On 9/16/2020 12:08 PM, Henning Hraban Ramm wrote:
> 
>> \automigrateinserts
> 
> that one does nothing in lmtx

At least it doesn’t interfere. ;)
But good to know it’s becoming obsolete.

>> \showframe
>> \starttext
>> \input lorem
>> \startplacefigure[location=none]
>> \startfloatcombination[2*1]
>> \startplacefigure[title={Left Image\footnote[f:3]{\input knuth }}]
>> \externalfigure[003][width=.48\textwidth]
>> \stopplacefigure
>> \startplacefigure[title={Right Image\footnote[f:4]{Anything}}]
>> \externalfigure[004][width=.48\textwidth]
>> \stopplacefigure
>> \stopfloatcombination
>> \stopplacefigure
>> \input tufte
>> \stoptext
> It was kind of tricky to identify (as i first though that you meant that it 
> also happened in mkiv)

In MkIV I get images and footnotes, but the width of the footnotes is always 
that of the image.

In LMTX I don’t get anything.

> but I managed to find a solution. New bin needed so not yet uploaded.

Thank you! Looking forward to it.


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
___


[NTG-context] sidefloats and narrower

2020-09-16 Thread Henning Hraban Ramm
Hi again,
this is related to “quotation with footnote“.

If you compile the example with (latest) LMTX, all is good.
But MkIV (--luatex) lets the quotations (“Zitat”) run over the float.

Without the \setupdelimitedtext line, distances between paragraphs become 
irregular in both versions (but differently).


\useMPlibrary[dum]
\usemodule[visual]

\setupwhitespace[halfline]

\setupdelimitedtext[quotation][method=font]
\setupnarrower[left=2em,right=1.5em]

\definenarrower[Zitat]
\setupnarrower[Zitat]
 [left=2em,
  right=1.5em,
  before=\dontleavehmode\hskip-0.33em\startquotation,
  after=\stopquotation]

\starttext

%\fakewords{50}{60}

\startplacefigure[location={right,-line},title={\fakewords{7}{10}}]
\externalfigure[022][width=0.33\textwidth,height=0.75\textheight]
\stopplacefigure
\startZitat
\fakewords{30}{60}
\stopZitat

\fakewords{30}{60}

\startZitat
\fakewords{15}{20}
\stopZitat

\fakewords{30}{60}

\stoptext


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] footnotes in captions in floatcombinations

2020-09-16 Thread Henning Hraban Ramm
Thank you, Otared!

I updated to LMTX/MkIV 2020.09.15 18:11:

The images appear if I use --luatex (i.e. MkIV vs. LMTX),
but the footnotes use the width of the image.
The old MWE can’t show that.

Without \automigrateinserts I get both images and the short footnote, but not 
the long one.


\useMPlibrary[dum]
\automigrateinserts
\showframe

\starttext

\input lorem

\startplacefigure[location=none]
\startfloatcombination[2*1]
\startplacefigure[title={Left Image\footnote[f:3]{\input knuth }}]
\externalfigure[003][width=.48\textwidth]
\stopplacefigure
\startplacefigure[title={Right Image\footnote[f:4]{Anything}}]
\externalfigure[004][width=.48\textwidth]
\stopplacefigure
\stopfloatcombination
\stopplacefigure

\input tufte

\stoptext




Am 14.09.2020 um 22:43 schrieb Otared Kavian :
> 
> Hi Hraban,
> 
> Your are right, your file is typeset correctly as expected with ConTeXt mkiv 
> version 2020.06.25 10:55, but not with the current lmtx.
> (I am sending you the output with this message).
> 
> Best regards: Otared K.
> 
> 
> 
>> On 14 Sep 2020, at 21:40, Henning Hraban Ramm  wrote:
>> 
>> Hi,
>> I got a problem with current LMTX as well as with other versions – while I’m 
>> sure it used to work at some point:
>> 
>> As soon as there’s a footnote in the caption of a placefigure within a 
>> floatcombination, the figure won’t get placed. There’s no problem outside of 
>> floatcombinations or with floatcombinations without footnotes.
>> 
>> Please let there be an easy fix...
>> 
>> Hraban
>> 
>> 
>> \useMPlibrary[dum]
>> \automigrateinserts
>> \showframe
>> 
>> \starttext
>> 
>> \input knuth
>> 
>> %\startplacefigure[location=none]
>> %\startfloatcombination[2*1]
>> \startplacefigure[title={Image with footnote\footnote[f:1]{foo bar baz}}]
>> \externalfigure[001][width=.48\textwidth]
>> \stopplacefigure
>> \startplacefigure[title={Another image with 
>> footnote\footnote[f:2]{Something}}]
>> \externalfigure[002][width=.48\textwidth]
>> \stopplacefigure
>> %\stopfloatcombination
>> %\stopplacefigure
>> 
>> \input lorem
>> 
>> \startplacefigure[location=none]
>> \startfloatcombination[2*1]
>> \startplacefigure[title={Left Image\footnote[f:3]{doo be doo}}]
>> \externalfigure[003][width=.48\textwidth]
>> \stopplacefigure
>> \startplacefigure[title={Right Image%\footnote[f:4]{Anything}
>> }]
>> \externalfigure[004][width=.48\textwidth]
>> \stopplacefigure
>> \stopfloatcombination
>> \stopplacefigure
>> 
>> \startplacefigure[location=none]
>> \startfloatcombination[2*1]
>> \startplacefigure[title={Left Image}]
>> \externalfigure[005][width=.48\textwidth]
>> \stopplacefigure
>> \startplacefigure[title={Right Image}]
>> \externalfigure[006][width=.48\textwidth]
>> \stopplacefigure
>> \stopfloatcombination
>> \stopplacefigure
>> 
>> \input tufte
>> 
>> \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
>> ___
> 

___
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] Quotation with footnote

2020-09-16 Thread Henning Hraban Ramm
Am 04.09.2020 um 16:04 schrieb Taco Hoekwater :
> \definenarrower[myquote]
> \setupnarrower[myquote]
>  [left=2em,
>   right=1.5em,
>   before=\dontleavehmode\hskip-0.33em\startquote,
>   after=\stopquote]
> 
> \startmyquote
> Im übrigen ist der Mensch ein Lebewesen, das klopft, schlechte Musik macht 
> und seinen Hund bellen läßt. Manchmal gibt er auch Ruhe, aber dann ist er tot.
> \stopmyquote \footnote[f:9]{Kaspar Hauser (Kurt Tucholsky), Weltbühne 24, 
> 16.\,6.\,1931}

The behaviour changed in current LMTX – I thought, but then I recognized I was 
accidentally using MkIV from January:

If I used
\setupdelimitedtext[quotation][method=font]
I didn’t get indentation ("narrower") any more.

If I didn’t, the footnote marker moved into the next line.


Just to document that change – seems to be a fixed bug.


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] Documentation for the database module

2020-09-16 Thread Henning Hraban Ramm

> Am 15.09.2020 um 04:51 schrieb myli...@posteo.de:
> 
> Hi,
> 
> I want to typeset a Periodic Table of the Elements. The according data
> is prepared in a file with comma separated values (csv/UNIX). I found
> some *very* basic informations how to get file based csv-data typeset,
> but the result is hardly recognizable as Periodic Table of the
> Elements.
> 
> To understand how to use the according commands I need a documentation
> of it.
> 
> What I found was this:
> https://wiki.contextgarden.net/M-database
> which is more a summary of two examples with no explanations and
> starting with the warning "This may be outdated".
> 
> Where can I find a good one?

Have a look at the bibliography module’s documentation (mkiv-publications.pdf), 
there’s an example with chemicals. Don’t know if that fits your needs.

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] Footnote font size equal to main text font size

2020-09-16 Thread Henning Hraban Ramm


> Am 15.09.2020 um 04:38 schrieb Jairo A. del Rio :
> 
> Hi, list. I've adapted the following example from the mailing list. My aim is 
> to use endnotes for each chapter:
> 
> \mainlanguage[es]
> \definehead[footnotetitle][title]
> \startsetups[chapter:after]
> \ifcase\rawcountervalue[footnote]\relax
>  \else
>  \startfootnotetitle[title={Notas}]
>  \placefootnotes
>  \stopfootnotetitle
>  \fi
> \stopsetups
> 
> \setupnotes[location=none]
> \setupnotation[way=bychapter]
> \setupfootnotedefinition[style={\switchtobodyfont[12pt]}]
> 
> \setuphead[chapter][aftersection=\setups{chapter:after}]
> 
> \starttext
> 
> \startchapter[title={Chapter One}]
> 
> Here comes \footnote{a footnote}. Aquí \footnote{otra nota a pie de página}.
> 
> \stopchapter
> 
> \stoptext
> 
> However, I'm concerned by \switchtobodyfont. How should I make footnote size 
> the same as the default font size, even when an arbitrary font size is used.
> 
> E.g.:
> 
> \setupbodyfont[24pt] % It could be another number instead of 24
> \setupfootnotedefinition[style={\switchtobodyfont[???]}]
> 
> Thank you in advance.

Try

\newdimen\Mybodyfontsize
\Mybodyfontsize=24pt

\setupbodyfont[\Mybodyfontsize]

etc.


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
___


[NTG-context] footnotes in captions in floatcombinations

2020-09-14 Thread Henning Hraban Ramm
Hi,
I got a problem with current LMTX as well as with other versions – while I’m 
sure it used to work at some point:

As soon as there’s a footnote in the caption of a placefigure within a 
floatcombination, the figure won’t get placed. There’s no problem outside of 
floatcombinations or with floatcombinations without footnotes.

Please let there be an easy fix...

Hraban


\useMPlibrary[dum]
\automigrateinserts
\showframe

\starttext

\input knuth

%\startplacefigure[location=none]
%\startfloatcombination[2*1]
\startplacefigure[title={Image with footnote\footnote[f:1]{foo bar baz}}]
\externalfigure[001][width=.48\textwidth]
\stopplacefigure
\startplacefigure[title={Another image with footnote\footnote[f:2]{Something}}]
\externalfigure[002][width=.48\textwidth]
\stopplacefigure
%\stopfloatcombination
%\stopplacefigure

\input lorem

\startplacefigure[location=none]
\startfloatcombination[2*1]
\startplacefigure[title={Left Image\footnote[f:3]{doo be doo}}]
\externalfigure[003][width=.48\textwidth]
\stopplacefigure
\startplacefigure[title={Right Image%\footnote[f:4]{Anything}
}]
\externalfigure[004][width=.48\textwidth]
\stopplacefigure
\stopfloatcombination
\stopplacefigure

\startplacefigure[location=none]
\startfloatcombination[2*1]
\startplacefigure[title={Left Image}]
\externalfigure[005][width=.48\textwidth]
\stopplacefigure
\startplacefigure[title={Right Image}]
\externalfigure[006][width=.48\textwidth]
\stopplacefigure
\stopfloatcombination
\stopplacefigure

\input tufte

\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] Force bottom float to be at the bottom

2020-09-12 Thread Henning Hraban Ramm


> Am 07.09.2020 um 14:08 schrieb Mikael Sundqvist :
> 
> I'm defining a bottomfigure with default=bottom, but it does not always seem 
> to work (example below). If the float does not fit on the page, it appears 
> instead in the top of the next page. Can I force it to be in the bottom of 
> the next page? That is, can I setup a float that is always at the bottom of 
> the page? I hope what I ask makes sense.

AFAIK location=bottom is always unreliable, it’s a known limitation and you 
can’t change that.

Do you need it as a float (with caption and all)? Otherwise you could try 
absolute placement with a layer.

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] latest lmtx

2020-09-05 Thread Henning Hraban Ramm


> Am 05.09.2020 um 16:08 schrieb Alan Bowen :
> 
> When I process
> \starttext
> Hello, world!
> \stoptext
> I get the following error message:
> 
> /Users/bowen1/Library/TeXShop/Engines/LuaMetaTeX.engine:9: no such file or 
> directory: /Users/bowen1/context-osx-64/tex/texmf-osx-64/bin/mtxrun
> 
> resolvers   | formats | executing runner 'run luametatex format': 
> /Applications/LuaMetaTeX/tex/texmf-osx-64/bin/luametatex --jobname="Version" 
> --fmt=/Applications/LuaMetaTeX/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en.fmt
>  
> --lua=/Applications/LuaMetaTeX/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en.lui
>  cont-yes.mkiv --c:autogenerate --c:currentrun=1 --c:file-line-error 
> --c:fulljobname="./Version.tex" --c:input="./Version.tex" --c:kindofrun=1 
> --c:maxnofruns=9 --c:synctex="1" 
> --c:texmfbinpath="/Applications/LuaMetaTeX/tex/texmf-osx-64/bin"
> mtx-context | fatal error: return code: 11
> 
> There is definitely a file 
> /Users/bowen1/Library/TeXShop/Engines/LuaMetaTeX.engine.
> Previous versions of lmtx process without any problem. 

The message doesn’t ask for the engine file, but for the mtxrun script 
mentioned in line 9 of the engine.

Is /Users/bowen1/context-osx-64/tex/texmf-osx-64/bin/mtxrun still valid in your 
installation?

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] styling individual parts of ToC entry

2020-09-05 Thread Henning Hraban Ramm

> Am 05.09.2020 um 03:35 schrieb jbf :
> 
> (1) the author's names lined up vertically throughout the ToC, and 

That would require to typeset the ToC as a table/tabulate; I remember that was 
hard to do, and I can’t remember in which product I used it, so I can’t look it 
up.

Maybe an \inframed of your desired width would be a solution?

e.g.
\inframed[width=5cm,frame=off,style=boldface,align=flushleft]{#1}%
\hskip 1cm%
\inframed[width=5cm,frame=off,align=flushleft]{\structurelistuservariable{author}}

(Untested)

> (2) the first part of the entry (e.g. Foreword) to be bold, but the author 
> name to be regular text.

If you need different styles within your textcommand (\TitleTocEntry), just set 
them there, i.e. \bold{#1} or {\bf #1}. Or as options of \inframed, as above.


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] Quotation with footnote

2020-09-04 Thread Henning Hraban Ramm

> Am 04.09.2020 um 16:20 schrieb Wolfgang Schuster 
> :
> 
> \startsetups [userdata:myquote]
> \startnarrow [left=2em,right=1.5em]
> %\dontleavehmode\llap{\symbol[leftquotation]}\getinlineuserdata\symbol[rightquotation]
> \symbol[leftquotation]\getinlineuserdata\symbol[rightquotation]
> \doifsomething{\userdataparameter{source}}
> {\footnote[\userdataparameter{reference}]{\userdataparameter{source}}}
> \stopnarrow
> \stopsetups
> 
> \defineuserdataalternative
>   [myquote]
>   [renderingsetup=userdata:myquote]
> 
> \defineuserdata
>   [myquote]
>   [alternative=myquote]
> 
> \showframe
> 
> \definefontfeature [default] [default] [protrusion=quality]
> 
> \setupalign [hanging]
> 
> \starttext
> 
> \startuserdata [myquote] [reference={f:9},source={Kaspar Hauser (Kurt 
> Tucholsky), Weltbühne 24, 16.\,6.\,1931}]
> Im übrigen ist der Mensch ein Lebewesen, das klopft, schlechte Musik macht 
> und seinen Hund bellen läßt. Manchmal gibt er auch Ruhe, aber dann ist er tot.
> \stopuserdata
> 
> \stoptext

Thank you! This is quite sophisticated and I’ll keep it for next time, but for 
my current book, Taco’s solutions needs less adaption.

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] Quotation with footnote

2020-09-04 Thread Henning Hraban Ramm

> Am 04.09.2020 um 16:04 schrieb Taco Hoekwater :
> 
> Something like this?
> 
> \definenarrower[myquote]
> \setupnarrower[myquote]
>  [left=2em,
>   right=1.5em,
>   before=\dontleavehmode\hskip-0.33em\startquote,
>   after=\stopquote]
> 
> \startmyquote
> Im übrigen ist der Mensch ein Lebewesen, das klopft, schlechte Musik macht 
> und seinen Hund bellen läßt. Manchmal gibt er auch Ruhe, aber dann ist er tot.
> \stopmyquote \footnote[f:9]{Kaspar Hauser (Kurt Tucholsky), Weltbühne 24, 
> 16.\,6.\,1931}
> 
> But there may be smarter solutions.

Thank you, that works and requires minimal adaptions to my code.

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] Quotation with footnote

2020-09-04 Thread Henning Hraban Ramm


> Am 04.09.2020 um 13:25 schrieb Henning Hraban Ramm :
> 
> My current book contains a lot of quotations with their sources marked as 
> footnotes, e.g.
> 
> 
> \definedelimitedtext[Zitat][
>  %setups=Zitat, % doesn’t work!?
>  left=»,
>  right=«,
>  leftmargin=2em,
>  rightmargin=1.5em,
> ]
> 
> \startZitat
> A rose is a rose is a rose.\footnote{Marx brothers}
> \stopZitat
> 
> 
> Now, since the quotations are whole sentences or paragraphs, the footnote 
> marker needs to be placed _after_ the closing quotation mark. (German 
> typography, I learned it’s different at least in US English.)
> 
> I tried several approaches e.g. with my own single start/stop macros that 
> call \start/stopnarrower or \start/stopZitat – that always lead to unclosed 
> environments.

This looks as I want it to:

\setupnarrower[left=2em,right=1.5em]

\startnarrower
\hskip-0.33em\quotation{Im übrigen ist der Mensch ein Lebewesen, das klopft, 
schlechte Musik macht und seinen Hund bellen läßt. Manchmal gibt er auch Ruhe, 
aber dann ist er tot.}\footnote[f:9]{Kaspar Hauser (Kurt Tucholsky), Weltbühne 
24, 16.\,6.\,1931}
\stopnarrower

But how can I make that into a single environment?


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
___


[NTG-context] Quotation with footnote

2020-09-04 Thread Henning Hraban Ramm
My current book contains a lot of quotations with their sources marked as 
footnotes, e.g.


\definedelimitedtext[Zitat][
  %setups=Zitat, % doesn’t work!?
  left=»,
  right=«,
  leftmargin=2em,
  rightmargin=1.5em,
]

\startZitat
A rose is a rose is a rose.\footnote{Marx brothers}
\stopZitat


Now, since the quotations are whole sentences or paragraphs, the footnote 
marker needs to be placed _after_ the closing quotation mark. (German 
typography, I learned it’s different at least in US English.)

I tried several approaches e.g. with my own single start/stop macros that call 
\start/stopnarrower or \start/stopZitat – that always lead to unclosed 
environments.

* Only the delimitedtext approach gives a hanging opening quotation mark (which 
looks nice and I’d like to have).

* \stopnarrower within a macro doesn’t seem to work (all following text stays 
narrower).

* I can’t get rid of that space introduced by the CR before \stop – didn’t find 
a place where \gobblespacetokens works, maybe that’s the wrong command.


Most preferred would be a solution that checked if there’s a footnote in front 
of \stopZitat and would put the closing quotation mark in front instead of 
after. Without a footnote it would just place the mark.

Something like \stopZitat\footnote{...} would also be nice, but I guess that’s 
too far outside of TeX’s logic.

In the worst case I’d need to typeset the closing mark manually.

Some hints please?

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] author in ToC and other design complications

2020-09-04 Thread Henning Hraban Ramm

> Am 04.09.2020 um 12:08 schrieb jbf :
> 
> Thanks, and I am sure that this entry into the wiki will be also helpful for 
> others. For me it will be step by step, and using your information I can now 
> at least get an author's name into the toc! But that's about all. 

And that’s what the wiki entry is about and what I can tell.

> Just know that when you say (in the new wiki addition) 'check on 
> \rawstructurelistuservariable' that  link simply tells me 'There is currently 
> no text in this page'. That leaves someone like me without a lot of the 
> long-gained knowledge that others have, quite lost :-)

Sorry that the command is still undocumented but I thought the example would be 
clear enough:

You can’t check (i.e. use \doifnot) on \structurelistuservariable because that 
always contains at least some invisible tokens, you must use 
\rawstructurelistuservariable instead.

But if all of your chapters have the author set, you don’t need that check.

> But I took your example and adjusted it for, say, a chapter which has just a 
> title (no subtitle) and an author, and added, below what I already have in 
> the preamble:
> 
> \define[1]\ChapterTocEntry{%
>   \structurelistuservariable{author}\crlf%
>   #1\crlf% title
>   %\structurelistuservariable{subtitle}}%
> }
> 
> \setuplist[chapter][
>   textcommand=\ChapterTocEntry,
> ]
> 
> So, in other words I swapped the word 'section' in your example with 
> 'chapter'. That now gives me in the ToC, something like the following:
> 
> One   Author name
> 
>  Titlepg no.
> 
> Which is pretty much what I am after. Hooray! But how do I get that in 
> reverse?

Have another look at your \ChapterTocEntry: you call the author by 
\structurelistuservariable{author} and set the title as #1 in the next line. 
Just adapt this to your needs.


> And how do I get the word 'chapter' to also appear in front of 'One'?

Try \labeltext{chapter} in the right place.


Good luck & have fun!
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] force index entries without page number

2020-09-04 Thread Henning Hraban Ramm


> Am 03.09.2020 um 13:32 schrieb mf :
> 
> Use check=yes

But I need check=no, because my author has several entries like


Miller, Carolyne, born Princess of Sayn-Wittgenstein   123–125

Sayn-Wittgenstein, Carolyne of  see Miller, Carolyne


i.e. the reference target often has a different wording from the entry,
and thus \seeindex{Something}{} always inserts a "see".


I don’t know how common these "passim" entries are in scientific works; maybe I 
could use

Mainperson  firstpage–lastpage

instead to avoid the major hassle of tricking the index mechanisms.


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] author in ToC and other design complications

2020-09-04 Thread Henning Hraban Ramm


> Am 04.09.2020 um 06:44 schrieb jbf :
> 
> 
> Of course, I would prefer it to say 'Chapter One' not just 'One', so that is 
> a minor problem I still have to resolve. But in fact, the publisher wants 
> something quite different and I really do not know how to go about it. I did 
> look at 'Author in ToC' in the wiki, but that referred me to a somewhat 
> complicated Proceedings style, and given that my Chapters are all set up 
> anyway, I just couldn't follow that. Am hoping there is some other way I can 
> achieve the design that follows:
> 
> ForewordAuthor's nameiii
> 
> Chapter One   Chapter title
> 
> Author's name   1
> 
> Chapter Two1820-1880
> 
> Chapter title
> 
> Author's name   10

I just replaced the according section 
https://wiki.contextgarden.net/Table_of_Contents#Author_in_ToC for 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] force index entries without page number

2020-09-03 Thread Henning Hraban Ramm
Hi Massi, thank you!

> Am 03.09.2020 um 11:09 schrieb mf :
> 
> This should be exactly what you asked for:
> 
> \defineprocessor[passim][right=\quad{\it passim}]

I didn’t think to use processors.

> \seeindex{passim->Ramm, Hraban}{}

No, this results in
"Ramm, Hraban passim see passim"

And
\index{passim->Ramm, Hraban}
results in
"Ramm, Hraban passim 1"

I.e. I’m still looking for an index entry without "see" or page number.


> \placeindex[check=no]

This is essential for references to not (exactly) existing entries, I forgot 
the option existed.

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
___


[NTG-context] force index entries without page number

2020-09-03 Thread Henning Hraban Ramm
Hi,

I’d like to have an (person) index entry like

Ramm, Hraban   passim

i.e. without actual page number.
How can I force that?

I also need to be able to refer to it like
\seeindex{Hraban}{Ramm, Hraban)


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] defining font family for several options

2020-09-01 Thread Henning Hraban Ramm

> Am 01.09.2020 um 05:22 schrieb jbf :
> 
> Perhaps someone can assist me with the following query. I have a situation 
> where I need to use more than one sans serif fonts (especially within 
> complicated chapter heads). I currently have the following:
> 
> \definefontfamily [mainface] [rm] [alegreya]
> \definefontfamily [mainface] [ss] [dax][tf=file:dax-regular]
> \definefontfamily [mainface] [mm] [alegreya]
> \setupbodyfont[mainface]
> \setupbodyfont[11pt]
> 
> But what if I need to have, in addition to the Dax sans serif typeface, an 
> additional sans serif typeface such as ITCAvantGarde? How do I declare that? 
> Do I just give it another name, e.g. 
> \definefontfamily[chapter][itcavantgarde] etc? If I did that, how then do I 
> refer to it? Obviously not just as {\ss my text} since that would call in the 
> dax font.

If you don’t need the roman font, you can (ab)use that. Or try handwriting/hw 
(it was commonly declared in MkII; didn’t try if it just works nowadays).

Otherwise, since you probably will use only special font variants in setups 
like headers, use something like \definedfont[ITCAvantGarde-Semibold*default at 
36pt].

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] setuplayout vs Indesign!

2020-08-27 Thread Henning Hraban Ramm

> Am 26.08.2020 um 12:13 schrieb jbf :
> 
> Thank you. Let's see if the Quality Control person is convinced by what she 
> gets with the suggested measurements. 
> 
> I usually set things up 'as if' they would be on A4, in this case, 
> \setuppapersize[ACN][A4] (ACN being the name I give to the 140x216mm book in 
> question).
> 
> And yes, I have looked carefully at the 'Layout' section of Contextgarden, 
> but the difficulty always is marrying its terminology with what someone wants 
> who deals only with InDesign. And that causes confusion (for me, at least). 
> But it certainly helps me to know that 'your left margin is backspace', since 
> I had been presuming that 'leftmargin' meant left margin!
> 
> Maybe, one of these days, someone with experience in both ConTeXt and 
> InDesign (since InDesign is used by very many commercial publishers, but I am 
> trying to convince one of them of the value of ConTeXt) could offer a 
> comparison of the layout terminology/measurements/requirements for both. I 
> for one would find that very helpful.

While I was a long time user of InDesign (2.0 to CS 5.5), and QuarkXPress 
before, I don’t use it any more, my old copy doesn’t run any more on my current 
MacOS. Nowadays I use Serif’s Affinity Publisher/Designer for graphical layout 
jobs (also not free and not a full replacement, but good enough if you know how 
to work around the quirks, and much cheaper).

The terms and measures of graphical layout programs aren’t directly 
translatable to TeX since the concepts are just too different. Even the pt is 
different.

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] setuplayout vs Indesign!

2020-08-26 Thread Henning Hraban Ramm


> Am 26.08.2020 um 08:44 schrieb jbf :
> 
> Severe Covid-19 restrictions locally have left me out on a limb unable to be 
> side-byside with people who can set me on track for a few things! Hence the 
> bombardment of questions, for which I apologise. But almost there!
> 
> The InDesign QC individual (who accepts my ConTeXt-produced pdfs) wants some 
> tweaking to my layout, saying, in simple terms: Odd/right pgs left margin 
> should be 20mm and right margin 15mm; even/left pgs right margin 20mm and 
> left margin 15mm.
> 
> I think the difficulty is that what InDesign calls margins might be termed a 
> little differently in ConTeXt and I have no experience with InDesign.
> 
> My initial setup was as follows for a paper size defined as 
> [width=140mm,height=216mm] double-sided setup (in other words a standard 
> 8.5"x5.5" book):
> 
> \setuplayout
> 
> [backspace=16mm,
> topspace=12mm, 
> header=6mm,
> headerdistance=10mm,
> footerdistance=9mm,
> footer=8mm,
> width=fit,
> horoffset=12.7mm,
> location=middle, 
> height=198mm, 
> marking=on]
> 
> There was no mention of 'margins' as such in that layout, and the result is 
> close to what is wanted but not quite. Do I solve the problem by adding in: 
> leftmargin=20mm,
> rightmargin=15mm,
> 
> or is it some other item I need to adjust to ensure the 20mm/15mm dimensions 
> requested?

If you don’t need marginals, your left margin is backspace, right margin is: 
paper width - width - backspace, i.e. for A4:

\setuplayout[
  backspace=20mm,
  width=175mm
]
\setuppagenumbering[alternative=doublesided] % mirror right and left pages


See also https://wiki.contextgarden.net/Layout

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] Overriding the number on a float

2020-08-24 Thread Henning Hraban Ramm


> Am 24.08.2020 um 17:36 schrieb Wolfgang Schuster 
> :
> 
> Henning Hraban Ramm schrieb am 24.08.2020 um 15:29:
>>> Am 23.08.2020 um 11:25 schrieb Duncan Hothersall :
>>> 
>>> I think there was a question on this very recently but I don;t think it got 
>>> an answer and I can't find it to reply to, so apologies for the extra 
>>> noise. I have a large text with floats numbered sequentially by chapter and 
>>> then figure/table number, but at the last minute I've had a request for two 
>>> figures in a particular chapter to become 27.1a and 27.1b instead of 27.1 
>>> and 27.2. It's not a combination - they are separate figures on different 
>>> pages.
>>> 
>>> I've experimented with the options I can see, but it's not obvious if there 
>>> is a facility to override the numbering of two figures in a stream of 
>>> normally numbered figures like this. I was thinking of the equivalent of 
>>> the old \sym{symbol} command that used to work as a way to override a 
>>> single item in an otherwise sequential list.
>>> 
>>> I guess there's a brute force method of setting up a new type of figure 
>>> with the label "Figure 27.1" and having them numbered as lowercase alpha, 
>>> but if there's an easier way that would be great.
>> I’m also interested in overriding automatical numbering, e.g. of chapters or 
>> itemization items.
>> E.g. in my songbook, I’d like to have the verses numbered but interrupted by 
>> a chorus numbered as "C" (i.e. "R" in German).
>> Similarly the paragraphs of some (by)laws that were changed a lot and use a 
>> numbering like 1, 2, 3, 3a, 4, 7...
>> Something like
>> \startitem[number={R}]
>> or
>> \startsection[number={3a}]
>> would be nice.
>> If I set it to an integer, ConTeXt should set the counter accordingly, 
>> otherwise continue counting from the previous calculated number. Would that 
>> be possible?
> 
> 
> You can set your own section numbers but the counter isn't stopped.

Thank you! I overlooked "ownnumber". It works for sections, but not for items 
or floats.

\setnumber[section][10] doesn’t work, \setcounter the same (according to the 
source they’re synonymous) – does section use a different counter name or is it 
no counter at all?

\setnumber[figure][10] works (but only with integers, not some alphanumerical 
stuff, sorry Duncan).

Hraban


\useMPlibrary[dum]

\starttext

\startsection[title=One]
\startplacefigure[title=Test]
\externalfigure[dummy]
\stopplacefigure
\stopsection

\startsection[title=Two]
\startplacefigure[title=Test]
\externalfigure[dummy]
\stopplacefigure
\stopsection

\setcounter[figure][5] % next figure is no.6

\startsection[ownnumber=10,title=???] % ownnumber doesn’t work
\startplacefigure[title=Test,ownnumber=10]
\externalfigure[dummy]
\stopplacefigure
\stopsection

\setcounter[section][5] % doesn’t work

\startsection[title=Three]
\startitemize[n]
  \item one
  \item two
  \item three
  \startitem[ownnumber=9] five\stopitem  % ownnumber doesn’t work
\stopitemize
\stopsection

\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] Overriding the number on a float

2020-08-24 Thread Henning Hraban Ramm


> Am 23.08.2020 um 11:25 schrieb Duncan Hothersall :
> 
> I think there was a question on this very recently but I don;t think it got 
> an answer and I can't find it to reply to, so apologies for the extra noise. 
> I have a large text with floats numbered sequentially by chapter and then 
> figure/table number, but at the last minute I've had a request for two 
> figures in a particular chapter to become 27.1a and 27.1b instead of 27.1 and 
> 27.2. It's not a combination - they are separate figures on different pages.
> 
> I've experimented with the options I can see, but it's not obvious if there 
> is a facility to override the numbering of two figures in a stream of 
> normally numbered figures like this. I was thinking of the equivalent of the 
> old \sym{symbol} command that used to work as a way to override a single item 
> in an otherwise sequential list.
> 
> I guess there's a brute force method of setting up a new type of figure with 
> the label "Figure 27.1" and having them numbered as lowercase alpha, but if 
> there's an easier way that would be great.

I’m also interested in overriding automatical numbering, e.g. of chapters or 
itemization items.

E.g. in my songbook, I’d like to have the verses numbered but interrupted by a 
chorus numbered as "C" (i.e. "R" in German).
Similarly the paragraphs of some (by)laws that were changed a lot and use a 
numbering like 1, 2, 3, 3a, 4, 7...

Something like
\startitem[number={R}]
or
\startsection[number={3a}]
would be nice.
If I set it to an integer, ConTeXt should set the counter accordingly, 
otherwise continue counting from the previous calculated number. Would that be 
possible?

BTW do sections, items and floats all use counters (\setnumber/\getnumber) or 
other mechanisms?


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] color question

2020-08-24 Thread Henning Hraban Ramm


> Am 24.08.2020 um 01:15 schrieb jbf :
> 
> I have a very basic question about color use that someone will be able to 
> answer easily. The background to the question is that (i) I am completely new 
> to this scene of commercially[offset] print-ready material as distinct from 
> what is required on screen (ii) I am using Mk IV (iii) I need spot colors set 
> up for cmyk, and for now I need shades between black and white (e.g. light 
> gray) for a simple design feature.
> 
> My question is this: is the use of color keywords sufficient? Or in other 
> words, have predefined color names like lighgray already been defined in, say 
> cmyk terms behind the scenes, or must I instead 
> \definecolor[lightgray][c=10,m=7,y=5,k=0],   (or perhaps \definespotcolor 
> with those dimensions, or do I need both)?

First: Color parts use decimal numbers from 0 to 1.

Even if some color names are predefined, you should define your grays yourself 
– either as shades of black only or maybe with a bit of cyan. Grays in more 
(process) colors are unstable and might get a tint (color cast) you don’t want. 
(Of course you could use other colors than cyan for some tinting, depending on 
your work.)

E.g. I often \definecolor[deepblack][c=.3,k=1] for black areas; the cyan 
portion evens out some irregularities in print.
Because I don’t trust ConTeXt’s (or my) color setup, I also 
\definecolor[cmykblack][k=1] to avoid “RGB black”. (But 
\setupcolor[cmyk=yes,rgb=no,overprint=yes] should handle that already.)

If you want to use grays as spot colors (e.g. Pantone) you must define them as 
such – but usually you don’t want (to pay for) more than one spot color. Spot 
gray makes sense if you have big areas of that color, since 100% spot color 
looks better than any percent rastered black.

See also:
https://wiki.contextgarden.net/Color
https://wiki.contextgarden.net/Spot_Colors


Hraban (printing engineer)

___
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] vertical align in tabulate paragraphs

2020-08-23 Thread Henning Hraban Ramm
Here’s another problem that I can’t reproduce in a MWE:

In a tabulation that is set up like the example, in some cases the right column 
cell doesn’t top-align with the left one (see screenshot). In most cases it 
works.
There’s no \setuptabulate in my environment; don’t know what else could 
influence this behaviour. Doesn’t seem to be grid or font related.

Any hint where I could look?

Hraban


\usemodule[visual]

\starttext

\starttabulate[|p(0.33\textwidth)|p|]
\dorecurse{100}{\NC:\fakewords{1}{15}–\NC–\fakewords{1}{20}.\NC\NR}
\stoptabulate

\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
___


[NTG-context] Index confusion with first entry

2020-08-18 Thread Henning Hraban Ramm
Hi, my index of locations shows a strange problem:

Hamburg 6, 12, 14, 24–25, 27, 31, 33, 35, 44, 46, 48, 57, 59, 64, 75, 79, 81, 
93–94, 96, 102, 104–105, 108–110, 112, 116–118, 120, 121–125, 6, 126–135, 6, 
137– 147, 149, 151–159, 161, 165, 168, 169–171, 174, 176, 178, 182, 207, 209, 
211, 215–216, 219–220, 224, 240, 242–244, 291

Page 6 is mentioned two times out of order. The problem doesn’t show at other 
locations.

The first index entry (p.6) is made by 
\startregister[locations][test]{Someplace}, second is Hamburg (single entry).
If I replace Hamburg with another town, the problem moves.
If I move the Hamburg entry in front of \startregister, it disappears!

I.e. if the first index entry is set by \startregister, the subsequent entry 
gets confused.

I tried to come up with a MWE, but couldn’t reproduce the problem in a simple 
example like

\starttext

\placeregister[index][criterium=all]

\startregister[index][test]{Knuth}
  \input tufte
  \index{Donald}
  \page
  \input knuth
  \index{Donald}
  \page
\stopregister[index][test]

\input darwin
\page

\dorecurse{5}{
\input knuth
\index{Knuth}\index{Donald}
\page
}

\stoptext


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] custom header/footer for 1st/other pages of section

2020-08-11 Thread Henning Hraban Ramm
> One thing I *CANNOT* figure out:  I've been using \doifoddpageelse to put in 
> a blank/empty page at the end of a section (if needed) so that new sections 
> always start on an odd page.  This is still working with the change to 
> chapters from sections, EXCEPT for the first chapter (after TOC)!  Totally 
> stuck with that one...

Ehm... Why don’t you just use \setuphead[section][page=right] ?

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] floats side by side

2020-08-08 Thread Henning Hraban Ramm


> Am 08.08.2020 um 18:32 schrieb Wolfgang Schuster 
> :
> 
> Henning Hraban Ramm schrieb am 08.08.2020 um 17:51:
>> Hello again,
>> I need to place several figures side by side (e.g. pictures of persons).
>> I know I can use combinations, but I need the figures with captions included 
>> in the usual numbering of figures and not one number & caption for the 
>> combination.
>> How can I achieve this?
> 
> Use a float combination:
> 
> \startplacefigure[location=none]
>\startfloatcombination[2*1]
>\startplacefigure[title={Left dummy}]
>\externalfigure[dummy]
>\stopplacefigure
>\startplacefigure[title={Right dummy}]
>\externalfigure[dummy]
>\stopplacefigure
>\stopfloatcombination
> \stopplacefigure

Thank you very much!

It works like it should.

I learn something new about ConTeXt every day.

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
___


[NTG-context] floats side by side

2020-08-08 Thread Henning Hraban Ramm
Hello again,

I need to place several figures side by side (e.g. pictures of persons).
I know I can use combinations, but I need the figures with captions included in 
the usual numbering of figures and not one number & caption for the combination.
How can I achieve this?

Best, 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] check if inside footnote

2020-08-04 Thread Henning Hraban Ramm

> Am 04.08.2020 um 13:20 schrieb Hans Hagen :
> 
> On 8/4/2020 11:04 AM, Henning Hraban Ramm wrote:
>> Hi, me again...
>> Is there a check if a macro is called from inside of a footnote, like a 
>> system mode *footnote?
>> (Same with captions?)
>> In my current project, index entries should get italic page numbers if they 
>> occurr inside of a footnote (or a caption, but that is rare).
>> I’m using different shortcuts for both cases (that call \index with or 
>> without processor), but some paragraphs are very confusing (many long 
>> footnotes, or footnotes within footnotes), and I could avoid manually 
>> analyzing the structure if my macro could determine on its own if it’s 
>> called from a footnote.
>> Not-working example:
>> \setupinteraction[state=start]
>> \defineprocessor[kursiv][style=italicface]
>> \define[1]\Idx{\doifmodeelse{*footnote}{\index{#1}}{\index[kursiv->]{kursiv->#1}}#1}
>> \starttext
>> Text
>> ---
>> \index[C]{A}{B}\footnote{Inside\index{FN}}\index{BF}
>> ---
>> \placeregister[index][criterium=all]
>> \stoptext
> bad MWE ... took me more time to se that \Idx was not used than this:

Ouch, sorry! That means I didn’t even check if that mode existed before; I also 
swapped the if/else brackets.


> \appendtoks
>\setsystemmode\currentnote
> \to \everysynchronizenote
> 
> can you check if that works ok?

Yes, that works. Thank you very much!

i.e. MWE =

\setupinteraction[state=start]
\defineprocessor[kursiv][style=italicface]

\define[1]\Idx{\doifmodeelse{*footnote}{\index[kursiv->]{kursiv->#1}}{\index{#1}}#1}

\appendtoks
   \setsystemmode\currentnote
\to \everysynchronizenote

\starttext

Text

---
\index[C]{A}{B}\footnote{Inside\Idx{FN}}\Idx{BF}
---

\placeregister[index][criterium=all]

\stoptext



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
___


[NTG-context] check if inside footnote

2020-08-04 Thread Henning Hraban Ramm
Hi, me again...

Is there a check if a macro is called from inside of a footnote, like a system 
mode *footnote?
(Same with captions?)

In my current project, index entries should get italic page numbers if they 
occurr inside of a footnote (or a caption, but that is rare).
I’m using different shortcuts for both cases (that call \index with or without 
processor), but some paragraphs are very confusing (many long footnotes, or 
footnotes within footnotes), and I could avoid manually analyzing the structure 
if my macro could determine on its own if it’s called from a footnote.

Not-working example:


\setupinteraction[state=start]
\defineprocessor[kursiv][style=italicface]

\define[1]\Idx{\doifmodeelse{*footnote}{\index{#1}}{\index[kursiv->]{kursiv->#1}}#1}

\starttext

Text

---
\index[C]{A}{B}\footnote{Inside\index{FN}}\index{BF}
---

\placeregister[index][criterium=all]

\stoptext


This also shows the text-running-into-footnotes problem with both of my ConTeXt 
versions:
ConTeXt  ver: 2020.01.30 14:13 MKIV beta  fmt: 2020.4.12
ConTeXt  ver: 2020.07.27 16:30 LMTX  fmt: 2020.7.28


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] limit of index entries?

2020-08-02 Thread Henning Hraban Ramm

> Am 02.08.2020 um 10:18 schrieb Hans Hagen :
> 
> On 8/1/2020 6:08 PM, Henning Hraban Ramm wrote:
>>> Am 01.08.2020 um 14:10 schrieb Hans Hagen :
>>> 
>>> On 8/1/2020 1:54 PM, Henning Hraban Ramm wrote:
>>>> Hi,
>>>> my aforementioned person index has more than 600 entries. If I get over 
>>>> ~500, ConTeXt (MkIV, several versions) breaks with
>>>> ! error (push_node): stack overflow
>>>> mtx-context | fatal error: return code: 256
>>>> Is there a hard limit? Can I change it?
>>> it might relate to protrusion (which needs to enter nested boxes to 
>>> determine an edge) but how that then can relate to the number of entries 
>>> puzzles me, unless we pop too less ... in which case i need to trace (with 
>>> a mwe)
>> I can’t reproduce it with a simple example like
>> \setupalign[hanging]
>> \starttext
>> \placeregister[index][criterium=all]
>> \dorecurse{1}{\par\strut\index{Test\recurselevel}}
>> \stoptext
>> \recurselevel is empty in that context, \expanded didn’t help, but I guess 
>> we need different entries.
>> Find attached the actual data, reduced to the minimum setup – the problem is 
>> indeed \setupalign[hanging].
>> I guess I can omit "hanging" for the index, but of course if would be nice 
>> if it would work.
> it has to do with how you do that index:
> 
> - you do a lot of \index but you do that in vmode
> - do, they get collected for the next paragraph
> - that is done in a robust way which involves packing
> - eventually you flush with a \strut
> - so we get deeply nested boxes
> - and that means trouble for protrusion pre-analysis
> 
> now, I can try to avoid it but we then can have side effects but we'll see
> 
> can you try to avoid collecting:
> 
> \leavevmode
> \index{...}%
> 
> make sure no spaces get introduced

Ah, yes, that works.
So it won’t be a problem in the completed book – the big list of entries is 
just all the names the author wants indexed and I’ll delete it as soon as the 
index entries are in the text where they belong.

Thank you very much!

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] margin notes (was: lmtx update)

2020-08-01 Thread Henning Hraban Ramm

> Am 01.08.2020 um 22:36 schrieb Otared Kavian :
> 
> Hi Hraban,
> 
> Thank you for taking the time to send your code for sidenotes.
> Unfortunately when I add
> 
> \starttext
> test\footnote{A footnote in the margin.}
> \stoptext
> 
> to your code, I get an error and unfortunately with recent versions of LMTX 
> the error message 
> !  Undefined control sequence
> is not helpful to find the error… (LMTX considers \footnote as an undefined 
> control sequence…).
> 

Of course it’s not \footnote that is undefined but something else from my code 
– I didn’t take the time to strip it of all the references to other setups in 
the same environment, probably \ColWidth that was just a shortcut for the 
column width:
\def\ColWidth{57mm}

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] consistent index entries

2020-08-01 Thread Henning Hraban Ramm

> Am 01.08.2020 um 22:44 schrieb Wolfgang Schuster 
> :
>>> \define[1]\Ort{\expanded{\index{...}}}
>> Ah, I never know where to expand (tried \expanded\ctxlua).
> 
> \expanded needs a argument, i.e. \expanded{...}

I recognized it doesn’t work otherwise. But I thought TeX would always use the 
next token? Isn’t a command (or its result?) such a token?

>>> When you use formatting commands etc. you have to use the optional argument 
>>> for sorting.
>> I don’t understand.
>> \Ort[kursiv->]{Hamburg} works.
> 
> You mentioned only \index{\emph{...}} in your mail ...

I tried to simplify and couldn’t remember which command I needed when I had the 
\index{\something} problem (probably something similar, i.e. a self defined 
command that changed the text of the index entry). 

>>>  begin tex example
>> Oh, this is also nice. But isn’t the Lua version faster? (I have >600 person 
>> entries and a few hundred locations).
> 
> Hard to say without testing but the difference can be ignored because \index 
> itself is what take processing time.

Ok, thank 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
___


  1   2   3   4   5   6   7   8   9   10   >