# Is it safe to use \texorpdfstring from package hyperref, outside the sectioning commands?

I have several commands with some math that I use inside and outside the sectioning commands (`\section`, etc.). Of course, package `hyperref` complains. I do not want to scan the sectioning commands to put `\texorpdfstring` inside them. I thought to change the definitions so my commands use `\texorpdfstring`. In this case `\texorpdfstring` will appear outside the sectioning commands. I wonder wheter this will work, or I need another solution.

-
`\texorpdfstring` is independently from the command `\section`. For more details please provide a MWE. – Marco Daniel Jan 30 '12 at 13:13
Did you try? :) – egreg Jan 30 '12 at 13:14

`\texorpdfstring` works outside of `\section`, I've used it several times to avoid issues with `\and` in `\author` (it's not rendered when filling the PDF metadata), and I don't get errors or warnings when I use it that way.