emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: preserving (zero-space) indenting in begin_src when exporting/publis


From: Julius Dittmar
Subject: Re: preserving (zero-space) indenting in begin_src when exporting/publishing (to mark-down)
Date: Wed, 28 Oct 2020 14:53:34 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.4.0

Hi Martin,

if I understand correctly, you do not want to have a section that quotes
source code, but literal source code.

As far as I understand, that means using
#+begin_export markdown
...
#+end_export
block, not
#+begin_src markdown
...
#+end_src
block. That block will then be ignored in any other export format, and
used as-is in markdown export. (I hope "markdown" is the correct label,
I did not test it.)

Hope that helps,
Julius

Am 28.10.20 um 13:54 schrieb Martin Steffen:
I have troubles to export (or publish) some orgfiles, which contain
``src'' snippets intended for markdown. The (for me) unwelcome behavior
is the same for org-export and org-publish, I guess, since it has the
same core reason.

The problem currently for me is for the markdown format. I have seen
similar behavior for other exports, though did not care since it for
those situations, it was/is ``good enough''. Now, however, I do some
export to md, to be used for Jekyll webpages, and it's no longer good
enough.

For concreteness sake: I got some section


#+begin_src markdown
---
layout: default
title: Some Title
description: Some information
---
#+end_src


which is exported to md literally, but with 4 leading spaces as
indentation, like

     ---
     layout: default
     title: Some Title
     description: Some information
     ---

That's insofar unwelcome, as Jekyll wants those pieces of information
without indentation.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]