\PassOptionsToPackage{english,german,greek,ukrainian}{babel}
\documentclass[
fnAperpage,
fnAseparated,
footnotewarning,
%spotcolour
]{carnap-compact}
\hypersetup{hidelinks}

\usepackage{lettrine}
\usepackage{multirow}

\inputencoding{utf8}%HACK
\usepackage{valep-macros}
\inputencoding{utf8x}%END HACK

\usepackage{geometry}
\geometry{paperwidth=297mm, paperheight=210mm, textwidth=26cm, textheight=16cm}





\begin{document}

\title{How to embed \LaTeX, HTML, and TEI-XML with \valeptex\ and carnap-compact}	

\latexonly{\chapter{How to embed \LaTeX, HTML, and TEI-XML with \valeptex\ and carnap-compact}\vspace{-2em}}

\begin{tabbing}
Further reading:\qquad\=\kill
Author:\> Christian Damböck\\
Date:\> May 2024\\
Further reading:\>\href{https://valep.vc.univie.ac.at/files/py/valeptex/valeptex_handbook.html}{The \valeptex\ Handbook}\\
This Document:\>\href{https://valep.vc.univie.ac.at/files/LaTeX/valeptex/valeptex_and_carnap-compact.html}{https://valep.vc.univie.ac.at/files/LaTeX/valeptex/valeptex\_and\_carnap-compact.html}
\end{tabbing}

\section{Representations of carnap-compact in \LaTeX, HTML, and TEI-XML}

The following tables follow the \valeptex\ object model as listed in the \valeptex\ Handbook, Section C. The main idea is that the semantic specification as represented by the original \LaTeX\ document has an exact math in (a) HTML5 together with custom tags and classes, and (b) the XML specification of the \href{https://tei-c.org/}{Text Encoding Initiative}, hereafter `TEI-XML'. Whenever possible, the TEI markup adheres to this subset of the TEI specification as published by the `Deutsches Textarchiv', hereafter \href{https://www.deutschestextarchiv.de/doku/basisformat/}{DTA Basisformat}. Semantically, the original \LaTeX and both the HTML and TEI-XML output produced by \valeptex\ are identical. The only difference between the three versions of the document is that the HTML and TEI-XML representations omit only the graphical elements necessary for proper typesetting of the pdf and printed texts as produced from the original \LaTeX.

\subsection{Environments, Sections, Whitespace, Pagebreaks, Quotations, Characters}

\begin{tabular}{|p{6cm}|p{6cm}|p{6cm}|p{6cm}|}
	\hline 
	\LaTeX &HTML &TEI-XML & Remarks\\\hline\hline
	Formulas&= &=, formula & In all cases \LaTeX\ is used \\\hline
	tabular tabbing&table, tr, td&table, row, cell&\\\hline	
	enumerate itemize, item&ol ul, li&list, label item&\\\hline
	\emph{Custom Environment}&div, class="\emph{custom}"&div, type="\emph{custom}"&\\\hline
	chapter, section, etc. &h1, h2, etc. &div type="chapter" n="1, 2, etc." & This includes all kinds of custom macros for special forms of headings such as, e.g., diary entry, reading list entry. \\\hline
	\emph{empty line}, par&p&p& \\\hline
	newline etc. &br&lb &\\\hline
	neueseite \emph{no}, \emph{facsimile} &new-p \emph{no}, fac-simile&pb n="\emph{no}" facs="\emph{facsimile}"&\\\hline
	quotation&blockquote &quote& \\\hline
	\emph{Custom Non Unicode Character}&U+FFFC&U+FFFC&Custom \LaTeX\ characters are implemented as custom Unicode characters\\\hline
	
	
\end{tabular}


\subsection{Notes and References}

\begin{tabular}{|p{6cm}|p{6cm}|p{6cm}|p{6cm}|}
\hline 
\LaTeX &HTML &TEI-XML & Remarks\\\hline\hline
fnA fnE fnC,\newline fnAmark fnAtext etc.&note-a note-e note-c,\newline note-a-label note-a-content etc. &note n="\emph{label}" type="{}a, e, c etc."&Any footnote, margin note, endnote etc.\\\hline
IN II IO etc.&in-dex class="\emph{custom}",\newline in-dex-label, in-dex-content&persName orgName placeName & Persons, Institutions, Locations	\\\hline
ort&loc-ation&placeName etc.& Location where a text was written\\\hline
IS&in-dex class="concept" etc.&name&Concepts\\\hline
label, ref pageref href, TB LL etc.&a id href&label, ref&Links both inside a document and URLs \\\hline
includegraphics figure etc.&img &figure facs type&Photographs, Images, Drawings, etc.\\\hline
date etc.&time datetime& date when&Date and/or time\\\hline
bibitem IW IC  etc.&bib-item&bibl& Reference to a bibliographical item \\\hline
\end{tabular}



\subsection{The Textcritical Apparatus}

\begin{tabular}{|p{6cm}|p{6cm}|p{6cm}|p{6cm}|}
	\hline 
	\LaTeX &HTML &TEI-XML & Remarks\\\hline\hline
	original&ins class="{}author" & add OR subst& Insertion or substitution by the author\\\hline
	editor etc. &ins class="editor" etc. &supplied OR corr, resp, type & Insertion or correction by the editor \\\hline
	emph textit uline etc. &i u&hi, rendition& All varieties of highlightings that include information on when the highlighting was added\\\hline 
	sout editorstr etc.&del etc.&del OR hi, rendition& Deletion together with information who and when the deletion took place\\\hline
	sic original etc.&sic-text ins class="{}author" etc.&sic& in corrections the initial incorrect text\\\hline
	unsicher&un-certain&hi, rendition&Uncertain transcription\\\hline
	luecke&text-gap&gap&Gap in the original text\\\hline
	\emph{Other highlightings}&\emph{Other custom tags}&hi, rendition&\\\hline
	
\end{tabular}\bigskip


	
%\section{What is \valeptex?}
	
%\noindent Have fun with \valeptex!\bigskip


\latexonly{
	\includegraphicscn[width=1.5cm]{Neurath_elephant.jpg}{}
	
}

\end{document}

%%% Local Variables:
%%% TeX-PDF-mode: t
%%% mode: latex
%%% TeX-master: t
%%% End:
