sympodius / org-novelist

Org Novelist is a system for writing novel-length fiction using Emacs Org mode.
GNU General Public License v3.0
183 stars 14 forks source link

prop for glossary terms? #5

Closed anthrolisp closed 8 months ago

anthrolisp commented 1 year ago

This is an incredible setup. [The notes pages remind me of the talk pages of Wikipedia] Thank you!

Question: How difficult would it be to setup a prop for glossary terms (with each having a definition and while writing linked to instances in the document) such that they could be compiled as a list in a org page to be exported as an chapter (appendix)?

Thank you in advance!

sympodius commented 1 year ago

Thanks very much! Glad you like it 😁

Question: How difficult would it be...?

If I understand correctly, what you're really looking for is a way to selectively export the current glossary, but with descriptions for the chosen entries?

I did previously consider implementing index and glossary generators in Org Novelist. The approach I came up with was having additional file level Org properties like "#+DESCRIPTION: Description of the prop." and "_#+ADD_TOGENERATORS: index, glossary" for the characters/places/props notes files. Then, in the export settings file, the property "#+GENERATE: glossary, index". That way, you could easily say which things to include in the glossary/index, as well as whether a glossary or index should be generated. Although, I did think having a notes file for every entry in an index could be a bit cumbersome...

I suppose having never included a glossary or index in my own stories has kept this a low priority for implementation, but it would be nice to get around to it at some point.

In the meantime, you could probably create a glossary by hand fairly easily, or use something like org-ref?

anthrolisp commented 1 year ago

Yes, this is what I mean, and the implementation idea described makes sense.

I think having something like this would make org-novelist attractive for nonfiction and technical documentation as well!!

org-generic-scrivener !!

sympodius commented 1 year ago

Okay. I'll bump it up on the to-do list 🙂

sympodius commented 8 months ago

This is now implemented and available in the development branch for testing. If you're still interested, give it a whirl and let me know how it goes.

Although glossaries are generated internally by Org Novelist, I decided it would be better for the exported Org file to just include the information required to make an index. This takes the form of file level properties in the exported Org file, and locations in the main text where an index should be placed. To me, Org itself isn't really a suitable format for including an index directly, because a usable index in an Org file wouldn't feel 'native' in any other format to which it was converted. Ultimately, I use Org as more of a working/writing format, rather than a final published format, and indices feel like more of a final format thing. As such, I've made it the job of Org Novelist export templates to actually generate any required indices from the information in the exported Org file. There are examples in the Cubes templates over at https://github.com/sympodius/org-novelist-export-templates if you want to see that in action for PDF and EPUB files.

Hope it proves useful! 🙂