diff options
author | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
commit | e0c6872cf40896c7be36b11dcc744620f10adf1d (patch) | |
tree | 60335e10d2f4354b0674ec22d7b53f0f8abee672 /macros/xmltex/base/tei.xmt |
Initial commit
Diffstat (limited to 'macros/xmltex/base/tei.xmt')
-rw-r--r-- | macros/xmltex/base/tei.xmt | 142 |
1 files changed, 142 insertions, 0 deletions
diff --git a/macros/xmltex/base/tei.xmt b/macros/xmltex/base/tei.xmt new file mode 100644 index 0000000000..94ffede237 --- /dev/null +++ b/macros/xmltex/base/tei.xmt @@ -0,0 +1,142 @@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% tei.xmt + +%% Copyright 2000 Sebastian Rahtz, David Carlisle + +%% This file is distributed under the LaTeX Project Public License +%% (LPPL) as found at http://www.latex-project.org/lppl.txt +%% Either version 1.0, or at your option, any later version. + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\XMLelement{TEI.2}{} + { \documentclass{article} + \usepackage{ifthen,url} + \begin{document} } + {\end{document}} + +\XMLelement{p}{} + {\par} + {} + +\newcount\SCOUNT +\global\SCOUNT-1\relax + + + + +\XMLelement{div}{ + \XMLattribute{id}{\idval}{\@nil}} + {\advance\SCOUNT\@ne} + {} + +\XMLelement{head}{ } + {\xmlgrab} + {\protected@xdef\temp{ + \expandafter\noexpand\ifcase\SCOUNT + \section\or\subsection\or\subsubsection\fi + {#1}\ifx\idval\@nnil\else\noexpand\label{\idval} + \fi} + \aftergroup\temp +} + + +\XMLelement{emph}{} + {\itshape} + {} + +\XMLelement{code}{} + {\ttfamily} + {} + +\XMLelement{gi}{} + {\ttfamily\textless} + {\textgreater} + +\XMLelement{eg}{} + {\begin{quote}\ttfamily\obeylines} + {\end{quote}} + +\XMLelement{teiHeader}{} + {\xmlgrab} + {\xmltexfirstchild#1\@empty\@} + +\XMLelement{fileDesc}{} + {} + {} + +\XMLelement{titleStmt}{} + {\xmlgrab} + {} + +\XMLelement{availability}{} + {\xmlgrab} + {\gdef\header@availability{#1}} + +\XMLelement{docTitle}{} + {\xmlgrab} + {\gdef\nopar{\let\par\relax} + \title{#1\unskip\thanks{\protect\nopar\ignorespaces\header@availability}}} + +\XMLelement{xptr} + {\XMLattribute{doc}{\xptrdoc}{}} + {\NDATAEntity\xptrdoc\@gobble\url} + {} + +\XMLelement{docDate}{} + {\xmlgrab} + {\date{#1}} + +\XMLelement{docAuthor}{} + {\xmlgrab} + {\author{#1}} + +\XMLelement{front}{} + {} + {\maketitle\tableofcontents} + +\XMLelement{item}{} + {\item} + {} + +\XMLelement{list}{ + \XMLattribute{type}{\listtype}{itemize}} + {\ifthenelse{\equal{\listtype}{ordered}} + {\begin{enumerate}}{\begin{itemize}}} + {\ifthenelse{\equal{\listtype}{ordered}} + {\end{enumerate}}{\end{itemize}}} + + +\XMLelement{q}{ + \XMLattribute{rend}{\qrend}{}} + {\begin{quote} + \ifthenelse{\equal{\qrend}{eg}}{\ttfamily\obeylines}{}} + {\end{quote}} + +\XMLelement{ptr}{ + \XMLattribute{target}{\ptrtarget}{}} + {\ref{\ptrtarget}}{} + +\XMLelement{ref}{ + \XMLattribute{target}{\ptrtarget}{}} + {\ref{\ptrtarget}}{} + + + + +\XMLelement{table}{} + {\begin{tabular}{*{20}{l}}} + {\end{tabular}} + +\XMLelement{row}{} + {\xmlgrab} + {\gdef\temp{#1\\}\aftergroup\temp} + +\XMLelement{cell}{} + {\xmlgrab} + {\gdef\temp{#1\tabcellsep}\aftergroup\temp} + + +% cheating, a bit +\XMLentity{TeX}{\TeX} +\XMLentity{LaTeX}{\LaTeX}
\ No newline at end of file |