[rfc-i] draft-iab-xml2rfc-02 - alignment of sourcecode
paul.hoffman at vpnc.org
Tue Feb 2 09:18:22 PST 2016
On 29 Jan 2016, at 10:46, Paul Kyzivat wrote:
> The "align" attribute has been deprecated for <figure> while not
> deprecated on <artwork>. But if your figure is contained in
> <sourcecode>, what is the alternative? "align" isn't allowed there.
> At a minimum, "align" out to be allowed with <sourcecode>.
From a semantic point of view, why would you want to align source code
other than "left"? What does center- or right-aligned source code mean?
> Also, I think left/center/right aren't sufficient alternatives for
> alignment. At least historically I think these have been measured
> relative the left and right of the *page*, without regard to margins
> or current indent level. I would like to be able to align relative to
In XML, there is no concept of page margins.
> For instance, consider ABNF source code. I would like the actual
> content of the sourcecode to be valid ABNF. That means that the first
> line of each rule must have no leading whitespace. So any indentation
> needs to come from the "align" attribute. Generally I would probably
> want to have the rules start out aligned with the current indent
> level, or maybe a bit more.
It sounds like you want "indent", not "align", but even then, I'm not
clear why. The sourcecode for your ABNF can have spaces at the beginning
of the lines, can't it?
> So it would be good to have additional possible values for "align" to
> cover this, or another attribute (e.g. "indent" to specify the origin
> to which "align" applies.
For that to work, you would need to specify measurement units such as
> Note that all these things also are relevant to line art. But with
> line art there is less reason not to deal with it by including left
> whitespace within the artwork.
Line art is entered in the XML in <artwork>. Are you asking for an
"indent" attribute there?
More information about the rfc-interest