From: "Reviczky, Adam" <adam.reviczky@kcl.ac.uk>
To: "ntg-context@ntg.nl" <ntg-context@ntg.nl>
Subject: Verbatim text: intext & colors (mkiv)
Date: Fri, 11 Mar 2011 00:33:27 +0000 [thread overview]
Message-ID: <7B4626C28B06A7418E938BF73D6DEE18F9E71DB66B@KCL-MAIL05.kclad.ds.kcl.ac.uk> (raw)
[-- Attachment #1: Type: text/plain, Size: 211 bytes --]
Hi,
When using verbatim text (for source code) in mkiv:
"Line numbers in the text" as well as
/BTEX … /ETEX (for colors) don't work.
It is fine using mkii.
Attached the two minimal examples.
Adam
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: colors.tex --]
[-- Type: text/x-tex; name="colors.tex", Size: 907 bytes --]
\setupcolors[state=start]
\starttext
%% SC colors %%
\definecolor [SCwhite] [r=1.0, g=1.0, b=1.0]
\definecolor [SCblack] [r=0.0, g=0.0, b=0.0]
\definecolor [SCblue] [r=0.0, g=0.0, b=0.75]
\definecolor [SCred] [r=0.75, g=0.0, b=0.0]
\definecolor [SCgrey] [r=0.376, g=0.376, b=0.376]
\definecolor [SCgreen] [r=0.0, g=0.45, b=0.0]
\definecolor[cirmaBlue] [r=.0,g=.2,b=.6]
\defineframedtext
[framedSC]
[framecolor=cirmaBlue,
strut=yes,
offset=2mm,
width=local,
align=right]
\definetyping[SC][option=commands,
tab=2,numbering=line,
before={\startframedSC},
after={\stopframedSC}]
\startSC
/BTEX{\color[SCred] //// an example starting with a comment}/ETEX
/BTEX{\color[SCgrey] ``this is a string''}/ETEX .postln ;
/BTEX{\color[SCgreen] \letterbackslash aSymbol}/ETEX ;
/BTEX{\color[SCblue] ThisClassDoesNotExists}/ETEX ;
\stopSC
\stoptext
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: intext.tex --]
[-- Type: text/x-tex; name="intext.tex", Size: 487 bytes --]
\starttext
\defineframedtext
[framedcode]
[strut=yes,
offset=2mm,
width=7cm,
align=right]
\definetyping[code][numbering=line,
bodyfont=small,
before={\startframedcode},
after={\stopframedcode}]
\setuplinenumbering[location=intext]
\startcode
This is the first line
This is a rather long line that is wrapped, so look how the line numbering is done
Another line
Last line after an empty line
\stopcode
\stoptext
[-- Attachment #4: Type: text/plain, Size: 486 bytes --]
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / 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
___________________________________________________________________________________
next reply other threads:[~2011-03-11 0:33 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-11 0:33 Reviczky, Adam [this message]
2011-03-11 18:00 ` Wolfgang Schuster
2011-03-11 19:46 Reviczky, Adam
2011-03-12 18:58 ` Wolfgang Schuster
2011-03-12 20:01 Reviczky, Adam
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7B4626C28B06A7418E938BF73D6DEE18F9E71DB66B@KCL-MAIL05.kclad.ds.kcl.ac.uk \
--to=adam.reviczky@kcl.ac.uk \
--cc=ntg-context@ntg.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).