Showing:

Documentation
Parameters
Used by
References
Supersedes
Overriding
Imported modules
Included modules
Imported from
Source
Stylesheet tei.xsl
Documentation

Description

TEI stylesheet for making LaTeX output.

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

Author: See AUTHORS

Id: $Id: tei.xsl 9299 2011-09-07 21:46:37Z rahtz $

Copyright: 2011, TEI Consortium

Imported modules
Included modules
Imported from
Stylesheet version 2.0
Template processing-instruction()[name(.)='tex']
Documentation

Description

Process elements processing-instruction()[name(.)='tex']
Namespace No namespace
Match processing-instruction()[name(.)='tex']
Mode #default
Import precedence 4
Source
<xsl:template match="processing-instruction()[name(.)='tex']">
  <xsl:value-of select="."/>
</xsl:template>
Stylesheet location ../latex2/tei.xsl
Template verbatim-lineBreak
Namespace No namespace
Supersedes
Overriding
Parameters
QName Namespace
id No namespace
Import precedence 4
Source
<xsl:template name="verbatim-lineBreak">
  <xsl:param name="id"/>
  <xsl:text>\mbox{}\newline 
</xsl:text>
</xsl:template>
Stylesheet location ../latex2/tei.xsl
Template verbatim-createElement
Namespace No namespace
Used by
Supersedes
Parameters
QName Namespace
name No namespace
special No namespace
Import precedence 4
Source
<xsl:template name="verbatim-createElement">
  <xsl:param name="name"/>
  <xsl:param name="special"/>
  <xsl:text>\textbf{</xsl:text>
  <xsl:value-of select="$name"/>
  <xsl:text>}</xsl:text>
</xsl:template>
Stylesheet location ../latex2/tei.xsl
Template verbatim-newLine
Namespace No namespace
Used by
Template *verbatim
Supersedes
Template verbatim-newLine
Import precedence 4
Source
<xsl:template name="verbatim-newLine"/>
Stylesheet location ../latex2/tei.xsl
Template verbatim-createAttribute
Namespace No namespace
Used by
Template @*verbatim
Supersedes
Parameters
QName Namespace
name No namespace
Import precedence 4
Source
<xsl:template name="verbatim-createAttribute">
  <xsl:param name="name"/>
  <xsl:value-of select="$name"/>
</xsl:template>
Stylesheet location ../latex2/tei.xsl
Template verbatim-Text
Namespace No namespace
Used by
References
Supersedes
Template verbatim-Text
Parameters
QName Namespace
words No namespace
Import precedence 4
Source
<xsl:template name="verbatim-Text">
  <xsl:param name="words"/>
  <xsl:choose>
    <xsl:when test="parent::*/@xml:lang='zh-tw'">
      <xsl:text>{\textChinese </xsl:text>
      <xsl:value-of select="tei:escapeCharsVerbatim($words)"/>
      <xsl:text>}</xsl:text>
    </xsl:when>
    <xsl:when test="parent::*/@xml:lang='ja'">
      <xsl:text>{\textJapanese </xsl:text>
      <xsl:value-of select="tei:escapeCharsVerbatim($words)"/>
      <xsl:text>}</xsl:text>
    </xsl:when>
    <xsl:when test="parent::*/@xml:lang='kr'">
      <xsl:text>{\textKorean </xsl:text>
      <xsl:value-of select="tei:escapeCharsVerbatim($words)"/>
      <xsl:text>}</xsl:text>
    </xsl:when>
    <xsl:otherwise>
      <xsl:value-of select="tei:escapeCharsVerbatim($words)"/>
    </xsl:otherwise>
  </xsl:choose>
