Subject: [xml2rfc] Indenting an artwork?

From: Weijun Wang <[email-masked]>
Date: Mon, 12 May 2014 11:13:37 +0800

I'd like to indent a code excerpt but it seems even the 
<figure><artwork> is put inside a <list>, it still aligns with the outer 
text.

I've a similar question on indenting the hangText. While <list> works 
there, it adds annoying blank lines around.

Thanks
Weijun

---

From: Julian Reschke <[email-masked]>
Date: Mon, 12 May 2014 11:55:09 +0200

> <figure><artwork> is put inside a <list>, it still aligns with the outer

I believe the only way to indent artwork right now is to include more 
whitespace at the beginning of each line.

Maybe the right thing to do is to avoid this?

> there, it adds annoying blank lines around.

It would be helpful if you posted what you have, what the output is, and 
what you want the output to be.

In general, I consider all wrangling with vertical whitespace a waste of 
time :-)

Best regards, Julian

---

From: Paul Kyzivat <[email-masked]>
Date: Mon, 12 May 2014 09:58:20 -0400

> In general, I consider all wrangling with vertical whitespace a waste of

I can appreciate the desire. For stuff like code, that may have an 
independent existence outside the draft, there can be a desire to import 
that raw file, rather than having to manually mange that raw file to 
produce the figure content. But then it may not look right compared to 
the surrounding text. And the adjustments that might need to be done to 
get it to look right may vary according to the output format - different 
for txt and html.

It would be helpful to have some options to choose from here: left 
adjust, center, right adjust, align to current indent level, ...

(These need to work on the whole block of fixed width text in the 
artwork. And maybe they should ignore leading and trailing whitespace 
that is common across the block.)

(IIUC the current left/center/right only apply to the decorating text, 
not to the actual artwork. Am I right about that?)

	Thanks,
	Paul

---

From: Elwyn Davies <[email-masked]>
Date: Mon, 12 May 2014 15:08:36 +0100

> <figure><artwork> is put inside a <list>, it still aligns with the outer 

Try <artwork align="center">.  
Maybe not perfect but will indent things.

I thought of a tricky way to achieve this without having to add
whitespace to the beginning of all lines:
Use <artwork align="left"> and add sufficient whitespace to the end of
one line to get the left hand ends where you want them.

I experimented and found that at present this doesn't work (and never
has done) because trailing whitespace gets stripped off <artwork> even
inside CDATA.  I am not sure if this is the behaviour that should be
happening but it is where we are!

> there, it adds annoying blank lines around.

Have you met the processing instruction <?rfc compact="yes"?> which
suppresses the said blank lines and others?
(And <?rfc subcompact="yes"?> which puts some of them back?)

Regards,
Elwyn

> 
> Thanks
> Weijun
> 
> _______________________________________________
> xml2rfc mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/xml2rfc

---

From: Elwyn Davies <[email-masked]>
Date: Mon, 12 May 2014 15:54:42 +0100

> that is common across the block.)

<artwork align="<left|center|right>"> already works on the whole block.

Stripping common leading whitespace wouldn't be very intuitive IMO.
However I just realized that the existing processors strip all trailing
whitespace so you can't play tricks with align="right".  Whether this is
intuitive or not is a matter of opinion.  

The proposal for the v3 vocabulary gets <artwork> and <sourcecode>
inside <blockquote> and the new list elements. Is it the intention that
artwork and sourcecode blocks would be indented equivalently to text in
these elements?

> not to the actual artwork. Am I right about that?)
No... see above.

Regards,
Elwyn

---

From: Weijun Wang <[email-masked]>
Date: Tue, 13 May 2014 09:59:55 +0800

> (And <?rfc subcompact="yes"?> which puts some of them back?)

It seems compact control the blank lines between the table rows and 
pages, and subcompact control those between list items. None can remove 
the blank lines above and below a list.

Regards
Weijun

---

From: Weijun Wang <[email-masked]>
Date: Tue, 13 May 2014 10:21:50 +0800

> In general, I consider all wrangling with vertical whitespace a waste of

Yes, you are right. I've removed all manually added leading spaces in 
hangText and artwork. Just let it be.

Thanks
Weijun