Re: [NTG-context] abbreviations as macros (Aditya Mahajan) (Aditya Mahajan)

2010-08-09 Thread Armin Varmaz
>\defineframedtext[important][style={\switchtobodyfont[24pt]\ImportantStyle}]
>
>(which will scale the math font, but not change it to Kurier-Bold).



>Or you can define a typescript for kurier-bold (see type-otf for 
>examples), and then use
>
>\usetypescript[kurier-bold]
>
>\defineframedtext[important][style={\switchtobodyfont[kurier-bold,24pt]}]
>
>Aditya
>

Hi Aditya,

your first solution works very well. You saved my day, thanks a lot! I think 
Hans tried to explain it to me but I didn't get him.

I have read the documentation about typescripts but I did not understand it 
well. Let's say I have the following simple example:

\starttypescript[sans][test]
 \definefontsynonym[Test] [file:FuturaStd][features=default]   
\stoptypescript

how can I use it in 'usetypescript' now to change the font type? 

I tried 

\usetypescript[test] and \usetypescript[sans][test] 

followed by

\defineframedtext[important][style={\switchtobodyfont[test,24pt]}]

but it didn't work (to be specific, the font size is ok, but the font type did 
not change)

Armin
___
WEB.DE DSL SOMMER-SPECIAL: Surf & Phone Flat 16.000 für 
nur 19,99 ¿/mtl.!* http://web.de/DSL-Doppel-Flatrate/
___
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] abbreviations as macros (Aditya Mahajan)

2010-08-08 Thread Armin Varmaz
>Message: 5
>Date: Sat, 7 Aug 2010 11:10:21 -0400 (EDT)
>From: Aditya Mahajan [
>To: mailing list for ConTeXt users 
>Subject: Re: [NTG-context] abbreviations as macros
>Message-ID: [
>Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed
>
>On Sat, 7 Aug 2010, ivo welch wrote:
>
>
>If you never need to use a full form of the abbreviation, then you can 
>just use the same in ConTeXt. The equivalent of \ensuremath is \math; 
>everything else is the same.
>
>\define\NPV{\text{NPV\math{_0}}
>
>I would, however, write this slightly differently (even in LaTeX) as
>
>\math{\text{NPV}_0}
>
>but that is just a stylistic issue.
>
>> Is there a recommended way to do this on conTeXt?
>
>The usual way of defining abbreviations in ConTeXt is
>
>\abbreviation [NPV] {\math{\text{NPV}_0}} {full form}
>
>Then you can use
>
>\NPV\ for a short form of the abbreviation and \infull{NPV} for the full 
>form. The advantage is that you can also get a list of used abbreviations.
>
>
>Aditya

Hi Aditya,

can you tell me how I can ensure as in AMSmath that the font size in 
abbreviations automatically match the font size of current text?  see my 
example below. 

Best Armin

 EXAMPLE

\definealternativestyle[ImportantStyle][{\definedfont[Kurier-Bold at 24pt]}]


\definetextbackground[zhu]
 [location=paragraph,
 background=color,backgroundcolor=orange,
 leftoffset=0.5\bodyfontsize,rightoffset=.5\bodyfontsize,
 topoffset=.5\bodyfontsize,bottomoffset=.5\bodyfontsize,
 style=ImportantStyle,
 frame=off]


\startsetups important:start
 \starttextbackground[zhu] 
\stopsetups


\startsetups important:stop
 \endgraf
 \stoptextbackground
\stopsetups


\definestartstop
 [important]
 [before=\setups{important:start},
 after=\setups{important:stop}]

\abbreviation [NPV] {\math{\text{NPV}}} {full form} 

\starttext

this looks normal $x$, \NPV.

\startimportant
this looks bad \mathematics{x}, \NPV.
\stopimportant

this looks normal $x$, \NPV.

\stoptext

 END EXAMPLE
___
WEB.DE DSL SOMMER-SPECIAL: Surf & Phone Flat 16.000 für 
nur 19,99 ¿/mtl.!* http://web.de/DSL-Doppel-Flatrate/
___
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] font size in math mode

2010-07-27 Thread Armin Varmaz
Hi Hans, hi guys,


thanks for the explanation! 


Does this mean that each time I want to change the font size of the text (e.g. 
for a floating object or framed text) I must do this manually for mathematics? 
or is there a way to adopt the font size of the text to mathematics? see below 
for an example what I mean. Here, I used definetextbackground but the effect 
remains in floating objects as well. I tried different font styles and 
different font types, too.


Armin  

** EXAMPLE


\definealternativestyle[ImportantStyle][{\definedfont[Kurier-Bold at 24pt]}]


\definetextbackground[zhu]
 [location=paragraph,
 background=color,backgroundcolor=orange,
 leftoffset=0.5\bodyfontsize,rightoffset=.5\bodyfontsize,
 topoffset=.5\bodyfontsize,bottomoffset=.5\bodyfontsize,
 style=ImportantStyle,
 frame=off]


\startsetups important:start
 \starttextbackground[zhu]
\stopsetups


\startsetups important:stop
 \endgraf
 \stoptextbackground
\stopsetups


\definestartstop
 [important]
 [before=\setups{important:start},
 after=\setups{important:stop}]


\starttext


this looks normal $x$.


\startimportant
this uses the environment definetextbackground \mathematics{x}.
\stopimportant
\stoptext

** END EXAMPLE
___
WEB.DE DSL ab 19,99 Euro/Monat. Bis zu 150,- Euro Startguthaben und 
50,- Euro Geldprämie inklusive! https://freundschaftswerbung.web.de
___
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] font size in math mode

2010-07-23 Thread Armin Varmaz
 
Hi guys 
 
is there a way to put the size fonts in formulas and the size of symbols in \mathematics to the local size font, e.g. used in a text box? I found that ConTeXt does not use the appropriate font size in {\tfxx } or in \tfx. below a mini example.
 
what am I doing wrong? maybe I damaged my context installation somehow. 
 
Armin
 
**
 
\starttext
this looks normal $x$.
 
this looks normal \mathematics{x}.
 
{\tfxx this looks bad $x$.}
 
{\tfxx this looks bad \mathematics{x}, too.}
 
{\tfd interestingly this looks good \mathematics{x}.}
 
{\tfc this looks good \mathematics{x}.}
 
{\tfb this looks good \mathematics{x}.}
 
{\tfa this looks good \mathematics{x}.}
 
{\tfxx this looks bad \mathematics{x}.}
 
\stoptext   

  Neu: WEB.DE De-Mail - Einfach wie E-Mail, sicher wie ein Brief!     Jetzt De-Mail-Adresse reservieren: https://produkte.web.de/go/demail02

___
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] width of definetextbackground

2010-07-15 Thread Armin Varmaz
Hallo,

 

I am wondering if there is an option in \definetextbackground to get the
output over the entire width of a page? I mean to go over the width of the
\textwidth (for example like
\setlayout[width=\textwidth+\outermargintotal])?  

 

I played with \setuplayout before calling textbackground, but it did not
work perfectly since the layout of the text after \definetextbackground was
changed as well; \setuplayout[reset] before stopping the textbackground did
not help. 

 

I read the solutions proposed by Aditya but they did not help. Have you any
ideas how to get it?

 

Armin

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