Skip to content

Commit

Permalink
Add light horizontal rules to figures
Browse files Browse the repository at this point in the history
  • Loading branch information
jirilebl committed Oct 26, 2023
1 parent b56000f commit 242d742
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 5 deletions.
2 changes: 2 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,6 @@ be \(r-s ,\) otherwise volumes do not stay constant and the problem doesn't quit
<li>Add a couple of minor clarifications to the end of Example 1.9.3.
<li>Slightly tighter spacing in 3.1 leads to a slight change (for the better I
think) in pagination in the section.
<li>In the HTML version, add light horizontal rules to visually
separate out figures and tables.
<li>A few minor clarifications and improvements in English and style.
8 changes: 4 additions & 4 deletions convert-to-mbx.pl
Original file line number Diff line number Diff line change
Expand Up @@ -1051,7 +1051,7 @@ sub read_paragraph {

$table_num = $table_num+1;
my $the_num = get_table_number ();
print $out "<table xml:id=\"$theid\" number=\"$the_num\">\n";
print $out "<diffyqshr/><table xml:id=\"$theid\" number=\"$the_num\">\n";
print $out " <title>$caption</title>\n";
print $out " <tabular top=\"major\" halign=\"left\">\n";

Expand Down Expand Up @@ -1079,7 +1079,7 @@ sub read_paragraph {
# last row should have bottom minor
$table =~ s|<row>(.*?)$|<row bottom=\"minor\">$1|;

print $out "$table</cell></row>\n </tabular>\n</table>\n";
print $out "$table</cell></row>\n </tabular>\n</table><diffyqshr/>\n";
} else {
print "\n\n\nHUH?\n\n\nNo end table!\n\n$para\n\n";
$num_errors++;
Expand Down Expand Up @@ -1321,7 +1321,7 @@ sub read_paragraph {

$figure_num = $figure_num+1;
$the_num = get_figure_number ();
print $out "<figure xml:id=\"$theid\" number=\"$the_num\">\n";
print $out "<diffyqshr/><figure xml:id=\"$theid\" number=\"$the_num\">\n";
print $out " <caption>$caption</caption>\n";

if ($fig =~ m/^[ \n]*\\diffyincludegraphics\{[^}]*?\}\{([^}]*?)\}\{([^}]*?)\}[ \n]*$/) {
Expand Down Expand Up @@ -1414,7 +1414,7 @@ sub read_paragraph {
print "\n\n\nHUH?\n\n\nFigure too complicated!\n\nFIG=>$fig<\n\n";
$num_errors++;
}
print $out "</figure>\n";
print $out "</figure><diffyqshr/>\n";

}
} else {
Expand Down
7 changes: 6 additions & 1 deletion convert-to-mbx.sh
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,14 @@ echo
echo RUNNING convert-to-mbx.pl ...
echo


perl convert-to-mbx.pl

echo
echo REMOVE doubled horizontal rules
echo

perl -0777 -i.original -pe 's:<diffyqshr/>[ \r\n]*<diffyqshr/>:<diffyqshr/>:igs' diffyqs-out.xml

#xmllint --format -o diffyqs-out2.xml diffyqs-out.xml

#if [ "$OPTPNG" = "yes" ] ; then
Expand Down
5 changes: 5 additions & 0 deletions diffyqs-html.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,11 @@
<br/>
</xsl:template>

<!-- need hr (so far only using to separate figures) so nonstandard pretext -->
<xsl:template match="diffyqshr">
<hr class="diffyqshr"/>
</xsl:template>

<!-- need inline image, custom width, maxwidth, etc.., so nonstandard -->
<!-- the image should be without extension .svg is appended -->
<xsl:template match="diffyqsimage">
Expand Down
5 changes: 5 additions & 0 deletions extra.css
Original file line number Diff line number Diff line change
Expand Up @@ -82,3 +82,8 @@ li { display: list-item; }
.searchwrapper { display:none; }
.has-sidebar-left.mathbook-loaded.sidebar-left-open .main { margin-left:0px!important; left:auto!important; }
}
hr.diffyqshr {
border-style: none;
height: 0px;
border-top: thin solid #bbb;
}

0 comments on commit 242d742

Please sign in to comment.