emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Variable-width font indentation


From: Yuri Khan
Subject: Re: Variable-width font indentation
Date: Sat, 10 Mar 2018 11:27:39 +0700

On Sat, Mar 10, 2018 at 2:48 AM, Clément Pit-Claudel
<address@hidden> wrote:

> Except in lists, right? For example it's not uncommon to wrap like this:
>
> * Some long text here
>   that wraps around:
>
>   i.   Point 1
>        … continued
>   ii.  Point 2
>        … continued
>   iii. Point 3
>        … continued

The way word processors implement this is:

1. Specify a left margin of, say, 0.5in. This makes each line start at
that offset.

2. Specify a first line indentation of, say, -0.25in. This way the
list marker starts at 0.25in, immediately followed by the rest of the
first line. Each subsequent line starts at the left margin 0.5in.

3. To make the item text of the first line align with the rest of the
paragraph, put a tabulation between the marker and the item text.
Align that tabulation at 0.5in.


The way HTML+CSS implement this is (roughly):

1. Specify a left margin for the whole list, say, 0.5in.

2. Treat list markers as special absolutely positioned elements. Put
them at, say, (-0.25in across, +0in down) from the start of list item.
(Absolutely positioned elements do not affect the layout of the
surrounding text, so list item text is aligned normally.)


In both cases, if the list marker becomes really long and no longer
fits its allotted space of 0.25in, there will be display artifacts. In
Word-alikes, the item text will start at the *next* tab stop. In
HTML+CSS, item text will visually overlap the marker.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]