Re: [NTG-context] styling individual parts of ToC entry

2020-09-05 Thread jbf
Thanks Wolfgang, while I don't pretend to fully understand the setup you 
have provided (but am working on doing so!), of course it provides the 
correct result for a chapter that has a title, an author, and a year.


My ever-so-complicated book (and its authors!) however, throws one small 
further complication into the mix.


Where a chapter does not have a year-range, and I either omit that 
declaration, or I leave the curly brackets empty (e.g. year={}), then I 
find that the author name also does not appear in the ToC. What 
adjustment to the \ChapterListCommand do I need to make to accommodate 
the following? Possibly an \else statement, but not sure how to include 
that:


\startchapter [title={Chapter title}] [author={Author Name}]

Julian



On 5/9/20 7:16 pm, Wolfgang Schuster wrote:

jbf schrieb am 05.09.2020 um 03:35:
Now that with Hraban's invaluable assistance I am able to include 
title, subtitle, author as and when necessary in the ToC and put them 
on the same line if I need to, I have two questions that I have not 
found a satisfactory solution to after playing around with various 
possibilities.


I need:

(1) the author's names lined up vertically throughout the ToC, and

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


An adjusted version of Hraban's setup can show what I have tried by 
way of example:


%

\define[1]\TitleTocEntry{%
   #1\hskip 1cm% title
    \structurelistuservariable{author}%
   }

\setuplist[title][textstyle=bold,
   textcommand=\TitleTocEntry,
]

%---

/Question 1:/ /How to get the two author names to line up 
vertically./ Given that I have both a Foreword and a Preface, I am 
using \title for these. And both have separate authors. The titles 
will be simply 'Foreword' and 'Preface', obviously.


*Foreword Author name*

*Preface    Author name*

I am using \hskip 1cm to separate the authors' names from either of 
those two words. But this does not give me the kind of exact 
positioning I need to get the two author names directly underneath 
each other in the list. I have tried various alternatives to \hskip, 
but none of them can give me the correct proportional distance. The 
distance is obviously being controlled by the fact that 'Foreword' is 
8 characters and 'Preface' is 7. Is what I want only obtainable with 
a table setup?


The issue might or might not be more complicated when I get to main 
chapters, where the author names need to line up with the Foreword 
and Preface author names as well. There will be, e.g.


Chapter One  Title

    Author name
//

/Question 2:/ /How to independently get Foreword and Preface to be 
bold, but the authors' names to be regular./ \setuplist offers me 
options like textstyle, pagestyle, numberstyle, but they apply to 
everything (both Foreword/Preface and Authors' name are bold). I 
thought perhaps I could control it from within the document, e.g.


\starttitle[title={\ss\bf Foreword}][author={A. Uthor}]

But that does the same - both Foreword and A. Uthor end up bold. And 
besides, I also want to style the ToC independently of the heads if I 
can.


The wiki and various manuals do offer various tips on modifying the 
ToC, but I cannot find anything regarding the two questions above - 
not yet, anyway. If someone knows where, please point me to it.


\define[3]\ChapterListCommand
  {\hbox\bgroup
 \hbox to 3cm{\currentlistsymbol\hss}% number + labeltext
 \vtop\bgroup
   \hsize\dimexpr\makeupwidth-3cm\relax
   \doifsomething{\rawstructurelistuservariable{year}}
 {{\it\structurelistuservariable{year}}\crlf}%
   \currentlistentrytitle % title
   \doifsomething{\rawstructurelistuservariable{year}}
 {\crlf{\bf\structurelistuservariable{author}}}%
   \hfill\currentlistentrypagenumber % pagenumber
 \egroup
   \egroup}

\setuplist
  [chapter]
  [label=chapter,
   alternative=command,
   command=\ChapterListCommand]

\setuplabeltext
  [en]
  [chapter=Chapter ]

\starttext

\completecontent

\startchapter [title={Chapter title}] [author={Author 
Name},year={1980--2000}]

\unknown
\stopchapter

\stoptext

Wolfgang

___
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 Alan Bowen
Hi, Otared—

I had

#!/bin/zsh

#set path=  ($path /usr/texbin
/Applications/LuaMetaTeX/tex/texmf-osx-64/bin)
export
PATH=~/context-osx-64/tex/texmf-osx-64/bin:~/context-osx-64/bin:~/context-osx-64/tex/texmf-osx-64/bin

~/context-osx-64/tex/texmf-osx-64/bin/mtxrun --autogenerate --script
context --directives="system.showerror" --autopdf "$1" --purgeall

but on reading your response and checking my LuaMetaTeX directory, I
changed the 2nd line to

export
PATH=~/tex/texmf-osx-64/bin:~/context-osx-64/bin:~/context-osx-64/tex/texmf-osx-64/bin

