Skip to content

Commit

Permalink
Merge pull request #7 from DigitalLatin/refactor
Browse files Browse the repository at this point in the history
Recreated changes to LaTeX files; fixed bug in common/common_textcrit…
  • Loading branch information
sjhuskey authored Jun 25, 2023
2 parents 34c568e + 27f1dd2 commit c45fafd
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 27 deletions.
1 change: 0 additions & 1 deletion latex/latex_core.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -1398,4 +1398,3 @@
</xsl:choose>
</xsl:template>
</xsl:stylesheet>

16 changes: 4 additions & 12 deletions latex/latex_namesdates.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -168,9 +168,9 @@ of this software, even if advised of the possibility of such damage.
<xsl:template match="//tei:geogName|tei:persName|tei:placeName">
<xsl:choose>
<xsl:when test="@ref">
<xsl:text>\hyperref[</xsl:text>
<xsl:value-of select="translate(@ref,'#','')"/>
<xsl:text>]{</xsl:text>
<xsl:text>\href{</xsl:text>
<xsl:value-of select="@ref"/>
<xsl:text>}{</xsl:text>
<xsl:choose>
<xsl:when test="tei:app/tei:lem">
<xsl:choose>
Expand All @@ -196,12 +196,4 @@ of this software, even if advised of the possibility of such damage.
</xsl:otherwise>
</xsl:choose>
</xsl:template>

<!--<doc xmlns="http://www.oxygenxml.com/ns/doc/xsl">
<desc>Process name element.</desc>
</doc>
<xsl:template match="tei:cit/tei:ref/tei:name">
<xsl:apply-templates select="tei:name"/>
</xsl:template>
--></xsl:stylesheet>

</xsl:stylesheet>
17 changes: 5 additions & 12 deletions latex/latex_param.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -216,12 +216,6 @@ the beginning of the document</desc>
<xsl:text>
\pagestyle{</xsl:text><xsl:value-of select="$pageStyle"/><xsl:text>}
</xsl:text>
<!-- SJH: This block causes errors in processing.
\usepackage[pdftitle={<xsl:sequence select="tei:generateSimpleTitle(.)"/>},
pdfauthor={<xsl:sequence
select="replace(string-join(tei:generateAuthor(.),''),'\\[A-z]+','')"/>}]{hyperref}
\hyperbaseurl{<xsl:value-of select="$baseURL"/>}-->
<!--<xsl:if test="count(key('APP',1))&gt;0">-->
</xsl:template>

<doc xmlns="http://www.oxygenxml.com/ns/doc/xsl" class="layout" type="float">
Expand Down Expand Up @@ -717,7 +711,6 @@ characters. The normal characters remain active for LaTeX commands.

<doc xmlns="http://www.oxygenxml.com/ns/doc/xsl" class="layout">
<desc>

<p>LaTeX setup before start of document</p>
<p>All the LaTeX setup which are executed before the start of
the document</p>
Expand Down Expand Up @@ -789,11 +782,10 @@ characters. The normal characters remain active for LaTeX commands.
\thispagestyle{empty}
\addtocounter{page}{-1}
\newpage
}
</xsl:text>
</xsl:text>

<xsl:call-template name="hyperref"/>
</xsl:template>
<xsl:call-template name="hyperref"/>
</xsl:template>

<!-- SJH: Added this block to remove numbers from sections. -->
<doc xmlns="http://www.oxygenxml.com/ns/doc/xsl" class="layout">
Expand All @@ -814,6 +806,7 @@ characters. The normal characters remain active for LaTeX commands.
</doc>
<xsl:template name="fallback-characters">
<xsl:text>

% Fallback characters (thanks to Andrew Dunning)
\usepackage{newunicodechar}
\newfontfamily{\fallbackfontMUFI}{Junicode}
Expand Down Expand Up @@ -849,7 +842,7 @@ characters. The normal characters remain active for LaTeX commands.
% Set the font for URLs to the regular font for the document.
\urlstyle{same}</xsl:text>
</xsl:template>

<doc xmlns="http://www.oxygenxml.com/ns/doc/xsl" class="layout">
<desc>
<p>LaTeX setup at end of document</p>
Expand Down
13 changes: 12 additions & 1 deletion latex/latex_textcrit.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,6 @@
<xsl:text>}</xsl:text>
</xsl:if>
<!-- Now look for a note that follows the reading. If there is one, render it. -->

<!-- Test to account for situations where there is a witDetail following the rdg before the note. -->
<xsl:if test="following-sibling::tei:note[substring(@target, 2) = current()/@xml:id]">
<!-- If a witDetail precedes the note, process it. -->
Expand Down Expand Up @@ -517,6 +516,18 @@
<xsl:text>}</xsl:text>
</xsl:template>

<doc xmlns="http://www.oxygenxml.com/ns/doc/xsl">
<desc>
<p>Process with witDetail</p>
</desc>
</doc>
<xsl:template match="tei:witDetail[not(*|text())]">
<xsl:choose>
<xsl:when test="@type='correction-altered'">p.c.</xsl:when>
<xsl:when test="@type='correction-original'">a.c.</xsl:when>
</xsl:choose>
</xsl:template>

<doc xmlns="http://www.oxygenxml.com/ns/doc/xsl">
<desc>
<p>Process with witStart</p>
Expand Down
1 change: 0 additions & 1 deletion latex/latex_transcr.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -71,5 +71,4 @@ of this software, even if advised of the possibility of such damage.
</xsl:when>
</xsl:choose>
</xsl:template>

</xsl:stylesheet>

0 comments on commit c45fafd

Please sign in to comment.