Skip to content

Commit

Permalink
rendering of inslib symbols (partly), numerals and ligatures
Browse files Browse the repository at this point in the history
The current templates in teig.xsl are not handling symbols as expected; see #63
  • Loading branch information
Irene Vagionakis committed Feb 26, 2022
1 parent 3be80fa commit 030f170
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 5 deletions.
9 changes: 9 additions & 0 deletions webapps/ROOT/assets/styles/epidoc/global.css
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,12 @@
text-decoration: underline;
}

.inslibligature {
border-top: 2px solid black;
border-radius: 6px;
padding: 4px 2px 0px 2px;
}

.underline {
text-decoration: underline;
}
Expand Down Expand Up @@ -117,3 +123,6 @@ div.iospe {
margin-left:165px;
}

.no-space {
margin-bottom: -1.9em;
}
8 changes: 7 additions & 1 deletion webapps/ROOT/kiln/stylesheets/epidoc/global.css
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,13 @@

.petraeligature {
text-decoration: underline;
}
}

.inslibligature {
border-top: 2px solid black;
border-radius: 6px;
padding: 4px 2px 0px 2px;
}

.underline {
text-decoration: underline;
Expand Down
4 changes: 4 additions & 0 deletions webapps/ROOT/kiln/stylesheets/epidoc/htm-teig.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
<xsl:template match="t:g">
<xsl:param name="parm-edition-type" tunnel="yes" required="no"></xsl:param>
<xsl:param name="parm-leiden-style" tunnel="yes" required="no"></xsl:param>
<xsl:param name="parm-edn-structure" tunnel="yes" required="no"></xsl:param>
<xsl:param name="location" tunnel="yes" required="no"></xsl:param>
<xsl:call-template name="lb-dash"/>
<xsl:call-template name="w-space"/>
Expand Down Expand Up @@ -45,6 +46,9 @@
<xsl:apply-imports/>
<xsl:text>⊃</xsl:text>
</xsl:when>
<xsl:when test="$parm-edn-structure='inslib' and (starts-with(ancestor::t:TEI//t:publicationStmt/t:idno[@type='filename']/text(), 'IGCyr') or starts-with(ancestor::t:TEI//t:publicationStmt/t:idno[@type='filename']/text(), 'GVCyr'))">
<xsl:apply-imports/>
</xsl:when>
<xsl:otherwise>
<xsl:text>((</xsl:text>
<xsl:apply-imports/>
Expand Down
4 changes: 4 additions & 0 deletions webapps/ROOT/kiln/stylesheets/epidoc/htm-teihi.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

<xsl:template match="t:hi">
<xsl:param name="parm-leiden-style" tunnel="yes" required="no"></xsl:param>
<xsl:param name="parm-edn-structure" tunnel="yes" required="no"></xsl:param>
<xsl:choose>
<!-- No html code needed for these -->
<xsl:when
Expand Down Expand Up @@ -63,6 +64,9 @@
<xsl:when test="$parm-leiden-style=('petrae','iospe')">
<xsl:attribute name="class">petraeligature</xsl:attribute>
</xsl:when>
<xsl:when test="$parm-edn-structure = 'inslib'">
<xsl:attribute name="class">inslibligature</xsl:attribute>
</xsl:when>
<xsl:otherwise>
<xsl:attribute name="class">ligature</xsl:attribute>
</xsl:otherwise>
Expand Down
3 changes: 2 additions & 1 deletion webapps/ROOT/kiln/stylesheets/epidoc/teig.xsl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!-- $Id$ --><xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:t="http://www.tei-c.org/ns/1.0" xmlns:EDF="http://epidoc.sourceforge.net/ns/functions" exclude-result-prefixes="t EDF" version="2.0">
<!-- $Id$ --><xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:t="http://www.tei-c.org/ns/1.0" xmlns:EDF="http://epidoc.sourceforge.net/ns/functions" xmlns:fn="http://www.w3.org/2005/xpath-functions" exclude-result-prefixes="t EDF" version="2.0">
<!-- Templates imported by [htm|txt]-teig.xsl -->

<xsl:template name="lb-dash">
Expand All @@ -17,6 +17,7 @@
<xsl:template match="t:g">
<xsl:param name="parm-leiden-style" tunnel="yes" required="no"></xsl:param>
<xsl:param name="parm-edition-type" tunnel="yes" required="no"></xsl:param>
<xsl:param name="parm-edn-structure" tunnel="yes" required="no"></xsl:param>
<xsl:param name="parm-glyph-variant" tunnel="yes" required="no"></xsl:param>

<xsl:choose>
Expand Down
3 changes: 2 additions & 1 deletion webapps/ROOT/kiln/stylesheets/epidoc/teihi.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
<xsl:param name="parm-external-app-style" tunnel="yes" required="no"></xsl:param>
<xsl:param name="parm-internal-app-style" tunnel="yes" required="no"></xsl:param>
<xsl:param name="parm-edition-type" tunnel="yes" required="no"></xsl:param>
<xsl:param name="parm-edn-structure" tunnel="yes" required="no"></xsl:param>
<xsl:param name="parm-leiden-style" tunnel="yes" required="no"></xsl:param>
<xsl:param name="location" tunnel="yes" required="no"/>

Expand All @@ -48,7 +49,7 @@
</xsl:variable>

<xsl:choose>
<xsl:when test="@rend='ligature'">
<xsl:when test="@rend='ligature' and not($parm-edn-structure='inslib')">
<xsl:choose>
<xsl:when test="$parm-leiden-style='seg'">
<xsl:if test="string-length(normalize-space(.))=2">
Expand Down
5 changes: 3 additions & 2 deletions webapps/ROOT/kiln/stylesheets/epidoc/teinum.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,16 @@
<xsl:template match="t:num">
<xsl:param name="parm-edition-type" tunnel="yes" required="no"></xsl:param>
<xsl:param name="parm-leiden-style" tunnel="yes" required="no"></xsl:param>
<xsl:param name="parm-edn-structure" tunnel="yes" required="no"></xsl:param>
<xsl:choose>
<xsl:when test="not(child::t:* or child::text())"/>
<xsl:when test="$parm-leiden-style = ('ddbdp','dclp','sammelbuch')">
<xsl:when test="$parm-leiden-style = ('ddbdp','dclp','sammelbuch') and $parm-edn-structure!='inslib'">
<xsl:apply-templates/>
<xsl:if test="@rend='tick'">
<xsl:text>´</xsl:text>
</xsl:if>
</xsl:when>
<xsl:when test="$parm-edition-type='interpretive' and ancestor::t:*[@xml:lang][1][@xml:lang = 'grc']
<xsl:when test="$parm-edn-structure!='inslib' and $parm-edition-type='interpretive' and ancestor::t:*[@xml:lang][1][@xml:lang = 'grc']
and ((number(@value) and not(contains(@value,'/')))
or (number(@atLeast) and not(contains(@atLeast,'/')))
or (number(@atMost) and not(contains(@atMost,'/'))))">
Expand Down

0 comments on commit 030f170

Please sign in to comment.