From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jay Kamat Subject: Re: [PATCH] Add TITLE export to ox-md Date: Thu, 24 Aug 2017 10:41:20 -0400 Message-ID: <87ziaphvu7.fsf@gmail.com> References: <87fuchzllk.fsf@gmail.com> <87a82p1fey.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:58276) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dktK2-00067X-4F for emacs-orgmode@gnu.org; Thu, 24 Aug 2017 10:41:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dktJz-0005bh-1U for emacs-orgmode@gnu.org; Thu, 24 Aug 2017 10:41:26 -0400 Received: from mail-yw0-x243.google.com ([2607:f8b0:4002:c05::243]:33151) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dktJy-0005bU-Sr for emacs-orgmode@gnu.org; Thu, 24 Aug 2017 10:41:22 -0400 Received: by mail-yw0-x243.google.com with SMTP id u133so1554149ywc.0 for ; Thu, 24 Aug 2017 07:41:22 -0700 (PDT) In-Reply-To: (Kaushal Modi's message of "Thu, 24 Aug 2017 10:28:34 +0000") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: Kaushal Modi Cc: emacs-org list , Nicolas Goaziou > 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 My Title 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! :)