Skip to content

Commit

Permalink
Fix HTML conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
jirilebl committed Jul 21, 2020
1 parent fbdfa19 commit 73de8b5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion convert-to-mbx.pl
Original file line number Diff line number Diff line change
Expand Up @@ -756,7 +756,7 @@ sub read_paragraph {
my $theid = modify_id($1);
open_paragraph_if_not_open ();
print "(hyperref $theid $name)\n";
print $out "<xref ref=\"$theid\" text=\"title\">$name</xref>";
print $out "<xref ref=\"$theid\" text=\"custom\">$name</xref>";
} elsif ($para =~ s/^\\emph\{//) {
print "(em start)\n";
open_paragraph_if_not_open();
Expand Down
8 changes: 4 additions & 4 deletions diffyqs-html.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">

<!-- Import the usual html conversion templates -->
<xsl:import href="/home/jirka/mathbook/xsl/mathbook-html.xsl"/>
<xsl:import href="/home/jirka/mathbook/xsl/pretext-html.xsl"/>

<!-- Intend output for rendering by html -->
<!--<xsl:output method="html" />-->

<!-- apply-imports applies also the original, apply-templates ignores the original-->
<!-- need hardcoded numbers on everything, so nonstandard mathbookxml -->
<!-- need hardcoded numbers on everything, so nonstandard pretext -->
<xsl:template match="men|mrow|exercise|example|remark|theorem|lemma|proposition|corollary|principle|axiom|definition|chapter|appendix|section|subsection|subsubsection|figure" mode="number">
<xsl:choose>
<xsl:when test="@number">
Expand All @@ -22,7 +22,7 @@
</xsl:choose>
</xsl:template>

<!-- Want hardcoded reference labels so nonstandard mathbookxml -->
<!-- Want hardcoded reference labels so nonstandard pretext -->
<xsl:template match="biblio" mode="serial-number">
<xsl:choose>
<xsl:when test="@tag">
Expand Down Expand Up @@ -56,7 +56,7 @@
</xsl:if>
</xsl:template>

<!-- need break, so nonstandard mathbookxml -->
<!-- need break, so nonstandard pretext -->
<xsl:template match="diffyqsbr">
<br/>
</xsl:template>
Expand Down

0 comments on commit 73de8b5

Please sign in to comment.