Hi, For typing Java code in a context document, I use \starttyping ... \stoptyping. I have a problem when I configure \setuptyping in the following way : \setuptyping[typing][color=black,style=\ss,escape=/,option=commands] If I put characters like { or _ in my source (between \starttyping and \stoptyping) , they do not appear in the produced document { character is replaced by - character _ character is replaced by ' character etc.... If I configure setuptyping in the following way \setuptyping[typing][color=black,style=\tt,escape=/,option=commands] (just change \ss to \tt) everything is ok ! Any idea ? thanks in advance for any help jp
Hi,
Jean-Pierre Le Narzul
Any idea ?
Yes: don't use computer-modern fonts. They don't have { } and _ except for typewriter. Use any other font encoded in ec or texnansi or whatever encoding. See for example latin-modern: ================================================== \starttext \setuptyping[typing][color=black,style=\ss,escape=/,option=commands] \starttyping hello_world {brace} \stoptyping \setupencoding [default=ec] \usetypescript [all] [latin-modern] [\defaultencoding]% \setupbodyfont[reset]% \setupbodyfont[cmr]% \starttyping hello_world {brace} \stoptyping \stoptext ================================================== Patrick PS: and please (!!!) provide a minimal but complete working (or no-working) example next time. It would save the others some time. -- Silent is the goldfish in its bowl
Hi, Thanks for your explanation. I understand the problem now ! But unfortunately, the example you provide is not working for me. The pdf file displays the wrong characters for both \starttyping \stoptyping ... jp PS: sorry for not providing an example in my first mail. I am using yours now .... Le jeudi, 18 sep 2003, à 00:18 Europe/Paris, Patrick Gundlach a écrit :
Hi,
Jean-Pierre Le Narzul
writes: Any idea ?
Yes: don't use computer-modern fonts. They don't have { } and _ except for typewriter.
Use any other font encoded in ec or texnansi or whatever encoding. See for example latin-modern:
================================================== \starttext
\setuptyping[typing][color=black,style=\ss,escape=/,option=commands]
\starttyping hello_world {brace} \stoptyping
\setupencoding [default=ec] \usetypescript [all] [latin-modern] [\defaultencoding]% \setupbodyfont[reset]% \setupbodyfont[cmr]%
\starttyping hello_world {brace} \stoptyping
\stoptext ==================================================
Patrick
PS: and please (!!!) provide a minimal but complete working (or no-working) example next time. It would save the others some time.
-- Silent is the goldfish in its bowl _______________________________________________ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Jean-Pierre Le Narzul
Thanks for your explanation. I understand the problem now !
But unfortunately, the example you provide is not working for me. The pdf file displays the wrong characters for both \starttyping \stoptyping ...
Perhaps you don't have latinmodern installed? Visit your local ctan node and look for fonts/lm. Or try another font with a "good" encoding. Patrick -- Silent is the goldfish in its bowl
I always had problems with changing fonts ....
As you suggested, lm is probably not installed on my
system ...
So, I downloaded the lm.tar.gz file from CTAN and got
the following hierachy
atacama[14:42]%ls lm/fonts/
afm/ tfm/ type1/
What should I do for using this font under Context ?
Do I need to write typescript files or is it possible
to use it in a very simple manner ?
Thanks again for your help
jp
Quoting Patrick Gundlach
Jean-Pierre Le Narzul
writes: Hello,
Thanks for your explanation. I understand the problem now !
But unfortunately, the example you provide is not working for me. The pdf file displays the wrong characters for both \starttyping \stoptyping ...
Perhaps you don't have latinmodern installed? Visit your local ctan node and look for fonts/lm. Or try another font with a "good" encoding.
Patrick
-- Silent is the goldfish in its bowl _______________________________________________ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
--
Hello Jean-Pierre,
What should I do for using this font under Context ? Do I need to write typescript files or is it possible to use it in a very simple manner ?
see http://www.tex.ac.uk/cgi-bin/texfaq2html?label=uselmfonts for general installation intstruction. You should use a recent ConTeXt version and my test file. Thats about it. If you experience any problems with ConTeXt/lmodern you should post the complete output of a minimal test file. HTH, Patrick -- Silent is the goldfish in its bowl
participants (3)
-
Jean-Pierre Le Narzul
-
lenarzul@free.fr
-
Patrick Gundlach