Doc vs Chapter Titles #35
Replies: 1 comment 3 replies
-
In PMLC, a distinction is made between It's used, for example, to not include And the HTML writer uses two different CSS classes to enable users to style Hence, for consistency reasons you might want to keep the distinction in Sublime-PML. However there is also YAGNI (I'm a big fan of it). But if you remove the distinction, users might later ask for it. There is no clear-cut answer, but I would probably keep the distinction, as it's done already. |
Beta Was this translation helpful? Give feedback.
-
@pml-lang, you might have noticed that the latest Sublime PML 0.7.1 update adds support for inline nodes within
[title
nodes (which wasn't yet supported due to the recent migration from PML 1.5.0).You might also have noticed how
[doc[title
and[ch[title
titles are handled differently:[title
node is implemented separately for[doc
and[ch
, due to titles having been attributes of these nodes with PML 1.5.0.I was thinking that since PML 2.x replaced the
title
attribute with the[title
node, there's no longer a need to differentiate between Document and Chapter titles, and that we could simply treat them alike — i.e. just re-use the same[title
syntax from[ch
for[doc
, so they are highlighted and indexed in the same away.In other words: instead of having two distinct title contexts (one for
[doc
and another one for[ch
), make[title
an independent node in its own right in Sublime PML, and just reuse it for both[doc
and[ch
.Do you see any reasons why document titles should be treated differently from chapter titles in the package? If not, I think I should go ahead with the above changes, which will make the syntax lighter, less entangles and closer to how PMLC treats these two nodes.
Beta Was this translation helpful? Give feedback.
All reactions