Changes

Jump to navigation Jump to search
description of \crop, \mirror, \rotate, \scale (not yet complete)
In [http://source.contextgarden.net/tex/context/base/core-mis.tex core-mis.tex] there are some hand command for graphical text manipulation defined.

== \scale ==

TODO

== \mirror ==

<texcode>
There is a \mirror{\sl mirorred} word in this sentence.
</texcode>

<context>
There is a \mirror{\sl mirorred} word in this sentence.
</context>

<code>\mirror</code> makes a <code>\hbox</code> and mirrors the contents. If you want to have a longer paragraph mirorred, you have to make a <code>\vbox</code> manually.

(TODO: an example)

== \rotate ==

You can rotate something by an arbitrary angle by saying something like
<texcode>
\rotate[rotation=42]{the ultimate answer}
</texcode>.
<context>
\rotate[rotation=42]{the ultimate answer}
</context>.

The rotation angle and the location (which determines around which point the content is rotated) are optional and can also be set by
<texcode>
\setuprotate[rotation=42,location=normal] % normal is the default
\rotate{the ultimate answer}
</texcode>

An example by Hans Hagen showing the influence of <code>location=</code> argument at different angles:

<texcode>
\dostepwiserecurse{0}{359}{45}
{\startlinecorrection[blank]
\hbox
{\expanded{\setuprotate[rotation=\recurselevel]}%
\traceboxplacementtrue
\hbox to .2\hsize{\hss\ruledhbox{\rotate[location=depth] {\ruledhbox{\bfb (depth)}}}}%
\hbox to .2\hsize{\hss\ruledhbox{\rotate[location=fit] {\ruledhbox{\bfb (fit)}}}}%
\hbox to .2\hsize{\hss\ruledhbox{\rotate[location=broad] {\ruledhbox{\bfb (broad)}}}}%
\hbox to .2\hsize{\hss\ruledhbox{\rotate[location=normal]{\ruledhbox{\bfb (normal)}}}}%
\hbox to .2\hsize{\hss\ruledhbox{\rotate[location=high] {\ruledhbox{\bfb (high)}}}}}
\stoplinecorrection}
</texcode>

<context>
\setuplayout[location=middle,scale=.5]
\dostepwiserecurse{0}{359}{45}
{\startlinecorrection[blank]
\hbox
{\expanded{\setuprotate[rotation=\recurselevel]}%
\traceboxplacementtrue
\hbox to .2\hsize{\hss\ruledhbox{\rotate[location=depth] {\ruledhbox{\bfb (depth)}}}}%
\hbox to .2\hsize{\hss\ruledhbox{\rotate[location=fit] {\ruledhbox{\bfb (fit)}}}}%
\hbox to .2\hsize{\hss\ruledhbox{\rotate[location=broad] {\ruledhbox{\bfb (broad)}}}}%
\hbox to .2\hsize{\hss\ruledhbox{\rotate[location=normal]{\ruledhbox{\bfb (normal)}}}}%
\hbox to .2\hsize{\hss\ruledhbox{\rotate[location=high] {\ruledhbox{\bfb (high)}}}}}
\stoplinecorrection}
</context>

[some more comments to be added]

You can rotate a long paragraph as well.

[example]

Depending on the usage you will sometimes probably want to include the content of what you wish to rotate into a box. Compare the following two examples:

<texcode>
\setuplayout[width=3cm]
\setuprotate[rotation=180,location=broad]

a\rotate{e}i\par
a\rotate{\hbox{e}}i
</texcode>

<context>
\setuplayout[width=3cm]
\setuprotate[rotation=180,location=broad]

a\rotate{e}i\par
a\rotate{\hbox{e}}i
</context>

== \crop ==

TODO (defined at some other place)

Navigation menu