-
Notifications
You must be signed in to change notification settings - Fork 312
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Spell labels #93
Comments
Here is some code that I can import in later. I am working on an international move, and time is in short supply!
The pagetarget macro sets up both label and hypertarget. In your use case, only the hypertarget portion is useful, but pagelink could be used in an entirely different part of the book. In that case, the spell could be referenced, and if it is the print version where a hyperlink does not show up and is not useful, the page number is added for quick reference. As for adding it the target label, is there not an easy way to convert the provided spell name to convert to lowercase and change all other punctuation to dashes? |
I spent a bit of time trying to figure this out. I couldn't find any packages that "slugify" a string. It's easy to lowercase the name and replace certain characters using the |
With the conversion to LaTeX3, this should be significantly easier whether through a regex replace or through other means. Although the ref I used in #164 doesn't do any special handling of non-alphanumeric characters. |
It's also easy to write a "slugify" function in Lua and use LuaTeX (I've done this locally). I've also used Lua to replace the dice calculations (it's faster than |
Maybe it would work better to just add an option for the link text? Then the function will take care of the busywork but allow the user to set define the text. |
It would be useful to be able to specify a label for the spells. That would allow hyperlinking from a spell list to a spell description. The following is a suggestion/use-case:
The text was updated successfully, but these errors were encountered: