├── .github └── workflows │ ├── deploy-docs.yml │ └── test.yml ├── .gitignore ├── LICENSE.txt ├── README.adoc ├── Wiki ├── AlignedTexts.adoc ├── AuxiliaryTools.adoc ├── Checks.adoc ├── CodingConventions.adoc ├── Configuration.adoc ├── CrossReferences.adoc ├── CustomizationWithCSS.adoc ├── FacsimileSupport.adoc ├── Figures.adoc ├── Footnotes.adoc ├── Formulas.adoc ├── FuturePlans.adoc ├── GettingStarted.adoc ├── Index.adoc ├── Installation.adoc ├── Introduction.adoc ├── KwicIndex.adoc ├── MediaOverlaysInEPub3.adoc ├── MergingTexts.adoc ├── PageBreaks.adoc ├── ParsingCss.adoc ├── ProcessSteps.adoc ├── ProjectHome.adoc ├── RedesignCss.adoc ├── ScratchPad.adoc ├── SpecifyingCoverPages.adoc ├── TEIHeader.adoc ├── Tables.adoc ├── UsingTheRendAttribute.adoc └── ePub3Support.adoc ├── checks.pl ├── checks.xsl ├── databases ├── create-words-db.sql └── queries.sql ├── documentation ├── Processed │ ├── TEI-Guidelines.epub │ ├── TEI-Guidelines.html │ └── images │ │ ├── reference250.jpg │ │ └── reference500.jpg ├── TEI-Guidelines-0.6.tei ├── TEI-PG-Guidelines-0.6.odt ├── covers │ ├── cover.svg │ ├── cover250.jpg │ ├── cover500.jpg │ ├── frontispiece.gif │ ├── reference250.jpg │ └── reference500.jpg ├── custom.css └── imageinfo.xml ├── dtd ├── CATALOG ├── ISOlat1.ent ├── ISOlat2.ent ├── ISOnum.ent ├── ISOpub.ent ├── README.md ├── teilite.dtd ├── teilitejh.dtd ├── teilitex.dtd ├── teilitex.ent ├── teisgml.dec ├── teixlite.dtd ├── usrmods.dtd └── usrmods.ent ├── dummy.xml ├── include.xsl ├── locale ├── abbreviations.xml ├── messages.xml ├── messages.xsl ├── messages2csv.xsl ├── messages2messages.xsl ├── messages2po.pl ├── messages2po.xsl ├── messages2xliff.xsl └── stopwords.xml ├── merge-documents.xsl ├── modules ├── betacode.xsl ├── block.xsl ├── colophon.xsl ├── configuration.xsl ├── contents.xsl ├── copyright.xsl ├── css.xsl ├── divisions.xsl ├── drama.xsl ├── exlibris.xsl ├── facsimile.xsl ├── figures.xsl ├── formulas.xsl ├── functions.xsl ├── gutenberg.xsl ├── header.xsl ├── index.xsl ├── inline.xsl ├── levenshtein.xsl ├── lists.xsl ├── localization.xsl ├── log.xsl ├── normalize-table.xsl ├── notes.xsl ├── numbers.xsl ├── plaintext.xsl ├── references-func.xsl ├── references.xsl ├── rend.xsl ├── segmentize.xsl ├── spellout.xsl ├── splitter.xsl ├── stripns.xsl ├── tables.xsl ├── tei2epubnav.xsl ├── tei2ncx.xsl ├── tei2opf.xsl ├── titlepage.xsl ├── utils.epub.xsl ├── utils.html.xsl ├── utils.xsl └── variables.xsl ├── p4top5.xsl ├── pom.xml ├── pptools ├── broken-images.pl ├── catpars.pl ├── checkArchives.pl ├── copy2git.pl ├── corpus tools │ ├── collectFeatures.pl │ ├── collectFeatures.txt │ ├── collectWords.pl │ ├── confusables.txt │ ├── dictionary-queries.sql │ ├── dictionary-schema.sql │ ├── partsofspeech.txt │ └── scannos.txt ├── dictionaries │ ├── de.stopwords │ ├── dict-nl_1900.oxt │ │ ├── META-INF │ │ │ └── manifest.xml │ │ ├── description.xml │ │ ├── dictionaries.xcu │ │ ├── nl_NL_1900.aff │ │ └── nl_NL_1900.dic │ ├── en.long.stopwords │ ├── en.scannos │ ├── en.stopwords │ ├── filter-frequency-report.pl │ ├── nl.stopwords │ ├── nl_NL_1900_changes.txt │ └── nl_NL_1900_full.txt ├── divn2div.pl ├── extract-page.pl ├── extract-segs.pl ├── extractPdf.pl ├── fb2tei.pl ├── fixAnchors.pl ├── fixDitto.pl ├── fixNotes.pl ├── fixPb.pl ├── handleFootnotes.pl ├── html2tei.pl ├── idelement.pl ├── idformula.pl ├── idnotes.pl ├── lower-sc.pl ├── numberDiv2s.pl ├── numberLines.pl ├── numberParagraphs.pl ├── old │ ├── aposquote-test.txt │ ├── aposquote.pl │ ├── collectWords.pl │ ├── dirwin2utf8.pl │ ├── ent2win.pl │ ├── extractLanguage.pl │ ├── g4.pl │ ├── linkdex-test.tei │ ├── linkdex.pl │ ├── modernize.pl │ ├── modernizeer.txt │ ├── normalize.pl │ ├── normalizeText.pl │ ├── resolveIndex.pl │ ├── sorted-sgml-entities.pl │ ├── uckwic.pl │ └── win2utf8.pl ├── optimg.pl ├── pgpp.pl ├── pgprepare.pl ├── pgpreview.pl ├── pgreport.pl ├── quotes.pl ├── smallcaps.pl ├── sortAttributes.pl ├── speaker-uc.pl ├── tagBibleRefs.pl ├── tagMeasures.pl ├── tagPoetry.pl ├── tagPoetryLgSp.pl ├── tagSegments.pl ├── to7zip.pl └── utf82ent.pl ├── preprocess.xsl ├── samples ├── Cole - Philippine Folk Tales │ ├── PhilippineFolkTales-1.1.tei │ ├── Processed │ │ ├── PhilippineFolkTales.html │ │ ├── PhilippineFolkTales.xml │ │ └── images │ │ │ ├── front.jpg │ │ │ ├── p026-1.jpg │ │ │ ├── p026-2.jpg │ │ │ ├── p027.jpg │ │ │ ├── p040-1.jpg │ │ │ ├── p040-2.jpg │ │ │ ├── p041-1.jpg │ │ │ ├── p041-2.jpg │ │ │ ├── p056-1.jpg │ │ │ ├── p056-2.jpg │ │ │ ├── p057-1.jpg │ │ │ ├── p057-2.jpg │ │ │ ├── p068-1.jpg │ │ │ ├── p068-2.jpg │ │ │ ├── p069-1.jpg │ │ │ ├── p069-2.jpg │ │ │ ├── p090-1.jpg │ │ │ ├── p090-2.jpg │ │ │ ├── p091-1.jpg │ │ │ ├── p091-2.jpg │ │ │ ├── p124.jpg │ │ │ ├── p125.jpg │ │ │ ├── p160-1.jpg │ │ │ ├── p160-2.jpg │ │ │ ├── p161.jpg │ │ │ ├── p196.jpg │ │ │ ├── p197-1.jpg │ │ │ ├── p197-2.jpg │ │ │ ├── qr12814.png │ │ │ └── titlepage.png │ ├── README.adoc │ ├── imageinfo.xml │ └── metadata.xml ├── Fansler - Filipino Popular Tales │ ├── FilipinoPopularTales-1.0.tei │ └── FilipinoPopularTales.xml ├── Kayme - Anting-Anting Stories │ ├── AntingAnting-1.0.tei │ └── AntingAnting.xml ├── Pratt - Armenia and the Armenians │ ├── ArmeniaArmenians-1.0.tei │ └── ArmeniaArmenians.xml ├── README.adoc ├── Shakespeare - Twee Edellieden van Verona │ ├── WS-03-EdelliedenVerona-1.0.tei │ └── WS-03-EdelliedenVerona.xml └── getRepos.pl ├── sandbox ├── README.md ├── css2xml.xsl ├── extract-page.xsl ├── extract-page.xspec ├── extract-segs.xsl ├── fb2tei.xsl ├── html2tei.xsl ├── linkIndex.pl ├── normalize-paragraphs.xsl ├── normalize-paragraphs.xspec ├── pageMap │ └── pageMap.pl ├── pagemap.xsl ├── pagemap.xspec ├── patterns │ ├── compilePattern.pl │ ├── compilePatterns.xsl │ ├── compiledTest.xsl │ ├── patterns.xsl │ └── testPatterns.xsl ├── pgtei2tei.xsl ├── svg.html ├── svg.pl ├── svg.xsl ├── tei2pgtei.xsl ├── tei2txt.xsl ├── tei2txt.xspec ├── tei2wl.pl ├── tei2wl.xsl └── usage.xsl ├── schemas ├── exlibris.xsd ├── imageinfo.xsd ├── issues.xsd ├── messages.xsd ├── tei2html.config.xsd └── xsltdoc.xsd ├── schematron ├── tei-namespace.xsl ├── tei-validation.sch ├── validate-tei-fail-test.xml ├── validate-tei-test.xml ├── validate-tei.pl └── validation-report.xsl ├── style ├── aligned-text.css ├── arctic.css ├── atkinson.css ├── aural.css ├── borneo.css ├── classic.css ├── color-lang-de.css ├── color-lang-nl.css ├── color-lang.css ├── computer-modern.css ├── crystal.css ├── debug.css ├── ditto.css ├── epub.css ├── figure.css ├── formulas.css ├── garamond.css ├── heatmap.css ├── intralinear.css ├── layout-epub.css ├── layout-html.css ├── layout.css ├── list.css ├── modern.css ├── normalize.css ├── print.css ├── refine30.css ├── table.css ├── tagusage.css ├── titlepage.css ├── velvet.css └── verse.css ├── tei2adoc.xsl ├── tei2dc.xsl ├── tei2epub.xsl ├── tei2html.xsl ├── tei2html5.xsl ├── tei2imageinfo.xsl ├── tei2readme.xsl ├── tei2sql.xsl ├── tei2tei.xsl ├── tei2xhtml.xsl ├── test ├── audio │ ├── test.mp3 │ └── test.ogg ├── custom.css ├── ePub │ ├── META-INF │ │ └── container.xml │ ├── audio │ │ ├── test.mp3 │ │ └── test.ogg │ ├── cover.xhtml │ ├── images │ │ ├── Ornament.png │ │ ├── bracket3.png │ │ ├── cover500.jpg │ │ ├── hg2101.png │ │ ├── initial-A.png │ │ ├── tarsier.jpg │ │ ├── test.jpg │ │ └── thumbs │ │ │ ├── cover500.jpg │ │ │ ├── hg2101.png │ │ │ ├── tarsier.jpg │ │ │ └── test.jpg │ ├── mimetype │ ├── test-alignFirst.xhtml │ ├── test-alignSecond.xhtml │ ├── test-alignThird.xhtml │ ├── test-backmatter-2.xhtml │ ├── test-bk1-1.xhtml │ ├── test-ch01.xhtml │ ├── test-ch02.xhtml │ ├── test-ch03.xhtml │ ├── test-ch04-1.xhtml │ ├── test-ch04-3.xhtml │ ├── test-ch05.xhtml │ ├── test-ch06.xhtml │ ├── test-ch07.xhtml │ ├── test-ch08.xhtml │ ├── test-ch11.xhtml │ ├── test-ch11a.xhtml │ ├── test-figTest2.xhtml │ ├── test-frontmatter-2.xhtml │ ├── test-index.xhtml │ ├── test-nav.xhtml │ ├── test-test-toc.xhtml │ ├── test-usingStyle.xhtml │ ├── test.css │ ├── test.ncx │ ├── test.opf │ └── test.smil ├── formulas │ ├── display-f2.html │ ├── display-f2.mml │ ├── display-f2.svg │ ├── display-f2.tex │ ├── display-f3.html │ ├── display-f3.mml │ ├── display-f3.svg │ ├── display-f3.tex │ ├── display-f6.html │ ├── display-f6.mml │ ├── display-f6.svg │ ├── display-f6.tex │ ├── inline-f1.html │ ├── inline-f1.mml │ ├── inline-f1.svg │ ├── inline-f1.tex │ ├── inline-f4.html │ ├── inline-f4.mml │ ├── inline-f4.svg │ ├── inline-f4.tex │ ├── inline-f5.html │ ├── inline-f5.mml │ ├── inline-f5.svg │ └── inline-f5.tex ├── imageinfo.xml ├── images │ ├── Ornament.png │ ├── audio.png │ ├── book.png │ ├── bracket-left.png │ ├── bracket.png │ ├── bracket3.png │ ├── card.png │ ├── cover500.jpg │ ├── external.png │ ├── hg2101.png │ ├── initial-A.png │ ├── lbrace2.png │ ├── p081.png │ ├── page-image.png │ ├── qrcode.png │ ├── rbrace2.png │ ├── tarsier.jpg │ ├── test.jpg │ └── thumbs │ │ ├── cover500.jpg │ │ ├── tarsier1.jpg │ │ ├── tarsier2.jpg │ │ ├── test.jpg │ │ ├── test1.jpg │ │ └── test2.jpg ├── metadata.xml ├── normalize-table-test-output.xml ├── normalize-table-test.pl ├── normalize-table-test.xml ├── opf-manifest.xml ├── opf-metadata.xml ├── tei2html.config ├── test-alignment.xml ├── test-dc.xml ├── test-html5.html ├── test-img-overlay.html ├── test-include.xml ├── test.html ├── test.pl ├── test.smil ├── test.xml ├── testMath │ ├── Processed │ │ ├── formulas │ │ │ ├── display-f1.svg │ │ │ ├── display-f2.svg │ │ │ ├── display-f3.svg │ │ │ ├── display-f4.svg │ │ │ ├── display-f5.svg │ │ │ ├── display-f6.svg │ │ │ ├── display-f7.svg │ │ │ ├── inline-f41.svg │ │ │ ├── inline-f42.svg │ │ │ └── inline-f8.svg │ │ ├── testMath-MML.html │ │ ├── testMath-MathJax.html │ │ ├── testMath-SVG-IMG.html │ │ ├── testMath-SVG.html │ │ └── testMath.html │ ├── tei2html.config │ ├── testMath-0.0.tei │ └── testMath.xml ├── testSplitter │ └── testSplitter.xml └── testTable │ ├── Processed │ └── testTable.html │ └── testTable.tei ├── tools ├── LanguageNames.pm ├── SgmlSupport.pm ├── addPositionInfo.pl ├── addTrans.pl ├── cleanHtml.pl ├── convertCrossWord.pl ├── convertCrossWordText.pl ├── convertDraughtsDiagram.pl ├── convertFormulas.pl ├── convertWylie.pl ├── ent2latin1.pl ├── ent2ucs.pl ├── extractNotes.pl ├── filter-nsgmls-errors.pl ├── imageinfo.pl ├── inclusions.pl ├── intralinear.pl ├── patc │ ├── num2name.pat │ ├── old │ │ ├── ent2ucs.pat │ │ ├── sgml2asc.pat │ │ └── sgml2win.pat │ ├── src │ │ ├── args.h │ │ ├── makefile │ │ ├── patc.c │ │ ├── patc.prj │ │ ├── patc.sln │ │ ├── patc.txt │ │ ├── patc.vcproj │ │ ├── pstree.c │ │ ├── pstree.h │ │ ├── searchfile.c │ │ └── searchfile.h │ ├── transcriptions │ │ ├── arabic │ │ │ ├── ar2rm.pat │ │ │ ├── ar2sgml.pat │ │ │ ├── ar2utf8.pat │ │ │ ├── teiarb.ent │ │ │ └── ur2sgml.pat │ │ ├── armenian │ │ │ ├── hy2sgml.pat │ │ │ └── test-armenian.txt │ │ ├── coptic │ │ │ └── co2sgml.pat │ │ ├── cyrillic │ │ │ ├── cy2sgml.pat │ │ │ ├── cyt2sgml.pat │ │ │ ├── old │ │ │ │ ├── cy2ucs.pat │ │ │ │ ├── cypgdp2sgml.pat │ │ │ │ ├── cyx2sgml.pat │ │ │ │ ├── fixcy.pat │ │ │ │ └── uncy.pat │ │ │ ├── sr2sgml.pat │ │ │ └── srt2sgml.pat │ │ ├── greek │ │ │ ├── beta2unicode.pat │ │ │ ├── gr2sgml.pat │ │ │ ├── gr2utf8-new.pat │ │ │ ├── grt2sgml.pat │ │ │ ├── grt2sgml8.pat │ │ │ ├── old │ │ │ │ ├── fixgreek.pat │ │ │ │ ├── gr2beta.pat │ │ │ │ ├── gr2ucs.pat │ │ │ │ ├── gr2utf8.pat │ │ │ │ ├── greek.tei │ │ │ │ ├── greek.txt │ │ │ │ ├── pgb2gr.pat │ │ │ │ ├── pgdp2gr.pat │ │ │ │ ├── quotGR.pat │ │ │ │ ├── ungreek.pat │ │ │ │ ├── ungreek8.pat │ │ │ │ ├── utf8-pgdp2gr.pat │ │ │ │ └── utf82gr.pat │ │ │ ├── tagGreek.pl │ │ │ └── utf82gr-new.pat │ │ ├── hebrew │ │ │ ├── he2sgml.pat │ │ │ ├── he2utf8.pat │ │ │ ├── het2sgml.pat │ │ │ └── utf82he.pat │ │ ├── hieroglyphs │ │ │ ├── hg.pat │ │ │ └── hg2sgml.pat │ │ ├── indic │ │ │ ├── as2ucs.pat │ │ │ ├── bn2ucs.pat │ │ │ ├── dn2latn.pat │ │ │ ├── dn2latn8.pat │ │ │ ├── dn2ucs.pat │ │ │ ├── dn2utf8.pat │ │ │ ├── dnout2.html │ │ │ ├── dntest.htm │ │ │ ├── pgdp-dv2ucs.pat │ │ │ ├── suggestion-unicode.txt │ │ │ ├── ta2ucs.pat │ │ │ └── untamil.pat │ │ ├── syriac │ │ │ └── sy2sgml.pat │ │ └── tagalog │ │ │ └── Tagalog.pat │ └── win2sgml.pat ├── precheck.pl ├── stripDocType.pl ├── tei2html.bat ├── tei2html.pl ├── tei2imageinfo.pl ├── tei2txt.pl ├── test │ ├── convertCrossWord-test.txt │ ├── convertDraughtsDiagram-test.txt │ └── convertWylie-test.txt ├── transcribe.pl ├── ucwords.pl ├── wipeids.pl ├── wrapLinesUnicode.pl └── wraplines.pl ├── xml2kwic.pl ├── xml2kwic.xsl ├── xml_tei.stx ├── xsltdoc.config ├── xsltdoc.pl └── xspec ├── betacode.xspec ├── block.xspec ├── checks.xspec ├── colophon.xspec ├── copyright.xspec ├── css.xspec ├── ditto.xspec ├── divisions.xspec ├── drama.xspec ├── facsimile.xspec ├── figures.xspec ├── header.xspec ├── inline.xspec ├── kwic.xspec ├── levenshtein.xspec ├── lists.xspec ├── localization.xspec ├── merge-documents.xspec ├── normalize-table.xspec ├── notes.xspec ├── numbers.xspec ├── opf.xspec ├── plaintext.xspec ├── preprocess.xspec ├── references.xspec ├── rend.xspec ├── runall.pl ├── spellout.xspec ├── splitter.xspec ├── tables.xspec ├── test-tei2epub.xsl ├── test-tei2html.xsl ├── toc.xspec └── utils.xspec /.github/workflows/deploy-docs.yml: -------------------------------------------------------------------------------- 1 | name: Deploy Documentation 2 | 3 | on: 4 | push: 5 | branches: 6 | - master 7 | 8 | jobs: 9 | build: 10 | runs-on: ubuntu-latest 11 | 12 | steps: 13 | - name: Checkout Repository 14 | uses: actions/checkout@v4 15 | 16 | - name: Set up JDK 17 17 | uses: actions/setup-java@v3 18 | with: 19 | distribution: 'temurin' 20 | java-version: '17' 21 | 22 | - name: Build Documentation 23 | run: mvn prepare-package 24 | 25 | - name: Create .nojekyll file 26 | run: touch target/Wiki/html/.nojekyll 27 | 28 | - name: Deploy to GitHub Pages 29 | uses: JamesIves/github-pages-deploy-action@v4 30 | with: 31 | branch: gh-pages # The branch where the documentation will be stored 32 | folder: target/Wiki/html # Path to the generated documentation 33 | clean: true # Removes previous files in gh-pages before deployment 34 | -------------------------------------------------------------------------------- /.github/workflows/test.yml: -------------------------------------------------------------------------------- 1 | 2 | name: Xspec tests 3 | 4 | on: 5 | push: 6 | branches: [ master ] 7 | pull_request: 8 | branches: [ master ] 9 | workflow_dispatch: 10 | 11 | jobs: 12 | build: 13 | runs-on: ubuntu-latest 14 | steps: 15 | - name: Cache Maven packages 16 | uses: actions/cache@v3 17 | with: 18 | path: ~/.m2 19 | key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} 20 | restore-keys: ${{ runner.os }}-m2 21 | - uses: actions/checkout@v4 22 | - name: Let maven run the tests 23 | run: mvn test 24 | -------------------------------------------------------------------------------- /Wiki/Checks.adoc: -------------------------------------------------------------------------------- 1 | = Checking a TEI file 2 | 3 | XSLT style-sheet to check various TEI conventions and textual issues. 4 | 5 | == Metadata 6 | 7 | Verify metadata is present and correct. 8 | 9 | == Rendering 10 | 11 | Verify valid rendering attributes are used 12 | 13 | * valid CSS-based rendition ladders 14 | * valid tei2html extensions. 15 | 16 | == Types 17 | 18 | Verify types for elements are valid according to the conventions. 19 | 20 | == Numbering 21 | 22 | Verify whether numbered items are in sequence. 23 | 24 | * page-breaks `<pb>` 25 | * divisions `<div#>` 26 | 27 | == Spacing and Punctuation 28 | 29 | Verify punctuation marks are properly spaced. 30 | 31 | == Quotation Marks 32 | 33 | Verify whether quotation marks are applied correctly. 34 | 35 | Quotation marks need to be nested correctly, and for each 36 | opening mark, there should be a corresponding closing mark. 37 | 38 | This is slightly complicated by several facts: 39 | 40 | * different types of usage 41 | ** US: outer double, inner single quotation marks 42 | ** UK: outer single, inner double quotation marks 43 | * different conventions for languages and countries. 44 | * usage around other punctuation might vary. 45 | * non-closed marks are to be re-opened in next paragraph. 46 | -------------------------------------------------------------------------------- /Wiki/Figures.adoc: -------------------------------------------------------------------------------- 1 | = Figures 2 | 3 | 4 | == Figures according to TEI P3 5 | 6 | Currently, `tei2html` supports figures following the TEI P3-model, with some modifications. 7 | 8 | A `figure` element describes a single image, and optional some heading, legend text and a description. 9 | 10 | The way the image itself was left somewhat implementation dependent. Within the structure of SGML, it could be specified as an entity, which was hardly supported anywhere. `tei2html` worked around this by deriving the image file from the `@id`, using an additional attribute `@url`, or placing the image file name in a rendition ladder in the `@rend` attribute. 11 | 12 | 13 | == Figures according to TEI P5 14 | 15 | TEI P5 revised the figure model, introducing a graphic element, and allowing multiple graphics to be part of a single figure. This better matches with practices in books, but requires a revision of the code. 16 | 17 | The new model allows multiple graphics in a figure and specifies the attribute `@url` as the way to specify the image. 18 | 19 | === Adjustments needed for TEI P5 20 | 21 | The current code should remain functional for existing texts. 22 | 23 | * When a single `graphic` element appears in a figure, behavior should be the same as an P3 style `figure` with an attribute, that is, the width of the block is the width of the image. (DONE.) 24 | * When multiple `graphic` elements appear, the images should be rendered under each other; the width of the entire block being the widest of these images. -------------------------------------------------------------------------------- /Wiki/GettingStarted.adoc: -------------------------------------------------------------------------------- 1 | = Prerequisites and Installation 2 | 3 | See the page on link:Installation.adoc[installation]. 4 | 5 | Note that currently no installer is present, so you will need to get the code from the repository directly. 6 | 7 | 8 | == Running from the command line 9 | 10 | Most of the interaction on the command line is with small Perl scripts that start the actual XSLT processor, and some other scripts. 11 | 12 | Before you can run the Perl scripts, you will need to make sure the paths to the various executables are configured correctly. Perl should be able to find the place where you’ve located your scripts (when running perl with the -S option.) 13 | 14 | The various `.jar` files (for Saxon and epubcheck), and the SGML catalog files need to be located in a specific subdirectory of the directory where the perl scripts reside. 15 | 16 | 17 | == Running interactively 18 | 19 | No easy window-based interface is yet available. I am working on a small HTML application to run the scripts interactively. 20 | 21 | 22 | == Running with Oxygen 23 | 24 | You can use the stylesheets with Oxygen, provided your sources are in XML format. Make sure you select an XSLT 3.0 processor to perform the transformation. 25 | -------------------------------------------------------------------------------- /Wiki/Index.adoc: -------------------------------------------------------------------------------- 1 | = Tei2html 2 | Jeroen Hellingman 3 | :toc: 4 | 5 | :doctype: book 6 | 7 | :front-cover-image: ..\documentation\covers\cover500.jpg 8 | 9 | 10 | include::Introduction.adoc[leveloffset=+1] 11 | 12 | include::GettingStarted.adoc[leveloffset=+1] 13 | 14 | include::Installation.adoc[leveloffset=+1] 15 | 16 | include::ProcessSteps.adoc[leveloffset=+1] 17 | 18 | include::Configuration.adoc[leveloffset=+1] 19 | 20 | include::TEIHeader.adoc[leveloffset=+1] 21 | 22 | include::SpecifyingCoverPages.adoc[leveloffset=+1] 23 | 24 | include::PageBreaks.adoc[leveloffset=+1] 25 | 26 | include::Figures.adoc[leveloffset=+1] 27 | 28 | include::Tables.adoc[leveloffset=+1] 29 | 30 | include::Footnotes.adoc[leveloffset=+1] 31 | 32 | include::Formulas.adoc[leveloffset=+1] 33 | 34 | include::UsingTheRendAttribute.adoc[leveloffset=+1] 35 | 36 | include::AlignedTexts.adoc[leveloffset=+1] 37 | 38 | include::FacsimileSupport.adoc[leveloffset=+1] 39 | 40 | include::ePub3Support.adoc[leveloffset=+1] 41 | 42 | include::MediaOverlaysInEPub3.adoc[leveloffset=+1] 43 | 44 | include::CodingConventions.adoc[leveloffset=+1] 45 | 46 | == Tools 47 | 48 | include::AuxiliaryTools.adoc[leveloffset=+1] 49 | 50 | include::MergingTexts.adoc[leveloffset=+1] 51 | 52 | include::Checks.adoc[leveloffset=+1] 53 | 54 | include::KwicIndex.adoc[leveloffset=+1] 55 | 56 | == Future Ideas 57 | 58 | include::RedesignCss.adoc[leveloffset=+1] 59 | 60 | include::ParsingCss.adoc[leveloffset=+1] 61 | 62 | 63 | 64 | -------------------------------------------------------------------------------- /Wiki/ParsingCss.adoc: -------------------------------------------------------------------------------- 1 | = Parsing CSS [Experimental] 2 | 3 | If we could easily parse CSS with XSLT, this would make it far easier to generate optimized HTML. Currently, we include the full CSS stylesheets with even the simplest texts, which increases clutter. If we parse a CSS stylesheet, and only retain those CSS rules that actually apply, text size and clutter is reduced. 4 | 5 | == Current Implementation 6 | 7 | The current implementation is in `css2xml.xsl`, which is incomplete. The CSS is parsed in a number of passes. Currently, the code not yet parses all valid CSS 2.1 stylesheets. In particular, `@media` groups are not supported. 8 | 9 | . tokenize with a simple regular expression based 'lexer' 10 | . group things between braces using 'sibling recursion' to match open braces with closing braces. 11 | . group properties, based on semicolons. 12 | . determine key-value pairs, based on the semicolon. 13 | . determine selectors. 14 | . clean-up parsing artifacts. 15 | 16 | Items remaining to do are: 17 | 18 | * Better follow tokenization as defined for http://www.w3.org/TR/CSS21/syndata.html#tokenization[CSS 2.1 tokenization]. 19 | * Properly understand all valid CSS 2.1 features. 20 | * Implement a way to translate CSS selectors to XPath expressions. 21 | 22 | == Usage 23 | 24 | Having CSS in XML, makes it easier to determine from within XSLT what rules within CSS kan be removed or rewritten in a simpler form. 25 | 26 | * Determine which CSS rules are actually used in an HTML document. 27 | * Determine which CSS rules are overruled within the same CSS stylesheet. 28 | 29 | As a result, the CSS stylesheet can be pruned, and only the relevant rules emitted in the output. 30 | 31 | == References 32 | 33 | * Some great implementation ideas are in http://www.gerixsoft.com/blog/xslt/json2xml[json2xml] 34 | * Need to translate CSS selectors to XPath. 35 | * Need to keep transformation result in variable to do tests against. -------------------------------------------------------------------------------- /Wiki/ProjectHome.adoc: -------------------------------------------------------------------------------- 1 | A collection of XSLT 3.0 style sheets to transform a document encoded in according to the TEILite DTD to HTML. They have been specifically developed to create a monolithic (single) HTML document for posting on http://www.gutenberg.org/[Project Gutenberg], but are also capable of generating ePub files from the same source with a similar look and feel. In line with the type of material Project Gutenberg deals with, these style sheets are designed to deal with encoded pre-existing works, rather than works created digitally from scratch. 2 | 3 | The transformation supports the following elements as present in TEI: 4 | 5 | * Plain Text and text styles 6 | * Title Pages 7 | * Tables 8 | * Lists 9 | * Tables of contents 10 | * Poetry and Plays 11 | * Footnotes 12 | * Illustrations 13 | * Cover images 14 | 15 | Furthermore, the script can generate 16 | 17 | * Tables of Contents. 18 | * Lists of Corrections. 19 | * Colophons 20 | * Metadata as used in ePub 21 | 22 | Tei2Html includes localisation support for English, Dutch, and to a lesser extent German, Afrikaans, French, Spanish, Tagalog and Cebuano. 23 | 24 | Note, that these scripts partly depend on the use of `@rend` attributes and other TEI conventions. It should not be expected that an arbitrary TEI file renders well with those scripts (although it should render reasonable in any case.) 25 | 26 | If you need modifications, extensions of these scripts, or need to have other TEI/XML/XSLT related work done, please be in touch with me on how I can help (at a fee). 27 | 28 | == External Links 29 | 30 | * http://www.tei-c.org/Tools/[TEI tools] 31 | * http://www.tei-c.org/Tools/Stylesheets/[another take at converting TEI to HTML] 32 | * http://wiki.tei-c.org/index.php/Tei-xsl[another link to TEI converters] 33 | * http://www.oucs.ox.ac.uk/oxgarage/["OxGarage, tools to convert TEI files"] -------------------------------------------------------------------------------- /Wiki/RedesignCss.adoc: -------------------------------------------------------------------------------- 1 | = CSS stylesheet redesign [TODO] 2 | 3 | The CSS stylesheets with `tei2html` have grown over time, and as a result are not very consistent or easy to maintain. To remedy this, I will redesign them using a more structured approach. 4 | 5 | This will involve the following 6 | 7 | . `reset.css` – reset all browser dependent settings, to achieve better consistency across browsers. 8 | . use the BEM philosophy, to make the stylesheets easier to maintain. 9 | 10 | == BEM for ePub 11 | 12 | BEM (Block Element Modifier) was developed to make the maintenance of CSS for websites easier. This does not always translate one-on-one to ebooks, but most of the principles can be applied without much trouble. 13 | 14 | The main blocks that can easily be identified: 15 | 16 | * *Cover* (either newly designed or original, or both) 17 | * *Title page* (either newly designed or original, or both) 18 | * *Text* (no distinction made between front matter, main body, and back matter, as they are normally typographically treated the same.) 19 | * *Advertisements* (reproduced advertisements from the original book) 20 | * *Colophon* (our own metadata regarding the book) 21 | 22 | Common elements in books: 23 | 24 | * Figures and plates 25 | * Tables of Contents 26 | * Tables 27 | * Lists 28 | * Index 29 | -------------------------------------------------------------------------------- /Wiki/SpecifyingCoverPages.adoc: -------------------------------------------------------------------------------- 1 | = Cover Pages 2 | 3 | Older books where often sold in simple paper covers, often just repeating the information on the title page. It was expected that the buyer of the book would bind it (or more likely have it bound by a professional bookbinder). As a result, covers for older books are not standard, and often do not contain more than a short title on the spine. The practice of selling books in nice decorative covers started in the late nineteenth century. Including the original cover of the book as an illustration in the TEI version is often nice, and is also a great feature for ePub devices, which use cover images to generate thumbnails from. 4 | 5 | When generating ePubs, `tei2html` expects the cover image to be indicated in a specific way in the front matter, using the exact `id`s as shown below: 6 | 7 | [source,xml] 8 | ---- 9 | 10 |

