1

I am using the times package and when using an underscore _ before an italicized upper case character it overlaps. Is it possible to pad the underscore with a small amount of space to the right, or shift it slightly to the left? It is not an issue using other fonts (e.g. utopia), but I want to use times for the document.

underscore_position

Mario S. E.
  • 18,609
  • 6
    As always, it would be great that you provide us with the actual code to produce your example (starting from \documentclass and ending with \end{document}). – Manuel Jun 22 '14 at 18:22
  • 1
    \textit{T\_{\hskip0.02em L}} as a quick trial, but I would rather mind the strange look of T_L regarding the spacing between T and _ –  Jun 22 '14 at 18:25
  • textit had no effect. Is there a particular place in the document that it needs to be declared? – Rich Ashworth Jun 22 '14 at 18:26
  • 1
    A rare ligature, maybe? :) – Bernard Jun 22 '14 at 18:27
  • Well, you wrote italicized, so I assumed, that you have applied \textit or \itshape (or the oldfashioned \it). –  Jun 22 '14 at 18:29
  • I see. Is it possible to replace every occurrence automatically? – Rich Ashworth Jun 22 '14 at 18:29
  • perhaps in the style file? my ligatures are in an environment called 'zed', so would that be an option? – Rich Ashworth Jun 22 '14 at 18:35
  • 1
    A little bit off-topic, but did you read The pack­age is now ob­so­lete, re­placed by the math­ptmx pack­age, which sup­ports Times Ro­man text and (mostly) match­ing math­e­mat­ics. on http://www.ctan.org/pkg/times? –  Jun 22 '14 at 18:36
  • What about looking around the site for kerning? http://tex.stackexchange.com/questions/112287/difference-between-mskip-and-mkern – Mario S. E. Jun 22 '14 at 18:41
  • I've updated to use ptmx, but the underscore issue is still a problem. Replacing one occurrence with the \textit macro solved the formatting issue, but I need the document to contain "_" so that other tools can parse it. This makes me think I need some global replacement for '_' that happens when the pdf is generated – Rich Ashworth Jun 22 '14 at 18:42
  • In my style file, I have \def_{\leavevmode \ifmmode\else\kern0.16em R\fi \vbox{\hrule width0.5em}} - could I change this to solve the kerning issue? – Rich Ashworth Jun 22 '14 at 19:06
  • possible solution given as an answer where (as in my case) it's possible to edit the style file. – Rich Ashworth Jun 24 '14 at 20:41

2 Answers2

3
\documentclass{report}
%\usepackage[T1]{fontenc}%% Should be loaded
\usepackage{mathptmx}
\begin{document}
\Huge
\textit{T\_L}
\fontencoding{T1}\selectfont
\textit{T\_L}    
\end{document}

enter image description here

0

In order to keep the underscore character vertically aligned with the surrounding characters, I added the following definition to the style file:

\def\_{\leavevmode \ifmmode\else\kern0.16em R\fi \vbox{\hrule
    width0.5em}\tiny\ \normalsize} 

This did the trick:

padded underscore