When are underscores allowed and when are they not allowed? - TeX

I used to think that the behavior of underscores ('_') was as follows:IF ('_') { BUFFER NEXT ITEM MAKE THE NEXT ITEM A SUBSCRIPT SEND SUBSCRIPT TO OUT STREAM}ELSE IF ('\_') SEND UNDERSCORE CHARACTER TO OUT STREAMI was wrong.%% Use underscore for subscript while not in math mode%% ERROR!%X_5% Use underscore in math mode to make a subscript% No error$ X_{subscript} $% Escape Sequence (backslash) tells LaTeX we want underscore char% instead of '_' means 'make a subscript'% No errorX \_ \_ \_ Oh look! underscore characters.% underscore ...Read more

modify default underscore behaviour/interpretation - TeX

Is there any way to modify the default in-text underscore behaviour document-wide?I'm utilising a lot of filenames, IDs and so on which often have underscores in, and LaTeX doesn't like this (missing $ inserted....). Its becoming laborious to change these every time. Can I do something to resolve this once and for all document-wide without breaking anything?...Read more

Increase underscore - TeX

I have the following document:\documentclass{scrartcl}\usepackage{underscore}\usepackage{mathptmx}\usepackage[T1]{fontenc}\begin{document}TLXV\rule{.5em}{.4pt}AAB % this looks better!TLXV_2 % here the problem is that the underscore is too far downwards\end{document}Now in my opinion, the text-underscore looks too small, but maybe that's only due to the letter 'V' at the end. In my code editor, however, the underscore connects the letters much better (that means closer) with each other than in my pdf document generated by latex. Is there any way...Read more

long underscore before the number in enumerate environment - TeX

I am making a simple exam using the code below:\begin {document}\begin{enumerate}\item Text here\item Text here\item Text here\end{enumerate}\end {document}I want to put a long underscore before each number where students can put their answer like this:______________ 1. Text here______________ 2. Text here______________ 3. Text here______________ 4. Text here______________ 5. Text here______________ 6. Text here______________ 7. Text here______________ 8. Text here______________ 9. Text here_____________ 10. Text here_____________ 11. Text here...Read more