From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/113769 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Christoph Reller via ntg-context Newsgroups: gmane.comp.tex.context Subject: Syntax highlighting using LMTX Date: Wed, 15 Dec 2021 13:18:17 +0100 Message-ID: References: <0eb8cb81534a50aee25c5fc69e0f5abf739dd942.camel@henrimenke.de> Reply-To: mailing list for ConTeXt users Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============7709438708092604778==" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="37085"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Christoph Reller To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Wed Dec 15 13:19:00 2021 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane-mx.org Original-Received: from zapf.boekplan.nl ([5.39.185.232] helo=zapf.ntg.nl) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mxTFL-0009U6-SE for gctc-ntg-context-518@m.gmane-mx.org; Wed, 15 Dec 2021 13:18:59 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id C403228428E; Wed, 15 Dec 2021 13:18:36 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id xukk8S48elFZ; Wed, 15 Dec 2021 13:18:34 +0100 (CET) Original-Received: from zapf.ntg.nl (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 8963828439F; Wed, 15 Dec 2021 13:18:34 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 4D8CD28439F for ; Wed, 15 Dec 2021 13:18:33 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id dYCXpqJywkEk for ; Wed, 15 Dec 2021 13:18:30 +0100 (CET) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=209.85.167.47; helo=mail-lf1-f47.google.com; envelope-from=christoph.reller@gmail.com; receiver= Original-Received: from mail-lf1-f47.google.com (mail-lf1-f47.google.com [209.85.167.47]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id E6DCB28428E for ; Wed, 15 Dec 2021 13:18:29 +0100 (CET) Original-Received: by mail-lf1-f47.google.com with SMTP id z7so42724416lfi.11 for ; Wed, 15 Dec 2021 04:18:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=k1zULu78OcPHz+3ueIdITCvNcw1ofxDi+HO4T5FZ7tw=; b=WKV+GCWhVxgoeoQ33AxGNDRYdcmajUUCdtHvdw3QpMKwql3zRcSX9p9QrK4sk5rDVj 2Ud0SMB5u4+hJtmqVJiwLdNzZf6cA6UaHyQZzT2eFWfe7QDF25uTUH6ifnLrnpMVLJ0g tiWabSvpANVDBgTJs+9AdFfBNOPr1KPtKAtEipn2BR8F+Q1lmuSqerjKL0FL3KAkRDTN 1O1QPSxOmin3bkDTd3YoE+cmlN0Zw0ZR1kI0sIM3ddlPgu2FxTlROs9zGAXlLyA3IWjy qb8LqSyhx3CYKel36X8o3bfPOxhAGDLFmxR0Tfr/doNI0CEmdVq3tNdUgKp418B/79yg WMcA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=k1zULu78OcPHz+3ueIdITCvNcw1ofxDi+HO4T5FZ7tw=; b=e1sS09wlhsMEroEnK1fL0g6ASL2Brek7W0YcMzdES90P9y18ZWhqgJML73iz4jKzvg OqUFn+9Dp1hIfvv/wcoMrxsjrU9j9rwyM/qJ7hOumgYrDBbhZvE6xULHM+Er1MET4m1d FZl1vz02gBaFifvX7eBXb6Da44AovaRPdhoB6ebmEh4ydgrSuCevnVI9TsZlPA7JL1Zh nwMolR9NWWUOQM1Hq7kNnouDBPXCSEdVrHyyFGyWPZt/oI3ka6nmPO7iyd0PrqzMBlcd qmt7+srrReqha3eKi46yyIKuc8q6kvcj2MDLEFNVU5wHlW91N4jWiJiRE+Y3ZS0qhma+ hfKw== X-Gm-Message-State: AOAM5333n0S4+eeb8BkxazDwlcL8qOGwaD6mosO/vIbEGOUf+CmCOZB7 6kzFt0MH64EAz59Ttdi3n472DynFe9hvKlHXVc00ZqSQ X-Google-Smtp-Source: ABdhPJzHThJtw80zKeqFoBg/GMLdWL9yUKGBTYJSCNSpbJh7EcT/aneVgwgHwIy2tViywt1J6it3ieL5OcEH+KoO0Ns= X-Received: by 2002:a05:6512:12c8:: with SMTP id p8mr9761303lfg.69.1639570708991; Wed, 15 Dec 2021 04:18:28 -0800 (PST) In-Reply-To: <0eb8cb81534a50aee25c5fc69e0f5abf739dd942.camel@henrimenke.de> X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.26 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: "ntg-context" Xref: news.gmane.io gmane.comp.tex.context:113769 Archived-At: --===============7709438708092604778== Content-Type: multipart/alternative; boundary="000000000000b190e205d32e4da4" --000000000000b190e205d32e4da4 Content-Type: text/plain; charset="UTF-8" By the way: there exists a module which is capable of highlighting Java: https://modules.contextgarden.net/cgi-bin/module.cgi/ruid=12720986/action=view/id=82 Cheers, Christoph Henri Menke via ntg-context schrieb am Do., 2. Dez. 2021, 19:45: > On Thu, 2021-12-02 at 12:07 -0500, Aditya Mahajan via ntg-context > wrote: > > On Thu, 2 Dec 2021, Thangalin via ntg-context wrote: > > > > > Hi all, > > > > > > There are a few technical hurdles with using the t-vim module in > > > LMTX. > > > First, users need to install the module using externally defined > > > shell > > > scripts. Second, it's awkward to communicate to users how to install > > > it, > > > especially for Windows users. Third, it likely requires installing > > > vim, as > > > a separate step. Fourth, making general-purpose XML setups that > > > optionally > > > rely on syntax highlighting when it is an optional install is a > > > little > > > laborious. > > > > > > If installing a module was as easy as "install.sh --module=t-vim" > > > then that > > > would leap over most hurdles. > > > > You can always install manually as follows: > > > > cd $TEXMFHOME > > wget > > https://mirrors.ctan.org/macros/context/contrib/context-{filter,vim}.zip > > unzip context-{filter,vim}.zip > > > > > Although there'd still be a dependency on installing vim. > > > > Yes, that's a trade-off that the vim module makes. But, last time I > > used Windows (some 10 years ago), installing vim was relatively easy. > > Download the install from vim's website, and click next a couple of > > times. > > > > > How would you go about creating a syntax highlighter for Java that > > > can work > > > with LMTX? > > > > I'll let others answer that. Had I known that, I wouldn't have written > > a module to do syntax highlighting :-) In the end, it also depends on > > how refined a syntax highlighter you want. Writing a simple keyword > > based highlighter is relatively easy. See, for example, scite-context- > > lexer-cpp.lua in the distribution, which is based on the CPP lexer in > > scite. > > I wrote an answer here some time ago. > > https://tex.stackexchange.com/questions/333508/custom-pretty-printer-in-context > > Cheers, Henri > > > > > Aditya > > _______________________________________________________________________ > > ____________ > > 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 > > _______________________________________________________________________ > > ____________ > > > ___________________________________________________________________________________ > 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 > > ___________________________________________________________________________________ > --000000000000b190e205d32e4da4 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
By the way: there exists a module which is capable of hig= hlighting Java:=C2=A0https://modules.contextgar= den.net/cgi-bin/module.cgi/ruid=3D12720986/action=3Dview/id=3D82

