* Support for Julia language in fenced code block attributes?
@ 2020-04-19 22:24 Dominique
[not found] ` <336e638c-1c44-44cd-952b-771fa7187792-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
0 siblings, 1 reply; 10+ messages in thread
From: Dominique @ 2020-04-19 22:24 UTC (permalink / raw)
To: pandoc-discuss
[-- Attachment #1.1: Type: text/plain, Size: 985 bytes --]
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{lstlisting}
As an experiment, if I change
{.julia}
in the original code block to
{.haskell}
the LaTeX file says
\begin{lstlisting}[language=Haskell]
Is Julia not currently supported? What does it take 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, send 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.com.
[-- Attachment #1.2: Type: text/html, Size: 5694 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Support for Julia language in fenced code block attributes?
[not found] ` <336e638c-1c44-44cd-952b-771fa7187792-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2020-04-20 0:34 ` John MacFarlane
[not found] ` <m2tv1ff10v.fsf-pgq/RBwaQ+zq8tPRBa0AtqxOck334EZe@public.gmane.org>
0 siblings, 1 reply; 10+ messages in thread
From: John MacFarlane @ 2020-04-20 0:34 UTC (permalink / raw)
To: Dominique, pandoc-discuss
Is Julia supported by the LaTeX listings package? If it is,
we can add support.
You can also try without `--listings`. Pandoc has built-in
highlighting 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{lstlisting}
>
> As an experiment, if I change
> {.julia}
>
> in the original code block to
> {.haskell}
>
> the LaTeX file says
>
> \begin{lstlisting}[language=Haskell]
>
> Is Julia not currently supported? What does it take 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, send 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.com.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Support for Julia language in fenced code block attributes?
[not found] ` <m2tv1ff10v.fsf-pgq/RBwaQ+zq8tPRBa0AtqxOck334EZe@public.gmane.org>
@ 2020-04-20 1:02 ` Dominique Orban
[not found] ` <8CA79C9B-70B2-4176-84FB-3BD72051A708-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
0 siblings, 1 reply; 10+ messages in thread
From: Dominique Orban @ 2020-04-20 1:02 UTC (permalink / raw)
To: John MacFarlane; +Cc: pandoc-discuss
[-- Attachment #1: Type: text/plain, Size: 2489 bytes --]
Julia is supported by way of the jlcode package: https://github.com/wg030/jlcode, which uses listings, and provides some support for unicode characters often used in Julia code.
I'm converting from a markdown document that represents input and output (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 without --listings but unfortunately, all code blocks look the same.
Thanks!
Dominique
> On Apr 19, 2020, at 20:34, John MacFarlane <jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org> wrote:
>
>
> Is Julia supported by the LaTeX listings package? If it is,
> we can add support.
>
> You can also try without `--listings`. Pandoc has built-in
> highlighting 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{lstlisting}
>>
>> As an experiment, if I change
>> {.julia}
>>
>> in the original code block to
>> {.haskell}
>>
>> the LaTeX file says
>>
>> \begin{lstlisting}[language=Haskell]
>>
>> Is Julia not currently supported? What does it take 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, send 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.com.
--
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 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/8CA79C9B-70B2-4176-84FB-3BD72051A708%40gmail.com.
[-- Attachment #2: Type: text/html, Size: 5405 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Support for Julia language in fenced code block attributes?
[not found] ` <8CA79C9B-70B2-4176-84FB-3BD72051A708-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2020-04-20 16:33 ` John MacFarlane
[not found] ` <m2imhup159.fsf-pgq/RBwaQ+zq8tPRBa0AtqxOck334EZe@public.gmane.org>
0 siblings, 1 reply; 10+ messages in thread
From: John MacFarlane @ 2020-04-20 16:33 UTC (permalink / raw)
To: Dominique Orban; +Cc: pandoc-discuss
Pandoc supports the officially supported listings languages --
but obviously we can't support every available LaTeX package.
Sorry.
however, try this:
``` {language=Julia}
test
```
This should produce
\begin{lstlisting}[language=Julia]
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 listings, and provides some support for unicode characters often used in Julia code.
>
> I'm converting from a markdown document that represents input and output (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 without --listings but unfortunately, all code blocks look the same.
>
> Thanks!
>
> Dominique
>
>> On Apr 19, 2020, at 20:34, John MacFarlane <jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org> wrote:
>>
>>
>> Is Julia supported by the LaTeX listings package? If it is,
>> we can add support.
>>
>> You can also try without `--listings`. Pandoc has built-in
>> highlighting 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{lstlisting}
>>>
>>> As an experiment, if I change
>>> {.julia}
>>>
>>> in the original code block to
>>> {.haskell}
>>>
>>> the LaTeX file says
>>>
>>> \begin{lstlisting}[language=Haskell]
>>>
>>> Is Julia not currently supported? What does it take 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, send 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.com.
--
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 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/m2imhup159.fsf%40johnmacfarlane.net.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Support for Julia language in fenced code block attributes?
[not found] ` <m2imhup159.fsf-pgq/RBwaQ+zq8tPRBa0AtqxOck334EZe@public.gmane.org>
@ 2020-04-20 18:10 ` BPJ
[not found] ` <CADAJKhDMx9ED9GyvUgkznok8avQJdpyPfd=HL-4mq-P=UuPfBA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2020-04-20 18:38 ` Dominique Orban
1 sibling, 1 reply; 10+ messages in thread
From: BPJ @ 2020-04-20 18:10 UTC (permalink / raw)
To: pandoc-discuss
[-- Attachment #1: Type: text/plain, Size: 3789 bytes --]
Can't this be used with `--syntax-definition`?
https://github.com/KDE/syntax-highlighting/blob/master/data/syntax/julia.xml
--
Better --help|less than helpless
Den mån 20 apr. 2020 18:34John MacFarlane <jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org> skrev:
>
> Pandoc supports the officially supported listings languages --
> but obviously we can't support every available LaTeX package.
> Sorry.
>
> however, try this:
>
> ``` {language=Julia}
> test
> ```
>
> This should produce
>
> \begin{lstlisting}[language=Julia]
> 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 listings, and provides some
> support for unicode characters often used in Julia code.
> >
> > I'm converting from a markdown document that represents input and output
> (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
> without --listings but unfortunately, all code blocks look the same.
> >
> > Thanks!
> >
> > Dominique
> >
> >> On Apr 19, 2020, at 20:34, John MacFarlane <jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org> wrote:
> >>
> >>
> >> Is Julia supported by the LaTeX listings package? If it is,
> >> we can add support.
> >>
> >> You can also try without `--listings`. Pandoc has built-in
> >> highlighting 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{lstlisting}
> >>>
> >>> As an experiment, if I change
> >>> {.julia}
> >>>
> >>> in the original code block to
> >>> {.haskell}
> >>>
> >>> the LaTeX file says
> >>>
> >>> \begin{lstlisting}[language=Haskell]
> >>>
> >>> Is Julia not currently supported? What does it take 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, send
> 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.com
> .
>
> --
> 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
> 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/m2imhup159.fsf%40johnmacfarlane.net
> .
>
--
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 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/CADAJKhDMx9ED9GyvUgkznok8avQJdpyPfd%3DHL-4mq-P%3DUuPfBA%40mail.gmail.com.
[-- Attachment #2: Type: text/html, Size: 6119 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Support for Julia language in fenced code block attributes?
[not found] ` <CADAJKhDMx9ED9GyvUgkznok8avQJdpyPfd=HL-4mq-P=UuPfBA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2020-04-20 18:11 ` BPJ
0 siblings, 0 replies; 10+ messages in thread
From: BPJ @ 2020-04-20 18:11 UTC (permalink / raw)
To: bpj; +Cc: pandoc-discuss
[-- Attachment #1: Type: text/plain, Size: 4079 bytes --]
Loops, listings was a requirement. Sorry!
--
Better --help|less than helpless
Den mån 20 apr. 2020 20:10BPJ <bpj-J3H7GcXPSITLoDKTGw+V6w@public.gmane.org> skrev:
> Can't this be used with `--syntax-definition`?
>
>
> https://github.com/KDE/syntax-highlighting/blob/master/data/syntax/julia.xml
>
> --
> Better --help|less than helpless
>
> Den mån 20 apr. 2020 18:34John MacFarlane <jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org> skrev:
>
>>
>> Pandoc supports the officially supported listings languages --
>> but obviously we can't support every available LaTeX package.
>> Sorry.
>>
>> however, try this:
>>
>> ``` {language=Julia}
>> test
>> ```
>>
>> This should produce
>>
>> \begin{lstlisting}[language=Julia]
>> 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 listings, and provides some
>> support for unicode characters often used in Julia code.
>> >
>> > I'm converting from a markdown document that represents input and
>> output (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 without --listings but unfortunately, all code blocks look the
>> same.
>> >
>> > Thanks!
>> >
>> > Dominique
>> >
>> >> On Apr 19, 2020, at 20:34, John MacFarlane <jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org> wrote:
>> >>
>> >>
>> >> Is Julia supported by the LaTeX listings package? If it is,
>> >> we can add support.
>> >>
>> >> You can also try without `--listings`. Pandoc has built-in
>> >> highlighting 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{lstlisting}
>> >>>
>> >>> As an experiment, if I change
>> >>> {.julia}
>> >>>
>> >>> in the original code block to
>> >>> {.haskell}
>> >>>
>> >>> the LaTeX file says
>> >>>
>> >>> \begin{lstlisting}[language=Haskell]
>> >>>
>> >>> Is Julia not currently supported? What does it take 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,
>> send 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.com
>> .
>>
>> --
>> 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
>> 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/m2imhup159.fsf%40johnmacfarlane.net
>> .
>>
>
--
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 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/CADAJKhAwFbJwTgbU-ojVrGUX9t09hXwaQUbw9igqE1oDrKiO-w%40mail.gmail.com.
[-- Attachment #2: Type: text/html, Size: 6764 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Support for Julia language in fenced code block attributes?
[not found] ` <m2imhup159.fsf-pgq/RBwaQ+zq8tPRBa0AtqxOck334EZe@public.gmane.org>
2020-04-20 18:10 ` BPJ
@ 2020-04-20 18:38 ` Dominique Orban
[not found] ` <7C69ACD4-E47C-4EF8-89C2-990148A26981-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
1 sibling, 1 reply; 10+ messages in thread
From: Dominique Orban @ 2020-04-20 18:38 UTC (permalink / raw)
To: John MacFarlane; +Cc: pandoc-discuss
There's no need to support any additional LaTeX package. It suffices to output [language=julia]. 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:
>
>
> Pandoc supports the officially supported listings languages --
> but obviously we can't support every available LaTeX package.
> Sorry.
>
> however, try this:
>
> ``` {language=Julia}
> test
> ```
>
> This should produce
>
> \begin{lstlisting}[language=Julia]
> 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 listings, and provides some support for unicode characters often used in Julia code.
>>
>> I'm converting from a markdown document that represents input and output (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 without --listings but unfortunately, all code blocks look the same.
>>
>> Thanks!
>>
>> Dominique
>>
>>>> On Apr 19, 2020, at 20:34, John MacFarlane <jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org> wrote:
>>>
>>>
>>> Is Julia supported by the LaTeX listings package? If it is,
>>> we can add support.
>>>
>>> You can also try without `--listings`. Pandoc has built-in
>>> highlighting 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{lstlisting}
>>>>
>>>> As an experiment, if I change
>>>> {.julia}
>>>>
>>>> in the original code block to
>>>> {.haskell}
>>>>
>>>> the LaTeX file says
>>>>
>>>> \begin{lstlisting}[language=Haskell]
>>>>
>>>> Is Julia not currently supported? What does it take 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, send 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.com.
--
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 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/7C69ACD4-E47C-4EF8-89C2-990148A26981%40gmail.com.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Support for Julia language in fenced code block attributes?
[not found] ` <7C69ACD4-E47C-4EF8-89C2-990148A26981-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2020-04-20 19:02 ` John MacFarlane
[not found] ` <m24kteoua2.fsf-pgq/RBwaQ+zq8tPRBa0AtqxOck334EZe@public.gmane.org>
0 siblings, 1 reply; 10+ messages in thread
From: John MacFarlane @ 2020-04-20 19:02 UTC (permalink / raw)
To: Dominique Orban; +Cc: pandoc-discuss
We can't in general output [language=XXX] 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 support any additional LaTeX package. It suffices to output [language=julia]. 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:
>>
>>
>> Pandoc supports the officially supported listings languages --
>> but obviously we can't support every available LaTeX package.
>> Sorry.
>>
>> however, try this:
>>
>> ``` {language=Julia}
>> test
>> ```
>>
>> This should produce
>>
>> \begin{lstlisting}[language=Julia]
>> 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 listings, and provides some support for unicode characters often used in Julia code.
>>>
>>> I'm converting from a markdown document that represents input and output (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 without --listings but unfortunately, all code blocks look the same.
>>>
>>> Thanks!
>>>
>>> Dominique
>>>
>>>>> On Apr 19, 2020, at 20:34, John MacFarlane <jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org> wrote:
>>>>
>>>>
>>>> Is Julia supported by the LaTeX listings package? If it is,
>>>> we can add support.
>>>>
>>>> You can also try without `--listings`. Pandoc has built-in
>>>> highlighting 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{lstlisting}
>>>>>
>>>>> As an experiment, if I change
>>>>> {.julia}
>>>>>
>>>>> in the original code block to
>>>>> {.haskell}
>>>>>
>>>>> the LaTeX file says
>>>>>
>>>>> \begin{lstlisting}[language=Haskell]
>>>>>
>>>>> Is Julia not currently supported? What does it take 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, send 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.com.
--
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 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/m24kteoua2.fsf%40johnmacfarlane.net.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Support for Julia language in fenced code block attributes?
[not found] ` <m24kteoua2.fsf-pgq/RBwaQ+zq8tPRBa0AtqxOck334EZe@public.gmane.org>
@ 2020-04-20 21:58 ` Dominique Orban
[not found] ` <58ACB64D-A695-401F-965C-B4D872852A52-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
0 siblings, 1 reply; 10+ messages in thread
From: Dominique Orban @ 2020-04-20 21:58 UTC (permalink / raw)
To: John MacFarlane; +Cc: pandoc-discuss
[-- Attachment #1: Type: text/plain, Size: 4121 bytes --]
Your suggestion works. Many 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=XXX] 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 support any additional LaTeX package. It suffices to output [language=julia]. 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:
>>>
>>>
>>> Pandoc supports the officially supported listings languages --
>>> but obviously we can't support every available LaTeX package.
>>> Sorry.
>>>
>>> however, try this:
>>>
>>> ``` {language=Julia}
>>> test
>>> ```
>>>
>>> This should produce
>>>
>>> \begin{lstlisting}[language=Julia]
>>> 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 listings, and provides some support for unicode characters often used in Julia code.
>>>>
>>>> I'm converting from a markdown document that represents input and output (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 without --listings but unfortunately, all code blocks look the same.
>>>>
>>>> Thanks!
>>>>
>>>> Dominique
>>>>
>>>>>> On Apr 19, 2020, at 20:34, John MacFarlane <jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org> wrote:
>>>>>
>>>>>
>>>>> Is Julia supported by the LaTeX listings package? If it is,
>>>>> we can add support.
>>>>>
>>>>> You can also try without `--listings`. Pandoc has built-in
>>>>> highlighting 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{lstlisting}
>>>>>>
>>>>>> As an experiment, if I change
>>>>>> {.julia}
>>>>>>
>>>>>> in the original code block to
>>>>>> {.haskell}
>>>>>>
>>>>>> the LaTeX file says
>>>>>>
>>>>>> \begin{lstlisting}[language=Haskell]
>>>>>>
>>>>>> Is Julia not currently supported? What does it take 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, send 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.com.
--
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 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/58ACB64D-A695-401F-965C-B4D872852A52%40gmail.com.
[-- Attachment #2: Type: text/html, Size: 6845 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Support for Julia language in fenced code block attributes?
[not found] ` <58ACB64D-A695-401F-965C-B4D872852A52-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2020-04-20 22:34 ` John MacFarlane
0 siblings, 0 replies; 10+ messages in thread
From: John MacFarlane @ 2020-04-20 22:34 UTC (permalink / raw)
To: Dominique Orban; +Cc: pandoc-discuss
Great! If you also need to create other output formats,
you could also use a lua filter to move the class to a language
attribute for latex output.
Dominique Orban <dominique.orban-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:
> Your suggestion works. Many 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=XXX] 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 support any additional LaTeX package. It suffices to output [language=julia]. 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:
>>>>
>>>>
>>>> Pandoc supports the officially supported listings languages --
>>>> but obviously we can't support every available LaTeX package.
>>>> Sorry.
>>>>
>>>> however, try this:
>>>>
>>>> ``` {language=Julia}
>>>> test
>>>> ```
>>>>
>>>> This should produce
>>>>
>>>> \begin{lstlisting}[language=Julia]
>>>> 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 listings, and provides some support for unicode characters often used in Julia code.
>>>>>
>>>>> I'm converting from a markdown document that represents input and output (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 without --listings but unfortunately, all code blocks look the same.
>>>>>
>>>>> Thanks!
>>>>>
>>>>> Dominique
>>>>>
>>>>>>> On Apr 19, 2020, at 20:34, John MacFarlane <jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org> wrote:
>>>>>>
>>>>>>
>>>>>> Is Julia supported by the LaTeX listings package? If it is,
>>>>>> we can add support.
>>>>>>
>>>>>> You can also try without `--listings`. Pandoc has built-in
>>>>>> highlighting 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{lstlisting}
>>>>>>>
>>>>>>> As an experiment, if I change
>>>>>>> {.julia}
>>>>>>>
>>>>>>> in the original code block to
>>>>>>> {.haskell}
>>>>>>>
>>>>>>> the LaTeX file says
>>>>>>>
>>>>>>> \begin{lstlisting}[language=Haskell]
>>>>>>>
>>>>>>> Is Julia not currently supported? What does it take 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, send 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.com.
--
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 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/m2v9ltokfo.fsf%40johnmacfarlane.net.
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2020-04-20 22:34 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-19 22:24 Support for Julia language in fenced code block attributes? Dominique
[not found] ` <336e638c-1c44-44cd-952b-771fa7187792-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2020-04-20 0:34 ` John MacFarlane
[not found] ` <m2tv1ff10v.fsf-pgq/RBwaQ+zq8tPRBa0AtqxOck334EZe@public.gmane.org>
2020-04-20 1:02 ` Dominique Orban
[not found] ` <8CA79C9B-70B2-4176-84FB-3BD72051A708-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2020-04-20 16:33 ` John MacFarlane
[not found] ` <m2imhup159.fsf-pgq/RBwaQ+zq8tPRBa0AtqxOck334EZe@public.gmane.org>
2020-04-20 18:10 ` BPJ
[not found] ` <CADAJKhDMx9ED9GyvUgkznok8avQJdpyPfd=HL-4mq-P=UuPfBA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2020-04-20 18:11 ` BPJ
2020-04-20 18:38 ` Dominique Orban
[not found] ` <7C69ACD4-E47C-4EF8-89C2-990148A26981-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2020-04-20 19:02 ` John MacFarlane
[not found] ` <m24kteoua2.fsf-pgq/RBwaQ+zq8tPRBa0AtqxOck334EZe@public.gmane.org>
2020-04-20 21:58 ` Dominique Orban
[not found] ` <58ACB64D-A695-401F-965C-B4D872852A52-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2020-04-20 22:34 ` John MacFarlane
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).