mirror of
https://github.com/python/cpython.git
synced 2025-07-24 03:35:53 +00:00
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).
This commit is contained in:
parent
eeb5ec42e0
commit
8a5e6790d9
3 changed files with 10 additions and 8 deletions
|
@ -65,9 +65,11 @@ var { font-family: times, serif;
|
||||||
|
|
||||||
.titlegraphic { vertical-align: top; }
|
.titlegraphic { vertical-align: top; }
|
||||||
|
|
||||||
.verbatim { color: #00008b;
|
.verbatim pre { color: #00008b;
|
||||||
font-family: lucida typewriter, lucidatypewriter,
|
font-family: lucida typewriter, lucidatypewriter,
|
||||||
monospace; }
|
monospace;
|
||||||
|
font-size: 90%; }
|
||||||
|
.verbatim { margin-left: 2em; }
|
||||||
|
|
||||||
.grammar { background-color: #99ccff;
|
.grammar { background-color: #99ccff;
|
||||||
margin-right: 0.5in;
|
margin-right: 0.5in;
|
||||||
|
|
|
@ -577,7 +577,7 @@ sub set_depth_levels {
|
||||||
# initialize() is called in the main LaTeX2HTML script (which happens
|
# initialize() is called in the main LaTeX2HTML script (which happens
|
||||||
# before style files are loaded).
|
# before style files are loaded).
|
||||||
#
|
#
|
||||||
%declarations = ('preform' => '<dl><dd><pre class="verbatim"></pre></dl>',
|
%declarations = ('preform' => '<div class="verbatim"><pre></pre></div>',
|
||||||
%declarations);
|
%declarations);
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1915,8 +1915,8 @@ withsubitem # {} # {}
|
||||||
_RAW_ARG_DEFERRED_CMDS_
|
_RAW_ARG_DEFERRED_CMDS_
|
||||||
|
|
||||||
|
|
||||||
$alltt_start = '<dl><dd><pre class="verbatim">';
|
$alltt_start = '<div class="verbatim"><pre>';
|
||||||
$alltt_end = '</pre></dl>';
|
$alltt_end = '</pre></div>';
|
||||||
|
|
||||||
sub do_env_alltt {
|
sub do_env_alltt {
|
||||||
local ($_) = @_;
|
local ($_) = @_;
|
||||||
|
@ -2008,12 +2008,12 @@ sub do_cmd_verbatiminput{
|
||||||
else {
|
else {
|
||||||
$text = '<b>Could not locate requested file <i>$fname</i>!</b>\n';
|
$text = '<b>Could not locate requested file <i>$fname</i>!</b>\n';
|
||||||
}
|
}
|
||||||
return ('<dl><dd><pre class="verbatim">'
|
return ("<div class=\"verbatim\">\n<pre>"
|
||||||
. $text
|
. $text
|
||||||
. "</pre>\n<div class=\"verbatiminput-footer\">\n"
|
. "</pre>\n<div class=\"footer\">\n"
|
||||||
. "<a href=\"$srcname.txt\" type=\"text/plain\""
|
. "<a href=\"$srcname.txt\" type=\"text/plain\""
|
||||||
. ">Download as text.</a>"
|
. ">Download as text.</a>"
|
||||||
. "\n</div>\n</dd></dl>"
|
. "\n</div></div>"
|
||||||
. $_);
|
. $_);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue