public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* How to make settings to a class in a LaTeX template for Pandoc?
@ 2016-04-01 15:01 Carlos-Enrique Tafur Egido
       [not found] ` <626e495d-408c-47fb-bdb3-3c5b0facf060-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Carlos-Enrique Tafur Egido @ 2016-04-01 15:01 UTC (permalink / raw)
  To: pandoc-discuss


[-- Attachment #1.1: Type: text/plain, Size: 1494 bytes --]



I'm doing my workflow in order to create documents with Pandoc-flavoured 
Markdown and transform it to PDF via LaTeX. This way I'll be faster 
producing texts. I'm creating the LaTeX template file. In Markdown I 
usually insert code this way:

```{.bash}
# comment
<bash-script>
.
.
.
```

This code appears highlighted and # comment is in gray color. I'd like to 
have some code without syntax highlighting, but just *some* code. For 
instance,

``{.bash .interactive}
# <bash-command>
```

when I need to insert a Bash command, not a Bash script. Here, # means that 
the Bash command must be inserted by root. As you can see, I've just 
created the .interactiveclass. I'd like to create some code on my template 
file (in LaTeX) such that code with the .interactive class hasn't got 
syntax highlighting.


Also, I would like to know if there is a way to put the <bash-command> part 
in boldface, but not #.


Thanks.

-- 
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 post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/626e495d-408c-47fb-bdb3-3c5b0facf060%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[-- Attachment #1.2: Type: text/html, Size: 6841 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: How to make settings to a class in a LaTeX template for Pandoc?
       [not found] ` <626e495d-408c-47fb-bdb3-3c5b0facf060-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2016-04-01 16:22   ` kurt.pfeifle via pandoc-discuss
       [not found]     ` <bc1d14ac-6ba7-4f03-a889-f7783906ad63-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: kurt.pfeifle via pandoc-discuss @ 2016-04-01 16:22 UTC (permalink / raw)
  To: pandoc-discuss


[-- Attachment #1.1: Type: text/plain, Size: 2307 bytes --]



On Friday, April 1, 2016 at 5:01:56 PM UTC+2, Carlos-Enrique Tafur Egido 
wrote:
>
> I'm doing my workflow in order to create documents with Pandoc-flavoured 
> Markdown and transform it to PDF via LaTeX. This way I'll be faster 
> producing texts. I'm creating the LaTeX template file. In Markdown I 
> usually insert code this way:
>
> ```{.bash}
> # comment
> <bash-script>
> .
> .
> .
> ```
>
> This code appears highlighted and # comment is in gray color. I'd like to 
> have some code without syntax highlighting, but just *some* code.
>

I think both the following Markdown will avoid syntax highlighting by not 
specifying any language, or by specifying a non-existent (or un-supported):

```
# <bash-command>
```

```{.nonexistent}
# <bash-command>
```

However, if you use something like `--highlight-style=espresso` or 
`=zenburn` there will be no background color for the block, and this may 
not what you want. You may want to have the same background for every 
block, just without any additional highlighting colors.

A workaround could be to specify an existing language, but just one that 
does not match. But this will work not reliably:

```{.xul}
# <bash-command>
```

```{.xslt}
# <bash-command>
```

```{.html}
# <bash-command>
```

It will not work in cases where some element or token from your 
<bash-command> is recognized as an element or token of the .xul, .xslt or 
.html language. This can easily be the case if you somewhere in your 
command use a re-direction (with **`<`**, **`>`** or **`&`** characters).

The only clean solution could be to add a new "language" to 
highlighting-kate, which does not define any keywords which should be 
highlighted. I have no idea how exactly to do that, though.


-- 
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 post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/bc1d14ac-6ba7-4f03-a889-f7783906ad63%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[-- Attachment #1.2: Type: text/html, Size: 4345 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: How to make settings to a class in a LaTeX template for Pandoc?
       [not found]     ` <bc1d14ac-6ba7-4f03-a889-f7783906ad63-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2016-04-03 23:33       ` John MACFARLANE
  0 siblings, 0 replies; 3+ messages in thread
From: John MACFARLANE @ 2016-04-03 23:33 UTC (permalink / raw)
  To: kurt.pfeifle via pandoc-discuss

There should be a cleaner solution for passing through the
highlighter with a "null" syntax.  (Using .numberLines will
do that, actually, but then you'll get line numbers, which
you probably don't want.)  It would be easy enough to add
a feature like this -- perhaps you should open an feature
request on the github tracker.

+++ kurt.pfeifle via pandoc-discuss [Apr 01 16 09:22 ]:
>   On Friday, April 1, 2016 at 5:01:56 PM UTC+2, Carlos-Enrique Tafur
>   Egido wrote:
>
>   I'm doing my workflow in order to create documents with
>   Pandoc-flavoured Markdown and transform it to PDF via LaTeX. This way
>   I'll be faster producing texts. I'm creating the LaTeX template file.
>   In Markdown I usually insert code this way:
>   ```{.bash}
>   # comment
>   <bash-script>
>   .
>   .
>   .
>   ```
>
>   This code appears highlighted and # comment is in gray color. I'd like
>   to have some code without syntax highlighting, but just some code.
>
>   I think both the following Markdown will avoid syntax highlighting by
>   not specifying any language, or by specifying a non-existent (or
>   un-supported):
>   ```
>   # <bash-command>
>   ```
>   ```{.nonexistent}
>   # <bash-command>
>   ```
>   However, if you use something like `--highlight-style=espresso` or
>   `=zenburn` there will be no background color for the block, and this
>   may not what you want. You may want to have the same background for
>   every block, just without any additional highlighting colors.
>   A workaround could be to specify an existing language, but just one
>   that does not match. But this will work not reliably:
>   ```{.xul}
>   # <bash-command>
>   ```
>   ```{.xslt}
>   # <bash-command>
>   ```
>   ```{.html}
>   # <bash-command>
>   ```
>   It will not work in cases where some element or token from your
>   <bash-command> is recognized as an element or token of the .xul, .xslt
>   or .html language. This can easily be the case if you somewhere in your
>   command use a re-direction (with **`<`**, **`>`** or **`&`**
>   characters).
>   The only clean solution could be to add a new "language" to
>   highlighting-kate, which does not define any keywords which should be
>   highlighted. I have no idea how exactly to do that, though.
>
>   --
>   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 [1]pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>   To post to this group, send email to
>   [2]pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>   To view this discussion on the web visit
>   [3]https://groups.google.com/d/msgid/pandoc-discuss/bc1d14ac-6ba7-4f03-
>   a889-f7783906ad63%40googlegroups.com.
>   For more options, visit [4]https://groups.google.com/d/optout.
>
>References
>
>   1. mailto:pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
>   2. mailto:pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
>   3. https://groups.google.com/d/msgid/pandoc-discuss/bc1d14ac-6ba7-4f03-a889-f7783906ad63-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org?utm_medium=email&utm_source=footer
>   4. https://groups.google.com/d/optout


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-04-03 23:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-01 15:01 How to make settings to a class in a LaTeX template for Pandoc? Carlos-Enrique Tafur Egido
     [not found] ` <626e495d-408c-47fb-bdb3-3c5b0facf060-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2016-04-01 16:22   ` kurt.pfeifle via pandoc-discuss
     [not found]     ` <bc1d14ac-6ba7-4f03-a889-f7783906ad63-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2016-04-03 23:33       ` 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).