Cheers, Christoph

Henri Menke v= ia ntg-context <ntg-context@ntg.nl= > schrieb am Do., 2. Dez. 2021, 19:45:
On Thu, 2021-12-02 at 12:07 -0500, Aditya Mahajan via ntg-contex= t
wrote:
> On Thu, 2 Dec 2021, Thangalin via ntg-context wrote:
>
> > Hi all,
> >
> > There are a few technical hurdles with using the t-vim module in<= br> > > LMTX.
> > First, users need to install the module using externally defined<= br> > > shell
> > scripts. Second, it's awkward to communicate to users how to = install
> > it,
> > especially for Windows users. Third, it likely requires installin= g
> > vim, as
> > a separate step. Fourth, making general-purpose XML setups that > > optionally
> > rely on syntax highlighting when it is an optional install is a > > little
> > laborious.
> >
> > If installing a module was as easy as "install.sh --module= =3Dt-vim"
> > then that
> > would leap over most hurdles.
>
> You can always install manually as follows:
>
> cd $TEXMFHOME
> wget
> https://= mirrors.ctan.org/macros/context/contrib/context-{filter,vim}.zip
> unzip context-{filter,vim}.zip
>
> > Although there'd still be a dependency on installing vim. >
> Yes, that's a trade-off that the vim module makes. But, last time = I
> used Windows (some 10 years ago), installing vim was relatively easy.<= br> > Download the install from vim's website, and click next a couple o= f
> times.
>
> > How would you go about creating a syntax highlighter for Java tha= t
> > can work
> > with LMTX?
>
> I'll let others answer that. Had I known that, I wouldn't have= written
> a module to do syntax highlighting :-) In the end, it also depends on<= br> > how refined a syntax highlighter you want. Writing a simple keyword > based highlighter is relatively easy. See, for example, scite-context-=
> lexer-cpp.lua in the distribution, which is based on the CPP lexer in<= br> > scite.

