Making first paragraphs not indented in exported HTML
Steve Litt
slitt at troubleshooters.com
Mon Apr 11 01:44:35 UTC 2022
Hi all,
In the past, some exporters have implemented the custom of not
indenting the first of several successive paragraphs by using a
different class of paragraph for the first of a series of paragraphs.
This way of doing things makes more work for the person writing the
export, and more work for the person converting the export to
acceptable ePub, because those special classes will need to be backed
out or otherwise specially handled.
Not indenting the first of a series of paragraphs is easily
accomplished by the following two lines of CSS:
p::first-letter{margin-left: 3em;}
:not(p) + p::first-letter{margin-left:0.0001em;}
Let CSS decide which is the first of several consecutive paragraphs,
and let CSS define what to do with that paragraph. Make it easy on
everybody.
I took an hour to figure this out. Could somebody please take 3 minutes
to forward it to the developer's list and also the person who is
writing the HTML export?
Thanks,
SteveT
Steve Litt
March 2022 featured book: Making Mental Models: Advanced Edition
http://www.troubleshooters.com/mmm
More information about the lyx-users
mailing list