and the files now process as they should.

It is odd that it worked before with the mistaken entry.

Many thanks to you and Hraban for your help!

Alan


On Sat, Sep 5, 2020 at 11:46 AM Otared Kavian  wrote:

> Hi Alan,
>
> Where did you install LuaMetaTeX?
> For instance my LuaMetaTeX.engine contains the following three lines:
>
> #!/bin/bash
>
> export
> PATH=/context-osx-64/tex/texmf-osx-64/bin:/context-osx-64/bin:/context-osx-64/tex/texmf-osx-64/bin
>
> /context-osx-64/tex/texmf-osx-64/bin/mtxrun --autogenerate --script
> context --directives="system.showerror" --autopdf "$1" --purgeall
>
> where I am invoking the file
> /context-osx-64/tex/texmf-osx-64/bin/mtxrun
> which is in the folder context-osx-64 where I installed LuaMetaTeX by
> running
> sh install.sh
>
> Therefore your LuaMetaTeX.engine file should contain the correct path.
>
> Best regards: Otared
>
> > On 5 Sep 2020, at 17:19, Alan Bowen  wrote:
> >
> > No, Hraban, and I have never had a directory
> /Users/bowen1/context-osx-64. Does Luametatex 2.10 (Context 2020.09.03) now
> require one?
> >
> > Alan
> >
> > On Sat, Sep 5, 2020 at 10:26 AM Henning Hraban Ramm 
> wrote:
> >
> >
> > > 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
> >
> ___
> >
> ___
> > If your question is of interest to others as well, please add an entry
> to the Wiki!
> >
> > maillist : ntg-context@ntg.nl /
> http://www.ntg.nl/mailman/listinfo/ntg-context
> > webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> > archive  : https://bitbucket.org/phg/context-mirror/commits/
> > wiki : http://contextgarden.net
> >
> ___
>
>
> ___
> If your question is of interest to others as well, please add an entry to
> the Wiki!
>
> maillist : ntg-context@ntg.nl /
> http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
>
> ___
>
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 

Re: [NTG-context] latest lmtx

2020-09-05 Thread Otared Kavian
Hi Alan,

Where did you install LuaMetaTeX? 
For instance my LuaMetaTeX.engine contains the following three lines:

#!/bin/bash

export 
PATH=/context-osx-64/tex/texmf-osx-64/bin:/context-osx-64/bin:/context-osx-64/tex/texmf-osx-64/bin

/context-osx-64/tex/texmf-osx-64/bin/mtxrun --autogenerate --script context 
--directives="system.showerror" --autopdf "$1" --purgeall

where I am invoking the file 
/context-osx-64/tex/texmf-osx-64/bin/mtxrun
which is in the folder context-osx-64 where I installed LuaMetaTeX by running 
sh install.sh

Therefore your LuaMetaTeX.engine file should contain the correct path.

Best regards: Otared

> On 5 Sep 2020, at 17:19, Alan Bowen  wrote:
> 
> No, Hraban, and I have never had a directory  /Users/bowen1/context-osx-64. 
> Does Luametatex 2.10 (Context 2020.09.03) now require one?
> 
> Alan
> 
> On Sat, Sep 5, 2020 at 10:26 AM Henning Hraban Ramm  wrote:
> 
> 
> > 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
> ___
> ___
> 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] latest lmtx

2020-09-05 Thread Alan Bowen
No, Hraban, and I have never had a directory  /Users/bowen1/context-osx-64.
Does Luametatex 2.10 (Context 2020.09.03) now require one?

Alan

On Sat, Sep 5, 2020 at 10:26 AM Henning Hraban Ramm  wrote:

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


[NTG-context] latest lmtx

2020-09-05 Thread 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.

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

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


[NTG-context] TeXlive 2020 / Gentoo Linux: ConTeXt does not find itself (sort of)...]

2020-09-05 Thread mylists
Hi,

this is my first post to this mailinglist. I am no native speaker...
if something sound somehow ... I will try to give my best ;)


I am using GENTOO Linux, which compiles everything on the target
instead of pulling ready compiled, binary packages into the system.

I did a fresh install of Texlive 2020 via the package-manager
"emerge". On Gentoo this is handled via a "virtual package", which 
can be configured beforehand to include or exclude certain parts.

I choose to get the HUGE package (incluing LaTeX, ConTeXt, plainTeX
and others).

After the installation I tried to typeset examples of a LaTeX- and
a plain TeX document, which works out of the box.

Then I tried a ConTeXt document and it fails:

context somefile.tex 

gave me:

mtxrun  | unknown script 'context.lua' or 'mtx-context.lua'

. 

While searching the internet I found, that one has to run 

