* Heros condensed and Font switching
@ 2009-11-21 15:06 Wolfgang Murth
2009-11-23 9:07 ` Wolfgang Murth
2009-11-23 9:51 ` Willi Egger
0 siblings, 2 replies; 10+ messages in thread
From: Wolfgang Murth @ 2009-11-21 15:06 UTC (permalink / raw)
To: 'mailing list for ConTeXt users'
Hi Wolfgang, Hi all,
My last post regarding Heros Condensed leads me to another unsolved mystery. I'm working on converting my lecture papers from latex
to ConTeXt, where I also use a condended font, but only for Excel formulas and not as main body font .
For example
> {
> \changefont{cmss}{sbc}{n}\small%
> \begin{tabbing}%
> \hspace{1cm}\=\$E\$9:\$E\$13 <=\$D\$9:\$D\$13\\
> \> {\$F\$18:\$H\$18 >=0}\\
> \end{tabbing}
> }%
My question is how I can change a font only for a particular text. Not only normal->condensed, even change the complete font like
using Zapf for a special markup in a Helvetica/Heros text.
Thanks for you help.
Wolfgang Murth
___________________________________________________________________________________
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: Heros condensed and Font switching
2009-11-21 15:06 Heros condensed and Font switching Wolfgang Murth
@ 2009-11-23 9:07 ` Wolfgang Murth
2009-11-23 9:35 ` Thomas A. Schmitz
2009-11-23 9:51 ` Willi Egger
1 sibling, 1 reply; 10+ messages in thread
From: Wolfgang Murth @ 2009-11-23 9:07 UTC (permalink / raw)
To: 'mailing list for ConTeXt users'
Hi all,
Sorry for popping up that question again, but has anybody a hint for me how to solve it or where I can read more about it?
I'm working on converting my lecture papers from latex to ConTeXt, where I also use a condended font, but only for Excel formulas
and not as main body font .
For example
> {
> \changefont{cmss}{sbc}{n}\small%
> \begin{tabbing}%
> \hspace{1cm}\=\$E\$9:\$E\$13 <=\$D\$9:\$D\$13\\
> \> {\$F\$18:\$H\$18 >=0}\\
> \end{tabbing}
> }%
My question is how I can change a font only for a particular text. Not only normal->condensed, even change the complete font like
using Zapf for a special markup in a Helvetica/Heros text.
Thanks for you help.
Wolfgang Murth
___________________________________________________________________________________
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: Heros condensed and Font switching
2009-11-23 9:07 ` Wolfgang Murth
@ 2009-11-23 9:35 ` Thomas A. Schmitz
0 siblings, 0 replies; 10+ messages in thread
From: Thomas A. Schmitz @ 2009-11-23 9:35 UTC (permalink / raw)
To: mailing list for ConTeXt users
On Nov 23, 2009, at 10:07 AM, Wolfgang Murth wrote:
>
>
> Hi all,
>
> Sorry for popping up that question again, but has anybody a hint for me how to solve it or where I can read more about it?
>
> I'm working on converting my lecture papers from latex to ConTeXt, where I also use a condended font, but only for Excel formulas
> and not as main body font .
> For example
>> {
>> \changefont{cmss}{sbc}{n}\small%
>> \begin{tabbing}%
>> \hspace{1cm}\=\$E\$9:\$E\$13 <=\$D\$9:\$D\$13\\
>> \> {\$F\$18:\$H\$18 >=0}\\
>> \end{tabbing}
>> }%
>
> My question is how I can change a font only for a particular text. Not only normal->condensed, even change the complete font like
> using Zapf for a special markup in a Helvetica/Heros text.
I'm afraid your question is just too vague to allow for meaningful answers. The LaTeX snippet doesn't help because we use ConTeXt. And the answer to "how can I change a font only for a particular text" is \bgroup\switchtobodyfont[something] text \egroup, but I'm sure you know this command. So unless you give us meaningful details or better yet an example, it will be difficult to help you.
Thomas
___________________________________________________________________________________
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: Heros condensed and Font switching
2009-11-21 15:06 Heros condensed and Font switching Wolfgang Murth
2009-11-23 9:07 ` Wolfgang Murth
@ 2009-11-23 9:51 ` Willi Egger
2009-11-23 10:14 ` Wolfgang Schuster
1 sibling, 1 reply; 10+ messages in thread
From: Willi Egger @ 2009-11-23 9:51 UTC (permalink / raw)
To: mailing list for ConTeXt users
Hi,
Load the necessary typescripts at the beginning of the document.
For longer pieces:
\switchtobodyfont[....][...]
For short pieces:
\definedfont[fontname at 12pt]
Kind regards
Willi
On Nov 21, 2009, at 4:06 PM, Wolfgang Murth wrote:
>
> Hi Wolfgang, Hi all,
>
> My last post regarding Heros Condensed leads me to another unsolved
> mystery. I'm working on converting my lecture papers from latex
> to ConTeXt, where I also use a condended font, but only for Excel
> formulas and not as main body font .
> For example
>> {
>> \changefont{cmss}{sbc}{n}\small%
>> \begin{tabbing}%
>> \hspace{1cm}\=\$E\$9:\$E\$13 <=\$D\$9:\$D\$13\\
>> \> {\$F\$18:\$H\$18 >=0}\\
>> \end{tabbing}
>> }%
>
> My question is how I can change a font only for a particular text.
> Not only normal->condensed, even change the complete font like
> using Zapf for a special markup in a Helvetica/Heros text.
>
> Thanks for you help.
>
> Wolfgang Murth
>
> ______________________________________________________________________
> _____________
> 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
> ______________________________________________________________________
> _____________
___________________________________________________________________________________
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: Heros condensed and Font switching
2009-11-23 9:51 ` Willi Egger
@ 2009-11-23 10:14 ` Wolfgang Schuster
2009-11-23 15:27 ` Wolfgang Murth
0 siblings, 1 reply; 10+ messages in thread
From: Wolfgang Schuster @ 2009-11-23 10:14 UTC (permalink / raw)
To: mailing list for ConTeXt users
Am 23.11.2009 um 10:51 schrieb Willi Egger:
> Hi,
>
> Load the necessary typescripts at the beginning of the document.
>
> For longer pieces:
> \switchtobodyfont[....][...]
>
> For short pieces:
> \definedfont[fontname at 12pt]
And for table: \setuptables[bodyfont=...]
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Heros condensed and Font switching
2009-11-23 10:14 ` Wolfgang Schuster
@ 2009-11-23 15:27 ` Wolfgang Murth
2009-11-23 15:36 ` Hans Hagen
0 siblings, 1 reply; 10+ messages in thread
From: Wolfgang Murth @ 2009-11-23 15:27 UTC (permalink / raw)
To: 'mailing list for ConTeXt users'
Thank you all for your input at suggestions. Before I posted my question I did a search in the Wiki and the mailinglist archive but
didn't find a clue.
Finaly I got a working minimal example. The with \definedfont[file:...] I found out that I can use every Font that ist installed on
my Windows System.
Is this a correct way for font switching for a special markup or is there a better or more correct way?
kind regards
Wolfgang Murth
%====================================
%------------------------------------
%
% Define language
\language[de]
\mainlanguage[de]
%------------------------------------
%
% Bodyfont Helvetica
\usetypescript[helvetica][texnansi]
\setupbodyfont[helvetica,ss,10pt]
%------------------------------------
%
% Excel Funcions and Formulas
\def\xlf#1{{\definedfont[file:texgyreheroscn-bold*regular at 10pt]#1}}
\starttext
\chapter{Excel Time and Date}
When using Time and Date calculations with Excel important functions are \xlf{DATUM} and \xlf{ZEIT}.
\stoptext
%====================================
___________________________________________________________________________________
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: Heros condensed and Font switching
2009-11-23 15:27 ` Wolfgang Murth
@ 2009-11-23 15:36 ` Hans Hagen
2009-11-23 17:34 ` Wolfgang Murth
0 siblings, 1 reply; 10+ messages in thread
From: Hans Hagen @ 2009-11-23 15:36 UTC (permalink / raw)
To: mailing list for ConTeXt users
Wolfgang Murth wrote:
>
> Thank you all for your input at suggestions. Before I posted my question I did a search in the Wiki and the mailinglist archive but
> didn't find a clue.
>
> Finaly I got a working minimal example. The with \definedfont[file:...] I found out that I can use every Font that ist installed on
> my Windows System.
>
> Is this a correct way for font switching for a special markup or is there a better or more correct way?
depends on your need,
> % Define language
> \language[de]
> \mainlanguage[de]
no need for \language as you already use \mainlanguage
> %------------------------------------
> %
> % Bodyfont Helvetica
> \usetypescript[helvetica][texnansi]
> \setupbodyfont[helvetica,ss,10pt]
>
> %------------------------------------
> %
> % Excel Funcions and Formulas
> \def\xlf#1{{\definedfont[file:texgyreheroscn-bold*regular at 10pt]#1}}
\def\xlf#1{{\definedfont[SansBold sa 1]#1}}
(current SansBold at bodyfontsize)
\def\xlf#1{{\definedfont[Bold sa 1]#1}}
(current Bold at bodyfontsize)
> \starttext
> \chapter{Excel Time and Date}
>
> When using Time and Date calculations with Excel important functions are \xlf{DATUM} and \xlf{ZEIT}.
best use some uppercase in yoru own names as \xlf can be a pretty
important low level command some day
Hans
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | fax: 038 477 53 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: Heros condensed and Font switching
2009-11-23 15:36 ` Hans Hagen
@ 2009-11-23 17:34 ` Wolfgang Murth
2009-11-23 17:36 ` Hans Hagen
2009-11-23 18:05 ` Wolfgang Schuster
0 siblings, 2 replies; 10+ messages in thread
From: Wolfgang Murth @ 2009-11-23 17:34 UTC (permalink / raw)
To: 'mailing list for ConTeXt users'
Hi Hans,
>depends on your need,
Main text in one font (Helvetica), Excel Formulas in another font (Heros Condensed).
>no need for \language as you already use \mainlanguage
ok
>\def\xlf#1{{\definedfont[Bold sa 1]#1}}
With that I just use the bold style of the current font and not the condensed font or have I seen that wrong?
kind regards
Wolfgang Murth
___________________________________________________________________________________
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: Heros condensed and Font switching
2009-11-23 17:34 ` Wolfgang Murth
@ 2009-11-23 17:36 ` Hans Hagen
2009-11-23 18:05 ` Wolfgang Schuster
1 sibling, 0 replies; 10+ messages in thread
From: Hans Hagen @ 2009-11-23 17:36 UTC (permalink / raw)
To: mailing list for ConTeXt users
Wolfgang Murth wrote:
> Hi Hans,
>
>> depends on your need,
> Main text in one font (Helvetica), Excel Formulas in another font (Heros Condensed).
>
>> no need for \language as you already use \mainlanguage
> ok
>
>> \def\xlf#1{{\definedfont[Bold sa 1]#1}}
> With that I just use the bold style of the current font and not the condensed font or have I seen that wrong?
current bodyfont, and depend on what you've set
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | fax: 038 477 53 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: Heros condensed and Font switching
2009-11-23 17:34 ` Wolfgang Murth
2009-11-23 17:36 ` Hans Hagen
@ 2009-11-23 18:05 ` Wolfgang Schuster
1 sibling, 0 replies; 10+ messages in thread
From: Wolfgang Schuster @ 2009-11-23 18:05 UTC (permalink / raw)
To: mailing list for ConTeXt users
Am 23.11.2009 um 18:34 schrieb Wolfgang Murth:
>> depends on your need,
> Main text in one font (Helvetica), Excel Formulas in another font (Heros Condensed).
With simplefonts you can say (untested):
\mainlanguage[de]
\usemodule[simplefonts][size=10pt]
\setmainfont[Tex Gyre Heros]
\definesimplefonttypeface[excelfont][TeX Gyre Heros][weight=condensed] % will be width=condensed in the next release
\definesimplefont[excelformat][TeX Gyre Heros][weight=condensed,alternative=bold]
\define[1]\XLF{\groupedcommand{\excelformat}{}}
\setuptables[bodyfont=excelfont]
\starttext
\chapter{Excel Time and Date}
When using Time and Date calculations with Excel important functions are \XLF{DATUM} and {\XLF ZEIT}.
\starttable[|l|l|]
\NC text \NC more text \NC\AR
\NC other text \NC fill the rest \NC\AR
\stoptable
\stoptext
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2009-11-23 18:05 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-11-21 15:06 Heros condensed and Font switching Wolfgang Murth
2009-11-23 9:07 ` Wolfgang Murth
2009-11-23 9:35 ` Thomas A. Schmitz
2009-11-23 9:51 ` Willi Egger
2009-11-23 10:14 ` Wolfgang Schuster
2009-11-23 15:27 ` Wolfgang Murth
2009-11-23 15:36 ` Hans Hagen
2009-11-23 17:34 ` Wolfgang Murth
2009-11-23 17:36 ` Hans Hagen
2009-11-23 18:05 ` Wolfgang Schuster
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).