Re: [NTG-context] issues with typeface selection

2015-08-10 Thread Pablo Rodriguez
On 08/09/2015 07:02 PM, Hans Hagen wrote:
> [...]
> hm, hard to catch (esp if we want to do that everywhere it will be a 
> slow downer) ... i'll do it for cells but so far other mechanisms were 
> less sensitive for this (we'd need an extension to luatex for handling 
> such cases ... maybe i'll look into that later)
> 
> as i don't upload today you can test
> 
> \setupxtable[newtimes][foregroundstyle=\newtimes]
> \startxcell[newtimes]  ...\stopxcell

Many thanks for your fix, Hans.

It works perfect now.


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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] issues with typeface selection

2015-08-09 Thread Hans Hagen

On 8/9/2015 8:24 PM, Wolfgang Schuster wrote:

Hans Hagen 
9. August 2015 19:02


hm, hard to catch (esp if we want to do that everywhere it will be a
slow downer) ... i'll do it for cells but so far other mechanisms were
less sensitive for this (we'd need an extension to luatex for handling
such cases ... maybe i'll look into that later)

Shouldn’t be something like this enough (even though a better solution
to prevent expension here would be nice):

\unexpanded\def\tabl_x_start_cell_delayed_one[#tag]%
% {\ifcsname\namedxtablehash{#tag}\s!parent\endcsname
- {\ifcsname\??xtablecheck#tag\endcsname
+ {\ifcsname\??xtablecheck\detokenize\expandafter{#tag}\endcsname
  \expandafter\tabl_x_start_cell_delayed_two
\else
  \expandafter\tabl_x_start_cell_yes
\fi[#tag]}


you're close, the catch i referred to is:


{\ifcsname\??xtablecheck\detokenize\expandafter{\normalexpanded{#tag}}\endcsname

because we need at least some expansion

Hans


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
 | 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] issues with typeface selection

2015-08-09 Thread Wolfgang Schuster

Hans Hagen 
9. August 2015 19:02


hm, hard to catch (esp if we want to do that everywhere it will be a 
slow downer) ... i'll do it for cells but so far other mechanisms were 
less sensitive for this (we'd need an extension to luatex for handling 
such cases ... maybe i'll look into that later)
Shouldn’t be something like this enough (even though a better solution 
to prevent expension here would be nice):


\unexpanded\def\tabl_x_start_cell_delayed_one[#tag]%
% {\ifcsname\namedxtablehash{#tag}\s!parent\endcsname
- {\ifcsname\??xtablecheck#tag\endcsname
+ {\ifcsname\??xtablecheck\detokenize\expandafter{#tag}\endcsname
 \expandafter\tabl_x_start_cell_delayed_two
   \else
 \expandafter\tabl_x_start_cell_yes
   \fi[#tag]}

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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] issues with typeface selection

2015-08-09 Thread Hans Hagen

On 8/9/2015 4:06 PM, Pablo Rodriguez wrote:

On 08/08/2015 04:18 PM, Wolfgang Schuster wrote:

[...]
All I can tell at the moment is that the problem is related to the “x”
font size.

\starttext

\startxtable
 \startxrow
 \startxcell[foregroundstyle=\txx] % this fails: foregroundstyle=\tx
 \CONTEXT
 \stopxcell
 \stopxrow
\stopxtable

\stoptext


Wolfgang,

I’m afraid that compilation also crashes with font commands in
foregroundstyle:

 \definefontfamily[newtimes][serif][TeX Gyre Termes]
 \setupbodyfont[palatino, 12pt]
 \setuphead[section][style=\newtimes\tfx]
 \starttext
 \section{Comparision}
 \startxtable
 \startxrow
 \startxcell[foregroundstyle=\newtimes] \ConTeXt\stopxcell
 \stopxrow
 \stopxtable
 \stoptext


hm, hard to catch (esp if we want to do that everywhere it will be a 
slow downer) ... i'll do it for cells but so far other mechanisms were 
less sensitive for this (we'd need an extension to luatex for handling 
such cases ... maybe i'll look into that later)


as i don't upload today you can test

\setupxtable[newtimes][foregroundstyle=\newtimes]
\startxcell[newtimes]  ...\stopxcell



-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
 | 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] issues with typeface selection

2015-08-09 Thread Pablo Rodriguez
On 08/08/2015 04:18 PM, Wolfgang Schuster wrote:
> [...]
> All I can tell at the moment is that the problem is related to the “x”
> font size.
> 
> \starttext
> 
> \startxtable
> \startxrow
> \startxcell[foregroundstyle=\txx] % this fails: foregroundstyle=\tx
> \CONTEXT
> \stopxcell
> \stopxrow
> \stopxtable
> 
> \stoptext

Wolfgang,

I’m afraid that compilation also crashes with font commands in
foregroundstyle:

\definefontfamily[newtimes][serif][TeX Gyre Termes]
\setupbodyfont[palatino, 12pt]
\setuphead[section][style=\newtimes\tfx]
\starttext
\section{Comparision}
\startxtable
\startxrow
\startxcell[foregroundstyle=\newtimes] \ConTeXt\stopxcell
\stopxrow
\stopxtable
\stoptext


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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] issues with typeface selection

2015-08-08 Thread Wolfgang Schuster

Pablo Rodriguez 
8. August 2015 13:22

Many thanks for your help, Wolfgang.

Of course, you are right. I know that, but I mistyped it.

Although I still having problems with foregroundstyle, such as in:

\definefontfamily[newtimes][serif][FreeSerif]
\definefontfamily[droidserif][serif][Droid Serif]
\setupbodyfont[palatino, 12pt]
\setuphead[section][style=\newtimes\tfx]
\starttext
\section{Comparision}
\startxtable
\startxrow
\startxcell[foregroundstyle=\newtimes\tfx] \ConTeXt\stopxcell
\startxcell[foregroundstyle=\droidserif\tfx] \ConTeXt\stopxcell
\stopxrow
\stopxtable
\stoptext

Is there a way to add both commands to foregroundstyle? Or how can I get
both commands in the xcell?
All I can tell at the moment is that the problem is related to the “x” 
font size.


\starttext

\startxtable
\startxrow
\startxcell[foregroundstyle=\txx] % this fails: foregroundstyle=\tx
\CONTEXT
\stopxcell
\stopxrow
\stopxtable

\stoptext

BTW: Can you avoid using fonts which aren’t available on all systems.

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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] issues with typeface selection

2015-08-08 Thread Pablo Rodriguez
On 08/08/2015 11:44 AM, Wolfgang Schuster wrote:
>> Pablo Rodriguez 7. August 2015 18:52:
>> [...]
>> Wnat am I missing in each case?
> 
> There is no \ttfx font switch command, what ConTeXt has is \tfx (with
> one “t” in the name) which switches to a smaller size for the upright
> font and \tttfx (with three “t” in the name) which switches to a
> smaller size for the upright typewriter font.

Many thanks for your help, Wolfgang.

Of course, you are right. I know that, but I mistyped it.

Although I still having problems with foregroundstyle, such as in:

\definefontfamily[newtimes][serif][FreeSerif]
\definefontfamily[droidserif][serif][Droid Serif]
\setupbodyfont[palatino, 12pt]
\setuphead[section][style=\newtimes\tfx]
\starttext
\section{Comparision}
\startxtable
\startxrow
\startxcell[foregroundstyle=\newtimes\tfx] \ConTeXt\stopxcell
\startxcell[foregroundstyle=\droidserif\tfx] \ConTeXt\stopxcell
\stopxrow
\stopxtable
\stoptext

Is there a way to add both commands to foregroundstyle? Or how can I get
both commands in the xcell?

Many thanks for your help again,


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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] issues with typeface selection

2015-08-08 Thread Wolfgang Schuster

Pablo Rodriguez 
7. August 2015 18:52
Dear list,

I have the following sample:

\definefontfamily[timesnew][serif][FreeSerif]
\definefontfamily[droidserif][serif][Droid Serif]
\setupbodyfont[palatino, 12pt]
\starttext
I want to have \type{\timesnew\ttfx} and \type{\droidserif\ttfx}
in each cell, but \type{foregroundstyle} doesn’t seem to work
(compilation crashes).
\startxtable
\blank
\startxrow
\startxcell \ConTeXt\ is awesome!\stopxcell
\startxcell \ConTeXt\ is awesome!\stopxcell
\stopxrow
\stopxtable
\blank
Typeface selection doesn’t seem to work even with paragraphs:
\defineparagraphs[timesdroid][each][n=2, before=\blank]
\defineparagraphs[timesdroid][1][style=\newtimes]
\defineparagraphs[timesdroid][2][style=\droidserif]
\starttimesdroid
\ConTeXt\ is awesome!
\timesdroid
\ConTeXt\ is awesome!
\stoptimesdroid
\stoptext

All I need is to be able to have a text with a given font family and a
smaller font size on the left and the same text with the same font size
but another font family on the right.

I have failed with both xtables and paragraphs.

Wnat am I missing in each case?
There is no \ttfx font switch command, what ConTeXt has is \tfx (with 
one “t” in the name)
which switches to a smaller size for the upright font and \tttfx (with 
three “t” in the name)

which switches to a smaller size for the upright typewriter font.

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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] issues with typeface selection

2015-08-07 Thread Pablo Rodriguez
On 08/07/2015 06:52 PM, Pablo Rodriguez wrote:
> Dear list,
> 
> I have the following sample:
> [...]
> Typeface selection doesn’t seem to work even with paragraphs:
> \defineparagraphs[timesdroid][each][n=2, before=\blank]
> \defineparagraphs[timesdroid][1][style=\newtimes]
> \defineparagraphs[timesdroid][2][style=\droidserif]

Partially replying to myself.

After defining a paragraphs environment, I have to set them up, not to
define them again.

So the code above should read:

\defineparagraphs[timesdroid][each][n=2, before=\blank]
\setupparagraphs[timesdroid][1][style=\newtimes]
\setupparagraphs[timesdroid][2][style=\droidserif]

But I don’t know what is wrong is foregroundstyle in xtables.

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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___