mtxrun --generate 

in advance.

Doing so mtxrun starts to index my whole harddisk starting with
my $HOME, from which I started it.

It reports A LOT of "confusing file"s

I searched the installed TeXlive installation for context.lua 
and mtx-context.lua -- they were installed and not "totally" missing.

So I tried/guessed to run

mtxrun --generate /usr/share/texmf-dist /usr/share/texlive-site

and the file under $HOME were no longer indexed.

context somefile.tex

gave me the above mentioned error still, though.

It "feels" like context does not respect setting made via
the configuration settings under /etc/texmf...

So I "hacked" (really, it was a crude hack/idea...nothing
more) TEXMF and inserted

export TEXMF=/usr/share/texmf-dist:/usr/share/texlive-site

into my shells RC-file, restarted the shell and

now

context somefile.tex

"worked"...:

Each time it seems to re-index parts of ???, reports a lot
of "confusing file"s but creates a valid looking pdf.

I think, the package setup provided by GENTOO has a problem
I want to help to fix that...but I have no clue, what the
real culprit is here...

Setting TEXMF this way feels like a random and accidentally
working hack and I already feel the next problem raising up
at the horizon...

Some additional problems:

tlmgr does not work

mtxrun partially does not find its own modules

mtxrun --variables 

lists a LOT of unset environment variables

...

It looks like some basic and fundamental "initial" environment
variable is missing.

But I need a knowledgeable guru before I am able to get nearer
to the root of the culprit.

Thank you very much in advance for any help offered!

\cheers
Meino
___
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 Wolfgang Schuster

jbf schrieb am 05.09.2020 um 03:35:
Now that with Hraban's invaluable assistance I am able to include title, 
subtitle, author as and when necessary in the ToC and put them on the 
same line if I need to, I have two questions that I have not found a 
satisfactory solution to after playing around with various possibilities.


I need:

(1) the author's names lined up vertically throughout the ToC, and

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


An adjusted version of Hraban's setup can show what I have tried by way 
of example:


%

\define[1]\TitleTocEntry{%
   #1\hskip 1cm% title
    \structurelistuservariable{author}%
   }

\setuplist[title][textstyle=bold,
   textcommand=\TitleTocEntry,
]

%---

/Question 1:/ /How to get the two author names to line up vertically./ 
Given that I have both a Foreword and a Preface, I am using \title for 
these. And both have separate authors. The titles will be simply 
'Foreword' and 'Preface', obviously.


*Foreword Author name*

*Preface    Author name*

I am using \hskip 1cm to separate the authors' names from either of 
those two words. But this does not give me the kind of exact positioning 
I need to get the two author names directly underneath each other in the 
list. I have tried various alternatives to \hskip, but none of them can 
give me the correct proportional distance. The distance is obviously 
being controlled by the fact that 'Foreword' is 8 characters and 
'Preface' is 7. Is what I want only obtainable with a table setup?


The issue might or might not be more complicated when I get to main 
chapters, where the author names need to line up with the Foreword and 
Preface author names as well. There will be, e.g.


Chapter One  Title

    Author name
//

/Question 2:/ /How to independently get Foreword and Preface to be bold, 
but the authors' names to be regular./ \setuplist offers me options like 
textstyle, pagestyle, numberstyle, but they apply to everything (both 
Foreword/Preface and Authors' name are bold). I thought perhaps I could 
control it from within the document, e.g.


\starttitle[title={\ss\bf Foreword}][author={A. Uthor}]

But that does the same - both Foreword and A. Uthor end up bold. And 
besides, I also want to style the ToC independently of the heads if I can.


The wiki and various manuals do offer various tips on modifying the ToC, 
but I cannot find anything regarding the two questions above - not yet, 
anyway. If someone knows where, please point me to it.


\define[3]\ChapterListCommand
  {\hbox\bgroup
 \hbox to 3cm{\currentlistsymbol\hss}% number + labeltext
 \vtop\bgroup
   \hsize\dimexpr\makeupwidth-3cm\relax
   \doifsomething{\rawstructurelistuservariable{year}}
 {{\it\structurelistuservariable{year}}\crlf}%
   \currentlistentrytitle % title
   \doifsomething{\rawstructurelistuservariable{year}}
 {\crlf{\bf\structurelistuservariable{author}}}%
   \hfill\currentlistentrypagenumber % pagenumber
 \egroup
   \egroup}

\setuplist
  [chapter]
  [label=chapter,
   alternative=command,
   command=\ChapterListCommand]

\setuplabeltext
  [en]
  [chapter=Chapter ]

\starttext

\completecontent

\startchapter [title={Chapter title}] [author={Author 
Name},year={1980--2000}]

\unknown
\stopchapter

\stoptext

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