11 | 12 | ---- 13 | 14 | To make this work with the various ePub ebook readers, make this image 600 by 800 pixels, preferably as full color JPG. 15 | 16 | When a cover image is missing, a title page image can be used instead, as long as it is encoded following this convention (again, the `id`s matter, not the file names): 17 | 18 | [source,xml] 19 | ---- 20 | 21 |

22 | 23 | ---- 24 | 25 | See also: http://blog.threepress.org/2009/11/20/best-practices-in-epub-cover-images/ 26 | 27 | == Cover Thumbnail 28 | 29 | Sometimes it makes sense to also have a cover thumbnail which isn't just a reduction of the (original) cover page. To do this, just specify (as a hack) `cover-thumbnail(imagefile)` in the rend attribute of the text element. Similarly, `cover-image(imagefile)` can be used to specify a cover image that is not part of the original book, for those who like to have both. 30 | 31 | 32 | == favicon 33 | 34 | Simply drop an image file named `favicon.jpg` in the images directory, and `tei2html` will generate the metadata in the HTML to use it. Use a square image, upto 192 x 192 pixels. 35 | -------------------------------------------------------------------------------- /checks.pl: -------------------------------------------------------------------------------- 1 | # Perl script to test the checks.xsl stylesheet with Saxon. 2 | 3 | use strict; 4 | use warnings; 5 | 6 | my $xsldir = "C:\\Users\\Jeroen\\Documents\\eLibrary\\Tools\\tei2html"; # location of xsl stylesheets 7 | my $saxon = "\"C:\\Program Files\\Java\\jre6\\bin\\java.exe\" -jar C:\\bin\\saxonhe9\\saxon9he.jar "; 8 | 9 | my $filename = $ARGV[0]; 10 | 11 | $filename =~ /^(.*)\.xml$/; 12 | my $basename = $1; 13 | my $newname = $basename . "-pos.xml"; 14 | 15 | system ("perl -S addPositionInfo.pl \"$filename\" > \"$newname\""); 16 | system ("$saxon \"$newname\" $xsldir/checks.xsl"); 17 | -------------------------------------------------------------------------------- /databases/create-words-db.sql: -------------------------------------------------------------------------------- 1 | 2 | CREATE DATABASE `words` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci */; 3 | 4 | -- words.book definition 5 | 6 | CREATE TABLE `book` ( 7 | `idbook` int(11) NOT NULL AUTO_INCREMENT, 8 | `title` varchar(768) DEFAULT NULL, 9 | `author` varchar(768) DEFAULT NULL, 10 | `file` varchar(128) DEFAULT NULL, 11 | `changeDate` datetime DEFAULT current_timestamp(), 12 | PRIMARY KEY (`idbook`), 13 | KEY `title` (`title`), 14 | KEY `author` (`author`) 15 | ) ENGINE=InnoDB AUTO_INCREMENT=69749 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; 16 | 17 | 18 | -- words.word definition 19 | 20 | CREATE TABLE `word` ( 21 | `idword` int(11) NOT NULL AUTO_INCREMENT, 22 | `idbook` int(11) DEFAULT NULL, 23 | `word` varchar(128) DEFAULT NULL, 24 | `canonical` varchar(128) DEFAULT NULL, 25 | `language` varchar(32) DEFAULT NULL, 26 | `count` int(11) DEFAULT NULL, 27 | PRIMARY KEY (`idword`), 28 | KEY `word` (`word`,`language`), 29 | KEY `idbook` (`idbook`), 30 | CONSTRAINT `idbook` FOREIGN KEY (`idbook`) REFERENCES `book` (`idbook`) ON DELETE NO ACTION ON UPDATE NO ACTION 31 | ) ENGINE=InnoDB AUTO_INCREMENT=10153301 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; 32 | 33 | 34 | -- words.title definition 35 | 36 | CREATE TABLE `title` ( 37 | `idbook` int(11) NOT NULL, 38 | `language` varchar(100) DEFAULT NULL, 39 | `type` varchar(100) DEFAULT NULL, 40 | `nfc` int(11) DEFAULT 0, 41 | `title` varchar(512) DEFAULT NULL 42 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; 43 | 44 | 45 | -- words.person definition 46 | 47 | CREATE TABLE `person` ( 48 | `idbook` int(11) DEFAULT NULL, 49 | `key` varchar(512) DEFAULT NULL, 50 | `name` varchar(512) DEFAULT NULL, 51 | `viaf` varchar(100) DEFAULT NULL, 52 | `role` varchar(100) DEFAULT NULL, 53 | `dates` varchar(100) DEFAULT NULL 54 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; 55 | 56 | 57 | -- words.keyword definition 58 | 59 | CREATE TABLE `keyword` ( 60 | `idbook` int(11) DEFAULT NULL, 61 | `keyword` varchar(256) DEFAULT NULL 62 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; 63 | 64 | -------------------------------------------------------------------------------- /documentation/Processed/TEI-Guidelines.epub: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhellingman/tei2html/ee777385bab4b5381df6c83e4bc883f31527945e/documentation/Processed/TEI-Guidelines.epub -------------------------------------------------------------------------------- /documentation/Processed/images/reference250.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhellingman/tei2html/ee777385bab4b5381df6c83e4bc883f31527945e/documentation/Processed/images/reference250.jpg -------------------------------------------------------------------------------- /documentation/Processed/images/reference500.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhellingman/tei2html/ee777385bab4b5381df6c83e4bc883f31527945e/documentation/Processed/images/reference500.jpg -------------------------------------------------------------------------------- /documentation/TEI-Guidelines-0.6.tei: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhellingman/tei2html/ee777385bab4b5381df6c83e4bc883f31527945e/documentation/TEI-Guidelines-0.6.tei -------------------------------------------------------------------------------- /documentation/TEI-PG-Guidelines-0.6.odt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhellingman/tei2html/ee777385bab4b5381df6c83e4bc883f31527945e/documentation/TEI-PG-Guidelines-0.6.odt -------------------------------------------------------------------------------- /documentation/covers/cover250.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhellingman/tei2html/ee777385bab4b5381df6c83e4bc883f31527945e/documentation/covers/cover250.jpg -------------------------------------------------------------------------------- /documentation/covers/cover500.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhellingman/tei2html/ee777385bab4b5381df6c83e4bc883f31527945e/documentation/covers/cover500.jpg -------------------------------------------------------------------------------- /documentation/covers/frontispiece.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhellingman/tei2html/ee777385bab4b5381df6c83e4bc883f31527945e/documentation/covers/frontispiece.gif -------------------------------------------------------------------------------- /documentation/covers/reference250.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhellingman/tei2html/ee777385bab4b5381df6c83e4bc883f31527945e/documentation/covers/reference250.jpg -------------------------------------------------------------------------------- /documentation/covers/reference500.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhellingman/tei2html/ee777385bab4b5381df6c83e4bc883f31527945e/documentation/covers/reference500.jpg -------------------------------------------------------------------------------- /documentation/custom.css: -------------------------------------------------------------------------------- 1 | .code { 2 | margin-left: 2em; 3 | font-family: 'courier new', monospace; 4 | margin-top: 1em; 5 | margin-bottom: 1em; 6 | } -------------------------------------------------------------------------------- /documentation/imageinfo.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /dtd/README.md: -------------------------------------------------------------------------------- 1 | 2 | The DTD's for TEILite and one adjusted for some additional constructs `tei2html` uses. 3 | I intend to keep the non-standard modifications to TEILite as limited as possible, but 4 | I feel free to borrow as much as I like from the full TEI specification as serves the 5 | needs of the books I work on for Project Gutenberg. 6 | 7 | Yes, I know I should be using all the nice facilities of TEI to customize, but I was lazy... 8 | -------------------------------------------------------------------------------- /dtd/teilitex.dtd: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 11 | 14 | ]]> 15 | 16 | 17 | 19 | 21 | ]]> 22 | 23 | 24 | 26 | 27 | ]]> 28 | 29 | 30 | 32 | 34 | ]]> 35 | 36 | 37 | 39 | 41 | ]]> 42 | 43 | -------------------------------------------------------------------------------- /dtd/usrmods.dtd: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /dtd/usrmods.ent: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /dummy.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /locale/abbreviations.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | i.e.; I.e.; e.g.; E.g.; A.D.; B.C.; P.M.; A.M. 6 | d.i.; b.v.; o.a.; d.w.z. 7 | z.B.; d.h.; u.a.; u.s.w.; vgl.; ca.; usw.; bzw.; s.o.; s.u.; Dr.; Prof. 8 | 9 | -------------------------------------------------------------------------------- /locale/messages.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhellingman/tei2html/ee777385bab4b5381df6c83e4bc883f31527945e/locale/messages.xml -------------------------------------------------------------------------------- /locale/messages2po.pl: -------------------------------------------------------------------------------- 1 | use strict; 2 | use warnings; 3 | 4 | my $xsldir = "."; 5 | my $saxon2 = "java.exe -jar ../tools/lib/saxon9he.jar "; 6 | 7 | system ("$saxon2 messages.xml $xsldir/messages2po.xsl > messages.po"); 8 | system ("$saxon2 messages.xml $xsldir/messages2csv.xsl > messages.csv"); 9 | system ("$saxon2 messages.xml $xsldir/messages2xliff.xsl > messages.xlf"); 10 | system ("$saxon2 messages.xml $xsldir/messages2messages.xsl > messages-with-missing.xml"); -------------------------------------------------------------------------------- /locale/messages2xliff.xsl: -------------------------------------------------------------------------------- 1 | 6 | 7 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | { 42 | 43 | } 44 | 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /modules/plaintext.xsl: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 11 | Stylesheet to generate plain text. 12 | 2025, Jeroen Hellingman 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /modules/stripns.xsl: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | Stylesheet to remove the TEI namespace from a TEI-document. 10 | This stylesheet removes the TEI namespace from a TEI-document. This makes 11 | it possible to process TEI documents regardless of whether they are in the TEI 12 | namespace or not. 13 | Jeroen Hellingman 14 | 2016, Jeroen Hellingman 15 | 16 | 17 | 18 | 19 | Remove the TEI namespace from the top-level TEI element. 20 | When we detect we have a TEI document in the TEI namespace, we copy the entire document, while 21 | stripping the namespace, and process the result. This enables us to process both documents in the 22 | TEI namespace and in the default namespace with the same stylesheet. 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | -------------------------------------------------------------------------------- /pptools/broken-images.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl -w 2 | 3 | # 4 | # Test JPEG files in directories. 5 | # 6 | 7 | use strict; 8 | use warnings; 9 | use File::Basename; 10 | use Image::Magick; 11 | 12 | sub list_recursively($); 13 | 14 | sub list_recursively($) { 15 | my ($directory) = @_; 16 | my @files = ( ); 17 | 18 | unless (opendir(DIRECTORY, $directory)) { 19 | print "Cannot open directory $directory!\n"; 20 | exit; 21 | } 22 | 23 | # Read the directory, ignoring special entries "." and ".." 24 | @files = grep (!/^\.\.?$/, readdir(DIRECTORY)); 25 | 26 | closedir(DIRECTORY); 27 | 28 | foreach my $file (@files) { 29 | if (-f "$directory\\$file") { 30 | handle_file("$directory\\$file"); 31 | } elsif (-d "$directory\\$file") { 32 | list_recursively("$directory\\$file"); 33 | } 34 | } 35 | } 36 | 37 | 38 | sub handle_file($) { 39 | my ($file) = @_; 40 | if ($file =~ m/^(.*)\.(jpg|png|gif)$/) { 41 | my $image = new Image::Magick; 42 | my $error = $image->Read($file); 43 | if ($error) { 44 | print "BROKEN $file\n"; 45 | } else { 46 | print "OK $file\n"; 47 | } 48 | } 49 | } 50 | 51 | 52 | sub main() { 53 | ## initial call ... $ARGV[0] is the first command line argument 54 | my $file = $ARGV[0]; 55 | 56 | if (!defined $file) { 57 | $file = "."; 58 | } 59 | if (-d $file) { 60 | list_recursively($file); 61 | } else { 62 | handle_file($file); 63 | } 64 | } 65 | 66 | 67 | main(); 68 | -------------------------------------------------------------------------------- /pptools/catpars.pl: -------------------------------------------------------------------------------- 1 | # catpars.pl -- remove line-breaks in paragraphs. 2 | 3 | use strict; 4 | use warnings; 5 | 6 | my $infile = $ARGV[0]; 7 | open(INPUTFILE, $infile) || die("Could not open input file $infile"); 8 | 9 | my $mode = "normal"; # normal | concat 10 | my $lineCount = 0; 11 | 12 | while () { 13 | my $line = $_; 14 | $lineCount++; 15 | if ($mode eq "normal") { 16 | if ($line =~ /^(]*>.*<\/speaker> +)?(]*)>)?(]*)>)?]*)>/) { 17 | print stripNewline($line); 18 | warnForSuspects($line); 19 | $mode = "concat"; 20 | } else { 21 | print $line; 22 | } 23 | } elsif ($mode eq "concat") { 24 | 25 | warnForSuspects($line); 26 | 27 | if ($line =~ /^(]*)>)?]*)>/) { 28 | print "\n\n"; 29 | print stripNewline($line); 30 | } elsif ($line =~ /^\s$/) { 31 | $mode = "normal"; 32 | print "\n" . $line; 33 | } else { 34 | print stripNewline($line); 35 | } 36 | } 37 | } 38 | 39 | 40 | sub warnForSuspects { 41 | my $line = shift; 42 | if ($line =~ /<(table|list|figure)/) { 43 | my $suspectElement = $1; 44 | print STDERR "WARNING: paragraph contains $suspectElement element near line $lineCount.\n"; 45 | } 46 | } 47 | 48 | 49 | sub stripNewline { 50 | my $str = shift; 51 | $str =~ s/\n/ /g; 52 | return $str; 53 | } 54 | -------------------------------------------------------------------------------- /pptools/checkArchives.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl -w 2 | 3 | # 4 | # Check the consistency of archive files. 5 | # 6 | 7 | use strict; 8 | use warnings; 9 | use File::Basename; 10 | use File::Temp; 11 | 12 | my $zip = "zip"; 13 | my $sevenZip = "\"C:\\Program Files\\7-Zip\\7z\""; 14 | # $sevenZip = "7z"; 15 | 16 | my $logFile = "checkArchives.log"; 17 | 18 | main(); 19 | 20 | sub main { 21 | ## initial call ... $ARGV[0] is the first command line argument 22 | list_recursively($ARGV[0]); 23 | } 24 | 25 | sub list_recursively($); 26 | 27 | sub list_recursively($) { 28 | my ($directory) = @_; 29 | my @files = ( ); 30 | 31 | unless (opendir(DIRECTORY, $directory)) { 32 | logError("Cannot open directory $directory!"); 33 | exit; 34 | } 35 | 36 | # Read the directory, ignoring special entries "." and ".." 37 | @files = grep (!/^\.\.?$/, readdir(DIRECTORY)); 38 | 39 | closedir(DIRECTORY); 40 | 41 | foreach my $file (@files) { 42 | if (-f "$directory/$file") { 43 | handle_file("$directory/$file"); 44 | } elsif (-d "$directory/$file") { 45 | list_recursively("$directory/$file"); 46 | } 47 | } 48 | } 49 | 50 | 51 | sub handle_file($) { 52 | my ($file) = @_; 53 | 54 | if ($file =~ m/^(.*)\.(7z)$/) { 55 | system ("$sevenZip t \"$file\" 1>>$logFile"); 56 | } 57 | 58 | if ($file =~ m/^(.*)\.(zip)$/) { 59 | system ("$zip -T \"$file\" 1>>$logFile"); 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /pptools/corpus tools/collectWords.pl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhellingman/tei2html/ee777385bab4b5381df6c83e4bc883f31527945e/pptools/corpus tools/collectWords.pl -------------------------------------------------------------------------------- /pptools/corpus tools/dictionary-schema.sql: -------------------------------------------------------------------------------- 1 | if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[scannos]') and OBJECTPROPERTY(id, N'IsProcedure') = 1) 2 | drop procedure [dbo].[scannos] 3 | GO 4 | 5 | if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Dyads]') and OBJECTPROPERTY(id, N'IsUserTable') = 1) 6 | drop table [dbo].[Dyads] 7 | GO 8 | 9 | if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[NewWords]') and OBJECTPROPERTY(id, N'IsUserTable') = 1) 10 | drop table [dbo].[NewWords] 11 | GO 12 | 13 | if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[OldWords]') and OBJECTPROPERTY(id, N'IsUserTable') = 1) 14 | drop table [dbo].[OldWords] 15 | GO 16 | 17 | if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Words]') and OBJECTPROPERTY(id, N'IsUserTable') = 1) 18 | drop table [dbo].[Words] 19 | GO 20 | 21 | CREATE TABLE [dbo].[Dyads] ( 22 | [first] [varchar] (32) COLLATE SQL_Latin1_General_CP1_CS_AS NULL , 23 | [second] [varchar] (32) COLLATE SQL_Latin1_General_CP1_CS_AS NULL , 24 | [count] [int] NULL 25 | ) ON [PRIMARY] 26 | GO 27 | 28 | CREATE TABLE [dbo].[NewWords] ( 29 | [word] [nvarchar] (48) COLLATE SQL_Latin1_General_CP1_CS_AS NULL 30 | ) ON [PRIMARY] 31 | GO 32 | 33 | CREATE TABLE [dbo].[OldWords] ( 34 | [word] [varchar] (32) COLLATE SQL_Latin1_General_CP1_CS_AS NULL 35 | ) ON [PRIMARY] 36 | GO 37 | 38 | CREATE TABLE [dbo].[Words] ( 39 | [word] [nvarchar] (256) COLLATE SQL_Latin1_General_CP1_CS_AS NULL , 40 | [wordcount] [int] NULL , 41 | [documentcount] [int] NULL , 42 | [modernword] [nvarchar] (256) COLLATE SQL_Latin1_General_CP1_CS_AS NULL 43 | ) ON [PRIMARY] 44 | GO 45 | 46 | SET QUOTED_IDENTIFIER ON 47 | GO 48 | SET ANSI_NULLS ON 49 | GO 50 | 51 | CREATE PROC scannos @a char(4), @b char(4) 52 | AS 53 | select w1.word, w1.wordcount, w2.word, w2.wordcount 54 | from Words w1, Words w2 55 | where w1.modernword is not null and 56 | w2.modernword is not null and 57 | replace(w2.word, @a, @b) = replace(w1.word, @a, @b) and 58 | w1.word <> w2.word 59 | order by w1.wordcount DESC 60 | 61 | GO 62 | SET QUOTED_IDENTIFIER OFF 63 | GO 64 | SET ANSI_NULLS ON 65 | GO 66 | 67 | -------------------------------------------------------------------------------- /pptools/corpus tools/partsofspeech.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhellingman/tei2html/ee777385bab4b5381df6c83e4bc883f31527945e/pptools/corpus tools/partsofspeech.txt -------------------------------------------------------------------------------- /pptools/corpus tools/scannos.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhellingman/tei2html/ee777385bab4b5381df6c83e4bc883f31527945e/pptools/corpus tools/scannos.txt -------------------------------------------------------------------------------- /pptools/dictionaries/de.stopwords: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhellingman/tei2html/ee777385bab4b5381df6c83e4bc883f31527945e/pptools/dictionaries/de.stopwords -------------------------------------------------------------------------------- /pptools/dictionaries/dict-nl_1900.oxt/META-INF/manifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | -------------------------------------------------------------------------------- /pptools/dictionaries/dict-nl_1900.oxt/description.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Dutch spelling dictionary, following the old De Vries-Te Winkel orthography, as used between 1865 and 1947. 7 | Nederlandse spellingscontrole volgens de spelling De Vries-Te Winkel zoals die gebruikt werd tussen 1865 en 1947. 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /pptools/dictionaries/dict-nl_1900.oxt/dictionaries.xcu: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | %origin%/nl_NL_1900.aff %origin%/nl_NL_1900.dic 8 | 9 | 10 | DICT_SPELL 11 | 12 | 13 | nl-BE 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /pptools/dictionaries/dict-nl_1900.oxt/nl_NL_1900.aff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhellingman/tei2html/ee777385bab4b5381df6c83e4bc883f31527945e/pptools/dictionaries/dict-nl_1900.oxt/nl_NL_1900.aff -------------------------------------------------------------------------------- /pptools/dictionaries/dict-nl_1900.oxt/nl_NL_1900.dic: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhellingman/tei2html/ee777385bab4b5381df6c83e4bc883f31527945e/pptools/dictionaries/dict-nl_1900.oxt/nl_NL_1900.dic -------------------------------------------------------------------------------- /pptools/dictionaries/en.scannos: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhellingman/tei2html/ee777385bab4b5381df6c83e4bc883f31527945e/pptools/dictionaries/en.scannos -------------------------------------------------------------------------------- /pptools/dictionaries/en.stopwords: -------------------------------------------------------------------------------- 1 | a 2 | about 3 | an 4 | are 5 | as 6 | at 7 | be 8 | by 9 | for 10 | from 11 | how 12 | i 13 | in 14 | is 15 | it 16 | of 17 | on 18 | or 19 | that 20 | the 21 | this 22 | to 23 | was 24 | what 25 | when 26 | where 27 | who 28 | will 29 | with -------------------------------------------------------------------------------- /pptools/dictionaries/filter-frequency-report.pl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | while (<>) 5 | { 6 | chomp $_; 7 | $_ =~ /([0-9]+)\s+([0-9]+)\s+(.*?)\s+(.*)/; 8 | 9 | $wcount = $1; 10 | $dcount = $2; 11 | $oldword = $3; 12 | $newword = $4; 13 | 14 | if ($oldword ne $newword) 15 | { 16 | print "$oldword\t$newword\n"; 17 | } 18 | } -------------------------------------------------------------------------------- /pptools/dictionaries/nl.stopwords: -------------------------------------------------------------------------------- 1 | aan 2 | af 3 | al 4 | als 5 | bij 6 | dan 7 | dat 8 | die 9 | dit 10 | een 11 | en 12 | er 13 | had 14 | heb 15 | hem 16 | het 17 | hij 18 | hoe 19 | hun 20 | ik 21 | in 22 | is 23 | je 24 | kan 25 | me 26 | men 27 | met 28 | mij 29 | nog 30 | nu 31 | of 32 | ons 33 | ook 34 | te 35 | tot 36 | uit 37 | van 38 | was 39 | wat 40 | we 41 | wel 42 | wij 43 | zal 44 | ze 45 | zei 46 | zij 47 | zo 48 | zou -------------------------------------------------------------------------------- /pptools/dictionaries/nl_NL_1900_changes.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhellingman/tei2html/ee777385bab4b5381df6c83e4bc883f31527945e/pptools/dictionaries/nl_NL_1900_changes.txt -------------------------------------------------------------------------------- /pptools/dictionaries/nl_NL_1900_full.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhellingman/tei2html/ee777385bab4b5381df6c83e4bc883f31527945e/pptools/dictionaries/nl_NL_1900_full.txt -------------------------------------------------------------------------------- /pptools/divn2div.pl: -------------------------------------------------------------------------------- 1 | # divn2div.pl -- change from numbered to unnumbered TEI divs. 2 | 3 | use strict; 4 | use warnings; 5 | 6 | my $inputFile = $ARGV[0]; 7 | 8 | open(INPUTFILE, $inputFile) || die("Could not open $inputFile"); 9 | 10 | print STDERR "Handling $inputFile\n"; 11 | 12 | my $previousLevel = 0; 13 | 14 | while () { 15 | my $remainder = $_; 16 | 17 | if ($remainder =~ m/<(body|front|back)(.*?)>/i) { 18 | $previousLevel = 0; 19 | } 20 | 21 | while ($remainder =~ m//i) { 22 | my $before = $`; 23 | my $level = $1; 24 | my $attrs = $2; 25 | $remainder = $'; 26 | 27 | my $close = $previousLevel - $level; 28 | $previousLevel = $level; 29 | for ( ; $close >= 0; $close--) { 30 | print $before . ""; 31 | } 32 | print ""; 33 | } 34 | print $remainder; 35 | } 36 | -------------------------------------------------------------------------------- /pptools/extract-page.pl: -------------------------------------------------------------------------------- 1 | # extract-page.pl 2 | 3 | use strict; 4 | use warnings; 5 | use FindBin qw($Bin); 6 | 7 | my $saxon = "java -jar " . $Bin . "/lib/saxon9he.jar "; 8 | my $xsldir = $Bin . "/.."; # location of xsl stylesheets 9 | 10 | my $filename = $ARGV[0]; 11 | my $page = $ARGV[1]; 12 | 13 | if ($page eq '') { 14 | system ("$saxon \"$filename\" $xsldir/extract-page.xsl"); 15 | } else { 16 | system ("$saxon \"$filename\" $xsldir/extract-page.xsl n=\"$page\""); 17 | } 18 | -------------------------------------------------------------------------------- /pptools/extract-segs.pl: -------------------------------------------------------------------------------- 1 | # Perl run the extract-segs.xsl stylesheet on a directory with Saxon. 2 | 3 | use strict; 4 | use warnings; 5 | use FindBin qw($Bin); 6 | use File::Basename; 7 | 8 | my $saxon = "java -jar " . $Bin . "/lib/saxon9he.jar "; 9 | my $xsldir = $Bin . "/.."; # location of xsl stylesheets 10 | 11 | my $filename = $ARGV[0]; 12 | 13 | 14 | sub list_recursively($); 15 | 16 | sub list_recursively($) 17 | { 18 | my ($directory) = @_; 19 | my @files = ( ); 20 | 21 | print STDERR "Extracting directory $directory\n"; 22 | 23 | unless (opendir(DIRECTORY, $directory)) { 24 | print "Cannot open directory $directory!\n"; 25 | exit; 26 | } 27 | 28 | # Read the directory, ignoring special entries "." and ".." 29 | @files = grep (!/^\.\.?$/, readdir(DIRECTORY)); 30 | 31 | closedir(DIRECTORY); 32 | 33 | foreach my $file (@files) { 34 | if (-f "$directory\\$file") { 35 | handle_file("$directory\\$file"); 36 | } elsif (-d "$directory\\$file") { 37 | list_recursively("$directory\\$file"); 38 | } 39 | } 40 | } 41 | 42 | 43 | sub handle_file($) { 44 | my ($file) = @_; 45 | 46 | if ($file =~ m/^(.*)\.(xhtml)$/) { 47 | print STDERR "Extracting file $file\n"; 48 | 49 | my $path = $1; 50 | my $extension = $2; 51 | my $base = basename($file, '.' . $extension); 52 | my $dirname = dirname($file); 53 | 54 | my $tempFile = "tmp-segments.xml"; 55 | my $newFile = $dirname . '\\' . $base . '-segments.txt'; 56 | 57 | system ("perl -S stripDocType.pl $file > $tempFile"); 58 | system ("$saxon \"$tempFile\" $xsldir/extract-segs.xsl > $newFile"); 59 | } 60 | } 61 | 62 | 63 | sub main() { 64 | list_recursively($filename); 65 | } 66 | 67 | 68 | main(); 69 | -------------------------------------------------------------------------------- /pptools/fb2tei.pl: -------------------------------------------------------------------------------- 1 | # fb2tei.pl -- covert fictionbook to TEI. 2 | 3 | use strict; 4 | use warnings; 5 | use MIME::Base64; 6 | use FindBin qw($Bin); 7 | 8 | my $toolsdir = $Bin; # location of tools 9 | my $xsldir = $toolsdir . "/.."; # location of xsl stylesheets 10 | my $saxon = "java -jar " . $toolsdir . "/lib/saxon9he.jar "; 11 | 12 | my $filename = $ARGV[0]; 13 | $filename =~ /^(.*)\.fb2$/; 14 | my $basename = $1; 15 | 16 | system ("$saxon $filename $xsldir/fb2tei.xsl > $basename.xml"); 17 | 18 | # convert extracted .hex files to binary 19 | my @files = <*.hex>; 20 | foreach my $file (@files) { 21 | convertFile($file); 22 | } 23 | 24 | system ("perl -S tei2html.pl -h $basename.xml"); 25 | 26 | sub convertFile($) { 27 | my $filename = shift; 28 | 29 | open INFILE, $filename or die "Unable to open file: $filename"; 30 | my $string = join("", ); 31 | close INFILE; 32 | my $binary = decode_base64($string); 33 | 34 | $filename =~ /^(.*)\.hex$/; 35 | my $outputFilename = $1; 36 | 37 | open(OUTFILE, '>:raw', $outputFilename) or die "Unable to open: $outputFilename"; 38 | print OUTFILE $binary ; 39 | close(OUTFILE); 40 | } 41 | -------------------------------------------------------------------------------- /pptools/fixAnchors.pl: -------------------------------------------------------------------------------- 1 | # 2 | # fixAnchors.pl -- provide anchors with sequential numbers per page in TEI tagged files 3 | # 4 | 5 | use strict; 6 | use warnings; 7 | 8 | use Roman; # Roman.pm version 1.1 by OZAWA Sakuro 9 | use SgmlSupport qw/getAttrVal/; 10 | 11 | my $inputFile = $ARGV[0]; 12 | my $currentPage = 0; 13 | my $currentAnchor = 1; 14 | my $prefix = "a"; 15 | 16 | 17 | open(INPUTFILE, $inputFile) || die("Could not open $inputFile"); 18 | 19 | print STDERR "Fixing anchors in $inputFile\n"; 20 | 21 | while () { 22 | my $line = $_; 23 | my $remainder = $line; 24 | while ($remainder =~ m//) { 25 | my $before = $`; 26 | my $attrs = $1; 27 | $remainder = $'; 28 | handleAnchors($before); 29 | print ""; 30 | $currentAnchor = 1; 31 | $currentPage = getAttrVal('n', $attrs); 32 | $currentPage = isroman($currentPage) ? arabic($currentPage) : $currentPage; 33 | } 34 | handleAnchors($remainder); 35 | } 36 | 37 | 38 | sub handleAnchors($) { 39 | my $remainder = shift; 40 | while ($remainder =~ m//) { 41 | my $before = $`; 42 | my $attrs = $1; 43 | $remainder = $'; 44 | print $before; 45 | print ""; 46 | if ($remainder =~ m/([0-9]+)<\/ab>/) { 47 | my $lineNum = $1; 48 | if ($lineNum != $currentAnchor) { 49 | print STDERR "WARNING: anchor at $currentPage.$currentAnchor doesn't match lineNum: $lineNum\n"; 50 | } 51 | } 52 | $currentAnchor++; 53 | } 54 | print $remainder; 55 | } 56 | -------------------------------------------------------------------------------- /pptools/fixNotes.pl: -------------------------------------------------------------------------------- 1 | # fixNotes.pl -- fix (renumber) notes in text files 2 | 3 | use strict; 4 | use warnings; 5 | my $inputFile = $ARGV[0]; 6 | my $firstNoteNumber = $ARGV[1]; 7 | 8 | open(INPUTFILE, $inputFile) || die("Could not open $inputFile"); 9 | 10 | print STDERR "Verifying and renumbering notes in $inputFile\n"; 11 | 12 | my $nPreviousNoteNumber = 0; 13 | my $nNewNoteNumber = $firstNoteNumber; 14 | 15 | while () { 16 | my $line = $_; 17 | my $remainder = $line; 18 | while ($remainder =~ m/\[([0-9]*)\]/) { 19 | my $before = $`; 20 | my $nOriginalNoteNumber = $1; 21 | $remainder = $'; 22 | 23 | print STDERR "Seen [$nOriginalNoteNumber]\n"; 24 | 25 | if ($nOriginalNoteNumber != $nPreviousNoteNumber + 1) { 26 | if ($nOriginalNoteNumber == 1) { 27 | print STDERR "Restarting new note count with $firstNoteNumber (notes section reached)\n"; 28 | $nNewNoteNumber = $firstNoteNumber; 29 | } else { 30 | print STDERR "Note numbers not in order: $nOriginalNoteNumber follows $nPreviousNoteNumber\n"; 31 | } 32 | } 33 | $nPreviousNoteNumber = $nOriginalNoteNumber; 34 | 35 | print $before . "[" . $nNewNoteNumber . "]"; 36 | 37 | $nNewNoteNumber++; 38 | } 39 | print $remainder; 40 | } 41 | -------------------------------------------------------------------------------- /pptools/handleFootnotes.pl: -------------------------------------------------------------------------------- 1 | # handleFootnotes.pl 2 | 3 | use strict; 4 | use warnings; 5 | use Data::Dumper; 6 | use SgmlSupport qw/getAttrVal/; 7 | 8 | main(); 9 | 10 | my $pageNumber = 0; 11 | 12 | sub main { 13 | 14 | my $page = ''; 15 | 16 | while (<>) { 17 | my $line = $_; 18 | $page .= $line; 19 | if ($line =~ //) { 20 | $pageNumber = getAttrVal('n', $1); 21 | handlePage($page); 22 | $page = ''; 23 | } 24 | } 25 | handlePage($page); 26 | } 27 | 28 | 29 | sub handlePage { 30 | my $page = shift; 31 | my @matches = $page =~ /\[Footnote ([0-9]+|[A-Z]): (.*?)\]\n/smg; 32 | 33 | my $iterator = natatime(2, @matches); 34 | while (my @footnote = $iterator->()) { 35 | 36 | my $number = $footnote[0]; 37 | my $note = $footnote[1]; 38 | 39 | # print "[Footnote: $number: $note]\n"; 40 | 41 | $page = moveNoteInline($page, $number, $note); 42 | } 43 | 44 | print $page; 45 | } 46 | 47 | 48 | sub moveNoteInline { 49 | my $page = shift; 50 | my $number = shift; 51 | my $note = shift; 52 | 53 | if ($page =~ /<\/note>/) { 54 | $page =~ s/<\/note>/$note<\/note>/; 55 | 56 | $page =~ s/\[Footnote $number: (.*?)\]\n/\n/smg 57 | 58 | } else { 59 | print STDERR "Note $number not found on page $pageNumber.\n"; 60 | } 61 | 62 | return $page; 63 | } 64 | 65 | 66 | sub natatime { 67 | my $n = shift; 68 | my @list = @_; 69 | 70 | return sub { 71 | return splice @list, 0, $n; 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /pptools/html2tei.pl: -------------------------------------------------------------------------------- 1 | # Perl script to test the the html2tei.xsl stylesheet with Saxon. 2 | 3 | use strict; 4 | use warnings; 5 | use File::Temp qw(mktemp); 6 | use FindBin qw($Bin); 7 | 8 | my $toolsdir = $Bin; 9 | my $xsldir = $toolsdir; 10 | my $saxon = "java -jar " . $toolsdir . "/lib/saxon9he.jar "; 11 | 12 | my $filename = $ARGV[0]; 13 | 14 | my $tmpFile1 = mktemp('tmp-XXXXX'); 15 | my $tmpFile2 = mktemp('tmp-XXXXX'); 16 | 17 | system ("tidy -asxhtml -clean --doctype omit \"$filename\" > $tmpFile1"); 18 | system ("sed \"s/\\&/|xxxx|/g\" < $tmpFile1 > $tmpFile2"); 19 | system ("$saxon $tmpFile2 \"$xsldir/../sandbox/html2tei.xsl\" > $tmpFile1"); 20 | system ("sed \"s/|xxxx|/\\&/g\" < $tmpFile1 > out.xml"); 21 | 22 | unlink($tmpFile2); 23 | unlink($tmpFile1); 24 | -------------------------------------------------------------------------------- /pptools/idnotes.pl: -------------------------------------------------------------------------------- 1 | # idNotes.pl -- give footnotes ids based on de page and number they have 2 | 3 | use strict; 4 | use warnings; 5 | use SgmlSupport qw/getAttrVal/; 6 | 7 | my $inputFile = $ARGV[0]; 8 | my $pageNumber = 0; 9 | my $appNoteNumber = 0; 10 | 11 | open(INPUTFILE, $inputFile) || die("Could not open $inputFile"); 12 | 13 | print STDERR "Adding ids to footnotes in $inputFile\n"; 14 | 15 | while () { 16 | my $remainder = $_; 17 | while ($remainder =~ m/()/) { 18 | my $before = $`; 19 | my $pbTag = $1; 20 | my $pbAttrs = $2; 21 | $remainder = $'; 22 | 23 | idNotes($before, $pageNumber); 24 | $appNoteNumber = 0; 25 | $pageNumber = getAttrVal('n', $pbAttrs); 26 | print $pbTag; 27 | } 28 | idNotes($remainder, $pageNumber); 29 | } 30 | 31 | sub idNotes($$) { 32 | my $remainder = shift; 33 | my $pageNumber = shift; 34 | 35 | while ($remainder =~ m/()/) { 36 | my $before = $`; 37 | my $noteTag = $1; 38 | my $noteAttrs = $2; 39 | $remainder = $'; 40 | 41 | my $spacer = ""; 42 | 43 | my $noteNumber = getAttrVal('n', $noteAttrs); 44 | my $notePlace = getAttrVal('place', $noteAttrs); 45 | my $noteId = getAttrVal('id', $noteAttrs); 46 | my $noteLang = getAttrVal('lang', $noteAttrs); 47 | my $noteSameAs = getAttrVal('sameAs', $noteAttrs); 48 | my $noteLangAttr = $noteLang ne '' ? " lang=\"$noteLang\"" : ''; 49 | my $noteSameAsAttr = $noteSameAs ne '' ? " sameAs=$noteSameAs" : ''; 50 | my $newNoteTag = $noteTag; 51 | if ($pageNumber =~ m/[clxvi]+/) { 52 | $spacer = "."; 53 | } else { 54 | $spacer = ""; 55 | } 56 | if ($noteNumber =~ m/([0-9]+|[A-Z])/ and $noteId eq '' and ($notePlace eq '' or $notePlace eq 'foot')) { 57 | $newNoteTag = ""; 58 | } 59 | if ($noteId eq '' and $notePlace eq 'apparatus') { 60 | $appNoteNumber++; 61 | $newNoteTag = ""; 62 | } 63 | 64 | print STDERR "$noteTag -> $newNoteTag\n"; 65 | print $before; 66 | print $newNoteTag; 67 | } 68 | print $remainder; 69 | } 70 | -------------------------------------------------------------------------------- /pptools/lower-sc.pl: -------------------------------------------------------------------------------- 1 | # lower-sc.pl -- make words between ... lowercase; 2 | 3 | use warnings; 4 | use strict; 5 | use Encode qw(encode decode); 6 | 7 | my $encoding = 'latin-1'; 8 | 9 | my $infile = $ARGV[0]; 10 | open(INPUTFILE, $infile) || die("Could not open input file $infile"); 11 | 12 | while () { 13 | my $remainder = $_; 14 | while ($remainder =~ /(.*?)<\/sc>/) { 15 | print $`; 16 | $remainder = $'; 17 | my $smallCaps = decode($encoding, $1); 18 | print "" . lc($smallCaps) . ""; 19 | } 20 | print $remainder; 21 | } 22 | -------------------------------------------------------------------------------- /pptools/numberDiv2s.pl: -------------------------------------------------------------------------------- 1 | # numberDiv2s.pl -- number the div2 elements in a document. 2 | # 3 | # 1. numbers get the form n=. 4 | # 2. chapter number derived from n attribute of 5 | 6 | use strict; 7 | use warnings; 8 | use Roman; # Roman.pm version 1.1 by OZAWA Sakuro 9 | use SgmlSupport qw/getAttrVal/; 10 | 11 | my $inputFile = $ARGV[0]; 12 | 13 | my $div1Number = 0; 14 | my $div2Number = 0; 15 | 16 | open(INPUTFILE, $inputFile) || die("Could not open $inputFile"); 17 | 18 | while () { 19 | my $line = $_; 20 | 21 | if ($line =~ //) { 22 | my $attrs = $1; 23 | my $newDivNumber = getAttrVal('n', $attrs); 24 | if ($newDivNumber ne '') { 25 | $newDivNumber = isroman($newDivNumber) ? arabic($newDivNumber) : $newDivNumber; 26 | } else { 27 | $newDivNumber = getAttrVal('id', $attrs); 28 | } 29 | 30 | $div1Number = $newDivNumber ne '' ? $newDivNumber : $div1Number++; 31 | 32 | $div2Number = 0; 33 | print STDERR "DIV1:$div1Number\n"; 34 | } 35 | 36 | my $remainder = $line; 37 | 38 | while ($remainder =~ m//) { 39 | my $before = $`; 40 | my $attrs = $1; 41 | $remainder = $'; 42 | $div2Number++; 43 | 44 | my $currentNumber = getAttrVal('n', $attrs); 45 | if ($currentNumber eq '') { 46 | $currentNumber = ($div1Number ne '' && $div1Number ne '0') ? "$div1Number.$div2Number" : $div2Number; 47 | $attrs = $attrs . " id=$currentNumber"; 48 | } 49 | print STDERR "DIV2:$currentNumber\n"; 50 | print "$before"; 51 | } 52 | print $remainder; 53 | } 54 | -------------------------------------------------------------------------------- /pptools/numberLines.pl: -------------------------------------------------------------------------------- 1 | # numberLines.pl -- number lines of verse in a document. 2 | # 3 | # Numbers get the form id=v 4 | # 5 | # Uses special comments to indicate the start and end of lines to be numbered. 6 | # 7 | # 8 | # 9 | 10 | 11 | use strict; 12 | use warnings; 13 | use SgmlSupport qw/getAttrVal/; 14 | 15 | my $inputFile = $ARGV[0]; 16 | 17 | my $idPrefix = 'v'; 18 | my $lineNumber = 0; 19 | my $addLineNumbers = 0; 20 | 21 | open(INPUTFILE, $inputFile) || die("Could not open $inputFile"); 22 | 23 | while () { 24 | my $line = $_; 25 | 26 | if ($line =~ //) { 27 | $addLineNumbers = 1; 28 | } 29 | 30 | if ($line =~ //) { 31 | $addLineNumbers = 0; 32 | } 33 | 34 | if ($line =~ /([0-9]+).*<\/ab>/) { 35 | $lineNumber = $1; 36 | } 37 | 38 | if ($addLineNumbers == 1) { 39 | if ($line =~ //) { 40 | my $before = $`; 41 | my $attrs = $1; 42 | my $after = $'; 43 | 44 | print "$before$after"; 45 | $lineNumber++; 46 | } else { 47 | print $line; 48 | } 49 | } else { 50 | print $line; 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /pptools/numberParagraphs.pl: -------------------------------------------------------------------------------- 1 | # numberParagraphs.pl -- number the paragraphs in a document. 2 | # 3 | # 1. numbers get the form n=. 4 | # 2. chapter number derived from n attribute of 5 | 6 | use strict; 7 | use warnings; 8 | use Roman; # Roman.pm version 1.1 by OZAWA Sakuro 9 | use SgmlSupport qw/getAttrVal/; 10 | 11 | my $inputFile = $ARGV[0]; 12 | 13 | my $divNumber = 0; 14 | my $parNumber = 0; 15 | 16 | open(INPUTFILE, $inputFile) || die("Could not open $inputFile"); 17 | 18 | while () { 19 | my $line = $_; 20 | 21 | if ($line =~ //) { 22 | my $attrs = $1; 23 | my $newDivNumber = getAttrVal('n', $attrs); 24 | if ($newDivNumber ne '') { 25 | $newDivNumber = isroman($newDivNumber) ? arabic($newDivNumber) : $newDivNumber; 26 | } else { 27 | $newDivNumber = getAttrVal('id', $attrs); 28 | if ($newDivNumber ne '') { 29 | $newDivNumber = substr($newDivNumber, 0, 1); 30 | } 31 | } 32 | 33 | $divNumber = $newDivNumber ne '' ? $newDivNumber : $divNumber++; 34 | 35 | $parNumber = 0; 36 | # print STDERR "DIV1:$divNumber; "; 37 | } 38 | 39 | my $remainder = $line; 40 | 41 | while ($remainder =~ m//) { 42 | my $before = $`; 43 | my $attrs = $1; 44 | $remainder = $'; 45 | $parNumber++; 46 | 47 | my $currentNumber = getAttrVal('n', $attrs); 48 | if ($currentNumber eq '') { 49 | $currentNumber = ($divNumber ne '' && $divNumber ne '0') ? "$divNumber.$parNumber" : $parNumber; 50 | $attrs = $attrs . " n=$currentNumber"; 51 | } 52 | # print STDERR "P:$currentNumber; "; 53 | print "$before"; 54 | } 55 | print $remainder; 56 | } 57 | -------------------------------------------------------------------------------- /pptools/old/aposquote-test.txt: -------------------------------------------------------------------------------- 1 |

