From: Wolfgang Schuster <wolfgang.schuster.lists@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>,
Yves Cloutier <yves.cloutier@gmail.com>
Subject: Re: ntg-context Digest, Vol 189, Issue 28
Date: Sun, 15 Mar 2020 17:40:49 +0100 [thread overview]
Message-ID: <0efe4ca3-5c3e-58e1-4f69-eff9233e23fe@gmail.com> (raw)
In-Reply-To: <CAGW=J5e5BTjOrdcOVMuFhqMDOfXjS7-y8QXyjc-HojSFfvx4PQ@mail.gmail.com>
Yves Cloutier schrieb am 15.03.2020 um 16:09:
> Hello Wolfgang, after a few attempts that didn't work I copy-pasted the
> example from the wiki:
>
> \definetyping[C][option=commands] \startC #include <stdio.h> int main(){
> return 0; /BTEX{\em unreachedCode;}/ETEX } \stopC
>
>
> This did not work.
>
> However following the example you provided this works perfectly! Many
> thanks.
When your goal is to format C or C++ code you can load the scite module
which provides support for additional languages.
The \setuptyping line is necessary because the module selects the wrong
formatter for C++ but this should be fixed in the next ConTeXt release
and you can remove it when you make a update to the newest version.
\usemodule[scite]
\setuptyping[CPP][option=cpp]
\starttext
\startCPP
#include <stdio.h>
int main() {
printf("Hello ConTeXt!");
return 0;
}
\stopCPP
\stoptext
Wolfgang
___________________________________________________________________________________
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://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________
prev parent reply other threads:[~2020-03-15 16:40 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.1385.1584267748.1332.ntg-context@ntg.nl>
2020-03-15 15:09 ` Yves Cloutier
2020-03-15 16:40 ` Wolfgang Schuster [this message]
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=0efe4ca3-5c3e-58e1-4f69-eff9233e23fe@gmail.com \
--to=wolfgang.schuster.lists@gmail.com \
--cc=ntg-context@ntg.nl \
--cc=yves.cloutier@gmail.com \
/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).