From: Jay Kamat <jaygkamat@gmail.com>
To: Kaushal Modi <kaushal.modi@gmail.com>
Cc: emacs-org list <emacs-orgmode@gnu.org>,
Nicolas Goaziou <mail@nicolasgoaziou.fr>
Subject: Re: [PATCH] Add TITLE export to ox-md
Date: Thu, 24 Aug 2017 10:41:20 -0400 [thread overview]
Message-ID: <87ziaphvu7.fsf@gmail.com> (raw)
In-Reply-To: <CAFyQvY00b0Ouuz7LuQvRK4cWYc6Sdsdt_gNc8tD-MD2uRLvxSQ@mail.gmail.com> (Kaushal Modi's message of "Thu, 24 Aug 2017 10:28:34 +0000")
> I'm not so sure about it. Vanilla Markdown does not support title.
> Neither does "ox-md.el"
I agree that vanilla markdown does not support title, but if ox-md does not
support any form of title, then there is disparity between the output of other
org exports and the markdown exporter. I would like to solve that disparity if
possible.
> Correct, vanilla Markdown does not support title. The file name is the title.
I'm not entirely sure about that (file name being the title). Unfortunately
markdown is very fragmented, so it's hard to tell what the 'standard' is. From
the markdown that I've worked with, this isn't the case. The original markdown
tool (https://daringfireball.net/projects/markdown/) dosen't seem to output
filename titles in it's export, so I wouldn't think it's part of the vanilla
standard.
> But then you would need to shift all headlines 1 or 2 levels down.
> `setext' style becomes unusable because there is no room left for other
> headlines.
Is there a reason we need to move all the other header under the title header? I
was thinking of leaving the rest of the headlines as they are. So:
#+TITLE: My Title
* One
** Two
Would export to
# My Title
# One
## Two
It's a little bit ugly to have two h1 headings right next to each other, though.
Another option is to take advantage of html features of markdown to format the
title in a way that does not alter the headings (similar to how the TOC is
exported now). For example, we could add
<head>
<title>My Title</title>
</head>
to the start of the markdown, but that seems to break the github markdown
renderer. Does anyone who knows more html have any ideas here (besides adding h1
headings in html)?
I don't like the idea of shifting headlines down a level to accommodate the
title since people would then be unable to create new H1 headings in markdown
files with a title.
> Maybe we eventually end up with 3 options (something like below):
>
> - org-md-title-as-h1
> - org-md-subtitle-as-h2
> - org-md-heading-offset
that's probably the best idea I've heard so far, since I would imagine most
people would either not want to have two H1 headings right after each other, or
not want to have their headings shifted. Having such options would allow people
to pick the scenario they want (shifting headings under the title, including the
title but no offset, or not including the title at all).
Does creating these options (defaulting to nil) sound like a good plan to move
forward on? Other ideas and feedback would be appreciated, (since this is a
tricky situation, standards wise).
-Jay
PS: ox-hugo looks very nice, and I look forward to trying it out! :)
next prev parent reply other threads:[~2017-08-24 14:41 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-24 3:32 [PATCH] Add TITLE export to ox-md Jay Kamat
2017-08-24 9:30 ` Nicolas Goaziou
2017-08-24 10:28 ` Kaushal Modi
2017-08-24 14:41 ` Jay Kamat [this message]
2017-08-26 8:11 ` Nicolas Goaziou
2017-08-28 2:43 ` Jay Kamat
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87ziaphvu7.fsf@gmail.com \
--to=jaygkamat@gmail.com \
--cc=emacs-orgmode@gnu.org \
--cc=kaushal.modi@gmail.com \
--cc=mail@nicolasgoaziou.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).