</xsl:template>
Stylesheet location ../latex2/tei.xsl
Parameter startNamespace
Namespace No namespace
Supersedes
Parameter startNamespace
Overriding
Parameter startNamespace
Source
<xsl:param name="startNamespace">\color{red}</xsl:param>
Stylesheet location ../latex2/tei.xsl
Parameter startElement
Namespace No namespace
Supersedes
Parameter startElement
Overriding
Parameter startElement
Source
<xsl:param name="startElement">{</xsl:param>
Stylesheet location ../latex2/tei.xsl
Parameter highlightStartElementName
Namespace No namespace
Used by
Supersedes
Source
<xsl:param name="highlightStartElementName">\textcolor{red}{</xsl:param>
Stylesheet location ../latex2/tei.xsl
Parameter highlightEndElementName
Namespace No namespace
Used by
Supersedes
Source
<xsl:param name="highlightEndElementName">}</xsl:param>
Stylesheet location ../latex2/tei.xsl
Parameter startElementName
Namespace No namespace
Supersedes
Parameter startElementName
Overriding
Parameter startElementName
Source
<xsl:param name="startElementName">\textbf{</xsl:param>
Stylesheet location ../latex2/tei.xsl
Parameter startAttribute
Namespace No namespace
Supersedes
Parameter startAttribute
Overriding
Parameter startAttribute
Source
<xsl:param name="startAttribute">{</xsl:param>
Stylesheet location ../latex2/tei.xsl
Parameter startAttributeValue
Namespace No namespace
Supersedes
Overriding
Source
<xsl:param name="startAttributeValue">{</xsl:param>
Stylesheet location ../latex2/tei.xsl
Parameter startComment
Namespace No namespace
Supersedes
Parameter startComment
Overriding
Parameter startComment
Source
<xsl:param name="startComment">\begin{it}</xsl:param>
Stylesheet location ../latex2/tei.xsl
Parameter endElement
Namespace No namespace
Supersedes
Parameter endElement
Overriding
Parameter endElement
Source
<xsl:param name="endElement">}</xsl:param>
Stylesheet location ../latex2/tei.xsl
Parameter endElementName
Namespace No namespace
Supersedes
Parameter endElementName
Overriding
Parameter endElementName
Source
<xsl:param name="endElementName">}</xsl:param>
Stylesheet location ../latex2/tei.xsl
Parameter endComment
Namespace No namespace
Supersedes
Parameter endComment
Overriding
Parameter endComment
Source
<xsl:param name="endComment">\end{it}</xsl:param>
Stylesheet location ../latex2/tei.xsl
Parameter endAttribute
Namespace No namespace
Supersedes
Parameter endAttribute
Overriding
Parameter endAttribute
Source
<xsl:param name="endAttribute">}</xsl:param>
Stylesheet location ../latex2/tei.xsl
Parameter endAttributeValue
Namespace No namespace
Supersedes
Parameter endAttributeValue
Overriding
Parameter endAttributeValue
Source
<xsl:param name="endAttributeValue">}</xsl:param>
Stylesheet location ../latex2/tei.xsl
Parameter endNamespace
Namespace No namespace
Supersedes
Parameter endNamespace
Overriding
Parameter endNamespace
Source
<xsl:param name="endNamespace"/>
Stylesheet location ../latex2/tei.xsl
Parameter spaceCharacter
Namespace No namespace
Supersedes
Parameter spaceCharacter
Overriding
Parameter spaceCharacter
Source
<xsl:param name="spaceCharacter">\hspace*{6pt}</xsl:param>
Stylesheet location ../latex2/tei.xsl
Variable docClass
Namespace No namespace
Overriding
Variable docClass
Source
<xsl:variable name="docClass">
  <xsl:choose>
    <xsl:when test="/tei:TEI[@rend='letter']">
      <xsl:text>letter</xsl:text>
    </xsl:when>
    <xsl:when test="/tei:TEI[@rend='book']">
      <xsl:text>book</xsl:text>
    </xsl:when>
    <xsl:otherwise>
      <xsl:text>article</xsl:text>
    </xsl:otherwise>
  </xsl:choose>
</xsl:variable>
Stylesheet location ../latex2/tei.xsl
Function tei:escapeCharsVerbatim
Documentation

Description

We need the backslash and two curly braces to insert LaTeX commands into the output, so these characters need to replaced when they are found in running text.

Namespace http://www.tei-c.org/ns/1.0
Type xs:string
Used by
Parameters
QName Namespace
letters No namespace
Import precedence 4
Source
<xsl:function name="tei:escapeCharsVerbatim" as="xs:string">
  <xsl:param name="letters"/>
  <xsl:value-of select="translate($letters, '\{}','⃥❴❵')"/>
</xsl:function>
Stylesheet location ../latex2/tei.xsl
Function tei:escapeChars
Namespace http://www.tei-c.org/ns/1.0
Type xs:string
Used by
Parameters
QName Namespace
letters No namespace
Import precedence 4
Source
<xsl:function name="tei:escapeChars" as="xs:string">
  <xsl:param name="letters"/>
  <xsl:value-of select="replace(replace(replace(replace(translate($letters,'
','  '), '\\','\\textbackslash '),'\{','\\{'),'\}','\\}'),'~','\\~')"/>
</xsl:function>
Stylesheet location ../latex2/tei.xsl
Output (default)
Namespace No namespace
Output properties
method encoding
Source
<xsl:output method="text" encoding="utf8"/>
Stylesheet location ../latex2/tei.xsl