* Custom code highlight
@ 2020-04-04 21:57 Boro Sitnikovski
[not found] ` <fccc7bd6-b608-4272-a3fd-9ef1cf30b774-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
0 siblings, 1 reply; 8+ messages in thread
From: Boro Sitnikovski @ 2020-04-04 21:57 UTC (permalink / raw)
To: pandoc-discuss
[-- Attachment #1.1: Type: text/plain, Size: 840 bytes --]
Hi,
I am preparing my masters thesis in Pandoc. It is written in a combination
of markdown and TeX files.
It contains source code from different programming languages for which I
have a corresponding .sty file with `lstdefinelanguage`. However, when I
use the triple backticks (```), the highlighting styles are not applied.
Is there a way to apply those styles to backticks so that I don't have to
use TeX's `lstlisting`?
--
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/fccc7bd6-b608-4272-a3fd-9ef1cf30b774%40googlegroups.com.
[-- Attachment #1.2: Type: text/html, Size: 1221 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Custom code highlight
[not found] ` <fccc7bd6-b608-4272-a3fd-9ef1cf30b774-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2020-04-04 22:28 ` jeremy theler
[not found] ` <CAK0Liyn=D=PO3NEj=Pmm9pUNJLYF2HBvK64=HjBEo_B_ZqQKTw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2020-04-05 16:42 ` Christophe Demko
2020-04-05 18:13 ` Christophe Demko
2 siblings, 1 reply; 8+ messages in thread
From: jeremy theler @ 2020-04-04 22:28 UTC (permalink / raw)
To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw
[-- Attachment #1: Type: text/plain, Size: 1702 bytes --]
Try
```{.language=yourlang}
I also define a style, and choose it passing the style as
```{.style=yourstyle}
--
jeremy theler
www.seamplex.com
On Sat, Apr 4, 2020, 18:57 Boro Sitnikovski <buritomath-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> Hi,
>
> I am preparing my masters thesis in Pandoc. It is written in a combination
> of markdown and TeX files.
>
> It contains source code from different programming languages for which I
> have a corresponding .sty file with `lstdefinelanguage`. However, when I
> use the triple backticks (```), the highlighting styles are not applied.
>
> Is there a way to apply those styles to backticks so that I don't have to
> use TeX's `lstlisting`?
>
> --
> 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/fccc7bd6-b608-4272-a3fd-9ef1cf30b774%40googlegroups.com
> <https://groups.google.com/d/msgid/pandoc-discuss/fccc7bd6-b608-4272-a3fd-9ef1cf30b774%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
--
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/CAK0Liyn%3DD%3DPO3NEj%3DPmm9pUNJLYF2HBvK64%3DHjBEo_B_ZqQKTw%40mail.gmail.com.
[-- Attachment #2: Type: text/html, Size: 2850 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Custom code highlight
[not found] ` <CAK0Liyn=D=PO3NEj=Pmm9pUNJLYF2HBvK64=HjBEo_B_ZqQKTw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2020-04-04 22:49 ` Boro Sitnikovski
0 siblings, 0 replies; 8+ messages in thread
From: Boro Sitnikovski @ 2020-04-04 22:49 UTC (permalink / raw)
To: pandoc-discuss
[-- Attachment #1.1: Type: text/plain, Size: 2183 bytes --]
I can't get it to work.
My build step does `pandoc ... --listings -H data/setup.tex`. In
data/setup.tex I `\usepackage{data/dafny}` and data/dafny.sty does
`\lstdefinelanguage{dafny}...`.
Tried ```dafny, ```{.language=dafny}, ```{.language=dafny .style=dafny},
```{.language=dafny,.style=dafny} but none worked.
Am I doing this right or missing something?
Thanks!
On Sunday, April 5, 2020 at 12:28:57 AM UTC+2, Jeremy Theler wrote:
>
> Try
>
> ```{.language=yourlang}
>
> I also define a style, and choose it passing the style as
>
> ```{.style=yourstyle}
>
>
> --
> jeremy theler
> www.seamplex.com
>
> On Sat, Apr 4, 2020, 18:57 Boro Sitnikovski <burit...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
> <javascript:>> wrote:
>
>> Hi,
>>
>> I am preparing my masters thesis in Pandoc. It is written in a
>> combination of markdown and TeX files.
>>
>> It contains source code from different programming languages for which I
>> have a corresponding .sty file with `lstdefinelanguage`. However, when I
>> use the triple backticks (```), the highlighting styles are not applied.
>>
>> Is there a way to apply those styles to backticks so that I don't have to
>> use TeX's `lstlisting`?
>>
>> --
>> 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-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <javascript:>.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/pandoc-discuss/fccc7bd6-b608-4272-a3fd-9ef1cf30b774%40googlegroups.com
>> <https://groups.google.com/d/msgid/pandoc-discuss/fccc7bd6-b608-4272-a3fd-9ef1cf30b774%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>
--
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/b727b639-0f4c-493a-be1c-fb6aca3f90db%40googlegroups.com.
[-- Attachment #1.2: Type: text/html, Size: 4418 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Custom code highlight
[not found] ` <fccc7bd6-b608-4272-a3fd-9ef1cf30b774-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2020-04-04 22:28 ` jeremy theler
@ 2020-04-05 16:42 ` Christophe Demko
[not found] ` <5f4a4351-0362-4595-8476-31c586e09fc0-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2020-04-05 18:13 ` Christophe Demko
2 siblings, 1 reply; 8+ messages in thread
From: Christophe Demko @ 2020-04-05 16:42 UTC (permalink / raw)
To: pandoc-discuss
[-- Attachment #1.1: Type: text/plain, Size: 1141 bytes --]
simply use this:
~~~java
Your java code
~~~
~~~c
your c code
~~~
See https://pandoc.org/MANUAL.html#syntax-highlighting and
https://pandoc.org/MANUAL.html#fenced-code-blocks
Le samedi 4 avril 2020 23:57:39 UTC+2, Boro Sitnikovski a écrit :
>
> Hi,
>
> I am preparing my masters thesis in Pandoc. It is written in a combination
> of markdown and TeX files.
>
> It contains source code from different programming languages for which I
> have a corresponding .sty file with `lstdefinelanguage`. However, when I
> use the triple backticks (```), the highlighting styles are not applied.
>
> Is there a way to apply those styles to backticks so that I don't have to
> use TeX's `lstlisting`?
>
--
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/5f4a4351-0362-4595-8476-31c586e09fc0%40googlegroups.com.
[-- Attachment #1.2: Type: text/html, Size: 1866 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Custom code highlight
[not found] ` <5f4a4351-0362-4595-8476-31c586e09fc0-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2020-04-05 16:51 ` Boro Sitnikovski
0 siblings, 0 replies; 8+ messages in thread
From: Boro Sitnikovski @ 2020-04-05 16:51 UTC (permalink / raw)
To: pandoc-discuss
[-- Attachment #1.1: Type: text/plain, Size: 1625 bytes --]
Thank you Christophe, however, I already went through that documentation
and it does not address my question.
Let's assume you have
https://github.com/dafny-lang/dafny/blob/master/Util/latex/dafny.sty. What
would you do so that the following highlights the code properly?
~~~dafny
...
~~~
Note:
$ pandoc --list-highlight-languages | grep dafny
$
On Sunday, April 5, 2020 at 6:42:48 PM UTC+2, Christophe Demko wrote:
>
> simply use this:
>
> ~~~java
> Your java code
> ~~~
>
> ~~~c
> your c code
> ~~~
>
> See https://pandoc.org/MANUAL.html#syntax-highlighting and
> https://pandoc.org/MANUAL.html#fenced-code-blocks
>
> Le samedi 4 avril 2020 23:57:39 UTC+2, Boro Sitnikovski a écrit :
>>
>> Hi,
>>
>> I am preparing my masters thesis in Pandoc. It is written in a
>> combination of markdown and TeX files.
>>
>> It contains source code from different programming languages for which I
>> have a corresponding .sty file with `lstdefinelanguage`. However, when I
>> use the triple backticks (```), the highlighting styles are not applied.
>>
>> Is there a way to apply those styles to backticks so that I don't have to
>> use TeX's `lstlisting`?
>>
>
--
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/c1d977f9-1d45-4f64-a2a9-49ea337d6cb3%40googlegroups.com.
[-- Attachment #1.2: Type: text/html, Size: 3565 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Custom code highlight
[not found] ` <fccc7bd6-b608-4272-a3fd-9ef1cf30b774-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2020-04-04 22:28 ` jeremy theler
2020-04-05 16:42 ` Christophe Demko
@ 2020-04-05 18:13 ` Christophe Demko
[not found] ` <b6ecbefd-98a7-4c06-a0ad-6ad319b0fdea-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2 siblings, 1 reply; 8+ messages in thread
From: Christophe Demko @ 2020-04-05 18:13 UTC (permalink / raw)
To: pandoc-discuss
[-- Attachment #1.1: Type: text/plain, Size: 1196 bytes --]
You can define your own language for pandoc
https://pandoc.org/MANUAL.html#option--syntax-definition
https://github.com/KDE/syntax-highlighting/tree/master/data/syntax
$ pandoc --syntax-definition dafny.xml -o test.pdf
~~~dafny
...
~~~
Le samedi 4 avril 2020 23:57:39 UTC+2, Boro Sitnikovski a écrit :
>
> Hi,
>
> I am preparing my masters thesis in Pandoc. It is written in a combination
> of markdown and TeX files.
>
> It contains source code from different programming languages for which I
> have a corresponding .sty file with `lstdefinelanguage`. However, when I
> use the triple backticks (```), the highlighting styles are not applied.
>
> Is there a way to apply those styles to backticks so that I don't have to
> use TeX's `lstlisting`?
>
--
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/b6ecbefd-98a7-4c06-a0ad-6ad319b0fdea%40googlegroups.com.
[-- Attachment #1.2: Type: text/html, Size: 1912 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Custom code highlight
[not found] ` <b6ecbefd-98a7-4c06-a0ad-6ad319b0fdea-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2020-04-05 19:18 ` Jeremy Theler
[not found] ` <aece3e5c789e8b7ab1ead4aa07bc4f6dd9542191.camel-24em0bpozeFWk0Htik3J/w@public.gmane.org>
0 siblings, 1 reply; 8+ messages in thread
From: Jeremy Theler @ 2020-04-05 19:18 UTC (permalink / raw)
To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw
[-- Attachment #1: Type: text/plain, Size: 2041 bytes --]
This is not needed for a custom language defined in LaTeX listings.Use
~~~dafny
or
~~~{language=dafny}
or
~~~{style=dafny}
and see what the TeX output is. For sure you'll figure out how to match
the listings definition you have in the .styOr share the .sty to see
what's in there.
On Sun, 2020-04-05 at 11:13 -0700, Christophe Demko wrote:
> You can define your own language for pandoc
> https://pandoc.org/MANUAL.html#option--syntax-definition
> https://github.com/KDE/syntax-highlighting/tree/master/data/syntax
>
> $ pandoc --syntax-definition dafny.xml -o test.pdf~~~dafny...~~~
>
> Le samedi 4 avril 2020 23:57:39 UTC+2, Boro Sitnikovski a écrit :
> > Hi,
> > I am preparing my masters thesis in Pandoc. It is written in a
> > combination of markdown and TeX files.
> >
> > It contains source code from different programming languages for
> > which I have a corresponding .sty file with `lstdefinelanguage`.
> > However, when I use the triple backticks (```), the highlighting
> > styles are not applied.
> >
> > Is there a way to apply those styles to backticks so that I don't
> > have to use TeX's `lstlisting`?
>
>
>
> --
>
> 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/b6ecbefd-98a7-4c06-a0ad-6ad319b0fdea%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/aece3e5c789e8b7ab1ead4aa07bc4f6dd9542191.camel%40seamplex.com.
[-- Attachment #2: Type: text/html, Size: 3360 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Custom code highlight
[not found] ` <aece3e5c789e8b7ab1ead4aa07bc4f6dd9542191.camel-24em0bpozeFWk0Htik3J/w@public.gmane.org>
@ 2020-04-06 10:19 ` Boro Sitnikovski
0 siblings, 0 replies; 8+ messages in thread
From: Boro Sitnikovski @ 2020-04-06 10:19 UTC (permalink / raw)
To: pandoc-discuss
[-- Attachment #1.1: Type: text/plain, Size: 2318 bytes --]
Thank you Jeremy. ~~~{language=dafny} did it!
On Sunday, April 5, 2020 at 9:18:29 PM UTC+2, Jeremy Theler wrote:
>
> This is not needed for a custom language defined in LaTeX listings.
> Use
>
> ~~~dafny
>
> or
>
> ~~~{language=dafny}
>
> or
>
> ~~~{style=dafny}
>
>
> and see what the TeX output is. For sure you'll figure out how to match
> the listings definition you have in the .sty
> Or share the .sty to see what's in there.
>
>
> On Sun, 2020-04-05 at 11:13 -0700, Christophe Demko wrote:
>
> You can define your own language for pandoc
> https://pandoc.org/MANUAL.html#option--syntax-definition
> https://github.com/KDE/syntax-highlighting/tree/master/data/syntax
>
> $ pandoc --syntax-definition dafny.xml -o test.pdf
> ~~~dafny
> ...
> ~~~
>
> Le samedi 4 avril 2020 23:57:39 UTC+2, Boro Sitnikovski a écrit :
>
> Hi,
>
> I am preparing my masters thesis in Pandoc. It is written in a combination
> of markdown and TeX files.
>
> It contains source code from different programming languages for which I
> have a corresponding .sty file with `lstdefinelanguage`. However, when I
> use the triple backticks (```), the highlighting styles are not applied.
>
> Is there a way to apply those styles to backticks so that I don't have to
> use TeX's `lstlisting`?
>
> --
> 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-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <javascript:>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/pandoc-discuss/b6ecbefd-98a7-4c06-a0ad-6ad319b0fdea%40googlegroups.com
> <https://groups.google.com/d/msgid/pandoc-discuss/b6ecbefd-98a7-4c06-a0ad-6ad319b0fdea%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
>
--
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/cc7e1441-27b7-48d5-856d-62ba9469b194%40googlegroups.com.
[-- Attachment #1.2: Type: text/html, Size: 5084 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2020-04-06 10:19 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-04 21:57 Custom code highlight Boro Sitnikovski
[not found] ` <fccc7bd6-b608-4272-a3fd-9ef1cf30b774-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2020-04-04 22:28 ` jeremy theler
[not found] ` <CAK0Liyn=D=PO3NEj=Pmm9pUNJLYF2HBvK64=HjBEo_B_ZqQKTw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2020-04-04 22:49 ` Boro Sitnikovski
2020-04-05 16:42 ` Christophe Demko
[not found] ` <5f4a4351-0362-4595-8476-31c586e09fc0-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2020-04-05 16:51 ` Boro Sitnikovski
2020-04-05 18:13 ` Christophe Demko
[not found] ` <b6ecbefd-98a7-4c06-a0ad-6ad319b0fdea-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2020-04-05 19:18 ` Jeremy Theler
[not found] ` <aece3e5c789e8b7ab1ead4aa07bc4f6dd9542191.camel-24em0bpozeFWk0Htik3J/w@public.gmane.org>
2020-04-06 10:19 ` Boro Sitnikovski
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).