Open michaelsauter opened 3 years ago
That's correct, currently the document title is always shown.
For reference, we should check if doc.hasHeader() && !doc.getNotitle()
in:
Feel free to open a pull request to implement this feature.
What would the correct logic be? Should node.getDocumentTitle()
be hidden, but the author shown if there is a title page?
What would the correct logic be? Should node.getDocumentTitle() be hidden, but the author shown if there is a title page?
@michaelsauter That's a good question and still something we need to agree on: https://github.com/asciidoctor/asciidoctor/issues/4011
To answer your question, I personally think we should show the header (author + revision) when there's a header, noheader
is false
and notitle
is true
.
You can check this table for all the combinations: https://github.com/asciidoctor/asciidoctor/pull/3979#discussion_r600520281
Alternatively, we could mimic what Asciidoctor PDF (https://github.com/asciidoctor/asciidoctor-pdf) is doing. Apparently, when :!showtitle:
is defined, Asciidoctor PDF won't generate a title page even when there are author(s) and/or revision(s).
@mojavelinux Any thoughts?
Alternatively, we could mimic what Asciidoctor PDF (https://github.com/asciidoctor/asciidoctor-pdf) is doing. Apparently, when :!showtitle: is defined, Asciidoctor PDF won't generate a title page even when there are author(s) and/or revision(s).
This makes sense to me - not sure if "right" but I would think a title page without title does not make too much sense.
This makes sense to me - not sure if "right" but I would think a title page without title does not make too much sense.
I agree but it can make sense when you are printing an article where you might to show the author and revision (even if the document title is hidden). For instance:
@Mogztter @mojavelinux any update on how this should be implemented?
I currently use the following JavaScript in the document as a workaround to remove the title page.
// Remove title page
++++
<script>
var titlePageElement = document.getElementById("cover");
titlePageElement?.parentNode.removeChild(titlePageElement);
</script>
++++
I have the following
.adoc
file:However, when I run
asciidoctor-web-pdf mydoc.adoc
, the resulting PDF contains the document title. Is disabling this not supported?