'Dit is,' zei de oude man, 'een goede test van software die 2 | enkele aanhalingstekens kan kiezen.' 3 | 4 |

'Wat zei je?' vroeg de vrouw, die sinds '68 al d'r aanhalingstekens 5 | door de war gooide. 'Is dat werkelijk zo?' 6 | 7 |

'Jazeker, mevrouw, 'k heb het met je te doen!' 8 | 9 |

Test ('test') Test! 10 | 11 |

Test 'test' Test! 12 | 13 |

Test 'test' Test! 14 | 15 |

'Het is maar liefst 20' breed.' 16 | 17 |

'hij zei'—'hij zegt.' 18 | 19 | -------------------------------------------------------------------------------- /pptools/old/aposquote.pl: -------------------------------------------------------------------------------- 1 | # aposquote.pl -- script to disambiguate single quotation marks, 2 | 3 | use strict; 4 | 5 | my $inputFile = $ARGV[0]; 6 | 7 | open(INPUTFILE, $inputFile) || die("Could not open $inputFile"); 8 | 9 | print STDERR "Handling $inputFile\n"; 10 | 11 | while () { 12 | my $line = $_; 13 | $line = disambiguateQuotes($line); 14 | print $line; 15 | } 16 | 17 | 18 | sub disambiguateQuotes($) { 19 | my $line = shift; 20 | 21 | # After interpunction is most likely a close-quote: 22 | $line =~ s/([.,:;?!])'(\s+)/\1\’\2/gi; # following spaces 23 | $line =~ s/([.,:;?!])'(<)/\1\’\2/gi; # following tag 24 | 25 | # [Dutch Articles] before stand-alone t, s, k, or n is most likely apostrophe: 26 | $line =~ s/(\s+)'([tskn] )/\1\'\2/gi; 27 | 28 | # [Abbreviated Years] Before exactly two digits is most likely an apostrophe: 29 | $line =~ s/'([0-9][0-9][^0-9])/\'\1/gi; 30 | 31 | # [Feet or Minutes] after digits is most likely a prime: 32 | $line =~ s/([0-9])'(\s+)/\1\′\2/gi; 33 | 34 | # But if there is a space it is most likely an open-quote: 35 | $line =~ s/([.,:;?!]\s+)'([a-z])/\1\‘\2/gi; 36 | 37 | # After open brace is most likely open-quote: 38 | $line =~ s/([({])'/\1\‘/gi; 39 | 40 | # Before close brace is most likely close-quote: 41 | $line =~ s/'([})])/\’\1/gi; 42 | 43 | # Around em-dash: 44 | $line =~ s/(—)'/\1\‘/gi; 45 | $line =~ s/'(—)/\’\1/gi; 46 | 47 | # Between letters is most likely apostrophe: 48 | $line =~ s/([a-z])'([a-z])/\1\'\2/gi; 49 | 50 | # After space is most likely open-quote: 51 | $line =~ s/(\s+)'([a-z])/\1\‘\2/gi; 52 | 53 | # After

