diff --git a/examples/eoatex/preambel/pre_eoa.tex b/examples/eoatex/preambel/pre_eoa.tex index dfb4ca5..12da1d4 100755 --- a/examples/eoatex/preambel/pre_eoa.tex +++ b/examples/eoatex/preambel/pre_eoa.tex @@ -61,8 +61,8 @@ \newfontfamily\zhfont{DFKai-SB} \newfontfamily\zhpunctfont{DFKai-SB} \else -\newfontfamily\zhfont{BiauKai} -\newfontfamily\zhpunctfont{BiauKai} +\newfontfamily\zhfont{Noto Serif CJK SC} +\newfontfamily\zhpunctfont{Noto Serif CJK SC} \fi % The package zhspacing makes typesetting chinese much better @@ -82,21 +82,21 @@ \newfontfamily\textchinese{DFKai-SB} \newfontfamily\chinesefont{DFKai-SB} \else -\newfontfamily\textchinese{BiauKai} -\newfontfamily\chinesefont{BiauKai} +\newfontfamily\textchinese{Noto Serif CJK SC} +\newfontfamily\chinesefont{Noto Serif CJK SC} \fi -\newfontfamily\germanfont{Times New Roman} -\newfontfamily\englishfont{Times New Roman} -\newfontfamily\greekfont{Times New Roman} -\newfontfamily\russianfont{Times New Roman} -\newfontfamily\hebrewfont{Times New Roman} +\newfontfamily\germanfont{TeX Gyre Termes} +\newfontfamily\englishfont{TeX Gyre Termes} +\newfontfamily\greekfont{TeX Gyre Termes} +\newfontfamily\russianfont{TeX Gyre Termes} +\newfontfamily\hebrewfont{TeX Gyre Termes} \newfontfamily\EOAmfont{XITS Math} % Those fonts are being used in Berlin only, no need for Windows \ifwindows \else \newfontfamily\Arial{ArialMT} -\newfontfamily\Courier{Courier} -\newfontfamily\Helvetica{Helvetica} +\newfontfamily\Courier{TeX Gyre Cursor} +\newfontfamily\Helvetica{TeX Gyre Heros} \newfontfamily\Verdana{Verdana} \fi @@ -601,6 +601,8 @@ {\end{compactenum}\medskip } +% abstract +\newenvironment{EOAabstract}{\begin{quote}\small}{\end{quote}} % \newenvironment{EOAlist}{\medskip\begin{compactenum}}{\end{compactenum}\medskip} % Environment for undordered list \newenvironment{EOAitems}{\medskip\begin{compactitem}}{\end{compactitem}\medskip} @@ -720,6 +722,11 @@ \newcommand{\EOAprintbibliography}[1][]{ \ifthenelse{\equal{#1}{}}{\printbibliography[heading=none]}{\printbibliography[heading=none,keyword=#1]}% } +% Command for list of shorthands +\newcommand{\EOAprintshorthands}{ + \printbiblist[heading=none]{shorthand} +} + % Command for .bib-Database \newcommand{\EOAbibliographydatabase}[1]{ \bibliography{#1} diff --git a/examples/eoatex/preambel/pre_xml.tex b/examples/eoatex/preambel/pre_xml.tex index 3397e16..010401d 100644 --- a/examples/eoatex/preambel/pre_xml.tex +++ b/examples/eoatex/preambel/pre_xml.tex @@ -72,6 +72,7 @@ \newenvironment{EOAquote}{\begin{quote}}{\end{quote}} \newenvironment{EOAitems}{\begin{itemize}}{\end{itemize}} \newenvironment{EOAlist}{\begin{enumerate}}{\end{enumerate}} +\newenvironment{EOAabstract}{\begin{quote}}{\end{quote}} % additional attribute for counters not starting at 1 % \newenvironment{EOAlist}[1][]{% @@ -165,7 +166,7 @@ \end{xmlelement}} \newcommand*{\EOAprintbibliography}[1][]{\begin{xmlelement}{EOAprintbibliography}\end{xmlelement}{\AddAttToLast{keyword}{#1}}} % \newcommand*{\EOAprintbibliography}{\begin{xmlelement}{EOAprintbibliography}\end{xmlelement}} - +\newcommand*{\EOAprintshorthands}{\begin{xmlelement}{EOAprintshorthands}\end{xmlelement}} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Querverweise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% diff --git a/examples/eoatex/texfiles/09_facsimiles.tex b/examples/eoatex/texfiles/09_facsimiles.tex index 48e1b0f..0641d3c 100644 --- a/examples/eoatex/texfiles/09_facsimiles.tex +++ b/examples/eoatex/texfiles/09_facsimiles.tex @@ -1,4 +1,4 @@ \EOAfacsimile{facsim/001.jpg}{facsim001}{Facsimile of page 001} \EOAfacsimile{facsim/002.jpg}{facsim002}{Facsimile of page 002} \EOAfacsimile{facsim/003.jpg}{facsim003}{Facsimile of page 003} -\EOAfacsimile[pb004]{facsim/004.jpg}{facsim004}{Last facsimile page extended} \ No newline at end of file +% \EOAfacsimile[pb004]{facsim/004.jpg}{facsim004}{Last facsimile page extended} \ No newline at end of file diff --git a/schema/resource/eoa-tei-strict.rnc b/schema/resource/eoa-tei-strict.rnc index a38f63b..4d89ded 100644 --- a/schema/resource/eoa-tei-strict.rnc +++ b/schema/resource/eoa-tei-strict.rnc @@ -15,7 +15,7 @@ start = element text { attribute xml:id { "text" }?, element front { frontmatter }, - element body { part* | chapter* }, + element body { (chapter?, part*) | chapter* | indexchapter* }, element back { backmatter }? } } @@ -170,6 +170,7 @@ tei_header = person = element persName { + attribute xml:lang { xsd:NCName }?, attribute ref { xsd:anyURI }?, element surname { text }, element forename { text }, @@ -253,7 +254,7 @@ part = attribute n { xsd:integer }, attribute xml:id { xsd:NCName }, head, - ( chapter | sourcesfeatures)* + ( chapter | sourcesfeatures | indexchapter )* } chapter = @@ -261,12 +262,13 @@ chapter = attribute type { "chapter" }, # should non-numbered elements be allowed to carry an id? # either: - # attribute n { xsd:integer | "nonumber" }, - # attribute xml:id { xsd:NCName }, + attribute n { xsd:integer | "nonumber" }, + attribute xml:id { xsd:NCName }, # or: - (( attribute xml:id { xsd:NCName }, - attribute n { xsd:integer }?)| - attribute n { "nonumber" } ), + # (( attribute xml:id { xsd:NCName }, + # attribute n { xsd:integer }?)| + # attribute n { "nonumber" } ), + attribute xml:lang { xsd:string {pattern = "[a-z]{2}" } }?, attribute resp { text }?, head-ex-abbr, element epigraph { p+ }?, @@ -280,11 +282,11 @@ chapter = section = element div { attribute type { "section" }, - (( attribute xml:id { xsd:NCName }, - attribute n { xsd:integer }?)| - attribute n { "nonumber" } ), - # attribute n { xsd:integer | "nonumber" }, - # attribute xml:id { xsd:NCName }, + # (( attribute xml:id { xsd:NCName }, + # attribute n { xsd:integer }?)| + # attribute n { "nonumber" } ), + attribute n { xsd:integer | "nonumber" }, + attribute xml:id { xsd:NCName }, head, ( eoaelement | subsection | sourcesfeatures)* } @@ -292,11 +294,11 @@ section = subsection = element div { attribute type { "subsection" }, - (( attribute xml:id { xsd:NCName }, - attribute n { xsd:integer }?)| - attribute n { "nonumber" } ), - # attribute n { xsd:integer | "nonumber" }, - # attribute xml:id { xsd:NCName }, + # (( attribute xml:id { xsd:NCName }, + # attribute n { xsd:integer }?)| + # attribute n { "nonumber" } ), + attribute n { xsd:integer | "nonumber" }, + attribute xml:id { xsd:NCName }, head, (eoaelement|subsubsection)* } @@ -304,11 +306,11 @@ subsection = subsubsection = element div { attribute type { "subsubsection" }, - (( attribute xml:id { xsd:NCName }, - attribute n { xsd:integer }?)| - attribute n { "nonumber" } ), - # attribute n { xsd:integer | "nonumber" }, - # attribute xml:id { xsd:NCName }, + # (( attribute xml:id { xsd:NCName }, + # attribute n { xsd:integer }?)| + # attribute n { "nonumber" } ), + attribute n { xsd:integer | "nonumber" }, + attribute xml:id { xsd:NCName }, head, eoaelement* } @@ -317,17 +319,17 @@ head = element head { (text | markup | inline_formula | index | indexanchor | re floathead = element head { - (text | bibref | markup | inline_formula | index | indexanchor | ref )+ } + (text | bibref | markup | foreign | inline_formula | index | indexanchor | ref )+ } head-ex-abbr = element head { ( element choice { element expan { - (text | markup | inline_formula | index | indexanchor | ref )+ }, + (text | markup | foreign | inline_formula | index | indexanchor | ref )+ }, element abbr { - (text | markup | inline_formula | index | indexanchor | ref )+ } + (text | markup | foreign | inline_formula | index | indexanchor | ref )+ } } ) | - (text | markup | inline_formula | index | indexanchor )+ + (text | markup | foreign | inline_formula | index | indexanchor )+ } ################################### @@ -355,6 +357,7 @@ eoaelement = | \list | table | theorem + | theoreminstance | bilingual | lg | quote @@ -540,14 +543,15 @@ bibref = element bibl { element ref { attribute type { "year" | "authoryear"}, - attribute target { xsd:anyURI }, - text + attribute target { xsd:string {pattern = "#[A-Za-z0-9\-_:\./]+" }} + # attribute target { xsd:anyURI } + # text }, element citedRange { - text | ( attribute from { xsd:string {pattern = "(\p{L}|\p{N}|\p{P}|\p{S}|-|–)+\.?" }}, - attribute to { xsd:string {pattern = "(\p{L}|\p{N}|\p{P}|\p{S})+" }}?) + attribute to { xsd:string {pattern = "(\p{L}|\p{N}|\p{P}|\p{S})+" }}?) | + ( text | markup | foreign )+ # ( attribute from { xsd:integer | "viii" }, # attribute to { xsd:integer }?) }? @@ -585,18 +589,41 @@ hi = theorem = element ab { attribute type { "theoremdeclaration" }, - attribute xml:id { xsd:NCName }, - text + attribute xml:id { xsd:NCName }, + text + } + +theoreminstance = + element ab { + attribute type { "theoreminstance" }, + attribute corresp { xsd:anyURI}, + spanmarkup } +## References that are either a URL or references to numbered sections +## or floats or pages (although being discouraged). @type values +## containing 'hi' are used for the hyperimage system ref = element ref { attribute target { xsd:anyURI }, ( (attribute type { "url" }, element date { - attribute when { xsd:date }}?, text?) + attribute when { xsd:date }}?, text? + ) | - attribute type { "number" | "page" | "number-hi" } + (attribute type {"text-hi" | "number-hionly" | "number-hi" }, + attribute select { xsd:NCName }?) + | + (attribute type { "hionlycollage" }, + ( + element ref { + attribute target { xsd:anyURI }, + attribute type { "number" | "number-hionly" | "number-hi" } + } | + text)+ + ) + | + attribute type { "number" | "page" } ), text } @@ -623,6 +650,15 @@ indexanchor = attribute xml:id { xsd:NCName } } +indexchapter = + element div { + attribute type { "indexchapter"}, + attribute xml:id { xsd:NCName }, + attribute n { "nonumber" }, + head, + p + } + inline_formula = element formula { attribute rend { "inline" }, @@ -665,12 +701,28 @@ facsimile_image = sourcesfeatures = ( + bilingualchapter | bilingual | facsimilepages | sidebyside | letter ) +bilingualchapter = + element div { + attribute type { "chapteroriginal"|"chaptertranslation" }, + attribute n { xsd:integer | "nonumber" }, + attribute corresp { xsd:anyURI }, + attribute xml:id { xsd:NCName }, + attribute xml:lang { xsd:string {pattern = "[a-z]{2}" } }?, + attribute resp { text }?, + head-ex-abbr, + element epigraph { p+ }?, + ( eoaelement | section | sourcesfeatures)*, + # TODO: make this non optional: + chapter_bibfile_ref? + } + bilingual = element div { attribute type { "bilingual" }, @@ -679,16 +731,16 @@ bilingual = attribute type { "original" }, attribute xml:lang { xsd:string {pattern = "[a-z]{2}" }}, attribute xml:id { text }, - head, - p+ + head?, + eoaelement* }, element div { attribute corresp { text }, attribute type { "translation" }, attribute xml:lang { xsd:string {pattern = "[a-z]{2}" }}, attribute xml:id { text }, - head, - p+ + head?, + eoaelement* } } diff --git a/scripts/rnc_analysis_to_odd.sh b/scripts/rnc_analysis_to_odd.sh index 2345654..3f26522 100755 --- a/scripts/rnc_analysis_to_odd.sh +++ b/scripts/rnc_analysis_to_odd.sh @@ -100,7 +100,18 @@ echo "input_dir: $input_dir" input_filename=$(cat $input_dir/info.cfg | grep 'SOURCE' | cut -d' ' -f2) -input_dir_absolute=$(readlink -f "$input_dir") +if [ $(uname) == "Darwin" ] ; then + if which 'greadlink'; then + input_dir_absolute=$(greadlink -f "$input_dir") + else + echo "readlink not found (also 'greadlink' is not available)." + echo "On mac, please install 'coreutils', e.g. using homebrew" + exit 1 + fi +else + input_dir_absolute=$(readlink -f "$input_dir") +fi + debug_modules_options="debug_modules=${debug_modules[@]}"