Mode:

Compact lists

Showing:

Documentation
Parameters
Used by
References
Supersedes
Imported modules
Included modules
Source
Main stylesheet tei.xsl
Documentation

Description

TEI stylesheet for making LaTeX output.

This software is dual-licensed: 1. Distributed under a Creative Commons Attribution-ShareAlike 3.0 Unported License http://creativecommons.org/licenses/by-sa/3.0/ 2. http://www.opensource.org/licenses/BSD-2-Clause All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. This software is provided by the copyright holders and contributors "as is" and any express or implied warranties, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose are disclaimed. In no event shall the copyright holder or contributors be liable for any direct, indirect, incidental, special, exemplary, or consequential damages (including, but not limited to, procurement of substitute goods or services; loss of use, data, or profits; or business interruption) however caused and on any theory of liability, whether in contract, strict liability, or tort (including negligence or otherwise) arising in any way out of the use of this software, even if advised of the possibility of such damage.

Author: See AUTHORS

Id: $Id: tei.xsl 10210 2012-04-10 21:38:52Z rahtz $

Copyright: 2011, TEI Consortium

Imported modules
Included modules
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 tei.xsl
Template verbatim-lineBreak
Namespace No namespace
Used by
Supersedes
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 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 tei.xsl
Template verbatim-newLine
Namespace No namespace
Used by
Template
Supersedes
Template
Import precedence 4
Source
<xsl:template name="verbatim-newLine"/>
Stylesheet location tei.xsl
Template verbatim-createAttribute
Namespace No namespace
Used by
Template
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 tei.xsl
Template verbatim-Text
Namespace No namespace
Used by
References
Supersedes
Template
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 tei.xsl
Parameter startNamespace
Namespace No namespace
Supersedes
Parameter
Source
<xsl:param name="startNamespace">\color{red}</xsl:param>
Stylesheet location tei.xsl
Parameter startElement
Namespace No namespace
Used by
Template
Supersedes
Parameter
Source
<xsl:param name="startElement">{</xsl:param>
Stylesheet location tei.xsl
Parameter highlightStartElementName
Namespace No namespace
Used by
Supersedes
Source
<xsl:param name="highlightStartElementName">\textcolor{red}{</xsl:param>
Stylesheet location tei.xsl
Parameter highlightEndElementName
Namespace No namespace
Used by
Supersedes
Source
<xsl:param name="highlightEndElementName">}</xsl:param>
Stylesheet location tei.xsl
Parameter startElementName
Namespace No namespace
Used by
Supersedes
Parameter
Source
<xsl:param name="startElementName">\textbf{</xsl:param>
Stylesheet location tei.xsl
Parameter startAttribute
Namespace No namespace
Supersedes
Parameter
Source
<xsl:param name="startAttribute">{</xsl:param>
Stylesheet location tei.xsl
Parameter startAttributeValue
Namespace No namespace
Used by
Template
Supersedes
Source
<xsl:param name="startAttributeValue">{</xsl:param>
Stylesheet location tei.xsl
Parameter startComment
Namespace No namespace
Used by
Supersedes
Parameter
Source
<xsl:param name="startComment">\begin{it}</xsl:param>
Stylesheet location tei.xsl
Parameter endElement
Namespace No namespace
Used by
Template
Supersedes
Parameter
Source
<xsl:param name="endElement">}</xsl:param>
Stylesheet location tei.xsl
Parameter endElementName
Namespace No namespace
Used by
Supersedes
Parameter
Source
<xsl:param name="endElementName">}</xsl:param>
Stylesheet location tei.xsl
Parameter endComment
Namespace No namespace
Used by
Supersedes
Parameter
Source
<xsl:param name="endComment">\end{it}</xsl:param>
Stylesheet location tei.xsl
Parameter endAttribute
Namespace No namespace
Supersedes
Parameter
Source
<xsl:param name="endAttribute">}</xsl:param>
Stylesheet location tei.xsl
Parameter endAttributeValue
Namespace No namespace
Used by
Template
Supersedes
Parameter
Source
<xsl:param name="endAttributeValue">}</xsl:param>
Stylesheet location tei.xsl
Parameter endNamespace
Namespace No namespace
Supersedes
Parameter
Source
<xsl:param name="endNamespace"/>
Stylesheet location tei.xsl
Parameter spaceCharacter
Namespace No namespace
Used by
Supersedes
Parameter
Source
<xsl:param name="spaceCharacter">\hspace*{6pt}</xsl:param>
Stylesheet location tei.xsl
Variable docClass
Namespace No namespace
Used by
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 tei.xsl
Function tei:escapeCharsVerbatim (letters)
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 tei.xsl
Function tei:escapeChars (letters)
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 '),     '\{','\\{'),     '\}','\\}'),     '~','\\textasciitilde ')"/>
</xsl:function>
Stylesheet location tei.xsl
Output (default)
Namespace No namespace
Output properties
method encoding
text
Source
<xsl:output method="text" encoding="utf8"/>
Stylesheet location tei.xsl