Difference between revisions of "Command/setupbodyfontenvironment"

From Wiki
Jump to navigation Jump to search
m (cleaned up)
(18 intermediate revisions by 5 users not shown)
Line 4: Line 4:
 
}}
 
}}
  
 +
== [[Help:Reference|Syntax]] (autogenerated) ==
 +
<syntax>setupbodyfontenvironment</syntax>
 
== [[Help:Reference|Syntax]] ==
 
== [[Help:Reference|Syntax]] ==
 
<table cellspacing="4" cellpadding="2" class="cmd">
 
<table cellspacing="4" cellpadding="2" class="cmd">
Line 11: Line 13:
 
   <tr valign="top" class="first">
 
   <tr valign="top" class="first">
 
     <td class="cmd">[...]</td>
 
     <td class="cmd">[...]</td>
     <td>see [[Reference/en/setupbodyfont|\setupbodyfont]] </td>
+
     <td>see [[Command/setupbodyfont|\setupbodyfont]] </td>
 
   </tr>
 
   </tr>
 
   <tr valign="top" class="second">
 
   <tr valign="top" class="second">
 
     <td class="cmd">[...,...=...,...]</td>
 
     <td class="cmd">[...,...=...,...]</td>
     <td>see [[Reference/en/setupbodyfont|\setupbodyfont]] </td>
+
     <td>see [[Command/setupbodyfont|\setupbodyfont]] </td>
 
   </tr>
 
   </tr>
 
</table>
 
</table>
Line 26: Line 28:
 
== Example ==
 
== Example ==
  
<pre class="example">
+
<texcode>
\setupbodyfontenvironment [default][em=italic]
+
\setupbodyfontenvironment
 +
    [default][em=italic]
  
 
\em defaults to slanted, this makes \em=\it
 
\em defaults to slanted, this makes \em=\it
</pre>
+
</texcode>
  
 +
The command takes also other arguments such as the ones in the following example:
 +
 +
<texcode>
 +
\setupbodyfont[dejavu]
 +
 +
\setupbodyfontenvironment
 +
[default]
 +
[smallsized=1.25,
 +
  mediumsized=1.5,
 +
  largesized=2.0]
 +
 +
\definefontsize[smallsized]
 +
\definefontsize[mediumsized]
 +
\definefontsize[largesized]
 +
 +
\starttext
 +
 +
\setuphead[chapter]  [style=\bflargesized]
 +
\setuphead[section]  [style=\bfmediumsized]
 +
\setuphead[subsection][style=\bfsmallsized]
 +
 +
\chapter  {Whatever $x-1$}
 +
\section  {Whatever $x-1$}
 +
\subsection{Whatever $x-1$}
 +
 +
\input ward
 +
\blank
 +
Whatever $x-1$
 +
\blank
 +
 +
{\itmediumsized This is italic medium sized. $\cos(x) = {\rm Re}(\exp({\rm i}x))$}
 +
 +
\blank
 +
 +
{\rmmediumsized This is roman medium sized. \crlf
 +
$\cos(x) = {\rm Re}(\exp({\rm i}x))$}
 +
 +
\stoptext
 +
 +
</texcode>
 +
 +
This means that once various sizes have been set, they can be applied to various styles such as<texcode> \rm, \it, \bf </texcode>
 +
by just stating for instance
 +
<texcode>
 +
\rmsmallsized, \itsmallsized, \bfsmallsized
 +
</texcode>
  
 
== See also ==
 
== See also ==
<!-- something like [[cmd:goto|\goto]] -->
+
<!-- something like {{cmd|goto}} -->
 +
 
 +
== Help from ConTeXt-Mailinglist/Forum ==
 +
All issues with:
 +
{{Forum|{{SUBPAGENAME}}}}
  
[[Category:Reference/en|setupbodyfontenvironment]]
+
[[Category:Command/Fonts|setupbodyfontenvironment]]

Revision as of 15:02, 15 October 2019

\setupbodyfontenvironment

Syntax (autogenerated)

\setupbodyfontenvironment[...][...][...=...,...]
[...]name
[...]default dimension
...=...,...inherits from \definebodyfontenvironment


Syntax

\setupbodyfontenvironment[...][...,...=...,...]
[...] see \setupbodyfont
[...,...=...,...] see \setupbodyfont


Description

Example

\setupbodyfontenvironment
    [default][em=italic]

\em defaults to slanted, this makes \em=\it

The command takes also other arguments such as the ones in the following example:

\setupbodyfont[dejavu]

\setupbodyfontenvironment
 [default]
 [smallsized=1.25,
  mediumsized=1.5,
  largesized=2.0]

\definefontsize[smallsized]
\definefontsize[mediumsized]
\definefontsize[largesized]

\starttext

\setuphead[chapter]   [style=\bflargesized]
\setuphead[section]   [style=\bfmediumsized]
\setuphead[subsection][style=\bfsmallsized]

\chapter   {Whatever $x-1$}
\section   {Whatever $x-1$}
\subsection{Whatever $x-1$}

\input ward
\blank
Whatever $x-1$
\blank

{\itmediumsized This is italic medium sized. $\cos(x) = {\rm Re}(\exp({\rm i}x))$}

\blank

{\rmmediumsized This is roman medium sized. \crlf
$\cos(x) = {\rm Re}(\exp({\rm i}x))$}

\stoptext

This means that once various sizes have been set, they can be applied to various styles such as

 \rm, \it, \bf 

by just stating for instance

\rmsmallsized, \itsmallsized, \bfsmallsized 

See also

Help from ConTeXt-Mailinglist/Forum

All issues with: