jgm/djot

Add ability to suppress spaces in soft line breaks

mcookly opened this issue · 1 comments

In my writing, I prefer to keep one independent clause (or interjection) per line. I also enjoy using em dashes. But because Markdown adds a space with a soft break, the rendered document contains spaces around the em dash (which is typical in newspapers but not academic writing). For example,

The quick brown fox
---who must be exhausted from all the jumping---
jumped over the lazy dog.

would render as:

The quick brown fox — who must be exhausted from all the jumping — jumped over the lazy dog.

Ideally, there would be a way to suppress these spaces, allowing the example above to be rendered as:

The quick brown fox—who must be exhausted from all the jumping—jumped over the lazy dog.

You can do this in LaTeX by adding a % at the end of a line. Is there potentially any way to designate this in Djot? This could also help with CJK text, which already has an issue opened. (See #131.) Another use case for this ability might be creating citations outside punctuation, as Chicago style dictates. Thus you could have the citation itself be on a new line, separated from its sentence.

This is quite a low priority since these problems are easily worked around. Still, it would be nice to see the option to use line breaks in the source without having them converted to spaced soft breaks.

jgm commented

If we added a TeX-style line comment syntax
#67 (comment)
that could solve this.