Re: [NTG-context] issue with css selector in lpath

2017-12-14 Thread Hans Hagen

On 12/14/2017 10:18 PM, Pablo Rodriguez wrote:

On 12/14/2017 09:39 PM, Hans Hagen wrote:

On 12/14/2017 8:46 PM, Pablo Rodriguez wrote:

.header works fine, it is only #header that breaks compiliation.

I hope Hans can fix it (or explain what I’m doing wrong).


There's nothing to fix, as mentioned already # is kind of special in
tex, so you need to escape it:

\xmlsetsetup{#1}{{\letterhash header}}{xml:header:id}


Many thanks for your reply, Hans.

I got it now. xml-mkiv.pdf contains not escaped samples of css
identifier selectors, which contributes to the confusion.

Since the selector is basic in css (and escaping it gives a very weird
css), could you consider that it might not be required to escape # as
css selector?


then #1 would not work


(I would ask the same also for %, but I have never seen it in css.)

Many thanks for your help,

Pablo




--

-
  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] issue with css selector in lpath

2017-12-14 Thread Pablo Rodriguez
On 12/14/2017 09:39 PM, Hans Hagen wrote:
> On 12/14/2017 8:46 PM, Pablo Rodriguez wrote:
>> .header works fine, it is only #header that breaks compiliation.
>>
>> I hope Hans can fix it (or explain what I’m doing wrong).
> 
> There's nothing to fix, as mentioned already # is kind of special in 
> tex, so you need to escape it:
> 
> \xmlsetsetup{#1}{{\letterhash header}}{xml:header:id}

Many thanks for your reply, Hans.

I got it now. xml-mkiv.pdf contains not escaped samples of css
identifier selectors, which contributes to the confusion.

Since the selector is basic in css (and escaping it gives a very weird
css), could you consider that it might not be required to escape # as
css selector?

(I would ask the same also for %, but I have never seen it in css.)

Many thanks for your help,

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] issue with css selector in lpath

2017-12-14 Thread Hans Hagen

On 12/14/2017 8:46 PM, Pablo Rodriguez wrote:

On 12/13/2017 10:22 AM, MF wrote:

Il giorno mar, 12/12/2017 alle 22.36 +0100, Pablo Rodriguez ha scritto:

