Changes

Jump to navigation Jump to search
132 bytes removed ,  11:51, 12 June 2012
space-gobbling fixed in mkiv
=== Why should I only use letters, digits and hyphens in file/path names? ===
:Please see section "Files" of the[http://pmrb.free.fr/contextref.pdf ConTeXt manual]. And also[http://www.ntg.nl/pipermail/ntg-context/2011/057342.html here] forsome discussion on the mailing-list.
== ConTeXt vs. LaTeX ==
=== Can I change to LaTeX’s Computer Modern font? ===
I see differences in screen between default fonts in ConTeXt (latin modernLatin Modern) and LaTeX (computer modernComputer Modern). Can I switch to latex LaTeX default font?. I think it's more steticalaesthetical.
: No.
: ''(I mean - of course you can; you only need to modify a few type-xxx.tex files and replace lm with cm in the source. But that solution is not/will not be supported officially.)''
:: Is there any tutorial for doing it?
::: ''No. There are no tutorials for the things that one is not supposed to mess with. Take a look at how things are done in those files and replace any occurrence of lm with cm.''
: There might be a workaround for this. Install the [http://cm-unicode.sourceforge.net/ OpenType version of Computer Modern fonts] on your system and use it with <code>simplefonts</code>.
=== How can I get the “oldstyle numbers” (text figures) in a document? ===
With OpenType fonts that come with text figures you can just ''add'' the respective
font feature to the current set of font features.
<texcode>
% defining a new feature set called “oldstyle”\definefontfeature [oldstyledefault] [default] [onum=yes]
% adding this feature set\addff{oldstyle}setupbodyfont[schola,8pt]
\starttext
1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 9871234567890
\stoptext
</texcode>
 
or
 
<texcode>
\setupbodyfont[schola,8pt]
 
\definefontfeature[oldstyle][onum=yes]
 
\starttext
1234567890 {\addff{oldstyle}1234567890}
\stoptext
</texcode>
 
See mailing list discussion at http://www.ntg.nl/pipermail/ntg-context/2011/058394.html .
(You can check whether your font supports the “onum” feature by running
=== How can I get a horizontal space with a defined width, so as ex. "\hspace{3em}" or "\hspace*{3em}" in LaTeX? ===
:A horizontal space can be inserted with the TeX-Primitive<code>\hskip〈dimension〉</code> or with the ConTeXt command <cmd>hspace</cmd><tt>[identifier]</tt>.
=== Why is there a line-break in the output after some commands? ===
</texcode>
Answer: See previous answer!\externalfigure switches to vmode, so you need \dontleavehmode:
<texcode>
\starttext
\dontleavehmode
\externalfigure[hacker][width=1cm] Same line!
\stoptext
</texcode>
 
=== Why the space is gobbled after some commands? ===
<texcode>
\starttext
X \externalfigure[hacker][width=1cm] X
\stoptext
</texcode>
 
Answer: When you don't use all of the optional square bracket arguments,
ConTeXt gobbles the space after the last square bracket. You have at
least 2 solutions:
<texcode>
\starttext
X \externalfigure[hacker][width=1cm][] X % adding empty square brackets
 
X \externalfigure[hacker][width=1cm]\ X % adding explicit space command
\stoptext
</texcode>
148

edits

Navigation menu