4

I need to write some romanized foreign words within a passage of English text. Generally, such words should appear as slanted text. I created this simple document and noticed that while both \it and \empth both slant the text, the appearance of the letters is quite different:

\starttext
    {\it Test}
    \emph{Test}
\stoptext

With the default fonts, the first example has a more rounded "e" and the start and end points of "s" end in with a small rounded shape, however, both texts appear slanted.

Which is the correct way to slant foreign-language text in ConTeXt?

0

1 Answer 1

6

\it is the font switch for italic, \emph is slanted by default but it is configurable. To change the default from slanted to italic, use:

\setupbodyfontenvironment
  [default]
  [em=italic]

For slanted use \slanted{Test} or the font switch \sl. However, it would be better to use semantic markup instead of hard coding the style into your document. Here's an example:

\definehighlight
  [foreign]
  [style=slanted]

\starttext
  Lorem ipsum \foreign{dolor sit amet}, consetetur.
\stoptext

result

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .