Basic markdown paragraph indent

tl:dr How does one indent paragraphs in DTTG markdown?

For a number of reasons I have researched the various writing and outlining apps that work with DEVONThink and I have decided to do all my writing for the next stage completely in DT in markdown. I don’t have to track citations or footnotes (yet!) and I am at the stage where I just want to dump in all the words, quickly into a document and sort it out later. I do most of my writing on an iPad then sort it all out, edit and organize on a MacBookPro (and sometimes an iPhone)
I have looked at the Markdown cheat sheets and I need very little of the fancy stuff, maybe a heading or two and the TOC could probably come in handy.
I do have one question that seems so simple but I can not solve. I find that indenting paragraphs makes large blocks of text easier to read and I can’t figure out how to indent in markdown on DTTG. At least in DTTG, two hard returns defines a paragraph, but adding spaces at the beginning of the line doesn’t show up in the rendered view. A β€œTab” at the beginning changes the size and font of the paragraph but I don’t know why. I can t find a reference to Tab in the markdown cheat sheets that I was referencing.

It’s not possible. Markdown doesn’t render whitespace like you know it from normal text.

A tab is equal to wrapping text in backticks, it produces code

1 Like

Thanks.
And that’s not something that can be solved by mucking around with CSS files or a setting somewhere?

It’s possible by using HTML in Markdown, see How to indent a few lines in Markdown markup? - Stack Overflow.

Unfortunately it’s not possible to add HTML via CSS, see CSS content property: is it possible to insert HTML instead of Text? - Stack Overflow


Edit:

You could use this, found here How do I indent or tab text on my web page or in HTML?

<style type="text/css">
 .tab { margin-left: 40px; }
</style>

Normal paragraph.

<span class="tab">Indented paragraph.</span>  
<span class="tab">Indented paragraph 2.</span>
1 Like

Thanks. &nbsp;is a simple enough solution that leaves the raw text readable and isn’t too much of a hassle with an iOS text expansion.

1 Like

Of course it can be. Though it’s not clear what you mean by indenting: indent the whole paragraph or just the first line of each paragraph.
The first can be achieved by setting a margin or padding on the p element in your CSS.
For the second, use the text-indent property: text-indent | CSS-Tricks - CSS-Tricks

This is not a very good idea. Firstly, span is not a block element. So putting one after the other will run them together on the same line in HTML.
Secondly, CSS has been invented to separate representation from content. Running both of them together again makes modifying appearance a lot more cumbersome then necessary.
Third, there is a CSS solution (see my other post) for this.
Fourth, using px as a dimension for anything like indentation, font size, margins etc. is a bad idea. Px is different in almost every device. And a 40px indentation looks huge for a 8px font but ridiculously small for a 60 px one.
Use relative units like em, rem etc.

1 Like

That’s why I added 2 spaces at the end.

I simply copied what I found here and didn’t think about it (even if I would have thought about if I wouldn’t have recognized all those failures without looking things up, so thanks!)

Thanks everybody. I learned a bunch going through the links and googling some of those terms.

β€Žβ€β€β€Ž β€Žβ€β€β€Ž β€Žβ€β€β€Ž β€β€β€Ž β€Žβ€Žβ€Žβ€β€β€Ž β€Žβ€β€β€Ž β€Žβ€β€β€Ž β€β€β€Ž I’ve also learned that the thing I was aiming for is an archaic form of layout, at least by web standards. That is, indenting the first line only of a paragraph. I find it makes large blocks of text more readable and navigate-able.
β€Žβ€β€β€Ž β€Žβ€β€β€Ž β€Žβ€β€β€Ž β€β€β€Ž β€Žβ€Žβ€Žβ€β€β€Ž β€Žβ€β€β€Ž β€Žβ€β€β€Ž β€β€β€Ž One of the pages I read sent me here emptycharacter.com and I was able to make an iOS text replacement of 6 characters of β€Žβ€β€β€Ž β€Žβ€β€β€Ž β€Žβ€β€β€Ž β€β€β€Ž β€Žβ€Žβ€Žβ€β€β€Ž β€Žβ€β€β€Ž β€Žβ€β€β€Ž β€β€β€Ž which is some kind of Unicode empty space character. It’s not visible in edit or rendered view in a markdown document and it indents just fine. There’s a whole host of empty character types listed on that page that might work if you can wrangle Unicode. I’m doing a bulk of this kind of writing on an iPad and I don’t want to add too many apps or alt keyboards or extra code that might distract me.
β€Žβ€β€β€Ž β€Žβ€β€β€Ž β€Žβ€β€β€Ž β€β€β€Ž β€Žβ€Žβ€Žβ€β€β€Ž β€Žβ€β€β€Ž β€Žβ€β€β€Ž β€β€β€Ž This way I get a simple way to indent, it looks clean in either mode and it gets out of my way when I’ve got gold running from my fingertips into the keyboard.

P.S. it also works in this forum text entry.

1 Like

:thinking:

3 Likes

How about …:

p {
	text-indent: 0em;
}

p + p {
	text-indent: 1em;
}

By these styles you can define every first paragraph independent from the subsequent ones. For example you could add a margin-top to the first paragraph but not to the subsequent ones. As the former affects the latter you would have to set their margin-top to 0.

You will have to check out lists and define styles for them because they get affected by these paragraph settings.

This only indents the subsequent paragraphs?
:thinking:

Unless I’m misunderstanding the OP’s initial request, my solution does exactly what is needed.

Yes.

You are right, @SlickSlack did not ask for an unindented first paragraph but that’s how indenting is handled.

1 Like

Handled where?

In proper typography. See for example here (okay, it says that the first-line indent of a first paragraph is optional and not downright bad style).

1 Like

Definitely subjective.

I worked in graphic arts and printing for 32+ years and first paragraph indenting is far more common in my experience (including plenty of book printing) :slight_smile:

@BLUEFROG
That looks like a good solution too.

β€Žβ€β€β€Ž β€Žβ€β€β€Ž β€Žβ€β€β€Ž β€β€β€Ž β€Žβ€Žβ€Žβ€β€β€Ž β€Žβ€β€β€Ž β€Žβ€β€β€Ž β€β€β€Ž I don’t know much about how CSS and HTML work and generally don’t want to bog my writing down with anything that stops… (orchestra swells then cuts to total silence)…THE FLOW.
β€Žβ€β€β€Ž β€Žβ€β€β€Ž β€Žβ€β€β€Ž β€β€β€Ž β€Žβ€Žβ€Žβ€β€β€Ž β€Žβ€β€β€Ž β€Žβ€β€β€Ž β€β€β€Ž I’m only just figuring out that writing in markdown works well for me on iOS and I can wean myself off of thinking that basic text editing like the MacOS Text Edit or BBEdit is the simplest way to go. Especially as it is repeatedly stated on this forum that iOS doesn’t support rich text editing natively (I’m probably getting the technical semantics of that wrong).

β€Žβ€β€β€Ž β€Žβ€β€β€Ž β€Žβ€β€β€Ž β€β€β€Ž β€Žβ€Žβ€Žβ€β€β€Ž β€Žβ€β€β€Ž β€Žβ€β€β€Ž β€β€β€Ž I’ve read a lot on this forum from people pushing for full screen writing modes and full fledged editors in DT and DTTG and the pushback from others saying that’s not what it is designed for. I like where it is now and while I’ve investigated using Scrivener and iAWriter I don’t want to complicate my workflow and put anything between me and writing. Especially when I really really REALLY have to force myself to ignore all possible distractions.
β€Žβ€β€β€Ž β€Žβ€β€β€Ž β€Žβ€β€β€Ž β€β€β€Ž β€Žβ€Žβ€Žβ€β€β€Ž β€Žβ€β€β€Ž β€Žβ€β€β€Ž β€β€β€Ž I’ve got two solutions that work for my needs, my empty space character text expansion and @BLUEFROG’s simple style header. Plus I learned a bit about CSS and HTML, against my better judgement 

β€Žβ€β€β€Ž β€Žβ€β€β€Ž β€Žβ€β€β€Ž β€β€β€Ž β€Žβ€Žβ€Žβ€β€β€Ž β€Žβ€β€β€Ž β€Žβ€β€β€Ž β€β€β€Ž thanks again for everyone’s help.

You’re welcome!

The beauty of Markdown/plain text is they do let you concentrate on just getting words out. :slight_smile:
And if you want to pretty it up, even something simple like setting a font or a color is fairly simple CSS-wise.

Incidentally… a previous post of mine that may be of interest:

1 Like

Interesting. I have never worked in the printing industry but I have read quite a number of books and magazines over the course of something-something decades and in my experience almost always first-paragraph first-line indents come with uncomfortable to read line-spacings, abominable margins, wrong quotation marks, &c. Meaning they are a result of amateurish typography.

But please do take no offence, I’m not at all calling your experience in question. The vast majority of my reading experience is books in German and there you won’t find first-paragraph first-line indents very often. On the other hand the sample books in English I just checked sometimes have them and sometimes not. So I falsely generalized.

PS: On just another hand (who the hell does this third hand belong to?) Gutenberg was German. While I can assure you that you won’t find any hint of a streak of nationalism, national pride, patriotism, or whatever you like to call it in meβ€”maybe, just maybe it is worth a thought not to ever tinkle with the recipes of German typography. (And beer, as some might want to add.)

PPS: It’s of course pure coincidence that to conclude this posting of all things I use a screenshot of Donald Barthelmy’s story β€œMargins” (Sixty Stories, Penguin: 2003) which by the way happens to not have a first-paragraph first-line indent:

1 Like

And then again these rules are dependent on region and personal preferences. When I was working in the typesetting business some 40 years ago, first paragraphs (ie at the beginning of text, after a headline etc) where not indented, only subsequent ones (by one em or less – never more). That was for newspapers in Germany. Books are different, of course.

Regardless, using css is a lot better then adding fixed spaces by hand. Also, because it allows for easy modification (all paragraphs, only the first one, amount of indentation…).

1 Like