Difference between revisions of "Command/definestyle"
< Command
Jump to navigation
Jump to search
(new) |
(add example) |
||
Line 23: | Line 23: | ||
<cd:description><!-- the long description of the command goes here --> | <cd:description><!-- the long description of the command goes here --> | ||
</cd:description> | </cd:description> | ||
− | <cd:examples></cd:examples> | + | <cd:examples><cd:example title="from the source"><context source="yes"> |
+ | \definestyle[one][style=bold,color=darkblue] | ||
+ | |||
+ | test \one{test} test | ||
+ | |||
+ | test \style[one]{test} test | ||
+ | |||
+ | test \style[color=red]{test} test | ||
+ | |||
+ | test \style[Serif at 20pt]{test} test | ||
+ | </context></cd:example></cd:examples> | ||
<cd:notes></cd:notes> | <cd:notes></cd:notes> | ||
<cd:seealso> | <cd:seealso> |
Latest revision as of 19:57, 12 September 2023
Contents
\definestyle
Summary
The command \definestyle is used to define a custom text style.
Settings
\definestyle[...][...][...=...,...] | |
[...] | name |
[...] | name |
...=...,... | inherits from \setupstyle |
Option | Explanation |
---|---|
name of new style | |
parent style (inheritance) | |
\definestyle[MyStyle][method=command] also creates a command \MyStyle , otherwise you can use the new style only in style assignments. |
Description
Examples
from the source
\definestyle[one][style=bold,color=darkblue] test \one{test} test test \style[one]{test} test test \style[color=red]{test} test test \style[Serif at 20pt]{test} test