Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge branch 'odd' of github.molgen.mpg.de:EditionOpenAccess/eoa-publ…
…ication-model into odd
  • Loading branch information
EsGeh authored and EsGeh committed Nov 18, 2019
2 parents e108bbd + 05c1b82 commit 9688222
Show file tree
Hide file tree
Showing 5 changed files with 123 additions and 52 deletions.
29 changes: 18 additions & 11 deletions examples/eoatex/preambel/pre_eoa.tex
Expand Up @@ -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
Expand All @@ -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

Expand Down Expand Up @@ -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}
Expand Down Expand Up @@ -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}
Expand Down
3 changes: 2 additions & 1 deletion examples/eoatex/preambel/pre_xml.tex
Expand Up @@ -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][]{%
Expand Down Expand Up @@ -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
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Expand Down
2 changes: 1 addition & 1 deletion 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}
% \EOAfacsimile[pb004]{facsim/004.jpg}{facsim004}{Last facsimile page extended}
128 changes: 90 additions & 38 deletions schema/resource/eoa-tei-strict.rnc
Expand Up @@ -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 }?
}
}
Expand Down Expand Up @@ -170,6 +170,7 @@ tei_header =

person =
element persName {
attribute xml:lang { xsd:NCName }?,
attribute ref { xsd:anyURI }?,
element surname { text },
element forename { text },
Expand Down Expand Up @@ -253,20 +254,21 @@ part =
attribute n { xsd:integer },
attribute xml:id { xsd:NCName },
head,
( chapter | sourcesfeatures)*
( chapter | sourcesfeatures | indexchapter )*
}

chapter =
element div {
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+ }?,
Expand All @@ -280,35 +282,35 @@ 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)*
}

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)*
}

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*
}
Expand All @@ -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 )+
}

###################################
Expand Down Expand Up @@ -355,6 +357,7 @@ eoaelement =
| \list
| table
| theorem
| theoreminstance
| bilingual
| lg
| quote
Expand Down Expand Up @@ -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 }?)
}?
Expand Down Expand Up @@ -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
}
Expand All @@ -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" },
Expand Down Expand Up @@ -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" },
Expand All @@ -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*
}
}

Expand Down
13 changes: 12 additions & 1 deletion scripts/rnc_analysis_to_odd.sh
Expand Up @@ -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[@]}"

Expand Down

0 comments on commit 9688222

Please sign in to comment.