On Fri, Apr 9, 2010 at 1:35 PM, R. Bastian <[email protected]> wrote:
> On Fri, 9 Apr 2010 11:27:38 +0200
> luigi scarso <[email protected]> scribit:
>
>> On Fri, Apr 9, 2010 at 11:20 AM, R. Bastian <[email protected]> wrote:
>> > Hello,
>> >
>> > how to translate in context the following plain tex:
>> >
>> > \font\fgras = cmbtt10
>> > {\tt
>> > {\obeylines
>> > {\fgras def} ra():
>> > \ \ \ \ a = 3
>> > \ \ \ \ b = 4
>> > }
>> > }
>> not a solution, but this works
>>
>> \starttext
>> \font\fgras = lmmonolt10-bold.otf
>> {\tt
>> {\obeylines
>> {\fgras def} ra():
>> \ \ \ \ a = 3
>> \ \ \ \ b = 4
>> }
>> }
>> \stoptext
>>
>>
>> --
>> luigi
>
> thanks luigi, it compiles with 'context 2010.01.26' but:
> - the "def" is not in bold
"def" is bold (you can see it with pdffonts) only it's loaded at
10pt, while body font is 12pt (I believe)
> - context adds \n between every line.
hmm, If I cut-and-paste to vim I see the same as pdf , ie no extra \n
anyway you can play with interlinespace
\starttext
\font\fgras = lmmonolt10-bold.otf at 12pt
{\tt\setupinterlinespace[line=1ex]
{\obeylines
{\fgras def} ra():
\ \ \ \ a = 3
\ \ \ \ b = 4
}
}
\stoptext
>
> my 76 pages of Python code rewritten in plain tex by a python
> script are "accetabile" (compile by pdftex) - so i will try to
thank you to remember me that I'm always on late with python pretty printer ...
--
luigi
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the
Wiki!
maillist : [email protected] / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________