BUG? Convert from formated note to markdown does not keep h1, h2, etc info

I can convert from markdown to formated note perfectly fine. The conversion keeps the h1, h2, etc infos. So “# Text” will be converted to <h1>Text</h1>.

But if I try to convert back from “Formated note” to Markdown, the result is plain text without markdown code. While all the necessary info is in that “Formated note”.

I would even expect that embedded images in formated note would be saved in an “./assets” folder in that same group/folder and embedded images would be linked in that markdown file via ![](assets/md5hashoffile.png).

I would even expect that embedded images in formated note would be saved in an “./assets” folder in that same group/folder and embedded images would be linked in that markdown file via ![](assets/md5hashoffile.png) .

I’m not sure why you’d expect that but that will not happen (as you can see). Development would have to assess this.

I would expect this because otherwise information is lost.

That seems to be the common denominator among all well known markdown editors [^1] for how to handle images in markdown files.

[^1]: Typora and iA Writer, to name only two

Jim, I am keen on a clear handling of markdown because all alternatives - specifically “RTF”, “RTFD” - are not really well suited for writing structured documents.

To give you one example: Starting with the title of the document: I need to select the title text and then (in the rich text editor, which is basically Apple’s “TextEdit.app”) I have to go to font size to make it an appropriate size (or hit "Cmd + +). And then for headlines I have to do this again and again. Say I have made a headline “h3” (level 3). I have to remember how many times I hit "Cmd + +" to make the font which size? That’s error prone. Also, I cannot parse the inherent information that is embedded in those font sizes. In markdown I can create easily a table of contents, I can parse and transform the raw text with the markdown code into any format I like. That’s why this format is very popular not only among developers, but academics as well.

And honestly, this is neither how I write academic papers, nor is this the way I write tech documents or even product specs in 2020.

You claim that outside of (web) development this is not very wide spread. That may be true. But looking at who these folks are - Facebook, Twitter, Instagram or look at the whole universe of projects on Github - these folks are opinion leaders. I assure you, they don’t write their documents in MS Word. You might think we are a niche group, but one that should not be neglected.

I’m not sure in what way those authoring in markdown are supposed to be neglected here. Converting markdown to other formats works fine; it’s importing from rich text to markdown in DT that doesn’t work the way you’d like. But even Pandoc — arguably the leading text-conversion tool — doesn’t import rich text, precisely because it’s unstructured. To import from rich text, a tool has to guess at the intended structure. That sounds like a mess. Arguably, It’s a fools’ errand for tools to try to support that, because different users will use such different structures.

Good practice: write your canonical versions in Markdown. Export to lossy rich text only when circulating to venues where rich text is required.

this is neither how I write academic papers

Word and RTF are still far more prevalent in academia. They’re also far more prevalent in office settings, of which there are millions and millions of workers using these formats daily.

looking at who these folks are - Facebook, Twitter, Instagram or look at the whole universe of projects on Github - these folks are opinion leaders.

Users of these services, excepting GitHub (which is a much smaller contigent of the examples given), are not writing in Markdown, regardless of any underlying technologies.

You might think we are a niche group, but one that should not be neglected.

Umm… spend some time on these forums. Following @korm’s suggestion years ago I’d like Markdown, I am one of the biggest - if not the biggest - advocate of Markdown. Not because of the supposed “opinion leaders” (services of which I don’t care for or personally support), but because of it’s ease of use, styling, and parseability via AppleScript, etc.

Good point. Actually that’s what I am trying to maintain: A single repo (or single “source of truth”) that keeps the originals. But that makes life harder.

It may be popular among a select group of STEM academics and tech-related businesses, but certainly Markdown is a niche among academics or businesspeople overall.

Many journals and business settings require submission in Word format.

I think more options are always great and clearly there are a good number of Markdown supporters here and elsewhere in the tech world - it’s great for software like DT3 to support a variety of formats. But I don’t think Markdown is going to ever achieve a popularity exceeding GUI software.

I realize everyone thinks differently when writing. As for me, I am proficient in Markdown but do not use it for academic or professional writing because it adds an extra step to the writing process which hinders my work - I need to simultaneously look at the Markdown pane where the writing occurs and also compare it to the Preview pane so I know how the finished work product will look.

I would much prefer to do all the work in a GUI such as Word or a rich text editor. The nuances you mention above about achieving consistency in formatting generally are relevant only at the level of a major publication - and in most cases in academia and certainly in business or other forms of publishing, there will be an intermediary editor or quality assurance process to handle that.

Put another way, the business executive or attorney or physician or professor doing high-level writing wants to focus on the big picture and a GUI is perfect for that. Writing in Markdown would be a distraction. There are secretaries and paralegals and graduate assistants who can focus on the extreme nuances of publishing specifications when relevant.

The formats situation in general is indeed very unsatisfactory and frustrating.

Furthermore it is not helpful that DEVONthink does only have a Convert to Markdown function by name whereas it actually is a Convert to Plaintext function. Having difficulties to get the structure of a RTF text is one thing but why flatten italics and bold? It doesn’t even work with converting from HTML. And HTML and Markdown are close formats as Markdown was invented to become HTML.

As for the practical side: In DEVONthink I’m using RTF most of the time because it’s the most convenient format to write in. But when I have a text with footnotes I switch to Markdown. Because Apple forgot to implement footnotes in RTFD.

Mixing formats isn’t that bad for me because I’m not writing a final text in DEVONthink, I just collect research material and my own notes in it, wether elaborated or not. For the actual writing I use Scrivener. Scrivener is a rich text editor but it can import Markdown structured, with footnotes and emphasis, strong etc. And it spits everything out as a structured docx if the recipient requests it. Or as odt, PDF, LaTeX, Markdown, ePub …

And it is like rkaplan said: Docx is kind of a standard in many fields. One reason is if you are collaborating on a text a format must offer more than just the text itself. Docx does.

The other is that many publishers and editors are conservative and not tech savvy. They might even hate Word but at one point someone had set up a macro for them to convert the Word document for, say, InDesign, and they do not dare to touch it.

Absolutely true. An important related reason why Word in particular persists is the “Track Changes” feature. If I am submitting a report to a client and the client is going to offer comments/suggestions, we are not going to collaborate in real-time on the web; the way it is done everywhere in business is to edit a word file and track the changes and then others can accept or reject those changes. Ditto for “collaboration” among colleagues or vendor/customer in many industries and academic fields.