asciidoctor / asciidoctor-latex

:triangular_ruler: Add LaTeX features to AsciiDoc & convert AsciiDoc to LaTeX
http://asciidoctor.org
Other
111 stars 26 forks source link

[FEATURE] Support for generated index in tex output #63

Closed tribut closed 6 years ago

tribut commented 6 years ago

Implemented .tex output for index generation. This should be feature-equivalent to what asciidoctor-pdf is doing (see https://github.com/asciidoctor/asciidoctor-pdf/pull/562).

Note that this does not honor the level of the "index" section, so

[index]
== My Index

and

[index]
=== Index

currently behave the same. That is a limitation of the makeidx package.

mojavelinux commented 6 years ago

This looks good. I agree you have matched the behavior of Asciidoctor PDF (and the DocBook output).

Could you add a doctest for this case?

tribut commented 6 years ago

Removed check for node.special and added doctests. I've also added an unrelated commit to ignore .bundle and vendor and I hope that's alright.

mojavelinux commented 6 years ago

I've also added an unrelated commit to ignore .bundle and vendor and I hope that's alright.

Oops, our paths just crossed. I just added the .bundle entry to .gitignore.

I prefer to put the gems under .bundle so only one entry is needed.

bundle --path=.bundle/gems

Does that work for you? The vendor directory gives me shivers.

mojavelinux commented 6 years ago

This looks fantastic. My only request would be to move the index section test into a separate file. The inline_indexterm should be focused just on the terms. Perhaps create a file called index_section or and move the last test into it. Otherwise, good as :medal_sports: !

tribut commented 6 years ago

Sure, I'll move the test to another file. Also, if you don't mind, I'll just add /vendor/ to the .gitignore. After all, it is standard practice and should not scare you too much hidden in .gitignore :>

tribut commented 6 years ago

Rebased, squashed and made the requested changes.

mojavelinux commented 6 years ago

Seems reasonable to me.

(While I recognize /vendor/ is standard practice, I'll never be able to accept it personally for my own workflow because it's just not logical...but then again, I've always been an outsider).

jxxcarlson commented 6 years ago

@tribut This is wonderful!

mojavelinux commented 6 years ago

:+1: