Semantic HTML5 and getting the <p> tags

I’m trying to produce pure and complete HTML5 as compile output. I can then use CSS to produce results formatted for either a web site or a collection of pdf documents.

Pure and complete HTML5 has the following semantic elements (among others): section, article, nav, aside, header, footer. These may be nested. Each can take an optional heading tag, h1 through h6, depending on the level.

I have been able to set up my “MyHTML” compilation to produce HTML tagged for the kinds of elements listed above, just using the “section layouts” tab of “compile”.

On the right of the “styles” page in “compile” there is a pair of boxes for “paragraph prefix/suffix”. I thought that these would be the places for the

and

tags.

But nothing happens.

I hope someone can enlighten me on how to produce

and

tags.

Thanks,

John Velman

PS: By the way, how do the prefix/suffix items in the styles tab here differ from the prefix and suffix given in the section layout tab?

Yes, that would be the idea, and you could use the main prefix/suffix to for example wrap the whole chunk of styled text in a larger semantic block.

But to make sure the basic wiring is intact: this style of course needs to be applied to text somehow. The best way of doing that is to use the Section Layouts pane to override text formatting, and to apply your prepared paragraph style to main text content.

They simply represent different semantic granularities. Section Layouts will generally be applied to the outline itself, and thus give you the ability to create Types for different kinds of things. This is demonstrated in the LaTeX Format you’ve used in the past, where such things as “Equations” can be given a semantic value when compiled. The general nature of that declaration in the project itself, as merely an equation, leaves the implementation open-ended and up to the format—in theory one could take a project initially started with the LaTeX template, and build an HTML5 format that completely alters how the original text functions.

So Section Layouts are a good place for stuff like the element, where a Layout might encapsulate a whole section (particularly with that checkbox to place the suffix after all subdocuments).

Styles are the same in principle, but at a finer granularity of being text level, down to individual characters if we really want them (drop caps come to mind). There is of course some ambiguity when applying a style to all of the text globally, in that a style could become as large as a sectional block, but that’s more the edge case than its target design intent. And on the other edge of unusual usage, outline elements can be as small as single lines of text, and thus Section Layouts may become paragraph-sized in their semantics—again though, typically one would have a larger chunk of semantic text with smaller ranges defined within it via styles. Prefix/Suffix for all these ranges is what gives us the ability to convert these abstract structures into practical plain-text output.