I have asked strip last character from parameter if it is 's' and I was given an answer. However, it turns out my case is little bit more complicated. Some of the monsters have hard to type names so I used a macros, e.g., \WviiSPOT, instead of directly typing the monster names. It turns out that combination of indexing and paragraphs fails to compile. Is there a way to make this work?





This works:
\monster{Red Pirannhas} \monster{Bambiphoots} \monster{Stag Weevils} \WviiSPOT{}

This does not:
\paragraph{But \WviiSPOT{} is insane!}
  • 1
    Use \DeclareRobustCommand instead of \newcommand. – Manuel Jun 21 '16 at 7:46
  • @Manuel: For which of the commands? – wilx Jun 21 '16 at 7:47
  • All of them could be, but the “important” are \monster and \indexMonster, since the other one is just a shortcut. – Manuel Jun 21 '16 at 7:48
  • @Manuel: Thank you. That seems to solve the issue. – wilx Jun 21 '16 at 7:51
  • Glad this worked out. By the way, I think you added the wrong question in your url. – Runar Jun 21 '16 at 7:57

This is my answer there, including the new command. You just have to \protect it:








\paragraph{But \protect\WviiSPOT is insane!}




enter image description here

The strinstrings package by Steven B. Segletes.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.