How to Create an Index Using yWriter

149 views
Skip to first unread message

willwrite4chocolate

unread,
Mar 17, 2021, 11:50:05 AM3/17/21
to yWriter
Hello Simon and you smartypants yWriter people:

I need to create an index for the nonfiction book I'm writing and am trying to figure out the best way to do this in yWriter. 

Tags? Characters? Items? Locations?

For example, I would like to know which scenes are about "boredom" but do not contain the word "boredom." As I go through, I would like to be able to tag or drag/drop character/item/location or something into the scene info so that later I can run a report and find the scenes to easily build my index.

Has anyone done this or can any of you yWriter wizards think of an easy way for me to do this?

Tags in yWriter still confound me, but that was my first thought.

BOOK DEADLINE LOOMING!! So, HELP!

Thanks,

~ Nita

Simon Haynes

unread,
Mar 17, 2021, 12:04:14 PM3/17/21
to ywr...@googlegroups.com
For latex export I did this (it's the entire scene. Set 'export when' to Latex)

<TEX>
\tableofcontents



Calibre already includes a TOC for ebooks, but for a more elaborate one put this in your ebook exporter 'Override Epub Commandline Options'

--input-profile=default --output-profile=tablet --disable-font-rescaling --no-default-epub-cover --flow-size=260 --change-justification="justify" --toc-filter="Unnamed" --level1-toc "//*[name()='h2' or @class='chapter']" --level2-toc "//h:h3" --use-auto-toc

Define project variables:

image.png

And also one for SectionHeader:

image.png

Use like this at the start of a chapter:

image.png

And this for subsequent scenes in the same chapter:

image.png


PDF output (auto generated TOC)


image.png


Epub output (auto generated and indented TOC)

image.png


--
You received this message because you are subscribed to the Google Groups "yWriter" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ywriter+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ywriter/a969d88e-44b8-4272-8147-5751aa9b1020n%40googlegroups.com.


--

--
Visit Spacejock Software, the home of yWriter, FCharts and more
Visit spacejock.com.au for my articles on writing and publishing novels.

Simon Haynes

unread,
Mar 17, 2021, 12:04:46 PM3/17/21
to ywr...@googlegroups.com
Oops sorry - you said index, not TOC.  Apologies.


On Wed, 17 Mar 2021 at 23:50, willwrite4chocolate <ni...@nitasweeney.com> wrote:
--
You received this message because you are subscribed to the Google Groups "yWriter" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ywriter+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ywriter/a969d88e-44b8-4272-8147-5751aa9b1020n%40googlegroups.com.

Peter T.

unread,
Mar 17, 2021, 3:56:09 PM3/17/21
to yWriter
Nita, 

what's your point: do you want the index to help you find your way around yWriter at work? Then tags are a quick solution. There is a "Tags" column in the main window scene list, so that you can quickly find scenes to which certain tags (if several, then separated by commas) are assigned. If you don't see the "Tags" column, you can scroll to the right and move the column left.There are also some scene reports where you can list scenes that contain certain tags. 

If it is not enough for you to find the scenes, but the exact position in the text, there is also the option of placing comments in the running text that are /* specifically bracketed */ and not exported by default. So you can spread your keywords all over the place, and then use the global search function to find them. The only important thing is that the search term contains the brackets.

If you want to print a non-fiction book that has an index with page numbers at the end, it gets more complicated. If you export LaTeX (which is recommended for a non-fiction book, but requires a lot of expertise), you can mark the places that should appear in the index with the necessary inserted TEX commands. Then, in the end, a LaTeX utility can create the index automatically. 

If I needed such an index, I would probably mark the places to be indexed with comments as described above, and then convert them into index marks of the typesetting software during or after export. To do this, I would use my own LibereOffice importer, which converts these comments into annotations that are navigable in LibreOffice.

Cheers, 
Peter

On Wednesday, March 17, 2021 at 4:50:05 PM UTC+1 willwrite4chocolate wrote:
I need to create an index for the nonfiction book I'm writing and am trying to figure out the best way to do this in yWriter. 

Nita Sweeney

unread,
Mar 17, 2021, 5:15:57 PM3/17/21
to ywr...@googlegroups.com
Hi Peter:

I'm sorry I wasn't clear. Yes, my nonfiction book needs an index with page numbers at the end.

I will actually "create" the index Word. But I need to know which scenes relate to which topics. My hope is to create a system within yWriter so that I could somehow demarcate each scene "tagging" it with the term that would be in the index even if that scene does not contain that word. I would give it the tag (character/item/location - using those for this purpose and not the purpose for which Simon intends them) as I work through the document in  my revisions.

Just before I export the document, I would like to be able to print a report by index entry so I could later easily find all the scenes that are about "boredom" let's say.

Does that help?

~ Nita


At 03:56 PM 3/17/2021, you wrote:
If you want to print a non-fiction book that has an index with page numbers at the end, it gets more complicated. If you export LaTeX (which is recommended for a non-fiction book, but requires a lot of expertise), you can mark the places that should appear in the index with the necessary inserted TEX commands. Then, in the end, a LaTeX utility can create the index automatically.

If I needed such an index, I would probably mark the places to be indexed with comments as described above, and then convert them into index marks of the typesetting software during or after export. To do this, I would use my own LibereOffice importer, which converts these comments into annotations that are navigable in LibreOffice.

Nita Sweeney, award-winning wellness author
Depression Hates a Moving Target
You Should Be Writing
Mental Wellness Group
https://nitasweeney.com
Follow @NitaSweeney on your favorite social media channels

Peter T.

unread,
Mar 17, 2021, 5:54:03 PM3/17/21
to yWriter
Nita, 

if you want to manually index your exported document after a scene list, you can do it this way. Whether you use tags or misuse "Characters"/"Locations"/"Items", the result is the same. 

It will be easier for you later if you instead insert your keywords directly in the text and mark them in a distinctive way, e.g. "$$Keyword$$" (the same way comments work in principle). Then you can jump from place to place in your word processor after the export and replace the keyword with a system specific index entry. If your word processor is programmable with macros, this can be automated very easily. 

Maybe your publisher can also do it, if you agree with them on the usage of marked index keywords. Or simply ask them how this is normally handled.

Cheers, 
Peter

Reply all
Reply to author
Forward
0 new messages