Re: [NTG-context] Heros condensed and Font switching

2009-11-23 Thread Wolfgang Murth
 

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
___


Re: [NTG-context] Heros condensed and Font switching

2009-11-23 Thread Thomas A. Schmitz

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
___


Re: [NTG-context] Heros condensed and Font switching

2009-11-23 Thread Willi Egger

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
___


Re: [NTG-context] Heros condensed and Font switching

2009-11-23 Thread Wolfgang Schuster

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
___


Re: [NTG-context] Heros condensed and Font switching

2009-11-23 Thread Wolfgang Murth


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
___


Re: [NTG-context] Heros condensed and Font switching

2009-11-23 Thread Hans Hagen

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
___


Re: [NTG-context] Heros condensed and Font switching

2009-11-23 Thread Wolfgang Murth

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
___


Re: [NTG-context] Heros condensed and Font switching

2009-11-23 Thread Hans Hagen

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
___


Re: [NTG-context] Heros condensed and Font switching

2009-11-23 Thread Wolfgang Schuster

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
___


[NTG-context] Heros condensed and Font switching

2009-11-21 Thread Wolfgang Murth

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
___