Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 5420f33

Browse files
committed
\textunderscore: Re-define with a width that's more appropriate for the
courier font used in Python code. This still isn't *good*, but makes the width about right in most cases. (Exception: it's now a little wide in \var words.)
1 parent cf0fb8b commit 5420f33

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

Doc/texinputs/python.sty

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -397,6 +397,12 @@
397397
{\reset@font\normalsize\py@HeaderFamily}}
398398

399399

400+
% This gets the underscores closer to the right width; the only change
401+
% from standard LaTeX is the width specified.
402+
403+
\DeclareTextCommandDefault{\textunderscore}{%
404+
\leavevmode \kern.06em\vbox{\hrule\@width.55em}}
405+
400406
% Underscore hack (only act like subscript operator if in math mode)
401407
%
402408
% The following is due to Mark Wooding (the old version didn't work with

0 commit comments

Comments
 (0)