ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* issues with typeface selection
@ 2015-08-07 16:52 Pablo Rodriguez
  2015-08-07 17:31 ` Pablo Rodriguez
  2015-08-08  9:44 ` Wolfgang Schuster
  0 siblings, 2 replies; 10+ messages in thread
From: Pablo Rodriguez @ 2015-08-07 16:52 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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?

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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: issues with typeface selection
  2015-08-07 16:52 issues with typeface selection Pablo Rodriguez
@ 2015-08-07 17:31 ` Pablo Rodriguez
  2015-08-08  9:44 ` Wolfgang Schuster
  1 sibling, 0 replies; 10+ messages in thread
From: Pablo Rodriguez @ 2015-08-07 17:31 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: issues with typeface selection
  2015-08-07 16:52 issues with typeface selection Pablo Rodriguez
  2015-08-07 17:31 ` Pablo Rodriguez
@ 2015-08-08  9:44 ` Wolfgang Schuster
  2015-08-08 11:22   ` Pablo Rodriguez
  1 sibling, 1 reply; 10+ messages in thread
From: Wolfgang Schuster @ 2015-08-08  9:44 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 1514 bytes --]

> Pablo Rodriguez <mailto:oinos@gmx.es>
> 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

[-- Attachment #1.2: Type: text/html, Size: 2636 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: issues with typeface selection
  2015-08-08  9:44 ` Wolfgang Schuster
@ 2015-08-08 11:22   ` Pablo Rodriguez
  2015-08-08 14:18     ` Wolfgang Schuster
  0 siblings, 1 reply; 10+ messages in thread
From: Pablo Rodriguez @ 2015-08-08 11:22 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: issues with typeface selection
  2015-08-08 11:22   ` Pablo Rodriguez
@ 2015-08-08 14:18     ` Wolfgang Schuster
  2015-08-09 14:06       ` Pablo Rodriguez
  0 siblings, 1 reply; 10+ messages in thread
From: Wolfgang Schuster @ 2015-08-08 14:18 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 1167 bytes --]

> Pablo Rodriguez <mailto:oinos@gmx.es>
> 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

[-- Attachment #1.2: Type: text/html, Size: 2308 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: issues with typeface selection
  2015-08-08 14:18     ` Wolfgang Schuster
@ 2015-08-09 14:06       ` Pablo Rodriguez
  2015-08-09 17:02         ` Hans Hagen
  0 siblings, 1 reply; 10+ messages in thread
From: Pablo Rodriguez @ 2015-08-09 14:06 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: issues with typeface selection
  2015-08-09 14:06       ` Pablo Rodriguez
@ 2015-08-09 17:02         ` Hans Hagen
  2015-08-09 18:24           ` Wolfgang Schuster
  2015-08-10 16:05           ` Pablo Rodriguez
  0 siblings, 2 replies; 10+ messages in thread
From: Hans Hagen @ 2015-08-09 17:02 UTC (permalink / raw)
  To: ntg-context

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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: issues with typeface selection
  2015-08-09 17:02         ` Hans Hagen
@ 2015-08-09 18:24           ` Wolfgang Schuster
  2015-08-09 21:36             ` Hans Hagen
  2015-08-10 16:05           ` Pablo Rodriguez
  1 sibling, 1 reply; 10+ messages in thread
From: Wolfgang Schuster @ 2015-08-09 18:24 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 810 bytes --]

> Hans Hagen <mailto:pragma@wxs.nl>
> 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

[-- Attachment #1.2: Type: text/html, Size: 1822 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: issues with typeface selection
  2015-08-09 18:24           ` Wolfgang Schuster
@ 2015-08-09 21:36             ` Hans Hagen
  0 siblings, 0 replies; 10+ messages in thread
From: Hans Hagen @ 2015-08-09 21:36 UTC (permalink / raw)
  To: ntg-context

On 8/9/2015 8:24 PM, Wolfgang Schuster wrote:
>> Hans Hagen <mailto:pragma@wxs.nl>
>> 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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: issues with typeface selection
  2015-08-09 17:02         ` Hans Hagen
  2015-08-09 18:24           ` Wolfgang Schuster
@ 2015-08-10 16:05           ` Pablo Rodriguez
  1 sibling, 0 replies; 10+ messages in thread
From: Pablo Rodriguez @ 2015-08-10 16:05 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2015-08-10 16:05 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-07 16:52 issues with typeface selection Pablo Rodriguez
2015-08-07 17:31 ` Pablo Rodriguez
2015-08-08  9:44 ` Wolfgang Schuster
2015-08-08 11:22   ` Pablo Rodriguez
2015-08-08 14:18     ` Wolfgang Schuster
2015-08-09 14:06       ` Pablo Rodriguez
2015-08-09 17:02         ` Hans Hagen
2015-08-09 18:24           ` Wolfgang Schuster
2015-08-09 21:36             ` Hans Hagen
2015-08-10 16:05           ` Pablo Rodriguez

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).