Glossary in PDF output

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Glossary in PDF output

fleurystephane
Hi,

I've got a problem with a glossary in PDF output.
My asciidoc file myfile.adoc includes a file glossary.adoc which looks like :

'''glossary.adoc
[[glossary]]
= My glossary

[glossary]
word1::
  My definition here
'''

'''myfile.adoc
= My title

== Introduction
blabla

include::glossary.adoc[]
'''

I run asciidoc to xml first and then fopub to pdf :
----
asciidoctor -b docbook -d book -a toc -a numbered myfile.adoc
----
----
fopdf myfile.xml
----

The result in pdf glossary chapter is :
Chapter 10. Glossary

<glossentry>word1
<glossdef>my definition here</glossdef>
</glossentry>

It seems that the xml is not analyzed...
Thanks
Reply | Threaded
Open this post in threaded view
|

Re: Glossary in PDF output

mojavelinux
Administrator
I know it's a bit weird, but the glossary style must be added to both the section and the description list. In other words, you need:

.glossary.adoc
[source,asciidoc]
----
[[glossary]] 
[glossary]
= My glossary 

[glossary] 
word1:: 
  My definition here 
----

You could also type it using shorthand for the id:

.glossary.adoc
[source,asciidoc]
----
[glossary#glossary]
= My glossary 

[glossary] 
word1:: 
  My definition here 
----

It probably would be nice if Asciidoctor caught a glossary list that is outside a glossary section. Perhaps file an issue to emit a warning? Otherwise, I think we get broken DocBook.

-Dan

On Fri, Sep 5, 2014 at 4:02 AM, fleurystephane [via Asciidoctor :: Discussion] <[hidden email]> wrote:
Hi,

I've got a problem with a glossary in PDF output.
My asciidoc file myfile.adoc includes a file glossary.adoc which looks like :

'''glossary.adoc
[[glossary]]
= My glossary

[glossary]
word1::
  My definition here
'''

'''myfile.adoc
= My title

== Introduction
blabla

include::glossary.adoc[]
'''

I run asciidoc to xml first and then fopub to pdf :
----
asciidoctor -b docbook -d book -a toc -a numbered myfile.adoc
----
----
fopdf myfile.xml
----

The result in pdf glossary chapter is :
Chapter 10. Glossary

<glossentry>word1
<glossdef>my definition here</glossdef>
</glossentry>

It seems that the xml is not analyzed...
Thanks



If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Glossary-in-PDF-output-tp2120.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML



--