Re: [NTG-context] Framed & before/after

2018-03-21 Thread Henri Menke
On Wed, 2018-03-21 at 14:24 +0100, Procházka Lukáš Ing. wrote:
> Hello,
> 
> does \framed recognize before and after keys, as mentioned here:
> 
>   http://wiki.contextgarden.net/Command/defineframed
> or:   http://wiki.contextgarden.net/Command/setupframedtexts ?
> 
> In the following example it seems both keys are ignored:

Is this going to do what you need?

\defineframed[AddressBox][extras=\red]

\starttext
   \green A
   \AddressBox{\cldcontext{"Hele"}}
   B
\stoptext

> 
> 
> \defineframed[AddressBox][before=\red,after=\small]
> 
> \starttext
>    \green A
>    \AddressBox{\cldcontext{"Hele"}}
>    B
> \stoptext
> 
> 
> Best regards,
> 
> Lukas
> 
> 
> __
> _
> 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
___

[NTG-context] (again) issue with lpath and conditional

2018-03-21 Thread Pablo Rodriguez
Dear list,

I have the following sample:

  \startbuffer[demo]
  

  
a
  


  
b
  

  
  \stopbuffer

  \startxmlsetups xml:initialize
 \xmlsetsetup{#1}{doc}{xml:*}
 \xmlsetsetup{\xmldocument}
{pre[contains(@class,'typeset')]/code}
{xml:pre:code}
  \stopxmlsetups

  \xmlregistersetup{xml:initialize}

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

  \startxmlsetups xml:pre:code
\xmlinfo{#1}
\xmlpath{#1}
\xmldoifelse{#1}{../pre[contains(@class,'fullwidth')]}
%~ \xmldoifelse{#1}{{pre[class*="fullwidth"]}}
  {\startpar Full–width.\stoppar}
  {\startpar Another width.\stoppar}
  \stopxmlsetups

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

It is beyond my kmowledge why the lpath
"{../pre[contains(@class,'fullwidth')]}" doesn’t return true, when
\xmlinfo shows "[code]" and \xmlpath is "doc/pre/code" (indices aren’t
relevant here).

Neither does the css selector work.

What am I missing in the lpath and the css selector?

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] Question about paragraphs and hanging punctuation

2018-03-21 Thread Pablo Rodriguez
On 03/20/2018 09:59 PM, Tomas Hala wrote:
> Hi Pablo,
> 
> thank you very much, you are right.
> The align={hz, hanging} is not documented on the wiki, so I did not think 
> about it. 

Hi Tomáš,

your local tex/texmf-context/tex/context/interface/mkiv/i-context.pdf is
really your friend here.

> The proper solution for my problem is this:
> 
> \setupparagraphs[align={hz, hanging}]

I only wanted to test whether microtypography was working. I can detect
a text with hanging punctuation, but I’m not able to detect whether the
text has the hz algorithm or not ;-).

> which sets all columns for all kinds of paragraphs defined by 
> \defineparagraphs
> (for normal text is necessary to set it separately). 

Alignment for body text is specified with \setupalignment. Even
footnotes may have a different alignment.

I hope it helps,

Pablo


> Tue, Mar 20, 2018 ve 08:30:24PM +0100 Pablo Rodriguez napsal(a):
> # On 03/20/2018 08:17 PM, Tomas Hala wrote:
> # > Hi all,
> # > 
> # > I used together hanging punctuation and define/setup paragraphs
> # > (tested on TL2017, current CTX).
> # > Unfortunately, inside the paragraph environment the hanging
> # > punctuation settings is ignored.> Moreover, it seems that attributes 
> inner= and command= works only for
> # > the first paragraph (column).
> # Hi Tomáš,
> # 
> # \setupparagraphs has an align key.
> # 
> # This command works with your sample:
> # 
> #   \setupparagraphs[somepars][2][align={hz, hanging}]
> # 
> # I hope it helps,
> # 
> # 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] Framed & before/after

2018-03-21 Thread Pablo Rodriguez
On 03/21/2018 02:24 PM, Procházka Lukáš Ing. wrote:
> Hello,
> 
> does \framed recognize before and after keys, as mentioned here:
> 
>   http://wiki.contextgarden.net/Command/defineframed
> or:   http://wiki.contextgarden.net/Command/setupframedtexts ?

Hi Lukáš,

\framed inherits from \setupframed (as explained in
tex/texmf-context/tex/context/interface/mkiv/i-context.pdf).

\setupframedtext (which I don’t think is exactly the same as
\setupframed) inherits from \setupplacement (which contains both keys
before and after).

That being said, I don’t know why before and after don’t work with
framed texts.

Pablo


> In the following example it seems both keys are ignored:
> 
> 
> \defineframedtext[AddressBox][before=\red,after=\small]
> 
> \starttext
>\green A
>\AddressBox{\cldcontext{"Hele"}}
>B
> \stoptext
> 
> 
> Best regards,
> 
> Lukas


-- 
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] Support for musl

2018-03-21 Thread Mojca Miklavec
On 19 January 2018 at 11:40, Henri Menke wrote:
> Dear list,
>
> I'd like to support Linux platforms which use musl 
> (https://www.musl-libc.org/) instead of glibc, like for instance Alpine Linux.

I have added the TeX Live binaries. So in principle this could work now:

rsync -ptv rsync://contextgarden.net/standalone/setup/first-setup.sh .
./first-setup.sh

but I suspect that some changes in mtxrun might be needed for this to
work properly.

Mojca
___
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] Framed & before/after

2018-03-21 Thread Procházka Lukáš Ing .

Hello,

does \framed recognize before and after keys, as mentioned here:

http://wiki.contextgarden.net/Command/defineframed
or: http://wiki.contextgarden.net/Command/setupframedtexts ?

In the following example it seems both keys are ignored:


\defineframed[AddressBox][before=\red,after=\small]

\starttext
  \green A
  \AddressBox{\cldcontext{"Hele"}}
  B
\stoptext


Best regards,

Lukas


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

~2~.mkiv
Description: Binary data


~2~.pdf
Description: Adobe PDF document
___
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
___