- or -tag is most likely open-quote: 54 | $line =~ s/(<[pl]>)'([a-z])/\1\‘\2/gi; 55 | 56 | # Arround ... markup: 57 | $line =~ s/( )'([a-z])/\1\‘\2/gi; 58 | $line =~ s/( )'([a-z])/\1\‘\2/gi; 59 | 60 | $line =~ s/([a-z]<\/hi>)'( )/\1\’\2/gi; 61 | $line =~ s/([a-z])'(<\/hi> )/\1\’\2/gi; 62 | 63 | return $line; 64 | } 65 | -------------------------------------------------------------------------------- /pptools/old/collectWords.pl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhellingman/tei2html/ee777385bab4b5381df6c83e4bc883f31527945e/pptools/old/collectWords.pl -------------------------------------------------------------------------------- /pptools/old/dirwin2utf8.pl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhellingman/tei2html/ee777385bab4b5381df6c83e4bc883f31527945e/pptools/old/dirwin2utf8.pl -------------------------------------------------------------------------------- /pptools/old/ent2win.pl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhellingman/tei2html/ee777385bab4b5381df6c83e4bc883f31527945e/pptools/old/ent2win.pl -------------------------------------------------------------------------------- /pptools/old/g4.pl: -------------------------------------------------------------------------------- 1 | # g4.pl 2 | 3 | $directory = $ARGV[0]; 4 | 5 | opendir(DIR,$directory); 6 | @files = readdir(DIR); 7 | close(DIR); 8 | 9 | foreach $file (@files) 10 | { 11 | if($file =~ /\.tif$/i) 12 | { 13 | $infile = $file; 14 | system ("copy \"$file\" \"$file.bak\""); 15 | system ("copy \"$file\" tmp.tif"); 16 | system ("tiffcp -c g4 tmp.tif \"$file\""); 17 | } 18 | } -------------------------------------------------------------------------------- /pptools/old/linkdex-test.tei: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Test text for index check 7 | 8 |

De Aap en de noot. 9 | 10 | 11 | 12 |

Mies en Teun lopen door het dorp met een zak noten. 13 | 14 | 15 | 16 |

Mies en Teun zien daar een aap. 17 | 18 | 19 | 20 |

De aap pakt een noot van Mies. 21 | 22 | 23 | 24 |

De aap eet een noot. NOOT. Noot. 25 | 26 | 27 | 28 |

Wat zegt de Aap? Hij zegt "Ik wil nog een NOOT!" 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | Index 38 | 39 | 40 | 41 |

Aap, 3, 22, 23, 24, 81. 42 | 43 |

Noot, xvi, 23 noot, 24. 44 | 45 |

Mies, 3, 18, 22. 46 | 47 |

Teun, een boerenknecht, 3, 18, 22. 48 | 49 | 50 | 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /pptools/old/modernizeer.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhellingman/tei2html/ee777385bab4b5381df6c83e4bc883f31527945e/pptools/old/modernizeer.txt -------------------------------------------------------------------------------- /pptools/old/normalize.pl: -------------------------------------------------------------------------------- 1 | # tei2xml.pl -- process a TEI file. 2 | 3 | $toolsdir = "L:\\eLibrary\\tools\\tei2html\\tools"; # location of tools 4 | $patcdir = "L:\\eLibrary\\tools\\tei2html\\tools\\patc\\transcriptions"; # location of patc transcription files. 5 | $xsldir = "L:\\eLibrary\\tools\\tei2html"; # location of xsl stylesheets 6 | $tmpdir = "C:\\Temp"; # place to drop temporary files 7 | $catalog = "C:\\Bin\\pubtext\\CATALOG"; # location of SGML catalog (required for nsgmls and sx) 8 | 9 | #============================================================================== 10 | 11 | $filename = $ARGV[0]; 12 | 13 | if ($filename eq "") 14 | { 15 | my ($directory) = "."; 16 | my @files = ( ); 17 | opendir(DIRECTORY, $directory) or die "Cannot open directory $directory!\n"; 18 | @files = readdir(DIRECTORY); 19 | closedir(DIRECTORY); 20 | 21 | foreach my $file (@files) 22 | { 23 | if ($file =~ /^([A-Za-z0-9-]*?)(-([0-9]+\.[0-9]+))?\.tei$/) 24 | { 25 | processFile($file); 26 | exit; 27 | } 28 | } 29 | } 30 | else 31 | { 32 | processFile($filename); 33 | } 34 | 35 | 36 | sub processFile 37 | { 38 | my $filename = shift; 39 | 40 | if ($filename eq "" || $filename !~ /\.html?$/) 41 | { 42 | die "File: '$filename' is not a .HTML file\n"; 43 | } 44 | 45 | print "Create text version...\n"; 46 | system ("perl $toolsdir/normalizeText.pl $filename > tmp.1"); 47 | system ("perl $toolsdir/catpars.pl tmp.1 > tmp.2"); 48 | system ("perl $toolsdir/tei2txt.pl tmp.2 > tmp.3"); 49 | system ("fmt -sw72 tmp.3 > out.txt"); 50 | 51 | print "Clean up..."; 52 | system ("rm tmp.?"); 53 | print "Done!\n"; 54 | } 55 | -------------------------------------------------------------------------------- /pptools/old/resolveIndex.pl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | # load index into array 5 | 6 | # load pages into array, indexed with actual page numbers pb@n attributed. 7 | 8 | 9 | 10 | sub applyEntry 11 | { 12 | my $entry = shift; 13 | my $pageNumber = shift; 14 | 15 | my $pageContent = $page[$pageNumber]; 16 | 17 | # search for entry 18 | 19 | if (contains($pageContent, $entry)) 20 | { 21 | my $entryId = createEntryId($entry); 22 | 23 | $page[$pageNumber] = insertEntry($pageContent, $entry); 24 | } 25 | else 26 | { 27 | print STDERR "ERROR: Entry '$entry' not found on page $pageNumber\n"; 28 | } 29 | } 30 | 31 | 32 | sub contains 33 | { 34 | my $entry = shift; 35 | my $text = shift; 36 | 37 | 38 | 39 | 40 | } -------------------------------------------------------------------------------- /pptools/old/uckwic.pl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhellingman/tei2html/ee777385bab4b5381df6c83e4bc883f31527945e/pptools/old/uckwic.pl -------------------------------------------------------------------------------- /pptools/old/win2utf8.pl: -------------------------------------------------------------------------------- 1 | # win2utf8.pl -- convert a windows cp1252 encoded file to Unicode. 2 | 3 | use utf8; 4 | 5 | binmode(STDOUT, ":utf8"); 6 | 7 | $infile = $ARGV[0]; 8 | open (INPUTFILE, $infile) || die("Could not open input file $infile"); 9 | binmode(INPUTFILE, ":encoding(cp1252)"); 10 | 11 | while () { 12 | print; 13 | } 14 | 15 | close INPUTFILE; 16 | -------------------------------------------------------------------------------- /pptools/pgprepare.pl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhellingman/tei2html/ee777385bab4b5381df6c83e4bc883f31527945e/pptools/pgprepare.pl -------------------------------------------------------------------------------- /pptools/quotes.pl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhellingman/tei2html/ee777385bab4b5381df6c83e4bc883f31527945e/pptools/quotes.pl -------------------------------------------------------------------------------- /pptools/smallcaps.pl: -------------------------------------------------------------------------------- 1 | # smallcaps.pl -- tag words in all uppercase with ... 2 | 3 | use strict; 4 | use warnings; 5 | 6 | # Handle Arguments 7 | 8 | my $infile = $ARGV[0]; 9 | open(INPUTFILE, $infile) || die("Could not open input file $infile"); 10 | 11 | # Set variables 12 | 13 | my $accLetter = "(\\&[A-Za-z](acute|grave|circ|uml|cedil|tilde|slash|ring|dotb|macr|breve);)"; 14 | my $ligLetter = "(\\&[A-Za-z]{2}lig;)"; 15 | my $specLetter = "(\\'|\\ð|\\Ð|\\þ|\\Þ|\\&alif;|\\&ayn;|\\′)"; 16 | my $letter = "(\\w|$accLetter|$ligLetter|$specLetter)"; 17 | my $wordPattern = "($letter)+(([-']|’|')($letter)+)*"; 18 | my $nonLetter = "\\&(amp|ldquo|rdquo|lsquo|mdash|hellips|gt|lt|frac[0-9][0-9]);"; 19 | 20 | my $UCaccLetter = "(\\&[A-Z](acute|grave|circ|uml|cedil|tilde|slash|ring|dotb|macr|breve);)"; 21 | my $UCligLetter = "(\\&[A-Z]{2}lig;)"; 22 | my $UCspecLetter = "(\\'|\\Ð|\\Þ|\\&alif;|\\&ayn;|\\′)"; 23 | my $UCletter = "([A-Z]|$UCaccLetter|$UCligLetter|$UCspecLetter)"; 24 | my $UCwordPattern = "\\b($UCletter)+(([-']|’|')($UCletter)+)*\\b"; 25 | 26 | 27 | while () { 28 | my $remainder = $_; 29 | while ($remainder =~ /($UCwordPattern)/) { 30 | print $`; 31 | $remainder = $'; 32 | my $word = $&; 33 | if (length($word) > 1) { 34 | if ($word =~ /^[IVXLCDM]+$/) { 35 | print $word; 36 | } else { 37 | print "" . ucfirst(lc($word)) . ""; 38 | } 39 | } else { 40 | print $word; 41 | } 42 | } 43 | print $remainder; 44 | } 45 | -------------------------------------------------------------------------------- /pptools/speaker-uc.pl: -------------------------------------------------------------------------------- 1 | # speaker-uc.pl -- script to make heads and speakers in drama uppercase. 2 | 3 | use strict; 4 | use warnings; 5 | 6 | my $inputFile = $ARGV[0]; 7 | 8 | open(INPUTFILE, $inputFile) || die("Could not open $inputFile"); 9 | 10 | print STDERR "Handling $inputFile\n"; 11 | 12 | while () { 13 | my $line = $_; 14 | $line = speakerUpperCase($line); 15 | $line = headUpperCase($line); 16 | print $line; 17 | } 18 | 19 | sub speakerUpperCase($) { 20 | my $remainder = shift; 21 | my $result = ""; 22 | while ($remainder =~ /(.*?<\/speaker>)/) { 23 | $result .= $`; 24 | $result .= upperCaseTextContent($1); 25 | $remainder = $'; 26 | } 27 | $result .= $remainder; 28 | return $result; 29 | } 30 | 31 | sub headUpperCase($) { 32 | my $remainder = shift; 33 | my $result = ""; 34 | while ($remainder =~ /(.*?<\/head>)/) { 35 | $result .= $`; 36 | $result .= upperCaseTextContent($1); 37 | $remainder = $'; 38 | } 39 | $result .= $remainder; 40 | return $result; 41 | } 42 | 43 | sub upperCaseTextContent() { 44 | my $remainder = shift; 45 | my $result = ""; 46 | while ($remainder =~ /(<.*?>)/) { 47 | $result .= uc($`); 48 | $result .= $1; 49 | $remainder = $'; 50 | } 51 | $result .= uc($remainder); 52 | 53 | $result =~ s/\&IJLIG;/\IJ/g; 54 | $result =~ s/\&APOS;/\'/g; 55 | 56 | return $result; 57 | } 58 | -------------------------------------------------------------------------------- /pptools/tagMeasures.pl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhellingman/tei2html/ee777385bab4b5381df6c83e4bc883f31527945e/pptools/tagMeasures.pl -------------------------------------------------------------------------------- /pptools/tagPoetry.pl: -------------------------------------------------------------------------------- 1 | # poetry.pl 2 | 3 | use strict; 4 | use warnings; 5 | 6 | my $poetryMode = 0; 7 | 8 | my $lineNumber = 0; 9 | 10 | while (<>) { 11 | my $line = $_; 12 | $lineNumber++; 13 | 14 | if ($line =~ /\/\*/) { 15 | if ($poetryMode == 1) { 16 | print STDERR "WARNING: entering poetry mode again on line $lineNumber!\n" 17 | } 18 | $poetryMode = 1; 19 | print "\n"; 20 | } elsif ($line =~ /\*\//) { 21 | if ($poetryMode == 0) { 22 | print STDERR "WARNING: leaving poetry mode again on line $lineNumber!\n" 23 | } 24 | $poetryMode = 0; 25 | print "\n"; 26 | } elsif ($poetryMode == 0) { 27 | if ($line =~ /\*\//) { 28 | print STDERR "WARNING: */ outside poetry mode at line $lineNumber!\n" 29 | } 30 | print $line; 31 | } else { 32 | if ($line =~ /

