From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/24927 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Dominique Orban Newsgroups: gmane.text.pandoc Subject: Re: Support for Julia language in fenced code block attributes? Date: Mon, 20 Apr 2020 17:58:36 -0400 Message-ID: <58ACB64D-A695-401F-965C-B4D872852A52@gmail.com> References: <7C69ACD4-E47C-4EF8-89C2-990148A26981@gmail.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 (Mac OS X Mail 13.0 \(3608.60.0.2.5\)) Content-Type: multipart/alternative; boundary="Apple-Mail=_BC9137B9-13C1-4562-9697-1BD8327E4E1C" Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="40816"; mail-complaints-to="usenet@ciao.gmane.io" Cc: pandoc-discuss To: John MacFarlane Original-X-From: pandoc-discuss+bncBC4MFAF3WQCRBD5W7D2AKGQEQT2BUGA-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mon Apr 20 23:58:43 2020 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-pg1-f183.google.com ([209.85.215.183]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1jQeR9-000AWO-C1 for gtp-pandoc-discuss@m.gmane-mx.org; Mon, 20 Apr 2020 23:58:43 +0200 Original-Received: by mail-pg1-f183.google.com with SMTP id 71sf11130295pgg.23 for ; Mon, 20 Apr 2020 14:58:43 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1587419921; cv=pass; d=google.com; s=arc-20160816; b=NLmcTZmNp5m/NZa0HbOR3HDnBVYtBjB6BhZo4rN7WXhC+ZZxbaMl9nYTHke9+f/1Ru y5g5/SnjersDN85UZ0p081oBJXlAI3o0WYElt+lM93g00YZA+S1VBceHPBcciKEyYIYq ZI9OSD9cUprD8ALI4BcO4NHfRD4U9zmDiuo/ce3cyRxHB8eRhGMd18PQUFBFXU+Td3yf 3O8O2ZICX8+IW3Mn7HdirsKkR7d0lhQGdPYMYbmaWYOyTo9viQgNNQpEjUrZVKHrVVAh QO1vlDWqyHTaam/vhz3TdkC2B7KIOxg2ZtmXaftoanaP9ijEMlggWHp/N3UjIF2dllF9 wCBA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:references:to:cc :in-reply-to:date:subject:mime-version:message-id:from:sender :dkim-signature:dkim-signature; bh=nxWpmQVndZjH5d/MHx/NA//6GEdVWO1HkS9CXpsKJdI=; b=zuTxMMQWVBcVA9zbOVBJdjw5A5zUhz6Nez0BvQYjpC3LizkkIvGIYlgU46Y88y4KFw l8KC5uqJyLomYGjfe5gZJyzx7VgDFjaXMEYHE5Myx4YOLai+MCk8AuX7jVjjcQzjPxgG zw1IeDmzahcKqAjHVkPHtM8njU6c+zlCmKmCXO3gEbe4feFxibH9lU0kbfNH2AuIk3ts O09yo9b47+UwKw2cpGg2MiDP2FMUMDDQTB1tQ63zXtkN1xsVRRCNV8CyvaPxaWQ17AcQ edBF2VVYJOcb8y7onO+mSHgpomgUcZROKZoAMFYCQPEVrEyQ2HfmQnW0W9rHDcnlv06v h/jg== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=egqy9r+a; spf=pass (google.com: domain of dominique.orban-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2607:f8b0:4864:20::72b as permitted sender) smtp.mailfrom=dominique.orban-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; h=sender:from:message-id:mime-version:subject:date:in-reply-to:cc:to :references:x-original-sender:x-original-authentication-results :reply-to:precedence:mailing-list:list-id:list-post:list-help :list-archive:list-subscribe:list-unsubscribe; bh=nxWpmQVndZjH5d/MHx/NA//6GEdVWO1HkS9CXpsKJdI=; b=YsM4aX9fAY7lG1T19exKJjRS5j+yeZiNY0nbsmnW5B6MyR8fKbyfI0Amy1wiBYp7m5 rx9f99LhS6Pu4/RKbwpjFeeyRsmJwvWjT8n8Y/0Xdr6vMFfZ1Mldkccda6ud/7EHy4bL fIUATWY9yy2Ct8INyxjY5ijzq20oF4Xv718T62fLH+qPMqhf5suA9g9MX0ab2o94mBmC +QlVKjZJPiF5MuOfoSTj+QnqWVXd6uDwC+GZcD/uQpSsqrBMxDgwKO3rHFs9AzxLXN3G HIGgtUWZ50rzvonSJHMdpPqOtFGuY9aChTCTgH0Vq33L5whmXUmW3NNzPHtlFk6LLtbs a+JQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:message-id:mime-version:subject:date:in-reply-to:cc:to :references:x-original-sender:x-original-authentication-results :reply-to:precedence:mailing-list:list-id:list-post:list-help :list-archive:list-subscribe:list-unsubscribe; bh=nxWpmQVndZjH5d/MHx/NA//6GEdVWO1HkS9CXpsKJdI=; b=A5r8XJNgLMk4PNffbzjNqNnTpnxHoRyp/t0/aeHXdrv/3yOkLW/Fodg6L78Jrc1cBZ cOPf+2r9P2+I9zEqfGmQGbwEHtaw+pvFo5wBOlXzWZbyEyFt5z1f94Vdet8Uct/pnfh7 bsP/l2SqyEs+m4SRzzxzoTjh4JYrWv/Ge3JPrJnJ+7N8YRO1gvOuF/pk/OqX0mAdnnY+ pjrKLxPgSZ8MPA8nEbPjfHGGKj6mIxQWmOOn9iA6Wc4851z6+IAoEwByb9g5/Njj3BnJ PVHxgy3MsYdH+jQ2WCfYFC40Bc552qkYz4bUgY8mW32OWlhoG7yKayCDO5dLGrmF6wF8 xKyQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=sender:x-gm-message-state:from:message-id:mime-version:subject:date :in-reply-to:cc:to:references:x-original-sender :x-original-authentication-results:reply-to:precedence:mailing-list :list-id:x-spam-checked-in-group:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=nxWpmQVndZjH5d/MHx/NA//6GEdVWO1HkS9CXpsKJdI=; b=VJJwApzuWNGmE++9BuXBFe8k0o8pSFR8qfhceNMakEGhgxA2D87jTTz3vig476BJoE x7AjTqIbfCaPmGzi9InHGAfKDqeQ/uJsUzLKeYOPwpMX+xrbtdmAnox+zWvl18wF/1EU Bdao/s01qrlBy2WjlDtjHpcxF/aZveuYnUl0VFpfoy4LXutGUKGm0/lwj5gXwE+IiRi/ C5gu9JxtLfooBonGfkhtmAXdhfLKMZq8gz9AzWrfmieZY0XSXwObbBaWH1iX3rHnp5x/ Mf4cLqHpXzm9EKn7qfoL3kPQJAE9cyMod77PiBrKJKXOrZNHzPZY0QV6vyVTLSXWRYQJ ZPQg== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AGi0PubXHUHJlxHY2FLH/IAht6TYq1IZpvbPEQKc1IemfXzujR4DPLEC Qv9Bpc60OfQmGvfvK+vu4xY= X-Google-Smtp-Source: APiQypISTUJTijx2qkN17+0Lg5aJRKFnjy6o9mw+Bp141Zm2YH0BrzwsfRUHmaeD+0RG6srq/g7xZg== X-Received: by 2002:aa7:8a96:: with SMTP id a22mr11479913pfc.121.1587419921656; Mon, 20 Apr 2020 14:58:41 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a17:902:a701:: with SMTP id w1ls11566733plq.7.gmail; Mon, 20 Apr 2020 14:58:38 -0700 (PDT) X-Received: by 2002:a17:90a:d17:: with SMTP id t23mr1862437pja.77.1587419918721; Mon, 20 Apr 2020 14:58:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587419918; cv=none; d=google.com; s=arc-20160816; b=UDzKWjyh/KDqU0boQaVvppxqhlf6nxkdaYIzSx/rDsujVPkM5jp8Ol6W/YlhmpS6RA i4VPxAyS2AxYZ1f3Hd1E0NBNYaKzFZFSyPy2fFtgzdmu4lSERCKMN19Xx+G2y7hMPFFr Os6INMYMj1nqX2ZP1C60tHbl/1sqKcuA3vP3kFPkBPaEdpjT77gep1+12AXT6pW3kT5F GJz+gUX8n3j3cfNMdXXRlmw6wp2uOp1/HAlJ6Wa85G4VzcmRQaKJ18c8hEbjYrBRFtAf 9WfpX36M13Ao8xA7lWLDOsLVKJiQIJPwqEP+xzEoXy1MQcY1ZLPOnhC7RXsoLNWfUS9X M5jw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:to:cc:in-reply-to:date:subject:mime-version:message-id :from:dkim-signature; bh=w2ox0Ci/KB/t8mDiO8itO3d83qFou6fbO2lfwku2jRg=; b=jY5wtNBMlk1MhM6++yCTsCwvasGuaSl1fMs6l2dP4BWf75UNWbOSfrbfCZIe8SeMF3 2nkrFWyaNelLBu+fe25BnzrZsNKzre1BX4kF4CrKdoABMcs5KwFUbj6M6ywoJxKWrRjF zWCKFjENI3yxy8N6j+EFqFGx77lqRrXQVHRjq0OZpsMS0vdwscFmCsUNKnbxepXTwGtl bLRxtuI8fgVaeUFv5tsZU4UmxBio9HajgVos+fBKYtR004ZsG8Lb/YuBAKDwpkojI3RU itp9l+aClS9jg7di9ot8qBTgbiyRcygi7U/MEz5pHa5CZqOQ1egQhxILzfNBBMETX53p 6enA== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=egqy9r+a; spf=pass (google.com: domain of dominique.orban-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2607:f8b0:4864:20::72b as permitted sender) smtp.mailfrom=dominique.orban-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Original-Received: from mail-qk1-x72b.google.com (mail-qk1-x72b.google.com. [2607:f8b0:4864:20::72b]) by gmr-mx.google.com with ESMTPS id x5si92825pjo.0.2020.04.20.14.58.38 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 20 Apr 2020 14:58:38 -0700 (PDT) Received-SPF: pass (google.com: domain of dominique.orban-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2607:f8b0:4864:20::72b as permitted sender) client-ip=2607:f8b0:4864:20::72b; Original-Received: by mail-qk1-x72b.google.com with SMTP id s63so12530528qke.4 for ; Mon, 20 Apr 2020 14:58:38 -0700 (PDT) X-Received: by 2002:a05:620a:2094:: with SMTP id e20mr17889895qka.365.1587419918391; Mon, 20 Apr 2020 14:58:38 -0700 (PDT) Original-Received: from [192.168.0.193] (modemcable203.219-19-135.mc.videotron.ca. [135.19.219.203]) by smtp.gmail.com with ESMTPSA id t15sm454239qtc.64.2020.04.20.14.58.37 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 20 Apr 2020 14:58:37 -0700 (PDT) In-Reply-To: X-Mailer: Apple Mail (2.3608.60.0.2.5) X-Original-Sender: dominique.orban-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=egqy9r+a; spf=pass (google.com: domain of dominique.orban-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2607:f8b0:4864:20::72b as permitted sender) smtp.mailfrom=dominique.orban-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Precedence: list Mailing-list: list pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org; contact pandoc-discuss+owners-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org List-ID: X-Google-Group-Id: 1007024079513 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , Xref: news.gmane.io gmane.text.pandoc:24927 Archived-At: --Apple-Mail=_BC9137B9-13C1-4562-9697-1BD8327E4E1C Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" Your suggestion works. Many thanks! Dominique > On Apr 20, 2020, at 15:02, John MacFarlane wrote: >=20 >=20 > We can't in general output [language=3DXXX] for listings, because > listings language names are typically different from > pandoc-recognized language names and we need to do a conversion. > Our conversion table is based on what is supported by listings. > But I think the workaround I suggested will do the trick. >=20 > Dominique Orban writes: >=20 >> There's no need to support any additional LaTeX package. It suffices to = output [language=3Djulia]. Anyone using listings and Julia will be using jl= code or defining their own julia commands for listing. However, I'll try wh= at you suggest. >>=20 >> Dominique >>=20 >>> On Apr 20, 2020, at 12:34, John MacFarlane wrote: >>>=20 >>> =EF=BB=BF >>> Pandoc supports the officially supported listings languages -- >>> but obviously we can't support every available LaTeX package. >>> Sorry. >>>=20 >>> however, try this: >>>=20 >>> ``` {language=3DJulia} >>> test >>> ``` >>>=20 >>> This should produce >>>=20 >>> \begin{lstlisting}[language=3DJulia] >>> test >>> \end{lstlisting} >>>=20 >>>=20 >>> Dominique Orban writes: >>>=20 >>>> Julia is supported by way of the jlcode package: https://github.com/wg= 030/jlcode, which uses listings, and provides some support for unicode char= acters often used in Julia code. >>>>=20 >>>> I'm converting from a markdown document that represents input and outp= ut (as in a Jupyter notebook). The --listings option is useful here because= input blocks are marked as {.julia} while output blocks aren't marked, and= so can be displayed differently. You're right that code is highlighted wit= hout --listings but unfortunately, all code blocks look the same. >>>>=20 >>>> Thanks! >>>>=20 >>>> Dominique >>>>=20 >>>>>> On Apr 19, 2020, at 20:34, John MacFarlane wrote: >>>>>=20 >>>>> =EF=BB=BF >>>>> Is Julia supported by the LaTeX listings package? If it is, >>>>> we can add support. >>>>>=20 >>>>> You can also try without `--listings`. Pandoc has built-in >>>>> highlighting for julia. >>>>>=20 >>>>> Dominique writes: >>>>>=20 >>>>>> I'm converting markdown to PDF using the >>>>>>=20 >>>>>> --listings >>>>>>=20 >>>>>> option. I have fenced code blocks marked as Julia language: >>>>>>=20 >>>>>> ~~~~{.julia} >>>>>>>> using Pkg >>>>>>>> pkg"activate ." >>>>>>>> ~~~~~~~~~~~~~ >>>>>>>=20 >>>>>>>=20 >>>>>> (those are generated by a package called Weave.jl). The LaTeX genera= ted=20 >>>>>> file looks as follows >>>>>>=20 >>>>>> \begin{lstlisting} >>>>>> using Pkg >>>>>> pkg"activate ." >>>>>> \end{lstlisting} >>>>>>=20 >>>>>> As an experiment, if I change=20 >>>>>> {.julia} >>>>>>=20 >>>>>> in the original code block to=20 >>>>>> {.haskell} >>>>>>=20 >>>>>> the LaTeX file says >>>>>>=20 >>>>>> \begin{lstlisting}[language=3DHaskell] >>>>>>=20 >>>>>> Is Julia not currently supported? What does it take to support it? >>>>>>=20 >>>>>> Many thanks in advance. >>>>>>=20 >>>>>> --=20 >>>>>> You received this message because you are subscribed to the Google G= roups "pandoc-discuss" group. >>>>>> To unsubscribe from this group and stop receiving emails from it, se= nd an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >>>>>> To view this discussion on the web visit https://groups.google.com/d= /msgid/pandoc-discuss/336e638c-1c44-44cd-952b-771fa7187792%40googlegroups.c= om. --=20 You received this message because you are subscribed to the Google Groups "= pandoc-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an e= mail to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/= pandoc-discuss/58ACB64D-A695-401F-965C-B4D872852A52%40gmail.com. --Apple-Mail=_BC9137B9-13C1-4562-9697-1BD8327E4E1C Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset="UTF-8" Your suggestion works. Man= y thanks!

Dominique


On Apr 20, 2020, at 15:02, John MacFarlane <jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org> wrote:


We can't in general output [language=3DXXX] for listings, because
listings language names are typically different from
= pandoc-recognized language names and we need to do a conversion.
Our conversion table is based on what is supported by listings.
But I think the workaround I suggested will do the trick.

Dominique Orban <dominique.orban-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:

There's no need to s= upport any additional LaTeX package. It suffices to output [language=3Djuli= a]. Anyone using listings and Julia will be using jlcode or defining their = own julia commands for listing. However, I'll try what you suggest.

Dominique

On Apr 20, 2020, at 12:34, John MacFarlane <jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org> wrote:
=EF=BB=BF
Pandoc supports the off= icially supported listings languages --
but obviously we can'= t support every available LaTeX package.
Sorry.

however, try this:

``` {langua= ge=3DJulia}
test
```

This should produce

\begin{lstlisting}[lang= uage=3DJulia]
test
\end{lstlisting}


Dominique Orban <dominique.orban-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:=

Julia is= supported by way of the jlcode package: https://github.com/wg030/jlcode, which uses listin= gs, and provides some support for unicode characters often used in Julia co= de.

I'm converting from a markdown document th= at represents input and output (as in a Jupyter notebook). The --listings o= ption is useful here because input blocks are marked as {.julia} while outp= ut blocks aren't marked, and so can be displayed differently. You're right = that code is highlighted without --listings but unfortunately, all code blo= cks look the same.

Thanks!

Dominique

On Apr 19, 2020, at 20:34, = John MacFarlane <jgm@berk= eley.edu> wrote:

=EF=BB=BF=
Is Julia supported by the LaTeX listings package?  If i= t is,
we can add support.

You ca= n also try without `--listings`.  Pandoc has built-in
hi= ghlighting for julia.

Dominique <dominique.orban-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org= > writes:

I'm converting markdown to PDF using the

--listings

option. I have fenced code blocks = marked as Julia language:

~~~~{.julia}
using Pkg
pkg"activate ."
~~~~~~~~~~~~~


(those= are generated by a package called Weave.jl). The LaTeX generated
file looks as follows

\begin{lstlisting}=
using Pkg
pkg"activate ."
\end{l= stlisting}

As an experiment, if I change
{.julia}

in the original code block = to
{.haskell}

the LaTeX file sa= ys

\begin{lstlisting}[language=3DHaskell]

Is Julia not currently supported? What does it tak= e to support it?

Many thanks in advance.

--
You received this message because= you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, sen= d an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/336e63= 8c-1c44-44cd-952b-771fa7187792%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups &= quot;pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an e= mail to pand= oc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.google.com/d/msgid/p= andoc-discuss/58ACB64D-A695-401F-965C-B4D872852A52%40gmail.com.
--Apple-Mail=_BC9137B9-13C1-4562-9697-1BD8327E4E1C--