fletcher / MultiMarkdown-5

Reference implementation of MultiMarkdown; replaces MultiMarkdown v4 (deprecated -- see MMD-6 instead)
https://github.com/fletcher/MultiMarkdown-6
Other
293 stars 46 forks source link

SUGGESTION: markup for center flush, right flush and justified text #29

Closed devinhedge closed 8 years ago

devinhedge commented 8 years ago

I'd like to attempt to make the case for adding tags for text justification in MultiMarkdown. We already have this for tables. It stands to reason that it would be appropriate for blocks of text.

Newspaper articles typically use justified formatting. Poetry typically uses centered or justified formatting to convey meaning to the prose. When giving attribution of a quote to an author, the author's name is typically preceded by a long hyphen and right justified. Academic journal articles and conference papers are typically justified formatting.

I'm asking for this markup so that text processors can output formatted text.

fletcher commented 8 years ago

Sorry for the delay.

In general, justification/alignment is style, not meaning. In the Markdown/MultiMarkdown model, this means it belongs outside the source text -- e.g. in CSS, not HTML.

I included it in the table syntax, because it is so important in tables that things line up properly (that's really all a table is -- lining up chunks of text so that they have meaning).

I don't intend to add a separate markup for this. The closest thing I would consider is markup that allows adding "class" names to chunks of text (some Markdown variants have this already). I'm not convinced that's a good idea, so I have not done it yet. But it's more generic and flexible than adding separate markup for alignment/justification.

Another way of thinking about it -- the examples you give all base the justification/alignment on the meaning of the text. So the proper way to think about this is to assign meaning, not alignment. You then apply the proper alignment based on the meaning. This is the model used by HTML/CSS, and by Markdown itself (just with a more restricted list of meanings).