Markdown newbie

I am quite new to markdown. I have some questions to you markdown geeks out there:

  1. I prefer to have a live preview of my markdown code. I know that DTP has a split preview mode. But it’s not a live preview (I use the save shortkey
    to achieve this from time to time), but when scrolling in the code window, the preview window doesn’t scroll to the same position. Would love such a feature in DTP. Or do you use an external markdown editor to achieve this? If yes, which one? I try to avoid additional external apps, would prefer to have this in DTP.

  2. I have noticed that it makes a slight difference in the final layout/style if I define my stylesheet in DTP settings versus linking to it within the markdown document with assigning it with CSS: stylesheet-location. Have you noticed that this leads to different results, too?

  3. any recommendations for using markdown for notetaking in pdfs regarding the workflow?

Best wishes and happy X-mas to all of you

1 Like
  1. Not a question, so no answer. The point has already been raised, it’s up to the DT developers to implement that (or not). Generally, they tend not to provide all features of dedicated programs in DT (neither for PDF nor for images nor for MD).
  2. What you describe (more details as to the perceived differences would be helpful, too) might be due to the order of CSS inclusion. DT provides its own default stylesheet, the one set in preferences might be included at a different place in the final document than the one provided in a link element or in the CSS: header in the MD itself. In general, later styles override earlier ones.
  3. I don’t follow. Do you want to annotate your PDF with Markdown? Do you want to have a MD document separate from the PDF, containing your notes on the PDF? Something else entirely?

ad 1: my question was: do you use an external editor to achieve this
ad 2: I understand. but would expect the same behaviour when using the same stylesheet file (independent of assigning it in the settings or in the markdown document. any idea how to achieve the same output with both variants?
ad 3: i use DTP’s feature to create a linked annotation markdown file

Convert the MD to HTML in DT and have a look at the HTML source. That should tell you which CSS is in force. If not, provide more detail, please – preferably with a short example.

1: For side by side Markdown there are many editors. The key is which flavour of markdown you are using (Common Mark, GitHub, Multimarkdown, Obsidian, Pandoc etc. - all slightly different in the details).

I tend to use multimarkdown as it is fully supported by DT. Editors that support it and give side by side scrolling previews are Multimarkdown Composer (free but not developed for ages), iWriter pro (paid for but not too expensive), IA Writer (more expensive and not fully multimarkdown - have there own additions like wiki links).

Many allow you to trial for free to find the one you like. Others I have played with are Obsidian, Marked2 (preview not an editor), VS code with add on, BBEdit, Atom with add on, Markedit, Typora (live preview not separate), Byword…there are loads!


Q3 is an intriguing one. I suppose it would depend entirely on how you like to work.

I used to take my notes in the PDF and then summarise to Markdown and amend/finalise afterwards, but the last couple of weeks I’ve been writing as I go and not using the summarise button at all (for a range of reasons).

1 Like

On 3, a few things I find useful:

  1. Assign a keyboard shortcut to Insert Quote, which I find tends to be one of my most-used commands when working in the Annotations pane. (I also use a TextSoap cleaner with a keyboard shortcut assigned to reformat quotes to something like the older DT appearance without the newer blockquote appearance – basically stripping out the > marks, though I also tidy it up to taste in other ways.)

  2. Take advantage of the Open command from the Annotations drop-down (control-option-command-O) to open your Annotation file in a separate window, with or without (or if you like showing just) the preview pane. This allows you to use additional Markdown editing tools not available in the Annotations pane, as well as navigating your Annotation file via a Table of Contents in the inspector. This last is especially useful when your Annotation gets long, or when you want to do more complex things with the file. (You can also add an Annotation file to an Annotation file this way, and continue the chain ad infinitum, though I’ve perhaps mercifully never found a use case for this…) You can swap back and forth between editing the same Annotation file in either window as convenient.

  3. Explore transclusion. This is one of the killer features of Markdown in DT.

  4. Markdown tables are extremely useful, but a pain to edit manually. If you use these, consider an external editor and converter such as TableFlip or the IAP in Easy CSV Editor.

1 Like

I use mweb, an one time payment app in iPad as well as in MacOS (pay again). It works fine as an external editor with most of the Markdown and extended Markdown options. I needed to read the manual, experiment options with a test file inside DT3TG. Opening md file from inside DTG3TG through share sheet and then returning after editing by touching devon on top left corner (very small font) works fine.

ad 1 can you explain this in more detail please, maybe with a screenshot, what you are doing

ad 2 great recommendation. It’s really helpful

ad 3 when are you using transclusions? do I need to use the file name or the item link in {{name}}

ad 4 I do not need tables, therefore not so important for me, but nevertheless thanks

what is your main reason to use a third party markdown editor compared to DTP or DTTG?

For transclusion, I personally prefer item links in brackets to filenames; the latter is more transparent, but means you have to be more careful than I am with duplicate file names, and as I’m usually unlikely to remember the exact name without going and checking, I find it’s laziest just to copy the item link while I’m there.

Here’s an annotated screenshot of my own TextSoap cleaner with a before-and-after display of the effect. (TextSoap comes with a built-in cleaner if all you want to do is to strip out the > quote prefixes, but I take the opportunity to tidy them up for my taste with a few more regexes in the stack.)

wow - interesting. May I ask how you open textsoap with a shortcut from within DTP to automatically modify an existing MD document in DTP?

The shortcut is a global one set up in textsoapAgent (under the Global HotKeys tab in its Preferences).

  1. For a prettier view of the raw Markdown text I use iA Writer. The spacings, font and interface make for a better reading experience than the DT editor, which is perfectly fine otherwise. Having the option to tweak the DT Markdown editor for a cleaner reading experience would be nice, but flicking to preview mode for reading is the work of an instant.

  2. Defining your own stylesheet in DTP settings is a set-and-forget thing, unless you want multiple stylesheets for different sorts of docs.

  3. n/a