/) { 33 | print STDERR "WARNING:

in poetry mode at line $lineNumber!\n" 34 | } 35 | if ($line =~ /\*\//) { 36 | print STDERR "WARNING: /* in poetry mode at line $lineNumber!\n" 37 | } 38 | # blank line in poetry mode: 39 | if ($line =~ /^\s*$/) { 40 | print "\n\n\n"; 41 | } else { 42 | # count white space before 43 | $line =~ /^(\s*)(.*)$/; 44 | my $spaces = $1; 45 | $line = $2; 46 | my $n = length($spaces); 47 | if ($n == 0) { 48 | print " $line\n"; 49 | } else { 50 | print " $spaces$line\n"; 51 | } 52 | } 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /pptools/utf82ent.pl: -------------------------------------------------------------------------------- 1 | # utf82ent.pl -- convert a UTF8-encoded file to HTML entities. 2 | 3 | use utf8; 4 | use HTML::Entities; 5 | 6 | binmode(STDOUT, ":utf8"); 7 | 8 | $infile = $ARGV[0]; 9 | open (INPUTFILE, $infile) || die("Could not open input file $infile"); 10 | binmode(INPUTFILE, ":encoding(utf8)"); 11 | 12 | while () { 13 | my $input = $_; 14 | $input = encode_entities($input); 15 | 16 | $input =~ s/<//g; 18 | $input =~ s/"/\"/g; 19 | $input =~ s/&#/\&#/g; 20 | 21 | print $input; 22 | } 23 | 24 | close INPUTFILE; 25 | -------------------------------------------------------------------------------- /samples/Cole - Philippine Folk Tales/PhilippineFolkTales-1.1.tei: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhellingman/tei2html/ee777385bab4b5381df6c83e4bc883f31527945e/samples/Cole - Philippine Folk Tales/PhilippineFolkTales-1.1.tei -------------------------------------------------------------------------------- /samples/Cole - Philippine Folk Tales/Processed/images/front.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhellingman/tei2html/ee777385bab4b5381df6c83e4bc883f31527945e/samples/Cole - Philippine Folk Tales/Processed/images/front.jpg -------------------------------------------------------------------------------- /samples/Cole - Philippine Folk Tales/Processed/images/p026-1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhellingman/tei2html/ee777385bab4b5381df6c83e4bc883f31527945e/samples/Cole - Philippine Folk Tales/Processed/images/p026-1.jpg -------------------------------------------------------------------------------- /samples/Cole - Philippine Folk Tales/Processed/images/p026-2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhellingman/tei2html/ee777385bab4b5381df6c83e4bc883f31527945e/samples/Cole - Philippine Folk Tales/Processed/images/p026-2.jpg -------------------------------------------------------------------------------- /samples/Cole - Philippine Folk Tales/Processed/images/p027.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhellingman/tei2html/ee777385bab4b5381df6c83e4bc883f31527945e/samples/Cole - Philippine Folk Tales/Processed/images/p027.jpg -------------------------------------------------------------------------------- /samples/Cole - Philippine Folk Tales/Processed/images/p040-1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhellingman/tei2html/ee777385bab4b5381df6c83e4bc883f31527945e/samples/Cole - Philippine Folk Tales/Processed/images/p040-1.jpg -------------------------------------------------------------------------------- /samples/Cole - Philippine Folk Tales/Processed/images/p040-2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhellingman/tei2html/ee777385bab4b5381df6c83e4bc883f31527945e/samples/Cole - Philippine Folk Tales/Processed/images/p040-2.jpg -------------------------------------------------------------------------------- /samples/Cole - Philippine Folk Tales/Processed/images/p041-1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhellingman/tei2html/ee777385bab4b5381df6c83e4bc883f31527945e/samples/Cole - Philippine Folk Tales/Processed/images/p041-1.jpg -------------------------------------------------------------------------------- /samples/Cole - Philippine Folk Tales/Processed/images/p041-2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhellingman/tei2html/ee777385bab4b5381df6c83e4bc883f31527945e/samples/Cole - Philippine Folk Tales/Processed/images/p041-2.jpg -------------------------------------------------------------------------------- /samples/Cole - Philippine Folk Tales/Processed/images/p056-1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhellingman/tei2html/ee777385bab4b5381df6c83e4bc883f31527945e/samples/Cole - Philippine Folk Tales/Processed/images/p056-1.jpg -------------------------------------------------------------------------------- /samples/Cole - Philippine Folk Tales/Processed/images/p056-2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhellingman/tei2html/ee777385bab4b5381df6c83e4bc883f31527945e/samples/Cole - Philippine Folk Tales/Processed/images/p056-2.jpg -------------------------------------------------------------------------------- /samples/Cole - Philippine Folk Tales/Processed/images/p057-1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhellingman/tei2html/ee777385bab4b5381df6c83e4bc883f31527945e/samples/Cole - Philippine Folk Tales/Processed/images/p057-1.jpg -------------------------------------------------------------------------------- /samples/Cole - Philippine Folk Tales/Processed/images/p057-2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhellingman/tei2html/ee777385bab4b5381df6c83e4bc883f31527945e/samples/Cole - Philippine Folk Tales/Processed/images/p057-2.jpg -------------------------------------------------------------------------------- /samples/Cole - Philippine Folk Tales/Processed/images/p068-1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhellingman/tei2html/ee777385bab4b5381df6c83e4bc883f31527945e/samples/Cole - Philippine Folk Tales/Processed/images/p068-1.jpg -------------------------------------------------------------------------------- /samples/Cole - Philippine Folk Tales/Processed/images/p068-2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhellingman/tei2html/ee777385bab4b5381df6c83e4bc883f31527945e/samples/Cole - Philippine Folk Tales/Processed/images/p068-2.jpg -------------------------------------------------------------------------------- /samples/Cole - Philippine Folk Tales/Processed/images/p069-1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhellingman/tei2html/ee777385bab4b5381df6c83e4bc883f31527945e/samples/Cole - Philippine Folk Tales/Processed/images/p069-1.jpg -------------------------------------------------------------------------------- /samples/Cole - Philippine Folk Tales/Processed/images/p069-2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhellingman/tei2html/ee777385bab4b5381df6c83e4bc883f31527945e/samples/Cole - Philippine Folk Tales/Processed/images/p069-2.jpg -------------------------------------------------------------------------------- /samples/Cole - Philippine Folk Tales/Processed/images/p090-1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhellingman/tei2html/ee777385bab4b5381df6c83e4bc883f31527945e/samples/Cole - Philippine Folk Tales/Processed/images/p090-1.jpg -------------------------------------------------------------------------------- /samples/Cole - Philippine Folk Tales/Processed/images/p090-2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhellingman/tei2html/ee777385bab4b5381df6c83e4bc883f31527945e/samples/Cole - Philippine Folk Tales/Processed/images/p090-2.jpg -------------------------------------------------------------------------------- /samples/Cole - Philippine Folk Tales/Processed/images/p091-1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhellingman/tei2html/ee777385bab4b5381df6c83e4bc883f31527945e/samples/Cole - Philippine Folk Tales/Processed/images/p091-1.jpg -------------------------------------------------------------------------------- /samples/Cole - Philippine Folk Tales/Processed/images/p091-2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhellingman/tei2html/ee777385bab4b5381df6c83e4bc883f31527945e/samples/Cole - Philippine Folk Tales/Processed/images/p091-2.jpg -------------------------------------------------------------------------------- /samples/Cole - Philippine Folk Tales/Processed/images/p124.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhellingman/tei2html/ee777385bab4b5381df6c83e4bc883f31527945e/samples/Cole - Philippine Folk Tales/Processed/images/p124.jpg -------------------------------------------------------------------------------- /samples/Cole - Philippine Folk Tales/Processed/images/p125.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhellingman/tei2html/ee777385bab4b5381df6c83e4bc883f31527945e/samples/Cole - Philippine Folk Tales/Processed/images/p125.jpg -------------------------------------------------------------------------------- /samples/Cole - Philippine Folk Tales/Processed/images/p160-1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhellingman/tei2html/ee777385bab4b5381df6c83e4bc883f31527945e/samples/Cole - Philippine Folk Tales/Processed/images/p160-1.jpg -------------------------------------------------------------------------------- /samples/Cole - Philippine Folk Tales/Processed/images/p160-2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhellingman/tei2html/ee777385bab4b5381df6c83e4bc883f31527945e/samples/Cole - Philippine Folk Tales/Processed/images/p160-2.jpg -------------------------------------------------------------------------------- /samples/Cole - Philippine Folk Tales/Processed/images/p161.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhellingman/tei2html/ee777385bab4b5381df6c83e4bc883f31527945e/samples/Cole - Philippine Folk Tales/Processed/images/p161.jpg -------------------------------------------------------------------------------- /samples/Cole - Philippine Folk Tales/Processed/images/p196.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhellingman/tei2html/ee777385bab4b5381df6c83e4bc883f31527945e/samples/Cole - Philippine Folk Tales/Processed/images/p196.jpg -------------------------------------------------------------------------------- /samples/Cole - Philippine Folk Tales/Processed/images/p197-1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhellingman/tei2html/ee777385bab4b5381df6c83e4bc883f31527945e/samples/Cole - Philippine Folk Tales/Processed/images/p197-1.jpg -------------------------------------------------------------------------------- /samples/Cole - Philippine Folk Tales/Processed/images/p197-2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhellingman/tei2html/ee777385bab4b5381df6c83e4bc883f31527945e/samples/Cole - Philippine Folk Tales/Processed/images/p197-2.jpg -------------------------------------------------------------------------------- /samples/Cole - Philippine Folk Tales/Processed/images/qr12814.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhellingman/tei2html/ee777385bab4b5381df6c83e4bc883f31527945e/samples/Cole - Philippine Folk Tales/Processed/images/qr12814.png -------------------------------------------------------------------------------- /samples/Cole - Philippine Folk Tales/Processed/images/titlepage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhellingman/tei2html/ee777385bab4b5381df6c83e4bc883f31527945e/samples/Cole - Philippine Folk Tales/Processed/images/titlepage.png -------------------------------------------------------------------------------- /samples/Cole - Philippine Folk Tales/README.adoc: -------------------------------------------------------------------------------- 1 | = About This Repository 2 | 3 | This repository contains the TEI source file, and derived text and HTML files of an ebook posted to https://www.gutenberg.org/[Project Gutenberg]. Like the version posted to Project Gutenberg, this ebook is free from copyright in the U.S. No claim is made about its copyright status outside the U.S. 4 | 5 | The version maintained in this repository may be slightly out-of-sync with the version maintained at Project Gutenberg. Mostly, fixes will be made first here, and only then reposted to Project Gutenberg. When you encounter any issue in this text, please report it here. 6 | 7 | == About This Ebook 8 | 9 | |=== 10 | |Field |Value 11 | 12 | |Title |Philippine Folk Tales 13 | |Author |Mabel Cook Cole (1880–1978?) 14 | |Publisher |Project Gutenberg, Urbana, Illinois, USA., 2004-07-04 15 | |Publication date |2004-07-04 16 | |Availability |This eBook is for the use of anyone anywhere at no cost and with almost no restrictions whatsoever. You may copy it, give it away or re-use it under the terms of the Project Gutenberg License included with this eBook or online at https://www.gutenberg.org/[www.gutenberg.org]. This eBook is produced by Jeroen Hellingman and the Online Distributed Proofreading Team at https://www.pgdp.net/[www.pgdp.net]. gbn0406211926: Mabel Cook Cole, Philippine Folk Tales. Jeroen Hellingman . 1916c. 6/24/2004. ok. A copy of this work is available at the https://www.archive.org/details/philippinefolkta00colerich[Internet Archive]. 17 | |Keyword |Folklore - Philippines 18 | |Keyword |Tales - Philippines 19 | |PG Ebook Number |https://www.gutenberg.org/ebooks/12814[12814] 20 | |=== 21 | -------------------------------------------------------------------------------- /samples/Cole - Philippine Folk Tales/metadata.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | Philippine Folk Tales 7 | Mabel Cook Cole (1880–1978?) 8 | Project Gutenberg, Urbana, Illinois, USA., 2004-07-04 9 | 2004-07-04 10 | This eBook is for the use of anyone anywhere at no cost and with almost no restrictions whatsoever. You may copy it, give it away or re-use it under the terms of the Project Gutenberg License included with this eBook or online at www.gutenberg.org. 11 | This eBook is produced by Jeroen Hellingman and the Online Distributed Proofreading Team at www.pgdp.net. 12 | gbn0406211926: Mabel Cook Cole, Philippine Folk Tales. Jeroen Hellingman <jeroen@bohol.ph>. 1916c. 6/24/2004. ok. 13 | A copy of this work is available at the Internet Archive. 14 | 15 | Folklore - Philippines 16 | Tales - Philippines 17 | pg:12814 18 | 19 | 20 | -------------------------------------------------------------------------------- /samples/Fansler - Filipino Popular Tales/FilipinoPopularTales-1.0.tei: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhellingman/tei2html/ee777385bab4b5381df6c83e4bc883f31527945e/samples/Fansler - Filipino Popular Tales/FilipinoPopularTales-1.0.tei -------------------------------------------------------------------------------- /samples/Pratt - Armenia and the Armenians/ArmeniaArmenians-1.0.tei: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhellingman/tei2html/ee777385bab4b5381df6c83e4bc883f31527945e/samples/Pratt - Armenia and the Armenians/ArmeniaArmenians-1.0.tei -------------------------------------------------------------------------------- /samples/README.adoc: -------------------------------------------------------------------------------- 1 | = tei2html/samples 2 | 3 | For further samples, see https://github.com/GutenbergSource. 4 | 5 | The perl scrip `getRepos.pl` can be used to clone (or update) all GitHub repositories with texts submitted to Project Gutenberg. This script is automatically generated from the metadata of the files, and will be updated when more texts are added. 6 | 7 | For an example on how to include media overlays in ePub output using TEI (with only minimal additional markup) and SMIL files, look at https://github.com/GutenbergSource/20820-Rama-Larawan. -------------------------------------------------------------------------------- /samples/Shakespeare - Twee Edellieden van Verona/WS-03-EdelliedenVerona-1.0.tei: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhellingman/tei2html/ee777385bab4b5381df6c83e4bc883f31527945e/samples/Shakespeare - Twee Edellieden van Verona/WS-03-EdelliedenVerona-1.0.tei -------------------------------------------------------------------------------- /sandbox/README.md: -------------------------------------------------------------------------------- 1 | 2 | This directory contains unfinished or experimental stylesheets. -------------------------------------------------------------------------------- /sandbox/extract-segs.xsl: -------------------------------------------------------------------------------- 1 | 2 | 10 | 11 | 12 | Extract segments from a TEI document. 13 | 14 | This stylesheet extracts segments from an XHTML document. 15 | 16 | Jeroen Hellingman 17 | 2014, Jeroen Hellingman 18 | 19 | 20 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | | 32 | 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /sandbox/linkIndex.pl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhellingman/tei2html/ee777385bab4b5381df6c83e4bc883f31527945e/sandbox/linkIndex.pl -------------------------------------------------------------------------------- /sandbox/patterns/compilePattern.pl: -------------------------------------------------------------------------------- 1 | 2 | use strict; 3 | 4 | use FindBin qw($Bin); 5 | 6 | my $toolsdir = $Bin; 7 | my $xsldir = $toolsdir; 8 | my $saxon = "java -jar " . $toolsdir . "/../tools/lib/saxon9he.jar "; 9 | 10 | system ("$saxon dummy.xml compilePatterns.xsl > compiledTest.xsl"); 11 | 12 | system ("$saxon dummy.xml compiledTest.xsl"); 13 | -------------------------------------------------------------------------------- /sandbox/patterns/testPatterns.xsl: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | DEF 16 | 17 | 18 | 19 | TUV 20 | 21 | 22 | 23 | ERROR: Unmatched character {substring(., 0, 1)} 24 | 25 | 26 | 27 | DEF 28 | 29 | 30 | 31 | QQ 32 | 33 | 34 | 35 | QQQ 36 | 37 | 38 | 39 | {substring(., 0, 1)} 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /sandbox/svg.pl: -------------------------------------------------------------------------------- 1 | # Perl script to run the svg.xsl stylesheet with Saxon. 2 | 3 | use strict; 4 | use warnings; 5 | 6 | my $javaOptions = '-Xms2048m -Xmx4096m -Xss1024k '; 7 | my $java = "java $javaOptions"; 8 | my $saxonHome = $ENV{'SAXON_HOME'}; 9 | my $saxon = "$java -jar " . $saxonHome . "/saxon9he.jar "; 10 | 11 | system ("$saxon svg.xsl svg.xsl "); 12 | -------------------------------------------------------------------------------- /sandbox/tei2wl.pl: -------------------------------------------------------------------------------- 1 | # Perl script to test the the tei2wl.xsl stylesheet with Saxon. 2 | 3 | use strict; 4 | use warnings; 5 | 6 | my $xsldir = "C:\\Users\\Jeroen\\Documents\\eLibrary\\Tools\\tei2html"; # location of xsl stylesheets 7 | my $saxon = "\"C:\\Program Files\\Java\\jre6\\bin\\java.exe\" -jar C:\\bin\\saxonhe9\\saxon9he.jar "; 8 | 9 | my $filename = $ARGV[0]; 10 | 11 | system ("$saxon $filename $xsldir/tei2wl.xsl"); 12 | 13 | -------------------------------------------------------------------------------- /schemas/issues.xsd: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | Schema for issues, as reported by checks.xsl. 11 | 12 | 13 | 14 | 15 | 16 | A list of issues. 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | A single issue with details. 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /schematron/tei-namespace.xsl: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /schematron/validate-tei-fail-test.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Test Validation of TEI files 6 | Test Validation of TEI files 7 | The test Validation of TEI files 8 | A test Validation of TEI files 9 | A test Validation of TEI files 10 | 11 | A test Validation of TEI files 12 | Een test Validatie van TEI bestanden 13 | 14 | Test Author 15 | 16 | Illustrator 17 | John Doe 18 | 19 | 20 | 21 | urn:xuid:2d886f57-c44c-4ac2-93d5-c7c4bfde9c0e 22 | 23 | 24 | 25 | 26 | 27 | 28 | Introduction 29 | 30 | 31 | 32 | 33 |

This is a reference to a non-existing id.

34 |

This is a reference to an existing id.

35 | 36 |

This paragraph has a redundant language attribute.

37 |
38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /schematron/validate-tei-test.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Test Validation of TEI files 6 | Test Author 7 | 8 | 9 | urn:uuid:2d886f57-c44c-4ac2-93d5-c7c4bfde9c0e 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /schematron/validate-tei.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | use strict; 3 | use warnings; 4 | 5 | # Define file paths (update as needed) 6 | my $schxslt = "../tools/lib/schxslt-cli.jar"; # Schematron processor, see https://github.com/schxslt/schxslt 7 | my $saxon = "../tools/lib/saxon9he.jar"; # Saxon XSLT processor 8 | my $schematron_file = "tei-validation.sch"; # Schematron rules 9 | my $xslt_file = "validation-report.xsl"; # XSLT for HTML output 10 | 11 | my $report_file = "validation-report.xml"; # XML output 12 | my $html_report = "validation-report.html"; # Final HTML report 13 | 14 | my $xml_file = shift or die "Usage: perl validate-tei.pl input.xml\n"; 15 | 16 | 17 | die "Error: SchXslt JAR not found!\n" unless -e $schxslt; 18 | die "Error: Saxon JAR not found!\n" unless -e $saxon; 19 | die "Error: Schematron file not found!\n" unless -e $schematron_file; 20 | die "Error: XSLT file not found!\n" unless -e $xslt_file; 21 | die "Error: XML file '$xml_file' not found!\n" unless -e $xml_file; 22 | 23 | 24 | # Run Schematron validation 25 | print "🔍 Validating $xml_file...\n"; 26 | my $validate_cmd = "java -jar $schxslt -s $schematron_file -d $xml_file -o $report_file"; 27 | my $validate_result = system($validate_cmd); 28 | 29 | # Check validation success 30 | if ($validate_result == 0) { 31 | print "✅ Validation complete. Report saved to $report_file.\n"; 32 | } else { 33 | die "❌ Validation failed! Check for errors.\n"; 34 | } 35 | 36 | # Convert XML report to HTML 37 | print "🎨 Converting validation report to HTML...\n"; 38 | my $transform_cmd = "java -jar $saxon -s:$report_file -xsl:$xslt_file -o:$html_report"; 39 | my $transform_result = system($transform_cmd); 40 | 41 | # Check transformation success 42 | if ($transform_result == 0) { 43 | print "✅ HTML report generated: $html_report\n"; 44 | } else { 45 | die "❌ Failed to generate HTML report!\n"; 46 | } 47 | 48 | exit 0; 49 | -------------------------------------------------------------------------------- /style/aligned-text.css: -------------------------------------------------------------------------------- 1 | /* 2 | aligned-text.css -- Aligned text stylesheet for HTML files generated by tei2html. 3 | 4 | Copyright 2006-2015, Jeroen Hellingman (available under GPL 3.0 or later). 5 | */ 6 | 7 | table.alignedText, table.alignedVerse { 8 | border-collapse: collapse; 9 | width: 100%; 10 | } 11 | 12 | table.alignedText td.first, table.alignedText td.second { 13 | vertical-align: top; 14 | width: 50%; 15 | } 16 | 17 | table.alignedVerse { 18 | vertical-align: top; 19 | } 20 | 21 | table.alignedText td.first, table.alignedVerse td.first { 22 | border-width: 0 0.2px 0 0; 23 | border-color: gray; 24 | border-style: solid; 25 | padding-right: 10px; 26 | } 27 | 28 | table.alignedText td.second, table.alignedVerse td.second { 29 | padding-left: 10px; 30 | } 31 | 32 | table.alignedVerse td.first, table.alignedVerse td.second { 33 | width: 45%; 34 | } 35 | 36 | table.alignedVerse td.lineNumbers { 37 | width: 10%; 38 | } 39 | 40 | td.alignedDiv1 { 41 | padding-top: 5.6em; 42 | } 43 | 44 | td.alignedDiv2 { 45 | padding-top: 4.8em; 46 | } 47 | 48 | td.alignedDiv3 { 49 | padding-top: 3.6em; 50 | } 51 | 52 | td.alignedDiv4 { 53 | padding-top: 2.4em; 54 | } 55 | 56 | td.alignedDiv5, td.alignedDiv6, td.alignedDiv7 { 57 | padding-top: 1.44em; 58 | } 59 | 60 | 61 | /* Collapsing of touching margins doesn't work if they are inside table cells */ 62 | table.alignedText p:not(.first) { 63 | margin-top: 0; 64 | } 65 | 66 | .alignedVerseHead { 67 | margin: 1em 0 1em 0; 68 | display: inline-block; 69 | } 70 | 71 | .alignedVerseSpacer { 72 | height: 1.4em; /* 1em + 1.4em = 2.4em */ 73 | } 74 | 75 | /* End of aligned-text.css */ 76 | -------------------------------------------------------------------------------- /style/arctic.css: -------------------------------------------------------------------------------- 1 | 2 | body { 3 | background: #FFFFFF; 4 | font-family: serif; 5 | } 6 | 7 | body, a.hidden { 8 | color: black; 9 | } 10 | 11 | .titlePage { 12 | color: #001FA4; 13 | font-family: sans-serif; 14 | } 15 | 16 | h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4 { 17 | color: #001FA4; 18 | font-family: sans-serif; 19 | } 20 | 21 | p.byline { 22 | font-style: italic; 23 | margin-bottom: 2em; 24 | } 25 | 26 | .figureHead, .noteRef, .pseudoNoteRef, .marginnote, .right-marginnote, .cut-in-note-left, .cut-in-note-right, p.legend, .verseNum, .stage { 27 | color: #001FA4; 28 | } 29 | 30 | .rightnote, .pageNum, .lineNum, .pageNum a { 31 | color: #AAAAAA; 32 | } 33 | 34 | a.hidden:hover, a.noteRef:hover, a.pseudoNoteRef:hover { 35 | color: red; 36 | } 37 | 38 | p.dropcap:first-letter { 39 | color: #001FA4; 40 | font-weight: bold; 41 | } 42 | -------------------------------------------------------------------------------- /style/atkinson.css: -------------------------------------------------------------------------------- 1 | 2 | body { 3 | font-family: 'Atkinson Hyperlegible', serif; 4 | line-height: 1.4; 5 | } 6 | 7 | h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .titlePage { 8 | font-family: 'Atkinson Hyperlegible', serif; 9 | } 10 | 11 | h1, h2, h3, h4, .h1, .h2, .h3, .titlePage { 12 | text-transform: uppercase; 13 | } 14 | 15 | h5, h6 { 16 | font-style: italic; 17 | } 18 | 19 | .transcriberNote { 20 | font-family: 'Atkinson Hyperlegible', serif; 21 | font-size: 100%; 22 | } 23 | 24 | .hangq { text-indent: -0.24em; } 25 | .hangqq { text-indent: -0.42em; } 26 | .hangqqq { text-indent: -0.68em; } 27 | 28 | .grek, .cyrl { font-family: 'Atkinson Hyperlegible', serif; } 29 | -------------------------------------------------------------------------------- /style/aural.css: -------------------------------------------------------------------------------- 1 | 2 | .pageNum, .lineNum { 3 | speak: never; 4 | } 5 | -------------------------------------------------------------------------------- /style/borneo.css: -------------------------------------------------------------------------------- 1 | /* borneo.css -- color scheme Borneo, for use with Gutenberg stylesheet */ 2 | 3 | body { 4 | background: #FFFFEE; /* #FFFFEE; light yellowish brown */ 5 | } 6 | 7 | body, a.hidden { 8 | color: black; 9 | } 10 | 11 | h1, h2, h3, h4, h5, h6, .noteRef, .pseudoNoteRef, .marginnote, .right-marginnote, p.legend { 12 | color: #880000; /* #880000; brownish red */ 13 | } 14 | 15 | .navline, span.rightnote, span.pageno { 16 | color: #AC8D70; /* #AC8D70; sepia */ 17 | } 18 | 19 | a.navline:hover, a.hidden:hover, a.noteRef:hover, a.pseudoNoteRef:hover { 20 | color: #D25C00; /* #D25C00; orange brown */ 21 | } 22 | -------------------------------------------------------------------------------- /style/classic.css: -------------------------------------------------------------------------------- 1 | 2 | body { 3 | background: #FFFFFF; 4 | font-family: serif; 5 | } 6 | 7 | body, a.hidden { 8 | color: black; 9 | } 10 | 11 | h1, h2, .h1, .h2 { 12 | text-align: center; 13 | font-variant: small-caps; 14 | font-weight: normal; 15 | } 16 | 17 | p.byline { 18 | text-align: center; 19 | font-style: italic; 20 | margin-bottom: 2em; 21 | } 22 | 23 | .div2 p.byline, .div3 p.byline, .div4 p.byline, .div5 p.byline, .div6 p.byline, .div7 p.byline { 24 | text-align: left; 25 | } 26 | 27 | .figureHead, .noteRef, .pseudoNoteRef, .marginnote, .right-marginnote, p.legend, .verseNum { 28 | color: #660000; 29 | } 30 | 31 | .rightnote, .pageNum, .lineNum, .pageNum a { 32 | color: #AAAAAA; 33 | } 34 | 35 | a.hidden:hover, a.noteRef:hover, a.pseudoNoteRef:hover { 36 | color: red; 37 | } 38 | 39 | h1, h2, h3, h4, h5, h6 { 40 | font-weight: normal; 41 | } 42 | 43 | table { 44 | margin-left: auto; 45 | margin-right: auto; 46 | } 47 | 48 | td.tocText { 49 | text-align: center; 50 | font-variant: small-caps; 51 | font-size: 1.2em; 52 | line-height: 1.5; 53 | } 54 | 55 | .tableCaption { 56 | text-align: center; 57 | } 58 | 59 | /* Script codes, see ISO-15924 */ 60 | 61 | .arab { font-family: Scheherazade, serif; } 62 | 63 | .aran { font-family: 'Awami Nastaliq', serif; } 64 | 65 | .grek { font-family: 'Charis SIL', serif; } 66 | 67 | .hebr { font-family: 'SBL Hebrew', Shlomo, 'Ezra SIL', serif; } 68 | 69 | .syrc { font-family: 'Serto Jerusalem', serif; } 70 | 71 | -------------------------------------------------------------------------------- /style/color-lang-de.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Colors used: 4 | 5 | 50% 85% 6 | 7 | #ff0000 rgb(255, 0, 0) red #ffb3b3 8 | #ff8000 rgb(255, 128, 0) orange #ffd9b3 9 | #ffff00 rgb(255, 255, 0) yellow #ffffb3 10 | #80ff00 rgb(128, 255, 0) chartreuse #d9ffb3 11 | #00ff00 rgb(0, 255, 0) green #b3ffb3 12 | #00ff80 rgb(0, 255, 128) spring green #ccffe6 13 | #00ffff rgb(0, 255, 255) cyan #b3ffff 14 | #0080ff rgb(0, 128, 255) dodger blue #b3d9ff 15 | #0000ff rgb(0, 0, 255) blue #b3b3ff 16 | #8000ff rgb(128, 0, 255) purple #d9b3ff 17 | #ff00ff rgb(255, 0, 255) violet #ffb3ff 18 | #ff0080 rgb(255, 0, 128) magenta #ffb3d9 19 | */ 20 | 21 | /* Most common western languages */ 22 | 23 | :lang(de) { background-color: #ffffff; } 24 | 25 | :lang(nl) { background-color: #ffb3b3; } 26 | :lang(en) { background-color: #ffd9b3; } 27 | :lang(fy) { background-color: #fff2e5; } 28 | 29 | :lang(da) { background-color: #ffffb3; } 30 | :lang(no) { background-color: #ffffcc; } 31 | :lang(sv) { background-color: #ffffe5; } 32 | 33 | /* Romance languages */ 34 | 35 | :lang(la) { background-color: #d9ffb3; } 36 | :lang(fr) { background-color: #b3ffb3; } 37 | :lang(es) { background-color: #ccffe6; } 38 | 39 | :lang(ca) { background-color: #d4ffc7; } 40 | :lang(pt) { background-color: #b3ffff; } 41 | :lang(it) { background-color: #b3d9ff; } 42 | :lang(ro) { background-color: #ffb3ff; } 43 | 44 | /* Slavic languages */ 45 | 46 | :lang(pl) { background-color: #d9b3ff; } 47 | :lang(ru) { background-color: #ffb3ff; } 48 | :lang(bg) { background-color: #ffb3d9; } 49 | 50 | /* Classic languages */ 51 | 52 | :lang(el) { background-color: #e5e5ff; } 53 | :lang(grc) { background-color: #b3b3ff; } 54 | 55 | /* Semitic languages */ 56 | 57 | :lang(he) { background-color: #80b6ff; } 58 | :lang(ar) { background-color: #7fff91; } 59 | 60 | /* Other */ 61 | 62 | :lang(ms) { background-color: #abfcfc; } 63 | :lang(sk) { background-color: #e2fcab; } 64 | 65 | -------------------------------------------------------------------------------- /style/color-lang-nl.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Colors used: 4 | 5 | 50% 85% 6 | 7 | #ff0000 rgb(255, 0, 0) red #ffb3b3 8 | #ff8000 rgb(255, 128, 0) orange #ffd9b3 9 | #ffff00 rgb(255, 255, 0) yellow #ffffb3 10 | #80ff00 rgb(128, 255, 0) chartreuse #d9ffb3 11 | #00ff00 rgb(0, 255, 0) green #b3ffb3 12 | #00ff80 rgb(0, 255, 128) spring green #ccffe6 13 | #00ffff rgb(0, 255, 255) cyan #b3ffff 14 | #0080ff rgb(0, 128, 255) dodger blue #b3d9ff 15 | #0000ff rgb(0, 0, 255) blue #b3b3ff 16 | #8000ff rgb(128, 0, 255) purple #d9b3ff 17 | #ff00ff rgb(255, 0, 255) violet #ffb3ff 18 | #ff0080 rgb(255, 0, 128) magenta #ffb3d9 19 | */ 20 | 21 | /* Most common western languages */ 22 | 23 | :lang(nl) { background-color: #ffffff; } 24 | 25 | :lang(de) { background-color: #ffb3b3; } 26 | :lang(en) { background-color: #ffd9b3; } 27 | :lang(fy) { background-color: #fff2e5; } 28 | 29 | :lang(da) { background-color: #ffffb3; } 30 | :lang(no) { background-color: #ffffcc; } 31 | :lang(sv) { background-color: #ffffe5; } 32 | 33 | /* Romance languages */ 34 | 35 | :lang(la) { background-color: #d9ffb3; } 36 | :lang(fr) { background-color: #b3ffb3; } 37 | :lang(es) { background-color: #ccffe6; } 38 | 39 | :lang(ca) { background-color: #d4ffc7; } 40 | :lang(pt) { background-color: #b3ffff; } 41 | :lang(it) { background-color: #b3d9ff; } 42 | :lang(ro) { background-color: #ffb3ff; } 43 | 44 | /* Slavic languages */ 45 | 46 | :lang(pl) { background-color: #d9b3ff; } 47 | :lang(ru) { background-color: #ffb3ff; } 48 | :lang(bg) { background-color: #ffb3d9; } 49 | 50 | /* Classic languages */ 51 | 52 | :lang(el) { background-color: #e5e5ff; } 53 | :lang(grc) { background-color: #b3b3ff; } 54 | 55 | /* Semitic languages */ 56 | 57 | :lang(he) { background-color: #80b6ff; } 58 | :lang(ar) { background-color: #7fff91; } 59 | 60 | /* Other */ 61 | 62 | :lang(ms) { background-color: #abfcfc; } 63 | 64 | -------------------------------------------------------------------------------- /style/color-lang.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Colors used: 4 | 5 | 50% 85% 6 | 7 | #ff0000 rgb(255, 0, 0) red #ffb3b3 8 | #ff8000 rgb(255, 128, 0) orange #ffd9b3 9 | #ffff00 rgb(255, 255, 0) yellow #ffffb3 10 | #80ff00 rgb(128, 255, 0) chartreuse #d9ffb3 11 | #00ff00 rgb(0, 255, 0) green #b3ffb3 12 | #00ff80 rgb(0, 255, 128) spring green #ccffe6 13 | #00ffff rgb(0, 255, 255) cyan #b3ffff 14 | #0080ff rgb(0, 128, 255) dodger blue #b3d9ff 15 | #0000ff rgb(0, 0, 255) blue #b3b3ff 16 | #8000ff rgb(128, 0, 255) purple #d9b3ff 17 | #ff00ff rgb(255, 0, 255) violet #ffb3ff 18 | #ff0080 rgb(255, 0, 128) magenta #ffb3d9 19 | */ 20 | 21 | /* Most common western languages */ 22 | 23 | :lang(en) { background-color: #ffffff; } 24 | 25 | :lang(de) { background-color: #ffb3b3; } 26 | :lang(nl) { background-color: #ffd9b3; } 27 | :lang(fy) { background-color: #fff2e5; } 28 | 29 | :lang(da) { background-color: #ffffb3; } 30 | :lang(no) { background-color: #ffffcc; } 31 | :lang(sv) { background-color: #ffffe5; } 32 | 33 | /* Romance languages */ 34 | 35 | :lang(la) { background-color: #e1ffc3; } 36 | :lang(fr) { background-color: #b3ffb3; } 37 | :lang(es) { background-color: #ccffe6; } 38 | 39 | :lang(ca) { background-color: #d4ffc7; } 40 | :lang(pt) { background-color: #b3ffff; } 41 | :lang(it) { background-color: #b3d9ff; } 42 | :lang(ro) { background-color: #ffb3ff; } 43 | 44 | /* Slavic languages */ 45 | 46 | :lang(pl) { background-color: #d9b3ff; } 47 | :lang(ru) { background-color: #ffb3ff; } 48 | :lang(bg) { background-color: #ffb3d9; } 49 | 50 | /* Classic languages */ 51 | 52 | :lang(el) { background-color: #e5e5ff; } 53 | :lang(grc) { background-color: #dedeff; } 54 | 55 | /* Semitic languages */ 56 | 57 | :lang(he) { background-color: #80b6ff; } 58 | :lang(ar) { background-color: #7fff91; } 59 | 60 | /* Indic languages */ 61 | 62 | :lang(ur) { background-color: #ccffe6; } 63 | :lang(sa) { background-color: #d9b3ff; } 64 | :lang(hi) { background-color: #ffb3ff; } 65 | :lang(bo) { background-color: #ffb3d9; } 66 | 67 | 68 | 69 | -------------------------------------------------------------------------------- /style/computer-modern.css: -------------------------------------------------------------------------------- 1 | 2 | body { 3 | font-family: 'CMU Serif', serif; 4 | } 5 | 6 | .transcriberNote { 7 | font-family: 'CMU Sans Serif', sans-serif; 8 | font-size: 100%; 9 | } 10 | -------------------------------------------------------------------------------- /style/crystal.css: -------------------------------------------------------------------------------- 1 | 2 | body { 3 | background: #FFFFFF; 4 | font-family: serif; 5 | } 6 | 7 | body, a.hidden { 8 | color: black; 9 | } 10 | 11 | .front, .back { 12 | background-color: #CCFFFF; 13 | } 14 | 15 | .titlePage { 16 | background-color: #66DDFF; 17 | border: #DDDDDD 1px solid; 18 | padding: 10px; 19 | } 20 | 21 | .body { 22 | background-color: #FFFFCC; 23 | } 24 | 25 | .div0, .div1, .div2, .div3, .div4 { 26 | border: #DDDDDD 1px solid; 27 | padding: 10px; 28 | } 29 | 30 | .figure { 31 | background-color: #CCFF00; 32 | } 33 | 34 | .poem { 35 | background-color: #FFBBBB; 36 | } 37 | 38 | .footnotes { 39 | background-color: #FFFFAA; 40 | } 41 | 42 | ul, ol { 43 | border: 1px solid #DDDDDD; 44 | background-color: #FFCCCC; 45 | padding: 5px; 46 | } 47 | 48 | li { 49 | border: 1px solid #DDDDDD; 50 | background-color: #FFDDDD; 51 | } 52 | 53 | table { 54 | border: 1px solid #FFDDDD; 55 | background-color: #66FF66; 56 | padding: 5px; 57 | margin-left: auto; 58 | margin-right: auto; 59 | } 60 | 61 | .tableCaption { 62 | text-align: center; 63 | } 64 | 65 | td, th { 66 | border: 1px solid #DDDDDD; 67 | background-color: #88FF88; 68 | } 69 | 70 | h1, h2 { 71 | text-align: center; 72 | font-variant: small-caps; 73 | font-weight: normal; 74 | } 75 | 76 | .figureHead, .noteRef, .pseudoNoteRef, .marginnote, .right-marginnote, p.legend, .verseNum { 77 | color: #660000; 78 | } 79 | 80 | .rightnote, .pageNum, .lineNum, .pageNum a { 81 | color: #AAAAAA; 82 | } 83 | 84 | a.hidden:hover, a.noteRef:hover, a.pseudoNoteRef:hover { 85 | color: red; 86 | } 87 | 88 | h1, h2, h3, h4, h5, h6 { 89 | font-weight: normal; 90 | } -------------------------------------------------------------------------------- /style/debug.css: -------------------------------------------------------------------------------- 1 | 2 | /* color scheme 3 | 4 | http://paletton.com/#uid=72O1i0kp+uDfZMYljBdt9o2vWg0 5 | 6 | tables / lists -- greens : #7BEA75 #4FD848 #2DC625 #159B0E #056700 7 | poetry / drama -- blues : #867EDD #5C52C0 #3D33AA #261C85 #130C59 8 | figures -- reds : #FE7F82 #FD5559 #F22D33 #BE1115 #7E0003 9 | divisions -- yellows : #FFE280 #FFD955 #F4C82E #C09811 #806300 10 | 11 | */ 12 | 13 | .showtags { 14 | position: absolute; 15 | left: 2px; 16 | border: 1px solid gray; 17 | margin: 1px; 18 | padding: 2px 6px; 19 | color: gray; 20 | background-color: #DDD; 21 | font-family: monospace; 22 | font-size: x-small; 23 | width: 12%; 24 | } 25 | 26 | /* Show borders of tables and lists */ 27 | 28 | table { 29 | border: 2px dotted #2DC625; 30 | background-color: #7BEA75; 31 | } 32 | 33 | td { 34 | border: 1px dotted #159B0E; 35 | } 36 | 37 | th { 38 | border: 1px dotted #159B0E; 39 | background-color: #4FD848; 40 | } 41 | 42 | ol, ul { 43 | border: 2px dotted #056700; 44 | background-color: #7BEA75; 45 | } 46 | 47 | li { 48 | border: 1px dotted #159B0E; 49 | } 50 | 51 | /* Color cells based on content-category (if enabled via setting 'table.classifyContent') */ 52 | 53 | td.label, tr.label td { background-color: #bbf9cb; } 54 | td.unit, tr.unit td { background-color: #bbf9ea; } 55 | 56 | .ccEmpty { background-color: #f9fcc2; } 57 | .ccDash { background-color: #eefcc2; } 58 | .ccNum { background-color: #e2fcc2; } 59 | .ccPct { background-color: #d7fcc2; } 60 | .ccAmt { background-color: #cafcc2; } 61 | .ccTxt { background-color: #c2fcf8; } 62 | .ccOther { background-color: #ccc2fc; } 63 | 64 | 65 | /* Show borders on divisions */ 66 | 67 | 68 | 69 | 70 | /* color scheme for error information */ 71 | 72 | .t2hdebug, .t2hinfo, .t2hwarning, .t2herror { 73 | padding: 4px 8px; 74 | font-family: sans-serif; 75 | font-size: 12px; 76 | } 77 | 78 | .t2hdebug { 79 | background-color: #ebecfb; 80 | color: #4e874a; 81 | } 82 | 83 | .t2hinfo { 84 | background-color: #ecfbeb; 85 | color: #4e874a; 86 | } 87 | 88 | .t2hwarning { 89 | background-color: #ffe082; 90 | color: #e67000; 91 | } 92 | 93 | .t2herror { 94 | background-color: #fc9a8d; 95 | color: #973433; 96 | } 97 | -------------------------------------------------------------------------------- /style/ditto.css: -------------------------------------------------------------------------------- 1 | /* 2 | ditto.css -- Stylesheet to handle 'ditto' marks in files generated by tei2html. 3 | 4 | Copyright 2006-2023, Jeroen Hellingman (available under GPL 3.0 or later). 5 | */ 6 | 7 | /* ditto symbols are simulated by using an inline-table of two rows: the ditto-ed text in the first row is hidden, while the second row contains the ditto mark. */ 8 | 9 | span.seg { 10 | text-indent: 0; 11 | } 12 | 13 | span.ditto { 14 | display: inline-table; 15 | border-collapse: collapse; 16 | vertical-align: middle; 17 | text-align: center; 18 | line-height: 0; 19 | text-indent: 0; 20 | } 21 | 22 | span.ditto span.r { 23 | display: table-row; 24 | } 25 | 26 | span.ditto span.s { 27 | display: table-cell; 28 | visibility: hidden; 29 | } 30 | 31 | span.ditto span.d { 32 | display: table-cell; 33 | } 34 | 35 | /* End of ditto.css */ 36 | -------------------------------------------------------------------------------- /style/figure.css: -------------------------------------------------------------------------------- 1 | /* 2 | figure.css -- Figure stylesheet for HTML files generated by tei2html. 3 | 4 | Copyright 2006-2015, Jeroen Hellingman (available under GPL 3.0 or later). 5 | */ 6 | 7 | div.figure, div.figureGroup { 8 | text-align: center; 9 | } 10 | 11 | table.figureGroupTable { 12 | width: 80%; 13 | border-collapse: collapse; 14 | } 15 | 16 | .figure, .figureGroup { 17 | margin-left: auto; 18 | margin-right: auto; 19 | } 20 | 21 | .floatLeft { 22 | float: left; 23 | margin: 10px 10px 10px 0; 24 | } 25 | 26 | .floatRight { 27 | float: right; 28 | margin: 10px 0 10px 10px; 29 | } 30 | 31 | p.figureHead, .par.figureHead { 32 | font-size: 100%; 33 | text-align: center; 34 | } 35 | 36 | .figAnnotation { 37 | font-size: 80%; 38 | position: relative; 39 | margin: 0 auto; /* center this */ 40 | } 41 | 42 | .figTopLeft, .figBottomLeft { 43 | float: left; 44 | } 45 | 46 | .figTopRight, .figBottomRight { 47 | float: right; 48 | } 49 | 50 | .figure p, .figure .par, .figureGroup p, .figureGroup .par { 51 | font-size: 80%; 52 | margin-top: 0; 53 | text-align: center; 54 | } 55 | 56 | img { 57 | border-width: 0; 58 | } 59 | 60 | td.galleryFigure { 61 | text-align: center; 62 | vertical-align: middle; 63 | } 64 | 65 | td.galleryCaption { 66 | text-align: center; 67 | vertical-align: top; 68 | } 69 | 70 | /* End of figure.css */ -------------------------------------------------------------------------------- /style/formulas.css: -------------------------------------------------------------------------------- 1 | 2 | span.displayMath { 3 | display: block; 4 | text-align: center; 5 | margin: 2ex auto; 6 | } 7 | 8 | span.labeledMath { 9 | display: table; 10 | width: 100%; 11 | margin: 2ex 0; 12 | } 13 | 14 | span.labeledMath span.displayMath { 15 | display: table-cell; 16 | } 17 | 18 | span.labeledMath span.mathLabel { 19 | display: table-cell; 20 | vertical-align: middle; 21 | text-align: right; 22 | } 23 | 24 | span.phantom { 25 | color: white; 26 | visibility: hidden; 27 | } 28 | 29 | span.labeledMath span.leftMathLabel { 30 | display: table-cell; 31 | vertical-align: middle; 32 | text-align: left; 33 | white-space: nowrap; 34 | } 35 | 36 | span.labeledMath span.rightMathLabel { 37 | display: table-cell; 38 | vertical-align: middle; 39 | text-align: right; 40 | white-space: nowrap; 41 | } 42 | -------------------------------------------------------------------------------- /style/garamond.css: -------------------------------------------------------------------------------- 1 | 2 | body { 3 | font-family: 'EB Garamond', serif; 4 | line-height: 1.4; 5 | } 6 | 7 | /* Disable unwanted feature of EB Garamond when using Latin. */ 8 | :lang(la) { 9 | font-feature-settings: "locl" 0; 10 | } 11 | 12 | h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .titlePage { 13 | font-family: 'EB Garamond', serif; 14 | } 15 | 16 | h1, h2, h3, h4, .h1, .h2, .h3, .titlePage { 17 | text-transform: uppercase; 18 | } 19 | 20 | h5, h6 { 21 | font-style: italic; 22 | } 23 | 24 | .transcriberNote { 25 | font-family: 'EB Garamond', serif; 26 | font-size: 100%; 27 | } 28 | 29 | .hangq { text-indent: -0.24em; } 30 | .hangqq { text-indent: -0.42em; } 31 | .hangqqq { text-indent: -0.68em; } 32 | 33 | .grek, .cyrl { font-family: 'EB Garamond', serif; } 34 | 35 | -------------------------------------------------------------------------------- /style/heatmap.css: -------------------------------------------------------------------------------- 1 | 2 | .q1 { background-color: #FFFFCC; } 3 | .q2 { background-color: #FFFF5C; } 4 | .q3 { background-color: #FFDB4D; } 5 | .q4 { background-color: #FFB442; font-weight: bold;} 6 | .q5 { background-color: #FF8566; font-weight: bold;} 7 | 8 | .f1 { color: #A3A3A3; } 9 | .f2 { color: #C2C2C2; } 10 | .f3 { color: #E0E0E0; } 11 | 12 | 13 | .p3 { background-color: #7AFF7A; } 14 | .p2 { background-color: #C7FFC7; } 15 | .p1 { background-color: #E0FFE0; } 16 | 17 | .h3 { background-color: #33FFFF; } 18 | .h2 { background-color: #99FFFF; } 19 | .h1 { background-color: #CCFFFF; } 20 | -------------------------------------------------------------------------------- /style/intralinear.css: -------------------------------------------------------------------------------- 1 | /* CSS for intralineair text */ 2 | 3 | span.intra { 4 | vertical-align: middle; 5 | display: inline-block; 6 | text-align: center; 7 | } 8 | 9 | span.intra, span.intra span.top, span.intra span.bottom { 10 | padding: 1px 0.5px; 11 | font-size: small; 12 | } 13 | 14 | span.intra span.bottom { 15 | display: block; 16 | font-style: italic; 17 | } 18 | -------------------------------------------------------------------------------- /style/layout-epub.css: -------------------------------------------------------------------------------- 1 | /* 2 | layout-epub.css -- Specific stylesheet for ePubs generated by tei2html. 3 | 4 | Copyright 2006-2015, Jeroen Hellingman (available under GPL 3.0 or later). 5 | */ 6 | 7 | .epub-media-overlay-active { 8 | background-color: yellow; 9 | } 10 | 11 | span.measure { 12 | border-bottom: none; 13 | } 14 | -------------------------------------------------------------------------------- /style/list.css: -------------------------------------------------------------------------------- 1 | 2 | ul { 3 | list-style-type: none; 4 | } 5 | 6 | .splitListTable { 7 | margin-left: 0; 8 | } 9 | 10 | .splitListTable td { 11 | vertical-align: top; 12 | } 13 | 14 | .numberedItem { 15 | text-indent: -3em; 16 | margin-left: 3em; 17 | } 18 | 19 | .numberedItem .itemNumber { 20 | float: left; 21 | position: relative; 22 | left: -3.5em; 23 | width: 3em; 24 | display: inline-block; 25 | text-align: right; 26 | } 27 | 28 | .itemGroupTable { 29 | border-collapse: collapse; 30 | margin-left: 0; 31 | } 32 | 33 | .itemGroupTable td { 34 | padding: 0; 35 | margin: 0; 36 | vertical-align: middle; 37 | } 38 | 39 | .itemGroupBrace { 40 | padding: 0 0.5em !important; 41 | } 42 | -------------------------------------------------------------------------------- /style/modern.css: -------------------------------------------------------------------------------- 1 | /* modern.css -- more modern style of formatting books */ 2 | 3 | body { 4 | background: #FFFFFF; 5 | font-family: serif; 6 | } 7 | 8 | body, a.hidden { 9 | color: black; 10 | } 11 | 12 | h1, h2, .h1, .h2 { 13 | text-align: left; 14 | font-weight: bold; 15 | } 16 | 17 | p.byline { 18 | text-align: left; 19 | font-style: italic; 20 | margin-bottom: 2em; 21 | } 22 | 23 | .figureHead, .noteRef, .pseudoNoteRef, .marginnote, .right-marginnote, p.legend, .verseNum { 24 | color: #660000; 25 | } 26 | 27 | .rightnote, .pageNum, .lineNum, .pageNum a { 28 | color: #AAAAAA; 29 | } 30 | 31 | a.hidden:hover, a.noteRef:hover, a.pseudoNoteRef:hover { 32 | color: red; 33 | } 34 | 35 | h1, h2, h3, h4, h5, h6 { 36 | font-weight: bold; 37 | } 38 | 39 | table { 40 | margin-left: auto; 41 | margin-right: auto; 42 | } 43 | 44 | .tableCaption { 45 | text-align: left; 46 | } -------------------------------------------------------------------------------- /style/normalize.css: -------------------------------------------------------------------------------- 1 | /* normalize.css -- based on normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */ 2 | 3 | html { 4 | line-height: 1.3; 5 | } 6 | 7 | body { 8 | margin: 0; 9 | } 10 | 11 | main { 12 | display: block; 13 | } 14 | 15 | h1 { 16 | font-size: 2em; 17 | margin: 0.67em 0; 18 | } 19 | 20 | hr { 21 | height: 0; 22 | overflow: visible; 23 | } 24 | 25 | pre { 26 | font-family: monospace; 27 | font-size: 1em; 28 | } 29 | 30 | a { 31 | background-color: transparent; 32 | } 33 | 34 | abbr[title] { 35 | border-bottom: none; 36 | text-decoration: underline; 37 | } 38 | 39 | b, strong { 40 | font-weight: bolder; 41 | } 42 | 43 | code, kbd, samp { 44 | font-family: monospace; 45 | font-size: 1em; 46 | } 47 | 48 | small { 49 | font-size: 80%; 50 | } 51 | 52 | sub, sup { 53 | font-size: 67%; 54 | line-height: 0; 55 | position: relative; 56 | vertical-align: baseline; 57 | } 58 | 59 | sub { 60 | bottom: -0.25em; 61 | } 62 | 63 | sup { 64 | top: -0.5em; 65 | } 66 | 67 | img { 68 | border-style: none; 69 | } 70 | -------------------------------------------------------------------------------- /style/refine30.css: -------------------------------------------------------------------------------- 1 | /* refine30.css - Some CSS 3.0 constructs to refine the presentation, so the main stylesheets can remain CSS 2.1 */ 2 | 3 | abbr[title] { 4 | border-bottom: none; 5 | text-decoration: underline dotted; 6 | } 7 | -------------------------------------------------------------------------------- /style/tagusage.css: -------------------------------------------------------------------------------- 1 | 2 | .tagUsage th, .tagUsage td { 3 | vertical-align: top; 4 | } 5 | 6 | .tagUsage span.tagUsageValue { 7 | background-color: #f5f5dc; 8 | border: 1px dotted black; 9 | padding: 1px 4px; 10 | } 11 | -------------------------------------------------------------------------------- /style/titlepage.css: -------------------------------------------------------------------------------- 1 | /* 2 | titlepage.css -- Title page stylesheet for HTML files generated by tei2html. 3 | 4 | Copyright 2006-2015, Jeroen Hellingman (available under GPL 3.0 or later). 5 | */ 6 | 7 | .titlePage { 8 | border: #DDDDDD 2px solid; 9 | margin: 3em 0 7em; 10 | padding: 5em 10% 6em; 11 | text-align: center; 12 | } 13 | 14 | .titlePage .docTitle { 15 | line-height: 1.7; 16 | margin: 2em 0; 17 | font-weight: bold; 18 | } 19 | 20 | .titlePage .docTitle .mainTitle { 21 | font-size: 1.8em; 22 | font-weight: inherit; 23 | font-variant: inherit; 24 | line-height: inherit; 25 | } 26 | 27 | .titlePage .docTitle .subTitle, 28 | .titlePage .docTitle .seriesTitle, 29 | .titlePage .docTitle .volumeTitle { 30 | font-size: 1.44em; 31 | font-weight: inherit; 32 | font-variant: inherit; 33 | line-height: inherit; 34 | } 35 | 36 | .titlePage .byline { 37 | margin: 2em 0; 38 | font-size: 1.2em; 39 | line-height: 1.5; 40 | } 41 | 42 | .titlePage .byline .docAuthor { 43 | font-size: 1.2em; 44 | font-weight: bold; 45 | } 46 | 47 | .titlePage .figure { 48 | margin: 2em auto; 49 | } 50 | 51 | .titlePage .docImprint { 52 | margin: 4em 0 0; 53 | font-size: 1.2em; 54 | line-height: 1.5; 55 | } 56 | 57 | .titlePage .docImprint .docDate { 58 | font-size: 1.2em; 59 | font-weight: bold; 60 | } 61 | 62 | /* End of titlepage.css */ -------------------------------------------------------------------------------- /style/velvet.css: -------------------------------------------------------------------------------- 1 | 2 | body { 3 | background: black; 4 | color: #888888; 5 | font-family: sans-serif; 6 | font-size: 12pt; 7 | } 8 | 9 | body, a.hidden { 10 | color: #888888; 11 | } 12 | 13 | .titlePage { 14 | color: #FDF1BA; 15 | font-family: sans-serif; 16 | border: #555555 2px solid; 17 | } 18 | 19 | h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4 { 20 | color: #FDF1BA; 21 | font-family: sans-serif; 22 | } 23 | 24 | p.byline { 25 | font-style: italic; 26 | margin-bottom: 2em; 27 | } 28 | 29 | .figureHead, .noteRef, .pseudoNoteRef, .marginnote, .right-marginnote, p.legend, .verseNum { 30 | color: #FDF1BA; 31 | } 32 | 33 | .rightnote, .pageNum, .lineNum, .pageNum a { 34 | color: #555555; 35 | } 36 | 37 | a.hidden:hover, a.noteRef:hover, a.pseudoNoteRef:hover { 38 | color: red; 39 | } 40 | 41 | .transcriberNote { 42 | background-color: #222; 43 | border: #FDF1BA 1px dotted; 44 | color: #888; 45 | } -------------------------------------------------------------------------------- /style/verse.css: -------------------------------------------------------------------------------- 1 | /* 2 | verse.css -- Verse and drama stylesheet for HTML files generated by tei2html. 3 | 4 | Copyright 2006-2015, Jeroen Hellingman (available under GPL 3.0 or later). 5 | */ 6 | 7 | /***** Verse *****/ 8 | 9 | .lgouter { 10 | margin-left: auto; 11 | margin-right: auto; 12 | display: table; /* used to make the block shrink to the actual size */ 13 | } 14 | 15 | .lg { 16 | text-align: left; 17 | padding: .5em 0; 18 | } 19 | 20 | .lg h4, .lgouter h4 { 21 | font-weight: normal; 22 | } 23 | 24 | .lg .lineNum, .sp .lineNum, .lgouter .lineNum { 25 | color: #777; 26 | font-size: 90%; 27 | left: 16%; 28 | margin: 0; 29 | position: absolute; 30 | text-align: center; 31 | text-indent: 0; 32 | top: auto; 33 | width: 1.75em; 34 | } 35 | 36 | p.line, .par.line { 37 | margin: 0; 38 | } 39 | 40 | span.hemistich { 41 | /* hidden text to achieve visual effect of hemistich indentation. */ 42 | visibility: hidden; 43 | } 44 | 45 | .verseNum { 46 | font-weight: bold; 47 | } 48 | 49 | /***** Drama *****/ 50 | 51 | .speaker { 52 | font-weight: bold; 53 | margin-bottom: 0.4em; 54 | } 55 | 56 | .sp .line { 57 | margin: 0 10%; 58 | text-align: left; 59 | } 60 | 61 | .castlist, .castitem { 62 | list-style-type: none; 63 | } 64 | 65 | .castGroupTable { 66 | border-collapse: collapse; 67 | margin-left: 0; 68 | } 69 | 70 | .castGroupTable td { 71 | padding: 0; 72 | margin: 0; 73 | vertical-align: middle; 74 | } 75 | 76 | .castGroupBrace { 77 | padding: 0 0.5em !important; 78 | } 79 | 80 | /***** End of verse.css *****/ -------------------------------------------------------------------------------- /test/audio/test.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhellingman/tei2html/ee777385bab4b5381df6c83e4bc883f31527945e/test/audio/test.mp3 -------------------------------------------------------------------------------- /test/audio/test.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhellingman/tei2html/ee777385bab4b5381df6c83e4bc883f31527945e/test/audio/test.ogg -------------------------------------------------------------------------------- /test/custom.css: -------------------------------------------------------------------------------- 1 | 2 | body { 3 | padding: 1.58em 16%; 4 | } 5 | 6 | .indent-hang-small { 7 | text-indent: -0.31em; 8 | } 9 | 10 | .indent-hang-medium { 11 | text-indent: -0.44em; 12 | } 13 | 14 | .indent-hang-large { 15 | text-indent: -0.76em; 16 | } 17 | -------------------------------------------------------------------------------- /test/ePub/META-INF/container.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /test/ePub/audio/test.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhellingman/tei2html/ee777385bab4b5381df6c83e4bc883f31527945e/test/ePub/audio/test.mp3 -------------------------------------------------------------------------------- /test/ePub/audio/test.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhellingman/tei2html/ee777385bab4b5381df6c83e4bc883f31527945e/test/ePub/audio/test.ogg -------------------------------------------------------------------------------- /test/ePub/cover.xhtml: -------------------------------------------------------------------------------- 1 | 2 | 4 | <meta charset="utf-8"/><meta name="generator" content="tei2html.xsl, see https://github.com/jhellingman/tei2html"/><link rel="coverpage" href="images/cover500.jpg"/><link rel="icon" href="images/cover500.jpg" type="image/x-cover"/><link rel="schema.DC" href="http://purl.org/dc/elements/1.1/"/><meta name="DC.Language" content="en-US"/><meta name="DC.Format" content="text/html"/><meta name="DC.Rights" content="This book is not copyrighted in the United States. If you live elsewhere please check the laws of your country before downloading this book."/><meta name="DC.Identifier" content="https://www.gutenberg.org/ebooks/12345"/><link href="test.css" rel="stylesheet" type="text/css"/></head><body><div class="front"><div id="cover" class="div1 last-child cover"><div class="divBody"><p id="xd37e100" class="first"></p><div class="figure cover-imagewidth" id="cover-image"><img src="images/cover500.jpg" alt="Cover illustration." width="500" height="700"/></div><p></p></div></div></div></body></html> -------------------------------------------------------------------------------- /test/ePub/images/Ornament.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhellingman/tei2html/ee777385bab4b5381df6c83e4bc883f31527945e/test/ePub/images/Ornament.png -------------------------------------------------------------------------------- /test/ePub/images/bracket3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhellingman/tei2html/ee777385bab4b5381df6c83e4bc883f31527945e/test/ePub/images/bracket3.png -------------------------------------------------------------------------------- /test/ePub/images/cover500.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhellingman/tei2html/ee777385bab4b5381df6c83e4bc883f31527945e/test/ePub/images/cover500.jpg -------------------------------------------------------------------------------- /test/ePub/images/hg2101.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhellingman/tei2html/ee777385bab4b5381df6c83e4bc883f31527945e/test/ePub/images/hg2101.png -------------------------------------------------------------------------------- /test/ePub/images/initial-A.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhellingman/tei2html/ee777385bab4b5381df6c83e4bc883f31527945e/test/ePub/images/initial-A.png -------------------------------------------------------------------------------- /test/ePub/images/tarsier.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhellingman/tei2html/ee777385bab4b5381df6c83e4bc883f31527945e/test/ePub/images/tarsier.jpg -------------------------------------------------------------------------------- /test/ePub/images/test.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhellingman/tei2html/ee777385bab4b5381df6c83e4bc883f31527945e/test/ePub/images/test.jpg -------------------------------------------------------------------------------- /test/ePub/images/thumbs/cover500.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhellingman/tei2html/ee777385bab4b5381df6c83e4bc883f31527945e/test/ePub/images/thumbs/cover500.jpg -------------------------------------------------------------------------------- /test/ePub/images/thumbs/hg2101.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhellingman/tei2html/ee777385bab4b5381df6c83e4bc883f31527945e/test/ePub/images/thumbs/hg2101.png -------------------------------------------------------------------------------- /test/ePub/images/thumbs/tarsier.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhellingman/tei2html/ee777385bab4b5381df6c83e4bc883f31527945e/test/ePub/images/thumbs/tarsier.jpg -------------------------------------------------------------------------------- /test/ePub/images/thumbs/test.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhellingman/tei2html/ee777385bab4b5381df6c83e4bc883f31527945e/test/ePub/images/thumbs/test.jpg -------------------------------------------------------------------------------- /test/ePub/mimetype: -------------------------------------------------------------------------------- 1 | application/epub+zip -------------------------------------------------------------------------------- /test/ePub/test-alignFirst.xhtml: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="utf-8"?> 2 | <!DOCTYPE html 3 | SYSTEM "about:legacy-compat"> 4 | <html xmlns="http://www.w3.org/1999/xhtml"><head><title/><meta charset="utf-8"/><meta name="generator" content="tei2html.xsl, see https://github.com/jhellingman/tei2html"/><link rel="coverpage" href="images/cover500.jpg"/><link rel="icon" href="images/cover500.jpg" type="image/x-cover"/><link rel="schema.DC" href="http://purl.org/dc/elements/1.1/"/><meta name="DC.Language" content="en-US"/><meta name="DC.Format" content="text/html"/><meta name="DC.Rights" content="This book is not copyrighted in the United States. If you live elsewhere please check the laws of your country before downloading this book."/><meta name="DC.Identifier" content="https://www.gutenberg.org/ebooks/12345"/><link href="test.css" rel="stylesheet" type="text/css"/></head><body><div class="body"><div id="alignFirst" class="div1 last-child"><div class="divHead"><h2 id="xd37e1754" class="label">Chapter IX</h2><h2 id="xd37e1756" class="main">Text Alignments</h2></div><div class="divBody"><p id="xd37e1757" class="first">This is a test of printing translated paragraphs side-by-side</p><p id="xd37e1759">The paragraphs will be numbered using the <i id="xd37e1761">n</i> attribute.</p><p id="xd37e1763">That way, the style sheet knows which paragraphs belong together.</p><p id="xd37e1765">This makes it easy to verify translations.</p><p id="xd37e1767">An extra paragraph, with the translation next to it.</p><p id="xd37e1769">And yet another paragraph.</p><p id="xd37e1771">And the final paragraph.</p></div></div></div></body></html> -------------------------------------------------------------------------------- /test/ePub/test-alignSecond.xhtml: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="utf-8"?> 2 | <!DOCTYPE html 3 | SYSTEM "about:legacy-compat"> 4 | <html xmlns="http://www.w3.org/1999/xhtml"><head><title/><meta charset="utf-8"/><meta name="generator" content="tei2html.xsl, see https://github.com/jhellingman/tei2html"/><link rel="coverpage" href="images/cover500.jpg"/><link rel="icon" href="images/cover500.jpg" type="image/x-cover"/><link rel="schema.DC" href="http://purl.org/dc/elements/1.1/"/><meta name="DC.Language" content="nl"/><meta name="DC.Format" content="text/html"/><meta name="DC.Rights" content="This book is not copyrighted in the United States. If you live elsewhere please check the laws of your country before downloading this book."/><meta name="DC.Identifier" content="https://www.gutenberg.org/ebooks/12345"/><link href="test.css" rel="stylesheet" type="text/css"/></head><body><div class="body"/></body></html> -------------------------------------------------------------------------------- /test/ePub/test-alignThird.xhtml: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="utf-8"?> 2 | <!DOCTYPE html 3 | SYSTEM "about:legacy-compat"> 4 | <html xmlns="http://www.w3.org/1999/xhtml"><head><title/><meta charset="utf-8"/><meta name="generator" content="tei2html.xsl, see https://github.com/jhellingman/tei2html"/><link rel="coverpage" href="images/cover500.jpg"/><link rel="icon" href="images/cover500.jpg" type="image/x-cover"/><link rel="schema.DC" href="http://purl.org/dc/elements/1.1/"/><meta name="DC.Language" content="en-US"/><meta name="DC.Format" content="text/html"/><meta name="DC.Rights" content="This book is not copyrighted in the United States. If you live elsewhere please check the laws of your country before downloading this book."/><meta name="DC.Identifier" content="https://www.gutenberg.org/ebooks/12345"/><link href="test.css" rel="stylesheet" type="text/css"/></head><body><div class="body"><div id="alignThird" class="div1 last-child"><div class="divBody"><p id="xd37e1797" class="first">This is a test of printing translated paragraphs side-by-side, this time the translation is pulled-in from another source.</p><p id="xd37e1799">The paragraphs will be numbered using the <i id="xd37e1801">n</i> attribute.</p><p id="xd37e1803">That way, the style sheet knows which paragraphs belong together.</p><p id="xd37e1805">This makes it easy to verify translations.</p><p id="xd37e1807">An extra paragraph, with the translation next to it.</p><p id="xd37e1809">And yet another paragraph.</p><p id="xd37e1811">And the final paragraph.</p></div></div></div></body></html> -------------------------------------------------------------------------------- /test/ePub/test-bk1-1.xhtml: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="utf-8"?> 2 | <!DOCTYPE html 3 | SYSTEM "about:legacy-compat"> 4 | <html xmlns="http://www.w3.org/1999/xhtml"><head><title/><meta charset="utf-8"/><meta name="generator" content="tei2html.xsl, see https://github.com/jhellingman/tei2html"/><link rel="coverpage" href="images/cover500.jpg"/><link rel="icon" href="images/cover500.jpg" type="image/x-cover"/><link rel="schema.DC" href="http://purl.org/dc/elements/1.1/"/><meta name="DC.Language" content="en-US"/><meta name="DC.Format" content="text/html"/><meta name="DC.Rights" content="This book is not copyrighted in the United States. If you live elsewhere please check the laws of your country before downloading this book."/><meta name="DC.Identifier" content="https://www.gutenberg.org/ebooks/12345"/><link href="test.css" rel="stylesheet" type="text/css"/></head><body><div class="body"><div class="div0" id="bk1"><h2 class="label">Book I</h2><h2 id="xd37e122" class="main">Tei2html Test Document</h2><p id="xd37e123" class="first">This is a test document, mainly intended to test<a xmlns:epub="http://www.idpf.org/2007/ops" class="noteRef" id="xd37e125src" href="test-bk1-1.xhtml#xd37e125" title="Go to note 1." epub:type="noteref">1</a> the features implemented in the tei2html <a id="xd37e128"/>XSLT stylesheets. This document serves the dual purpose of helping me to develop new features, and act as a cheat-sheet to look up how certain things are achieved with my <a id="xd37e130"/>stylesheet (yes, I sometimes forget myself).</p><div class="footnotes"><hr class="fnsep"/><div class="footnote-body"><div xmlns:epub="http://www.idpf.org/2007/ops" class="fndiv" id="xd37e125" epub:type="footnote"><p class="footnote"><span class="fnlabel"><a class="noteRef" href="test-bk1-1.xhtml#xd37e125src" title="Return to note 1 in text.">1</a></span> Test of a footnote at the div0 level. <a class="fnarrow" href="test-bk1-1.xhtml#xd37e125src" title="Return to note 1 in text.">↑</a></p></div></div></div></div></div></body></html> -------------------------------------------------------------------------------- /test/ePub/test-figTest2.xhtml: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="utf-8"?> 2 | <!DOCTYPE html 3 | SYSTEM "about:legacy-compat"> 4 | <html xmlns="http://www.w3.org/1999/xhtml"><head><title/><meta charset="utf-8"/><meta name="generator" content="tei2html.xsl, see https://github.com/jhellingman/tei2html"/><link rel="coverpage" href="images/cover500.jpg"/><link rel="icon" href="images/cover500.jpg" type="image/x-cover"/><link rel="schema.DC" href="http://purl.org/dc/elements/1.1/"/><meta name="DC.Language" content="en-US"/><meta name="DC.Format" content="text/html"/><meta name="DC.Rights" content="This book is not copyrighted in the United States. If you live elsewhere please check the laws of your country before downloading this book."/><meta name="DC.Identifier" content="https://www.gutenberg.org/ebooks/12345"/><link href="test.css" rel="stylesheet" type="text/css"/></head><body><div class="figure"><img src="images/test.jpg" alt="Tarsier"/><p class="figureHead">Tarsier</p><p id="xd37e1401" class="first">This is a somewhat longer test to verify we can limit the size of an image box.</p></div></body></html> -------------------------------------------------------------------------------- /test/ePub/test-index.xhtml: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="utf-8"?> 2 | <!DOCTYPE html 3 | SYSTEM "about:legacy-compat"> 4 | <html xmlns="http://www.w3.org/1999/xhtml"><head><title/><meta charset="utf-8"/><meta name="generator" content="tei2html.xsl, see https://github.com/jhellingman/tei2html"/><link rel="coverpage" href="images/cover500.jpg"/><link rel="icon" href="images/cover500.jpg" type="image/x-cover"/><link rel="schema.DC" href="http://purl.org/dc/elements/1.1/"/><meta name="DC.Language" content="nl"/><meta name="DC.Format" content="text/html"/><meta name="DC.Rights" content="This book is not copyrighted in the United States. If you live elsewhere please check the laws of your country before downloading this book."/><meta name="DC.Identifier" content="https://www.gutenberg.org/ebooks/12345"/><link href="test.css" rel="stylesheet" type="text/css"/></head><body><div class="back"><div id="index" lang="nl" class="div1 last-child index"><div class="divHead"><h2 id="xd37e1924" class="main">Index</h2></div><div class="divBody"><div class="transcriberNote indexToc" id="ixToc"><a href="test-index.xhtml#xd37e1927">A</a> | <a href="test-index.xhtml#xd37e1930">B</a> | <a href="test-index.xhtml#xd37e1933">C</a> | <a href="test-index.xhtml#xd37e1936">D</a></div><div id="ixA" class="div2"><div class="divHead"><h3 id="xd37e1927" class="main">A.</h3></div><div class="divBody"><p id="xd37e1928" class="first">A is een aapje.</p></div></div><div id="ixB" class="div2"><div class="divHead"><h3 id="xd37e1930" class="main">B.</h3></div><div class="divBody"><p id="xd37e1931" class="first">B is een Boom.</p></div></div><div id="ixC" class="div2"><div class="divHead"><h3 id="xd37e1933" class="main">C.</h3></div><div class="divBody"><p id="xd37e1934" class="first">C is een Cent.</p></div></div><div id="ixD" class="div2 last-child"><div class="divHead"><h3 id="xd37e1936" class="main">D.</h3></div><div class="divBody"><p id="xd37e1937" class="first">D is een Drommedaris. 5 | <br id="xd37e1939"/>en een Duizendpoot.</p></div></div></div></div></div></body></html> -------------------------------------------------------------------------------- /test/ePub/test-usingStyle.xhtml: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="utf-8"?> 2 | <!DOCTYPE html 3 | SYSTEM "about:legacy-compat"> 4 | <html xmlns="http://www.w3.org/1999/xhtml"><head><title/><meta charset="utf-8"/><meta name="generator" content="tei2html.xsl, see https://github.com/jhellingman/tei2html"/><link rel="coverpage" href="images/cover500.jpg"/><link rel="icon" href="images/cover500.jpg" type="image/x-cover"/><link rel="schema.DC" href="http://purl.org/dc/elements/1.1/"/><meta name="DC.Language" content="en-US"/><meta name="DC.Format" content="text/html"/><meta name="DC.Rights" content="This book is not copyrighted in the United States. If you live elsewhere please check the laws of your country before downloading this book."/><meta name="DC.Identifier" content="https://www.gutenberg.org/ebooks/12345"/><link href="test.css" rel="stylesheet" type="text/css"/></head><body><div class="body"><div id="usingStyle" class="div1 last-child"><div class="divHead"><h2 id="xd37e1814" class="label">Chapter X</h2><h2 id="xd37e1816" class="main">Using @style and @rendition attributes</h2></div><div class="divBody"><p id="xd37e1817" class="first">This is a test of using <span id="xd37e1819" class="xd37e1819">CSS</span> in <span id="xd37e1822" class="xd37e1819">@style</span> attributes.</p><p id="xd37e1825">This is a test of using <span id="xd37e1827" class="green">CSS</span> using <span id="xd37e1830" class="green">@rendition</span> attributes referencing rendition elements in the TeiHeader.</p><p id="xd37e1833">This is a further test with <span id="xd37e1835" class="red ul">red and underlined text</span>.</p><p id="xd37e1838">This is a test of using <i id="blue">CSS</i> using a style defined in a rendition element: CSS before should be blue.</p><p id="xd37e1843" class="large-letter">This is a test of using CSS using a style defined in a rendition element. The first letter of this paragraph should be large and red.</p></div></div></div></body></html> -------------------------------------------------------------------------------- /test/ePub/test.smil: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="utf-8"?><smil xmlns="http://www.w3.org/ns/SMIL" xmlns:epub="http://www.idpf.org/2007/ops" version="3.0"> 2 | <body> 3 | <seq id="sequence_id" epub:textref="test-ch1.xhtml" epub:type="bodymatter chapter"> 4 | <par id="par1"> 5 | <text src="test-ch1.xhtml#loon"/> 6 | <audio clipBegin="0:00:00" clipEnd="0:00:24" src="audio/test.mp3"/> 7 | </par> 8 | </seq> 9 | </body> 10 | </smil> -------------------------------------------------------------------------------- /test/formulas/display-f2.mml: -------------------------------------------------------------------------------- 1 | <math xmlns="http://www.w3.org/1998/Math/MathML" display="block" alttext="i italic h over two pi StartFraction partial-differential Over partial-differential t EndFraction StartAbsoluteValue normal upper Psi left-parenthesis bold r comma t right-parenthesis mathematical right-angle equals ModifyingAbove upper H With caret EndAbsoluteValue normal upper Psi left-parenthesis bold r comma t right-parenthesis mathematical right-angle"> 2 | <mi>i</mi> 3 | <mi class="MJX-variant">ℏ<!-- ℏ --></mi> 4 | <mfrac> 5 | <mi mathvariant="normal">∂<!-- ∂ --></mi> 6 | <mrow> 7 | <mi mathvariant="normal">∂<!-- ∂ --></mi> 8 | <mi>t</mi> 9 | </mrow> 10 | </mfrac> 11 | <mo fence="false" stretchy="false">|</mo> 12 | <mi mathvariant="normal">Ψ<!-- Ψ --></mi> 13 | <mo stretchy="false">(</mo> 14 | <mrow class="MJX-TeXAtom-ORD"> 15 | <mi mathvariant="bold">r</mi> 16 | </mrow> 17 | <mo>,</mo> 18 | <mi>t</mi> 19 | <mo stretchy="false">)</mo> 20 | <mo fence="false" stretchy="false">⟩<!-- ⟩ --></mo> 21 | <mo>=</mo> 22 | <mrow class="MJX-TeXAtom-ORD"> 23 | <mover> 24 | <mi>H</mi> 25 | <mo stretchy="false">^<!-- ^ --></mo> 26 | </mover> 27 | </mrow> 28 | <mo fence="false" stretchy="false">|</mo> 29 | <mi mathvariant="normal">Ψ<!-- Ψ --></mi> 30 | <mo stretchy="false">(</mo> 31 | <mrow class="MJX-TeXAtom-ORD"> 32 | <mi mathvariant="bold">r</mi> 33 | </mrow> 34 | <mo>,</mo> 35 | <mi>t</mi> 36 | <mo stretchy="false">)</mo> 37 | <mo fence="false" stretchy="false">⟩<!-- ⟩ --></mo> 38 | </math> 39 | -------------------------------------------------------------------------------- /test/formulas/display-f2.tex: -------------------------------------------------------------------------------- 1 | i \hbar \frac{\partial}{\partial t}\vert\Psi(\mathbf{r},t)\rangle = \hat H\vert\Psi(\mathbf{r},t)\rangle -------------------------------------------------------------------------------- /test/formulas/display-f3.mml: -------------------------------------------------------------------------------- 1 | <math xmlns="http://www.w3.org/1998/Math/MathML" display="block" alttext="i italic h over two pi StartFraction partial-differential Over partial-differential t EndFraction normal upper Psi left-parenthesis bold r comma t right-parenthesis equals left-bracket StartFraction minus italic h over two pi squared Over 2 mu EndFraction nabla squared plus upper V left-parenthesis bold r comma t right-parenthesis right-bracket normal upper Psi left-parenthesis bold r comma t right-parenthesis"> 2 | <mi>i</mi> 3 | <mi class="MJX-variant">ℏ<!-- ℏ --></mi> 4 | <mfrac> 5 | <mi mathvariant="normal">∂<!-- ∂ --></mi> 6 | <mrow> 7 | <mi mathvariant="normal">∂<!-- ∂ --></mi> 8 | <mi>t</mi> 9 | </mrow> 10 | </mfrac> 11 | <mi mathvariant="normal">Ψ<!-- Ψ --></mi> 12 | <mo stretchy="false">(</mo> 13 | <mrow class="MJX-TeXAtom-ORD"> 14 | <mi mathvariant="bold">r</mi> 15 | </mrow> 16 | <mo>,</mo> 17 | <mi>t</mi> 18 | <mo stretchy="false">)</mo> 19 | <mo>=</mo> 20 | <mrow> 21 | <mo>[</mo> 22 | <mfrac> 23 | <mrow> 24 | <mo>−<!-- − --></mo> 25 | <msup> 26 | <mi class="MJX-variant">ℏ<!-- ℏ --></mi> 27 | <mn>2</mn> 28 | </msup> 29 | </mrow> 30 | <mrow> 31 | <mn>2</mn> 32 | <mi>μ<!-- μ --></mi> 33 | </mrow> 34 | </mfrac> 35 | <msup> 36 | <mi mathvariant="normal">∇<!-- ∇ --></mi> 37 | <mn>2</mn> 38 | </msup> 39 | <mo>+</mo> 40 | <mi>V</mi> 41 | <mo stretchy="false">(</mo> 42 | <mrow class="MJX-TeXAtom-ORD"> 43 | <mi mathvariant="bold">r</mi> 44 | </mrow> 45 | <mo>,</mo> 46 | <mi>t</mi> 47 | <mo stretchy="false">)</mo> 48 | <mo>]</mo> 49 | </mrow> 50 | <mi mathvariant="normal">Ψ<!-- Ψ --></mi> 51 | <mo stretchy="false">(</mo> 52 | <mrow class="MJX-TeXAtom-ORD"> 53 | <mi mathvariant="bold">r</mi> 54 | </mrow> 55 | <mo>,</mo> 56 | <mi>t</mi> 57 | <mo stretchy="false">)</mo> 58 | </math> 59 | -------------------------------------------------------------------------------- /test/formulas/display-f3.tex: -------------------------------------------------------------------------------- 1 | i\hbar\frac{\partial}{\partial t} \Psi(\mathbf{r},t) = \left [ \frac{-\hbar^2}{2\mu}\nabla^2 + V(\mathbf{r},t)\right ] \Psi(\mathbf{r},t) -------------------------------------------------------------------------------- /test/formulas/display-f6.mml: -------------------------------------------------------------------------------- 1 | <math xmlns="http://www.w3.org/1998/Math/MathML" display="block" alttext="x equals StartFraction negative b plus-or-minus StartRoot b squared minus 4 a c EndRoot Over 2 a EndFraction period"> 2 | <mi>x</mi> 3 | <mo>=</mo> 4 | <mrow class="MJX-TeXAtom-ORD"> 5 | <mfrac> 6 | <mrow> 7 | <mo>−<!-- − --></mo> 8 | <mi>b</mi> 9 | <mo>±<!-- ± --></mo> 10 | <msqrt> 11 | <msup> 12 | <mi>b</mi> 13 | <mn>2</mn> 14 | </msup> 15 | <mo>−<!-- − --></mo> 16 | <mn>4</mn> 17 | <mi>a</mi> 18 | <mi>c</mi> 19 | </msqrt> 20 | </mrow> 21 | <mrow> 22 | <mn>2</mn> 23 | <mi>a</mi> 24 | </mrow> 25 | </mfrac> 26 | </mrow> 27 | <mo>.</mo> 28 | </math> 29 | -------------------------------------------------------------------------------- /test/formulas/display-f6.tex: -------------------------------------------------------------------------------- 1 | x = {-b \pm \sqrt{b^2-4ac} \over 2a}. -------------------------------------------------------------------------------- /test/formulas/inline-f1.mml: -------------------------------------------------------------------------------- 1 | <math xmlns="http://www.w3.org/1998/Math/MathML" alttext="upper E equals m c squared"> 2 | <mi>E</mi> 3 | <mo>=</mo> 4 | <mi>m</mi> 5 | <msup> 6 | <mi>c</mi> 7 | <mn>2</mn> 8 | </msup> 9 | </math> 10 | -------------------------------------------------------------------------------- /test/formulas/inline-f1.tex: -------------------------------------------------------------------------------- 1 | E = mc^2 -------------------------------------------------------------------------------- /test/formulas/inline-f4.mml: -------------------------------------------------------------------------------- 1 | <math xmlns="http://www.w3.org/1998/Math/MathML" alttext="a not-equals 0"> 2 | <mi>a</mi> 3 | <mo>≠<!-- ≠ --></mo> 4 | <mn>0</mn> 5 | </math> 6 | -------------------------------------------------------------------------------- /test/formulas/inline-f4.svg: -------------------------------------------------------------------------------- 1 | <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="5.491ex" height="2.676ex" aria-labelledby="MathJax-SVG-1-Title" focusable="false" role="img" viewBox="0 -791.3 2364.1 1152.1" style="vertical-align:-.838ex"><title id="MathJax-SVG-1-Title">a not-equals 0 -------------------------------------------------------------------------------- /test/formulas/inline-f4.tex: -------------------------------------------------------------------------------- 1 | a \ne 0 -------------------------------------------------------------------------------- /test/formulas/inline-f5.mml: -------------------------------------------------------------------------------- 1 | 2 | a 3 | 4 | x 5 | 2 6 | 7 | + 8 | b 9 | x 10 | + 11 | c 12 | = 13 | 0 14 | 15 | -------------------------------------------------------------------------------- /test/formulas/inline-f5.tex: -------------------------------------------------------------------------------- 1 | ax^2 + bx + c = 0 -------------------------------------------------------------------------------- /test/images/Ornament.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhellingman/tei2html/ee777385bab4b5381df6c83e4bc883f31527945e/test/images/Ornament.png -------------------------------------------------------------------------------- /test/images/audio.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhellingman/tei2html/ee777385bab4b5381df6c83e4bc883f31527945e/test/images/audio.png -------------------------------------------------------------------------------- /test/images/book.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhellingman/tei2html/ee777385bab4b5381df6c83e4bc883f31527945e/test/images/book.png -------------------------------------------------------------------------------- /test/images/bracket-left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhellingman/tei2html/ee777385bab4b5381df6c83e4bc883f31527945e/test/images/bracket-left.png -------------------------------------------------------------------------------- /test/images/bracket.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhellingman/tei2html/ee777385bab4b5381df6c83e4bc883f31527945e/test/images/bracket.png -------------------------------------------------------------------------------- /test/images/bracket3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhellingman/tei2html/ee777385bab4b5381df6c83e4bc883f31527945e/test/images/bracket3.png -------------------------------------------------------------------------------- /test/images/card.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhellingman/tei2html/ee777385bab4b5381df6c83e4bc883f31527945e/test/images/card.png -------------------------------------------------------------------------------- /test/images/cover500.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhellingman/tei2html/ee777385bab4b5381df6c83e4bc883f31527945e/test/images/cover500.jpg -------------------------------------------------------------------------------- /test/images/external.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhellingman/tei2html/ee777385bab4b5381df6c83e4bc883f31527945e/test/images/external.png -------------------------------------------------------------------------------- /test/images/hg2101.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhellingman/tei2html/ee777385bab4b5381df6c83e4bc883f31527945e/test/images/hg2101.png -------------------------------------------------------------------------------- /test/images/initial-A.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhellingman/tei2html/ee777385bab4b5381df6c83e4bc883f31527945e/test/images/initial-A.png -------------------------------------------------------------------------------- /test/images/lbrace2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhellingman/tei2html/ee777385bab4b5381df6c83e4bc883f31527945e/test/images/lbrace2.png -------------------------------------------------------------------------------- /test/images/p081.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhellingman/tei2html/ee777385bab4b5381df6c83e4bc883f31527945e/test/images/p081.png -------------------------------------------------------------------------------- /test/images/page-image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhellingman/tei2html/ee777385bab4b5381df6c83e4bc883f31527945e/test/images/page-image.png -------------------------------------------------------------------------------- /test/images/qrcode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhellingman/tei2html/ee777385bab4b5381df6c83e4bc883f31527945e/test/images/qrcode.png -------------------------------------------------------------------------------- /test/images/rbrace2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhellingman/tei2html/ee777385bab4b5381df6c83e4bc883f31527945e/test/images/rbrace2.png -------------------------------------------------------------------------------- /test/images/tarsier.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhellingman/tei2html/ee777385bab4b5381df6c83e4bc883f31527945e/test/images/tarsier.jpg -------------------------------------------------------------------------------- /test/images/test.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhellingman/tei2html/ee777385bab4b5381df6c83e4bc883f31527945e/test/images/test.jpg -------------------------------------------------------------------------------- /test/images/thumbs/cover500.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhellingman/tei2html/ee777385bab4b5381df6c83e4bc883f31527945e/test/images/thumbs/cover500.jpg -------------------------------------------------------------------------------- /test/images/thumbs/tarsier1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhellingman/tei2html/ee777385bab4b5381df6c83e4bc883f31527945e/test/images/thumbs/tarsier1.jpg -------------------------------------------------------------------------------- /test/images/thumbs/tarsier2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhellingman/tei2html/ee777385bab4b5381df6c83e4bc883f31527945e/test/images/thumbs/tarsier2.jpg -------------------------------------------------------------------------------- /test/images/thumbs/test.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhellingman/tei2html/ee777385bab4b5381df6c83e4bc883f31527945e/test/images/thumbs/test.jpg -------------------------------------------------------------------------------- /test/images/thumbs/test1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhellingman/tei2html/ee777385bab4b5381df6c83e4bc883f31527945e/test/images/thumbs/test1.jpg -------------------------------------------------------------------------------- /test/images/thumbs/test2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhellingman/tei2html/ee777385bab4b5381df6c83e4bc883f31527945e/test/images/thumbs/test2.jpg -------------------------------------------------------------------------------- /test/metadata.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | Main Title of Work Goes Here 6 | Author of Work (Birth-year—Death-year) 7 | A. U. Thor 8 | W. Riter 9 | E. Ditor 10 | Project Gutenberg, Urbana, Illinois, USA., 2009-12-13 11 | 2009-12-13 12 | Details of the copyright status of the work go here. Most Project Gutenberg texts will be in the public domain in the US. This test file itself is released under the GNU General Public License, version 3.0, or any later version. See https://www.gnu.org/copyleft/gpl.html.Typically, the following text will be used:This eBook is for the use of anyone anywhere at no cost and with almost no restrictions whatsoever. You may copy it, give it away or re-use it under the terms of the Project Gutenberg License included with this eBook or online at www.gutenberg.org. 13 | TEI (Text Encoding Initiative) 14 | XSLT 15 | HTML 16 | A document intended to test the various features available in the Tei2html software. 17 | pg:123456789 18 | 19 | 20 | -------------------------------------------------------------------------------- /test/normalize-table-test.pl: -------------------------------------------------------------------------------- 1 | # Perl script to test the the normalize-table.xsl stylesheet with Saxon. 2 | 3 | use strict; 4 | 5 | use FindBin qw($Bin); 6 | 7 | my $toolsdir = $Bin . "/.."; 8 | my $xsldir = $toolsdir; 9 | my $saxon = "java -jar " . $toolsdir . "/tools/lib/saxon9he.jar "; 10 | my $epubcheck = "java -jar " . $toolsdir . "/tools/lib/epubcheck-3.0.1.jar "; 11 | 12 | my $filename = $ARGV[0]; 13 | 14 | system ("$saxon $filename $xsldir/normalize-table.xsl"); 15 | 16 | -------------------------------------------------------------------------------- /test/opf-manifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /test/opf-metadata.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Loon 5 | 6 | -------------------------------------------------------------------------------- /test/tei2html.config: -------------------------------------------------------------------------------- 1 | 2 | style/arctic.css, style/garamond.css 3 | -------------------------------------------------------------------------------- /test/test-alignment.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Nogmaals een test 4 | 5 |

Dit is een test van het naast elkaar afdrukken van vertaalde alinea's

6 | 7 |

Deze alinea staat in een externe bron.

8 | 9 |

De alinea's worden genummerd met het n attribuut.

10 | 11 |

Op die manier weet de stylesheet welke alinea's bij elkaar horen.

12 | 13 |

Als er af en toe een extra alinea tussendoor komt, maakt dat niet uit.

14 | 15 |

Dit maakt het eenvoudig vertalingen te controleren.

16 | 17 |

Een extra alinea, met de vertaling ernaast.

18 | 19 |

En de laatste alinea.

20 | 21 |
22 |
-------------------------------------------------------------------------------- /test/test-dc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Main Title of Work Goes Here 4 | Author of Work (Birth-year—Death-year) 5 | A. U. Thor 6 | W. Riter 7 | Project Gutenberg, Urbana, Illinois, USA., 8 April 2004 8 | 9 | Details of the copyright status of the work go here. Most Project Gutenberg texts will be in the public domain in the US. This test file itself is released under the GNU General Public License, version 3.0, or any later version. See http://www.gnu.org/copyleft/gpl.html. 10 | Typically, the following text will be used: 11 | 12 | This eBook is for the use of anyone anywhere at no cost and with almost no restrictions whatsoever. You may copy it, give it away or re-use it under the terms of the Project Gutenberg License included with this eBook or online at www.gutenberg.org. 13 | 14 | -------------------------------------------------------------------------------- /test/test-img-overlay.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 25 | 26 | 27 | 28 | 29 |

TEST TEST 30 | 31 | 32 |

33 |

I. Trilgras. 34 |
II. Reukgras. 35 |
III. Dravik. 36 |
IV. Timothee. 37 |
V. Mannagras. 38 |
VI. Witbol. 39 |
VII. Struisgras.

40 | Some grasses. 41 |
42 | 43 | 44 |

TEST TEST 45 | 46 | 47 | -------------------------------------------------------------------------------- /test/test-include.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Languages written in a different script. 4 |

First included paragraph (some Russian: русский язык).

5 |

Second included paragraph (some Greek: ελληνική γλώσσα).

6 |

Third included paragraph (some Sanskrit: संस्कृतम्).

7 | -------------------------------------------------------------------------------- /test/test.smil: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | 8 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /test/testMath/Processed/formulas/inline-f41.svg: -------------------------------------------------------------------------------- 1 | k -------------------------------------------------------------------------------- /test/testMath/Processed/formulas/inline-f42.svg: -------------------------------------------------------------------------------- 1 | n -------------------------------------------------------------------------------- /test/testMath/Processed/testMath-MML.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhellingman/tei2html/ee777385bab4b5381df6c83e4bc883f31527945e/test/testMath/Processed/testMath-MML.html -------------------------------------------------------------------------------- /test/testMath/tei2html.config: -------------------------------------------------------------------------------- 1 | 2 | SVG+IMG 3 | -------------------------------------------------------------------------------- /tools/SgmlSupport.pm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhellingman/tei2html/ee777385bab4b5381df6c83e4bc883f31527945e/tools/SgmlSupport.pm -------------------------------------------------------------------------------- /tools/addPositionInfo.pl: -------------------------------------------------------------------------------- 1 | # addPositionInfo.pl -- add linenumber and column info to SGML/XML files 2 | 3 | use strict; 4 | use warnings; 5 | 6 | my $inputFile = $ARGV[0]; 7 | 8 | open(INPUTFILE, $inputFile) || die("Could not open $inputFile"); 9 | 10 | my $lineNumber = 0; 11 | 12 | while () { 13 | my $remainder = $_; 14 | $lineNumber++; 15 | my $column = 0; 16 | 17 | while ($remainder =~ m/<([a-z][a-z0-9.:_-]*)(.*?)(\/?)>/i) { 18 | my $before = $`; 19 | my $tag = $1; 20 | my $attrs = $2; 21 | my $slash = $3; 22 | $remainder = $'; 23 | $column += length "$before"; 24 | 25 | $attrs = "$attrs pos='$lineNumber:$column'"; 26 | print "$before<$tag$attrs$slash>"; 27 | 28 | # Do not count length of added POS attribute, as it is not in the source. 29 | $column += length "<$tag$attrs$slash>"; 30 | } 31 | print $remainder; 32 | } 33 | -------------------------------------------------------------------------------- /tools/cleanHtml.pl: -------------------------------------------------------------------------------- 1 | 2 | use strict; 3 | use warnings; 4 | 5 | while (<>) { 6 | 7 | my $line = $_; 8 | 9 | $line =~ s/<\/link>//g; 10 | $line =~ s/<\/meta>//g; 11 | $line =~ s/<\/img>//g; 12 | $line =~ s/<\/hr>//g; 13 | 14 | $line =~ s//
/g; 15 | 16 | $line =~ s/