From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/113630 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Thangalin via ntg-context Newsgroups: gmane.comp.tex.context Subject: Syntax highlighting using LMTX Date: Thu, 2 Dec 2021 00:45:00 -0800 Message-ID: Reply-To: mailing list for ConTeXt users Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============3011865693998788185==" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7185"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Thangalin To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Thu Dec 02 09:45:46 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 1mshis-0001dZ-0e for gctc-ntg-context-518@m.gmane-mx.org; Thu, 02 Dec 2021 09:45:46 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 145002A1C0C; Thu, 2 Dec 2021 09:45:17 +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 AXfDC26EFA9d; Thu, 2 Dec 2021 09:45:15 +0100 (CET) Original-Received: from zapf.ntg.nl (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 433352A1C12; Thu, 2 Dec 2021 09:45:15 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 793BE2A1C10 for ; Thu, 2 Dec 2021 09:45:13 +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 3IdfWoUVV2pV for ; Thu, 2 Dec 2021 09:45:11 +0100 (CET) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=209.85.167.46; helo=mail-lf1-f46.google.com; envelope-from=thangalin@gmail.com; receiver= Original-Received: from mail-lf1-f46.google.com (mail-lf1-f46.google.com [209.85.167.46]) (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 AB6662A1C0C for ; Thu, 2 Dec 2021 09:45:11 +0100 (CET) Original-Received: by mail-lf1-f46.google.com with SMTP id m27so69631253lfj.12 for ; Thu, 02 Dec 2021 00:45:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:from:date:message-id:subject:to; bh=WehKbFw1lK1FpWJfalx/dKQkuH9xKKzcEbXhikAGMno=; b=BvSLMy5uP29hI0+1XlZVE0Hhxcv/Lbo0ik0Xnk/+jY49edjLJvgMsIYCd1T8D+y82O Fw2Y/hlUMecOtLDiB0c4f+hmNqGnX6YLUVwOmatYV3O1kbDCe8X8EhiUYThnvbyDh/aD k53JA6vPflu1D319j7bgAq5xeZR7eWRnWeO+XcAnpnEF8QUWng2OxDNoqmi+ABusvfms 8g4AC2NwmJLmZs0FI7rDArVS78vQhjF0CAQ8C5cSbOUPACT8uuWSLk4f1mXWBN/AratA G7hdTjbOSJJyWLS6HOEMICUGcYIyjQTASuYZWMVozOSlnfzMs/yQESQ/YLsBG1AVGtYx Rm2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=WehKbFw1lK1FpWJfalx/dKQkuH9xKKzcEbXhikAGMno=; b=ogk8XoksoXVXbSL7oBC72WSS4gz0o50dY5GBmpxcJaKLdibGDDH43kBHVkZME2NsyM g21qOw8FskXLJ0xO48tO1epqOtSHOWal+QS0PnOSHU2DfZNxH2jo7Qmw8LJ3CWkLdut+ Wo4rKjWotZDuSansm0Fj2kiyf49GnJu88rTBbVBP88W46eytcdgfTBJw9JbRkvLeSG2Z ER7RHNo5Hat4bcoZbv83vX3M/7SZQPmUG1Qm0pG7O0/zWl+tAdIAA0wbPVz3I1GTCzYX VcxG+m8SgfxRATeooXKUt4jXiDenoWj/2QXiOlKZVOGrRUpaZWeCPSbKfNqZYdfv5zcw ylAg== X-Gm-Message-State: AOAM533U18l3sY9OunA5jaWYCgKvteOEyn+Oe2nAQ1ba18YRszZd2fjx HGaN2MZ7WU/+2Fht2gohINfPdBsM72SkuxZ4Us6zmscK2Uw= X-Google-Smtp-Source: ABdhPJzKPLeV1UtXQPjV2+UfYDUykVIxZrJvFpBJxPU87FYEtfv5kcfmhOaRw6QT5QOKVK+Mkld3zrVHkzG0nmjdrYw= X-Received: by 2002:ac2:46c8:: with SMTP id p8mr10901389lfo.174.1638434710755; Thu, 02 Dec 2021 00:45:10 -0800 (PST) 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:113630 Archived-At: --===============3011865693998788185== Content-Type: multipart/alternative; boundary="000000000000ec1c5b05d225ce79" --000000000000ec1c5b05d225ce79 Content-Type: text/plain; charset="UTF-8" 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. Although there'd still be a dependency on installing vim. Of course, it'd be pretty sweet if ConTeXt itself could automatically install the necessary module when encountered (or provide a command-line option to grant permissions to do so), but I understand that that would be a hefty undertaking. The following pages discuss creating syntax highlighters: - https://wiki.contextgarden.net/Verbatim_text - https://wiki.contextgarden.net/Custom_pretty_printer - https://tex.stackexchange.com/a/333620/2148 How would you go about creating a syntax highlighter for Java that can work with LMTX? Specifically, I'd like to know: - Where do the files need to be saved? (e.g., tex/texmf-context/tex/context/base/mkiv/) - What file name is required? (e.g., buff-imp-java.lua and buff-imp-java.mkiv) - How is the parser loaded? (e.g., \loadmarkfile{buff-imp-java} or \installprettytype[java][java]) Ultimately, this is going to be used with XML snippets along the lines of:
public final class Example {
  public static void main( String args[] ) {
  }
}
Having the ability to dynamically define the requisite start/stop environments based on the class attribute would be rather convenient. Thank you! --000000000000ec1c5b05d225ce79 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi all,

There are a few tech= nical hurdles with using the t-vim module in LMTX. First, users need to ins= tall the module using externally defined shell scripts. Second, it's aw= kward to communicate to users how to install it, especially for Windows use= rs. Third, it likely requires installing vim, as a separate step. Fourth, m= aking general-purpose XML setups that optionally rely on syntax highlightin= g when it is an optional install is a little laborious.

<= /div>
If installing a module was as easy as "install.sh --module= =3Dt-vim" then that would leap over most hurdles. Although there'd= still be a dependency on installing vim. Of course, it'd be pretty swe= et if ConTeXt itself could automatically install the necessary module when = encountered (or provide a command-line option to grant permissions to do so= ), but I understand that that would be a hefty undertaking.

<= /div>
The following pages discuss creating syntax highlighters:
  • https://wiki= .contextgarden.net/Verbatim_text
  • https://wiki.contextgarden.net/Custom_pr= etty_printer
  • https://tex.stackexchange.com/a/333620/2148
  • How wou= ld you go about creating a syntax highlighter for Java that can work with L= MTX? Specifically, I'd like to know:
    • Where do the fil= es need to be saved? (e.g., tex/texmf-context/tex/context/base/mkiv/)
    • <= li>What file name is required? (e.g., buff-imp-java.lua and buff-imp-java.m= kiv)
    • How is the parser loaded? (e.g., \loadmarkfile{buff-imp-java} = or \installprettytype[java][java])
    Ultimately, this is going = to be used with XML snippets along the lines of:

    &= lt;pre><code class=3D"language-java">public final class = Example {
    =C2=A0 public static void main( String args[] ) {
    =C2=A0 }<= br>}</code></pre>

    Having the ability t= o dynamically define the requisite start/stop environments based on the cla= ss attribute would be rather convenient.

    Thank you!

    --000000000000ec1c5b05d225ce79-- --===============3011865693998788185== 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== --===============3011865693998788185==--