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

Skip to content

Commit 8a5e679

Browse files
committed
Clean up the application of style to verbatim text.
This moves styling to the stylesheet; the use of <dl> structures to control style sometimes produced improper indentation of subsequent text in many browsers when the text was already part of the <dl> structure (as in a function or class description).
1 parent eeb5ec4 commit 8a5e679

3 files changed

Lines changed: 10 additions & 8 deletions

File tree

Doc/html/style.css

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,11 @@ var { font-family: times, serif;
6565

6666
.titlegraphic { vertical-align: top; }
6767

68-
.verbatim { color: #00008b;
68+
.verbatim pre { color: #00008b;
6969
font-family: lucida typewriter, lucidatypewriter,
70-
monospace; }
70+
monospace;
71+
font-size: 90%; }
72+
.verbatim { margin-left: 2em; }
7173

7274
.grammar { background-color: #99ccff;
7375
margin-right: 0.5in;

Doc/perl/l2hinit.perl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -577,7 +577,7 @@ sub set_depth_levels {
577577
# initialize() is called in the main LaTeX2HTML script (which happens
578578
# before style files are loaded).
579579
#
580-
%declarations = ('preform' => '<dl><dd><pre class="verbatim"></pre></dl>',
580+
%declarations = ('preform' => '<div class="verbatim"><pre></pre></div>',
581581
%declarations);
582582

583583

Doc/perl/python.perl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1915,8 +1915,8 @@ sub do_cmd_term{
19151915
_RAW_ARG_DEFERRED_CMDS_
19161916

19171917

1918-
$alltt_start = '<dl><dd><pre class="verbatim">';
1919-
$alltt_end = '</pre></dl>';
1918+
$alltt_start = '<div class="verbatim"><pre>';
1919+
$alltt_end = '</pre></div>';
19201920

19211921
sub do_env_alltt {
19221922
local ($_) = @_;
@@ -2008,12 +2008,12 @@ sub do_cmd_verbatiminput{
20082008
else {
20092009
$text = '<b>Could not locate requested file <i>$fname</i>!</b>\n';
20102010
}
2011-
return ('<dl><dd><pre class="verbatim">'
2011+
return ("<div class=\"verbatim\">\n<pre>"
20122012
. $text
2013-
. "</pre>\n<div class=\"verbatiminput-footer\">\n"
2013+
. "</pre>\n<div class=\"footer\">\n"
20142014
. "<a href=\"$srcname.txt\" type=\"text/plain\""
20152015
. ">Download as text.</a>"
2016-
. "\n</div>\n</dd></dl>"
2016+
. "\n</div></div>"
20172017
. $_);
20182018
}
20192019

0 commit comments

Comments
 (0)