I wrote an answer here some time ago.
https://te= x.stackexchange.com/questions/333508/custom-pretty-printer-in-context
Cheers, Henri

>
> Aditya
> ______________________________________________________________________= _
> ____________
> If your question is of interest to others as well, please add an entry=
> to the Wiki!
>
> maillist : ntg-context@ntg.nl=C2=A0/
> http://www.ntg.nl/mailman/listinfo/ntg= -context
> webpage=C2=A0 : http://www.pragma-ade.nl=C2=A0/ http://context.aanhet.net
> archive=C2=A0 : https://bitbucket.o= rg/phg/context-mirror/commits/
> wiki=C2=A0=C2=A0=C2=A0=C2=A0 : http://contextgarden.net<= br> > ______________________________________________________________________= _
> ____________

___________________________________________________________________________= ________
If your question is of interest to others as well, please add an entry to t= he Wiki!

maillist : ntg-context@ntg.nl / http://= www.ntg.nl/mailman/listinfo/ntg-context
webpage=C2=A0 : http://www.pragma-ade.nl / http://= context.aanhet.net
archive=C2=A0 : https://bitbucket.org/ph= g/context-mirror/commits/
wiki=C2=A0 =C2=A0 =C2=A0: http://contextgarden.net
___________________________________________________________________________= ________
--000000000000b190e205d32e4da4-- --===============7709438708092604778== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX18KSWYgeW91ciBxdWVzdGlvbiBpcyBvZiBpbnRlcmVz dCB0byBvdGhlcnMgYXMgd2VsbCwgcGxlYXNlIGFkZCBhbiBlbnRyeSB0byB0aGUgV2lraSEKCm1h aWxsaXN0IDogbnRnLWNvbnRleHRAbnRnLm5sIC8gaHR0cDovL3d3dy5udGcubmwvbWFpbG1hbi9s aXN0aW5mby9udGctY29udGV4dAp3ZWJwYWdlICA6IGh0dHA6Ly93d3cucHJhZ21hLWFkZS5ubCAv IGh0dHA6Ly9jb250ZXh0LmFhbmhldC5uZXQKYXJjaGl2ZSAgOiBodHRwczovL2JpdGJ1Y2tldC5v cmcvcGhnL2NvbnRleHQtbWlycm9yL2NvbW1pdHMvCndpa2kgICAgIDogaHR0cDovL2NvbnRleHRn YXJkZW4ubmV0Cl9fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fCg== --===============7709438708092604778==--