Re: [NTG-context] removing word in filtered XML

2020-08-21 Thread Pablo Rodriguez
On 8/21/20 2:59 PM, Hans Hagen wrote:
> On 8/20/2020 4:20 PM, Pablo Rodriguez wrote:
>
>>\replaceword[whatever][this or][no]
>>\replaceword[whatever][that][]
> this feature creep is in the next upload

Hans,

many thanks for the new feature.

Pablo
--
http://www.ousia.tk
___
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] removing word in filtered XML

2020-08-21 Thread Hans Hagen

On 8/20/2020 4:20 PM, Pablo Rodriguez wrote:


   \replaceword[whatever][this or][no]
   \replaceword[whatever][that][]

this feature creep is in the next upload

Hans

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

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


Re: [NTG-context] Chapter heading with rules

2020-08-21 Thread Otared Kavian
Hi Julian,

Indeed you can acchieve what you want, but it is better to define a command 
which takes care of the number and the title of the chapter at the same time 
(as in \ myChapterCommand below).

%% begin example.tex
\definefiller[ChapterRule]
[alternative=rule,
color=gray,
height=0.8ex,
depth=-0.6ex]

\definefiller[ChapterLeftRule]
[ChapterRule]
[left=\zerowidthnobreakspace,
right=\quad]

\definefiller[ChapterRightRule]
[ChapterRule]
[left=\quad,
right=\zerowidthnobreakspace]

\define[2]\myChapterCommand{%
\midaligned{{\filler[ChapterLeftRule]}#1.~#2{\filler[ChapterRightRule]}}
}

\setuphead[chapter]
[textstyle={\setcharactercasing[WORD]\ssa},
command=\myChapterCommand]

\starttext

\startchapter[title={My Chapter Title}]
\input knuth.tex
\stopchapter

\stoptext

%% end example.tex

Best regards: Otared K.

> On 21 Aug 2020, at 03:53, jbf  wrote:
> 
> Have achieved a Chapter title with rules either side (see below - not an 
> original invention!) but I want the chapter number to be part of 'My Chapter 
> Title'; instead, the following MWE means it comes before the ChapterLeftRule. 
> I know I can do it by actually putting the number before My Chapter title 
> (e.g. 1 My Chapter Title), since the proper numbered version still appears in 
> the TOC, but my preference would be to include a command in the \setuphead, 
> if possible (so long as it still allows the numbered chapter to appear in the 
> TOC of course). Possible?
> 
> \definefiller
>   [ChapterRule]
>   [alternative=rule,
>color=gray,
>height=0.8ex,
>depth=-0.6ex]
> 
> \definefiller
>   [ChapterLeftRule]
>   [ChapterRule]
>   [left=\zerowidthnobreakspace,
>right=\quad]
> 
> \definefiller
>   [ChapterRightRule]
>   [ChapterRule]
>   [left=\quad,
>right=\zerowidthnobreakspace]
> 
> \setuphead
>   [chapter]
>   [%align=middle,
>textstyle={\setcharactercasing[WORD]\ssa},
> textcommand=\groupedcommand{\filler[ChapterLeftRule]}{\filler[ChapterRightRule]}]
> 
> \starttext
> 
> \chapter{My Chapter Title}
> 
> \stoptext
> 
> Julian
> 
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> ___

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