Asciidoc version: asciidoc-8.6.8-3.fc20.noarch
See attached.
I tried to define a conditional attribute, {td},
that would expand as a period ('.') when using the PDF backend.
My purpose for doing this was to add a '.' after
a <block title>, because the generated HTML had them,
but the generated PDF (dblatex backend) did not.
The file, sciidoc-backend-conditional.png, shows the expected output.
The only difference between the two files is the
placement of the definition of {td}.
It seems that this definition of {td} which is conditional
on the backend did not set {td} if that definition is in
the document header. Moving it into the beginning of
a section did work, however.
- Why didn't it work in the document header?
- Is there a better way to handle this?
thanks,
- Gary
--
You received this message because you are subscribed to the Google Groups
"asciidoc" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/asciidoc.
For more options, visit https://groups.google.com/d/optout.
:doctype: article
:Author: Alfred E. Newman
// escape a comma.
:comma: ,
// the {x} attribute is a check mark used in tables.
:x: ✓
= Dummy title =
// For titles/headers, HTML adds a '.', but docbook does not.
// Use this conditional attribute to add a '.' in docbook.
:td: {basebackend@docbook:.}
This is a comma: ''{comma}''.
This is a check mark: ''{x}''.
This is a period (in PDF): ''{td}''.
:doctype: article
:Author: Alfred E. Newman
// escape a comma.
:comma: ,
// the {x} attribute is a check mark used in tables.
:x: ✓
// For titles/headers, HTML adds a '.', but docbook does not.
// Use this conditional attribute to add a '.' in docbook.
:td: {basebackend@docbook:.}
= Dummy title =
This is a comma: ''{comma}''.
This is a check mark: ''{x}''.
This is a period (in PDF): ''{td}''.