[NTG-context] MP setup for a progress bar

2023-07-04 Thread Henning Hraban Ramm

Thanks to Taco, Robbert and Jules for their work!


I used the downtime to setup a presentation style with a progress bar in 
the footer. But I get the same (first page) graphics on all pages, and 
the footer background appears under the text area as well as under the 
margins.


* I thought \useMPgraphics would be enough to re-calculate on every page?
* How can I set a background to the footer area, but page width?
* I tried \overlaywidth as well as OverlayWidth in the MP graphic – how 
do I get the page size?


"""
\setuppapersize[SW]

\startuseMPgraphic{Blocks}
fill unitsquare xysized (800 * RealPageNumber/NOfPages, 50) withcolor blue;
\stopuseMPgraphic

\defineoverlay[Blocks][\useMPgraphic{Blocks}]

\setupbackgrounds[footer][background={Blocks}]

\starttext

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

[NTG-context] Re: MP setup for a progress bar

2023-07-05 Thread Henning Hraban Ramm

Am 04.07.23 um 22:53 schrieb Wolfgang Schuster:

Henning Hraban Ramm schrieb am 04.07.2023 um 22:24:


I used the downtime to setup a presentation style with a progress bar 
in the footer. But I get the same (first page) graphics on all pages, 
and the footer background appears under the text area as well as under 
the margins.


* I thought \useMPgraphics would be enough to re-calculate on every page?
* How can I set a background to the footer area, but page width?
* I tried \overlaywidth as well as OverlayWidth in the MP graphic – 
how do I get the page size?


You need \setupbackgrounds[state=repeat].


Thank you!
But \setupbackgrounds[footer][text][background=Blocks,state=repeat] 
doesn’t work.

Does this make sense if I don’t want layers in _all_ areas to repeat?


\setuppapersize[SW]

\startuseMPgraphic{Blocks}
fill unitsquare xysized (OverlayWidth * PageNumber / LastPageNumber, 
OverlayHeight) withcolor blue;


Thank you – so RealPageNumber/NOfPages was wrong? I got that from 
simpleslides.


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

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

[NTG-context] Re: {\rm foo {\it bar}}

2023-07-05 Thread Henning Hraban Ramm

Am 05.07.23 um 07:57 schrieb Gerben Wierda:

And the reason probably is that the font is defined as sans serif [ss]?


Well, if you only define a sans font, \rm is somewhat undefined.

You call the upright variant with \tf; \rm switches to the serif font.

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

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


Re: [NTG-context] lmtx & lohit-devanagari fonts

2020-04-22 Thread Henning Hraban Ramm

> Am 22.04.2020 um 15:19 schrieb Hans Hagen :
> 
> On 4/22/2020 8:16 AM, Henning Hraban Ramm wrote:
>>> Am 21.04.2020 um 15:32 schrieb Wolfgang Schuster 
>>> :
>>> 
>>> You have to set a font which has the required glyphs but you can also use 
>>> different fonts for both scripts and combine them.
>>> 
>>> \definefallbackfamily [mainface] [ss] [Noto Sans Devanagari]
>>>  [range={devanagari,devanagariextended},
>>>   features=devanagari-two]
>> Does that mean that indic scripts/languages are now fully supported? (Or 
>> maybe just scripts, not languages? Do Hindi or Urdu need hyphenation 
>> patterns?) I remember this was an open issue.
> I'm not sure what you mean. Devanagari is the main category that determines 
> the kind of processing. Different languages have different details. So, 
> already for many years there is support for a bunch of these languages and 
> some time ago a few more were added.
> 
> This is something that Kai Eigner and I work ok occasionally and Kai did most 
> of the logic, looking at what uniscribe does. He does high quality 
> typesetting jobs so you can bet that it works (or worked) for the 
> scripts/language combinations that he's familiar with.

Thank you, also Arthur!

Sometimes I have leftovers of MkII (or the MkII to IV transition) on my mind, 
like there are in the wiki.

So I can gladly remove all hints to ConTeXt limitations WRT indic 
scripts/languages.

Is there a list of supported languages in the sources? I checked only 
hyphenation patters some time ago.

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] Indic scripts/languages (was: lmtx & lohit-devanagari fonts)

2020-04-23 Thread Henning Hraban Ramm

> Am 22.04.2020 um 11:49 schrieb Arthur Reutenauer 
> :
> 
> On Wed, Apr 22, 2020 at 08:16:32AM +0200, Henning Hraban Ramm wrote:
>> Does that mean that indic scripts/languages are now fully supported? (Or 
>> maybe just scripts, not languages?
> 
>  Devanagari support was added a while ago.  The layout engine was
> according to reports working for at least one other Indic script
> (Bengali, I think), but not for others (Oriya?  Can’t remember).  I
> wouldn’t expect a renderer for Devanagari to do a very good job on Tamil
> or Malayalam, for example.
> 
>> Do Hindi or Urdu need hyphenation patterns?)
> 
>  Hindi uses hyphenation, Urdu doesn’t.  We have patterns for Hindi in
> TeX-Hyphen: 
> https://github.com/hyphenation/tex-hyphen/tree/master/hyph-utf8/tex/generic/hyph-utf8/patterns/tex/hyph-hi.tex

Thank you!

In scripts/context/lua/mtx-patterns.lua Hindi and several other languages are 
commented, what does that mean?

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] Basic font question

2020-04-23 Thread Henning Hraban Ramm

> Am 23.04.2020 um 16:22 schrieb Gerben Wierda :
> 
> 
> 
>> On 23 Apr 2020, at 16:16, Vladimir Lomov  wrote:
>> 
>> Hello,
>> ** Gerben Wierda  [2020-04-23 16:00:34 +0200]:
>> 
>>> On my Mac, I am trying:
>> 
>>> \definefontfamily[mainface][rm][Optima]
>>> \setupbodyfont[mainface,10pt]
>> 
>>> {\bf Bold} and {\it Italic} and {\rm Regular} text.
>> 
>> https://wiki.contextgarden.net/Font_Switching
>> 
>>> What do I need to do to get actual bold and italics in my output?
>> 
>> \bi == \bf\it
>> 
>> Or by "actual bold" you mean something different?
> 
> Yes, in my output everything is regular, there is no bold or italics text, 
> even when I use \bf or \it

What do you get from
mtxrun --script=fonts --list --all --pattern=Optima
?

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] Basic font question

2020-04-23 Thread Henning Hraban Ramm

> Am 23.04.2020 um 16:42 schrieb Gerben Wierda :
> 
>> 
>> On 23 Apr 2020, at 16:34, Henning Hraban Ramm  wrote:
>> 
>>> 
>>> Am 23.04.2020 um 16:22 schrieb Gerben Wierda :
>>> 
>>> 
>>> 
>>>> On 23 Apr 2020, at 16:16, Vladimir Lomov  wrote:
>>>> 
>>>> Hello,
>>>> ** Gerben Wierda  [2020-04-23 16:00:34 +0200]:
>>>> 
>>>>> On my Mac, I am trying:
>>>> 
>>>>> \definefontfamily[mainface][rm][Optima]
>>>>> \setupbodyfont[mainface,10pt]
>>>> 
>>>>> {\bf Bold} and {\it Italic} and {\rm Regular} text.
>>>> 
>>>> https://wiki.contextgarden.net/Font_Switching
>>>> 
>>>>> What do I need to do to get actual bold and italics in my output?
>>>> 
>>>> \bi == \bf\it
>>>> 
>>>> Or by "actual bold" you mean something different?
>>> 
>>> Yes, in my output everything is regular, there is no bold or italics text, 
>>> even when I use \bf or \it
>> 
>> What do you get from
>> mtxrun --script=fonts --list --all --pattern=Optima
> 
> hermione:Export and Metapost gerben$ mtxrun --script fonts --list --all 
> --pattern=optima
> identifier familyname   fontname   filename   
> subfont   instances
> 
> optimablackoptima   optimaextrablack   
> /System/Library/Fonts/Optima.ttc   5
> optimabold optima   optimabold 
> /System/Library/Fonts/Optima.ttc   2
> optimabolditalic   optima   optimabolditalic   
> /System/Library/Fonts/Optima.ttc   4
> optimaextrablack   optima   optimaextrablack   
> /System/Library/Fonts/Optima.ttc   5
> optimaitalic   optima   optimaitalic   
> /System/Library/Fonts/Optima.ttc   3
> optimanormal   optima   optimaregular  
> /System/Library/Fonts/Optima.ttc   1
> optimaregular  optima   optimaregular  
> /System/Library/Fonts/Optima.ttc   1

Hm. Here, ConTeXt only found subfont #5 until I rebuilt the font cache, then it 
looked like yours.

And the minimal example (plus \starttext ... \stoptext) worked.

(Latest ConTeXt on MacOS Mojave.)

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] useexternaldocument with custom file type

2020-04-23 Thread Henning Hraban Ramm

> Am 23.04.2020 um 16:36 schrieb Jan U. Hasecke :
> 
> Am 23.04.20 um 16:10 schrieb Vladimir Lomov:
>> Please see the page about '\goto' command, it was written for a reason!
> 
> Ok, with \goto{linkname}[program(target.doc)] it works.
> 
> "works" means some PDF Viewers opens the right program.


In the beginning, you could even start programs with program(...), but Adobe 
recognized soon this might be a security problem.

Nowadays, the “best” behaviour is when the viewer asks you if you really want 
to open such a link but then hands control to the OS.

Last time I checked, Adobe Reader even let you open hidden files from arbitrary 
paths.

Several other viewers just do nothing.

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] Basic font question (Optima, but no bold, no italics)

2020-04-23 Thread Henning Hraban Ramm


> Am 24.04.2020 um 02:10 schrieb Vladimir Lomov :
> 
> 
> I think Henning Hraban Ramm meant not OS font cache (but may be including it,
> I'm not a Mac OS user) but context font cache. Run
> 
> $ mtxrun --script fonts --reload --force
> 
> and try above '--list --all ...' command again

No, since all the subfonts were already found, that’s not the problem.


> and your example:
> 
>> \starttext
>> \definefontfamily[mainface][rm][Optima]
>> \setupbodyfont[mainface,10pt]
> 
>> {\bf Bold} and {\it Italic} and {\rm Regular} text.
>> \stoptext

The font definition belongs before \starttext. Good if it works...

But Gerben’s example was lacking \starttext .. \stoptext – didn’t try, but that 
might be the culprit.

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] Basic font question (Optima, but no bold, no italics)

2020-04-23 Thread Henning Hraban Ramm


> Am 24.04.2020 um 05:19 schrieb kaddour kardio :
> 
> It's noticed that Optima is a Sans Serif font.
> Maybe it conflicts with MacOS way to handle fonts. 

No, ConTeXt doesn’t care what kind of font you define as rm/ss/tt, and the OS 
has no say in that.

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] Basic font question (Optima, but no bold, no italics). Standalone ConTeXt does not work. TeX Live 2019 works

2020-04-24 Thread Henning Hraban Ramm


> Am 24.04.2020 um 08:48 schrieb Gerben Wierda :
> 
> Then I thought, let’s test some other things. I logged in as another user, 
> and used ConTeXt from TeX Live 2019:
> 
> 
> It seems to be that on my system, the standalone installed ConTeXt does not 
> work with Optima, but the TeX Live installed one does.

So what’s your ConTeXt version?

context --version
current version: 2020.01.30 14:13

luatex --version
This is LuaTeX, Version 1.11.1 (TeX Live 2020/dev)


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] Basic font question (Optima, but no bold, no italics). Standalone ConTeXt does not work. TeX Live 2019 works

2020-04-24 Thread Henning Hraban Ramm


> Am 24.04.2020 um 11:13 schrieb Benjamin Buchmuller 
> :
> 
> Although this specific issue might have been solved meanwhile by the helpful 
> suggestions of Wolfang, Thomas and others, I would like to point out that I 
> have recently also encountered an odd behaviour of the mtxrun fontloader in 
> the standalone, in which not all typefaces are available/properly identified.
> 
> (I’m sorry to hijack this thread if this is unrelated.)
> 
> Basically, when I load “Helvetica Neue”, I get instead of “regular/normal” 
> always “light/italic”.
> 
> I have switched to heros for the meantime, but potentially there is some bug 
> behind this. (My documents with the version from Dec/Jan worked fine.)
> 
> I recite my example from Wed:
> 
> ConTeXt  ver: 2020.01.30 14:13 MKIV beta  fmt: 2020.4.22 (LuaTeX 1.11.1)
> 
> and I’m running now into troubles with system font indexing:
> 
> mtxrun --script fonts --reload
> 
> locates fonts in macOS directories appropriately (*.afm fonts placed in 
> .../tex/texmf-fonts are not found, but at the moment I don’t care too much), 
> however it resolves only to a single font variant for *.ttc instead of all 
> variants:
> 
> mtxrun --script fonts --list --all --pattern=helvetica
> 
> helvetica helvetica
> helveticalightoblique /System/Library/Fonts/Helvetica.ttc 
>6
> helveticalightoblique helvetica
> helveticalightoblique /System/Library/Fonts/Helvetica.ttc 
>6
> helveticaneuedeskinterfaceheavy   helveticaneuedeskinterface   
> helveticaneuedeskinterfaceheavy   
> /System/Library/Fonts/HelveticaNeueDeskInterface.ttc   10
> helveticaneuethinitalic   helveticaneue
> helveticaneuethinitalic   /System/Library/Fonts/HelveticaNeue.ttc 
>14

If the subfont is not listed, ConTeXt/mtxrun couldn’t find it and won’t find it 
regardless of your setup.

Try
mtxrun --script fonts --reload --force
maybe even twice or thrice and check again.
(Unfortunately this is not reliable.)

I get the full list:

identifier   familyname   fontname  
 filename   
subfont   instances

helveticahelveticahelvetica 
 /System/Library/Fonts/Helvetica.ttc
1
helveticaneueblack   helveticaneue
helveticaneuecondensedblack
/System/Library/Fonts/HelveticaNeue.ttc10
helveticaneuedeskinterfaceextrabold  helveticaneuedeskinterface   
helveticaneuedeskinterfaceheavy
/System/Library/Fonts/HelveticaNeueDeskInterface.ttc   10
helveticaneuedeskinterfaceextralight helveticaneuedeskinterface   
helveticaneuedeskinterfacethin 
/System/Library/Fonts/HelveticaNeueDeskInterface.ttc   8
helveticaneuedeskinterfacemedium helveticaneuedeskinterface   
helveticaneuedeskinterfacemediump4 
/System/Library/Fonts/HelveticaNeueDeskInterface.ttc   5
helveticaneuedeskinterfacemediumitalic   helveticaneuedeskinterface   
helveticaneuedeskinterfacemediumitalicp4   
/System/Library/Fonts/HelveticaNeueDeskInterface.ttc   6
helveticaneuedeskinterfacenormal helveticaneuedeskinterface   
helveticaneuedeskinterfaceregular  
/System/Library/Fonts/HelveticaNeueDeskInterface.ttc   1
helveticaneueextralight  helveticaneue
helveticaneuethin  
/System/Library/Fonts/HelveticaNeue.ttc13
helveticaneuenormal  helveticaneue
helveticaneue  
/System/Library/Fonts/HelveticaNeue.ttc1
helveticaneueregular helveticaneue
helveticaneue  
/System/Library/Fonts/HelveticaNeue.ttc1
helveticanormal  helveticahelvetica 
 /System/Library/Fonts/Helvetica.ttc
1
helveticaregular helveticahelvetica 
 /System/Library/Fonts/Helvetica.ttc
1



> As a consequence, when I run
> 
> \definefontfamily[mainface][ss][Helvetica Neue]
> \setupbodyfont[mainface, 12pt, sans]
> 
> I get the light oblique variant instead of the regular one. I have tried to 
> fix this via a 
> 
> \definefontfamily[mainface][ss][Helvetica Neue][tf=style:normal]

tf=helveticaregular
should work.


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

Re: [NTG-context] Typesetting Markdown - Part 8

2020-04-28 Thread Henning Hraban Ramm


> Am 28.04.2020 um 08:32 schrieb Jan U. Hasecke :
> 
> 1. Nameing and organizing the project, product and environments files. I
> am currently reorganising the files for my cooperative. I think that
> besides some nameing conventions it is more or less up to me how I
> organise our print work. Any recommendations welcome.

Yes, the naming is completely up to you.

I use:

project_something.tex
env_something.tex
prd_oneissue.tex
c_onechapter.tex

That’s also what my script supports as default:
https://github.com/fiee/tools/blob/master/contextproject.py

Probably I should switch to .mkiv extensions, since I also have LaTeX projects 
now.


> 2. The "Deutsches Text Archiv" has prepared a text corpus of German
> texts up to 1900 in TEI PS XML, so we could use them directly to typeset
> books.
...
> The tokens/tags differ from text to text and I think the structure too
> so that it was beyond my knowledge to generate a general style file for
> all texts.

And it’s probably impossible. Like with HTML and ePub export, the mapping of 
structures is very individual.


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] contextproject script (was: Typesetting Markdown - Part 8)

2020-04-28 Thread Henning Hraban Ramm

> Am 28.04.2020 um 16:12 schrieb Jan-Erik Hägglöf :
> 
>> 28 apr. 2020 kl. 09:33 skrev Henning Hraban Ramm :
>> 
>> Yes, the naming is completely up to you.
>> 
>> I use:
>> 
>> project_something.tex
>> env_something.tex
>> prd_oneissue.tex
>> c_onechapter.tex
>> 
>> That’s also what my script supports as default:
>> https://github.com/fiee/tools/blob/master/contextproject.py

> Is there a running example ? I’m not sure how to fill in the commandline


1) Have a look at https://wiki.contextgarden.net/Project_structure

2) To avoid the whole name, I set:
alias mkprj='python3 ~/workspace/tools/contextproject.py'

3) 
$ mkprj --help
Usage: contextproject.py [options]
(env > prj > prd > cmp)
Provide all names without prefix and suffix!

ConTeXt project management  (c) 2009-2019 by Henning Hraban Ramm, fiëé
visuëlle

Options:
  --version show program's version number and exit
  -h, --helpshow this help message and exit
  -m FILETYPE, --mode=FILETYPE
create which type of file?
  -c NAME, --component=NAME, --cmp=NAME
create component file
  -p NAME, --product=NAME, --prd=NAME
create or set product file
  -j NAME, --project=NAME, --prj=NAME
create or set project file
  -e NAME, --environment=NAME, --env=NAME
create or set environment file
  -i FILENAME, --template=FILENAME, --ini=FILENAME
use non-default initial template file
  -d DIRNAME, --directory=DIRNAME, --dir=DIRNAME
project path
  -C DIRNAME, --component_directory=DIRNAME, --cmpdir=DIRNAME
path for component files below project path

4) Create files in the order environment, project, product, component(s)
i.e.
# Create empty environment (it lacks the project name; I do this manually, 
copying from another project):
$ mkprj -e something
# Create the project file:
$ mkprj -e something -j something
# Create a product and insert it in project:
$ mkprj -j something -p first
# Create a component dir for product "first" and add a component:
$ mkprj -j something -p first -C first -c author

If there’s a component.ini, product.ini etc. it will get used as a template for 
that level.

There are a few bugs in the output, e.g. in the first call you can’t set the 
project name, and in the second it won’t create an environment if it’s missing. 
If you leave out the project when you create a component, the name gets an 
additional prefix. -m is mostly useless, and I never use -d.
I should fix that, but these are just minor annoyances.

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] Typesetting Markdown - Part 8

2020-04-28 Thread Henning Hraban Ramm
Don’t forget, what’s already included in ConTeXt:

\usemodule[visual]
\useMPlibrary[dum]

\starttext
\simplethesis
\stoptext



> Am 28.04.2020 um 17:33 schrieb Thangalin :
> 
> Jan-Erik, after you have installed all the required software (and
> fonts!) and unzipped the book.zip and themes.zip archives, you can
> build a book using:
> 
> cd $HOME/dev/writing/book
> ./build -V -c -y -i jekyll-hyde -d standard-ebooks/jekyll-hyde \
> -b robert-louis-stevenson_the-strange-case-of-dr-jekyll-and-mr-hyde
> 
> This is noted at the bottom of the preamble section.
> 
> Enjoy!
> 
> On Tue, Apr 28, 2020 at 7:12 AM Jan-Erik Hägglöf
>  wrote:
>> 
>> Is there a running example ? I’m not sure how to fill in the commandline
>> 
>> 
>> 
>> 28 apr. 2020 kl. 09:33 skrev Henning Hraban Ramm :
>> 
>> Yes, the naming is completely up to you.
>> 
>> I use:
>> 
>> project_something.tex
>> env_something.tex
>> prd_oneissue.tex
>> c_onechapter.tex
>> 
>> That’s also what my script supports as default:
>> https://github.com/fiee/tools/blob/master/contextproject.py
>> 

___
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] contextproject script (was: Typesetting Markdown - Part 8)

2020-04-28 Thread Henning Hraban Ramm


> Am 28.04.2020 um 16:39 schrieb Henning Hraban Ramm :
> 
>>> https://github.com/fiee/tools/blob/master/contextproject.py
> 
> There are a few bugs in the output, e.g. in the first call you can’t set the 
> project name, and in the second it won’t create an environment if it’s 
> missing. If you leave out the project when you create a component, the name 
> gets an additional prefix.

Ok, new version: fixed the bugs, modernized the code and added a few more 
useless cryptic options for Thangalin.

Enjoy!
HR
___
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] Typesetting Markdown - Part 8

2020-04-28 Thread Henning Hraban Ramm
Sorry, I took your message for irony.
Should have read your blog posts to know better.

Hraban

> Am 28.04.2020 um 18:07 schrieb Henning Hraban Ramm :
> 
> Don’t forget, what’s already included in ConTeXt:
> 
> \usemodule[visual]
> \useMPlibrary[dum]
> 
> \starttext
> \simplethesis
> \stoptext
> 
> 
> 
>> Am 28.04.2020 um 17:33 schrieb Thangalin :
>> 
>> Jan-Erik, after you have installed all the required software (and
>> fonts!) and unzipped the book.zip and themes.zip archives, you can
>> build a book using:
>> 
>> cd $HOME/dev/writing/book
>> ./build -V -c -y -i jekyll-hyde -d standard-ebooks/jekyll-hyde \
>> -b robert-louis-stevenson_the-strange-case-of-dr-jekyll-and-mr-hyde
>> 
>> This is noted at the bottom of the preamble section.
>> 
>> Enjoy!
>> 
>> On Tue, Apr 28, 2020 at 7:12 AM Jan-Erik Hägglöf
>>  wrote:
>>> 
>>> Is there a running example ? I’m not sure how to fill in the commandline
>>> 
>>> 
>>> 
>>> 28 apr. 2020 kl. 09:33 skrev Henning Hraban Ramm :
>>> 
>>> Yes, the naming is completely up to you.
>>> 
>>> I use:
>>> 
>>> project_something.tex
>>> env_something.tex
>>> prd_oneissue.tex
>>> c_onechapter.tex
>>> 
>>> That’s also what my script supports as default:
>>> https://github.com/fiee/tools/blob/master/contextproject.py
>>> 
> 
> ___
> 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] image across 2 page spread

2020-04-30 Thread Henning Hraban Ramm


> Am 30.04.2020 um 02:05 schrieb jbf :
> 
> Hi list,
> 
> With 99% of work complete on a book, including single page images, I now find 
> myself confronted with a final problem: how to run one image across facing 
> pages or in other words, one image (plus its caption) across a two-page 
> spread, such that there is no gap.

You need to use \clip and calculate the sections.
Thangalin already gave you an example. Here’s a convoluted one that I use:

% full double page image
% usage:
% \startpostponing[pagenumber]
% \doublepagefig[reference][left/right/width/height*]{caption}{filename}
% \stoppostponing
% * lw,lh,rw,rh - place as left/right page, adapt image to width/height
% default is lw
% postponing is important, otherwise the page numbering gets wrong

\newdimen\Bleed
\newdimen\maxWidth
\newdimen\maxHeight
\newdimen\doubleWidth
\newdimen\topOffset
\newdimen\bottomOffset

\Bleed=3mm
\setupbleeding[offset=\Bleed]
\maxWidth=\dimexpr\paperwidth + \Bleed\relax
\maxHeight=\dimexpr\paperheight + 2\Bleed\relax
\doubleWidth=\dimexpr2\maxWidth\relax
\topOffset=\dimexpr\topspace + \headerheight + \Bleed\relax
\bottomOffset=\dimexpr\bottomheight + \footerheight + \Bleed\relax

\definelayer[bgpicleft][x=-\Bleed,y=-\Bleed,width=\maxWidth,height=\maxHeight] 
% inkl. Beschnitt
\definelayer[bgpicright][x=0mm,y=-\Bleed,width=\maxWidth,height=\maxHeight] % 
inkl. Beschnitt

\definemakeup[fullpage][
  page=no,
  doublesided=no,
  headerstate=empty,
  footerstate=empty,
  pagestate=start,
]

\def\doublepagefig{\dodoubleempty\doDoublePagefig}
\def\doDoublePagefig[#1][#2]#3#4{
\startfullpagemakeup
\setlayer[bgpicleft]{\textreference[#1]{}%
\clip[
hoffset=0mm, voffset=0mm,
width=\maxWidth,
height=\maxHeight,
]{%
\doifinstringelse{h}{#2}{%
\externalfigure[#4][height=\maxHeight]%
}{%
\externalfigure[#4][width=\doubleWidth]%
}%
}%
}
% set caption into footer (left page)
  \doiftext{#3}{\doifinstring{l}{#2}{%
\setlayer[bgpicleft][
  x=\backspace,
  y=\dimexpr\makeupheight + \footerheight\relax,
]{%
  \doifmodeelse{blackcaption}{%
\tfx\vbox{#3}%
  }{%
\inframed[
frame=off,background=shadow,
foregroundcolor=captioncolor,]{%
  \bfx{#3}%\vbox{#3}%
}%
  }%
}%
}}
% debugging information
\setlayer[bgpicleft][x=0mm,y=-\Bleed]{%
\color[debugcolor]{~\tt\bfx #1 / #2 / #4}
}
\stopfullpagemakeup
\startfullpagemakeup
\setlayer[bgpicright]{%
\clip[
hoffset=\maxWidth,
voffset=0mm,
width=\maxWidth,
height=\maxHeight,
]{%
\doifinstringelse{h}{#2}{%
\externalfigure[#4][height=\maxHeight]%
}{%
\externalfigure[#4][width=\doubleWidth]%
}%
}%
}
% set caption into footer (right page)
  \doiftext{#3}{\doifinstring{r}{#2}{%
\setlayer[bgpicright][
  x=\backspace,
  y=\dimexpr\makeupheight + \footerheight\relax,
]{%
  \doifmodeelse{blackcaption}{%
\tfx\vbox{#3}%
  }{%
\inframed[
  frame=off,background=shadow,foregroundcolor=captioncolor]{%
  \bfx{#3}%\vbox{#3}%
}%
  }%
}%
}}%
% debugging information
\setlayer[bgpicright][x=0mm,y=-\Bleed]{%
\color[captioncolor]{~\tt\bfx #1 / #2 / #4}
}
\stopfullpagemakeup
} % doublepagefig


You can see the outcome here:
https://www.dreiviertelhaus.de/architekturfuehrer/hicog/


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] Project setup query

2020-04-30 Thread Henning Hraban Ramm
Hi Alan!

> Am 30.04.2020 um 15:07 schrieb Alan Bowen :
> 
> Is there a way to identify the TEX root for each of the common files (in 
> Directory02) so that
> the file will be processed when I process any one of the prd files in 
> Directory01?
> 
> I have tried 
> % !TEX root=../prd_\mystring.tex

Processing single components won’t work in your project, since I defined 
several metadata macros in the product. More off list.

> with, e.g., \def\mystring{Name01} in the prd_Name01.tex file, but that does 
> not seem to work—the various .tex files re not found.

Comment lines are not handled by TeX, and therefore don’t get expanded.


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] How do I get an empty line in a \framed[align=flushleft]{} item?

2020-04-30 Thread Henning Hraban Ramm


> Am 30.04.2020 um 22:47 schrieb Gerben Wierda :
> 
> In normal TeX, when I type 
> 
> AapAap
> 
> I get something like 
> 
> Aap
> 
> Aap
> 
> But inside a \framed[align=]{} the empty line disappears. How do I get it 
> back?

Try \framedtext instead; multi line text needs a \vbox, and \framedtext does 
that. (If I understood correctly.)

Maybe you need to set the align option.

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] followtext, lmt_followtext and an offset of the glyphs typeset along the path

2020-05-01 Thread Henning Hraban Ramm


> Am 01.05.2020 um 10:26 schrieb Gerben Wierda :
> 
> I have been looking at lmt_followtext and followtext to get typesetting done 
> along a path. That works fine, except that in my case, I need the text to not 
> be exactly on that path, I need it to hover slightly above tor below he path. 
> Given that the path may have an unpredictable form, that means that all the 
> glyphs need to be shifted a bit, there is no generic transfrom of the entire 
> text string that will work,

Can’t you duplicate and shift the path, i.e. keep the original visible and make 
the copy that carries the text invisible? That’s what I would do in a graphical 
application, but I would be surprised if MP wouldn’t know a transformation for 
this purpose.

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] [ibmplex setup script]

2020-05-03 Thread Henning Hraban Ramm

> Am 03.05.2020 um 13:36 schrieb Floris van Manen :
> 
> Hello Wolfgang,
> 
> 
> On 03-05-2020 10:49, Wolfgang Schuster wrote:
>> % Load IBM Plex with the regular width
>> 
>> % \setupbodyfont[ibmplex]
>> 
>> % Load IBM Plex with the thin width
>> 
>> %\setupbodyfont[ibmplex-thin]
> 
> 
> A quick follow-up question.
> 
> Apparently the thin/bold/italics combination does not work.
> I assume this is defined in a ibmplex-thin  file somwhere.
> If so, where is that file located?
> What is the formula to derive ibmplex-thin from the underlying font files?

If you can’t handle find | grep, you can use the source browser:

https://source.contextgarden.net/?search=ibmplex-thin

and you’ll find type-imp-plex.mkiv:

https://source.contextgarden.net/tex/context/fonts/mkiv/type-imp-plex.mkiv?search=ibmplex-thin

in there are the typescripts for all the weights.

And there’s actually a bug in the setup for light-bolditalic:


\edefinefontsynonym [\typescriptprefix{\typescriptone}\s!Bold]   
[\s!file:\typescriptprefix{n:plex\typescriptone}-light]  
[\s!features=\typescriptprefix{f:plex\typescriptone}]

\edefinefontsynonym [\typescriptprefix{\typescriptone}\s!BoldItalic] 
[\s!file:\typescriptprefix{n:plex\typescriptone}-light]  
[\s!features=\typescriptprefix{f:plex\typescriptone}]

That should be -lightitalic


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] How do I add cyrillic to my typescript/document?

2020-05-03 Thread Henning Hraban Ramm


> Am 04.05.2020 um 00:36 schrieb Gerben Wierda :
> 
> 
> \starttypescript [sans] [optima]
>\setups[font:fallback:sans]
>\definefontsynonym [Sans]   [file:Optima.ttc(Optima Regular)] 
> [features=default]
>\definefontsynonym [SansBold]   [file:Optima.ttc(Optima Bold)]
> [features=default]
>\definefontsynonym [SansItalic] [file:Optima.ttc(Optima Italic)]  
> [features=default]
>\definefontsynonym [SansBoldItalic] [file:Optima.ttc(Optima Bold Italic)] 
> [features=default]
> \stoptypescript
> 
> \definetypeface [optima] [ss] [sans] [optima] [default]
> \definetypeface [optima] [rm] [serif] [optima] [default]
> \definetypeface [optima] [tt] [mono] [modern] [default]
> \definetypeface [optima] [mm] [math] [pagella] [default]
> 
>   \definefallbackfamily
> [optima]
> [ss]
> [file:Helvetica.ttc]
> [preset=range:cyrillic,
> force=yes]
> 
> \setupbodyfont [optima]
> 
> The error is:
> 
> fonts   > typescripts > unknown library 'optima'

This is about \definetypeface [optima] [rm] [serif] [optima] [default], because 
you only defined [sans][optima].


> open source > level 3, order 6, name 
> '/usr/local/context-osx-64/tex/texmf-context/tex/context/fonts/mkiv/type-imp-texgyre.mkiv'
> close source> level 3, order 6, name 
> '/usr/local/context-osx-64/tex/texmf-context/tex/context/fonts/mkiv/type-imp-texgyre.mkiv'
> selectfont  > the requested fallback font 'file:Helvetica.ttc' for 
> typeface 'optima' style 'ss' was ignored because no files where found.

The fallback font for cyrillic, Helvetica.ttc, is not found. No problem with 
Optima reported.


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] long caption in 2-page spread

2020-05-04 Thread Henning Hraban Ramm

> Am 05.05.2020 um 03:31 schrieb jbf :
> 
> The following excellent solution (see below) to a 2-page spread of an image 
> was given me by Hans (I had been completely unaware of the command 
> \startspread. It appears to be recent and undocumented, but it certainly 
> simplifies matters).
> 
> But in my case the title is a lengthy sentence, rather than the 4-word 'This 
> is a cow'. And even though I have been able to split the line, e.g. 
> title={this is my very, very, very,\\ very etc. etc. long title}, what 
> happens is that part of the caption still appears on the right-hand page of 
> the spread.
> 
> Is there a way that I can limit the appearance of the caption to just one 
> (the left-hand) page? In other words, so the figure is spread but not the 
> caption? Or alternatively, have the caption neatly split across the two pages 
> with appropriate space inbetween? I tried various combinations, including an 
> \hfill halfway through the title, but to no avail. Perhaps this is asking too 
> much, but there may be a workaround.

I guess you need something like

title={\hbox to \textwidth{\vbox{Your lengthy caption}}}

or

title={\framedtext[width=\textwidth,frame=off,align=right]{Your lengthy 
caption}}


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] Definition of \registerpagerange

2020-05-05 Thread Henning Hraban Ramm


> Am 05.05.2020 um 10:35 schrieb Hynek, Stefan :
> 
> Hello fellow ConTeXies, 
> 
> since April 2019 it is possible to use \setupregister with
> compress=text which is a fine addition and has its use cases.
> Unfortunately, I am confronted with the demand to style the registers
> with 'f.' for a following single page and else with page ranges. Since
> the Definition of \registerpagerange is not well documented I don't
> know which parameter to check for the conditional statement when
> rewriting it. Could you please give me a hint? 


This doesn’t answer your question, but I found:

\setupregister[index][compress=yes] % 14, 15 becomes 14-15
\setupregister[index][compress=text] % 14, 15 becomes 14f.

To change the "f."/"ff." text, you’d use:

\setuplabeltext[de][following:singular=sq.,following:plural=sqq.]

This is defined in tex/context/base/mkiv/lang-txt.lua
and addressed in context/base/mkiv/strc-reg.mkiv in the definition of 
\registerpagerange:

\unexpanded\def\registerpagerange#1#2#3#4#5#6#7#8% #1:class #2:processor  
content, content todo: -- configurable
  {\pushcurrentregister{#1}%
   \edef\p_pagenumber{\registerparameter\c!pagenumber}%
   \ifx\p_pagenumber\v!no\else
 \registerpageseparator
 \global\setconstant\c_strc_registers_page_state\plusone
 \dostarttagged\t!registerpagerange\empty
 \dostarttagged\t!registerfrompage\empty
 \withregisterpagecommand{#2}{#3}{#4}{#5}%
 \dostoptagged
 \ifconditional\c_strc_registers_following
   \ifnum#3=\numexpr#6-1\relax
 \labeltext{following:\s!singular}%
   \else
 \labeltext{following:\s!plural}%
   \fi
\else
   \registeronepagerangeseparator
   \dostarttagged\t!registertopage\empty
   \withregisterpagecommand{#2}{#6}{#7}{#8}%
 \fi
 \dostoptagged
 \dostoptagged
   \fi
   \popcurrentregister}

(see 
https://source.contextgarden.net/tex/context/base/mkiv/strc-reg.mkiv?search=singular)


You should be able to combine the two "else" branches.

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] Retrieving original value of enviroment variable HOME

2020-05-11 Thread Henning Hraban Ramm

> Am 11.05.2020 um 12:50 schrieb cont...@vivaldi.net:
> 
> - is "--context=beta" OK here?

Try --context=current

HR
___
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] Retrieving original value of enviroment variable HOME

2020-05-11 Thread Henning Hraban Ramm


> Am 11.05.2020 um 12:54 schrieb Henning Hraban Ramm :
> 
> 
>> Am 11.05.2020 um 12:50 schrieb cont...@vivaldi.net:
>> 
>> - is "--context=beta" OK here?
> 
> Try --context=current

Sorry, of course "latest", as Marco wrote, I mixed that up.

HR
___
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 list layout with PDF bookmarks

2020-05-15 Thread Henning Hraban Ramm

> Am 16.05.2020 um 00:47 schrieb Bruce Horrocks :
> 
> When I customise the table of contents layout I lose the automatic 
> hyperlinks. Is there a simple configuration option that I have missed or do I 
> need to create my own links somehow?
> 
> Example:
> 
> \setupinteraction[state=start]
> \setupinteractionscreen[option=bookmark] 
> 
> \define[3]\SectionListEntry
>  {\par \leftaligned\bgroup
> \hbox to 2em{#3}%
> \hskip   1em
> \vtop{\hsize\dimexpr\textwidth-3em\relax#2}
>  \egroup \par}
> 
> % Comment out this next line to regain section hyperlinks in the ToC
> \setuplist[section][alternative=command,command=\SectionListEntry]
> 
> \starttext
> Table of Contents
> \placecontent[criterium=all]
> \placebookmarks[chapter,subject]

Should be \placebookmarks[chapter,section]. Move it in front of \starttext.

But that still doesn’t set chapter bookmarks - strange.


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 list layout with PDF bookmarks

2020-05-16 Thread Henning Hraban Ramm

> Am 16.05.2020 um 08:30 schrieb Wolfgang Schuster 
> :
> 
> Bruce Horrocks schrieb am 16.05.2020 um 00:47:
>> When I customise the table of contents layout I lose the automatic 
>> hyperlinks. Is there a simple configuration option that I have missed or do 
>> I need to create my own links somehow?
>> 
>> Example:
>> 
>> \setupinteraction[state=start]
>> \setupinteractionscreen[option=bookmark]
>> 
>> \define[3]\SectionListEntry
>>   {\par \leftaligned\bgroup
>>  \hbox to 2em{#3}%
>>  \hskip   1em
>>  \vtop{\hsize\dimexpr\textwidth-3em\relax#2}
>>   \egroup \par}
>> 
>> % Comment out this next line to regain section hyperlinks in the ToC
>> \setuplist[section][alternative=command,command=\SectionListEntry]
> 
> alternative=command : Cutsom TOC without hyperlinks
> 
> alternative=interactive : Custom TOC with hyperlinks

Thank you! Wikified: https://wiki.contextgarden.net/Command/setuplist

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 list layout with PDF bookmarks

2020-05-17 Thread Henning Hraban Ramm

> Am 17.05.2020 um 13:38 schrieb Bruce Horrocks :
> 
> 
>> On 16 May 2020, at 12:02, Henning Hraban Ramm  wrote:
>> 
>>> 
>>> Am 16.05.2020 um 08:30 schrieb Wolfgang Schuster 
>>> :
>>> 
>>> Bruce Horrocks schrieb am 16.05.2020 um 00:47:
>>>> When I customise the table of contents layout I lose the automatic 
>>>> hyperlinks. Is there a simple configuration option that I have missed or 
>>>> do I need to create my own links somehow?
> [snip]
>>> alternative=command : Cutsom TOC without hyperlinks
>>> 
>>> alternative=interactive : Custom TOC with hyperlinks
>> 
>> Thank you! Wikified: https://wiki.contextgarden.net/Command/setuplist
> 
> Thank-you Wolfgang for the quick reply and also Hraban for beating me to it 
> on the Wiki - I was going to (honest!)

I was interested in the subject anyway and used the opportunity to add a 
section about list alternatives to my ConTeXt book (now at 260 pages, and still 
no end in sight).

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] two superscript versions with Garamond Libre

2020-05-18 Thread Henning Hraban Ramm


> Am 18.05.2020 um 17:18 schrieb Pablo Rodriguez :
> 
> Typeface is available at
> https://github.com/dbenjaminmiller/garamond-libre/releases/latest.

Thank you for the hint, I’m always looking for interesting fonts.
This is a nicely designed classical Garamond with a big glyph repertoire 
(Latin, poly Greek, Cyrillic, Byzantine/Greek music symbols, math and other 
symbols), but after first tests I found flaws:
– Numbers are a bit too dark; table numbers look a bit too big, oldstyle 
numbers a bit too small.
– Small caps are lacking accented vowels including umlauts.
– Cyrillic is missing Kyrgyz/Kazakh letters (i.e. Cyrillic extended).
– Kerning is not yet perfect.
– Accents sit a bit too close on the letters.
– Swash capitals don’t fit the style at all, they look like some modern hand 
font like Lucida Handwriting.

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] two superscript versions with Garamond Libre

2020-05-18 Thread Henning Hraban Ramm

> Am 19.05.2020 um 08:08 schrieb Jan U. Hasecke :
> 
> Am 18.05.20 um 22:23 schrieb Henning Hraban Ramm:
>> 
>> 
>>> Am 18.05.2020 um 17:18 schrieb Pablo Rodriguez :
>>> 
>>> Typeface is available at
>>> https://github.com/dbenjaminmiller/garamond-libre/releases/latest.
>> 
>> Thank you for the hint, I’m always looking for interesting fonts.
>> This is a nicely designed classical Garamond with a big glyph repertoire 
>> (Latin, poly Greek, Cyrillic, Byzantine/Greek music symbols, math and other 
>> symbols), but after first tests I found flaws:
>> – Numbers are a bit too dark; table numbers look a bit too big, oldstyle 
>> numbers a bit too small.
>> – Small caps are lacking accented vowels including umlauts.
>> – Cyrillic is missing Kyrgyz/Kazakh letters (i.e. Cyrillic extended).
>> – Kerning is not yet perfect.
>> – Accents sit a bit too close on the letters.
>> – Swash capitals don’t fit the style at all, they look like some modern hand 
>> font like Lucida Handwriting.
> 
> Thanks a lot for your insights.
> 
> From the repo I guess that this is a quite new project; you could post
> bug reports.

That’s what I did. WRT swash capitals, the author told me:

\startquotation
I adopted this font, as a fork from an upstream which is no longer published 
under a libre license. Then I did make some slight extensions. But I didn't 
choose this. Right now, I am working on a new font, Salieri, which I hope will 
be of better quality once it is finished, and which, if it ever gets swash 
capitals, will get them according to some historically-rooted standard, most 
likely, though we are nowhere near that.
\stopquotation

I read this as “better don’t expect me to enhance anything substantial“.

HR
___
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] output file name query

2020-05-22 Thread Henning Hraban Ramm

> Am 22.05.2020 um 15:09 schrieb Wolfgang Schuster 
> :
> 
> Alan Bowen schrieb am 22.05.2020 um 14:33:
>> In my project, I process a single product file by enabling various modes. 
>> What I would like to do is to vary the name of the output PDF file in each 
>> instance.
>> So, in processing a file, how does one go directly from prd_filename.tex to 
>> myfilename.pdf rather than to prd_filename.pdf—assuming that it is possible?
>> Any tips or pointers to what I should be reading will be greatly appreciated.
> 
> 1. Drop the weird (sorry Hraban) naming system and use myfilename for your 
> product.

I force nobody to use that.

> 2. Use the result option on the command line, e.g. "context 
> --result=myfilename prd_filename.tex".

But that still produces a "prd_filename.*" first and then renames it, making it 
impossible to keep a "prd_filename.pdf". Or did that change recently?

My workflows are adapted to that behaviour: "prd_*.pdf" is just the temporary 
version, none of those leaves my computer, but only nicely named PDFs (usually 
MyProductName_-mm-dd.pdf).

> 3. Ask Hans to add the result option to the first line of the document which 
> is read by the context script before it creates the PDF.
> 
> % result="myfilename"
> \starttext
> ...
> \stoptext

That contradicts the mode approach. It would be nice if we could set (or can 
we?) the result from within the product, depending on a mode – since the 
product is renamed only later anyway, that could be viable.

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] output file name query

2020-05-23 Thread Henning Hraban Ramm

> Am 23.05.2020 um 14:43 schrieb Wolfgang Schuster 
> :
> 
>>> 1. Drop the weird (sorry Hraban) naming system and use myfilename for your 
>>> product.
>> I force nobody to use that.
> No and everybody has to find a system which fits best for him, prefixes can 
> be useful (e.g. to avoid component and style files with the same name) but 
> aren't necessary.

Usually my project and environment have the same name, but different prefix (in 
my weird nomenclature).

>>> 2. Use the result option on the command line, e.g. "context 
>>> --result=myfilename prd_filename.tex".
>> But that still produces a "prd_filename.*" first and then renames it, making 
>> it impossible to keep a "prd_filename.pdf". Or did that change recently?
>> 
>> My workflows are adapted to that behaviour: "prd_*.pdf" is just the 
>> temporary version, none of those leaves my computer, but only nicely named 
>> PDFs (usually MyProductName_-mm-dd.pdf).
> Having a simple name doesn't mean it's the final name of the document.

Of course. But in most of my projects I have several products (e.g. magazine 
issues, books of a series), and with a prefix I can keep all the products 
together and list them like `ls prd_*.tex`.
Not only my contextproject.py but also my call scripts relay on my naming 
scheme. And since I use it in my main projects, I use it everywhere (if I use 
the project structure at all).

>> That contradicts the mode approach. It would be nice if we could set (or can 
>> we?) the result from within the product, depending on a mode – since the 
>> product is renamed only later anyway, that could be viable.
> This addition is easy because already reads the first line of the document 
> for special setting (e.g. the engine) but anything which is set in the 
> document requires more work because you don't know the new name *before* 
> LuaTeX or LuaMetaTeX create the PDF.

You don’t need to know the name before ConTeXt creates the PDF, because it uses 
the original filename and only renames the files (pdf, tuc, log) afterwards. Or 
misunderstood I something?

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] Wiki - Proposal to update the Welcome page

2020-05-24 Thread Henning Hraban Ramm


> Am 24.05.2020 um 04:06 schrieb Aditya Mahajan :
> 
> I am okay with changing the main page as well. But since this is the main 
> page, let's wait for the other mods to chime in as well.

Am I a mod? Just a frequent contributor, I guess...

I like the new main page, it looks very friendly. Myself I never look a lot at 
the main page but use the search or type the URL directly, since I usually know 
what I’m looking for...

Thanks for the efforts 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] [pretty printing python]

2020-05-24 Thread Henning Hraban Ramm


> Am 24.05.2020 um 14:04 schrieb Floris van Manen :
> 
> Does anyone know how to activate/use the pretty printing of python code?
> 
> \starttyping[option=python]
> 
> does not work.

No, ConTeXt supports only TeX, XML, MetaPost and Lua.

Try Aditya’s vim module:
https://github.com/adityam/filter/blob/master/vim-README.md

(The scite module also doesn’t seem to support Python?)


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] Let chapter start on odd page and make the even page before show an image

2020-05-29 Thread Henning Hraban Ramm
In a similar setup I wanted to start every chapter with image and short vita 
the author and came up with the following (of course not without help from our 
wizards):


\definefont[ChapterFont][Sans*default at 30pt]

\startsetups normalheader
  % default numbers of my bodyfont are oldstyle
  
\setupheadertexts[chapter][{\addff{normnum}\pagenumber}][{\addff{normnum}\pagenumber}][]
\stopsetups

\startsetups noheader
  \setupheadertexts[][][][]
\stopsetups


\startsetups bigchapter
  \setupalign[flushleft,hz,hanging,verytolerant,nothyphenated]
  \doifelse{\structureuservariable{image}}{}{% if image empty
  }{%
\directsetup{noheader}
\vbox{%
  {\ChapterFont\structurevariable{title}\par}%
  \blank[big]
  
\externalfigure[img/\structureuservariable{image}][width=0.8\textwidth]\par
}
\doifnot{\structureuservariable{vita}}{}{% if vita
  \vfill
  \vbox{%
{\tf\ss\structureuservariable{vita}}
  }%
}%
\page[right]
\vbox{%
  \doifnot{\structureuservariable{subtitle}}{}{% if subtitle
{\definedfont[SerifItalic*eka at 30pt]\structureuservariable{subtitle}}
  }%
}%
  }%
  \blank[3*big]
  \directsetup{normalheader}
  \setupalign[width,hz,hanging,hyphenated]% reset alignment
\stopsetups


\setuphead[chapter][
  page=left,
  number=no,
  command=\gobbletwoarguments,
  before=,
  after={\directsetup{bigchapter}},
  style={\ChapterFont},
]


This is the result:
https://www.dreiviertelhaus.de/editionka/lauf-los-buch/
(see preview images linked at the bottom)


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] Let chapter start on odd page and make the even page before show an image

2020-05-29 Thread Henning Hraban Ramm

> Am 29.05.2020 um 22:18 schrieb Aditya Mahajan :
> 
> On Fri, 29 May 2020, Henning Hraban Ramm wrote:
> 
>> In a similar setup I wanted to start every chapter with image and short vita 
>> the author and came up with the following (of course not without help from 
>> our wizards):
>> 
>> 
>> \doifelse{\structureuservariable{image}}{}{% if image empty
>> }{%
>> ...
>> }
>>   \doifnot{\structureuservariable{vita}}{}{% if vita
>>  ...
>> }%
>>   }%
>> }%
> 
> You can use  `\doifsomething{\structureuservariable{image}}` etc which is 
> slightly more readable than \doifelse{...}\empty{}{} or \doifnot{...}\empty{}.

I tried several \doifs and this was the one that worked. Can’t remember the 
details, it’s been a while.

HR
___
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] background of \typing fills column

2020-06-01 Thread Henning Hraban Ramm
Hi,
I finally wanted to attack CG journal 2019 again and stumble upon this error:

If an article contains several \starttyping ... \stoptyping examples with a 
textbackground, it sometimes fills the whole column (pagecolumns). It doesn’t 
occur if the "typing" is at top or bottom of the column or even breaks.

It’s the same with MkIV and LMTX.

I’ll try to come up with a MWE, but perhaps you already know what’s wrong?

Here’s the PDF: https://sedna.fiee.net/f/a75380127d7b4f17a940/

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] [overstrike] with different color?

2020-06-03 Thread Henning Hraban Ramm


> Am 03.06.2020 um 16:19 schrieb Floris van Manen :
> 
> What is the preferred way to overstrike a text with a different color?
> This does not work:
> One \overstrike[color=red]{Two} Three

\setupbar[color=red,rulethickness=1.4] % measurement in pt

See also rules-mkiv.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] [overstrike] with different color?

2020-06-05 Thread Henning Hraban Ramm

> Am 04.06.2020 um 20:00 schrieb Floris van Manen :
> 
>> \setupbar[color=red,rulethickness=1.4] % measurement in pt
> 
> the command also takes a parameter offset as well as dy.
> I assume the offset will position the line higher / lower .
> But I see no effect.
> 
> \setupbar[color=red,rulethickness=.3,offset=0.5]

According to https://wiki.contextgarden.net/Command/underbar, offset should 
work.

Maybe \definebar behaves different to \setupbar

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] start/stop executed conditionally on mode ?

2020-06-15 Thread Henning Hraban Ramm

> Am 10.06.2020 um 09:33 schrieb Hans Hagen :
> 
> the begin/end are used for marking blobs of content (kind of buffers) that 
> can be mixed in, reused, moved, while start/stop is for structure
> 
> so, begin/end is independent
> 
> it is an already old mechanism that was made for educational material where 
> one source had to result in teacher, student, examns, extra, materials
> 
> but it's there to stay ...

Wow, I think this is the first time I encounter blocks in my 20 years of using 
ConTeXt. Probably I just didn’t recognize they were special.

Astonished: 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] ConTeXt source browser website update

2020-06-15 Thread Henning Hraban Ramm


> Am 07.06.2020 um 16:25 schrieb Taco Hoekwater :
> 
> 
> * On the plus side, because of the SciTE lexer, “contextversion’ and 
> “\contextversion” are separate entries in the search index. And you can 
> search for “\@@kldirection”.
> 


This is quite great!
I was often annoyed that I couldn’t really search for commands that are also 
regular words.

Thank you so much!

And thanks again to Garulfo for the whole effort of restructuring the wiki!


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

maillist : ntg-context@ntg.nl / 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] Bar within math (amended)

2020-06-15 Thread Henning Hraban Ramm

> Am 11.06.2020 um 13:41 schrieb Axel Kielhorn :
> 
>> Am 09.06.2020 um 20:41 schrieb Wolfgang Schuster 
>> :
>> 
>> Use a textbackground to highlight parts of your text.
>> 
>> \definetextbackground
>> [Highlight]
>> [frame=off,
>>  background=color,
>>  backgroundcolor=yellow]
>> 
>> \starttext
>> 
>> \m{1 + 2 = \unit{3 kilo newton}}
>> 
>> \m{1 + 2 = \Highlight{\unit{3 kilo newton}}}
>> 
>> \stoptext
>> 
>> Wolfgang
>> 
> 
> Is there a way to highlight just the words and leave the space white?
> Something like \overstrikes?


Wolfgang or whoelse,
when would you advise to use textbackgrounds and when bars? E.g. if I need a 
“marker” highlighting.

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] using modeset

2020-06-15 Thread Henning Hraban Ramm

> Am 12.06.2020 um 11:26 schrieb Jan Willem Flamma :
> 
> Thank you Wolfgang, BPJ and Robert for your answers and feedback. Much 
> appreciated. 
>  
> I will explorer the solutions that have been offered to extend my knowledge 
> on using ConTeXt but at the same time I value the advice of not going down 
> that route for large document.

The project that pays my bills is technical documentation in several languages 
(in LaTeX3, setup by Marei). Each manual is constructed from many small 
building blocks of text. Each block is in its own file.
That makes editing one whole manual somewhat tedious, but pays off if you 
recycle the same blocks. E.g. each block is only translated once, even if it 
appears in several manuals (think of security instructions or legal stuff that 
is the same in all). Each block has an explicite change date to keep track of 
the state of the different translations.
The two main files of each product are one that contains just a few settings 
and one that pulls in all the needed building blocks.

In this case all blocks with the same content in different languages are kept 
together in one directory (files have a language code). Another approach would 
be same structures and file names below a main language directory.
If you have only one translation, the latter might be better. If you need to 
keep several translations in sync, the first approach might make more sense.

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] Fwd: Janus M. Nowacki

2020-06-15 Thread Henning Hraban Ramm
Quoted from: lilypond-u...@gnu.org

I just wanted to let you know that Janus Nowacki, one of the founders
of the TeX Gyre font suite, has recently died:
http://www.gust.org.pl/news/jmn-obit-en
And his personal website (in Polish): https://jmn.pl/

The TeX Gyre font project was started in 2006 to provide high-quality,
free-licensed replacements for existing URW fonts:
http://www.gust.org.pl/projects/e-foundry/tex-gyre/nfp11.pdf

___
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] spacing before items

2020-06-17 Thread Henning Hraban Ramm


> Am 17.06.2020 um 21:50 schrieb Mike Cooper 
> :
> 
> For one thing,  I have no clue what "ttbf" means.  Can't find it on the wiki 
> or in the manuals.  Google says it's the Texas Teen Book Festival but I'm 
> guessing that ain't it.  ???

Did you try it?

(Hint: There’s \tt and \bf ...)

HR
___
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 comment above heading

2020-06-17 Thread Henning Hraban Ramm

> Am 17.06.2020 um 22:47 schrieb Wolfgang Schuster 
> :
> 
> Pablo Rodriguez schrieb am 16.06.2020 um 22:17:
>> Dear list,
>> I have the following sample:
>>   \startsetups[tinytiny]
>> \setupwhitespace[-2em]
>> \setupbodyfont[0.01pt]
>> \setupinterlinespace[1sp]
>>   \stopsetups
> 
> ???
> 
>>   \setupinteraction[state=start]
>>   \showframe\showgrid
>>   \starttext
>> \blank[force, 10em]
>> \section{Move comment above this heading}
>> \startparagraph[setups=tinytiny]
>>  \dontleavehmode
>>  \comment[location={rightmargin}, color=orange]
>>  {comment}
>> \stopparagraph
>>   \stoptext
>> Is there a way to move the comment above the heading that goes before?
> 
> Like this?
> 
> \setupinteraction[state=start]
> 
> \showframe
> \showgrid
> 
> \starttext
> 
> \blank[force,10em]
> 
> \comment[location={rightmargin},color=orange]{comment}
> \section{Move comment above this heading}
> 
> \stoptext

Pablo, do I understand right that you’re converting XML and the comment comes 
last in that structure, but you need it first?
I.e. the real question is how to process the XML structure in a different 
order, right?
That would avoid shifting boxes around, which might be possible, but ugly and 
hard to control.

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] CMYK workflow. How to set and should I worry about

2020-06-23 Thread Henning Hraban Ramm


> Am 23.06.2020 um 22:28 schrieb Keith McKay :
> 
> Colleagues
> 
> I'm getting ready to send  a book to the  printers and in their blurb they 
> state "Ensure that you are using a CMYK workflow and export to PDF/X-1a:2001" 
> . I can set the pdf format using \setupbackend but I'm unsure as to what to 
> do about CMYK workflow. The book has no colour pages so I'm not sure if I 
> really need to worry about CMYK workflow. Could someone advise?

\setupcolors[rgb=no] to avoid rgb colors, or
\setupcolors[state=stop] to force black and white.

You must ensure yourself that your images are just black and white / greyscale 
(not in RGB mode).

ConTeXt does some automatical checks and conversions depending on the PDF/X 
standard, but I’m not sure how far that goes (e.g. PDF/X-1 prohibits 
transparencies, and ConTeXt cares for that).

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] Checking for singlesided/doublesided at run-time

2020-06-24 Thread Henning Hraban Ramm


> Am 24.06.2020 um 08:19 schrieb Lukas/ConTeXt :
> 
> Hello,
> 
> is there a way to detect whether the document is intended as single- or 
> double- sided, IOW, whether 
>  \setuppagenumbering[alternative=singlesided]
> or
>  \setuppagenumbering[alternative=doublesided]
> has been specified?
> 
> If so, is it possible by Lua, too?


I wanted to refer to the mmodes manual, but it’s gone.
Was it accidentally removed, or are modes now explained in some other manual? I 
didn’t find 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] Checking for singlesided/doublesided at run-time

2020-06-24 Thread Henning Hraban Ramm

> Am 24.06.2020 um 15:48 schrieb Aditya Mahajan :
> 
> On Wed, 24 Jun 2020, Henning Hraban Ramm wrote:
>> 
>> 
>> I wanted to refer to the mmodes manual, but it’s gone.
>> Was it accidentally removed, or are modes now explained in some other 
>> manual? I didn’t find it.
> 
> http://www.pragma-ade.com/general/manuals/mmodes.pdf

Thank you, but it was in the distribution previously. Is it outdated?

HR
___
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] spacing before items

2020-06-24 Thread Henning Hraban Ramm

> Am 24.06.2020 um 19:41 schrieb Mike Cooper 
> :
>> 
>> Indeed. It's all volunteer work that doesn't pay the bills. Sitting down
>> and starting to write a big manual simply doesn't pay off so it has to
>> happen in free time. And that being the case, it is more attactive to
>> work on some new challenge.
>> 
>> Concerning manuals: I sometimes wonder if they are really read. So, how
>> to set up one that works for all, build up explanations, etc ... isn't
>> it more about googling a solution nowadays (ok, not entirely true i
>> guess, as one then has to learn how to distinguish the wrong solutions
>> from the good, but i suppose one can just test it).

Most of you know I’m writing at this German ConTeXt book since years...
I use the incomplete version myself a lot, and I very much hope that at least 
every second German TeX user will buy it ;)

And of course it’s a lot of work – while Hans, Wolfgang and Taco (and a few 
otehrs) know their code, I must look up every option, try to find a short 
description or come up with a test case, so that I understand what’s going on 
to write it down for others. (Often parallelly for the book in Germand and for 
the wiki in English.)
And far too often I give up because I can’t make something work – mostly 
because I didn’t understand some fundamental concept (expansion...), but 
sometimes features just don’t work as advertised/documented (like columnsets).

Googling is necessary and helpful for LaTeX, but there aren’t so many blog or 
forum entries about ConTeXt.

> I started out maybe a little bit hodge-podge, looking through some 
> documentation recommended to me.  The basic concept is very straightforward.  
> No problem.  But implementation has been extremely challenging (but it's 
> probably just me!).  Then I was pointed to Henri Menke's "Definitive Guide" 
> post.  I read the entire Excursion (though I confess I did not *practice* as 
> I went along (partly because SciTe was such a pain)).  The Excursion is not 
> for (true) beginners.  And, no offense, but I thought it was poorly typeset 
> as well...

I think it doesn’t make a lot of sense to try to understand the whole thing at 
once.
You need to start small with a project and some basic structuring, then add 
your style requirements one after the other.

If you come from a layout background like me, some “advanced“ stuff is really 
easy in ConTeXt, while seemingly basic stuff is very hard.
The mindset of a command-based typesetting system is fundamentally different 
from that of a layout program or word processor – even if you can do a lot of 
the same tasks with each.

> Then I went through Aditya's "amazing tutorial" (mostly with a good bit of 
> help from Aditya just to be able to get started!) and definitely learned 
> more.  But at the end I felt like it was mostly an exercise in "slow-motion 
> copy/paste" (I retyped all the code).  Of course, when I got the code right, 
> I got the intended output.  I did fiddle with options a little bit as I went. 
>  No doubt, I should have done more.  There was too much of what I had 
> "successfully" done that I still didn't really understand at the end of it.

A typesetting system like ConTeXt is as much a tool for professionals as a 
layout program like InDesign. And even a word processor is better used by 
professionals who understand what they’re doing.

Each system is also usable by beginners (TeX not so much) – but they can’t 
expect to get professional results immediately.

With TeX, footnotes, ToCs and indexes are beginner stuff, while they’re quite 
advanced with InDesign or Word. Styling your work is much easier in a visual 
programm – while you do it manually.

For ConTeXt you need on one hand the mindset of a programmer, on the other hand 
that of a media designer.
Using LaTeX you can choose a readymade style (class), but with ConTeXt you 
define your own – it’s easier, but still challenging.

I think ConTeXt has a similar problem as Objective C: It might be superior to 
C++, but every introduction into ObjC assumes you are familiar with ANSI C or 
C++. But if ObjC is so great, why should I bother learning the other?
Most ConTeXt users used LaTeX or plain TeX before. They have to re-learn a lot, 
but they know a bit about how TeX thinks and works, and they know the 
limitations of LaTeX.
There is more beginner level documentation for ConTeXt than for ObjC, but we 
still assume a basic familiarity with TeX and principles of design and 
typography.

With my book I’m trying to start without prior knowledge, even if I know most 
of my readers will come from LaTeX.
But I still include sections about working on the command line or choosing a 
text editor and a lot of basic design/typography knowledge. I want it to really 
enable someone with usual office experience to start with ConTeXt. On the other 
hand I’d like to show what’s possible and what I find interesting.

And that leads to:

>> It has been said before: one can have manuals, wikis, mailing lis

Re: [NTG-context] spacing before items

2020-06-24 Thread Henning Hraban Ramm

> Am 24.06.2020 um 23:11 schrieb Mike Cooper 
> :
>> Most of you know I’m writing at this German ConTeXt book since years...
>> I use the incomplete version myself a lot, and I very much hope that at 
>> least every
>> second German TeX user will buy it ;)
> 
> Awesome!  Keep at it!
> Maybe when there's an English version, I'll still need it!  :-)

Even if I did plan an English version, I don’t think it will happen... First I 
need to complete the German version.

>> With TeX, footnotes, ToCs and indexes are beginner stuff, while they’re quite
>> advanced with InDesign or Word. Styling your work is much easier in a visual
>> programm – while you do it manually.
> 
> Hmmm...  I don't find those things to be at all advanced in Word.   ???

It’s easier in Word (or LibreOffice) than in InDesign, true.
Never tried to make an index in LO/Word.

But ToCs in word processors tend to get messed up, as other stuff like image 
placement.


>> May I ask what kind of job requires you to learn ConTeXt? That’s rare.
> 
> Haha!  I now work with Jan Willem Flamma (who is on this list) in the 
> training industry.  He tells me that using ConTeXt with XML will give us a 
> modularity to our training content such that a modification in one place is 
> more or less automatically taken care of for every course manual that uses 
> that content.  (At least that's my current understanding.)  So I've been 
> trying to learn ConTeXt and now slowly chipping away at coding one of our 
> smaller homework chapters.

It’s at least possible to make it efficient.

I never use XML input but mostly convert DOCX to ConTeXt and work in that.

My main job ATM is with technical documentation on a specialized LaTeX3 system: 
several similar machines, several translations, i.e. modularity pays off.

At a former job (newspaper prepress admin) I prepared training material on 
Acrobat Pro using ConTeXt; presentations and handouts in the same documents, 
using modes.


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] something between packed and "small"??

2020-07-01 Thread Henning Hraban Ramm


> Am 01.07.2020 um 21:04 schrieb Mike Cooper 
> :
> 
> Me again…
>  
> I’ve got an itemize that needs to fit on one page.  I’ve been using 
> inbetween={\blank[small]} for all the other analogous lists but this one is 
> longer and with that spacing, it goes about one inch onto the next page.  But 
> if I use packed, the list is way too crammed together and there’s about 2.5 
> inches of extra space on the page!
>  
> How do I go smaller than small?  Is there a “lightly packed”?  Or other 
> degrees?
>  
> I’ve tried \blank[1mm] and other dimensions but nothing will go smaller than 
> small…  :-(

\blank understands an arbitrary measure, e.g. \blank[3pt] or \blank[0.25em]

Probably also \blank[0.5*small] works (didn’t check, but \blank[3*big] works).

Otherwise see https://wiki.contextgarden.net/Command/blank

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] Resetting image width

2020-07-06 Thread Henning Hraban Ramm
Hi,
for collecting a lot of images into a booklet I set

\setupexternalfigures[width=\textwidth,maxheight=\textheight]

but would like to have some single images defined by height and proportional 
width, like

\externalfigure[dummy][width=auto,height=.5\textheight]

but height and width only take dimensions.

Can you give me a hint?

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] Resetting image width

2020-07-06 Thread Henning Hraban Ramm

> Am 06.07.2020 um 21:17 schrieb Wolfgang Schuster 
> :
> 
> Henning Hraban Ramm schrieb am 06.07.2020 um 21:03:
>> Hi,
>> for collecting a lot of images into a booklet I set
>> 
>> \setupexternalfigures[width=\textwidth,maxheight=\textheight]
>> 
>> but would like to have some single images defined by height and proportional 
>> width, like
>> 
>> \externalfigure[dummy][width=auto,height=.5\textheight]
>> 
>> but height and width only take dimensions.
>> 
>> Can you give me a hint?
> 
> No argument is also valid.
> 
> \externalfigure[dummy][width=,height=.5\textheight]

I thought so and was sure I tried it and got an error, but I recognized I tried 
"width=," with \clip, and that can’t work, of course.

Sorry for the noise.

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] Vertical space between label and title

2020-07-07 Thread Henning Hraban Ramm


> Am 07.07.2020 um 19:27 schrieb Fabrice Couvreur :
> 
> Hello,
> I want a vertical space between the label and the chapter title: is this the 
> right way to proceed ?

Why not? It seems to work. What’s your problem?

BTW I’d set \mainlanguage[fr]

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] No inverse Search when using \usepath

2020-07-11 Thread Henning Hraban Ramm


> Am 11.07.2020 um 18:08 schrieb Hans Hagen :
>> I can compile and I get a nice PDF,  but the inverse search is not possible. 
>> (I use Sumatra and Notepad++)
>> NPP only looks at the path after\input... /techdaten/Ang_techdaten.tex
>> Do any of you know a workaround  for this?
>> Is   \usepath the suited command?
> What do you mean with 'inverse search'?

He probably means SyncTeX.

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] Broken PDF with latest MkIV

2020-07-12 Thread Henning Hraban Ramm
Hi,
I just installed the latest ConTeXt MkIV (LuaTeX 2.06 20200706 + ConTeXt MkIV 
2020.07.09 14:51) to check if the CG journal will look the same as with my 
"old” installation (LuaTeX 1.11 7215 + ConTeXt MkIV 2020.01.30 14:13).

All looks well in Preview.app and PDF Studio 2019, but Adobe (Reader DC and 
Acrobat Pro 9) can’t open the new PDF.

I’ll try to cook up a MWE. Does anyone else experience problems with Adobe apps?

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 numbering that does not follow a regular pattern

2020-07-13 Thread Henning Hraban Ramm


> Am 13.07.2020 um 02:23 schrieb jbf :
> 
> Hi there,
> 
> I have a situation where numbered chapters are occasionally interspersed with 
> unnumbered chapters, so, for example, it might be:
> 
> 1 First chapter title with number
> 
>   second chapter title unnumbered
> 
> 2 Second chapter title with  number
> 
> 3 Third chapter title with number

Use \title (or \starttitle[title={}]) for unnumbered and \chapter 
(\startchaper) for numbered.

If you need the unnumbered chapters in your ToC, you must add them like 
\setupcombinedlist[content][list={chapter,title}]

You can setup most options for both using \setuphead[chapter,title][...]

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] french translation of ConTeXt interface - progress (v3)

2020-07-15 Thread Henning Hraban Ramm

> Am 15.07.2020 um 10:31 schrieb Hans Hagen :
> you can leave the commands for last ... in an french user interface the 
> english commands will work ok, but keys/values/elements have to be translated

Are the other interfaces (Dutch, German, Czech...) actually still working?

AFAIR I tried the German one in the beginning (MkII) but gave up since all the 
documentation is in English, and nobody could help you with anything but 
English and Dutch.

WRT your musings (“What’s in a name“): translated interfaces look funny, and I 
guess they make only sense in a very limited environment. E.g. Marei’s LaTeX3 
system I’m working with uses German commands, but it’s focused on technical 
documentation for one company, and we’re not supposed to use general LaTeX 
commands.

In my German book I’ll only show the English interface, otherwise I’d need to 
write even more...

@Garulfo: Do you have a special use case in mind, or do you do this for fun?

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] french translation of ConTeXt interface - progress (v3)

2020-07-15 Thread Henning Hraban Ramm

> Am 15.07.2020 um 14:28 schrieb Hans Hagen :
> 
> On 7/15/2020 2:14 PM, Henning Hraban Ramm wrote:
>>> Am 15.07.2020 um 10:31 schrieb Hans Hagen :
>>> you can leave the commands for last ... in an french user interface the 
>>> english commands will work ok, but keys/values/elements have to be 
>>> translated
>> Are the other interfaces (Dutch, German, Czech...) actually still working?
> are germans still lipsyncing movies (or even foreign news), translating 
> computerbooks in german (large secxtions in bookshops), translating thrillers 
> and novels ... or has that all stopped working

I don’t understand the comparison.

It’s a difference if I can enjoy movies or books, if I can understand textbooks 
or manuals in a foreign language or if and why I’d use translated programming 
or markup commands.

For me, lip syncing can make movies confusing, since the sound doesn’t match 
the lip movements – I prefer original language with subtitles (for German and 
English, that is).

> anyway, it is supposed to work and whenever kids have to use context doing it 
> in dutch is more fun (one just learns them the handfull of commands they need)

I’m not against these interfaces, but without translated documentation a 
translated interface doesn’t make a lot of sense (to me).

E.g. LilyPond docs have several translations (it’s a huge effort!), but besides 
note names there’s no interface translation. (I’m glad I can use c d e notes, 
while others prefer do re mi etc. I could even use German h/b instead of b/bes, 
but I got used to the Dutch default – for input only; in my songbooks I stick 
to German chord names.)

Translated documentation is important, it lowers the threshold for many users. 
That’s why I’m writing my book in German. But once you grow out of the basics, 
you need to be able to find your way in manuals and wiki or ask questions here, 
where everything’s in English.

With our small developer and user base we struggle enough with keeping 
documentation current. – I’m very happy with and thankful for the big effort 
that goes into the wiki at the moment! – Maybe we (i.e. Taco, Paul etc.) can 
extend the automatisms so far, that we also can document the translated 
interfaces that way, even if the manually added content would stay in English.

I never heard that kids would use ConTeXt at all, but perhaps I just missed you 
talking about it.


Sorry, Garulfo, didn’t want to hijack your thread.


Best regards, 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] \documentvariable (used in environment)

2020-07-25 Thread Henning Hraban Ramm

> Am 25.07.2020 um 10:20 schrieb Wolfgang Schuster 
> :
> 
> Alan Braslau schrieb am 25.07.2020 um 00:21:
>> On 22/07/20 22:36, Wolfgang Schuster wrote:
>>> What exactly doesn't work and do you get the same problems when you set the 
>>> values in the following minimal example (everything has to be in the same 
>>> file).
>>> 
>>>  begin example
>>> \setupdocument
>>>[metadata:title={\documentvariable{title}},
>>> metadata:subtitle={\documentvariable{subtitle}},
>>> metadata:author={\documentvariable{author}},
>>> metadata:keywords={\documentvariable{keywords}}]
>>> 
>>> \startdocument [title={My title}]
>>> \input knuth
>>> \stopdocument
>>>  end example
>>> 
>>> Wolfgang
>> 
>> Thank you, Wolfgang.
>> 
>> The above example does work. It fails to set the metadata if one moves the 
>> \setupdocument to an environment file. As you write, "everything has to be 
>> in the same file".
> The requirement was only necessary for the example to check if the metadata 
> end up in the PDF file. You could have a environment file for \setupdocument 
> but the goal here was to check the resulting metadata in the PDF.
>> This is my question, how to set these using an environment file, thus NOT 
>> the same file as the \startdocument in a project structure.
> The problem is something in your environment/style file which causes a 
> problem with the \setupdocument setup. What you should do to find the sulprit 
> is:
> 
> 1. Make a copy of your document
> 2. Remove all text between \startdocument and \stopdocument and add some 
> dummy text (like in my example) to ensure ConTeXt produces a PDF
> 3. Remove setups from your environment (but keep the \setupdocument setup) 
> file until the metadata appears in the PDF

A typical case if something in an environment doesn’t work, but in a single 
file: Are there modes involved? Maybe your \setupdocument is within a 
\startmode ... \stopmode that doesn’t get activated.

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] Installing VSCode extension?

2020-07-29 Thread Henning Hraban Ramm

> Am 29.07.2020 um 14:19 schrieb Alasdair McAndrew :
> 
> Thank you very much, but in fact that script file "vscode-context.cmd" really 
> just contains the same command for installing extensions as I quoted above - 
> and so produces the same errors.  Maybe I'll go back to trying SciTe - I gave 
> it a bit of a go, but wasn't successful.  Of all the information on the 
> context-wiki, and the Pragma webpage - where would I go to find the most 
> up-to-date information about configuring an editor to work with ConTeXt in 
> Windows?

You could try Atom and install the ConTeXt module from 
github.com/massifrg/language-context.
Original language-context is outdated, but upstream didn’t react to mails from 
Massi and me.
This version also isn’t perfect, but I’m using and occasionally updating it. (I 
should re-base it on the current work done for the wiki.) There’s also still no 
run command.

Additionally you should install 
- language-latex (contains plain TeX commands)
- language-lua
- atom-ide-terminal (for running ConTeXt in place)
- file-icons (only icon package that contains TeX icons)
- pdf-view (not very good, but good enough for simple cases)

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] Installing VSCode extension?

2020-07-30 Thread Henning Hraban Ramm

> Am 30.07.2020 um 07:52 schrieb Jeong Dal :
> 
> Dear Alasdair McAndrew,
> 
> I am using vscode in iMac, so my setting may not work for you.
> 
> 
> 
> 1. First, find files for vscode in your TeX folder.
> 
> In my case, 
> 
> /ConTeXt-homefolder/tex/texmf-context/context/data/vacode/extensions/context/*.*
> 
> 2. In a homefolder, there is a hidden folder “.vacode”.
> 
> Copy context/*.* to  ./vscode/extensions/context/*.*
> 
> 3. Open vscode and enable context-extension.
> 
> Since it was long time ago, my memory may not be correct.
> However, I hope that it may give you an idea.

It might make sense to not copy the files but symlink the folder (then it 
automatically receives updates).
i.e.
ln -s $TEXROOT/texmf-context/context/data/vacode/extensions/context 
~/.vscode/extensions/

Don’t know how symlinking in Windows works, though.

HR
___
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] Installing VSCode extension?

2020-07-30 Thread Henning Hraban Ramm


> Am 30.07.2020 um 03:57 schrieb Alasdair McAndrew :
> 
> Thanks again, I've fiddled with SciTE, but when I attempted to compile a 
> context file, I was told that "texexec" wasn't in my path, so somehow, 
> somewhere, I must have picked up an old version of the compile command.  
> Also, there doesn't seem to be an easy way of getting SciTE to use a 
> monospaced font. 

Did you read 
$TEXROOT/texmf-context/context/data/scite/context/documents/scite-context-readme.pdf
 ?

I don’t know if that answers your questions and if it’s still current.

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

2020-08-01 Thread Henning Hraban Ramm
Hi,

besides the CG journal I’m working on a scientific biography with huge person 
and locality indexes (named Person and Locality for the examples).

In many cases, the author wants additional information in the index, e.g.

\Locality{Altona (Hamburg)}
\Locallity{Breslau (pol. Wrocław)}
or
\Person{Arends, Katharina (née Schoemaker)}
\Person{Wilhelm II. (Kaiser)}

Now, I need that consistent and I don’t want to type these complicated entries 
every time.

I’m looking for a good way to handle this – maybe a lookup table in Lua, so that
\LookupPerson{Willy II}
would call a Lua function that returns
\Person{Wilhelm II. (Kaiser)}
?

Or is there already something in place that I overlooked, like
\OverwriteIndexEntry{Hraban}{Ramm, Henning 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
___


[NTG-context] limit of index entries?

2020-08-01 Thread Henning Hraban Ramm
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?

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

2020-08-01 Thread Henning Hraban Ramm

> Am 01.08.2020 um 15:20 schrieb Otared Kavian :
> 
> Regarding footnotes, would it be possible to have a built-in support for 
> writing the footnotes in the margin? (For instance, assuming that the layout 
> is such that for instance the right margin takes 1/3 of the page width, then 
> the footnotes would occupy the right margin, beginning at the top).

I wanted to have footnotes in the margin, possibly starting in the same line as 
the marker.

Wolfgang came up with this:
https://wiki.contextgarden.net/Footnotes#..._but_not_at_the_bottom

(Not related to LMTX.)

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 18:57 schrieb Otared Kavian :
> 
> Hi Hraban,
> 
> Thank you for reminding me of the solution cooked up by Wolfgang for you a 
> few years ago. That solution works fine when the notes are short enough, but 
> in some cases the notes in the margin bump into each other (indeed it is not 
> a good habit to have long notes, but in some cases one cannot avoid them).

One essential bit is missing in the wiki example:

\setupmargindata[inmargin][
  location=right,
  stack=continue, % !!
  align=flushright,
]

The code I’m actually using for our German literature magazine “Kritische 
Ausgabe” is much more elaborated, but also cluttered with obsolete stuff – I 
need to sort that out some time...
(I only deleted some styling.)

%%% Footnotes / Marginals

\setupmargindata[inmargin][
  location=right,
  stack=continue,
  align=flushright,
]
\setupmargindata[inouter][
  location=right,
  stack=continue,
  align=flushright,
]

\def\FNVOffset{0} % Negative vertical offset of footnotes in lines
% Manual tweaking was necessary for a while, when stacking didn’t work reliably.

\def\MarginNote#1{%
\inmargin[
  voffset=\dimexpr-\FNVOffset\lineheight\relax,
  width=\ColWidth,
  align=flushleft,
]{%
  \inframed[
width=\ColWidth,
align=right,
frame=off,
offset=overlay,
strut=yes,
]{#1}%
  }%
}

\define\PlaceFootnote{%
\inmargin[
  voffset=\dimexpr-\FNVOffset\lineheight\relax,
  width=\ColWidth,
]{%
  \vtop{\placelocalnotes[footnote][before=,after=]}}%
}

\def\FNo#1{{#1~}}
% I never managed to get number and text in consecutive lines without indented 
text
% or at least a constant whitespace after the number.

\setupnote[footnote][
  location=text,
  bodyfont=,
  indenting=no,
  before={\noindentation},
  next=\PlaceFootnote,
]

\setupnotation[footnote][
way=bychapter,
align=flushleft,
  indenting=no,
  location=serried,
  alternative=serried,
  width=broad,
  numbercommand=\FNo,
] % footnote text

\setuptexttexts[margin][][%
  {\framed[
align={flushright,bottom},
frame=off,
height=\textheight,
width=\ColWidth,
  ]{%
\strut\vfill\placenotes[footnote]}}%
]


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

2020-08-01 Thread Henning Hraban Ramm


> Am 01.08.2020 um 13:22 schrieb Henning Hraban Ramm :
> 
> Hi,
> 
> besides the CG journal I’m working on a scientific biography with huge person 
> and locality indexes (named Person and Locality for the examples).
> 
> In many cases, the author wants additional information in the index, e.g.
> 
> \Locality{Altona (Hamburg)}
> \Locality{Breslau (pol. Wrocław)}
> or
> \Person{Arends, Katharina (née Schoemaker)}
> \Person{Wilhelm II. (Kaiser)}
> 
> Now, I need that consistent and I don’t want to type these complicated 
> entries every time.
> 
> I’m looking for a good way to handle this – maybe a lookup table in Lua, so 
> that
> \LookupPerson{Willy II}
> would call a Lua function that returns
> \Person{Wilhelm II. (Kaiser)}
> ?
> 
> Or is there already something in place that I overlooked, like
> \OverwriteIndexEntry{Hraban}{Ramm, Henning Hraban}
> ?

I came up with:

\startluacode
user.Lookups = {
  ["Albano"] = "Albano (Provinz Rom)",
  ["Altona"] = "Altona (Hamburg)",
  ["Aurich"] = "Aurich (Ostfriesland)"
}

function user.Lookup(Name)
  local Res = user.Lookups[Name]
  if Res then
return context(Res)
  else
return context(Name)
  end
end
\stopluacode

\def\Ort#1{\index{\ctxlua{user.Lookup("#1")}}}

\starttext

\Ort{Albano}
\Ort{Altona}
\Ort{Aurich}
\strut\page

\placeindex

\stoptext


The lookup works so far, but all the entries get sorted unter C (because of 
\ctxlua).

I remember I had the same problem with other macros (like \index{\emph{bla}}), 
but can’t find a solution in my usual sources.


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 21:01 schrieb Jairo A. del Rio :
> 
> Hi, Henning. According to the garden, something like:
> 
> \def\Ort#1{\index[#1]{\ctxlua{user.Lookup("#1")}}}
> 
> as long as #1 is capable of being sorted in the normal way, should work. 

Thank you, but that doesn’t work if my lookup e.g. creates 
"Garmisch-Partenkirchen" from "Partenkirchen".

> Am 01.08.2020 um 21:18 schrieb Jairo A. del Rio :
> 
> Wrt formatting (e.g. \index{\emph{something}}), the garden also mentions 
> processors for MkIV (https://wiki.contextgarden.net/Registers#Processors), so 
> you can wrap them with custom commands, in case it helps.

I already use processors; \emph was just an example.


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 21:30 schrieb Wolfgang Schuster 
> :
>> \def\Ort#1{\index{\ctxlua{user.Lookup("#1")}}}
> 
> You have to expand the \index argument:
> 
> \define[1]\Ort{\expanded{\index{...}}}

Ah, I never know where to expand (tried \expanded\ctxlua).

Now,

\def\TOrt#1{\expanded{\Ort{\ctxlua{userdata.Lookup("#1")}}}#1} % Loc + Text
\defineprocessor[kursiv][style=italicface]
\def\TFOrt#1{\expanded{\Ort[kursiv->]{\ctxlua{userdata.Lookup("#1")}}}#1} % Loc 
in Footnote + Text

works. :)

(I always define \TIndex to avoid doubling, e.g. Hamburg\index{Hamburg}.)


> When you use formatting commands etc. you have to use the optional argument 
> for sorting.

I don’t understand.

\Ort[kursiv->]{Hamburg} works.

> You can avoid a few problems when you move the \index command to Lua and use 
> context.index or you use a pure TeX solution.
> 
>  begin lua example
> 
> function userdata.index(name)
>local indexentry = userdata.lookup[name] or name
>context.index(indexentry)
> end

That’s nice, but since I use different registers, I’d need to define that 
function for each. Since I also use several shortcuts (e.g. \TOrt, \TFOrt, 
\TPerson, \TFPerson) I would multiply the effort on the Lua side.
I find my TeX definitions (like above) shorter, where I can use the same Lua 
function for each.
With your code I could at least shorten it to:

function userdata.Lookup(name)
   context(userdata.Lookups[name] or name)
end

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

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


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


[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] 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] 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] 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
___


Re: [NTG-context] custom header/footer for 1st/other pages of section

2020-08-10 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
___


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


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


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
___


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


[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] 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
___


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


[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] 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
___


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


  1   2   3   4   5   6   7   8   9   10   >