!Missing $ inserted. <inserted text> $In the event that the underscore is often used at the document, masking can become quite cumbersome. In such a case you can use the package underscore.
The advantage of the package is that the underscore can now be used as a simple keyboard character _ within text mode and the underscore can still be used in math mode to introduce the indices.
Input:Word_Word $a_{i}$Output:
Using the underscore package has the disadvantage that no external file (images, additional tex file) can be included if it contains a _ in file names. This means that within the commands \input{filename}, \include{filename} and \includegraphics{filename} no filename with an underscore can be used. In addition, problems can also be expected with other commands if an underscore is used.
If the package option strings is set, some of the above problems will be fixed and at \input{filename} and \include{filename} filenames with underscore can be used again.
Set the option strings: \usepackage[strings]{underscore}Bepart from the new problem, i.e. the limited use of the underscore in file names and commands, the package is a viable alternative to masking each underscore.
Eng related to the question nor the underscore is the underlining of words, words and paragraphs. If a word is to be underlined, the default LaTeX command \underline{word} can be used, or the \ul{word} command from the soul package. If a whole paragraph is to be underlined, the \uline{paragraph} from the ulem package can be used.