[...]
But {header, #header} shouldn’t be a problem, accorrding to
http://pragma-ade.com/general/manuals/xml-mkiv.pdf#page=34.

If this isn’t a bug, I wonder what I’m doing wrong.


Could you send a minimal (not) working example?


Here you have it:

 \startbuffer[demo]
 
 
 Document Title
 Text from paragraph.
 
 
 Document Title
 Text from paragraph.
 
 
 Document Title
 Text from paragraph.
 
 
 \stopbuffer

 \startxmlsetups xml:initialize
  \xmlsetsetup{#1}{doc|p}{xml:*}
  \xmlsetsetup{#1}{{header}}{xml:header}
  \xmlsetsetup{#1}{{.header}}{xml:header:class}
  %~ \xmlsetsetup{#1}{{#header}}{xml:header:id}
  \xmlsetsetup{#1}{{id="header"}}{xml:header:id}
 \stopxmlsetups

 \xmlregistersetup{xml:initialize}

 \startxmlsetups xml:doc
\xmlflush{#1}
 \stopxmlsetups

 \startxmlsetups xml:header
\startalign[left]\xmlflush{#1}\stopalign
 \stopxmlsetups

 \startxmlsetups xml:header:class
\start\em\xmlflush{#1}\stop
 \stopxmlsetups

 \startxmlsetups xml:header:id
\startalign[right]\xmlflush{#1}\stopalign
 \stopxmlsetups

 \startxmlsetups xml:p
\xmlflush{#1}
 \stopxmlsetups

 \starttext
 \xmlprocessbuffer{main}{demo}{}
 \stoptext

.header works fine, it is only #header that breaks compiliation.

I hope Hans can fix it (or explain what I’m doing wrong).
There's nothing to fix, as mentioned already # is kind of special in 
tex, so you need to escape it:


\xmlsetsetup{#1}{{\letterhash header}}{xml:header:id}

The same is true for % : \letterpercent.

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] issue with css selector in lpath

2017-12-14 Thread Pablo Rodriguez
On 12/13/2017 10:22 AM, MF wrote:
> Il giorno mar, 12/12/2017 alle 22.36 +0100, Pablo Rodriguez ha scritto:
>> [...]
>> But {header, #header} shouldn’t be a problem, accorrding to
>> http://pragma-ade.com/general/manuals/xml-mkiv.pdf#page=34.
>>
>> If this isn’t a bug, I wonder what I’m doing wrong.
> 
> Could you send a minimal (not) working example?

Here you have it:

\startbuffer[demo]


Document Title
Text from paragraph.


Document Title
Text from paragraph.


Document Title
Text from paragraph.


\stopbuffer

\startxmlsetups xml:initialize
 \xmlsetsetup{#1}{doc|p}{xml:*}
 \xmlsetsetup{#1}{{header}}{xml:header}
 \xmlsetsetup{#1}{{.header}}{xml:header:class}
 %~ \xmlsetsetup{#1}{{#header}}{xml:header:id}
 \xmlsetsetup{#1}{{id="header"}}{xml:header:id}
\stopxmlsetups

\xmlregistersetup{xml:initialize}

\startxmlsetups xml:doc
   \xmlflush{#1}
\stopxmlsetups

\startxmlsetups xml:header
   \startalign[left]\xmlflush{#1}\stopalign
\stopxmlsetups

\startxmlsetups xml:header:class
   \start\em\xmlflush{#1}\stop
\stopxmlsetups

\startxmlsetups xml:header:id
   \startalign[right]\xmlflush{#1}\stopalign
\stopxmlsetups

\startxmlsetups xml:p
   \xmlflush{#1}
\stopxmlsetups

\starttext
\xmlprocessbuffer{main}{demo}{}
\stoptext

.header works fine, it is only #header that breaks compiliation.

I hope Hans can fix it (or explain what I’m doing wrong).

Many thanks for your help,

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] Small caps and bold

2017-12-14 Thread Procházka Lukáš Ing .

Hello,

On Thu, 14 Dec 2017 10:16:33 +0100, Hans Hagen  wrote:


On 12/14/2017 8:37 AM, Procházka Lukáš Ing. wrote:

Hello,

I'm trying to typeset some text in bold + smallcaps.

But even the sample on wiki:

 http://wiki.contextgarden.net/Bold_small_caps

extended to:


\starttext
   \setff{smallcaps} Normal and \bf bold Small Caps.

   {\sc Normal and \bf bold Small Caps.}
\stoptext


doesn't produce bold small caps - see the attached files.

So - how to get bold small caps?

at least you need a bold font that has smallcaps ...


how do I get list of fonts which provide bold+smallcaps?

With "mtxrun --script font --list --all ..." somehow?

Rest regards,

Lukas



Hans



--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz | 
IDDS:nrpt3sn
Bezová 1658
147 14 Praha 4

Mob.: +420 702 033 396

___
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] Header after a chapter title

2017-12-14 Thread Alexey Kryukov
Dear list,

sorry for probably a stupid question. The problem looks obvious, but I
could not find a solution by googling the list archive. Suppose I want
to have a chapter head on a separate page. The chapter includes some
sections, each starting from its own page too (so I don't want a
header on the pages where a section starts). The following example
is simplified (I actually have a 'command' option for chapters):

\setuphead[chapter][
  after={\page[empty,odd]},
  page=odd,
  header=empty,
]

\setuphead[section][
  page=yes,
  header=empty,
]

\starttext
\startbodymatter
\chapter{My Chapter}
\section{My First Section}
\input{knuth}
\section{My Second Section}
\input{knuth}
\stopbodymatter
\stoptext

Now you can see that the "header=empty" setting is ignored for the
first section (one immediately following the chapter head). So, how
can I get rid of the header in this case?

-- 
Regards,
Alexey Kryukov 

Moscow State University
Faculty of History
___
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
___