line folding guidelines?

2 views
Skip to first unread message

Rich Morin

unread,
Dec 5, 2008, 10:37:21 PM12/5/08
to merb...@googlegroups.com
The Markdown source code uses arbitrarily long lines, where
each line gets transformed into a paragraph. I'd suggest that
we switch to a format where each sentence begins on a new line.

There are several reasons for such a change:

* It's easier to see the structure of the narrative, because
each sentence is seen as a "chunk".

* It's easier to move sentences around, because selecting a
line or two is much faster and easier (see Fitt's Law)
than selecting an arbitrary sequence of characters.

* It's easier to merge changes, because only the changed
sentences need to be considered (as opposed to the entire
paragraph).

Making such a change would be a bit painful now, but it will be
almost unthinkable later on. So, we need to make a decision.

-r
--
http://www.cfcl.com/rdm Rich Morin
http://www.cfcl.com/rdm/resume r...@cfcl.com
http://www.cfcl.com/rdm/weblog +1 650-873-7841

Technical editing and writing, programming, and web development

Dale Campbell

unread,
Dec 5, 2008, 11:47:08 PM12/5/08
to merb-book
I think this is a solid idea. Although, instead of one sentence per
line, how about we enforce a character limit of (for example) 80
characters per line. That would allow the markdown source to still be
viewed as a single cohesive paragraph. I completely agree that it
would make merges much easier, for the reason mentioned in point #3.

As for converting the current one-line paragraph format, I could
tackle that in my spare time (once we decide on the format).

Kudos for bringing this up, Rick.

On Dec 5, 9:37 pm, Rich Morin <r...@cfcl.com> wrote:
> The Markdown source code uses arbitrarily long lines, where
> each line gets transformed into a paragraph.  I'd suggest that
> we switch to a format where each sentence begins on a new line.
>
> There are several reasons for such a change:
>
>   *  It's easier to see the structure of the narrative, because
>      each sentence is seen as a "chunk".
>
>   *  It's easier to move sentences around, because selecting a
>      line or two is much faster and easier (see Fitt's Law)
>      than selecting an arbitrary sequence of characters.
>
>   *  It's easier to merge changes, because only the changed
>      sentences need to be considered (as opposed to the entire
>      paragraph).
>
> Making such a change would be a bit painful now, but it will be
> almost unthinkable later on.  So, we need to make a decision.
>
> -r
> --http://www.cfcl.com/rdm           Rich Morinhttp://www.cfcl.com/rdm/resume    r...@cfcl.comhttp://www.cfcl.com/rdm/weblog    +1 650-873-7841

Matt Aimonetti

unread,
Dec 6, 2008, 12:16:34 AM12/6/08
to merb...@googlegroups.com
Can we do that with Markdown? I don't really want to move away from
markdown + maruku

- Matt

Sent from my iPhone

Rich Morin

unread,
Dec 5, 2008, 11:15:52 PM12/5/08
to merb...@googlegroups.com
At 20:47 -0800 12/5/08, Dale Campbell wrote:
> I think this is a solid idea. Although, instead of one sentence
> per line, how about we enforce a character limit of (for example)
> 80 characters per line. That would allow the markdown source to
> still be viewed as a single cohesive paragraph.

Given that there is a blank line between every pair of paragraphs,
and no blank lines within a paragraph, I don't think we need to
worry about viewing paragraphs as single, cohesive entities. And,
if we don't break at line boundaries, we lose some of the other
benefits of "chunking" the text into sentences.

My personal (admittedly OCD) practice is to add line breaks
at the start of each major clause,
as well as the beginning of each sentence.
This makes the text look a bit choppy,
but I've gotten quite used to it over time.

A possible compromise would be as follows:

* Start each sentence on a new line.

* Fold sentences, if need be, to make them fit within
80-character lines.

Hong Jiang

unread,
Dec 6, 2008, 12:30:47 AM12/6/08
to merb...@googlegroups.com
+1 for 80-column limit per line. It's easy to follow.

Rich Morin

unread,
Dec 5, 2008, 11:36:56 PM12/5/08
to merb...@googlegroups.com
At 21:16 -0800 12/5/08, Matt Aimonetti wrote:
> Can we do that with Markdown? I don't really want to move
> away from markdown + maruku

I've found no problems with normal paragraph text. Other
types of content may, however, take a bit of special care.
For example, each line in a quoted paragraph needs to start
with '>'. So, we may want to leave these oddballs alone...

Until we have a set of guidelines, we'll need to be very
certain to inspect the formatted results we're getting.

Dale Campbell

unread,
Dec 6, 2008, 12:48:45 AM12/6/08
to merb-book
IIRC, Markdown only separates blocks into <p> tags if there's an empty
newline in between the 'chunks' of text, so we could safely enforce an
80 character limit, while still retaining the current rendered HTML
look/styles. So as long as there's no newline in between sentences,
it will remain as a single paragraph.

For example, (if this were Markdown source), this sentence would start
a new <p> tag and the above paragraph would have it's own <p> tag,
regardless of how long the lines were (since there's only an empty
line to separate them). Having explicit newlines in a single
paragraph would (IMO) help readability of people editing the Markdown
source, while still retaining the same output.

An 80 character limit would have no effect on the generated HTML
(based on the conditions above).

Dale Campbell

unread,
Dec 6, 2008, 12:55:03 AM12/6/08
to merb-book
It might be a good idea to add 'Contribution Guidelines' page to this
group, or even in the book itself, once these things are decided upon.

Matt Aimonetti

unread,
Dec 6, 2008, 2:08:38 AM12/6/08
to merb...@googlegroups.com
Dale and Rich,

You seem to know quite a lot about the topic, would you mind
starting a page in the mailing list with examples. I have to admit
that this is not my area of expertise, so unless I see a major
problem, I'll stick to your recommendations.

-Matt

Sent from my iPhone

Dale Campbell

unread,
Dec 7, 2008, 6:51:20 PM12/7/08
to merb-book
I just ran into an interesting situation regarding the line break
formatting. If the line ends with any whitespace character (for
example, a single space at the end of the line), Markdown will add a
<br/> tag which makes the following line in the text break up and not
appear as a single sentence. I ran into this problem on a couple of
pages that were edited to follow the new one sentence per line
guideline.

So just an FYI, if you're making edits, be sure to clear any trailing
whitespace to keep the format intact. If you're on a Mac and using
TextMate, there's a keyboard shortcut which will remove any trailing
whitespace:

Command-Control-Option-C

Yes, that command is a mouth (finger) full, but you can rebind to
whatever you'd like (or use MultiClutch to assign it to a trackpad
swipe ;).

Matt Aimonetti

unread,
Dec 8, 2008, 3:11:35 PM12/8/08
to merb...@googlegroups.com
I left white spaces on purpose to add a breakline, please don't remove breaklines done on purpose ;)

- Matt
Reply all
Reply to author
Forward
0 new messages