From 5270c09c3c88662c6a06a33819bc508a5d460253 Mon Sep 17 00:00:00 2001 From: Damien Daspit Date: Mon, 23 Sep 2024 08:53:18 -0500 Subject: [PATCH] Add support for USFM parsing --- .gitattributes | 2 + .github/workflows/ci-test-publish.yml | 8 +- .gitignore | 3 +- .prettierignore | 2 +- .vscode/tasks.json | 16 + eslint.config.mjs | 7 +- jest.config.js | 2 +- package-lock.json | 1700 ++++++++ package.json | 51 +- src/annotations/index.ts | 1 + src/corpora/corpora-utils.ts | 10 + .../file-paratext-project-settings-parser.ts | 36 + src/corpora/index.ts | 19 + .../paratext-project-settings-parser-base.ts | 99 + src/corpora/paratext-project-settings.ts | 100 + src/corpora/test-data/.gitattributes | 1 + src/corpora/test-data/usfm/Tes/03LEVTes.SFM | 8 + src/corpora/test-data/usfm/Tes/131CHTes.SFM | 9 + src/corpora/test-data/usfm/Tes/41MATTes.SFM | 69 + src/corpora/test-data/usfm/Tes/42MRKTes.SFM | 4 + src/corpora/test-data/usfm/Tes/44JHNTes.SFM | 0 .../usfm/Tes/ProjectBiblicalTerms.xml | 6 + src/corpora/test-data/usfm/Tes/Settings.xml | 34 + .../test-data/usfm/Tes/TermRenderings.xml | 9 + src/corpora/test-data/usfm/Tes/custom.vrs | 31 + src/corpora/test-helpers.ts | 4 + src/corpora/usfm-attribute.ts | 11 + src/corpora/usfm-parser-handler-base.ts | 89 + src/corpora/usfm-parser-handler.ts | 63 + src/corpora/usfm-parser-state.ts | 148 + src/corpora/usfm-parser.test.ts | 13 + src/corpora/usfm-parser.ts | 569 +++ src/corpora/usfm-stylesheet.ts | 456 +++ src/corpora/usfm-tag.ts | 95 + src/corpora/usfm-token.ts | 238 ++ src/corpora/usfm-tokenizer.test.ts | 60 + src/corpora/usfm-tokenizer.ts | 564 +++ src/corpora/usfm.sty | 3082 ++++++++++++++ src/corpora/usfm_sb.sty | 3606 +++++++++++++++++ src/index.ts | 37 +- src/iterable-utils.ts | 59 +- src/statistics/index.ts | 1 + src/tokenization/index.ts | 11 + src/translation/index.ts | 18 + tsconfig.build.json | 4 - tsconfig.json | 2 + tsup.config.js | 13 + 47 files changed, 11307 insertions(+), 63 deletions(-) create mode 100644 .vscode/tasks.json create mode 100644 src/annotations/index.ts create mode 100644 src/corpora/corpora-utils.ts create mode 100644 src/corpora/file-paratext-project-settings-parser.ts create mode 100644 src/corpora/index.ts create mode 100644 src/corpora/paratext-project-settings-parser-base.ts create mode 100644 src/corpora/paratext-project-settings.ts create mode 100644 src/corpora/test-data/.gitattributes create mode 100644 src/corpora/test-data/usfm/Tes/03LEVTes.SFM create mode 100644 src/corpora/test-data/usfm/Tes/131CHTes.SFM create mode 100644 src/corpora/test-data/usfm/Tes/41MATTes.SFM create mode 100644 src/corpora/test-data/usfm/Tes/42MRKTes.SFM create mode 100644 src/corpora/test-data/usfm/Tes/44JHNTes.SFM create mode 100644 src/corpora/test-data/usfm/Tes/ProjectBiblicalTerms.xml create mode 100644 src/corpora/test-data/usfm/Tes/Settings.xml create mode 100644 src/corpora/test-data/usfm/Tes/TermRenderings.xml create mode 100644 src/corpora/test-data/usfm/Tes/custom.vrs create mode 100644 src/corpora/test-helpers.ts create mode 100644 src/corpora/usfm-attribute.ts create mode 100644 src/corpora/usfm-parser-handler-base.ts create mode 100644 src/corpora/usfm-parser-handler.ts create mode 100644 src/corpora/usfm-parser-state.ts create mode 100644 src/corpora/usfm-parser.test.ts create mode 100644 src/corpora/usfm-parser.ts create mode 100644 src/corpora/usfm-stylesheet.ts create mode 100644 src/corpora/usfm-tag.ts create mode 100644 src/corpora/usfm-token.ts create mode 100644 src/corpora/usfm-tokenizer.test.ts create mode 100644 src/corpora/usfm-tokenizer.ts create mode 100644 src/corpora/usfm.sty create mode 100644 src/corpora/usfm_sb.sty create mode 100644 src/statistics/index.ts create mode 100644 src/tokenization/index.ts create mode 100644 src/translation/index.ts create mode 100644 tsup.config.js diff --git a/.gitattributes b/.gitattributes index 7d69821..9425798 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,5 +1,7 @@ *.sh eol=lf *.ts eol=lf *.js eol=lf +*.mjs eol=lf +*.cjs eol=lf *.json eol=lf *.yml eol=lf diff --git a/.github/workflows/ci-test-publish.yml b/.github/workflows/ci-test-publish.yml index 4958503..737ce5b 100644 --- a/.github/workflows/ci-test-publish.yml +++ b/.github/workflows/ci-test-publish.yml @@ -6,10 +6,10 @@ name: CI Build on: push: - branches: [master] - tags: ["**"] - pull_request: - branches: [master] + branches: + - "**" + tags: + - "v*" jobs: build: diff --git a/.gitignore b/.gitignore index aacf7d1..39f0dfd 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,5 @@ # compiled output -/lib -/ts3.4 +/dist *.tgz # test output diff --git a/.prettierignore b/.prettierignore index a65b417..1521c8b 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1 +1 @@ -lib +dist diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 0000000..2e2921f --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,16 @@ +{ + "version": "2.0.0", + "tasks": [ + { + "type": "npm", + "script": "build", + "group": { + "kind": "build", + "isDefault": true + }, + "problemMatcher": [], + "label": "npm: build", + "detail": "tsup && copyfiles -u 1 src/**/*.sty dist" + } + ] +} diff --git a/eslint.config.mjs b/eslint.config.mjs index d5a572e..476e157 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -1,5 +1,3 @@ -// @ts-check - import eslint from "@eslint/js"; import eslintConfigPrettier from "eslint-config-prettier"; import simpleImportSort from "eslint-plugin-simple-import-sort"; @@ -7,7 +5,7 @@ import tseslint from "typescript-eslint"; export default tseslint.config( { - ignores: ["coverage/*", "public/*", "lib/*", "package-lock.json", "jest.config.js"], + ignores: ["coverage/*", "public/*", "dist/*", "package-lock.json", "jest.config.js", "tsup.config.js"], }, eslint.configs.recommended, ...tseslint.configs.strictTypeChecked, @@ -37,6 +35,9 @@ export default tseslint.config( ignoreRestSiblings: true, }, ], + "@typescript-eslint/no-unsafe-enum-comparison": "off", + "@typescript-eslint/no-non-null-assertion": "off", + "@typescript-eslint/no-empty-function": "off", }, }, { diff --git a/jest.config.js b/jest.config.js index 8824c11..3d4d6f3 100644 --- a/jest.config.js +++ b/jest.config.js @@ -1,3 +1,3 @@ -module.exports = { +export default { preset: 'ts-jest', }; diff --git a/package-lock.json b/package-lock.json index fccdb46..113fb7b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,12 +9,16 @@ "version": "2.4.2", "license": "MIT", "dependencies": { + "@sillsdev/scripture": "^2.0.1", + "fast-xml-parser": "^4.5.0", "mnemonist": "^0.39.8" }, "devDependencies": { "@eslint/js": "^9.10.0", "@types/eslint__js": "^8.42.3", "@types/jest": "^29.5.13", + "copyfiles": "^2.4.1", + "esbuild-fix-imports-plugin": "^1.0.4", "eslint": "^9.10.0", "eslint-config-prettier": "^9.1.0", "eslint-import-resolver-typescript": "^3.6.3", @@ -25,6 +29,7 @@ "prettier": "^3.3.3", "ts-jest": "^29.2.5", "ts-mockito": "^2.6.1", + "tsup": "^8.3.0", "typescript": "^5.5.4", "typescript-eslint": "^8.6.0" } @@ -667,6 +672,414 @@ "dev": true, "license": "MIT" }, + "node_modules/@esbuild/aix-ppc64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.23.1.tgz", + "integrity": "sha512-6VhYk1diRqrhBAqpJEdjASR/+WVRtfjpqKuNw11cLiaWpAT/Uu+nokB+UJnevzy/P9C/ty6AOe0dwueMrGh/iQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.23.1.tgz", + "integrity": "sha512-uz6/tEy2IFm9RYOyvKl88zdzZfwEfKZmnX9Cj1BHjeSGNuGLuMD1kR8y5bteYmwqKm1tj8m4cb/aKEorr6fHWQ==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.23.1.tgz", + "integrity": "sha512-xw50ipykXcLstLeWH7WRdQuysJqejuAGPd30vd1i5zSyKK3WE+ijzHmLKxdiCMtH1pHz78rOg0BKSYOSB/2Khw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-x64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.23.1.tgz", + "integrity": "sha512-nlN9B69St9BwUoB+jkyU090bru8L0NA3yFvAd7k8dNsVH8bi9a8cUAUSEcEEgTp2z3dbEDGJGfP6VUnkQnlReg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-arm64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.23.1.tgz", + "integrity": "sha512-YsS2e3Wtgnw7Wq53XXBLcV6JhRsEq8hkfg91ESVadIrzr9wO6jJDMZnCQbHm1Guc5t/CdDiFSSfWP58FNuvT3Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-x64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.23.1.tgz", + "integrity": "sha512-aClqdgTDVPSEGgoCS8QDG37Gu8yc9lTHNAQlsztQ6ENetKEO//b8y31MMu2ZaPbn4kVsIABzVLXYLhCGekGDqw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.23.1.tgz", + "integrity": "sha512-h1k6yS8/pN/NHlMl5+v4XPfikhJulk4G+tKGFIOwURBSFzE8bixw1ebjluLOjfwtLqY0kewfjLSrO6tN2MgIhA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-x64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.23.1.tgz", + "integrity": "sha512-lK1eJeyk1ZX8UklqFd/3A60UuZ/6UVfGT2LuGo3Wp4/z7eRTRYY+0xOu2kpClP+vMTi9wKOfXi2vjUpO1Ro76g==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.23.1.tgz", + "integrity": "sha512-CXXkzgn+dXAPs3WBwE+Kvnrf4WECwBdfjfeYHpMeVxWE0EceB6vhWGShs6wi0IYEqMSIzdOF1XjQ/Mkm5d7ZdQ==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.23.1.tgz", + "integrity": "sha512-/93bf2yxencYDnItMYV/v116zff6UyTjo4EtEQjUBeGiVpMmffDNUyD9UN2zV+V3LRV3/on4xdZ26NKzn6754g==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.23.1.tgz", + "integrity": "sha512-VTN4EuOHwXEkXzX5nTvVY4s7E/Krz7COC8xkftbbKRYAl96vPiUssGkeMELQMOnLOJ8k3BY1+ZY52tttZnHcXQ==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.23.1.tgz", + "integrity": "sha512-Vx09LzEoBa5zDnieH8LSMRToj7ir/Jeq0Gu6qJ/1GcBq9GkfoEAoXvLiW1U9J1qE/Y/Oyaq33w5p2ZWrNNHNEw==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.23.1.tgz", + "integrity": "sha512-nrFzzMQ7W4WRLNUOU5dlWAqa6yVeI0P78WKGUo7lg2HShq/yx+UYkeNSE0SSfSure0SqgnsxPvmAUu/vu0E+3Q==", + "cpu": [ + "mips64el" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.23.1.tgz", + "integrity": "sha512-dKN8fgVqd0vUIjxuJI6P/9SSSe/mB9rvA98CSH2sJnlZ/OCZWO1DJvxj8jvKTfYUdGfcq2dDxoKaC6bHuTlgcw==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.23.1.tgz", + "integrity": "sha512-5AV4Pzp80fhHL83JM6LoA6pTQVWgB1HovMBsLQ9OZWLDqVY8MVobBXNSmAJi//Csh6tcY7e7Lny2Hg1tElMjIA==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.23.1.tgz", + "integrity": "sha512-9ygs73tuFCe6f6m/Tb+9LtYxWR4c9yg7zjt2cYkjDbDpV/xVn+68cQxMXCjUpYwEkze2RcU/rMnfIXNRFmSoDw==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.23.1.tgz", + "integrity": "sha512-EV6+ovTsEXCPAp58g2dD68LxoP/wK5pRvgy0J/HxPGB009omFPv3Yet0HiaqvrIrgPTBuC6wCH1LTOY91EO5hQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.23.1.tgz", + "integrity": "sha512-aevEkCNu7KlPRpYLjwmdcuNz6bDFiE7Z8XC4CPqExjTvrHugh28QzUXVOZtiYghciKUacNktqxdpymplil1beA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-arm64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.23.1.tgz", + "integrity": "sha512-3x37szhLexNA4bXhLrCC/LImN/YtWis6WXr1VESlfVtVeoFJBRINPJ3f0a/6LV8zpikqoUg4hyXw0sFBt5Cr+Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.23.1.tgz", + "integrity": "sha512-aY2gMmKmPhxfU+0EdnN+XNtGbjfQgwZj43k8G3fyrDM/UdZww6xrWxmDkuz2eCZchqVeABjV5BpildOrUbBTqA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.23.1.tgz", + "integrity": "sha512-RBRT2gqEl0IKQABT4XTj78tpk9v7ehp+mazn2HbUeZl1YMdaGAQqhapjGTCe7uw7y0frDi4gS0uHzhvpFuI1sA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.23.1.tgz", + "integrity": "sha512-4O+gPR5rEBe2FpKOVyiJ7wNDPA8nGzDuJ6gN4okSA1gEOYZ67N8JPk58tkWtdtPeLz7lBnY6I5L3jdsr3S+A6A==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.23.1.tgz", + "integrity": "sha512-BcaL0Vn6QwCwre3Y717nVHZbAa4UBEigzFm6VdsVdT/MbZ38xoj1X9HPkZhbmaBGUD1W8vxAfffbDe8bA6AKnQ==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.23.1.tgz", + "integrity": "sha512-BHpFFeslkWrXWyUPnbKm+xYYVYruCinGcftSBaa8zoF9hZO4BcSCFUvHVTtzpIY6YzUnYtuEhZ+C9iEXjxnasg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, "node_modules/@eslint-community/eslint-utils": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", @@ -793,6 +1206,109 @@ "url": "https://github.com/sponsors/nzakas" } }, + "node_modules/@isaacs/cliui": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", + "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", + "dev": true, + "license": "ISC", + "dependencies": { + "string-width": "^5.1.2", + "string-width-cjs": "npm:string-width@^4.2.0", + "strip-ansi": "^7.0.1", + "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", + "wrap-ansi": "^8.1.0", + "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@isaacs/cliui/node_modules/ansi-regex": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", + "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/ansi-styles": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/emoji-regex": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", + "dev": true, + "license": "MIT" + }, + "node_modules/@isaacs/cliui/node_modules/string-width": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", + "dev": true, + "license": "MIT", + "dependencies": { + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@isaacs/cliui/node_modules/strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/wrap-ansi": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", + "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^6.1.0", + "string-width": "^5.0.1", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, "node_modules/@istanbuljs/load-nyc-config": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", @@ -1303,6 +1819,17 @@ "node": ">=12.4.0" } }, + "node_modules/@pkgjs/parseargs": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", + "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", + "dev": true, + "license": "MIT", + "optional": true, + "engines": { + "node": ">=14" + } + }, "node_modules/@pkgr/core": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/@pkgr/core/-/core-0.1.1.tgz", @@ -1316,6 +1843,236 @@ "url": "https://opencollective.com/unts" } }, + "node_modules/@rollup/rollup-android-arm-eabi": { + "version": "4.22.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.22.4.tgz", + "integrity": "sha512-Fxamp4aEZnfPOcGA8KSNEohV8hX7zVHOemC8jVBoBUHu5zpJK/Eu3uJwt6BMgy9fkvzxDaurgj96F/NiLukF2w==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-android-arm64": { + "version": "4.22.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.22.4.tgz", + "integrity": "sha512-VXoK5UMrgECLYaMuGuVTOx5kcuap1Jm8g/M83RnCHBKOqvPPmROFJGQaZhGccnsFtfXQ3XYa4/jMCJvZnbJBdA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-darwin-arm64": { + "version": "4.22.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.22.4.tgz", + "integrity": "sha512-xMM9ORBqu81jyMKCDP+SZDhnX2QEVQzTcC6G18KlTQEzWK8r/oNZtKuZaCcHhnsa6fEeOBionoyl5JsAbE/36Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-darwin-x64": { + "version": "4.22.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.22.4.tgz", + "integrity": "sha512-aJJyYKQwbHuhTUrjWjxEvGnNNBCnmpHDvrb8JFDbeSH3m2XdHcxDd3jthAzvmoI8w/kSjd2y0udT+4okADsZIw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-linux-arm-gnueabihf": { + "version": "4.22.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.22.4.tgz", + "integrity": "sha512-j63YtCIRAzbO+gC2L9dWXRh5BFetsv0j0va0Wi9epXDgU/XUi5dJKo4USTttVyK7fGw2nPWK0PbAvyliz50SCQ==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm-musleabihf": { + "version": "4.22.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.22.4.tgz", + "integrity": "sha512-dJnWUgwWBX1YBRsuKKMOlXCzh2Wu1mlHzv20TpqEsfdZLb3WoJW2kIEsGwLkroYf24IrPAvOT/ZQ2OYMV6vlrg==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-gnu": { + "version": "4.22.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.22.4.tgz", + "integrity": "sha512-AdPRoNi3NKVLolCN/Sp4F4N1d98c4SBnHMKoLuiG6RXgoZ4sllseuGioszumnPGmPM2O7qaAX/IJdeDU8f26Aw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-musl": { + "version": "4.22.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.22.4.tgz", + "integrity": "sha512-Gl0AxBtDg8uoAn5CCqQDMqAx22Wx22pjDOjBdmG0VIWX3qUBHzYmOKh8KXHL4UpogfJ14G4wk16EQogF+v8hmA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-powerpc64le-gnu": { + "version": "4.22.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.22.4.tgz", + "integrity": "sha512-3aVCK9xfWW1oGQpTsYJJPF6bfpWfhbRnhdlyhak2ZiyFLDaayz0EP5j9V1RVLAAxlmWKTDfS9wyRyY3hvhPoOg==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-gnu": { + "version": "4.22.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.22.4.tgz", + "integrity": "sha512-ePYIir6VYnhgv2C5Xe9u+ico4t8sZWXschR6fMgoPUK31yQu7hTEJb7bCqivHECwIClJfKgE7zYsh1qTP3WHUA==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-s390x-gnu": { + "version": "4.22.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.22.4.tgz", + "integrity": "sha512-GqFJ9wLlbB9daxhVlrTe61vJtEY99/xB3C8e4ULVsVfflcpmR6c8UZXjtkMA6FhNONhj2eA5Tk9uAVw5orEs4Q==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-gnu": { + "version": "4.22.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.22.4.tgz", + "integrity": "sha512-87v0ol2sH9GE3cLQLNEy0K/R0pz1nvg76o8M5nhMR0+Q+BBGLnb35P0fVz4CQxHYXaAOhE8HhlkaZfsdUOlHwg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-musl": { + "version": "4.22.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.22.4.tgz", + "integrity": "sha512-UV6FZMUgePDZrFjrNGIWzDo/vABebuXBhJEqrHxrGiU6HikPy0Z3LfdtciIttEUQfuDdCn8fqh7wiFJjCNwO+g==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-win32-arm64-msvc": { + "version": "4.22.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.22.4.tgz", + "integrity": "sha512-BjI+NVVEGAXjGWYHz/vv0pBqfGoUH0IGZ0cICTn7kB9PyjrATSkX+8WkguNjWoj2qSr1im/+tTGRaY+4/PdcQw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-ia32-msvc": { + "version": "4.22.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.22.4.tgz", + "integrity": "sha512-SiWG/1TuUdPvYmzmYnmd3IEifzR61Tragkbx9D3+R8mzQqDBz8v+BvZNDlkiTtI9T15KYZhP0ehn3Dld4n9J5g==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-x64-msvc": { + "version": "4.22.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.22.4.tgz", + "integrity": "sha512-j8pPKp53/lq9lMXN57S8cFz0MynJk8OWNuUnXct/9KCpKU7DgU3bYMJhwWmcqC0UU29p8Lr0/7KEVcaM6bf47Q==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@sillsdev/scripture": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@sillsdev/scripture/-/scripture-2.0.1.tgz", + "integrity": "sha512-hE8vN+j7JOKqKxyGSFCEgzW7SpRmplePYnNMyZnxmzxUs+7NCM72UnxIpb0XSy40a6ViE22Shx6Lvhqq83Bisg==", + "license": "MIT" + }, "node_modules/@sinclair/typebox": { "version": "0.27.8", "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.8.tgz", @@ -1816,6 +2573,13 @@ "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, + "node_modules/any-promise": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz", + "integrity": "sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==", + "dev": true, + "license": "MIT" + }, "node_modules/anymatch": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", @@ -1977,6 +2741,19 @@ "dev": true, "license": "MIT" }, + "node_modules/binary-extensions": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", + "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -2064,6 +2841,32 @@ "dev": true, "license": "MIT" }, + "node_modules/bundle-require": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/bundle-require/-/bundle-require-5.0.0.tgz", + "integrity": "sha512-GuziW3fSSmopcx4KRymQEJVbZUfqlCqcq7dvs6TYwKRZiegK/2buMxQTPs6MGlNv50wms1699qYO54R8XfRX4w==", + "dev": true, + "license": "MIT", + "dependencies": { + "load-tsconfig": "^0.2.3" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "peerDependencies": { + "esbuild": ">=0.18" + } + }, + "node_modules/cac": { + "version": "6.7.14", + "resolved": "https://registry.npmjs.org/cac/-/cac-6.7.14.tgz", + "integrity": "sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, "node_modules/callsites": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", @@ -2132,6 +2935,44 @@ "node": ">=10" } }, + "node_modules/chokidar": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", + "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", + "dev": true, + "license": "MIT", + "dependencies": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + }, + "engines": { + "node": ">= 8.10.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/chokidar/node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/ci-info": { "version": "3.9.0", "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.9.0.tgz", @@ -2208,6 +3049,16 @@ "dev": true, "license": "MIT" }, + "node_modules/commander": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz", + "integrity": "sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 6" + } + }, "node_modules/concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", @@ -2215,6 +3066,16 @@ "dev": true, "license": "MIT" }, + "node_modules/consola": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/consola/-/consola-3.2.3.tgz", + "integrity": "sha512-I5qxpzLv+sJhTVEoLYNcTW+bThDCPsit0vLNKShZx6rLtpilNpmmeTPaeqJb9ZE9dV3DGaeby6Vuhrw38WjeyQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^14.18.0 || >=16.10.0" + } + }, "node_modules/convert-source-map": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", @@ -2222,6 +3083,74 @@ "dev": true, "license": "MIT" }, + "node_modules/copyfiles": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/copyfiles/-/copyfiles-2.4.1.tgz", + "integrity": "sha512-fereAvAvxDrQDOXybk3Qu3dPbOoKoysFMWtkY3mv5BsL8//OSZVL5DCLYqgRfY5cWirgRzlC+WSrxp6Bo3eNZg==", + "dev": true, + "license": "MIT", + "dependencies": { + "glob": "^7.0.5", + "minimatch": "^3.0.3", + "mkdirp": "^1.0.4", + "noms": "0.0.0", + "through2": "^2.0.1", + "untildify": "^4.0.0", + "yargs": "^16.1.0" + }, + "bin": { + "copyfiles": "copyfiles", + "copyup": "copyfiles" + } + }, + "node_modules/copyfiles/node_modules/cliui": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" + } + }, + "node_modules/copyfiles/node_modules/yargs": { + "version": "16.2.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", + "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", + "dev": true, + "license": "MIT", + "dependencies": { + "cliui": "^7.0.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.0", + "y18n": "^5.0.5", + "yargs-parser": "^20.2.2" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/copyfiles/node_modules/yargs-parser": { + "version": "20.2.9", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", + "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=10" + } + }, + "node_modules/core-util-is": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", + "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==", + "dev": true, + "license": "MIT" + }, "node_modules/create-jest": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/create-jest/-/create-jest-29.7.0.tgz", @@ -2329,6 +3258,13 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, + "node_modules/eastasianwidth": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", + "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", + "dev": true, + "license": "MIT" + }, "node_modules/ejs": { "version": "3.1.10", "resolved": "https://registry.npmjs.org/ejs/-/ejs-3.1.10.tgz", @@ -2396,6 +3332,53 @@ "is-arrayish": "^0.2.1" } }, + "node_modules/esbuild": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.23.1.tgz", + "integrity": "sha512-VVNz/9Sa0bs5SELtn3f7qhJCDPCF5oMEl5cO9/SSinpE9hbPVvxbd572HH5AKiP7WD8INO53GgfDDhRjkylHEg==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=18" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.23.1", + "@esbuild/android-arm": "0.23.1", + "@esbuild/android-arm64": "0.23.1", + "@esbuild/android-x64": "0.23.1", + "@esbuild/darwin-arm64": "0.23.1", + "@esbuild/darwin-x64": "0.23.1", + "@esbuild/freebsd-arm64": "0.23.1", + "@esbuild/freebsd-x64": "0.23.1", + "@esbuild/linux-arm": "0.23.1", + "@esbuild/linux-arm64": "0.23.1", + "@esbuild/linux-ia32": "0.23.1", + "@esbuild/linux-loong64": "0.23.1", + "@esbuild/linux-mips64el": "0.23.1", + "@esbuild/linux-ppc64": "0.23.1", + "@esbuild/linux-riscv64": "0.23.1", + "@esbuild/linux-s390x": "0.23.1", + "@esbuild/linux-x64": "0.23.1", + "@esbuild/netbsd-x64": "0.23.1", + "@esbuild/openbsd-arm64": "0.23.1", + "@esbuild/openbsd-x64": "0.23.1", + "@esbuild/sunos-x64": "0.23.1", + "@esbuild/win32-arm64": "0.23.1", + "@esbuild/win32-ia32": "0.23.1", + "@esbuild/win32-x64": "0.23.1" + } + }, + "node_modules/esbuild-fix-imports-plugin": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/esbuild-fix-imports-plugin/-/esbuild-fix-imports-plugin-1.0.4.tgz", + "integrity": "sha512-1KRpb8d86uqOjx0tf3X1Tl4iwN0yQHXA79ZvC8A5PQKx6dvB+EFkCHcsUYKi+7Sh1dsuhydeKJKKaxMWRAZcTA==", + "dev": true, + "license": "ISC" + }, "node_modules/escalade": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", @@ -2839,6 +3822,28 @@ "dev": true, "license": "MIT" }, + "node_modules/fast-xml-parser": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-4.5.0.tgz", + "integrity": "sha512-/PlTQCI96+fZMAOLMZK4CWG1ItCbfZ/0jx7UIJFChPNrx7tcEgerUgWbeieCM9MfHInUDyK8DWYZ+YrywDJuTg==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/NaturalIntelligence" + }, + { + "type": "paypal", + "url": "https://paypal.me/naturalintelligence" + } + ], + "license": "MIT", + "dependencies": { + "strnum": "^1.0.5" + }, + "bin": { + "fxparser": "src/cli/cli.js" + } + }, "node_modules/fastq": { "version": "1.17.1", "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz", @@ -2956,6 +3961,36 @@ "dev": true, "license": "ISC" }, + "node_modules/foreground-child": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.0.tgz", + "integrity": "sha512-Ld2g8rrAyMYFXBhEqMz8ZAHBi4J4uS1i/CxGMDnjyFWddMXLVcDp051DZfu+t7+ab7Wv6SMqpWmyFIj5UbfFvg==", + "dev": true, + "license": "ISC", + "dependencies": { + "cross-spawn": "^7.0.0", + "signal-exit": "^4.0.1" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/foreground-child/node_modules/signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", @@ -3229,6 +4264,19 @@ "dev": true, "license": "MIT" }, + "node_modules/is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dev": true, + "license": "MIT", + "dependencies": { + "binary-extensions": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/is-bun-module": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/is-bun-module/-/is-bun-module-1.2.1.tgz", @@ -3331,6 +4379,13 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ==", + "dev": true, + "license": "MIT" + }, "node_modules/isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", @@ -3409,6 +4464,22 @@ "node": ">=8" } }, + "node_modules/jackspeak": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz", + "integrity": "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "@isaacs/cliui": "^8.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + }, + "optionalDependencies": { + "@pkgjs/parseargs": "^0.11.0" + } + }, "node_modules/jake": { "version": "10.9.2", "resolved": "https://registry.npmjs.org/jake/-/jake-10.9.2.tgz", @@ -4027,6 +5098,16 @@ "url": "https://github.com/chalk/supports-color?sponsor=1" } }, + "node_modules/joycon": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/joycon/-/joycon-3.1.1.tgz", + "integrity": "sha512-34wB/Y7MW7bzjKRjUKTa46I2Z7eV62Rkhva+KkopW7Qvv/OSWBqvkSY7vusOPrNuZcUG3tApvdVgNB8POj3SPw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + } + }, "node_modules/js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", @@ -4145,6 +5226,19 @@ "node": ">= 0.8.0" } }, + "node_modules/lilconfig": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-3.1.2.tgz", + "integrity": "sha512-eop+wDAvpItUys0FWkHIKeC9ybYrTGbU41U5K7+bttZZeohvnY7M9dZ5kB21GNWiFT2q1OoPTvncPCgSOVO5ow==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/antonk52" + } + }, "node_modules/lines-and-columns": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", @@ -4152,6 +5246,16 @@ "dev": true, "license": "MIT" }, + "node_modules/load-tsconfig": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/load-tsconfig/-/load-tsconfig-0.2.5.tgz", + "integrity": "sha512-IXO6OCs9yg8tMKzfPZ1YmheJbZCiEsnBdcB03l0OcfK9prKnJb96siuHCr5Fl37/yo9DnKU+TLpxzTUspw9shg==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + } + }, "node_modules/locate-path": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", @@ -4189,6 +5293,13 @@ "dev": true, "license": "MIT" }, + "node_modules/lodash.sortby": { + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/lodash.sortby/-/lodash.sortby-4.7.0.tgz", + "integrity": "sha512-HDWXG8isMntAyRF5vZ7xKuEvOhT4AhlRt/3czTSjvGUxjYCBVRQY48ViDHyfYz9VIoBkW4TMGQNapx+l3RUwdA==", + "dev": true, + "license": "MIT" + }, "node_modules/lru-cache": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", @@ -4286,6 +5397,16 @@ "node": "*" } }, + "node_modules/minipass": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, "node_modules/mkdirp": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", @@ -4315,6 +5436,18 @@ "dev": true, "license": "MIT" }, + "node_modules/mz": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/mz/-/mz-2.7.0.tgz", + "integrity": "sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "any-promise": "^1.0.0", + "object-assign": "^4.0.1", + "thenify-all": "^1.0.0" + } + }, "node_modules/natural-compare": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", @@ -4336,6 +5469,17 @@ "dev": true, "license": "MIT" }, + "node_modules/noms": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/noms/-/noms-0.0.0.tgz", + "integrity": "sha512-lNDU9VJaOPxUmXcLb+HQFeUgQQPtMI24Gt6hgfuMHRJgMRHMF/qZ4HJD3GDru4sSw9IQl2jPjAYnQrdIeLbwow==", + "dev": true, + "license": "ISC", + "dependencies": { + "inherits": "^2.0.1", + "readable-stream": "~1.0.31" + } + }, "node_modules/normalize-path": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", @@ -4359,6 +5503,16 @@ "node": ">=8" } }, + "node_modules/object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/obliterator": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/obliterator/-/obliterator-2.0.4.tgz", @@ -4451,6 +5605,13 @@ "node": ">=6" } }, + "node_modules/package-json-from-dist": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.0.tgz", + "integrity": "sha512-dATvCeZN/8wQsGywez1mzHtTlP22H8OEfPrVMLNr4/eGa+ijtLn/6M5f0dY8UKNrC2O9UCU6SSoG3qRKnt7STw==", + "dev": true, + "license": "BlueOak-1.0.0" + }, "node_modules/parent-module": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", @@ -4520,6 +5681,30 @@ "dev": true, "license": "MIT" }, + "node_modules/path-scurry": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", + "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "lru-cache": "^10.2.0", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" + }, + "engines": { + "node": ">=16 || 14 >=14.18" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/path-scurry/node_modules/lru-cache": { + "version": "10.4.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", + "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", + "dev": true, + "license": "ISC" + }, "node_modules/picocolors": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.0.tgz", @@ -4619,6 +5804,49 @@ "node": ">=8" } }, + "node_modules/postcss-load-config": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-6.0.1.tgz", + "integrity": "sha512-oPtTM4oerL+UXmx+93ytZVN82RrlY/wPUV8IeDxFrzIjXOLF1pN+EmKPLbubvKHT2HC20xXsCAH2Z+CKV6Oz/g==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "lilconfig": "^3.1.1" + }, + "engines": { + "node": ">= 18" + }, + "peerDependencies": { + "jiti": ">=1.21.0", + "postcss": ">=8.0.9", + "tsx": "^4.8.1", + "yaml": "^2.4.2" + }, + "peerDependenciesMeta": { + "jiti": { + "optional": true + }, + "postcss": { + "optional": true + }, + "tsx": { + "optional": true + }, + "yaml": { + "optional": true + } + } + }, "node_modules/prelude-ls": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", @@ -4686,6 +5914,13 @@ "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, + "node_modules/process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", + "dev": true, + "license": "MIT" + }, "node_modules/prompts": { "version": "2.4.2", "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz", @@ -4755,6 +5990,32 @@ "dev": true, "license": "MIT" }, + "node_modules/readable-stream": { + "version": "1.0.34", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", + "integrity": "sha512-ok1qVCJuRkNmvebYikljxJA/UEsKwLl2nI1OmaqAu4/UE+h0wKCHok4XkL/gvi39OacXvw59RJUOFUkDib2rHg==", + "dev": true, + "license": "MIT", + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "0.0.1", + "string_decoder": "~0.10.x" + } + }, + "node_modules/readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "dev": true, + "license": "MIT", + "dependencies": { + "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" + } + }, "node_modules/require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", @@ -4847,6 +6108,49 @@ "node": ">=0.10.0" } }, + "node_modules/rollup": { + "version": "4.22.4", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.22.4.tgz", + "integrity": "sha512-vD8HJ5raRcWOyymsR6Z3o6+RzfEPCnVLMFJ6vRslO1jt4LO6dUo5Qnpg7y4RkZFM2DMe3WUirkI5c16onjrc6A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/estree": "1.0.5" + }, + "bin": { + "rollup": "dist/bin/rollup" + }, + "engines": { + "node": ">=18.0.0", + "npm": ">=8.0.0" + }, + "optionalDependencies": { + "@rollup/rollup-android-arm-eabi": "4.22.4", + "@rollup/rollup-android-arm64": "4.22.4", + "@rollup/rollup-darwin-arm64": "4.22.4", + "@rollup/rollup-darwin-x64": "4.22.4", + "@rollup/rollup-linux-arm-gnueabihf": "4.22.4", + "@rollup/rollup-linux-arm-musleabihf": "4.22.4", + "@rollup/rollup-linux-arm64-gnu": "4.22.4", + "@rollup/rollup-linux-arm64-musl": "4.22.4", + "@rollup/rollup-linux-powerpc64le-gnu": "4.22.4", + "@rollup/rollup-linux-riscv64-gnu": "4.22.4", + "@rollup/rollup-linux-s390x-gnu": "4.22.4", + "@rollup/rollup-linux-x64-gnu": "4.22.4", + "@rollup/rollup-linux-x64-musl": "4.22.4", + "@rollup/rollup-win32-arm64-msvc": "4.22.4", + "@rollup/rollup-win32-ia32-msvc": "4.22.4", + "@rollup/rollup-win32-x64-msvc": "4.22.4", + "fsevents": "~2.3.2" + } + }, + "node_modules/rollup/node_modules/@types/estree": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz", + "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==", + "dev": true, + "license": "MIT" + }, "node_modules/run-parallel": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", @@ -4871,6 +6175,13 @@ "queue-microtask": "^1.2.2" } }, + "node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true, + "license": "MIT" + }, "node_modules/semver": { "version": "7.6.3", "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", @@ -4982,6 +6293,13 @@ "node": ">=8" } }, + "node_modules/string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha512-ev2QzSzWPYmy9GuqfIVildA4OdcGLeFZQrq5ys6RtiuF+RQQiZWr8TZNyAcuVXyQRYfEO+MsoB/1BuQVhOJuoQ==", + "dev": true, + "license": "MIT" + }, "node_modules/string-length": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/string-length/-/string-length-4.0.2.tgz", @@ -5011,6 +6329,22 @@ "node": ">=8" } }, + "node_modules/string-width-cjs": { + "name": "string-width", + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/strip-ansi": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", @@ -5024,6 +6358,20 @@ "node": ">=8" } }, + "node_modules/strip-ansi-cjs": { + "name": "strip-ansi", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/strip-bom": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz", @@ -5057,6 +6405,82 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/strnum": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/strnum/-/strnum-1.0.5.tgz", + "integrity": "sha512-J8bbNyKKXl5qYcR36TIO8W3mVGVHrmmxsd5PAItGkmyzwJvybiw2IVq5nqd0i4LSNSkB/sx9VHllbfFdr9k1JA==", + "license": "MIT" + }, + "node_modules/sucrase": { + "version": "3.35.0", + "resolved": "https://registry.npmjs.org/sucrase/-/sucrase-3.35.0.tgz", + "integrity": "sha512-8EbVDiu9iN/nESwxeSxDKe0dunta1GOlHufmSSXxMD2z2/tMZpDMpvXQGsc+ajGo8y2uYUmixaSRUc/QPoQ0GA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.2", + "commander": "^4.0.0", + "glob": "^10.3.10", + "lines-and-columns": "^1.1.6", + "mz": "^2.7.0", + "pirates": "^4.0.1", + "ts-interface-checker": "^0.1.9" + }, + "bin": { + "sucrase": "bin/sucrase", + "sucrase-node": "bin/sucrase-node" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/sucrase/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/sucrase/node_modules/glob": { + "version": "10.4.5", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz", + "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==", + "dev": true, + "license": "ISC", + "dependencies": { + "foreground-child": "^3.1.0", + "jackspeak": "^3.1.2", + "minimatch": "^9.0.4", + "minipass": "^7.1.2", + "package-json-from-dist": "^1.0.0", + "path-scurry": "^1.11.1" + }, + "bin": { + "glob": "dist/esm/bin.mjs" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/sucrase/node_modules/minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -5132,6 +6556,115 @@ "dev": true, "license": "MIT" }, + "node_modules/thenify": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/thenify/-/thenify-3.3.1.tgz", + "integrity": "sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==", + "dev": true, + "license": "MIT", + "dependencies": { + "any-promise": "^1.0.0" + } + }, + "node_modules/thenify-all": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/thenify-all/-/thenify-all-1.6.0.tgz", + "integrity": "sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA==", + "dev": true, + "license": "MIT", + "dependencies": { + "thenify": ">= 3.1.0 < 4" + }, + "engines": { + "node": ">=0.8" + } + }, + "node_modules/through2": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", + "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "readable-stream": "~2.3.6", + "xtend": "~4.0.1" + } + }, + "node_modules/through2/node_modules/isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/through2/node_modules/readable-stream": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", + "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", + "dev": true, + "license": "MIT", + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "node_modules/through2/node_modules/string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "license": "MIT", + "dependencies": { + "safe-buffer": "~5.1.0" + } + }, + "node_modules/tinyglobby": { + "version": "0.2.6", + "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.6.tgz", + "integrity": "sha512-NbBoFBpqfcgd1tCiO8Lkfdk+xrA7mlLR9zgvZcZWQQwU63XAfUePyd6wZBaU93Hqw347lHnwFzttAkemHzzz4g==", + "dev": true, + "license": "ISC", + "dependencies": { + "fdir": "^6.3.0", + "picomatch": "^4.0.2" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/tinyglobby/node_modules/fdir": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.3.0.tgz", + "integrity": "sha512-QOnuT+BOtivR77wYvCWHfGt9s4Pz1VIMbD463vegT5MLqNXy8rYFT/lPVEqf/bhYeT6qmqrNHhsX+rWwe3rOCQ==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "picomatch": "^3 || ^4" + }, + "peerDependenciesMeta": { + "picomatch": { + "optional": true + } + } + }, + "node_modules/tinyglobby/node_modules/picomatch": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.2.tgz", + "integrity": "sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, "node_modules/tmpl": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.5.tgz", @@ -5162,6 +6695,26 @@ "node": ">=8.0" } }, + "node_modules/tr46": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-1.0.1.tgz", + "integrity": "sha512-dTpowEjclQ7Kgx5SdBkqRzVhERQXov8/l9Ft9dVM9fmg0W0KQSVaXX9T4i6twCPNtYiZM53lpSSUAwJbFPOHxA==", + "dev": true, + "license": "MIT", + "dependencies": { + "punycode": "^2.1.0" + } + }, + "node_modules/tree-kill": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.2.tgz", + "integrity": "sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==", + "dev": true, + "license": "MIT", + "bin": { + "tree-kill": "cli.js" + } + }, "node_modules/ts-api-utils": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.3.0.tgz", @@ -5175,6 +6728,13 @@ "typescript": ">=4.2.0" } }, + "node_modules/ts-interface-checker": { + "version": "0.1.13", + "resolved": "https://registry.npmjs.org/ts-interface-checker/-/ts-interface-checker-0.1.13.tgz", + "integrity": "sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==", + "dev": true, + "license": "Apache-2.0" + }, "node_modules/ts-jest": { "version": "29.2.5", "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.2.5.tgz", @@ -5241,6 +6801,81 @@ "dev": true, "license": "0BSD" }, + "node_modules/tsup": { + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/tsup/-/tsup-8.3.0.tgz", + "integrity": "sha512-ALscEeyS03IomcuNdFdc0YWGVIkwH1Ws7nfTbAPuoILvEV2hpGQAY72LIOjglGo4ShWpZfpBqP/jpQVCzqYQag==", + "dev": true, + "license": "MIT", + "dependencies": { + "bundle-require": "^5.0.0", + "cac": "^6.7.14", + "chokidar": "^3.6.0", + "consola": "^3.2.3", + "debug": "^4.3.5", + "esbuild": "^0.23.0", + "execa": "^5.1.1", + "joycon": "^3.1.1", + "picocolors": "^1.0.1", + "postcss-load-config": "^6.0.1", + "resolve-from": "^5.0.0", + "rollup": "^4.19.0", + "source-map": "0.8.0-beta.0", + "sucrase": "^3.35.0", + "tinyglobby": "^0.2.1", + "tree-kill": "^1.2.2" + }, + "bin": { + "tsup": "dist/cli-default.js", + "tsup-node": "dist/cli-node.js" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@microsoft/api-extractor": "^7.36.0", + "@swc/core": "^1", + "postcss": "^8.4.12", + "typescript": ">=4.5.0" + }, + "peerDependenciesMeta": { + "@microsoft/api-extractor": { + "optional": true + }, + "@swc/core": { + "optional": true + }, + "postcss": { + "optional": true + }, + "typescript": { + "optional": true + } + } + }, + "node_modules/tsup/node_modules/resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/tsup/node_modules/source-map": { + "version": "0.8.0-beta.0", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.8.0-beta.0.tgz", + "integrity": "sha512-2ymg6oRBpebeZi9UUNsgQ89bhx01TcTkmNTGnNO88imTmbSgy4nfujrgVEFKWpMTEGA11EDkTt7mqObTPdigIA==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "whatwg-url": "^7.0.0" + }, + "engines": { + "node": ">= 8" + } + }, "node_modules/type-check": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", @@ -5309,6 +6944,16 @@ "dev": true, "license": "MIT" }, + "node_modules/untildify": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/untildify/-/untildify-4.0.0.tgz", + "integrity": "sha512-KK8xQ1mkzZeg9inewmFVDNkg3l5LUhoq9kN6iWYB/CC9YMG8HA+c1Q8HwDe6dEX7kErrEVNVBO3fWsVq5iDgtw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, "node_modules/update-browserslist-db": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.0.tgz", @@ -5350,6 +6995,13 @@ "punycode": "^2.1.0" } }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "dev": true, + "license": "MIT" + }, "node_modules/uuid": { "version": "8.3.2", "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", @@ -5385,6 +7037,25 @@ "makeerror": "1.0.12" } }, + "node_modules/webidl-conversions": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-4.0.2.tgz", + "integrity": "sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg==", + "dev": true, + "license": "BSD-2-Clause" + }, + "node_modules/whatwg-url": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-7.1.0.tgz", + "integrity": "sha512-WUu7Rg1DroM7oQvGWfOiAK21n74Gg+T4elXEQYkOhtyLeWiJFoOGLXPKI/9gzIie9CtwVLm8wtw6YJdKyxSjeg==", + "dev": true, + "license": "MIT", + "dependencies": { + "lodash.sortby": "^4.7.0", + "tr46": "^1.0.1", + "webidl-conversions": "^4.0.2" + } + }, "node_modules/which": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", @@ -5429,6 +7100,25 @@ "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, + "node_modules/wrap-ansi-cjs": { + "name": "wrap-ansi", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, "node_modules/wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", @@ -5457,6 +7147,16 @@ "dev": true, "license": "MIT" }, + "node_modules/xtend": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", + "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.4" + } + }, "node_modules/y18n": { "version": "5.0.8", "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", diff --git a/package.json b/package.json index 377fa62..daa00d2 100644 --- a/package.json +++ b/package.json @@ -2,15 +2,43 @@ "name": "@sillsdev/machine", "version": "2.4.2", "description": "A natural language processing library that is focused on providing tools for processing resource-poor languages.", - "main": "lib/index.js", - "types": "lib/index.d.ts", + "type": "module", + "types": "./dist/index.d.ts", + "module": "./dist/index.js", + "main": "./dist/index.cjs", + "exports": { + ".": { + "types": "./dist/index.d.ts", + "import": "./dist/index.js", + "require": "./dist/index.cjs" + }, + "./corpora": { + "types": "./dist/corpora/index.d.ts", + "import": "./dist/corpora/index.js", + "require": "./dist/corpora/index.cjs" + }, + "./tokenization": { + "types": "./dist/tokenization/index.d.ts", + "import": "./dist/tokenization/index.js", + "require": "./dist/tokenization/index.cjs" + }, + "./translation": { + "types": "./dist/translation/index.d.ts", + "import": "./dist/translation/index.js", + "require": "./dist/translation/index.cjs" + } + }, + "browser": { + "fs/promises": false, + "path": false, + "fs": false + }, "scripts": { "test": "jest", - "build": "tsc -b tsconfig.build.json", - "prepare": "npm run build", - "prettier": "prettier --write \"**/*.{ts,js,json,md,yml}\"", - "prettier:ci": "prettier --list-different \"**/*.{ts,js,json,md,yml}\"", - "test:ci": "jest --config jest.config.js --ci --reporters=jest-junit --coverage", + "build": "tsup && copyfiles -u 1 src/**/*.sty dist", + "prettier": "prettier --write \"**/*.{ts,js,mjs,json,md,yml}\"", + "prettier:ci": "prettier --list-different \"**/*.{ts,js,mjs,json,md,yml}\"", + "test:ci": "jest --config jest.config.js --ci --coverage", "lint": "eslint . --max-warnings 0" }, "repository": { @@ -24,7 +52,7 @@ "machine", "translation" ], - "author": "SIL International", + "author": "SIL Global", "license": "MIT", "bugs": { "url": "https://github.com/sillsdev/machine.js/issues" @@ -34,6 +62,8 @@ "@eslint/js": "^9.10.0", "@types/eslint__js": "^8.42.3", "@types/jest": "^29.5.13", + "copyfiles": "^2.4.1", + "esbuild-fix-imports-plugin": "^1.0.4", "eslint": "^9.10.0", "eslint-config-prettier": "^9.1.0", "eslint-import-resolver-typescript": "^3.6.3", @@ -44,15 +74,18 @@ "prettier": "^3.3.3", "ts-jest": "^29.2.5", "ts-mockito": "^2.6.1", + "tsup": "^8.3.0", "typescript": "^5.5.4", "typescript-eslint": "^8.6.0" }, "dependencies": { + "@sillsdev/scripture": "^2.0.1", + "fast-xml-parser": "^4.5.0", "mnemonist": "^0.39.8" }, "files": [ "LICENSE", "README.md", - "lib/**/*" + "dist/**/*" ] } diff --git a/src/annotations/index.ts b/src/annotations/index.ts new file mode 100644 index 0000000..576ddb1 --- /dev/null +++ b/src/annotations/index.ts @@ -0,0 +1 @@ +export { createRange, Range } from './range'; diff --git a/src/corpora/corpora-utils.ts b/src/corpora/corpora-utils.ts new file mode 100644 index 0000000..57f3e52 --- /dev/null +++ b/src/corpora/corpora-utils.ts @@ -0,0 +1,10 @@ +const ENCODINGS = new Map([ + [1200, 'utf16le'], + [20127, 'ascii'], + [28591, 'latin1'], + [65001, 'utf8'], +]); + +export function getEncoding(codePage: number): string | undefined { + return ENCODINGS.get(codePage); +} diff --git a/src/corpora/file-paratext-project-settings-parser.ts b/src/corpora/file-paratext-project-settings-parser.ts new file mode 100644 index 0000000..8e5c0e8 --- /dev/null +++ b/src/corpora/file-paratext-project-settings-parser.ts @@ -0,0 +1,36 @@ +import { access, readdir, readFile } from 'fs/promises'; +import { join } from 'path'; + +import { ParatextProjectSettingsParserBase } from './paratext-project-settings-parser-base'; +import { createUsfmStylesheet, UsfmStylesheet } from './usfm-stylesheet'; + +export class FileParatextProjectSettingsParser extends ParatextProjectSettingsParserBase { + constructor(private readonly projectDir: string) { + super(); + } + + protected async createStylesheet(fileName: string): Promise { + const customStylesheetFileName = join(this.projectDir, fileName); + return await createUsfmStylesheet( + fileName, + (await this.exists(customStylesheetFileName)) ? customStylesheetFileName : undefined, + ); + } + + protected async exists(fileName: string): Promise { + try { + await access(join(this.projectDir, fileName)); + return true; + } catch { + return false; + } + } + + protected async find(extension: string): Promise { + return (await readdir(this.projectDir)).find((fileName) => fileName.endsWith(extension)); + } + + protected open(fileName: string): Promise { + return readFile(join(this.projectDir, fileName)); + } +} diff --git a/src/corpora/index.ts b/src/corpora/index.ts new file mode 100644 index 0000000..f1cbc89 --- /dev/null +++ b/src/corpora/index.ts @@ -0,0 +1,19 @@ +export { FileParatextProjectSettingsParser } from './file-paratext-project-settings-parser'; +export { ParatextProjectSettings } from './paratext-project-settings'; +export { ParatextProjectSettingsParserBase } from './paratext-project-settings-parser-base'; +export { UsfmAttribute } from './usfm-attribute'; +export { parseUsfm, UsfmParser } from './usfm-parser'; +export type { UsfmParserHandler } from './usfm-parser-handler'; +export { UsfmParserHandlerBase } from './usfm-parser-handler-base'; +export { UsfmElementType, UsfmParserElement, UsfmParserState } from './usfm-parser-state'; +export { createUsfmStylesheet, UsfmStylesheet } from './usfm-stylesheet'; +export { + UsfmJustification, + UsfmStyleAttribute, + UsfmStyleType, + UsfmTag, + UsfmTextProperties, + UsfmTextType, +} from './usfm-tag'; +export { UsfmToken, UsfmTokenType } from './usfm-token'; +export { RtlReferenceOrder, UsfmTokenizer } from './usfm-tokenizer'; diff --git a/src/corpora/paratext-project-settings-parser-base.ts b/src/corpora/paratext-project-settings-parser-base.ts new file mode 100644 index 0000000..e76a66a --- /dev/null +++ b/src/corpora/paratext-project-settings-parser-base.ts @@ -0,0 +1,99 @@ +/* eslint-disable @typescript-eslint/no-unsafe-member-access */ +/* eslint-disable @typescript-eslint/no-unsafe-assignment */ +import { ScrVers } from '@sillsdev/scripture'; +import { XMLParser } from 'fast-xml-parser'; + +import { getEncoding } from './corpora-utils'; +import { ParatextProjectSettings } from './paratext-project-settings'; +import { UsfmStylesheet } from './usfm-stylesheet'; + +export abstract class ParatextProjectSettingsParserBase { + async parse(): Promise { + let settingsFileName: string | undefined = 'Settings.xml'; + if (!(await this.exists(settingsFileName))) { + settingsFileName = await this.find('.ssf'); + } + if (settingsFileName == null) { + throw new Error('The project does not contain a settings file.'); + } + const parser = new XMLParser(); + + const settingsXml = parser.parse(await this.open(settingsFileName)); + const root = settingsXml.ScriptureText; + const name = (root.Name as string | undefined) ?? ''; + const fullName = (root.FullName as string | undefined) ?? ''; + const encodingStr = (root.Encoding as string | undefined) ?? '65001'; + const codePage = parseInt(encodingStr); + if (isNaN(codePage)) { + throw new Error(`The project uses a legacy encoding that requires TECKit, map file: ${encodingStr}.`); + } + const encoding = getEncoding(codePage); + if (encoding == null) { + throw new Error(`Code page ${codePage.toString()} not supported.`); + } + + const versificationType = (root.Versification as string | undefined) ?? '4'; + const versification = new ScrVers(parseInt(versificationType)); + let stylesheetFileName = (root.StyleSheet as string | undefined) ?? 'usfm.sty'; + if (!(await this.exists(stylesheetFileName)) && stylesheetFileName !== 'usfm_sb.sty') { + stylesheetFileName = 'usfm.sty'; + } + const stylesheet = await this.createStylesheet(stylesheetFileName); + + let prefix = ''; + let form = '41MAT'; + let suffix = '.SFM'; + const namingElem = root.Naming; + if (namingElem != null) { + const prePart = namingElem.PrePart as string | undefined; + if (prePart != null) { + prefix = prePart; + } + const bookNameForm = namingElem.BookNameForm as string | undefined; + if (bookNameForm != null) { + form = bookNameForm; + } + const postPart = namingElem.PostPart as string | undefined; + if (postPart != null) { + suffix = postPart; + } + } + const biblicalTermsListSetting = + (root.BiblicalTermsListSetting as string | undefined) ?? 'Major::BiblicalTerms.xml'; + const biblicalTermsListParts = biblicalTermsListSetting.split(':', 2); + if (biblicalTermsListParts.length !== 3) { + throw new Error( + `The BiblicalTermsListSetting element in Settings.xml in project ${fullName} is not in the` + + ` expected format (e.g., Major::BiblicalTerms.xml) but is ${biblicalTermsListSetting}.`, + ); + } + let languageCode: string | undefined = undefined; + const languageIsoCodeSetting = (root.LanguageIsoCode as string | undefined) ?? ''; + if (languageIsoCodeSetting !== '') { + const languageIsoCodeParts = languageIsoCodeSetting.split(':'); + if (languageIsoCodeParts.length > 0) { + languageCode = languageIsoCodeParts[0]; + } + } + + return new ParatextProjectSettings( + name, + fullName, + encoding, + versification, + stylesheet, + prefix, + form, + suffix, + biblicalTermsListParts[0], + biblicalTermsListParts[1], + biblicalTermsListParts[2], + languageCode, + ); + } + + protected abstract exists(fileName: string): Promise; + protected abstract find(extension: string): Promise; + protected abstract open(fileName: string): Promise; + protected abstract createStylesheet(fileName: string): Promise; +} diff --git a/src/corpora/paratext-project-settings.ts b/src/corpora/paratext-project-settings.ts new file mode 100644 index 0000000..43d843b --- /dev/null +++ b/src/corpora/paratext-project-settings.ts @@ -0,0 +1,100 @@ +import { Canon, ScrVers } from '@sillsdev/scripture'; + +import { UsfmStylesheet } from './usfm-stylesheet'; + +export class ParatextProjectSettings { + constructor( + public readonly name: string, + public readonly fullName: string, + public readonly encoding: string, + public readonly versification: ScrVers, + public readonly stylesheet: UsfmStylesheet, + public readonly fileNamePrefix: string, + public readonly fileNameForm: string, + public readonly fileNameSuffix: string, + public readonly biblicalTermsListType: string, + public readonly biblicalTermsProjectName: string, + public readonly biblicalTermsFileName: string, + public readonly languageCode?: string, + ) {} + + getBookId(fileName: string): string | undefined { + if (!fileName.startsWith(this.fileNamePrefix) || !fileName.endsWith(this.fileNameSuffix)) { + return undefined; + } + + const bookPart = fileName.substring(this.fileNamePrefix.length, fileName.length - this.fileNameSuffix.length); + if (this.fileNameForm === 'MAT') { + if (bookPart.length !== 3) { + return undefined; + } + return bookPart; + } + if (this.fileNameForm === '40' || this.fileNameForm === '41') { + if (bookPart !== '100' && bookPart.length !== 2) { + return undefined; + } + return Canon.bookNumberToId(getBookNumber(bookPart)); + } + + if (bookPart.startsWith('100')) { + if (bookPart.length !== 6) { + return undefined; + } + } else if (bookPart.length !== 5) { + return undefined; + } + return bookPart.length === 5 ? bookPart.substring(2) : bookPart.substring(3); + } + + getBookFileName(bookId: string): string { + let bookPart: string; + if (this.fileNameForm === 'MAT') { + bookPart = bookId; + } + if (this.fileNameForm === '40' || this.fileNameForm === '41') { + bookPart = getBookFileNameDigits(bookId); + } else { + bookPart = getBookFileNameDigits(bookId) + bookId; + } + return this.fileNamePrefix + bookPart + this.fileNameSuffix; + } +} + +function getBookFileNameDigits(bookId: string): string { + const bookNum = Canon.bookIdToNumber(bookId); + if (bookNum < 10) { + return '0' + bookNum.toString(); + } + if (bookNum < 40) { + return bookNum.toString(); + } + if (bookNum < 100) { + return (bookNum + 1).toString(); + } + if (bookNum < 110) { + return 'A' + (bookNum - 100).toString(); + } + if (bookNum < 120) { + return 'B' + (bookNum - 110).toString(); + } + return 'C' + (bookNum - 120).toString(); +} + +function getBookNumber(bookFileNameDigits: string): number { + if (bookFileNameDigits.startsWith('A')) { + return 100 + parseInt(bookFileNameDigits.substring(1)); + } + if (bookFileNameDigits.startsWith('B')) { + return 110 + parseInt(bookFileNameDigits.substring(1)); + } + if (bookFileNameDigits.startsWith('C')) { + return 120 + parseInt(bookFileNameDigits.substring(1)); + } + + const bookNum = parseInt(bookFileNameDigits); + if (bookNum >= 40) { + return bookNum - 1; + } + return bookNum; +} diff --git a/src/corpora/test-data/.gitattributes b/src/corpora/test-data/.gitattributes new file mode 100644 index 0000000..e29803a --- /dev/null +++ b/src/corpora/test-data/.gitattributes @@ -0,0 +1 @@ +*.SFM eol=crlf diff --git a/src/corpora/test-data/usfm/Tes/03LEVTes.SFM b/src/corpora/test-data/usfm/Tes/03LEVTes.SFM new file mode 100644 index 0000000..6fc8cd9 --- /dev/null +++ b/src/corpora/test-data/usfm/Tes/03LEVTes.SFM @@ -0,0 +1,8 @@ +\id lev - Test +\h Leviticus +\mt Leviticus +\c 14 +\p +\v 55 Chapter fourteen, verse fifty-five. +\v 55b Segment b. +\v 56 Chapter fourteen, verse fifty-six. diff --git a/src/corpora/test-data/usfm/Tes/131CHTes.SFM b/src/corpora/test-data/usfm/Tes/131CHTes.SFM new file mode 100644 index 0000000..328b513 --- /dev/null +++ b/src/corpora/test-data/usfm/Tes/131CHTes.SFM @@ -0,0 +1,9 @@ +\id 1CH - Test +\h 1 Chronicles +\mt 1 Chronicles +\c 12 +\p +\v 1 Chapter twelve, verse one. +\v 2 Chapter twelve, verse two. +\v 3-7 Chapter twelve, verses three through seven. +\v 8 Chapter twelve, verse eight. diff --git a/src/corpora/test-data/usfm/Tes/41MATTes.SFM b/src/corpora/test-data/usfm/Tes/41MATTes.SFM new file mode 100644 index 0000000..672b93d --- /dev/null +++ b/src/corpora/test-data/usfm/Tes/41MATTes.SFM @@ -0,0 +1,69 @@ +\id MAT - Test +\f + \fr 1.0 \ft \f* +\h Matthew +\mt Matthew +\ip An introduction to Matthew\fe + \ft This is an endnote.\fe* +\p \rq MAT 1\rq* Here is another paragraph. +\p and with a \w keyword|a special concept\w* in it. +\p and a \weirdtaglookingthing that is not an actual tag. +\c 1 +\s Chapter One +\v 1 Chapter \pn one\+pro WON\+pro*\pn*, verse one.\f + \fr 1:1: \ft This is a footnote.\f* +\li1 +\v 2 \bd C\bd*hapter one, +\li2 verse\f + \fr 1:2: \ft This is a footnote.\f* two. +\v 3 Chapter one \w*, +\li2 verse three. +\v 4 Chapter one,  +\li2 verse four, +\v 5 Chapter one, +\li2 verse \fig Figure 1|src="image1.png" size="col" ref="1:5"\fig* five. +\v 6 Verse 6 content. +\v 7 +\v 8 +\c 2 +\tr \tc1 Row one, column one. \tc2 Row one, column two. +\tr \tc1 Row two, column one. \tc2 Row two, column two. +\s1 Chapter \it Two \it* +\p +\p +\v 1 Chapter \add two\add*, verse \f + \fr 2:1: \ft This is a footnote.\f*one. +\v 2-3 Chapter two, // verse \fm ∆\fm*two. +\esb +\ms This is a sidebar +\p Here is some sidebar // content. +\esbe +\v 3-4a Chapter two, verse \w three|lemma\w*. +\v 4b Chapter two, verse four. +\p +\v 6 Chapter two, verse \w six|strong="12345" \w*. +\p +\v 6 Bad verse. \x - \xo abc\xt 123\x* and more content. +\p +\v 5 Chapter two, verse five \rq (MAT 3:1)\rq*. +\v 7a Chapter two, verse seven A, +\s Section header \ts-s\* +\p +\v 7b verse seven B. +\p +\v 8 This is a list: \ts-e\* +\b +\tr \tc1 +\v 9 Chapter\tcr2 2\tc3 verse\tcr4 9 +\tr \tc1-2 +\v 10 \tc3-4 \qt-s |Jesus\*Chapter 2 verse 10\qt-e\* +\v 11-12 +\restore restore information +\c 3 +\cl PSALM 3 +\s1 Section 1 +\mt1 Major Title 1 +\d \va (1)\va* Description +\q1 +\v 1 \va 2\va*\vp 1 (2)\vp* Chapter 3 verse 1. +\q1 3.1 part 2 +\b +\q1 3.1 part 3 +\q1 3.1 part 4 +\c 4 +\v 1 diff --git a/src/corpora/test-data/usfm/Tes/42MRKTes.SFM b/src/corpora/test-data/usfm/Tes/42MRKTes.SFM new file mode 100644 index 0000000..4600096 --- /dev/null +++ b/src/corpora/test-data/usfm/Tes/42MRKTes.SFM @@ -0,0 +1,4 @@ +\id MRK - Test +\h Mark +\mt Mark +\ip An introduction to Mark \ No newline at end of file diff --git a/src/corpora/test-data/usfm/Tes/44JHNTes.SFM b/src/corpora/test-data/usfm/Tes/44JHNTes.SFM new file mode 100644 index 0000000..e69de29 diff --git a/src/corpora/test-data/usfm/Tes/ProjectBiblicalTerms.xml b/src/corpora/test-data/usfm/Tes/ProjectBiblicalTerms.xml new file mode 100644 index 0000000..a1f4f38 --- /dev/null +++ b/src/corpora/test-data/usfm/Tes/ProjectBiblicalTerms.xml @@ -0,0 +1,6 @@ + + + PN + Ahasuerus + + \ No newline at end of file diff --git a/src/corpora/test-data/usfm/Tes/Settings.xml b/src/corpora/test-data/usfm/Tes/Settings.xml new file mode 100644 index 0000000..d76bcbc --- /dev/null +++ b/src/corpora/test-data/usfm/Tes/Settings.xml @@ -0,0 +1,34 @@ + + usfm.sty + 4 + en::: + English + 8.0.100.76 + Test + 65001 + T + + NFC + Tes + a7e0b3ce0200736062f9f810a444dbfbe64aca35 + Charis SIL + 12 + + + + 41MAT + + Tes.SFM + Project:Tes:ProjectBiblicalTerms.xml + F + F + F + Public + Standard:: + + 3 + 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000001100000000000000000000000000000000000000000000000000000000000000000000000000000000000 + + + \ No newline at end of file diff --git a/src/corpora/test-data/usfm/Tes/TermRenderings.xml b/src/corpora/test-data/usfm/Tes/TermRenderings.xml new file mode 100644 index 0000000..4a25a9f --- /dev/null +++ b/src/corpora/test-data/usfm/Tes/TermRenderings.xml @@ -0,0 +1,9 @@ + + + Xerxes + + + + + + diff --git a/src/corpora/test-data/usfm/Tes/custom.vrs b/src/corpora/test-data/usfm/Tes/custom.vrs new file mode 100644 index 0000000..9c1cd38 --- /dev/null +++ b/src/corpora/test-data/usfm/Tes/custom.vrs @@ -0,0 +1,31 @@ +# custom.vrs + +LEV 14:56 +ROM 14:26 +REV 12:17 +TOB 5:22 +TOB 10:12 +SIR 23:28 +ESG 1:22 +ESG 3:15 +ESG 5:14 +ESG 8:17 +ESG 10:14 +SIR 33:33 +SIR 41:24 +BAR 1:22 +4MA 7:25 +4MA 12:20 + +# deliberately missing verses +-ROM 16:26 +-ROM 16:27 +-3JN 1:15 +-S3Y 1:49 +-ESG 4:6 +-ESG 9:5 +-ESG 9:30 + +LEV 14:55 = LEV 14:55 +LEV 14:55 = LEV 14:56 +LEV 14:56 = LEV 14:57 diff --git a/src/corpora/test-helpers.ts b/src/corpora/test-helpers.ts new file mode 100644 index 0000000..d126175 --- /dev/null +++ b/src/corpora/test-helpers.ts @@ -0,0 +1,4 @@ +import { join } from 'path'; + +export const TEST_DATA_PATH = join(__dirname, 'test-data'); +export const USFM_TEST_PROJECT_PATH = join(TEST_DATA_PATH, 'usfm', 'Tes'); diff --git a/src/corpora/usfm-attribute.ts b/src/corpora/usfm-attribute.ts new file mode 100644 index 0000000..3b8ebe4 --- /dev/null +++ b/src/corpora/usfm-attribute.ts @@ -0,0 +1,11 @@ +export class UsfmAttribute { + constructor( + public readonly name: string, + public readonly value: string, + public readonly offset = 0, + ) {} + + toString(): string { + return `${this.name}="${this.value}"`; + } +} diff --git a/src/corpora/usfm-parser-handler-base.ts b/src/corpora/usfm-parser-handler-base.ts new file mode 100644 index 0000000..90b083c --- /dev/null +++ b/src/corpora/usfm-parser-handler-base.ts @@ -0,0 +1,89 @@ +import { UsfmAttribute } from './usfm-attribute'; +import { UsfmParserHandler } from './usfm-parser-handler'; +import { UsfmParserState } from './usfm-parser-state'; + +export class UsfmParserHandlerBase implements UsfmParserHandler { + startUsfm(_state: UsfmParserState): void {} + + endUsfm(_state: UsfmParserState): void {} + + gotMarker(_state: UsfmParserState, _marker: string): void {} + + startBook(_state: UsfmParserState, _marker: string, _code: string): void {} + + endBook(_state: UsfmParserState, _marker: string): void {} + + chapter( + _state: UsfmParserState, + _number: string, + _marker: string, + _altNumber: string | undefined, + _pubNumber: string | undefined, + ): void {} + + verse( + _state: UsfmParserState, + _number: string, + _marker: string, + _altNumber: string | undefined, + _pubNumber: string | undefined, + ): void {} + + startPara( + _state: UsfmParserState, + _marker: string, + _unknown: boolean, + _attributes: readonly UsfmAttribute[] | undefined, + ): void {} + + endPara(_state: UsfmParserState, _marker: string): void {} + + startChar( + _state: UsfmParserState, + _markerWithoutPlus: string, + _unknown: boolean, + _attributes: readonly UsfmAttribute[] | undefined, + ): void {} + + endChar( + _state: UsfmParserState, + _marker: string, + _attributes: readonly UsfmAttribute[] | undefined, + _closed: boolean, + ): void {} + + startNote(_state: UsfmParserState, _marker: string, _caller: string, _category: string | undefined): void {} + + endNote(_state: UsfmParserState, _marker: string, _closed: boolean): void {} + + startTable(_state: UsfmParserState): void {} + + endTable(_state: UsfmParserState): void {} + + startRow(_state: UsfmParserState, _marker: string): void {} + + endRow(_state: UsfmParserState, _marker: string): void {} + + startCell(_state: UsfmParserState, _marker: string, _align: string, _colspan: number): void {} + + endCell(_state: UsfmParserState, _marker: string): void {} + + text(_state: UsfmParserState, _text: string): void {} + + unmatched(_state: UsfmParserState, _marker: string): void {} + + ref(_state: UsfmParserState, _marker: string, _display: string, _target: string): void {} + + startSidebar(_state: UsfmParserState, _marker: string, _category: string | undefined): void {} + + endSidebar(_state: UsfmParserState, _marker: string, _closed: boolean): void {} + + optBreak(_state: UsfmParserState): void {} + + milestone( + _state: UsfmParserState, + _marker: string, + _startMilestone: boolean, + _attributes: readonly UsfmAttribute[] | undefined, + ): void {} +} diff --git a/src/corpora/usfm-parser-handler.ts b/src/corpora/usfm-parser-handler.ts new file mode 100644 index 0000000..c4ec745 --- /dev/null +++ b/src/corpora/usfm-parser-handler.ts @@ -0,0 +1,63 @@ +import { UsfmAttribute } from './usfm-attribute'; +import { UsfmParserState } from './usfm-parser-state'; + +export interface UsfmParserHandler { + startUsfm(state: UsfmParserState): void; + endUsfm(state: UsfmParserState): void; + gotMarker(state: UsfmParserState, marker: string): void; + startBook(state: UsfmParserState, marker: string, code: string): void; + endBook(state: UsfmParserState, marker: string): void; + chapter( + state: UsfmParserState, + number: string, + marker: string, + altNumber: string | undefined, + pubNumber: string | undefined, + ): void; + verse( + state: UsfmParserState, + number: string, + marker: string, + altNumber: string | undefined, + pubNumber: string | undefined, + ): void; + startPara( + state: UsfmParserState, + marker: string, + unknown: boolean, + attributes: readonly UsfmAttribute[] | undefined, + ): void; + endPara(state: UsfmParserState, marker: string): void; + startChar( + state: UsfmParserState, + markerWithoutPlus: string, + unknown: boolean, + attributes: readonly UsfmAttribute[] | undefined, + ): void; + endChar( + state: UsfmParserState, + marker: string, + attributes: readonly UsfmAttribute[] | undefined, + closed: boolean, + ): void; + startNote(state: UsfmParserState, marker: string, caller: string, category: string | undefined): void; + endNote(state: UsfmParserState, marker: string, closed: boolean): void; + startTable(state: UsfmParserState): void; + endTable(state: UsfmParserState): void; + startRow(state: UsfmParserState, marker: string): void; + endRow(state: UsfmParserState, marker: string): void; + startCell(state: UsfmParserState, marker: string, align: string, colspan: number): void; + endCell(state: UsfmParserState, marker: string): void; + text(state: UsfmParserState, text: string): void; + unmatched(state: UsfmParserState, marker: string): void; + ref(state: UsfmParserState, marker: string, display: string, target: string): void; + startSidebar(state: UsfmParserState, marker: string, category: string | undefined): void; + endSidebar(state: UsfmParserState, marker: string, closed: boolean): void; + optBreak(state: UsfmParserState): void; + milestone( + state: UsfmParserState, + marker: string, + startMilestone: boolean, + attributes: readonly UsfmAttribute[] | undefined, + ): void; +} diff --git a/src/corpora/usfm-parser-state.ts b/src/corpora/usfm-parser-state.ts new file mode 100644 index 0000000..02c6793 --- /dev/null +++ b/src/corpora/usfm-parser-state.ts @@ -0,0 +1,148 @@ +import { ScrVers, VerseRef } from '@sillsdev/scripture'; + +import { any, firstOrUndefined, lastOrUndefined } from '../iterable-utils'; +import { UsfmAttribute } from './usfm-attribute'; +import { UsfmStylesheet } from './usfm-stylesheet'; +import { UsfmTag, UsfmTextType } from './usfm-tag'; +import { UsfmToken } from './usfm-token'; + +export enum UsfmElementType { + Book, + Para, + Char, + Table, + Row, + Cell, + Note, + Sidebar, +} + +export class UsfmParserElement { + constructor( + public readonly type: UsfmElementType, + public readonly marker?: string, + public readonly attributes?: readonly UsfmAttribute[], + ) {} +} + +export class UsfmParserState { + public verseRef: VerseRef; + public verseOffset = 0; + public lineNumber = 1; + public columnNumber = 0; + public index = -1; + public specialToken = false; + public specialTokenCount = 0; + + private readonly _stack: UsfmParserElement[] = []; + + constructor( + public readonly stylesheet: UsfmStylesheet, + versification: ScrVers, + public readonly tokens: readonly UsfmToken[], + ) { + this.verseRef = new VerseRef(versification); + } + + get token(): UsfmToken | undefined { + return this.index >= 0 ? this.tokens[this.index] : undefined; + } + + get prevToken(): UsfmToken | undefined { + return this.index >= 1 ? this.tokens[this.index - 1] : undefined; + } + + get stack(): readonly UsfmParserElement[] { + return this._stack; + } + + get isFigure(): boolean { + return this.charTag?.marker === 'fig'; + } + + get paraTag(): UsfmTag | undefined { + const elem = lastOrUndefined( + this._stack, + (elem) => + elem.type === UsfmElementType.Para || + elem.type === UsfmElementType.Book || + elem.type === UsfmElementType.Row || + elem.type === UsfmElementType.Sidebar, + ); + if (elem?.marker != null) { + return this.stylesheet.getTag(elem.marker); + } + return undefined; + } + + get charTag(): UsfmTag | undefined { + return firstOrUndefined(this.charTags); + } + + get charTags(): IterableIterator { + return this.getCharTags(); + } + + get noteTag(): UsfmTag | undefined { + const elem = lastOrUndefined(this._stack, (elem) => elem.type === UsfmElementType.Note); + if (elem?.marker != null) { + return this.stylesheet.getTag(elem.marker); + } + return undefined; + } + + get isVersePara(): boolean { + // If the user enters no markers except just \c and \v we want the text to be considered verse text. This is + // covered by the empty stack that makes para_tag=None. Not specified text type is verse text + const paraTag = this.paraTag; + return ( + paraTag == null || paraTag.textType === UsfmTextType.VerseText || paraTag.textType === UsfmTextType.NotSpecified + ); + } + + get isVerseText(): boolean { + // Sidebars and notes are not verse text + if (any(this._stack, (elem) => elem.type === UsfmElementType.Sidebar || elem.type === UsfmElementType.Note)) { + return false; + } + + if (!this.isVersePara) { + return false; + } + + // All character tags must be verse text + for (const charTag of this.charTags) { + // Not specified text type is verse text + if (charTag.textType !== UsfmTextType.VerseText && charTag.textType !== 0) { + return false; + } + } + + return true; + } + + get isSpecialText(): boolean { + return this.specialToken; + } + + peek(): UsfmParserElement { + return this._stack[this._stack.length - 1]; + } + + push(elem: UsfmParserElement): void { + this._stack.push(elem); + } + + pop(): UsfmParserElement { + return this._stack.pop()!; + } + + private *getCharTags(): IterableIterator { + for (let i = this._stack.length - 1; i >= 0; i--) { + const elem = this._stack[i]; + if (elem.type === UsfmElementType.Char && elem.marker != null) { + yield this.stylesheet.getTag(elem.marker); + } + } + } +} diff --git a/src/corpora/usfm-parser.test.ts b/src/corpora/usfm-parser.test.ts new file mode 100644 index 0000000..51c3425 --- /dev/null +++ b/src/corpora/usfm-parser.test.ts @@ -0,0 +1,13 @@ +import { UsfmParser } from './usfm-parser'; + +describe('UsfmParser', () => { + it('processToken', () => { + const usfm = `\\id MAT - Test +\\c 1 +\\p +\\v 1 This is the first verse. +`; + const parser = new UsfmParser(usfm); + parser.processToken(); + }); +}); diff --git a/src/corpora/usfm-parser.ts b/src/corpora/usfm-parser.ts new file mode 100644 index 0000000..de5e53e --- /dev/null +++ b/src/corpora/usfm-parser.ts @@ -0,0 +1,569 @@ +import { Canon, ScrVers } from '@sillsdev/scripture'; + +import { all, any } from '../iterable-utils'; +import { UsfmParserHandler } from './usfm-parser-handler'; +import { UsfmElementType, UsfmParserElement, UsfmParserState } from './usfm-parser-state'; +import { createUsfmStylesheet, isCellRange, UsfmStylesheet } from './usfm-stylesheet'; +import { UsfmTextType } from './usfm-tag'; +import { UsfmToken, UsfmTokenType } from './usfm-token'; +import { UsfmTokenizer } from './usfm-tokenizer'; + +const OPT_BREAK_SPLITTER = /(\/\/)/; + +export async function parseUsfm( + usfm: string, + handler: UsfmParserHandler, + stylesheet: string | UsfmStylesheet = 'usfm.sty', + versification?: ScrVers, + preserveWhitespace = false, +): Promise { + if (typeof stylesheet === 'string') { + stylesheet = await createUsfmStylesheet(stylesheet); + } + const parser = new UsfmParser(usfm, handler, stylesheet, versification, preserveWhitespace); + parser.processTokens(); +} + +export class UsfmParser { + public readonly tokens: readonly UsfmToken[]; + public readonly state: UsfmParserState; + public readonly stylesheet: UsfmStylesheet; + + constructor( + usfm: string | readonly UsfmToken[], + public readonly handler?: UsfmParserHandler, + stylesheet: string | UsfmStylesheet = 'usfm.sty', + versification?: ScrVers, + public readonly tokensPreserveWhitespace = false, + ) { + if (typeof stylesheet === 'string') { + this.stylesheet = new UsfmStylesheet(stylesheet); + } else { + this.stylesheet = stylesheet; + } + if (typeof usfm === 'string') { + const tokenizer = new UsfmTokenizer(this.stylesheet); + this.tokens = tokenizer.tokenize(usfm, tokensPreserveWhitespace); + } else { + this.tokens = usfm; + } + if (versification == null) { + versification = ScrVers.English; + } + this.state = new UsfmParserState(this.stylesheet, versification, this.tokens); + } + + processTokens(): void { + while (this.processToken()) { + // do nothing + } + } + + processToken(): boolean { + // If past end + if (this.state.index >= this.state.tokens.length - 1) { + this.closeAll(); + this.handler?.endUsfm(this.state); + return false; + } else if (this.state.index < 0) { + this.handler?.startUsfm(this.state); + } + + // Move to next token + this.state.index++; + + if (this.state.token == null) { + // this should never happen + throw new Error('There is no current token.'); + } + + this.state.lineNumber = this.state.token.lineNumber; + this.state.columnNumber = this.state.token.columnNumber; + + // Update verse offset with previous token (since verse offset is from start of current token) + if (this.state.prevToken != null) { + this.state.verseOffset += this.state.prevToken.getLength(false, !this.tokensPreserveWhitespace); + } + + // Skip over tokens that are to be skipped, ensuring that special_token state is True. + if (this.state.specialTokenCount > 0) { + this.state.specialTokenCount--; + this.state.specialToken = true; + return true; + } + + // Reset special token and figure status + this.state.specialToken = false; + + const token = this.state.token; + + // Switch unknown types to either character or paragraph + let tokenType = token.type; + if (tokenType === UsfmTokenType.Unknown) { + tokenType = this.determineUnknownTokenType(); + } + + if (this.handler != null && token.marker != null && token.marker.length > 0) { + this.handler.gotMarker(this.state, token.marker); + } + + switch (tokenType) { + case UsfmTokenType.Book: + case UsfmTokenType.Chapter: + this.closeAll(); + break; + + case UsfmTokenType.Paragraph: + if (token.marker === 'tr') { + // Handle special case of table rows + while ( + this.state.stack.length > 0 && + this.state.peek().type !== UsfmElementType.Table && + this.state.peek().type !== UsfmElementType.Sidebar + ) { + this.closeElement(); + } + } else if (token.marker === 'esb') { + // Handle special case of sidebars + this.closeAll(); + } else { + // Close all but sidebar + while (this.state.stack.length > 0 && this.state.peek().type !== UsfmElementType.Sidebar) { + this.closeElement(); + } + } + break; + + case UsfmTokenType.Character: + if (this.isCell(token)) { + // Handle special case of table cell + // Close until row + while (this.state.peek().type !== UsfmElementType.Row) { + this.closeElement(); + } + } else if (this.isRef(token)) { + // Handle refs + // Refs don't close anything + } else if (token.marker != null && !token.marker.startsWith('+')) { + // If non-nested character style, close all character styles + this.closeCharStyles(); + } + break; + + case UsfmTokenType.Verse: { + const paraTag = this.state.paraTag; + if (paraTag != null && paraTag.textType !== UsfmTextType.VerseText && paraTag.textType !== 0) { + this.closeAll(); + } else { + this.closeNote(); + } + break; + } + + case UsfmTokenType.Note: + this.closeNote(); + break; + + case UsfmTokenType.End: + // If end marker for an active note + if ( + any( + this.state.stack, + (elem) => elem.type === UsfmElementType.Note && elem.marker != null && elem.marker + '*' === token.marker, + ) + ) { + this.closeNote(true); + } else { + // If end marker for a character style on stack, close it + // If no matching end marker, close all character styles on top of stack + let unmatched = true; + while (this.state.stack.length > 0) { + const elem = this.state.peek(); + if (elem.type !== UsfmElementType.Char) { + break; + } + + // Determine if a + prefix is needed to close it (was nested char style) + const plusPrefix = + this.state.stack.length > 1 && + this.state.stack[this.state.stack.length - 2].type === UsfmElementType.Char; + + if ((plusPrefix ? '+' : '') + elem.marker! + '*' === token.marker) { + this.closeElement(true); + unmatched = false; + break; + } else { + this.closeElement(); + } + } + + // Unmatched end marker + if (unmatched) { + this.handler?.unmatched(this.state, token.marker!); + } + } + break; + } + + // Handle tokens + switch (tokenType) { + case UsfmTokenType.Book: { + this.state.push(new UsfmParserElement(UsfmElementType.Book, token.marker)); + + // Code is always upper case + const code = token.data!.toUpperCase(); + + // Update verse ref. Leave book alone if not empty to prevent parsing errors on books with bad id lines. + const verseRef = this.state.verseRef; + if (verseRef.book === '' && Canon.bookIdToNumber(code) !== 0) { + verseRef.book = code; + } + verseRef.chapter = '1'; + verseRef.verseNum = 0; + this.state.verseOffset = 0; + + // Book start. + this.handler?.startBook(this.state, token.marker!, code); + break; + } + + case UsfmTokenType.Chapter: { + let altChapter: string | undefined = undefined; + if (this.state.index < this.state.tokens.length - 3) { + const altChapterToken = this.state.tokens[this.state.index + 1]; + const altChapterNumToken = this.state.tokens[this.state.index + 2]; + const altChapterEndToken = this.state.tokens[this.state.index + 3]; + if ( + altChapterToken.marker === 'ca' && + altChapterNumToken.text != null && + altChapterEndToken.marker === 'ca*' + ) { + altChapter = altChapterNumToken.text.trim(); + this.state.specialTokenCount += 3; + + // Skip blank space after if present + if (this.state.index + this.state.specialTokenCount < this.state.tokens.length - 1) { + const blankToken = this.state.tokens[this.state.index + this.state.specialTokenCount + 1]; + if (blankToken.text != null && blankToken.text.trim() === '') { + this.state.specialTokenCount++; + } + } + } + } + + // Get publishable chapter number + let pubChapter: string | undefined = undefined; + if (this.state.index + this.state.specialTokenCount < this.state.tokens.length - 2) { + const pubChapterToken = this.state.tokens[this.state.index + this.state.specialTokenCount + 1]; + const pubChapterNumToken = this.state.tokens[this.state.index + this.state.specialTokenCount + 2]; + if (pubChapterToken.marker === 'cp' && pubChapterNumToken.text != null) { + pubChapter = pubChapterNumToken.text.trim(); + this.state.specialTokenCount += 2; + } + } + + const verseRef = this.state.verseRef; + verseRef.chapter = token.data!; + verseRef.verseNum = 0; + // Verse offset is not zeroed for chapter 1, as it is part of intro + if (verseRef.chapterNum !== 1) { + this.state.verseOffset = 0; + } + this.handler?.chapter(this.state, token.data!, token.marker!, altChapter, pubChapter); + break; + } + + case UsfmTokenType.Verse: { + // Get alternate verse number + let altVerse: string | undefined = undefined; + if (this.state.index < this.state.tokens.length - 3) { + const altVerseToken = this.state.tokens[this.state.index + 1]; + const altVerseNumToken = this.state.tokens[this.state.index + 2]; + const altVerseEndToken = this.state.tokens[this.state.index + 3]; + if (altVerseToken.marker == 'va' && altVerseNumToken.text != null && altVerseEndToken.marker === 'va*') { + altVerse = altVerseNumToken.text.trim(); + this.state.specialTokenCount += 3; + } + } + + // Get publishable verse number + let pubVerse: string | undefined = undefined; + if (this.state.index + this.state.specialTokenCount < this.state.tokens.length - 3) { + const pubVerseToken = this.state.tokens[this.state.index + this.state.specialTokenCount + 1]; + const pubVerseNumToken = this.state.tokens[this.state.index + this.state.specialTokenCount + 2]; + const pubVerseEndToken = this.state.tokens[this.state.index + this.state.specialTokenCount + 3]; + if (pubVerseToken.marker === 'vp' && pubVerseNumToken.text != null && pubVerseEndToken.marker === 'vp*') { + pubVerse = pubVerseNumToken.text.trim(); + this.state.specialTokenCount += 3; + } + } + + const verseRef = this.state.verseRef; + verseRef.verse = token.data!; + this.state.verseOffset = 0; + + this.handler?.verse(this.state, token.data!, token.marker!, altVerse, pubVerse); + break; + } + + case UsfmTokenType.Paragraph: { + if (token.marker == 'tr') { + // Handle special case of table rows + // Start table if not open + if (all(this.state.stack, (elem) => elem.type !== UsfmElementType.Table)) { + this.state.push(new UsfmParserElement(UsfmElementType.Table)); + this.handler?.startTable(this.state); + } + + this.state.push(new UsfmParserElement(UsfmElementType.Row, token.marker)); + + // Row start + this.handler?.startRow(this.state, token.marker); + } else if (token.marker == 'esb') { + // Handle special case of sidebars + this.state.push(new UsfmParserElement(UsfmElementType.Sidebar, token.marker)); + + // Look for category + let category: string | undefined = undefined; + if (this.state.index < this.state.tokens.length - 3) { + const categoryToken = this.state.tokens[this.state.index + 1]; + const categoryValueToken = this.state.tokens[this.state.index + 2]; + const categoryEndToken = this.state.tokens[this.state.index + 3]; + if ( + categoryToken.marker === 'esbc' && + categoryValueToken.text != null && + categoryEndToken.marker === 'esbc*' + ) { + category = categoryValueToken.text.trim(); + this.state.specialTokenCount += 3; + } + } + + // Sidebar start + this.handler?.startSidebar(this.state, token.marker, category); + } else if (token.marker == 'esbe') { + // Close sidebar if in sidebar + if (any(this.state.stack, (elem) => elem.type === UsfmElementType.Sidebar)) { + while (this.state.stack.length > 0) { + this.closeElement(this.state.peek().type === UsfmElementType.Sidebar); + } + } else { + this.handler?.unmatched(this.state, token.marker); + } + } else { + this.state.push(new UsfmParserElement(UsfmElementType.Para, token.marker)); + + // Paragraph start + this.handler?.startPara(this.state, token.marker!, token.type === UsfmTokenType.Unknown, token.attributes); + } + break; + } + + case UsfmTokenType.Character: { + if (this.isCell(token)) { + // Handle special case of table cells (treated as special character style) + let align = 'start'; + if (token.marker!.length > 2 && token.marker![2] === 'c') { + align = 'center'; + } else if (token.marker!.length > 2 && token.marker![2] === 'r') { + align = 'end'; + } + + const [_, baseMarker, colSpan] = isCellRange(token.marker!); + this.state.push(new UsfmParserElement(UsfmElementType.Cell, baseMarker)); + + this.handler?.startCell(this.state, baseMarker, align, colSpan); + } else if (this.isRef(token)) { + // xrefs are special tokens (they do not stand alone) + this.state.specialToken = true; + + const [display, target] = this.parseDisplayAndTarget(); + + this.state.specialTokenCount += 2; + + this.handler?.ref(this.state, token.marker!, display, target); + } else { + let invalidMarker = false; + let actualMarker: string; + if (token.marker?.startsWith('+')) { + // Only strip + if properly nested + const charTag = this.state.charTag; + actualMarker = charTag != null ? token.marker.substring(1) : token.marker; + invalidMarker = charTag == null; + } else { + actualMarker = token.marker!; + } + + this.state.push(new UsfmParserElement(UsfmElementType.Char, actualMarker, token.attributes)); + this.handler?.startChar( + this.state, + actualMarker, + token.type === UsfmTokenType.Unknown || invalidMarker, + token.attributes, + ); + } + break; + } + + case UsfmTokenType.Note: { + // Look for category + let category: string | undefined = undefined; + if (this.state.index < this.state.tokens.length - 3) { + const categoryToken = this.state.tokens[this.state.index + 1]; + const categoryValueToken = this.state.tokens[this.state.index + 2]; + const categoryEndToken = this.state.tokens[this.state.index + 3]; + if (categoryToken.marker === 'cat' && categoryValueToken.text != null && categoryEndToken.marker === 'cat*') { + category = categoryValueToken.text.trim(); + this.state.specialTokenCount += 3; + } + } + + this.state.push(new UsfmParserElement(UsfmElementType.Note, token.marker)); + + this.handler?.startNote(this.state, token.marker!, token.data!, category); + break; + } + + case UsfmTokenType.Text: { + let text = token.text!; + // If last token before a paragraph, book or chapter, esb, esbe (both are paragraph types), + // or at very end, strip final space + // This is because USFM requires these to be on a new line, therefore adding whitespace + if ( + (this.state.index === this.state.tokens.length - 1 || + this.state.tokens[this.state.index + 1].type === UsfmTokenType.Paragraph || + this.state.tokens[this.state.index + 1].type === UsfmTokenType.Book || + this.state.tokens[this.state.index + 1].type === UsfmTokenType.Chapter) && + text.length > 0 && + text.endsWith(' ') + ) { + text = text.substring(0, text.length - 1); + } + + if (this.handler != null) { + // Replace ~ with nbsp + text = text.replace('~', '\u00A0'); + + // Replace // with + for (const part of text.split(OPT_BREAK_SPLITTER)) { + if (part === '//') { + this.handler.optBreak(this.state); + } else { + this.handler.text(this.state, part); + } + this.state.columnNumber += part.length; + } + } + break; + } + + case UsfmTokenType.Milestone: + case UsfmTokenType.MilestoneEnd: + // currently, parse state doesn't need to be update, so just inform the handler about the milestone. + this.handler?.milestone(this.state, token.marker!, token.type == UsfmTokenType.Milestone, token.attributes); + break; + } + return true; + } + + private parseDisplayAndTarget(): [string, string] { + const nextToken = this.state.tokens[this.state.index + 1]; + const index = nextToken.text!.indexOf('|'); + const display = nextToken.text!.substring(0, index); + const target = nextToken.text!.substring(index + 1); + return [display, target]; + } + + private closeAll(): void { + while (this.state.stack.length > 0) { + this.closeElement(); + } + } + + private determineUnknownTokenType(): UsfmTokenType { + if (any(this.state.stack, (elem) => elem.type === UsfmElementType.Note)) { + return UsfmTokenType.Character; + } + return UsfmTokenType.Paragraph; + } + + private closeNote(closed = false): void { + if (any(this.state.stack, (elem) => elem.type === UsfmElementType.Note)) { + let elem: UsfmParserElement | undefined = undefined; + while (this.state.stack.length > 0 && (elem == null || elem.type !== UsfmElementType.Note)) { + elem = this.state.peek(); + this.closeElement(closed && elem.type === UsfmElementType.Note); + } + } + } + + private closeCharStyles(): void { + while (this.state.stack.length > 0 && this.state.peek().type === UsfmElementType.Char) { + this.closeElement(); + } + } + + private closeElement(closed = false): void { + const element = this.state.pop(); + switch (element.type) { + case UsfmElementType.Book: + this.handler?.endBook(this.state, element.marker!); + break; + + case UsfmElementType.Para: + this.handler?.endPara(this.state, element.marker!); + break; + + case UsfmElementType.Char: + this.handler?.endChar(this.state, element.marker!, element.attributes, closed); + break; + + case UsfmElementType.Note: + this.handler?.endNote(this.state, element.marker!, closed); + break; + + case UsfmElementType.Table: + this.handler?.endTable(this.state); + break; + + case UsfmElementType.Row: + this.handler?.endRow(this.state, element.marker!); + break; + + case UsfmElementType.Cell: + this.handler?.endCell(this.state, element.marker!); + break; + + case UsfmElementType.Sidebar: + this.handler?.endSidebar(this.state, element.marker!, closed); + break; + } + } + + private isCell(token: UsfmToken): boolean { + return ( + token.type === UsfmTokenType.Character && + token.marker != null && + (token.marker.startsWith('th') || token.marker.startsWith('tc')) && + any(this.state.stack, (elem) => elem.type === UsfmElementType.Row) + ); + } + + private isRef(token: UsfmToken): boolean { + if (token.marker !== 'ref') { + return false; + } + + if (this.state.index >= this.state.tokens.length - 2) { + return false; + } + + const attrToken = this.state.tokens[this.state.index + 1]; + if (!attrToken.text?.includes('|')) { + return false; + } + + const endToken = this.state.tokens[this.state.index + 2]; + return endToken.type === UsfmTokenType.End && endToken.marker === token.endMarker; + } +} diff --git a/src/corpora/usfm-stylesheet.ts b/src/corpora/usfm-stylesheet.ts new file mode 100644 index 0000000..555c0c3 --- /dev/null +++ b/src/corpora/usfm-stylesheet.ts @@ -0,0 +1,456 @@ +import { existsSync, readFileSync } from 'fs'; +import { access, readFile } from 'fs/promises'; +import { basename, resolve } from 'path'; + +import { + UsfmJustification, + UsfmStyleAttribute, + UsfmStyleType, + UsfmTag, + UsfmTextProperties, + UsfmTextType, +} from './usfm-tag'; + +const CELL_RANGE_REGEX = /^(t[ch][cr]?[1-5])-([2-5])$/; + +export async function createUsfmStylesheet( + stylesheetFileName = 'usfm.sty', + alternateStylesheetFileName?: string, +): Promise { + const stylesheet = new UsfmStylesheet(); + await stylesheet.loadFromFile(stylesheetFileName, alternateStylesheetFileName); + return stylesheet; +} + +export function isCellRange(marker: string): [boolean, string, number] { + const match = CELL_RANGE_REGEX.exec(marker); + if (match != null) { + const baseTag = match[1]; + const colSpan = match[2].charCodeAt(0) - baseTag.charCodeAt(baseTag.length - 1) + 1; + if (colSpan >= 2) { + return [true, baseTag, colSpan]; + } + } + return [false, marker, 0]; +} + +export class UsfmStylesheet { + private readonly tags = new Map(); + + constructor(stylesheetFileName?: string, alternateStylesheetFileName?: string) { + if (stylesheetFileName != null) { + this.parseSync(stylesheetFileName); + if (alternateStylesheetFileName != null) { + this.parseSync(alternateStylesheetFileName); + } + } + } + + async loadFromFile(stylesheetFileName: string, alternateStylesheetFileName?: string): Promise { + await this.parse(stylesheetFileName); + if (alternateStylesheetFileName != null) { + await this.parse(alternateStylesheetFileName); + } + } + + getTag(marker: string): UsfmTag { + let tag = this.tags.get(marker); + if (tag != null) return tag; + + const [isCell, baseTag, _] = isCellRange(marker); + if (isCell) { + tag = this.tags.get(baseTag); + if (tag != null) return tag; + } + + tag = this.createTag(marker); + tag.styleType = UsfmStyleType.Unknown; + return tag; + } + + private async parse(fileName: string): Promise { + try { + await access(fileName); + } catch { + const name = basename(fileName); + if (name === 'usfm.sty' || name === 'usfm_sb.sty') { + fileName = resolve(__dirname, name); + } else { + throw new Error(`The stylesheet does not exist.`); + } + } + + this.parseTagEntries(await readFile(fileName, 'utf8')); + } + + private parseSync(fileName: string): void { + if (!existsSync(fileName)) { + const name = basename(fileName); + if (name === 'usfm.sty' || name === 'usfm_sb.sty') { + fileName = resolve(__dirname, name); + } else { + throw new Error(`The stylesheet does not exist.`); + } + } + + this.parseTagEntries(readFileSync(fileName, 'utf8')); + } + + private parseTagEntries(contents: string): void { + const entries = splitStylesheet(contents); + for (let i = 0; i < entries.length; i++) { + const [entryMarker, entryText] = entries[i]; + + if (entryMarker !== 'marker') { + continue; + } + + const parts = entryText.split(' '); + if (parts.length > 1 && parts[1] === '-') { + // If the entry looks like "\marker xy -" remove the tag and its end tag if any + this.tags.delete(parts[0]); + this.tags.delete(`${parts[0]}*`); + } + + const tag = this.createTag(entryText); + const endTag = parseTagEntry(tag, entries, i + 1); + + if (endTag != null && !this.tags.has(endTag.marker)) { + this.tags.set(endTag.marker, endTag); + } + } + } + + private createTag(marker: string): UsfmTag { + // If tag already exists update with addtl info (normally from custom.sty) + let tag = this.tags.get(marker); + if (tag == null) { + tag = new UsfmTag(marker); + if (marker !== 'c' && marker !== 'v') { + tag.textProperties = UsfmTextProperties.Publishable; + } + this.tags.set(marker, tag); + } + return tag; + } +} + +const JUSTIFICATION_MAPPINGS = new Map([ + ['left', UsfmJustification.Left], + ['center', UsfmJustification.Center], + ['right', UsfmJustification.Right], + ['both', UsfmJustification.Both], +]); + +const STYLE_MAPPINGS = new Map([ + ['character', UsfmStyleType.Character], + ['paragraph', UsfmStyleType.Paragraph], + ['note', UsfmStyleType.Note], + ['milestone', UsfmStyleType.Milestone], +]); + +const TEXT_TYPE_MAPPINGS = new Map([ + ['title', UsfmTextType.Title], + ['section', UsfmTextType.Section], + ['versetext', UsfmTextType.VerseText], + ['notetext', UsfmTextType.NoteText], + ['other', UsfmTextType.Other], + ['backtranslation', UsfmTextType.BackTranslation], + ['translationnote"', UsfmTextType.TranslationNote], + ['versenumber', UsfmTextType.VerseText], + ['chapternumber', UsfmTextType.Other], +]); + +const TEXT_PROPERTY_MAPPINGS = new Map([ + ['verse', UsfmTextProperties.Verse], + ['chapter', UsfmTextProperties.Chapter], + ['paragraph', UsfmTextProperties.Paragraph], + ['publishable', UsfmTextProperties.Publishable], + ['vernacular', UsfmTextProperties.Vernacular], + ['poetic', UsfmTextProperties.Poetic], + ['level_1', UsfmTextProperties.Level1], + ['level_2', UsfmTextProperties.Level2], + ['level_3', UsfmTextProperties.Level3], + ['level_4', UsfmTextProperties.Level4], + ['level_5', UsfmTextProperties.Level5], + ['crossreference', UsfmTextProperties.CrossReference], + ['nonpublishable', UsfmTextProperties.Nonpublishable], + ['nonvernacular', UsfmTextProperties.Nonvernacular], + ['book', UsfmTextProperties.Book], + ['note', UsfmTextProperties.Note], +]); + +function splitStylesheet(contents: string): [string, string][] { + const lines = contents.split('\n'); + const entries: [string, string][] = []; + for (let line of lines) { + if (line.startsWith('#!')) { + line = line.substring(2); + } + line = line.split('#')[0].trim(); + if (line === '') { + continue; + } + if (!line.startsWith('\\')) { + // ignore lines that do not start with a backslash + continue; + } + const parts = line.split(' ', 2); + entries.push([parts[0].substring(1).toLowerCase(), parts.length > 1 ? parts[1].trim() : '']); + } + return entries; +} + +function parseTextProperties(marker: UsfmTag, entryText: string): void { + entryText = entryText.toLowerCase(); + const parts = entryText.split(' '); + + for (const part of parts) { + if (part.trim() === '') { + continue; + } + + const textProperty = TEXT_PROPERTY_MAPPINGS.get(part); + if (textProperty != null) { + marker.textProperties |= textProperty; + } + } + + if ((marker.textProperties & UsfmTextProperties.Nonpublishable) === UsfmTextProperties.Nonpublishable) { + marker.textProperties &= ~UsfmTextProperties.Publishable; + } +} + +function parseTextType(marker: UsfmTag, entryText: string): void { + entryText = entryText.toLowerCase(); + if (entryText === 'chapternumber') { + marker.textProperties |= UsfmTextProperties.Chapter; + } + if (entryText === 'versenumber') { + marker.textProperties |= UsfmTextProperties.Verse; + } + + const textType = TEXT_TYPE_MAPPINGS.get(entryText); + if (textType != null) { + marker.textType = textType; + } +} + +function parseAttributes(tag: UsfmTag, entryText: string): void { + const attributeNames = entryText.split(' '); + if (attributeNames.length === 0) { + throw new Error('Attributes cannot be empty.'); + } + let foundOptional = false; + for (const attribute of attributeNames) { + const isOptional = attribute.startsWith('?'); + if (!isOptional && foundOptional) { + throw new Error('Required attributes must precede optional attributes.'); + } + + tag.attributes.push(new UsfmStyleAttribute(isOptional ? attribute.substring(1) : attribute, !isOptional)); + if (isOptional) { + foundOptional = true; + } + } + + tag.defaultAttributeName = + tag.attributes.filter((a) => a.isRequired).length <= 1 ? tag.attributes[0].name : undefined; +} + +function parseTagEntry(tag: UsfmTag, entries: [string, string][], entryIndex: number): UsfmTag | undefined { + // The following items are present for conformance with Paratext release 5.0 stylesheets. Release 6.0 and later + // follows the guidelines set in InitPropertyMaps. + + // Make sure \id gets book property + if (tag.marker === 'id') { + tag.textProperties |= UsfmTextProperties.Book; + } + + let endTag: UsfmTag | undefined = undefined; + while (entryIndex < entries.length) { + const [entryMarker, entryText] = entries[entryIndex]; + entryIndex++; + + if (entryMarker === 'marker') { + break; + } + + switch (entryMarker) { + case 'name': + tag.name = entryText; + break; + case 'description': + tag.description = entryText; + break; + case 'fontname': + tag.fontName = entryText; + break; + case 'fontsize': + if (entryText === '-') { + tag.fontSize = 0; + } else { + const fontSize = parseInt(entryText); + if (!isNaN(fontSize) && fontSize >= 0) { + tag.fontSize = fontSize; + } + } + break; + case 'xmltag': + tag.xmlTag = entryText; + break; + case 'encoding': + tag.encoding = entryText; + break; + case 'linespacing': { + const lineSpacing = parseInt(entryText); + if (!isNaN(lineSpacing) && lineSpacing >= 0) { + tag.lineSpacing = lineSpacing; + } + break; + } + case 'spacebefore': { + const spaceBefore = parseInt(entryText); + if (!isNaN(spaceBefore) && spaceBefore >= 0) { + tag.spaceBefore = spaceBefore; + } + break; + } + case 'spaceafter': { + const spaceAfter = parseInt(entryText); + if (!isNaN(spaceAfter) && spaceAfter >= 0) { + tag.spaceAfter = spaceAfter; + } + break; + } + case 'leftmargin': { + const leftMargin = parseInt(entryText); + if (!isNaN(leftMargin) && leftMargin >= 0) { + tag.leftMargin = leftMargin; + } + break; + } + case 'rightmargin': { + const rightMargin = parseInt(entryText); + if (!isNaN(rightMargin) && rightMargin >= 0) { + tag.rightMargin = rightMargin; + } + break; + } + case 'firstlineindent': { + const firstLineIndent = parseFloat(entryText); + if (!isNaN(firstLineIndent)) { + tag.firstLineIndent = Math.trunc(firstLineIndent * 1000); + } + break; + } + case 'rank': + if (entryText === '-') { + tag.rank = 0; + } else { + const rank = parseInt(entryText); + if (!isNaN(rank) && rank >= 0) { + tag.rank = rank; + } + } + break; + case 'bold': + tag.bold = entryText !== '-'; + break; + case 'smallcaps': + tag.smallCaps = entryText !== '-'; + break; + case 'subscript': + tag.subscript = entryText !== '-'; + break; + case 'italic': + tag.italic = entryText !== '-'; + break; + case 'regular': + tag.italic = false; + tag.bold = false; + tag.superscript = false; + tag.regular = true; + break; + case 'underline': + tag.underline = entryText !== '-'; + break; + case 'superscript': + tag.superscript = entryText !== '-'; + break; + case 'notrepeatable': + tag.notRepeatable = entryText !== '-'; + break; + case 'textproperties': + parseTextProperties(tag, entryText); + break; + case 'texttype': + parseTextType(tag, entryText); + break; + case 'color': + if (entryText === '-') { + tag.color = 0; + } else { + const color = parseInt(entryText); + if (!isNaN(color) && color >= 0) { + tag.color = color; + } + } + break; + case 'justification': { + const justification = JUSTIFICATION_MAPPINGS.get(entryText.toLowerCase()); + if (justification != null) { + tag.justification = justification; + } + break; + } + case 'styletype': { + const styleType = STYLE_MAPPINGS.get(entryText.toLowerCase()); + if (styleType != null) { + tag.styleType = styleType; + } + break; + } + case 'occursunder': + for (const occursUnder of entryText.split('')) { + tag.occursUnder.add(occursUnder); + } + break; + case 'endmarker': + endTag = new UsfmTag(entryText); + endTag.styleType = UsfmStyleType.End; + tag.endMarker = entryText; + break; + case 'attributes': + parseAttributes(tag, entryText); + break; + } + } + + // If we have not seen an end marker but this is a character style + if (tag.styleType === UsfmStyleType.Character && endTag == null) { + const endMarkerStr = tag.marker + '*'; + endTag = new UsfmTag(endMarkerStr); + endTag.styleType = UsfmStyleType.End; + tag.endMarker = endMarkerStr; + } else if (tag.styleType === UsfmStyleType.Milestone) { + if (endTag != null) { + endTag.styleType = UsfmStyleType.MilestoneEnd; + // eid is always an optional attribute for the end marker + tag.attributes.push(new UsfmStyleAttribute('eid', false)); + endTag.name = tag.name; + } + } + + // Special cases + if ( + tag.textType === UsfmTextType.Other && + (tag.textProperties & UsfmTextProperties.Nonpublishable) === 0 && + (tag.textProperties & UsfmTextProperties.Chapter) === 0 && + (tag.textProperties & UsfmTextProperties.Verse) === 0 && + (tag.styleType === UsfmStyleType.Character || tag.styleType === UsfmStyleType.Paragraph) + ) { + tag.textProperties |= UsfmTextProperties.Publishable; + } + return endTag; +} diff --git a/src/corpora/usfm-tag.ts b/src/corpora/usfm-tag.ts new file mode 100644 index 0000000..53f60ee --- /dev/null +++ b/src/corpora/usfm-tag.ts @@ -0,0 +1,95 @@ +export enum UsfmTextType { + NotSpecified = 0x0, + Title = 0x1, + Section = 0x2, + VerseText = 0x4, + NoteText = 0x8, + Other = 0x10, + BackTranslation = 0x20, + TranslationNote = 0x40, +} + +export enum UsfmJustification { + Left, + Center, + Right, + Both, +} + +export enum UsfmStyleType { + Unknown, + Character, + Note, + Paragraph, + End, + Milestone, + MilestoneEnd, +} + +export enum UsfmTextProperties { + None = 0x0, + Verse = 0x1, + Chapter = 0x2, + Paragraph = 0x4, + Publishable = 0x8, + Vernacular = 0x10, + Poetic = 0x20, + OtherTextBegin = 0x40, + OtherTextEnd = 0x80, + Level1 = 0x100, + Level2 = 0x200, + Level3 = 0x400, + Level4 = 0x800, + Level5 = 0x1000, + CrossReference = 0x2000, + Nonpublishable = 0x4000, + Nonvernacular = 0x8000, + Book = 0x10000, + Note = 0x20000, +} + +export class UsfmStyleAttribute { + constructor( + public readonly name: string, + public readonly isRequired: boolean, + ) {} +} + +export class UsfmTag { + public bold = false; + public description?: string; + public encoding?: string; + public endMarker?: string; + public firstLineIndent = 0; + public fontName?: string; + public fontSize = 0; + public italic = false; + public justification = UsfmJustification.Left; + public leftMargin = 0; + public lineSpacing = 0; + public name?: string; + public notRepeatable = false; + public readonly occursUnder = new Set(); + public rank = 0; + public rightMargin = 0; + public smallCaps = false; + public spaceAfter = 0; + public spaceBefore = 0; + public styleType = UsfmStyleType.Unknown; + public subscript = false; + public superscript = false; + public textProperties = UsfmTextProperties.None; + public textType = UsfmTextType.NotSpecified; + public underline = false; + public xmlTag?: string; + public regular = false; + public color = 0; + public readonly attributes: UsfmStyleAttribute[] = []; + public defaultAttributeName?: string; + + constructor(public readonly marker: string) {} + + toString(): string { + return `\\${this.marker}`; + } +} diff --git a/src/corpora/usfm-token.ts b/src/corpora/usfm-token.ts new file mode 100644 index 0000000..a7201bf --- /dev/null +++ b/src/corpora/usfm-token.ts @@ -0,0 +1,238 @@ +import { UsfmAttribute } from './usfm-attribute'; + +export enum UsfmTokenType { + Book, + Chapter, + Verse, + Text, + Paragraph, + Character, + Note, + End, + Milestone, + MilestoneEnd, + Attribute, + Unknown, +} + +const ATTRIBUTE_REGEX = /([-\w]+)\s*=\s*"(.+?)"\s*/g; +const ATTRIBUTES_REGEX = new RegExp('(?(' + ATTRIBUTE_REGEX.source + ')+)|(?[^\\=|]*)'); + +export class UsfmToken { + private _attributes?: UsfmAttribute[]; + private _defaultAttributeName?: string; + + constructor( + public readonly type: UsfmTokenType, + public readonly marker?: string, + public text?: string, + public readonly endMarker?: string, + public readonly data?: string, + public readonly lineNumber = -1, + public readonly columnNumber = -1, + ) {} + + get attributes(): readonly UsfmAttribute[] | undefined { + return this._attributes; + } + + get nestlessMarker(): string | undefined { + return this.marker?.startsWith('+') ? this.marker.substring(1) : this.marker; + } + + getAttribute(name: string): string { + if (this.attributes == null || this.attributes.length === 0) { + return ''; + } + + const attribute = this.attributes.find((attr) => attr.name === name); + return attribute?.value ?? ''; + } + + setAttributes( + attributesValue: string, + defaultAttributeName: string | undefined, + text: string, + preserveWhitespace = false, + ): string | undefined { + if (attributesValue.length === 0 || this.marker == null) { + return undefined; + } + + // for figures, convert 2.0 format to 3.0 format. Will need to write this as the 2.0 format + // if the project is not upgraded. + if (this.nestlessMarker === 'fig') { + const parts = attributesValue.split('|'); + if (parts.length === 7) { + const attributeList: UsfmAttribute[] = []; + this.appendAttribute(attributeList, 'alt', text); + this.appendAttribute(attributeList, 'src', parts[0]); + this.appendAttribute(attributeList, 'size', parts[1]); + this.appendAttribute(attributeList, 'loc', parts[2]); + this.appendAttribute(attributeList, 'copy', parts[3]); + let whitespace = ''; + if (preserveWhitespace) { + whitespace = text.substring(0, text.trimStart().length); + } + text = whitespace + parts[4]; + this.appendAttribute(attributeList, 'ref', parts[5]); + this._attributes = attributeList; + return text; + } + } + + const match = ATTRIBUTES_REGEX.exec(attributesValue); + if (match == null || match[0].length !== attributesValue.length) { + return undefined; + } + + const defaultValue = match.groups?.default; + if (defaultValue != null) { + if (defaultAttributeName != null) { + this._attributes = [new UsfmAttribute(defaultAttributeName, defaultValue)]; + this._defaultAttributeName = defaultAttributeName; + return text; + } + return undefined; + } + + const full = match.groups?.full; + if (full == null) { + return undefined; + } + + this._defaultAttributeName = defaultAttributeName; + this._attributes = []; + let i = 0; + for (const attrMatch of full.matchAll(ATTRIBUTE_REGEX)) { + this._attributes.push(new UsfmAttribute(attrMatch[1], attrMatch[2], i)); + i++; + } + return text; + } + + copyAttributes(sourceToken: UsfmToken): void { + this._attributes = sourceToken._attributes; + this._defaultAttributeName = sourceToken._defaultAttributeName; + } + + private appendAttribute(attributes: UsfmAttribute[], name: string, value: string | undefined): void { + value = value?.trim(); + if (value != null && value.length > 0) { + attributes.push(new UsfmAttribute(name, value)); + } + } + + getLength(includeNewlines = false, addSpaces = true): number { + // WARNING: This logic in this method needs to match the logic in toUsfm() + + let totalLength = this.text?.length ?? 0; + if (this.type === UsfmTokenType.Attribute) { + totalLength += this.toAttributesString().length; + } else if (this.marker != null) { + if ( + includeNewlines && + (this.type === UsfmTokenType.Paragraph || + this.type === UsfmTokenType.Chapter || + this.type === UsfmTokenType.Verse) + ) { + totalLength += 2; + } + totalLength += this.marker.length + 1; // marker and backslash + if (addSpaces && (this.marker.length === 0 || !this.marker.endsWith('*'))) { + totalLength++; // space + } + + if (this.data != null && this.data.length > 0) { + if (!addSpaces && (this.marker.length === 0 || !this.marker.endsWith('*'))) { + totalLength++; + } + totalLength += this.data.length; + if (addSpaces) { + totalLength++; + } + } + + if (this.type === UsfmTokenType.Milestone || this.type === UsfmTokenType.MilestoneEnd) { + const attributes = this.toAttributesString(); + if (attributes.length > 0) { + totalLength += attributes.length; + } else { + // remove space that was put after marker - not needed when there are no attributes. + totalLength--; + } + + totalLength += 2; // End of the milestone + } + } + + return totalLength; + } + + toUsfm(includeNewlines = false, addSpaces = true): string { + // WARNING: The logic in this method needs to match the logic in getLength() + + let toReturn = this.text ?? ''; + if (this.type === UsfmTokenType.Attribute) { + toReturn += this.toAttributesString(); + } else if (this.marker != null) { + if ( + includeNewlines && + (this.type === UsfmTokenType.Paragraph || + this.type === UsfmTokenType.Chapter || + this.type === UsfmTokenType.Verse) + ) { + toReturn += '\r\n'; + } + toReturn += '\\'; + if (this.marker.length > 0) { + toReturn += this.marker; + } + if (addSpaces && (this.marker.length === 0 || !this.marker.endsWith('*'))) { + toReturn += ' '; + } + + if (this.data != null && this.data.length > 0) { + if (!addSpaces && (this.marker.length === 0 || !this.marker.endsWith('*'))) { + toReturn += ' '; + } + toReturn += this.data; + if (addSpaces) { + toReturn += ' '; + } + } + + if (this.type === UsfmTokenType.Milestone || this.type === UsfmTokenType.MilestoneEnd) { + const attributes = this.toAttributesString(); + if (attributes.length > 0) { + toReturn += attributes; + } else { + // remove space that was put after marker - not needed when there are no attributes. + toReturn = toReturn.substring(0, toReturn.length - 1); + } + toReturn += '\\*'; + } + } + return toReturn; + } + + toAttributesString(): string { + if (this.attributes == null || this.attributes.length === 0) { + return ''; + } + + if (this.data != null && this.data !== '') { + return '|' + this.data; + } + + if (this.attributes.length === 1 && this.attributes[0].name === this._defaultAttributeName) { + return '|' + this.attributes[0].value; + } + + return '|' + this.attributes.map((attr) => attr.toString()).join(' '); + } + + toString(): string { + return this.toUsfm(false, false); + } +} diff --git a/src/corpora/usfm-tokenizer.test.ts b/src/corpora/usfm-tokenizer.test.ts new file mode 100644 index 0000000..958e8d3 --- /dev/null +++ b/src/corpora/usfm-tokenizer.test.ts @@ -0,0 +1,60 @@ +import { readFileSync } from 'fs'; +import { join } from 'path'; + +import { USFM_TEST_PROJECT_PATH } from './test-helpers'; +import { createUsfmStylesheet } from './usfm-stylesheet'; +import { UsfmTokenType } from './usfm-token'; +import { UsfmTokenizer } from './usfm-tokenizer'; + +describe('UsfmTokenizer', () => { + it('tokenize', async () => { + const usfm = readUsfm(); + const tokenizer = new UsfmTokenizer(await createUsfmStylesheet()); + const tokens = tokenizer.tokenize(usfm); + expect(tokens.length).toEqual(236); + + expect(tokens[0].type).toEqual(UsfmTokenType.Book); + expect(tokens[0].marker).toEqual('id'); + expect(tokens[0].data).toEqual('MAT'); + expect(tokens[0].lineNumber).toEqual(1); + expect(tokens[0].columnNumber).toEqual(1); + + expect(tokens[37].type).toEqual(UsfmTokenType.Text); + expect(tokens[37].text).toEqual('Chapter One '); + expect(tokens[37].lineNumber).toEqual(10); + expect(tokens[37].columnNumber).toEqual(4); + + expect(tokens[38].type).toEqual(UsfmTokenType.Verse); + expect(tokens[38].marker).toEqual('v'); + expect(tokens[38].data).toEqual('1'); + expect(tokens[38].lineNumber).toEqual(11); + expect(tokens[38].columnNumber).toEqual(1); + + expect(tokens[47].type).toEqual(UsfmTokenType.Note); + expect(tokens[47].marker).toEqual('f'); + expect(tokens[47].data).toEqual('+'); + expect(tokens[47].lineNumber).toEqual(11); + expect(tokens[47].columnNumber).toEqual(52); + }); + + it('detokenize', async () => { + const usfm = readUsfm(); + const tokenizer = new UsfmTokenizer(await createUsfmStylesheet()); + const tokens = tokenizer.tokenize(usfm); + const result = tokenizer.detokenize(tokens); + expect(result).toEqual(usfm); + }); + + it('tokenize ending paragraph marker', async () => { + const usfm = `\\id MAT - Test +\\c 1 +\\v 1 Descriptive title\\x - \\xo 18:16 \\xt hello world\\x*\\p`; + const tokenizer = new UsfmTokenizer(await createUsfmStylesheet()); + const tokens = tokenizer.tokenize(usfm); + expect(tokens.length).toEqual(13); + }); +}); + +function readUsfm(): string { + return readFileSync(join(USFM_TEST_PROJECT_PATH, '41MATTes.SFM'), 'utf8'); +} diff --git a/src/corpora/usfm-tokenizer.ts b/src/corpora/usfm-tokenizer.ts new file mode 100644 index 0000000..9677899 --- /dev/null +++ b/src/corpora/usfm-tokenizer.ts @@ -0,0 +1,564 @@ +import { last } from '../iterable-utils'; +import { UsfmStylesheet } from './usfm-stylesheet'; +import { UsfmStyleType, UsfmTextProperties } from './usfm-tag'; +import { UsfmToken, UsfmTokenType } from './usfm-token'; + +export enum RtlReferenceOrder { + NotSet, + BookChapterVerse, + BookVerseChapter, +} + +const RTL_VERSE_REGEX = /[\u200E\u200F]*(\d+\w?)[\u200E\u200F]*([\p{P}\p{S}])[\u200E\u200F]*(?=\d)/u; + +export class UsfmTokenizer { + constructor( + public readonly stylesheet: UsfmStylesheet, + public readonly rtlReferenceOrder: RtlReferenceOrder = RtlReferenceOrder.NotSet, + ) {} + + tokenize(usfm: string, preserveWhitespace = false, startLineNumber = 1, startColumnNumber = 1): readonly UsfmToken[] { + const tokens: UsfmToken[] = []; + + let index = 0; // Current position + let lineNum = startLineNumber; // Current line number + let previousIndex = 0; + while (index < usfm.length) { + let nextMarkerIndex = index < usfm.length - 1 ? usfm.indexOf('\\', index + 1) : -1; + if (nextMarkerIndex === -1) { + nextMarkerIndex = usfm.length; + } + + lineNum += countNewlines(usfm.substring(previousIndex, index)); + + let colNum = index - usfm.lastIndexOf('\n', index); + if (lineNum === startLineNumber) { + colNum += startColumnNumber - 1; + } + previousIndex = index; + + // If text, create text token until end or next \ + const ch = usfm[index]; + if (ch != '\\') { + let text = usfm.substring(index, nextMarkerIndex); + if (!preserveWhitespace) { + text = regularizeSpaces(text); + } + + const [attributeToken, attrText] = this.handleAttributes( + usfm, + preserveWhitespace, + tokens, + nextMarkerIndex, + text, + lineNum, + colNum, + ); + text = attrText; + + if (text.length > 0) { + tokens.push(new UsfmToken(UsfmTokenType.Text, undefined, text, undefined, undefined, lineNum, colNum)); + } + + if (attributeToken != null) { + tokens.push(attributeToken); + } + + index = nextMarkerIndex; + continue; + } + + // Get marker (and move past whitespace or star ending) + index++; + const markerStart = index; + while (index < usfm.length) { + const ch = usfm[index]; + + // Backslash starts a new marker + if (ch === '\\') { + break; + } + + // don't require a space before the | that starts attributes - mainly for milestones to allow + // \qt-s|speaker\* + if (ch === '|') { + break; + } + + // End star is part of marker + if (ch === '*') { + index++; + break; + } + + if (isNonsemanticWhitespace(ch)) { + // Preserve whitespace if needed, otherwise skip + if (!preserveWhitespace) { + index++; + } + break; + } + index++; + } + + const marker = usfm.substring(markerStart, index).trimEnd(); + // Milestone stop/end markers are ended with \*, so marker will just be * and can be skipped + if (marker === '*') { + // make sure that previous token was a milestone - have to skip space only tokens that may have been + // added when preserve_whitespace is true. + let prevToken: UsfmToken | undefined = undefined; + if (tokens.length > 0) { + prevToken = last(tokens, (t) => t.type !== UsfmTokenType.Text || t.text?.trim() !== ''); + } + if ( + prevToken != null && + (prevToken.type === UsfmTokenType.Milestone || prevToken.type === UsfmTokenType.MilestoneEnd) + ) { + // if the last item is an empty text token, remove it so we don't get extra space. + if (tokens[tokens.length - 1].type === UsfmTokenType.Text) { + tokens.pop(); + } + continue; + } + } + + // Multiple whitespace after non-end marker is ok + if (!marker.endsWith('*') && !preserveWhitespace) { + while (index < usfm.length && isNonsemanticWhitespace(usfm[index])) { + index++; + } + } + + // Lookup marker + let tag = this.stylesheet.getTag(marker.startsWith('+') ? marker.substring(1) : marker); + + // If starts with a plus and is not a character style or an end style, it is an unknown tag + if (marker.startsWith('+') && tag.styleType !== UsfmStyleType.Character && tag.styleType !== UsfmStyleType.End) { + tag = this.stylesheet.getTag(marker); + } + + const endMarker = tag.styleType !== UsfmStyleType.Milestone ? marker + '*' : tag.endMarker; + + switch (tag.styleType) { + case UsfmStyleType.Character: + if ((tag.textProperties & UsfmTextProperties.Verse) == UsfmTextProperties.Verse) { + const [nextIndex, data] = getNextWord(usfm, index, preserveWhitespace); + index = nextIndex; + tokens.push(new UsfmToken(UsfmTokenType.Verse, marker, undefined, undefined, data, lineNum, colNum)); + } else { + tokens.push( + new UsfmToken(UsfmTokenType.Character, marker, undefined, endMarker, undefined, lineNum, colNum), + ); + } + break; + + case UsfmStyleType.Paragraph: + // Handle verse special case + if ((tag.textProperties & UsfmTextProperties.Chapter) == UsfmTextProperties.Chapter) { + const [nextIndex, data] = getNextWord(usfm, index, preserveWhitespace); + index = nextIndex; + tokens.push(new UsfmToken(UsfmTokenType.Chapter, marker, undefined, undefined, data, lineNum, colNum)); + } else if ((tag.textProperties & UsfmTextProperties.Book) == UsfmTextProperties.Book) { + const [nextIndex, data] = getNextWord(usfm, index, preserveWhitespace); + index = nextIndex; + tokens.push(new UsfmToken(UsfmTokenType.Book, marker, undefined, undefined, data, lineNum, colNum)); + } else { + tokens.push( + new UsfmToken(UsfmTokenType.Paragraph, marker, undefined, endMarker, undefined, lineNum, colNum), + ); + } + break; + + case UsfmStyleType.Note: { + const [nextIndex, data] = getNextWord(usfm, index, preserveWhitespace); + index = nextIndex; + tokens.push(new UsfmToken(UsfmTokenType.Note, marker, undefined, endMarker, data, lineNum, colNum)); + break; + } + + case UsfmStyleType.End: + tokens.push(new UsfmToken(UsfmTokenType.End, marker, undefined, undefined, undefined, lineNum, colNum)); + break; + + case UsfmStyleType.Unknown: + // End tokens are always end tokens, even if unknown + if (marker.endsWith('*')) { + tokens.push(new UsfmToken(UsfmTokenType.End, marker, undefined, undefined, undefined, lineNum, colNum)); + } else if (marker === 'esb' || marker === 'esbe') { + // Handle special case of esb and esbe which might not be in basic stylesheet but are always sidebars + // and so should be tokenized as paragraphs + tokens.push( + new UsfmToken(UsfmTokenType.Paragraph, marker, undefined, endMarker, undefined, lineNum, colNum), + ); + } else { + // Create unknown token with a corresponding end note + tokens.push( + new UsfmToken(UsfmTokenType.Unknown, marker, undefined, marker + '*', undefined, lineNum, colNum), + ); + } + break; + + case UsfmStyleType.Milestone: + case UsfmStyleType.MilestoneEnd: + // if a milestone is not followed by a ending \* treat don't create a milestone token for the begining. + // Instead create at text token for all the text up to the beginning of the next marker. This will make + // typing of milestones easiest since the partially typed milestone more be reformatted to have a normal + // ending even if it hasn't been typed yet. + if (!milestoneEnded(usfm, index)) { + let endOfText = index < usfm.length - 1 ? usfm.indexOf('\\', index) : -1; + if (endOfText === -1) { + endOfText = usfm.length; + } + let milestoneText = usfm.substring(index, endOfText); + // add back space that was removed after marker + if (milestoneText.length > 0 && !milestoneText.startsWith(' ') && !milestoneText.startsWith('|')) { + milestoneText = ' ' + milestoneText; + } + tokens.push( + new UsfmToken( + UsfmTokenType.Text, + undefined, + '\\' + marker + milestoneText, + undefined, + undefined, + lineNum, + colNum, + ), + ); + index = endOfText; + } else if (tag.styleType === UsfmStyleType.Milestone) { + tokens.push( + new UsfmToken(UsfmTokenType.Milestone, marker, undefined, endMarker, undefined, lineNum, colNum), + ); + } else { + tokens.push( + new UsfmToken(UsfmTokenType.MilestoneEnd, marker, undefined, undefined, undefined, lineNum, colNum), + ); + } + break; + } + } + + // Forces a space to be present in tokenization if immediately + // before a token requiring a preceding CR/LF. This is to ensure + // that when written to disk and re-read, that tokenization + // will match. For example, "\p test\p here" requires a space + // after "test". Also, "\p \em test\em*\p here" requires a space + // token inserted after \em* + if (!preserveWhitespace) { + for (let i = 1; i < tokens.length; i++) { + // If requires newline (verses do, except when after '(' or '[') + if ( + tokens[i].type === UsfmTokenType.Book || + tokens[i].type === UsfmTokenType.Chapter || + tokens[i].type === UsfmTokenType.Paragraph || + (tokens[i].type === UsfmTokenType.Verse && + !( + tokens[i - 1].type === UsfmTokenType.Text && + (tokens[i - 1].text?.endsWith('(') || tokens[i - 1].text?.endsWith('[')) + )) + ) { + // Add space to text token + if (tokens[i - 1].type === UsfmTokenType.Text) { + if (!tokens[i - 1].text?.endsWith(' ')) { + tokens[i - 1].text! += ' '; + } + } else if (tokens[i - 1].type === UsfmTokenType.End) { + // Insert space token after * of end marker + let colNum: number; + if (index >= usfm.length) { + colNum = usfm.length + 1; + } else { + colNum = usfm.length + 1 - Math.max(usfm.lastIndexOf('\n', index), 0); + } + + tokens.splice( + i, + 0, + new UsfmToken(UsfmTokenType.Text, undefined, ' ', undefined, undefined, lineNum, colNum), + ); + i++; + } + } + } + } + + return tokens; + } + + detokenize(tokens: Iterable, tokensHaveWhitespace = false): string { + let prevToken: UsfmToken | undefined = undefined; + let usfm = ''; + let inBook = false; + for (const token of tokens) { + let tokenUsfm = ''; + switch (token.type) { + case UsfmTokenType.Book: + case UsfmTokenType.Chapter: + case UsfmTokenType.Paragraph: + // Strip space from end of string before CR/LF + if (usfm.length > 0) { + if ( + (usfm.endsWith(' ') && prevToken != null && prevToken.toUsfm().trim() !== '') || + !tokensHaveWhitespace + ) { + usfm = usfm.substring(0, usfm.length - 1); + } + if (!tokensHaveWhitespace) { + usfm += '\r\n'; + } + } + tokenUsfm = token.toUsfm(); + inBook = token.type === UsfmTokenType.Book; + break; + + case UsfmTokenType.Verse: + // Add newline if after anything other than [ or ( + if (usfm.length > 0 && !usfm.endsWith('[') && !usfm.endsWith('(')) { + if ( + (usfm.endsWith(' ') && prevToken != null && prevToken.toUsfm().trim() !== '') || + !tokensHaveWhitespace + ) { + usfm = usfm.substring(0, usfm.length - 1); + } + if (!tokensHaveWhitespace) { + usfm += '\r\n'; + } + } + + tokenUsfm = tokensHaveWhitespace ? token.toUsfm().trim() : token.toUsfm(); + + // want RTL mark around all punctuation in verses + if (this.rtlReferenceOrder !== RtlReferenceOrder.NotSet) { + const directionMarker = this.rtlReferenceOrder === RtlReferenceOrder.BookVerseChapter ? '\u200f' : '\u200e'; + tokenUsfm = tokenUsfm.replace(RTL_VERSE_REGEX, `$1${directionMarker}$2`); + } + inBook = false; + break; + case UsfmTokenType.Text: + // Ensure spaces are preserved + tokenUsfm = token.toUsfm(); + if (tokensHaveWhitespace && usfm.length > 0 && usfm.endsWith(' ')) { + if ( + (tokenUsfm.length > 0 && + tokenUsfm.startsWith(' ') && + prevToken != null && + prevToken.toUsfm().trim() !== '') || + tokenUsfm.startsWith('\r\n') + ) { + usfm = usfm.substring(0, usfm.length - 1); + } else { + tokenUsfm = tokenUsfm.trimStart(); + } + } + break; + + default: + if (inBook) { + if ( + usfm.endsWith(' ') && + ((prevToken != null && prevToken.toUsfm().trim() !== '') || !tokensHaveWhitespace) + ) { + usfm = usfm.substring(0, usfm.length - 1); + } + if (!tokensHaveWhitespace) { + usfm += '\r\n'; + } + } + tokenUsfm = token.toUsfm(); + inBook = false; + break; + } + usfm += tokenUsfm; + prevToken = token; + } + + // Make sure begins without space or CR/LF + if (usfm.length > 0 && usfm.startsWith(' ')) { + usfm = usfm.substring(1); + } + if (usfm.length > 0 && usfm.startsWith('\r')) { + usfm = usfm.substring(2); + } + + // Make sure ends without space and with a CR/LF + if (usfm.length > 0 && usfm.endsWith(' ')) { + usfm = usfm.substring(0, usfm.length - 1); + } + if (usfm.length > 0 && !usfm.endsWith('\n')) { + usfm += '\r\n'; + } + if (usfm.length > 0 && usfm.endsWith(' \r\n')) { + usfm = usfm.substring(0, usfm.length - 3) + usfm.substring(usfm.length - 2); + } + return usfm; + } + + private handleAttributes( + usfm: string, + preserveWhitespace: boolean, + tokens: UsfmToken[], + nextMarkerIndex: number, + text: string, + lineNumber: number, + columnNumber: number, + ): [UsfmToken | undefined, string] { + const attributeIndex = text.indexOf('|'); + if (attributeIndex < 0) { + return [undefined, text]; + } + + const matchingToken = findMatchingStartMarker(usfm, tokens, nextMarkerIndex); + if (matchingToken?.marker == null) { + return [undefined, text]; + } + + const matchingTag = this.stylesheet.getTag(matchingToken.nestlessMarker!); + if ( + matchingTag.styleType !== UsfmStyleType.Character && + matchingTag.styleType !== UsfmStyleType.Milestone && + matchingTag.styleType !== UsfmStyleType.MilestoneEnd + ) { + return [undefined, text]; // leave attributes of other styles as regular text + } + + let attributeToken: UsfmToken | undefined = undefined; + const attributesValue = text.substring(attributeIndex + 1); + const adjustedText = matchingToken.setAttributes( + attributesValue, + matchingTag.defaultAttributeName, + text.substring(0, attributeIndex), + preserveWhitespace, + ); + if (adjustedText != null) { + text = adjustedText; + + if (matchingTag.styleType === UsfmStyleType.Character) { + // Don't do this for milestones + attributeToken = new UsfmToken( + UsfmTokenType.Attribute, + matchingTag.marker, + undefined, + undefined, + attributesValue, + lineNumber, + columnNumber + attributeIndex, + ); + attributeToken.copyAttributes(matchingToken); + } + } + return [attributeToken, text]; + } +} + +const ZERO_WIDTH_SPACE = '\u200B'; + +function countNewlines(text: string): number { + return text.split('\n').length - 1; +} + +function getNextWord(usfm: string, index: number, preserveWhitespace: boolean): [number, string] { + // Skip over leading spaces + while (index < usfm.length && isNonsemanticWhitespace(usfm[index])) { + index++; + } + + const dataStart = index; + while (index < usfm.length && !isNonsemanticWhitespace(usfm[index]) && usfm[index] !== '\\') { + index++; + } + + const data = usfm.substring(dataStart, index); + + // Skip over trailing spaces + if (!preserveWhitespace) { + while (index < usfm.length && isNonsemanticWhitespace(usfm[index])) { + index++; + } + } + + return [index, data]; +} + +function isNonsemanticWhitespace(c: string): boolean { + // Checks if is whitespace, but not U+3000 (IDEOGRAPHIC SPACE). + return (c !== '\u3000' && c.trim() === '') || c === ZERO_WIDTH_SPACE; +} + +function regularizeSpaces(str: string): string { + let wasSpace = false; + let result = ''; + for (let i = 0; i < str.length; i++) { + const ch = str[i]; + // Control characters and CR/LF and TAB become spaces + if (ch.charCodeAt(0) < 32) { + if (!wasSpace) { + result += ' '; + } + wasSpace = true; + } else if (!wasSpace && ch === ZERO_WIDTH_SPACE && i + 1 < str.length && isNonsemanticWhitespace(str[i + 1])) { + // ZWSP is redundant if followed by a space + } else if (isNonsemanticWhitespace(ch)) { + // Keep other kinds of spaces + if (!wasSpace) { + result += ch; + } + wasSpace = true; + } else { + result += ch; + wasSpace = false; + } + } + return result; +} + +function findMatchingStartMarker(usfm: string, tokens: UsfmToken[], nextMarkerIndex: number): UsfmToken | undefined { + const expectedStartMarker = beforeEndMarker(usfm, nextMarkerIndex); + if (expectedStartMarker == null) { + return undefined; + } + + if ( + expectedStartMarker === '' && + (tokens[tokens.length - 1].type === UsfmTokenType.Milestone || + tokens[tokens.length - 1].type === UsfmTokenType.MilestoneEnd) + ) { + return tokens[tokens.length - 1]; + } + + let nestingLevel = 0; + for (let i = tokens.length - 1; i >= 0; i--) { + const token = tokens[i]; + if (token.type === UsfmTokenType.End) { + nestingLevel++; + } else if (token.type !== UsfmTokenType.Text && token.type !== UsfmTokenType.Attribute) { + if (nestingLevel > 0) { + nestingLevel--; + } else if (nestingLevel === 0) { + return token; + } + } + } + + return undefined; +} + +function beforeEndMarker(usfm: string, nextMarkerIndex: number): string | undefined { + let index = nextMarkerIndex + 1; + while (index < usfm.length && usfm[index] !== '*' && usfm[index].trim() !== '') { + index++; + } + + if (index >= usfm.length || usfm[index] !== '*') { + return undefined; + } + return usfm.substring(nextMarkerIndex + 1, index); +} + +function milestoneEnded(usfm: string, index: number): boolean { + const nextMarkerIndex = index < usfm.length ? usfm.indexOf('\\', index) : -1; + if (nextMarkerIndex === -1 || nextMarkerIndex > usfm.length - 2) { + return false; + } + return usfm.substring(nextMarkerIndex, nextMarkerIndex + 2) === '\\*'; +} diff --git a/src/corpora/usfm.sty b/src/corpora/usfm.sty new file mode 100644 index 0000000..193ce7d --- /dev/null +++ b/src/corpora/usfm.sty @@ -0,0 +1,3082 @@ +# Version=3.0.5 +# ******************************************************************** +# * usfm.sty is the default stylesheet for Paratext projects * +# * using USFM markup. * +# * Latest documentation and stylesheets are maintained at: * +# * http://markups.paratext.org/usfm * +# ******************************************************************** + +# File Identification + +\Marker id +\Name id - File - Identification +\Description File identification information (BOOKID, FILENAME, EDITOR, MODIFICATION DATE) +\StyleType Paragraph +\TextType Other +\TextProperties paragraph nonpublishable nonvernacular book +\FontSize 12 + +\Marker usfm +\Name usfm - File - USFM Version ID +\Description File markup version information +\OccursUnder id +\Rank 1 +\StyleType Paragraph +\TextType Other +\TextProperties paragraph nonpublishable nonvernacular +\FontSize 12 + +\Marker ide +\Name ide - File - Encoding +\Description File encoding information +\OccursUnder id +\Rank 1 +\StyleType Paragraph +\TextType Other +\TextProperties paragraph nonpublishable nonvernacular +\FontSize 12 + +# Headers + +\Marker h +\Name h - File - Header +\Description Running header text for a book (basic) +\OccursUnder id +\Rank 1 +\TextType Other +\TextProperties paragraph publishable vernacular +\StyleType Paragraph +\FontSize 12 + +\Marker h1 +\Name DEPRECATED h1 - File - Header +\Description Running header text +\OccursUnder id +\Rank 1 +\TextType Other +\TextProperties paragraph publishable vernacular +\StyleType Paragraph +\FontSize 12 + +\Marker h2 +\Name DEPRECATED h2 - File - Left Header +\Description Running header text, left side of page +\OccursUnder id +\Rank 1 +\TextType Other +\TextProperties paragraph publishable vernacular +\StyleType Paragraph +\FontSize 12 + +\Marker h3 +\Name DEPRECATED h3 - File - Right Header +\Description Running header text, right side of page +\OccursUnder id +\Rank 1 +\TextType Other +\TextProperties paragraph publishable vernacular +\StyleType Paragraph +\FontSize 12 + +\Marker toc1 +\Name toc1 - File - Long Table of Contents Text +\Description Long table of contents text +\OccursUnder h h1 h2 h3 id +\Rank 1 +\TextType Other +\TextProperties paragraph publishable vernacular +\StyleType Paragraph +\FontSize 12 +\Italic +\Bold +\Color 16384 +#!\ColorName highcon green + +\Marker toc2 +\Name toc2 - File - Short Table of Contents Text +\Description Short table of contents text +\OccursUnder h h1 h2 h3 id +\Rank 1 +\TextType Other +\TextProperties paragraph publishable vernacular +\StyleType Paragraph +\FontSize 12 +\Italic +\Color 16384 +#!\ColorName highcon green + +\Marker toc3 +\Name toc3 - File - Book Abbreviation +\Description Book Abbreviation +\OccursUnder h h1 h2 h3 id +\Rank 1 +\TextType Other +\TextProperties paragraph publishable vernacular +\StyleType Paragraph +\FontSize 12 +\Bold +\Italic +\Color 128 +#!\ColorName lowcon red + +\Marker toca1 +\Name toca1 - File - Alternative Language Long Table of Contents Text +\Description Alternative language long table of contents text +\OccursUnder h h1 h2 h3 +\Rank 1 +\TextType Other +\TextProperties paragraph publishable vernacular +\StyleType Paragraph +\FontSize 10 +\Italic +\Color 8421504 +#!\ColorName gray + +\Marker toca2 +\Name toca2 - File - Alternative Language Short Table of Contents Text +\Description Alternative language short table of contents text +\OccursUnder h h1 h2 h3 +\Rank 1 +\TextType Other +\TextProperties paragraph publishable vernacular +\StyleType Paragraph +\FontSize 10 +\Italic +\Color 8421504 +#!\ColorName gray + +\Marker toca3 +\Name toca3 - File - Alternative Language Book Abbreviation +\Description Alternative language book Abbreviation +\OccursUnder h h1 h2 h3 +\Rank 1 +\TextType Other +\TextProperties paragraph publishable vernacular +\StyleType Paragraph +\FontSize 10 +\Italic +\Color 8421504 +#!\ColorName gray + +# Remarks and Comments + +\Marker rem +\Name rem - File - Remark +\Description Comments and remarks +\OccursUnder id ide c +\TextType Other +\TextProperties paragraph nonpublishable nonvernacular +\StyleType Paragraph +\FontSize 12 +\Color 16711680 +#!\ColorName highcon blue + +\Marker sts +\Name sts - File - Status +\Description Status of this file +\OccursUnder id ide c +\TextType Other +\TextProperties paragraph nonpublishable nonvernacular +\StyleType Paragraph +\FontSize 12 +\Color 16711680 +#!\ColorName highcon blue + +\Marker restore +\Name restore - File - Restore Information +\Description Project restore information +\OccursUnder id +\Rank 99 +\TextType Other +\TextProperties paragraph nonpublishable nonvernacular +\StyleType Paragraph +\FontSize 12 +\Color 16711680 +#!\ColorName highcon blue + +# Introduction + +\Marker imt +\Name imt - Introduction - Major Title Level 1 +\Description Introduction major title, level 1 (if single level) (basic) +\OccursUnder id +\Rank 5 +\TextProperties paragraph publishable vernacular level_1 +\TextType Other +\StyleType Paragraph +\FontSize 14 +\Bold +\Justification Center +\SpaceBefore 8 +\SpaceAfter 4 + +\Marker imt1 +\Name imt1 - Introduction - Major Title Level 1 +\Description Introduction major title, level 1 (if multiple levels) +\OccursUnder id +\Rank 5 +\TextProperties paragraph publishable vernacular level_1 +\TextType Other +\StyleType Paragraph +\FontSize 14 +\Bold +\Justification Center +\SpaceBefore 8 +\SpaceAfter 4 + +\Marker imt2 +\Name imt2 - Introduction - Major Title Level 2 +\Description Introduction major title, level 2 +\OccursUnder id +\Rank 5 +\TextProperties paragraph publishable vernacular level_2 +\TextType other +\StyleType Paragraph +\FontSize 13 +\Italic +\Justification Center +\SpaceBefore 6 +\SpaceAfter 3 + +\Marker imt3 +\Name imt3 - Introduction - Major Title Level 3 +\Description Introduction major title, level 3 +\OccursUnder id +\Rank 5 +\TextProperties paragraph publishable vernacular level_3 +\TextType Other +\StyleType Paragraph +\FontSize 12 +\Bold +\Justification Center +\SpaceBefore 2 +\SpaceAfter 2 + +\Marker imt4 +\Name imt4 - Introduction - Major Title Level 4 +\Description Introduction major title, level 4 (usually within parenthesis) +\OccursUnder id +\Rank 5 +\TextProperties paragraph publishable vernacular level_4 +\TextType Other +\StyleType Paragraph +\FontSize 12 +\Italic +\Justification Center +\SpaceBefore 2 +\SpaceAfter 2 + +\Marker imte +\Name imte - Introduction - [Uncommon] Major Title at Introduction End Level 1 +\Description Introduction major title at introduction end, level 1 (if single level) +\TextProperties paragraph publishable vernacular level_1 +\TextType Other +\OccursUnder id +\Rank 7 +\StyleType Paragraph +\FontSize 20 +\Bold +\Justification Center +\SpaceBefore 8 +\SpaceAfter 4 + +\Marker imte1 +\Name imte1 - Introduction - [Uncommon] Major Title at Introduction End Level 1 +\Description Introduction major title at introduction end, level 1 (if multiple levels) +\TextProperties paragraph publishable vernacular level_1 +\TextType Other +\OccursUnder id +\Rank 7 +\StyleType Paragraph +\FontSize 20 +\Bold +\Justification Center +\SpaceBefore 8 +\SpaceAfter 4 + +\Marker imte2 +\Name imte2 - Introduction - [Uncommon] Major Title at Introduction End Level 2 +\Description Introduction major title at introduction end, level 2 +\TextProperties paragraph publishable vernacular level_2 +\TextType Other +\OccursUnder id +\Rank 7 +\StyleType Paragraph +\FontSize 16 +\Italic +\Justification Center +\SpaceAfter 2 + +\Marker is +\Name is - Introduction - Section Heading Level 1 +\Description Introduction section heading, level 1 (if single level) (basic) +\OccursUnder id +\Rank 6 +\TextType Other +\TextProperties paragraph publishable vernacular level_1 +\StyleType Paragraph +\FontSize 14 +\Bold +\Justification Center +\SpaceBefore 8 +\SpaceAfter 4 + +\Marker is1 +\Name is1 - Introduction - Section Heading Level 1 +\Description Introduction section heading, level 1 (if multiple levels) +\OccursUnder id +\Rank 6 +\TextType Other +\TextProperties paragraph publishable vernacular level_1 +\StyleType Paragraph +\FontSize 14 +\Bold +\Justification Center +\SpaceBefore 8 +\SpaceAfter 4 + +\Marker is2 +\Name is2 - Introduction - Section Heading Level 2 +\Description Introduction section heading, level 2 +\OccursUnder id +\Rank 6 +\TextType Other +\TextProperties paragraph publishable vernacular level_2 +\StyleType Paragraph +\FontSize 12 +\Bold +\Justification Center +\SpaceBefore 8 +\SpaceAfter 4 + +\Marker iot +\Name iot - Introduction - Outline Title +\Description Introduction outline title (basic) +\OccursUnder id +\Rank 6 +\TextType Other +\TextProperties paragraph publishable vernacular +\StyleType Paragraph +\FontSize 12 +\Bold +\Justification Center +\SpaceBefore 8 +\SpaceAfter 4 + +\Marker io +\Name io - Introduction - Outline Level 1 +\Description Introduction outline text, level 1 (if single level) +\OccursUnder id +\Rank 6 +\TextType Other +\TextProperties paragraph publishable vernacular level_1 +\StyleType paragraph +\FontSize 12 +\LeftMargin .5 + +\Marker io1 +\Name io1 - Introduction - Outline Level 1 +\Description Introduction outline text, level 1 (if multiple levels) (basic) +\OccursUnder id +\Rank 6 +\TextType Other +\TextProperties paragraph publishable vernacular level_1 +\StyleType paragraph +\FontSize 12 +\LeftMargin .5 + +\Marker io2 +\Name io2 - Introduction - Outline Level 2 +\Description Introduction outline text, level 2 +\OccursUnder id +\Rank 6 +\TextType Other +\TextProperties paragraph publishable vernacular level_2 +\StyleType paragraph +\FontSize 12 +\LeftMargin .75 + +\Marker io3 +\Name io3 - Introduction - Outline Level 3 +\Description Introduction outline text, level 3 +\OccursUnder id +\Rank 6 +\TextType Other +\TextProperties paragraph publishable vernacular level_3 +\StyleType paragraph +\FontSize 12 +\LeftMargin 1 + +\Marker io4 +\Name io4 - Introduction - Outline Level 4 +\Description Introduction outline text, level 4 +\OccursUnder id +\Rank 6 +\TextType Other +\TextProperties paragraph publishable vernacular level_4 +\StyleType paragraph +\FontSize 12 +\LeftMargin 1.25 + +\Marker ior +\Endmarker ior* +\Name ior...ior* - Introduction - Outline References Range +\Description Introduction references range for outline entry; for marking references separately +\OccursUnder id io io1 io2 io3 io4 NEST +\TextType Other +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 + +\Marker ip +\Name ip - Introduction - Paragraph +\Description Introduction prose paragraph (basic) +\OccursUnder id +\Rank 6 +\TextType Other +\TextProperties paragraph publishable vernacular +\StyleType Paragraph +\FontSize 12 +\FirstLineIndent .125 # 1/8 inch first line indent + +\Marker im +\Name im - Introduction - Paragraph - no first line indent +\Description Introduction prose paragraph, with no first line indent (may occur after poetry) +\OccursUnder id +\Rank 6 +\TextType Other +\TextProperties paragraph publishable vernacular +\StyleType Paragraph +\FontSize 12 + +\Marker ipi +\Name ipi - Introduction - Indented Para - first line indent +\Description Introduction prose paragraph, indented, with first line indent +\OccursUnder id +\Rank 6 +\TextType Other +\TextProperties paragraph publishable vernacular +\StyleType Paragraph +\FontSize 12 +\FirstLineIndent .125 # 1/8 inch first line indent +\LeftMargin .25 +\RightMargin .25 + +\Marker imi +\Name imi - Introduction - Indented Para - no first line indent +\Description Introduction prose paragraph text, indented, with no first line indent +\OccursUnder id +\Rank 6 +\TextType Other +\TextProperties paragraph publishable vernacular +\StyleType Paragraph +\FontSize 12 +\LeftMargin .25 +\RightMargin .25 + +\Marker ili +\Name ili - Introduction - List Entry - Level 1 +\Description A list entry, level 1 (if single level) +\OccursUnder id +\Rank 6 +\TextType Other +\TextProperties paragraph publishable vernacular level_1 +\StyleType paragraph +\FontSize 12 +\LeftMargin .5 +\FirstLineIndent -.375 # 1/8 inch indent, 1/2 inch wrap + +\Marker ili1 +\Name ili1 - Introduction - List Entry - Level 1 +\Description A list entry, level 1 (if multiple levels) +\OccursUnder id +\Rank 6 +\TextType Other +\TextProperties paragraph publishable vernacular level_1 +\StyleType paragraph +\FontSize 12 +\LeftMargin .5 +\FirstLineIndent -.375 # 1/8 inch indent, 1/2 inch wrap + +\Marker ili2 +\Name ili2 - Introduction - List Entry - Level 2 +\Description A list entry, level 2 +\OccursUnder id +\Rank 6 +\TextType Other +\TextProperties paragraph publishable vernacular level_2 +\StyleType paragraph +\FontSize 12 +\LeftMargin .75 +\FirstLineIndent -.375 + +\Marker ipq +\Name ipq - Introduction - Paragraph - quote from text +\Description Introduction prose paragraph, quote from the body text +\OccursUnder id +\Rank 6 +\TextType Other +\TextProperties paragraph publishable vernacular +\StyleType Paragraph +\FontSize 12 +\LeftMargin .25 +\RightMargin .25 +\FirstLineIndent .125 # 1/8 inch first line indent +\Italic + +\Marker imq +\Name imq - Introduction - Paragraph - quote from text - no first line indent +\Description Introduction prose paragraph, quote from the body text, with no first line indent +\OccursUnder id +\Rank 6 +\TextType Other +\TextProperties paragraph publishable vernacular +\StyleType Paragraph +\FontSize 12 +\LeftMargin .25 +\RightMargin .25 +\Italic + +\Marker ipr +\Name ipr - Introduction - Paragraph - right aligned +\Description Introduction prose paragraph, right aligned +\OccursUnder id +\Rank 6 +\TextType Other +\TextProperties paragraph publishable vernacular +\StyleType Paragraph +\FontSize 12 +\LeftMargin .25 +\RightMargin .25 +\Justification Right +\Italic + +\Marker ib +\Name ib - Introduction - Blank Line +\Description Introduction blank line +\OccursUnder id +\Rank 6 +\TextProperties paragraph publishable vernacular poetic +\TextType Other +\FontSize 10 +\StyleType paragraph + +\Marker iq +\Name iq - Introduction - Poetry Level 1 +\Description Introduction poetry text, level 1 (if single level) +\OccursUnder id +\Rank 6 +\TextType Other +\TextProperties paragraph publishable vernacular poetic level_1 +\StyleType Paragraph +\FontSize 12 +\LeftMargin 1 +\FirstLineIndent -.75 # 1/4 inch indent, 1 inch wrap +\Italic + +\Marker iq1 +\Name iq1 - Introduction - Poetry Level 1 +\Description Introduction poetry text, level 1 (if multiple levels) +\OccursUnder id +\Rank 6 +\TextType Other +\TextProperties paragraph publishable vernacular poetic level_1 +\StyleType Paragraph +\FontSize 12 +\LeftMargin 1 +\FirstLineIndent -.75 # 1/4 inch indent, 1 inch wrap +\Italic + +\Marker iq2 +\Name iq2 - Introduction - Poetry Level 2 +\Description Introduction poetry text, level 2 +\OccursUnder id +\Rank 6 +\TextType Other +\TextProperties paragraph publishable vernacular poetic level_2 +\StyleType Paragraph +\FontSize 12 +\LeftMargin 1 +\FirstLineIndent -.5 # 1/2 inch indent, 1 inch wrap +\Italic + +\Marker iq3 +\Name iq3 - Introduction - Poetry Level 3 +\Description Introduction poetry text, level 3 +\OccursUnder id +\Rank 6 +\TextType Other +\TextProperties paragraph publishable vernacular poetic level_3 +\StyleType Paragraph +\FontSize 12 +\LeftMargin 1 +\FirstLineIndent -.25 # 3/4 inch indent, 1 inch wrap +\Italic + +\Marker iex +\Name iex - Introduction - Explanatory or Bridge Text +\Description Introduction explanatory or bridge text (e.g. explanation of missing book in Short Old Testament) +\OccursUnder id c +\TextType Other +\TextProperties paragraph publishable vernacular +\StyleType Paragraph +\FontSize 12 +\FirstLineIndent .125 # 1/8 inch first line indent +\SpaceBefore 4 +\SpaceAfter 4 + +\Marker iqt +\Endmarker iqt* +\Name iqt...iqt* - Special Text - Quoted Scripture Text in Introduction +\Description For quoted scripture text appearing in the introduction +\OccursUnder imt imt1 imt2 imt3 imt4 ib ie ili ili1 ili2 im imi imq io io1 io2 io3 io4 iot ip ipi ipq ipr iq iq1 iq2 iq3 is is1 is2 imte imte1 imte2 iex +\TextType Other +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 +\Italic + +\Marker ie +\Name ie - Introduction - End Marker +\Description Introduction ending marker +\OccursUnder id +\Rank 6 +\TextProperties paragraph publishable vernacular +\TextType Other +\FontSize 10 +\StyleType paragraph + +# Chapters and Verses + +\Marker c +\Name c - Chapter Number +\Description Chapter number (necessary for normal Paratext operation) +\OccursUnder id +\Rank 8 +\TextType ChapterNumber +\TextProperties chapter +\StyleType Paragraph +\Bold +\FontSize 18 +\SpaceBefore 8 +\SpaceAfter 4 + +\Marker ca +\Endmarker ca* +\Name ca...ca* - Chapter Number - Alternate +\Description Second (alternate) chapter number (for coding dual versification; useful for places where different traditions of chapter breaks need to be supported in the same translation) +\OccursUnder c +\TextType Other +\StyleType Character +\Italic +\FontSize 16 +\Color 2263842 +#!\ColorName green + +\Marker cp +\Name cp - Chapter Number - Publishing Alternate +\Description Published chapter number (chapter string that should appear in the published text) +\OccursUnder c +\Rank 4 +\TextType Other +\TextProperties paragraph +\StyleType Paragraph +\Bold +\FontSize 18 +\SpaceBefore 8 +\SpaceAfter 4 +\Color 16711680 +#!\ColorName highcon blue + +\Marker cl +\Name cl - Chapter - Publishing Label +\Description Chapter label used for translations that add a word such as "Chapter" before chapter numbers (e.g. Psalms). The subsequent text is the chapter label. +\OccursUnder id c ms ms1 ms2 ms3 mr +\TextType Other +\TextProperties paragraph +\StyleType Paragraph +\Bold +\FontSize 18 +\SpaceBefore 8 +\SpaceAfter 4 +\Justification Center + +\Marker cd +\Name cd - Chapter - Description +\Description Chapter Description (Publishing option D, e.g. in Russian Bibles) +\OccursUnder c +\TextType Other +\TextProperties paragraph +\StyleType Paragraph +\FontSize 11 +\SpaceBefore 8 +\SpaceAfter 4 + +\Marker v +\Name v - Verse Number +\Description A verse number (Necessary for normal paratext operation) (basic) +\OccursUnder lh li li1 li2 li3 li4 lf lim lim1 lim2 lim3 lim4 m mi nb p pc ph phi pi pi1 pi2 pi3 pr pmo pm pmc pmr po q q1 q2 q3 q4 qc qr qd qm qm1 qm2 qm3 tr tc1 tc2 tc3 tc4 tcr1 tcr2 tcr3 tcr4 s3 d sp +\TextType VerseNumber +\TextProperties verse +\StyleType Character +\FontSize 12 +\Superscript + +\Marker va +\Endmarker va* +\Name va...va* - Verse Number - Alternate +\Description Second (alternate) verse number (for coding dual numeration in Psalms; see also NRSV Exo 22.1-4) +\OccursUnder lh li li1 li2 li3 li4 lf lim lim1 lim2 lim3 lim4 m mi nb p pc ph phi pi pi1 pi2 pi3 pr pmo pm pmc pmr po q q1 q2 q3 q4 qc qr qd qm qm1 qm2 qm3 tr tc1 tc2 tc3 tc4 tcr1 tcr2 tcr3 tcr4 s3 d sp +\TextType Other +\StyleType Character +\FontSize 12 +\Superscript +\Color 2263842 +#!\ColorName green + +\Marker vp +\Endmarker vp* +\Name vp...vp* - Verse Number - Publishing Alternate +\Description Published verse marker (verse string that should appear in the published text) +\OccursUnder cd lh li li1 li2 li3 li4 lf lim lim1 lim2 lim3 lim4 m mi nb p pc ph phi pi pi1 pi2 pi3 pr pmo pm pmc pmr po q q1 q2 q3 q4 qc qr qd qm qm1 qm2 qm3 tr tc1 tc2 tc3 tc4 tcr1 tcr2 tcr3 tcr4 s3 d sp +\TextType Other +\StyleType Character +\FontSize 12 +\Superscript +\Color 16711680 +#!\ColorName highcon blue + +# Paragraphs + +\Marker p +\Name p - Paragraph - Normal - First Line Indent +\Description Paragraph text, with first line indent (basic) +\OccursUnder c +\Rank 4 +\TextType VerseText +\TextProperties paragraph publishable vernacular +\StyleType Paragraph +\FontSize 12 +\FirstLineIndent .125 # 1/8 inch first line indent + +\Marker m +\Name m - Paragraph - Margin - No First Line Indent +\Description Paragraph text, with no first line indent (may occur after poetry) (basic) +\OccursUnder c +\Rank 4 +\TextType VerseText +\TextProperties paragraph publishable vernacular +\StyleType Paragraph +\FontSize 12 + +\Marker po +\Name po - Paragraph - Letter Opening +\Description Letter opening +\OccursUnder c +\Rank 4 +\TextType VerseText +\TextProperties paragraph publishable vernacular +\StyleType Paragraph +\FontSize 12 +\FirstLineIndent .125 # 1/8 inch first line indent +\SpaceBefore 4 +\SpaceAfter 4 + +\Marker pr +\Name pr - Paragraph - Text Refrain (right aligned) +\Description Text refrain (paragraph text, right aligned) +\OccursUnder c +\Rank 4 +\TextType VerseText +\TextProperties paragraph publishable vernacular +\StyleType Paragraph +\Justification Right +\FontSize 12 + +\Marker cls +\Name cls - Paragraph - Letter Closing +\Description Letter Closing +\OccursUnder c +\Rank 4 +\TextType VerseText +\TextProperties paragraph publishable vernacular +\StyleType Paragraph +\FontSize 12 +\Justification Right + +\Marker pmo +\Name pmo - Paragraph - Embedded Text Opening +\Description Embedded text opening +\OccursUnder m mi nb p pc ph phi pi pi1 pi2 pi3 pr po q q1 q2 q3 q4 qc qr b s1 s2 s3 s4 +\TextType VerseText +\TextProperties paragraph publishable vernacular +\StyleType Paragraph +\FontSize 12 +\LeftMargin .25 +\RightMargin .25 + +\Marker pm +\Name pm - Paragraph - Embedded Text +\Description Embedded text paragraph +\OccursUnder m mi nb p pc ph phi pi pi1 pi2 pi3 pr po psi q q1 q2 q3 q4 qc qr b s1 s2 s3 s4 +\TextType VerseText +\TextProperties paragraph publishable vernacular +\StyleType Paragraph +\FontSize 12 +\FirstLineIndent .125 # 1/8 inch first line indent +\LeftMargin .25 +\RightMargin .25 + +\Marker pmc +\Name pmc - Paragraph - Embedded Text Closing +\Description Embedded text closing +\OccursUnder m mi nb p pc ph phi pi pi1 pi2 pi3 pr po q q1 q2 q3 q4 qc qr b s1 s2 s3 s4 +\TextType VerseText +\TextProperties paragraph publishable vernacular +\StyleType Paragraph +\FontSize 12 +\LeftMargin .25 +\RightMargin .25 + +\Marker pmr +\Name pmr - Paragraph - Embedded Text Refrain +\Description Embedded text refrain (e.g. Then all the people shall say, "Amen!") +\OccursUnder li li1 li2 li3 li4 lim lim1 lim2 lim3 lim4 m mi nb p pc ph phi pi pi1 pi2 pi3 pr po q q1 q2 q3 q4 qc qr b s1 s2 s3 s4 +\TextType VerseText +\TextProperties paragraph publishable vernacular +\StyleType Paragraph +\FontSize 12 +\Justification Right +\LeftMargin .25 +\RightMargin .25 + +\Marker pi +\Name pi - Paragraph - Indented - Level 1 - First Line Indent +\Description Paragraph text, level 1 indent (if single level), with first line indent; often used for discourse (basic) +\OccursUnder c +\Rank 4 +\TextType VerseText +\TextProperties paragraph publishable vernacular level_1 +\StyleType Paragraph +\FontSize 12 +\FirstLineIndent .125 # 1/8 inch first line indent +\LeftMargin .25 +\RightMargin .25 + +\Marker pi1 +\Name pi1 - Paragraph - Indented - Level 1 - First Line Indent +\Description Paragraph text, level 1 indent (if multiple levels), with first line indent; often used for discourse +\OccursUnder c +\Rank 4 +\TextType VerseText +\TextProperties paragraph publishable vernacular level_1 +\StyleType Paragraph +\FontSize 12 +\FirstLineIndent .125 # 1/8 inch first line indent +\LeftMargin .25 +\RightMargin .25 + +\Marker pi2 +\Name pi2 - Paragraph - Indented - Level 2 - First Line Indent +\Description Paragraph text, level 2 indent, with first line indent; often used for discourse +\OccursUnder c +\Rank 4 +\TextType VerseText +\TextProperties paragraph publishable vernacular level_2 +\StyleType Paragraph +\FontSize 12 +\FirstLineIndent .125 # 1/8 inch first line indent +\LeftMargin .5 +\RightMargin .25 + +\Marker pi3 +\Name pi3 - Paragraph - Indented - Level 3 - First Line Indent +\Description Paragraph text, level 3 indent, with first line indent; often used for discourse +\OccursUnder c +\Rank 4 +\TextType VerseText +\TextProperties paragraph publishable vernacular level_3 +\StyleType Paragraph +\FontSize 12 +\FirstLineIndent .125 # 1/8 inch first line indent +\LeftMargin .75 +\RightMargin .25 + +\Marker pc +\Name pc - Paragraph - Centered (for Inscription) +\Description Paragraph text, centered (for Inscription) +\OccursUnder c +\Rank 4 +\TextType VerseText +\TextProperties paragraph publishable vernacular +\StyleType Paragraph +\Justification Center +\FontSize 12 + +\Marker mi +\Name mi - Paragraph - Indented - No First Line Indent +\Description Paragraph text, indented, with no first line indent; often used for discourse +\OccursUnder c +\Rank 4 +\TextType VerseText +\TextProperties paragraph publishable vernacular +\StyleType Paragraph +\FontSize 12 +\LeftMargin .25 +\RightMargin .25 + +\Marker nb +\Name nb - Paragraph - No Break with Previous Paragraph +\Description Paragraph text, with no break from previous paragraph text (at chapter boundary) (basic) +\OccursUnder c +\Rank 4 +\TextType VerseText +\TextProperties paragraph publishable vernacular +\StyleType Paragraph +\FontSize 12 + +# Poetry + +\Marker q +\Name q - Poetry - Indent Level 1 - Single Level Only +\Description Poetry text, level 1 indent (if single level) +\OccursUnder c +\Rank 4 +\TextType VerseText +\TextProperties paragraph publishable vernacular poetic level_1 +\StyleType Paragraph +\FontSize 12 +\LeftMargin 0.75 +\FirstLineIndent -0.5 # 1/8 inch indent, 3/4 inch wrap + +\Marker q1 +\Name q1 - Poetry - Indent Level 1 +\Description Poetry text, level 1 indent (if multiple levels) (basic) +\OccursUnder c +\Rank 4 +\TextType VerseText +\TextProperties paragraph publishable vernacular poetic level_1 +\StyleType Paragraph +\FontSize 12 +\LeftMargin 0.75 +\FirstLineIndent -0.5 # 1/8 inch indent, 3/4 inch wrap + +\Marker q2 +\Name q2 - Poetry - Indent Level 2 +\Description Poetry text, level 2 indent (basic) +\OccursUnder c +\Rank 4 +\TextType VerseText +\TextProperties paragraph publishable vernacular poetic level_2 +\StyleType Paragraph +\FontSize 12 +\LeftMargin 0.75 +\FirstLineIndent -0.375 # 1/4 inch indent, 3/4 inch wrap + +\Marker q3 +\Name q3 - Poetry - Indent Level 3 +\Description Poetry text, level 3 indent +\OccursUnder c +\Rank 4 +\TextType VerseText +\TextProperties paragraph publishable vernacular poetic level_3 +\StyleType Paragraph +\FontSize 12 +\LeftMargin 0.75 +\FirstLineIndent -0.25 # 3/8 inch indent, 3/4 inch wrap + +\Marker q4 +\Name q4 - Poetry - Indent Level 4 +\Description Poetry text, level 4 indent +\OccursUnder c +\Rank 4 +\TextType VerseText +\TextProperties paragraph publishable vernacular poetic level_4 +\StyleType Paragraph +\FontSize 12 +\LeftMargin 0.75 +\FirstLineIndent -0.125 # 1/2 inch indent, 3/4 inch wrap + +\Marker qc +\Name qc - Poetry - Centered +\Description Poetry text, centered +\OccursUnder c +\Rank 4 +\TextType VerseText +\TextProperties paragraph publishable vernacular poetic +\StyleType Paragraph +\FontSize 12 +\Justification Center + +\Marker qr +\Name qr - Poetry - Right Aligned +\Description Poetry text, Right Aligned +\OccursUnder c +\Rank 4 +\TextType VerseText +\TextProperties paragraph publishable vernacular poetic +\StyleType Paragraph +\FontSize 12 +\Justification Right + +\Marker qs +\Endmarker qs* +\Name qs...qs* - Poetry Text - Selah +\Description Poetry text, Selah +\OccursUnder q q1 q2 q3 q4 qc qr qd NEST +\Rank 4 +\TextType VerseText +\TextProperties publishable vernacular poetic +\StyleType Character +\FontSize 12 +\Italic + +\Marker qa +\Name qa - Poetry - Acrostic Heading/Marker +\Description Poetry text, Acrostic marker/heading +\OccursUnder c +\Rank 4 +\TextType Other +\TextProperties paragraph publishable vernacular poetic +\StyleType Paragraph +\FontSize 12 +\Italic + +\Marker qac +\Endmarker qac* +\Name qac...qac* - Poetry Text - Acrostic Letter +\Description Poetry text, Acrostic markup of the first character of a line of acrostic poetry +\OccursUnder q q1 q2 q3 q4 qc qr NEST +\Rank 4 +\TextType Other +\TextProperties publishable vernacular poetic +\StyleType Character +\FontSize 12 +\Italic + +\Marker qm +\Name qm - Poetry - Embedded Text - Indent Level 1 - Single Level Only +\Description Poetry text, embedded, level 1 indent (if single level) +\OccursUnder m mi nb p pc ph phi pi pi1 pi2 pi3 pr q q1 q2 q3 q4 qc qr b +\TextType VerseText +\TextProperties paragraph publishable vernacular poetic +\StyleType Paragraph +\FontSize 12 +\LeftMargin 1 +\FirstLineIndent -.75 # 1/4 inch indent, 1 inch wrap + +\Marker qm1 +\Name qm1 - Poetry - Embedded Text - Indent Level 1 +\Description Poetry text, embedded, level 1 indent (if multiple levels) +\OccursUnder m mi nb p pc ph phi pi pi1 pi2 pi3 pr q q1 q2 q3 q4 qc qr b +\TextType VerseText +\TextProperties paragraph publishable vernacular poetic level_1 +\StyleType Paragraph +\FontSize 12 +\LeftMargin 1 +\FirstLineIndent -.75 # 1/4 inch indent, 1 inch wrap + +\Marker qm2 +\Name qm2 - Poetry - Embedded Text - Indent Level 2 +\Description Poetry text, embedded, level 2 indent +\OccursUnder m mi nb p pc ph phi pi pi1 pi2 pi3 pr q q1 q2 q3 q4 qc qr b +\TextType VerseText +\TextProperties paragraph publishable vernacular poetic level_2 +\StyleType Paragraph +\FontSize 12 +\LeftMargin 1 +\FirstLineIndent -.5 # 1/2 inch indent, 1 inch wrap + +\Marker qm3 +\Name qm3 - Poetry - Embedded Text - Indent Level 3 +\Description Poetry text, embedded, level 3 indent +\OccursUnder m mi nb p pc ph phi pi pi1 pi2 pi3 pr q q1 q2 q3 q4 qc qr b +\TextType VerseText +\TextProperties paragraph publishable vernacular poetic level_3 +\StyleType Paragraph +\FontSize 12 +\LeftMargin 1 +\FirstLineIndent -.25 # 3/4 inch indent, 1 inch wrap + +\Marker qd +\Name qd - Poetry - Hebrew Note +\Description A Hebrew musical performance annotation, similar in content to Hebrew descriptive title. +\OccursUnder c +\Rank 4 +\TextType VerseText +\TextProperties paragraph publishable vernacular poetic +\StyleType Paragraph +\FontSize 12 +\Italic +\LeftMargin .25 + +\Marker b +\Name b - Poetry - Stanza Break (Blank Line) +\Description Poetry text stanza break (e.g. stanza break) (basic) +\OccursUnder c +\Rank 4 +\TextProperties paragraph publishable vernacular poetic +\TextType VerseText +\FontSize 10 +\StyleType paragraph + +# Titles & Headings + +\Marker mt +\Name mt - Title - Major Title Level 1 +\Description The main title of the book (if single level) +\OccursUnder id +\Rank 3 +\TextProperties paragraph publishable vernacular level_1 +\TextType Title +\StyleType Paragraph +\FontSize 20 +\Bold +\Justification Center +\SpaceBefore 8 +\SpaceAfter 4 + +\Marker mt1 +\Name mt1 - Title - Major Title Level 1 +\Description The main title of the book (if multiple levels) (basic) +\OccursUnder id +\Rank 3 +\TextProperties paragraph publishable vernacular level_1 +\TextType Title +\StyleType Paragraph +\FontSize 20 +\Bold +\Justification Center +\SpaceBefore 2 +\SpaceAfter 4 + +\Marker mt2 +\Name mt2 - Title - Major Title Level 2 +\Description A secondary title usually occurring before the main title (basic) +\OccursUnder id +\Rank 3 +\TextProperties paragraph publishable vernacular level_2 +\TextType Title +\StyleType Paragraph +\FontSize 16 +\Italic +\Justification Center +\SpaceAfter 2 + +\Marker mt3 +\Name mt3 - Title - Major Title Level 3 +\Description A secondary title occurring after the main title +\OccursUnder id +\Rank 3 +\TextProperties paragraph publishable vernacular level_3 +\TextType Title +\StyleType Paragraph +\FontSize 16 +\Bold +\Justification Center +\SpaceBefore 2 +\SpaceAfter 2 + +\Marker mt4 +\Name mt4 - Title - Major Title level 4 +\Description A small secondary title sometimes occurring within parentheses +\OccursUnder id +\Rank 3 +\TextProperties paragraph publishable vernacular level_4 +\TextType Title +\StyleType Paragraph +\FontSize 12 +\Justification Center +\SpaceBefore 2 +\SpaceAfter 2 + +\Marker mte +\Name mte - Title - [Uncommon] Major Title Ending Level 1 +\Description The main title of the book repeated at the end of the book, level 1 (if single level) +\TextProperties paragraph publishable vernacular level_1 +\TextType Title +\OccursUnder c +\Rank 2 +\StyleType Paragraph +\FontSize 20 +\Bold +\Justification Center +\SpaceBefore 8 +\SpaceAfter 4 + +\Marker mte1 +\Name mte1 - Title - [Uncommon] Major Title Ending Level 1 +\Description The main title of the book repeated at the end of the book, level 1 (if multiple levels) +\TextProperties paragraph publishable vernacular level_1 +\TextType Title +\OccursUnder lh li li1 li2 li3 li4 lf lim lim1 lim2 lim3 lim4 m mi nb p pc ph phi pi pi1 pi2 pi3 pr pmo pm pmc pmr po q q1 q2 q3 q4 qc qr qd qm qm1 qm2 qm3 tc1 tc2 tc3 tc4 s3 d +\Rank 2 +\StyleType Paragraph +\FontSize 20 +\Bold +\Justification Center +\SpaceBefore 8 +\SpaceAfter 4 + +\Marker mte2 +\Name mte2 - Title - [Uncommon] Major Title Ending Level 2 +\Description A secondary title occurring before or after the 'ending' main title +\TextProperties paragraph publishable vernacular level_2 +\TextType Title +\OccursUnder mte1 +\Rank 2 +\StyleType Paragraph +\FontSize 16 +\Italic +\Justification Center +\SpaceAfter 2 + +\Marker ms +\Name ms - Heading - Major Section Level 1 +\Description A major section division heading, level 1 (if single level) (basic) +\OccursUnder c +\Rank 4 +\TextType Section +\TextProperties paragraph publishable vernacular level_1 +\StyleType Paragraph +\FontSize 14 +\Bold +\Justification Center +\SpaceBefore 16 +\SpaceAfter 4 + +\Marker ms1 +\Name ms1 - Heading - Major Section Level 1 +\Description A major section division heading, level 1 (if multiple levels) +\OccursUnder c +\Rank 4 +\TextType Section +\TextProperties paragraph publishable vernacular level_1 +\StyleType Paragraph +\FontSize 14 +\Bold +\Justification Center +\SpaceBefore 16 +\SpaceAfter 4 + +\Marker ms2 +\Name ms2 - Heading - Major Section Level 2 +\Description A major section division heading, level 2 +\OccursUnder c +\Rank 4 +\TextType Section +\TextProperties paragraph publishable vernacular level_1 +\StyleType Paragraph +\FontSize 14 +\Bold +\Justification Center +\SpaceBefore 16 +\SpaceAfter 4 + +\Marker ms3 +\Name ms3 - Heading - Major Section Level 3 +\Description A major section division heading, level 3 +\OccursUnder c +\Rank 4 +\TextType Section +\TextProperties paragraph publishable vernacular level_1 +\StyleType Paragraph +\FontSize 14 +\Italic +\Justification Center +\SpaceBefore 16 +\SpaceAfter 4 + +\Marker mr +\Name mr - Heading - Major Section Range References +\Description A major section division references range heading (basic) +\OccursUnder ms ms1 ms2 ms3 +\TextType Section +\TextProperties paragraph publishable vernacular level_1 +\StyleType Paragraph +\FontSize 12 +\Italic +\Justification Center +\SpaceAfter 4 + +\Marker s +\Name s - Heading - Section Level 1 +\Description A section heading, level 1 (if single level) (basic) +\OccursUnder c +\Rank 4 +\TextType Section +\TextProperties paragraph publishable vernacular level_1 +\StyleType Paragraph +\FontSize 12 +\Bold +\Justification Center +\SpaceBefore 8 +\SpaceAfter 4 + +\Marker s1 +\Name s1 - Heading - Section Level 1 +\Description A section heading, level 1 (if multiple levels) +\OccursUnder c +\Rank 4 +\TextType Section +\TextProperties paragraph publishable vernacular level_1 +\StyleType Paragraph +\FontSize 12 +\Bold +\Justification Center +\SpaceBefore 8 +\SpaceAfter 4 + +\Marker s2 +\Name s2 - Heading - Section Level 2 +\Description A section heading, level 2 (e.g. Proverbs 22-24) +\OccursUnder c +\Rank 4 +\TextType Section +\TextProperties paragraph publishable vernacular level_2 +\StyleType Paragraph +\FontSize 12 +\Italic +\Justification Center +\SpaceBefore 8 +\SpaceAfter 4 + +\Marker s3 +\Name s3 - Heading - Section Level 3 +\Description A section heading, level 3 (e.g. Genesis "The First Day") +\OccursUnder c +\Rank 4 +\TextType Section +\TextProperties paragraph publishable vernacular level_3 +\StyleType Paragraph +\FontSize 12 +\Italic +\Justification Left +\SpaceBefore 6 +\SpaceAfter 3 + +\Marker s4 +\Name s4 - Heading - Section Level 4 +\Description A section heading, level 4 +\OccursUnder c +\Rank 4 +\TextType Section +\TextProperties paragraph publishable vernacular level_4 +\StyleType Paragraph +\FontSize 12 +\Italic +\Justification Left +\SpaceBefore 6 +\SpaceAfter 3 + +\Marker sr +\Name sr - Heading - Section Range References +\Description A section division references range heading +\OccursUnder s s1 s2 s3 s4 +\TextType Section +\TextProperties paragraph publishable vernacular level_1 +\StyleType Paragraph +\FontSize 12 +\Bold +\Justification Center +\SpaceAfter 4 + +\Marker r +\Name r - Heading - Parallel References +\Description Parallel reference(s) (basic) +\OccursUnder c s s1 s2 s3 s4 +\TextType Section +\TextProperties paragraph publishable vernacular level_1 +\StyleType Paragraph +\FontSize 12 +\Italic +\Justification Center +\SpaceAfter 4 + +\Marker sp +\Name sp - Label - Speaker +\Description A heading, to identify the speaker (e.g. Job) +\OccursUnder c +\Rank 4 +\TextType Section +\TextProperties paragraph publishable vernacular level_1 +\StyleType Paragraph +\FontSize 12 +\Italic +\Justification Left +\SpaceBefore 8 +\SpaceAfter 4 + +\Marker d +\Name d - Label - Descriptive Title - Hebrew Subtitle +\Description A Hebrew text heading, to provide description (e.g. Psalms) +\OccursUnder c +\Rank 4 +\TextType VerseText +\TextProperties paragraph publishable vernacular level_1 +\StyleType Paragraph +\FontSize 12 +\Italic +\Justification Center +\SpaceBefore 4 +\SpaceAfter 4 + +\Marker sd +\Name sd - Label - Semantic Division Location - Level 1 +\Description Vertical space used to divide the text into sections, level 1 (if single level) +\OccursUnder c +\Rank 4 +\TextType Section +\TextProperties paragraph publishable vernacular level_1 +\StyleType Paragraph +\SpaceBefore 24 +\SpaceAfter 24 + +\Marker sd1 +\Name sd1 - Label - Semantic Division Location - Level 1 +\Description Vertical space used to divide the text into sections, level 1 (if multiple levels) +\OccursUnder c +\Rank 4 +\TextType Section +\TextProperties paragraph publishable vernacular level_1 +\StyleType Paragraph +\SpaceBefore 24 +\SpaceAfter 24 + +\Marker sd2 +\Name sd2 - Label - Semantic Division Location - Level 2 +\Description Vertical space used to divide the text into sections, level 2 +\OccursUnder c +\Rank 4 +\TextType Section +\TextProperties paragraph publishable vernacular level_2 +\StyleType Paragraph +\SpaceBefore 18 +\SpaceAfter 18 + +\Marker sd3 +\Name sd3 - Label - Semantic Division Location - Level 3 +\Description Vertical space used to divide the text into sections, level 3 +\OccursUnder c +\Rank 4 +\TextType Section +\TextProperties paragraph publishable vernacular level_3 +\StyleType Paragraph +\SpaceBefore 12 +\SpaceAfter 12 + +\Marker sd4 +\Name sd4 - Label - Semantic Division Location - Level 4 +\Description Vertical space used to divide the text into sections, level 4 +\OccursUnder c +\Rank 4 +\TextType Section +\TextProperties paragraph publishable vernacular level_4 +\StyleType Paragraph +\SpaceBefore 8 +\SpaceAfter 8 + +# Tables + +\Marker tr +\Name tr - Table - Row +\Description A new table row +\OccursUnder c +\Rank 4 +\TextType VerseText +\TextProperties paragraph publishable vernacular +\StyleType Paragraph +\FontSize 12 +\LeftMargin .5 +\FirstLineIndent -.25 # 6/16 inch + +\Marker th1 +\Name th1 - Table - Column 1 Heading +\Description A table heading, column 1 +\OccursUnder tr +\TextType VerseText +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 +\Italic + +\Marker th2 +\Name th2 - Table - Column 2 Heading +\Description A table heading, column 2 +\OccursUnder tr +\TextType VerseText +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 +\Italic + +\Marker th3 +\Name th3 - Table - Column 3 Heading +\Description A table heading, column 3 +\OccursUnder tr +\TextType VerseText +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 +\Italic + +\Marker th4 +\Name th4 - Table - Column 4 Heading +\Description A table heading, column 4 +\OccursUnder tr +\TextType VerseText +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 +\Italic + +\Marker th5 +\Name th5 - Table - Column 5 Heading +\Description A table heading, column 5 +\OccursUnder tr +\TextType VerseText +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 +\Italic + +\Marker tc1 +\Name tc1 - Table - Column 1 Cell +\Description A table cell item, column 1 +\OccursUnder tr +\TextType VerseText +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 + +\Marker tc2 +\Name tc2 - Table - Column 2 Cell +\Description A table cell item, column 2 +\OccursUnder tr +\TextType VerseText +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 + +\Marker tc3 +\Name tc3 - Table - Column 3 Cell +\Description A table cell item, column 3 +\OccursUnder tr +\TextType VerseText +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 + +\Marker tc4 +\Name tc4 - Table - Column 4 Cell +\Description A table cell item, column 4 +\OccursUnder tr +\TextType VerseText +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 + +\Marker tc5 +\Name tc5 - Table - Column 5 Cell +\Description A table cell item, column 5 +\OccursUnder tr +\TextType VerseText +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 + +# Center Aligned Table Heads and Columns + +\Marker thc1 +\Name thc1 - Table - Column 1 Heading - Center Aligned +\Description A table heading, column 1, center aligned +\OccursUnder tr +\TextType VerseText +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 +\Italic +\Justification Center + +\Marker thc2 +\Name thc2 - Table - Column 2 Heading - Center Aligned +\Description A table heading, column 2, center aligned +\OccursUnder tr +\TextType VerseText +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 +\Italic +\Justification Center + +\Marker thc3 +\Name thc3 - Table - Column 3 Heading - Center Aligned +\Description A table heading, column 3, center aligned +\OccursUnder tr +\TextType VerseText +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 +\Italic +\Justification Center + +\Marker thc4 +\Name thc4 - Table - Column 4 Heading - Center Aligned +\Description A table heading, column 4, center aligned +\OccursUnder tr +\TextType VerseText +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 +\Italic +\Justification Center + +\Marker thc5 +\Name thc5 - Table - Column 5 Heading - Center Aligned +\Description A table heading, column 5, center aligned +\OccursUnder tr +\TextType VerseText +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 +\Italic +\Justification Center + +\Marker tcc1 +\Name tcc1 - Table - Column 1 Cell - Center Aligned +\Description A table cell item, column 1, center aligned +\OccursUnder tr +\TextType VerseText +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 +\Justification Center + +\Marker tcc2 +\Name tcc2 - Table - Column 2 Cell - Center Aligned +\Description A table cell item, column 2, center aligned +\OccursUnder tr +\TextType VerseText +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 +\Justification Center + +\Marker tcc3 +\Name tcc3 - Table - Column 3 Cell - Center Aligned +\Description A table cell item, column 3, center aligned +\OccursUnder tr +\TextType VerseText +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 +\Justification Center + +\Marker tcc4 +\Name tcc4 - Table - Column 4 Cell - Center Aligned +\Description A table cell item, column 4, center aligned +\OccursUnder tr +\TextType VerseText +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 +\Justification Center + +\Marker tcc5 +\Name tcc5 - Table - Column 5 Cell - Center Aligned +\Description A table cell item, column 5, center aligned +\OccursUnder tr +\TextType VerseText +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 +\Justification Center + +# Right Aligned Table Heads and Columns + +\Marker thr1 +\Name thr1 - Table - Column 1 Heading - Right Aligned +\Description A table heading, column 1, right aligned +\OccursUnder tr +\TextType VerseText +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 +\Italic +\Justification Right + +\Marker thr2 +\Name thr2 - Table - Column 2 Heading - Right Aligned +\Description A table heading, column 2, right aligned +\OccursUnder tr +\TextType VerseText +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 +\Italic +\Justification Right + +\Marker thr3 +\Name thr3 - Table - Column 3 Heading - Right Aligned +\Description A table heading, column 3, right aligned +\OccursUnder tr +\TextType VerseText +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 +\Italic +\Justification Right + +\Marker thr4 +\Name thr4 - Table - Column 4 Heading - Right Aligned +\Description A table heading, column 4, right aligned +\OccursUnder tr +\TextType VerseText +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 +\Italic +\Justification Right + +\Marker thr5 +\Name thr5 - Table - Column 5 Heading - Right Aligned +\Description A table heading, column 5, right aligned +\OccursUnder tr +\TextType VerseText +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 +\Italic +\Justification Right + +\Marker tcr1 +\Name tcr1 - Table - Column 1 Cell - Right Aligned +\Description A table cell item, column 1, right aligned +\OccursUnder tr +\TextType VerseText +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 +\Justification Right + +\Marker tcr2 +\Name tcr2 - Table - Column 2 Cell - Right Aligned +\Description A table cell item, column 2, right aligned +\OccursUnder tr +\TextType VerseText +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 +\Justification Right + +\Marker tcr3 +\Name tcr3 - Table - Column 3 Cell - Right Aligned +\Description A table cell item, column 3, right aligned +\OccursUnder tr +\TextType VerseText +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 +\Justification Right + +\Marker tcr4 +\Name tcr4 - Table - Column 4 Cell - Right Aligned +\Description A table cell item, column 4, right aligned +\OccursUnder tr +\TextType VerseText +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 +\Justification Right + +\Marker tcr5 +\Name tcr5 - Table - Column 5 Cell - Right Aligned +\Description A table cell item, column 5, right aligned +\OccursUnder tr +\TextType VerseText +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 +\Justification Right + +# Lists + +\Marker lh +\Name lh - List Header +\Description List header (introductory remark) +\OccursUnder c +\Rank 4 +\TextType VerseText +\TextProperties paragraph publishable vernacular +\StyleType Paragraph +\FontSize 12 +\FirstLineIndent .125 # 1/8 inch first line indent + +\Marker li +\Name li - List Entry - Level 1 +\Description A list entry, level 1 (if single level) +\OccursUnder c +\Rank 4 +\TextType VerseText +\TextProperties paragraph publishable vernacular level_1 +\StyleType paragraph +\FontSize 12 +\LeftMargin .5 +\FirstLineIndent -.375 # 1/8 inch indent, 1/2 inch wrap + +\Marker li1 +\Name li1 - List Entry - Level 1 +\Description A list entry, level 1 (if multiple levels) +\OccursUnder c +\Rank 4 +\TextType VerseText +\TextProperties paragraph publishable vernacular level_1 +\StyleType paragraph +\FontSize 12 +\LeftMargin .5 +\FirstLineIndent -.375 # 1/8 inch indent, 1/2 inch wrap + +\Marker li2 +\Name li2 - List Entry - Level 2 +\Description A list entry, level 2 +\OccursUnder c +\Rank 4 +\TextType VerseText +\TextProperties paragraph publishable vernacular level_2 +\StyleType paragraph +\FontSize 12 +\LeftMargin .75 +\FirstLineIndent -.375 + +\Marker li3 +\Name li3 - List Entry - Level 3 +\Description A list entry, level 3 +\OccursUnder c +\Rank 4 +\TextType VerseText +\TextProperties paragraph publishable vernacular level_3 +\StyleType paragraph +\FontSize 12 +\LeftMargin 1 +\FirstLineIndent -.375 + +\Marker li4 +\Name li4 - List Entry - Level 4 +\Description A list entry, level 4 +\OccursUnder c +\Rank 4 +\TextType VerseText +\TextProperties paragraph publishable vernacular level_4 +\StyleType paragraph +\FontSize 12 +\LeftMargin 1.25 +\FirstLineIndent -.375 + +\Marker lf +\Name lf - List Footer +\Description List footer (concluding remark) +\OccursUnder c +\Rank 4 +\TextType VerseText +\TextProperties paragraph publishable vernacular +\StyleType Paragraph +\FontSize 12 + +\Marker lim +\Name lim - Embedded List Entry - Level 1 +\Description An embedded list entry, level 1 (if single level) +\OccursUnder c +\Rank 4 +\TextType VerseText +\TextProperties paragraph publishable vernacular level_1 +\StyleType paragraph +\FontSize 12 +\LeftMargin .75 +\FirstLineIndent -.375 +\RightMargin .25 + +\Marker lim1 +\Name lim1 - Embedded List Entry - Level 1 +\Description An embedded list entry, level 1 (if multiple levels) +\OccursUnder c +\Rank 4 +\TextType VerseText +\TextProperties paragraph publishable vernacular level_1 +\StyleType paragraph +\FontSize 12 +\LeftMargin .75 +\FirstLineIndent -.375 +\RightMargin .25 + +\Marker lim2 +\Name lim2 - Embedded List Entry - Level 2 +\Description An embedded list entry, level 2 +\OccursUnder c +\Rank 4 +\TextType VerseText +\TextProperties paragraph publishable vernacular level_2 +\StyleType paragraph +\FontSize 12 +\LeftMargin 1 +\FirstLineIndent -.375 + +\Marker lim3 +\Name lim3 - Embedded List Item - Level 3 +\Description An embedded list item, level 3 +\OccursUnder c +\Rank 4 +\TextType VerseText +\TextProperties paragraph publishable vernacular level_3 +\StyleType paragraph +\FontSize 12 +\LeftMargin 1.25 +\FirstLineIndent -.375 + +\Marker lim4 +\Name lim4 - Embedded List Entry - Level 4 +\Description An embedded list entry, level 4 +\OccursUnder c +\Rank 4 +\TextType VerseText +\TextProperties paragraph publishable vernacular level_4 +\StyleType paragraph +\FontSize 12 +\LeftMargin 1.5 +\FirstLineIndent -.375 + +\Marker litl +\Endmarker litl* +\Name litl...litl* - List Entry - Total +\Description List entry total text +\OccursUnder li li1 li2 li3 li4 lim lim1 lim2 lim3 lim4 NEST +\TextType VerseText +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 +\Italic + +\Marker lik +\Endmarker lik* +\Name lik...lik* - Structured List Entry - Key +\Description Structured list entry key text +\OccursUnder li li1 li2 li3 li4 lim lim1 lim2 lim3 lim4 NEST +\TextType VerseText +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 +\Italic + +\Marker liv +\Endmarker liv* +\Name liv...liv* - Structured List Entry - Value 1 +\Description Structured list entry value 1 content (if single value) +\OccursUnder li li1 li2 li3 li4 lim lim1 lim2 lim3 lim4 NEST +\TextType VerseText +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 + +\Marker liv1 +\Endmarker liv1* +\Name liv1...liv1* - Structured List Entry - Value 1 +\Description Structured list entry value 1 content (if multiple values) +\OccursUnder li li1 li2 li3 li4 lim lim1 lim2 lim3 lim4 NEST +\TextType VerseText +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 + +\Marker liv2 +\Endmarker liv2* +\Name liv2...liv2* - Structured List Entry - Value 2 +\Description Structured list entry value 2 content +\OccursUnder li li1 li2 li3 li4 lim lim1 lim2 lim3 lim4 NEST +\TextType VerseText +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 + +\Marker liv3 +\Endmarker liv3* +\Name liv3...liv3* - Structured List Entry - Value 3 +\Description Structured list entry value 3 content +\OccursUnder li li1 li2 li3 li4 lim lim1 lim2 lim3 lim4 NEST +\TextType VerseText +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 + +\Marker liv4 +\Endmarker liv4* +\Name liv4...liv4* - Structured List Entry - Value 4 +\Description Structured list entry value 4 content +\OccursUnder li li1 li2 li3 li4 lim lim1 lim2 lim3 lim4 NEST +\TextType VerseText +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 + +\Marker liv5 +\Endmarker liv5* +\Name liv5...liv5* - Structured List Entry - Value 5 +\Description Structured list entry value 5 content +\OccursUnder li li1 li2 li3 li4 lim lim1 lim2 lim3 lim4 NEST +\TextType VerseText +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 + +# Footnotes + +\Marker f +\Endmarker f* +\Name f...f* - Footnote +\Description A Footnote text item (basic) +\OccursUnder c cp lh li li1 li2 li3 li4 lf lim lim1 lim2 lim3 lim4 m mi nb p pc ph phi pi pi1 pi2 pi3 pr pmo pm pmc pmr po q q1 q2 q3 q4 qc qr qd qm qm1 qm2 qm3 qs sp tc1 tc2 tc3 tc4 mt mt1 mt2 mt3 ms ms1 ms2 ms3 s s1 s2 s3 d ip +\TextProperties publishable vernacular note +\TextType NoteText +\StyleType Note +\FontSize 12 + +\Marker fe +\Endmarker fe* +\Name fe...fe* - Endnote +\Description An Endnote text item +\OccursUnder c lh li li1 li2 li3 li4 lf lim lim1 lim2 lim3 lim4 m mi nb p pc ph phi pi pi1 pi2 pi3 pr pmo pm pmc pmr po q q1 q2 q3 q4 qc qr qd qm qm1 qm2 qm3 sp tc1 tc2 tc3 tc4 ms ms1 ms2 ms3 s s1 s2 s3 d ip +\TextProperties publishable vernacular note +\TextType NoteText +\StyleType Note +\FontSize 12 + +\Marker fr +\Endmarker fr* +\Name fr - Footnote - Reference +\Description The origin reference for the footnote (basic) +\OccursUnder f fe +\TextType NoteText +\TextProperties publishable vernacular note +\StyleType Character +\FontSize 12 +\Bold + +\Marker ft +\Endmarker ft* +\Name ft - Footnote - Text +\Description Footnote text, Protocanon (basic) +\OccursUnder f fe +\TextProperties publishable vernacular note +\TextType NoteText +\StyleType Character +\FontSize 12 + +\Marker fk +\Endmarker fk* +\Name fk - Footnote - Keyword +\Description A footnote keyword (basic) +\OccursUnder f fe +\TextProperties publishable vernacular note +\TextType NoteText +\StyleType Character +\FontSize 12 +\Bold +\Italic + +\Marker fq +\Endmarker fq* +\Name fq - Footnote - Quotation or Alternate Rendering +\Description A footnote scripture quote or alternate rendering (basic) +\OccursUnder f fe +\TextProperties publishable vernacular note +\TextType NoteText +\StyleType Character +\FontSize 12 +\Italic + +\Marker fqa +\Endmarker fqa* +\Name fqa - Footnote - Alternate Translation Rendering +\Description A footnote alternate rendering for a portion of scripture text +\OccursUnder f fe +\TextProperties publishable vernacular note +\TextType NoteText +\StyleType Character +\FontSize 12 +\Italic + +\Marker fl +\Endmarker fl* +\Name fl - Footnote - Label Text +\Description A footnote label text item, for marking or "labelling" the type or alternate translation being provided in the note. +\OccursUnder f fe +\TextProperties publishable vernacular note +\TextType NoteText +\StyleType Character +\FontSize 12 +\Italic +\Bold + +\Marker fw +\Endmarker fw* +\Name fw - Footnote - Witness List +\Description A footnote witness list, for distinguishing a list of sigla representing witnesses in critical editions. +\OccursUnder f fe +\TextProperties publishable vernacular note +\TextType NoteText +\StyleType Character +\FontSize 12 + +\Marker fp +\Endmarker fp* +\Name fp - Footnote Paragraph Mark +\Description A Footnote additional paragraph marker +\OccursUnder f fe +\TextProperties publishable vernacular note +\TextType NoteText +\StyleType Character +\FontSize 12 + +\Marker fv +\Endmarker fv* +\Name fv...fv* - Footnote - Embedded Verse Number +\Description A verse number within the footnote text +\OccursUnder f fe +\TextProperties publishable vernacular note +\TextType NoteText +\StyleType Character +\FontSize 12 +\Superscript + +\Marker fdc +\Endmarker fdc* +\Name DEPRECATED fdc...fdc* - Footnote - DC text +\Description Footnote text, applies to Deuterocanon only +\OccursUnder f fe +\TextProperties publishable vernacular note +\TextType NoteText +\StyleType Character +\FontSize 12 + +\Marker fm +\Endmarker fm* +\Name fm - Footnote - Additional Caller to Previous Note +\Description An additional footnote marker location for a previous footnote +\OccursUnder lh li li1 li2 li3 li4 lf lim lim1 lim2 lim3 lim4 m mi nb p pc ph phi pi pi1 pi2 pi3 pr pmo pm pmc pmr po q q1 q2 q3 q4 qc qr qd qm qm1 qm2 qm3 sp tc1 tc2 tc3 tc4 ms ms1 ms2 s s1 s2 s3 d ip +\TextType Other +\TextProperties paragraph publishable vernacular +\StyleType Character +\FontSize 12 +\Superscript + +# Cross References + +\Marker x +\Endmarker x* +\Name x...x* - Cross Reference +\Description A list of cross references (basic) +\OccursUnder lh li li1 li2 li3 li4 lf lim lim1 lim2 lim3 lim4 m mi nb p pc ph phi pi pi1 pi2 pi3 pr pmo pm pmc pmr po q q1 q2 q3 q4 qc qr qd qm qm1 qm2 qm3 qs sp tc1 tc2 tc3 tc4 mt mt1 mt2 mt3 ms ms1 ms2 s s1 s2 s3 d +\TextProperties publishable vernacular note crossreference +\TextType NoteText +\StyleType Note +\FontSize 12 + +\Marker xo +\Endmarker xo* +\Name xo - Cross Reference - Origin Reference +\Description The cross reference origin reference (basic) +\OccursUnder x +\TextProperties publishable vernacular note +\TextType NoteText +\StyleType Character +\FontSize 12 +\Bold + +\Marker xop +\Endmarker xop* +\Name xop - Cross Reference - Origin Reference Publishing Alternate +\Description Published cross reference origin reference (origin reference that should appear in the published text) +\OccursUnder x +\TextProperties publishable vernacular note +\TextType NoteText +\StyleType Character +\FontSize 12 + +\Marker xt +\Endmarker xt* +\Name xt - Cross Reference - Target References +\Description The cross reference target reference(s), protocanon only (basic) +\OccursUnder ip im ipi imi ipq imq ipr iq iq1 iq2 iq3 io io1 io2 io3 io4 ms ms1 ms2 s s1 s2 s3 s4 cd sp d lh li li1 li2 li3 li4 lf lim lim1 lim2 lim3 lim4 m mi nb p pc ph phi pi pi1 pi2 pi3 pr pmo pm pmc pmr po q q1 q2 q3 q4 qc qr qd qm qm1 qm2 qm3 tr th1 th2 th3 th4 thr1 thr2 thr3 thr4 tc1 tc2 tc3 tc4 tcr1 tcr2 tcr3 tcr4 f fe x ef ex NEST +\TextProperties publishable vernacular note +\TextType NoteText +\StyleType Character +\FontSize 12 +#!\Attributes ?link-href + +\Marker xta +\Endmarker xta* +\Name xta - Cross Reference - Target References Added Text +\Description Cross reference target references added text +\OccursUnder x +\TextProperties publishable vernacular note +\TextType NoteText +\StyleType Character +\FontSize 12 + +\Marker xk +\Endmarker xk* +\Name xk - Cross Reference - Keyword +\Description A cross reference keyword +\OccursUnder x +\TextProperties publishable vernacular note +\TextType NoteText +\StyleType Character +\FontSize 12 +\Italic + +\Marker xq +\Endmarker xq* +\Name xq - Cross Reference - Quotation +\Description A cross-reference quotation from the scripture text +\OccursUnder x +\TextProperties publishable vernacular note +\TextType NoteText +\StyleType Character +\FontSize 12 +\Italic + +\Marker xot +\Endmarker xot* +\Name xot...xot* - Cross Reference - OT Target Refs (optional) +\Description Cross-reference target reference(s), Old Testament only +\OccursUnder x +\TextProperties publishable vernacular note +\TextType NoteText +\StyleType Character +\FontSize 12 + +\Marker xnt +\Endmarker xnt* +\Name xnt...xnt* - Cross Reference - NT Target Refs (optional) +\Description Cross-reference target reference(s), New Testament only +\OccursUnder x +\TextProperties publishable vernacular note +\TextType NoteText +\StyleType Character +\FontSize 12 + +\Marker xdc +\Endmarker xdc* +\Name DEPRECATED xdc...xdc* - Cross Reference - DC Target Refs +\Description Cross-reference target reference(s), Deuterocanon only +\OccursUnder x +\TextProperties publishable vernacular note +\TextType NoteText +\StyleType Character +\FontSize 12 + +\Marker rq +\Endmarker rq* +\Name rq...rq* - Cross Reference - Inline Quotation References +\Description A cross-reference indicating the source text for the preceding quotation. +\OccursUnder lh li li1 li2 li3 li4 lf lim lim1 lim2 lim3 lim4 m mi nb p pc ph phi pi pi1 pi2 pi3 pr pmo pm pmc pmr po q q1 q2 q3 q4 qc qr qd qm qm1 qm2 qm3 NEST +\TextType Other +\TextProperties publishable vernacular +\StyleType Character +\FontSize 10 +\Italic + +# Other Special Text + +\Marker qt +\Endmarker qt* +\Name qt...qt* - Special Text - Quoted Text - OT in NT +\Description For Old Testament quoted text appearing in the New Testament (basic) +\OccursUnder ip im ipi imi ipq imq ipr iq iq1 iq2 iq3 io io1 io2 io3 io4 ms ms1 ms2 s s1 s2 s3 s4 cd sp d lh li li1 li2 li3 li4 lf lim lim1 lim2 lim3 lim4 m mi nb p pc ph phi pi pi1 pi2 pi3 pr pmo pm pmc pmr po q q1 q2 q3 q4 qc qr qd qm qm1 qm2 qm3 tr th1 th2 th3 th4 thr1 thr2 thr3 thr4 tc1 tc2 tc3 tc4 tcr1 tcr2 tcr3 tcr4 f fe NEST +\TextType VerseText +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 +\Italic + +\Marker nd +\Endmarker nd* +\Name nd...nd* - Special Text - Name of Deity +\Description For name of deity (basic) +\OccursUnder ip im ipi imi ipq imq ipr iq iq1 iq2 iq3 io io1 io2 io3 io4 ms ms1 ms2 s s1 s2 s3 s4 cd sp d lh li li1 li2 li3 li4 lf lim lim1 lim2 lim3 lim4 m mi nb p pc ph phi pi pi1 pi2 pi3 pr pmo pm pmc pmr po q q1 q2 q3 q4 qc qr qd qm qm1 qm2 qm3 tr th1 th2 th3 th4 thr1 thr2 thr3 thr4 tc1 tc2 tc3 tc4 tcr1 tcr2 tcr3 tcr4 f fe NEST +\TextType VerseText +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 +\Underline + +\Marker tl +\Endmarker tl* +\Name tl...tl* - Special Text - Transliterated Word +\Description For transliterated words +\OccursUnder ip im ipi imi ipq imq ipr iq iq1 iq2 iq3 io io1 io2 io3 io4 ms ms1 ms2 s s1 s2 s3 s4 cd sp d lh li li1 li2 li3 li4 lf lim lim1 lim2 lim3 lim4 m mi nb p pc ph phi pi pi1 pi2 pi3 pr pmo pm pmc pmr po q q1 q2 q3 q4 qc qr qd qm qm1 qm2 qm3 cls tr th1 th2 th3 th4 thr1 thr2 thr3 thr4 tc1 tc2 tc3 tc4 tcr1 tcr2 tcr3 tcr4 f fe NEST +\TextType VerseText +\TextProperties publishable nonvernacular +\StyleType Character +\FontSize 12 +\Italic + +\Marker dc +\Endmarker dc* +\Name dc...dc* - Special Text - Deuterocanonical/LXX Additions +\Description Deuterocanonical/LXX additions or insertions in the Protocanonical text +\OccursUnder ip im ipi imi ipq imq ipr iq iq1 iq2 iq3 io io1 io2 io3 io4 ms ms1 ms2 s s1 s2 s3 s4 cd sp d lh li li1 li2 li3 li4 lf lim lim1 lim2 lim3 lim4 m mi nb p pc ph phi pi pi1 pi2 pi3 pr pmo pm pmc pmr po q q1 q2 q3 q4 qc qr qd qm qm1 qm2 qm3 tr th1 th2 th3 th4 thr1 thr2 thr3 thr4 tc1 tc2 tc3 tc4 tcr1 tcr2 tcr3 tcr4 f fe NEST +\TextType VerseText +\TextProperties publishable vernacular +\StyleType Character +\Italic + +\Marker bk +\Endmarker bk* +\Name bk...bk* - Special Text - Quoted book title +\Description For the quoted name of a book +\OccursUnder imt imt1 imt2 imt3 imt4 imte imte1 imte2 is is1 is2 ili ili1 ili2 ip im ipi imi ipq imq ipr iq iq1 iq2 iq3 io io1 io2 io3 io4 ms ms1 ms2 s s1 s2 s3 s4 cd sp d lh li li1 li2 li3 li4 lf lim lim1 lim2 lim3 lim4 m mi nb p pc ph phi pi pi1 pi2 pi3 pr pmo pm pmc pmr po q q1 q2 q3 q4 qc qr qd qm qm1 qm2 qm3 tr th1 th2 th3 th4 thr1 thr2 thr3 thr4 tc1 tc2 tc3 tc4 tcr1 tcr2 tcr3 tcr4 f fe NEST +\TextType VerseText +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 +\Italic + +\Marker sig +\Endmarker sig* +\Name sig...sig* - Special Text - Author's Signature (Epistles) +\Description For the signature of the author of an Epistle +\OccursUnder ip im ipi imi ipq imq ipr iq iq1 iq2 iq3 io io1 io2 io3 io4 ms ms1 ms2 s s1 s2 s3 s4 cd sp d lh li li1 li2 li3 li4 lf lim lim1 lim2 lim3 lim4 m mi nb p pc ph phi pi pi1 pi2 pi3 pr pmo pm pmc pmr po q q1 q2 q3 q4 qc qr qd qm qm1 qm2 qm3 cls tr th1 th2 th3 th4 thr1 thr2 thr3 thr4 tc1 tc2 tc3 tc4 tcr1 tcr2 tcr3 tcr4 f fe NEST +\TextType VerseText +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 +\Italic + +\Marker pn +\Endmarker pn* +\Name pn...pn* - Special Text - Proper Name +\Description For a proper name +\OccursUnder ip im ipi imi ipq imq ipr iq iq1 iq2 iq3 io io1 io2 io3 io4 ms ms1 ms2 s s1 s2 s3 s4 cd sp d lh li li1 li2 li3 li4 lf lim lim1 lim2 lim3 lim4 m mi nb p pc ph phi pi pi1 pi2 pi3 pr pmo pm pmc pmr po q q1 q2 q3 q4 qc qr qd qm qm1 qm2 qm3 cls tr th1 th2 th3 th4 thr1 thr2 thr3 thr4 tc1 tc2 tc3 tc4 tcr1 tcr2 tcr3 tcr4 f fe NEST +\TextType VerseText +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 +\Bold +\Underline + +\Marker png +\Endmarker png* +\Name png...png* - Special Text - Geographic Proper Name +\Description For a geographic proper name +\OccursUnder ip im ipi imi ipq imq ipr iq iq1 iq2 iq3 io io1 io2 io3 io4 ms ms1 ms2 s s1 s2 s3 s4 cd sp d lh li li1 li2 li3 li4 lf lim lim1 lim2 lim3 lim4 m mi nb p pc ph phi pi pi1 pi2 pi3 pr pmo pm pmc pmr po q q1 q2 q3 q4 qc qr qd qm qm1 qm2 qm3 cls tr th1 th2 th3 th4 thr1 thr2 thr3 thr4 tc1 tc2 tc3 tc4 tcr1 tcr2 tcr3 tcr4 f fe NEST +\TextType VerseText +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 +\Underline + +\Marker addpn +\Endmarker addpn* +\Name DEPRECATED addpn...addpn* - Special Text for Chinese +\Description For chinese words to be dot underline & underline +\OccursUnder ip im ipi imi ipq imq ipr iq iq1 iq2 iq3 io io1 io2 io3 io4 ms ms1 ms2 s s1 s2 s3 s4 cd sp d lh li li1 li2 li3 li4 lf lim lim1 lim2 lim3 lim4 m mi nb p pc ph phi pi pi1 pi2 pi3 pr pmo pm pmc pmr po q q1 q2 q3 q4 qc qr qd qm qm1 qm2 qm3 cls tr th1 th2 th3 th4 thr1 thr2 thr3 thr4 tc1 tc2 tc3 tc4 tcr1 tcr2 tcr3 tcr4 f fe NEST +\TextType VerseText +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 +#\Color 2263842 +##!\ColorName green +\Bold +\Italic +\Underline + +\Marker wj +\Endmarker wj* +\Name wj...wj* - Special Text - Words of Jesus +\Description For marking the words of Jesus +\OccursUnder ip im ipi imi ipq imq ipr iq iq1 iq2 iq3 io io1 io2 io3 io4 ms ms1 ms2 s s1 s2 s3 s4 cd sp d lh li li1 li2 li3 li4 lf lim lim1 lim2 lim3 lim4 m mi nb p pc ph phi pi pi1 pi2 pi3 pr pmo pm pmc pmr po q q1 q2 q3 q4 qc qr qd qm qm1 qm2 qm3 tr th1 th2 th3 th4 thr1 thr2 thr3 thr4 tc1 tc2 tc3 tc4 tcr1 tcr2 tcr3 tcr4 f fe NEST +\TextType VerseText +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 +\Color 255 +#!\ColorName highcon red + +\Marker k +\Endmarker k* +\Name k...k* - Special Text - Keyword +\Description For a keyword +\OccursUnder ip im ipi imi ipq imq ipr iq iq1 iq2 iq3 io io1 io2 io3 io4 ms ms1 ms2 s s1 s2 s3 s4 cd sp d lh li li1 li2 li3 li4 lf lim lim1 lim2 lim3 lim4 m mi nb p pc ph phi pi pi1 pi2 pi3 pr pmo pm pmc pmr po q q1 q2 q3 q4 qc qr qd qm qm1 qm2 qm3 tr th1 th2 th3 th4 thr1 thr2 thr3 thr4 tc1 tc2 tc3 tc4 tcr1 tcr2 tcr3 tcr4 f fe NEST +\TextType VerseText +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 +\Italic +\Bold + +\Marker sls +\Endmarker sls* +\Name sls...sls* - Special Text - Secondary Language or Text Source +\Description To represent where the original text is in a secondary language or from an alternate text source +\OccursUnder lh li li1 li2 li3 li4 lf lim lim1 lim2 lim3 lim4 m mi nb p pc ph phi pi pi1 pi2 pi3 pr pmo pm pmc pmr po q q1 q2 q3 q4 qc qr qd qm qm1 qm2 qm3 sp tr th1 th2 th3 th4 thr1 thr2 thr3 thr4 tc1 tc2 tc3 tc4 tcr1 tcr2 tcr3 tcr4 f fe NEST +\TextType VerseText +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 +\Italic + +\Marker ord +\Endmarker ord* +\Name ord...ord* - Special Text - Ordinal number text portion +\Description For the text portion of an ordinal number +\OccursUnder ip im ipi imi ipq imq ipr iq iq1 iq2 iq3 io io1 io2 io3 io4 ms ms1 ms2 s s1 s2 s3 s4 cd sp d lh li li1 li2 li3 li4 lf lim lim1 lim2 lim3 lim4 m mi nb p pc ph phi pi pi1 pi2 pi3 pr pmo pm pmc pmr po q q1 q2 q3 q4 qc qr qd qm qm1 qm2 qm3 tr th1 th2 th3 th4 thr1 thr2 thr3 thr4 tc1 tc2 tc3 tc4 tcr1 tcr2 tcr3 tcr4 f fe NEST +\TextType VerseText +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 +\Superscript + +\Marker add +\Endmarker add* +\Name add...add* - Special Text - Translational Addition +\Description For a translational addition to the text +\OccursUnder ip im ipi imi ipq imq ipr iq iq1 iq2 iq3 io io1 io2 io3 io4 ms ms1 ms2 s s1 s2 s3 s4 cd sp d lh li li1 li2 li3 li4 lf lim lim1 lim2 lim3 lim4 m mi nb p pc ph phi pi pi1 pi2 pi3 pr pmo pm pmc pmr po q q1 q2 q3 q4 qc qr qd qm qm1 qm2 qm3 cls tr th1 th2 th3 th4 thr1 thr2 thr3 thr4 tc1 tc2 tc3 tc4 tcr1 tcr2 tcr3 tcr4 f fe NEST +\TextType VerseText +\TextProperties publishable vernacular +\StyleType Character +#\Color 2263842 +##!\ColorName green +\Bold +\Italic + +\Marker lit +\Name lit - Special Text - Liturgical note +\Description For a comment or note inserted for liturgical use +\OccursUnder c +\TextType Other +\TextProperties paragraph publishable vernacular +\StyleType Paragraph +\Justification Right +\FontSize 12 +\Bold + +# Character Styling + +\Marker no +\Endmarker no* +\Name no...no* - Character - Normal Text +\Description A character style, use normal text +\OccursUnder is ip ipi im imi ili ili1 ili2 imq ipq iex iq iot io1 io2 io3 io4 s s1 s2 s3 NEST +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 + +\Marker it +\Endmarker it* +\Name it...it* - Character - Italic Text +\Description A character style, use italic text +\OccursUnder ip im ipi imi ipq imq ipr iq iq1 iq2 iq3 io io1 io2 io3 io4 ms ms1 ms2 s s1 s2 s3 s4 cd sp d lh li li1 li2 li3 li4 lf lim lim1 lim2 lim3 lim4 m mi nb p pc ph phi pi pi1 pi2 pi3 pr pmo pm pmc pmr po q q1 q2 q3 q4 qc qr qd qm qm1 qm2 qm3 tr th1 th2 th3 th4 thr1 thr2 thr3 thr4 tc1 tc2 tc3 tc4 tcr1 tcr2 tcr3 tcr4 f fe x NEST +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 +\Italic + +\Marker bd +\Endmarker bd* +\Name bd...bd* - Character - Bold Text +\Description A character style, use bold text +\OccursUnder ip im ipi imi ipq imq ipr iq iq1 iq2 iq3 io io1 io2 io3 io4 ms ms1 ms2 s s1 s2 s3 s4 cd sp d lh li li1 li2 li3 li4 lf lim lim1 lim2 lim3 lim4 m mi nb p pc ph phi pi pi1 pi2 pi3 pr pmo pm pmc pmr po q q1 q2 q3 q4 qc qr qd qm qm1 qm2 qm3 tr th1 th2 th3 th4 thr1 thr2 thr3 thr4 tc1 tc2 tc3 tc4 tcr1 tcr2 tcr3 tcr4 f fe x NEST +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 +\Bold + +\Marker bdit +\Endmarker bdit* +\Name bdit...bdit* - Character - BoldItalic Text +\Description A character style, use bold + italic text +\OccursUnder ip im ipi imi ipq imq ipr iq iq1 iq2 iq3 io io1 io2 io3 io4 ms ms1 ms2 s s1 s2 s3 s4 cd sp d lh li li1 li2 li3 li4 lf lim lim1 lim2 lim3 lim4 m mi nb p pc ph phi pi pi1 pi2 pi3 pr pmo pm pmc pmr po q q1 q2 q3 q4 qc qr qd qm qm1 qm2 qm3 tr th1 th2 th3 th4 thr1 thr2 thr3 thr4 tc1 tc2 tc3 tc4 tcr1 tcr2 tcr3 tcr4 f fe x NEST +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 +\Bold +\Italic + +\Marker em +\Endmarker em* +\Name em...em* - Character - Emphasized Text +\Description A character style, use emphasized text style +\OccursUnder ip im ipi imi ipq imq ipr iq iq1 iq2 iq3 io io1 io2 io3 io4 ms ms1 ms2 s s1 s2 s3 s4 cd sp d lh li li1 li2 li3 li4 lf lim lim1 lim2 lim3 lim4 m mi nb p pc ph phi pi pi1 pi2 pi3 pr pmo pm pmc pmr po q q1 q2 q3 q4 qc qr qd qm qm1 qm2 qm3 tr th1 th2 th3 th4 thr1 thr2 thr3 thr4 tc1 tc2 tc3 tc4 tcr1 tcr2 tcr3 tcr4 f fe x NEST +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 +\Italic + +\Marker sc +\Endmarker sc* +\Name sc...sc* - Character - Small Caps +\Description A character style, for small capitalization text +\OccursUnder ip im ipi imi ipq imq ipr iq iq1 iq2 iq3 io io1 io2 io3 io4 ms ms1 ms2 s s1 s2 s3 s4 cd sp d lh li li1 li2 li3 li4 lf lim lim1 lim2 lim3 lim4 m mi nb p pc ph phi pi pi1 pi2 pi3 pr pmo pm pmc pmr po q q1 q2 q3 q4 qc qr qd qm qm1 qm2 qm3 tr th1 th2 th3 th4 thr1 thr2 thr3 thr4 tc1 tc2 tc3 tc4 tcr1 tcr2 tcr3 tcr4 f fe x NEST +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 +\Smallcaps + +\Marker sup +\Endmarker sup* +\Name sup...sup* - Character - Superscript +\Description A character style, for superscript text. Typically for use in critical edition footnotes. +\OccursUnder ip im ipi imi ipq imq ipr iq iq1 iq2 iq3 io io1 io2 io3 io4 ms ms1 ms2 s s1 s2 s3 s4 cd sp d lh li li1 li2 li3 li4 lf lim lim1 lim2 lim3 lim4 m mi nb p pc ph phi pi pi1 pi2 pi3 pr pmo pm pmc pmr po q q1 q2 q3 q4 qc qr qd qm qm1 qm2 qm3 tr th1 th2 th3 th4 thr1 thr2 thr3 thr4 tc1 tc2 tc3 tc4 tcr1 tcr2 tcr3 tcr4 f fe x NEST +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 +\Superscript + +# Breaks + +\Marker pb +\Name pb - Break - Page Break +\Description Page Break used for new reader portions and children's bibles where content is controlled by the page +\OccursUnder c +\Rank 4 +\TextType Other +\TextProperties publishable +\StyleType Paragraph +\FontSize 12 + +# Special Features + +\Marker fig +\Endmarker fig* +\Name fig...fig* - Auxiliary - Figure/Illustration/Map +\Description Illustration [Columns to span, height, filename, caption text] +\OccursUnder lh li li1 li2 li3 li4 lf lim lim1 lim2 lim3 lim4 m mi nb p pc ph phi pi pi1 pi2 pi3 pr pmo pm pmc pmr po q q1 q2 q3 q4 qc qr qd qm qm1 qm2 qm3 sp tr th1 th2 th3 th4 thr1 thr2 thr3 thr4 tc1 tc2 tc3 tc4 tcr1 tcr2 tcr3 tcr4 ms ms1 ms2 s s1 s2 s3 d ip +\TextType Other +\TextProperties paragraph publishable vernacular +\StyleType Character +\FontSize 12 +#!\Attributes src size ref ?alt ?loc ?copy + +\Marker jmp +\Endmarker jmp* +\Name jmp...jmp* - Link text +\Description For associating linking attributes to a span of text +\OccursUnder ip im ipi imi ipq imq ipr iq iq1 iq2 iq3 io io1 io2 io3 io4 ms ms1 ms2 s s1 s2 s3 s4 cd sp d lh li li1 li2 li3 li4 lf lim lim1 lim2 lim3 lim4 m mi nb p pc ph phi pi pi1 pi2 pi3 pr pmo pm pmc pmr po q q1 q2 q3 q4 qc qr qd qm qm1 qm2 qm3 tr th1 th2 th3 th4 thr1 thr2 thr3 thr4 tc1 tc2 tc3 tc4 tcr1 tcr2 tcr3 tcr4 f fe x NEST +\TextType Other +\StyleType Character +\Color 16711680 +#!\ColorName highcon blue +\Underline +#!\Attributes ?link-href ?link-id ?link-title + +\Marker pro +\Endmarker pro* +\Name DEPRECATED pro...pro* - Special Text - CJK Pronunciation +\Description For indicating pronunciation in CJK texts +\OccursUnder ip im ipi imi ipq imq ipr iq iq1 iq2 iq3 lh li li1 li2 li3 li4 lf lim lim1 lim2 lim3 lim4 m mi nb p pc ph phi pi pi1 pi2 pi3 pr pmo pm pmc pmr po q q1 q2 q3 q4 qc qr qd qm qm1 qm2 qm3 sp tr th1 th2 th3 th4 thr1 thr2 thr3 thr4 tc1 tc2 tc3 tc4 tcr1 tcr2 tcr3 tcr4 ms ms1 ms2 s s1 s2 s3 d ip f fe NEST +\TextType Other +\TextProperties Nonpublishable +\StyleType Character +\FontSize 10 + +\Marker rb +\Endmarker rb* +\Name rb...rb* - Special Text - Ruby Glossing +\Description Most often used to provide a reading / pronunciation guide in ideographic scripts +\OccursUnder ip im ipi imi ipq imq ipr iq iq1 iq2 iq3 io io1 io2 io3 io4 lh li li1 li2 li3 li4 lf lim lim1 lim2 lim3 lim4 m mi nb p pc ph phi pi pi1 pi2 pi3 pr pmo pm pmc pmr po q q1 q2 q3 q4 qc qr qd qm qm1 qm2 qm3 sp tr th1 th2 th3 th4 thr1 thr2 thr3 thr4 tc1 tc2 tc3 tc4 tcr1 tcr2 tcr3 tcr4 ms ms1 ms2 s s1 s2 s3 d ip f fe NEST +\TextType VerseText +\TextProperties publishable vernacular +\StyleType Character +#!\Attributes gloss + +# Peripheral References + +\Marker w +\Endmarker w* +\Name w...w* - Peripheral Ref - Wordlist Entry +\Description A wordlist text item +\OccursUnder ip im ipi imi ipq imq ipr iq iq1 iq2 iq3 io io1 io2 io3 io4 ms ms1 ms2 s s1 s2 s3 s4 cd sp d lh li li1 li2 li3 li4 lf lim lim1 lim2 lim3 lim4 m mi nb p pc ph phi pi pi1 pi2 pi3 pr pmo pm pmc pmr po q q1 q2 q3 q4 qc qr qd qm qm1 qm2 qm3 tr th1 th2 th3 th4 thr1 thr2 thr3 thr4 tc1 tc2 tc3 tc4 tcr1 tcr2 tcr3 tcr4 f fe x NEST +\TextType VerseText +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 +#!\Attributes ?lemma ?strong ?srcloc + +\Marker wh +\Endmarker wh* +\Name wh...wh* - Peripheral Ref - Hebrew Wordlist Entry +\Description A Hebrew wordlist text item +\OccursUnder ip im ipi imi ipq imq ipr iq iq1 iq2 iq3 io io1 io2 io3 io4 ms ms1 ms2 s s1 s2 s3 s4 cd sp d lh li li1 li2 li3 li4 lf lim lim1 lim2 lim3 lim4 m mi nb p pc ph phi pi pi1 pi2 pi3 pr pmo pm pmc pmr po q q1 q2 q3 q4 qc qr qd qm qm1 qm2 qm3 tr th1 th2 th3 th4 thr1 thr2 thr3 thr4 tc1 tc2 tc3 tc4 tcr1 tcr2 tcr3 tcr4 f fe x NEST +\TextType VerseText +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 + +\Marker wg +\Endmarker wg* +\Name wg...wg* - Peripheral Ref - Greek Wordlist Entry +\Description A Greek Wordlist text item +\OccursUnder ip im ipi imi ipq imq ipr iq iq1 iq2 iq3 io io1 io2 io3 io4 ms ms1 ms2 s s1 s2 s3 s4 cd sp d lh li li1 li2 li3 li4 lf lim lim1 lim2 lim3 lim4 m mi nb p pc ph phi pi pi1 pi2 pi3 pr pmo pm pmc pmr po q q1 q2 q3 q4 qc qr qd qm qm1 qm2 qm3 tr th1 th2 th3 th4 thr1 thr2 thr3 thr4 tc1 tc2 tc3 tc4 tcr1 tcr2 tcr3 tcr4 f fe x NEST +\TextType VerseText +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 + +\Marker wa +\Endmarker wa* +\Name wa...wa* - Peripheral Ref - Aramaic Wordlist Entry +\Description An Aramaic Wordlist text item +\OccursUnder ip im ipi imi ipq imq ipr iq iq1 iq2 iq3 io io1 io2 io3 io4 ms ms1 ms2 s s1 s2 s3 s4 cd sp d lh li li1 li2 li3 li4 lf lim lim1 lim2 lim3 lim4 m mi nb p pc ph phi pi pi1 pi2 pi3 pr pmo pm pmc pmr po q q1 q2 q3 q4 qc qr qd qm qm1 qm2 qm3 tr th1 th2 th3 th4 thr1 thr2 thr3 thr4 tc1 tc2 tc3 tc4 tcr1 tcr2 tcr3 tcr4 f fe x NEST +\TextType VerseText +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 + +\Marker ndx +\Endmarker ndx* +\Name ndx...ndx* - Peripheral Ref - Subject Index Entry +\Description A subject index text item +\OccursUnder ip im ipi imi ipq imq ipr iq iq1 iq2 iq3 io io1 io2 io3 io4 ms ms1 ms2 s s1 s2 s3 s4 cd sp d lh li li1 li2 li3 li4 lf lim lim1 lim2 lim3 lim4 m mi nb p pc ph phi pi pi1 pi2 pi3 pr pmo pm pmc pmr po q q1 q2 q3 q4 qc qr qd qm qm1 qm2 qm3 tr th1 th2 th3 th4 thr1 thr2 thr3 thr4 tc1 tc2 tc3 tc4 tcr1 tcr2 tcr3 tcr4 f fe x NEST +\TextType VerseText +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 + +# Peripheral Materials +# Content Division Marker + +\Marker periph +\Name periph - Peripherals - Content Division Marker +\Description Peripheral content division marker which should be followed by an additional division argument/title. +\TextType Section +\TextProperties paragraph publishable vernacular +\StyleType Paragraph +\FontSize 14 +\Bold +\SpaceBefore 16 +\SpaceAfter 4 +\Color 33023 +#!\ColorName orange + +# Additional peripheral material extensions to existing USFM markup. + +\Marker p1 +\Name p1 - Periph - Front/Back Matter Paragraph Level 1 +\Description Front or back matter text paragraph, level 1 (if multiple levels) +\OccursUnder id +\Rank 1 +\TextType Other +\TextProperties paragraph publishable vernacular +\StyleType Paragraph +\FontSize 12 +\FirstLineIndent .125 # 1/8 inch first line indent + +\Marker p2 +\Name p2 - Periph - Front/Back Matter Paragraph Level 2 +\Description Front or back matter text paragraph, level 2 (if multiple levels) +\OccursUnder id +\Rank 1 +\TextType Other +\TextProperties paragraph publishable vernacular +\StyleType Paragraph +\FontSize 12 +\FirstLineIndent .125 # 1/4 inch first line indent +\LeftMargin .125 + +\Marker k1 +\Name k1 - Periph - Concordance Keyword Level 1 +\Description Concordance main entry text or keyword, level 1 +\OccursUnder id +\Rank 1 +\TextType Other +\TextProperties paragraph publishable vernacular +\StyleType Paragraph +\FontSize 12 + +\Marker k2 +\Name k2 - Periph - Concordance Keyword Level 2 +\Description Concordance main entry text or keyword, level 2 +\OccursUnder id +\Rank 1 +\TextType Other +\TextProperties paragraph publishable vernacular +\StyleType Paragraph +\FontSize 12 + +\Marker xtSee +\Endmarker xtSee* +\Name xtSee - Concordance and Names Index - Alternate Entry Target Reference +\Description Concordance and Names Index markup for an alternate entry target reference. +\OccursUnder p +\TextProperties publishable vernacular +\TextType NoteText +\StyleType Character +\FontSize 12 +\Italic +\Color 16711680 +#!\ColorName highcon blue + +\Marker xtSeeAlso +\Endmarker xtSeeAlso* +\Name xtSeeAlso - Concordance and Names Index - Additional Entry Target Reference +\Description Concordance and Names Index markup for an additional entry target reference. +\OccursUnder p +\TextProperties publishable vernacular +\TextType Other +\StyleType Character +\FontSize 12 +\Italic +\Color 16711680 +#!\ColorName highcon blue + +# Milestones - these are not compatible with USFM2, so whole entries are preceded with #! + +#!\Marker qt-s +#!\Endmarker qt-e +#!\Name Quotation start/end milestone +#!\Description Quotation start/end milestone, level 1 (if single level) +#!\OccursUnder id +#!\StyleType Milestone +#!\Attributes ?who ?sid ?eid + +#!\Marker qt1-s +#!\Endmarker qt1-e +#!\Name Quotation start/end milestone - Level 1 +#!\Description Quotation start/end milestone, level 1 (if multiple levels) +#!\OccursUnder id +#!\StyleType Milestone +#!\Attributes ?who ?sid ?eid + +#!\Marker qt2-s +#!\Endmarker qt2-e +#!\Name Quotation start/end milestone - Level 2 +#!\Description Quotation start/end milestone, level 2 +#!\OccursUnder id +#!\StyleType Milestone +#!\Attributes ?who ?sid ?eid + +#!\Marker qt3-s +#!\Endmarker qt3-e +#!\Name Quotation start/end milestone - Level 3 +#!\Description Quotation start/end milestone, level 3 +#!\OccursUnder id +#!\StyleType Milestone +#!\Attributes ?who ?sid ?eid + +#!\Marker qt4-s +#!\Endmarker qt4-e +#!\Name Quotation start/end milestone - Level 4 +#!\Description Quotation start/end milestone, level 4 +#!\OccursUnder id +#!\StyleType Milestone +#!\Attributes ?who ?sid ?eid + +#!\Marker qt5-s +#!\Endmarker qt5-e +#!\Name Quotation start/end milestone - Level 5 +#!\Description Quotation start/end milestone, level 5 +#!\OccursUnder id +#!\StyleType Milestone +#!\Attributes ?who ?sid ?eid + +#!\Marker ts-s +#!\Endmarker ts-e +#!\Name Translator's section start/end milestone +#!\Description Translator's section start/end milestone +#!\OccursUnder id +#!\StyleType Milestone +#!\Attributes ?sid ?eid + +# Other special text elements specified in USFM +# ~ = fixed (no-break) space +# // = discretionary line break + +# Obsolete, deprecated, or no longer officially part of USFM. +# These markers may have existed in earlier resource and stylesheet revisions. + +\Marker ph +\Name DEPRECATED ph - Paragraph - Hanging Indent - Level 1 +\Description Paragraph text, with level 1 hanging indent (if single level) +\OccursUnder c +\Rank 4 +\TextType VerseText +\TextProperties paragraph publishable vernacular +\StyleType Paragraph +\LeftMargin .5 +\FirstLineIndent -.25 # 1/4 inch indent, 1/2 inch wrap +\FontSize 12 + +\Marker ph1 +\Name DEPRECATED ph1 - Paragraph - Hanging Indent - Level 1 +\Description Paragraph text, with level 1 hanging indent (if multiple levels) +\OccursUnder c +\Rank 4 +\TextType VerseText +\TextProperties paragraph publishable vernacular +\StyleType Paragraph +\LeftMargin .5 +\FirstLineIndent -.25 # 1/4 inch indent, 1/2 inch wrap +\FontSize 12 + +\Marker ph2 +\Name DEPRECATED ph2 - Paragraph - Hanging Indent - Level 2 +\Description Paragraph text, with level 2 hanging indent +\OccursUnder c +\Rank 4 +\TextType VerseText +\TextProperties paragraph publishable vernacular +\StyleType Paragraph +\LeftMargin .75 +\FirstLineIndent -.25 # 1/2 inch indent, 3/4 inch wrap +\FontSize 12 + +\Marker ph3 +\Name DEPRECATED ph3 - Paragraph - Hanging Indent - Level 3 +\Description Paragraph text, with level 3 hanging indent +\OccursUnder c +\Rank 4 +\TextType VerseText +\TextProperties paragraph publishable vernacular +\StyleType Paragraph +\LeftMargin 1 +\FirstLineIndent -.25 # 3/4 inch indent, 1 inch wrap +\FontSize 12 + +\Marker phi +\Name DEPRECATED phi - Paragraph - Indented - Hanging Indent +\Description Paragraph text, indented with hanging indent +\OccursUnder c +\Rank 4 +\TextType VerseText +\TextProperties paragraph publishable vernacular +\StyleType Paragraph +\LeftMargin 1 + +\Marker tr1 +\Name OBSOLETE tr1 - Table - Row - Level 1 +\Description A table Row +\OccursUnder c +\Rank 4 +\TextType VerseText +\TextProperties paragraph publishable vernacular +\StyleType Paragraph +\FontSize 12 +\LeftMargin .5 +\FirstLineIndent -.25 # 6/16 inch + +\Marker tr2 +\Name OBSOLETE tr2 - Table - Row - Level 2 +\Description A table Row +\OccursUnder c +\Rank 4 +\TextType VerseText +\TextProperties paragraph publishable vernacular +\StyleType Paragraph +\FontSize 12 +\LeftMargin .75 +\FirstLineIndent -.25 # 6/16 inch + +\Marker ps +\Name OBSOLETE ps - Paragraph - No Break with Next Paragraph +\Description Paragraph text, no break with next paragraph text at chapter boundary +\OccursUnder c +\Rank 4 +\TextType VerseText +\TextProperties paragraph publishable vernacular +\StyleType Paragraph +\FontSize 12 +\FirstLineIndent .125 # 1/8 inch first line indent + +\Marker psi +\Name OBSOLETE psi - Paragraph - Indented - No Break with Next +\Description Paragraph text, indented, with no break with next paragraph text (at chapter boundary) +\OccursUnder c +\Rank 4 +\TextType VerseText +\TextProperties paragraph publishable vernacular +\StyleType Paragraph +\FirstLineIndent .125 # 1/8 inch first line indent +\LeftMargin .25 +\RightMargin .25 +\FontSize 12 + +\Marker fs +\Endmarker fs* +\Name DEPRECATED fs - Footnote - Footnote Summary +\Description A summary text for the concept/idea/quotation from the scripture translation for which the note is being provided. +\OccursUnder f fe +\TextProperties publishable vernacular note +\TextType NoteText +\StyleType Character +\FontSize 12 +\Italic + +\Marker wr +\Endmarker wr* +\Name OBSOLETE wr...wr* - Auxiliary - Wordlist/Glossary Reference +\Description A Wordlist text item +\OccursUnder ms s lh li li1 li2 li3 li4 lf lim lim1 lim2 lim3 lim4 m mi nb p pc ph phi pi pi1 pi2 pi3 pr po q q1 q2 q3 q4 qc qr qd tc1 tc2 tc3 tc4 f fe NEST +\TextProperties publishable vernacular +\TextType VerseText +\StyleType Character +\FontSize 12 +\Italic + +# 2.0x peripheral markup (replaced with \periph + Content Division Title/Argument) + +\Marker pub +\Name OBSOLETE pub Peripherals - Front Matter Publication Data +\Description Front matter publication data +\OccursUnder id +\Rank 4 +\TextProperties paragraph publishable vernacular poetic +\TextType VerseText +\FontSize 10 +\StyleType paragraph + +\Marker toc +\Name OBSOLETE toc Peripherals - Front Matter Table of Contents +\Description Front matter table of contents +\OccursUnder id +\Rank 4 +\TextProperties paragraph publishable vernacular poetic +\TextType VerseText +\FontSize 10 +\StyleType paragraph + +\Marker pref +\Name OBSOLETE pref Peripherals - Front Matter Preface +\Description Front matter preface +\OccursUnder id +\Rank 4 +\TextProperties paragraph publishable vernacular poetic +\TextType VerseText +\FontSize 10 +\StyleType paragraph + +\Marker intro +\Name OBSOLETE intro Peripherals - Front Matter Introduction +\Description Front matter introduction +\OccursUnder id +\Rank 4 +\TextProperties paragraph publishable vernacular poetic +\TextType VerseText +\FontSize 10 +\StyleType paragraph + +\Marker conc +\Name OBSOLETE conc Peripherals - Back Matter Concordance +\Description Back matter concordance +\OccursUnder id +\Rank 4 +\TextProperties paragraph publishable vernacular poetic +\TextType VerseText +\FontSize 10 +\StyleType paragraph + +\Marker glo +\Name OBSOLETE glo Peripherals - Back Matter Glossary +\Description Back matter glossary +\OccursUnder id +\Rank 4 +\TextProperties paragraph publishable vernacular poetic +\TextType VerseText +\FontSize 10 +\StyleType paragraph + +\Marker idx +\Name OBSOLETE idx Peripherals - Back Matter Index +\Description Back matter index +\OccursUnder id +\Rank 4 +\TextProperties paragraph publishable vernacular poetic +\TextType VerseText +\FontSize 10 +\StyleType paragraph + +\Marker maps +\Name OBSOLETE maps Peripherals - Back Matter Map Index +\Description Back matter map index +\OccursUnder id +\Rank 4 +\TextProperties paragraph publishable vernacular poetic +\TextType VerseText +\FontSize 10 +\StyleType paragraph + +\Marker cov +\Name OBSOLETE cov Peripherals - Other - Cover +\Description Other peripheral materials - cover +\OccursUnder id +\Rank 4 +\TextProperties paragraph publishable vernacular poetic +\TextType VerseText +\FontSize 10 +\StyleType paragraph + +\Marker spine +\Name OBSOLETE spine Peripherals - Other - Spine +\Description Other peripheral materials - spine +\OccursUnder id +\Rank 4 +\TextProperties paragraph publishable vernacular poetic +\TextType VerseText +\FontSize 10 +\StyleType paragraph + +\Marker pubinfo +\Name OBSOLETE pubinfo - Publication - Information +\Description Publication information - Lang,Credit,Version,Copies,Publisher,Id,Logo +\OccursUnder id ide +\TextType Other +\TextProperties paragraph nonpublishable nonvernacular +\StyleType Paragraph +\FontSize 12 +\Color 16711680 +#!\ColorName highcon blue + +# Concordance/Names Index Tools - special sfms for use in Publishing Assistant + +\Marker zpa-xb +\Endmarker zpa-xb* +\Name zpa-xb - Periph - Book +\Description Book Ref +\OccursUnder id +\Rank 1 +\TextType Other +\TextProperties paragraph publishable vernacular +\StyleType Character +\FontSize 12 + +\Marker zpa-xc +\Endmarker zpa-xc* +\Name zpa-xc - Periph - Chapter +\Description Chapter Ref +\OccursUnder id +\Rank 1 +\TextType Other +\TextProperties paragraph publishable vernacular +\StyleType Character +\FontSize 12 +\Bold + +\Marker zpa-xv +\Endmarker zpa-xv* +\Name zpa-xv - Periph - Verse +\Description Verse Ref +\OccursUnder id +\Rank 1 +\TextType Other +\TextProperties paragraph publishable vernacular +\StyleType Character +\FontSize 12 + +\Marker zpa-d +\Endmarker zpa-d* +\Name zpa-d - Periph - Description +\Description Description +\OccursUnder id +\Rank 1 +\TextType Other +\TextProperties paragraph publishable vernacular +\StyleType Character +\FontSize 12 diff --git a/src/corpora/usfm_sb.sty b/src/corpora/usfm_sb.sty new file mode 100644 index 0000000..80fb0ee --- /dev/null +++ b/src/corpora/usfm_sb.sty @@ -0,0 +1,3606 @@ +# Version=3.0.5 +# ******************************************************************** +# * usfm_sb.sty is the default stylesheet for Paratext (>=7.3) * +# * combined study Bible projects using USFM markup. * +# * Latest documentation and stylesheets are maintained at: * +# * http://markups.paratext.org/usfm * +# ******************************************************************** + +# File Identification + +\Marker id +\Name id - File - Identification +\Description File identification information (BOOKID, FILENAME, EDITOR, MODIFICATION DATE) +\StyleType Paragraph +\TextType Other +\TextProperties paragraph nonpublishable nonvernacular book +\FontSize 12 + +\Marker usfm +\Name usfm - File - USFM Version ID +\Description File markup version information +\OccursUnder id +\Rank 1 +\StyleType Paragraph +\TextType Other +\TextProperties paragraph nonpublishable nonvernacular +\FontSize 12 + +\Marker ide +\Name ide - File - Encoding +\Description File encoding information +\OccursUnder id +\Rank 1 +\StyleType Paragraph +\TextType Other +\TextProperties paragraph nonpublishable nonvernacular +\FontSize 12 + +# Headers + +\Marker h +\Name h - File - Header +\Description Running header text for a book (basic) +\OccursUnder id +\Rank 1 +\TextType Other +\TextProperties paragraph publishable vernacular +\StyleType Paragraph +\FontSize 12 + +\Marker h1 +\Name DEPRECATED h1 - File - Header +\Description Running header text +\OccursUnder id +\Rank 1 +\TextType Other +\TextProperties paragraph publishable vernacular +\StyleType Paragraph +\FontSize 12 + +\Marker h2 +\Name DEPRECATED h2 - File - Left Header +\Description Running header text, left side of page +\OccursUnder id +\Rank 1 +\TextType Other +\TextProperties paragraph publishable vernacular +\StyleType Paragraph +\FontSize 12 + +\Marker h3 +\Name DEPRECATED h3 - File - Right Header +\Description Running header text, right side of page +\OccursUnder id +\Rank 1 +\TextType Other +\TextProperties paragraph publishable vernacular +\StyleType Paragraph +\FontSize 12 + +\Marker toc1 +\Name toc1 - File - Long Table of Contents Text +\Description Long table of contents text +\OccursUnder h h1 h2 h3 id +\Rank 1 +\TextType Other +\TextProperties paragraph publishable vernacular +\StyleType Paragraph +\FontSize 12 +\Italic +\Bold +\Color 16384 +#!\ColorName highcon green + +\Marker toc2 +\Name toc2 - File - Short Table of Contents Text +\Description Short table of contents text +\OccursUnder h h1 h2 h3 id +\Rank 1 +\TextType Other +\TextProperties paragraph publishable vernacular +\StyleType Paragraph +\FontSize 12 +\Italic +\Color 16384 +#!\ColorName highcon green + +\Marker toc3 +\Name toc3 - File - Book Abbreviation +\Description Book Abbreviation +\OccursUnder h h1 h2 h3 id +\Rank 1 +\TextType Other +\TextProperties paragraph publishable vernacular +\StyleType Paragraph +\FontSize 12 +\Bold +\Italic +\Color 128 +#!\ColorName lowcon red + +\Marker toca1 +\Name toca1 - File - Alternative Language Long Table of Contents Text +\Description Alternative language long table of contents text +\OccursUnder h h1 h2 h3 +\Rank 1 +\TextType Other +\TextProperties paragraph publishable vernacular +\StyleType Paragraph +\FontSize 10 +\Italic +\Color 8421504 +#!\ColorName gray + +\Marker toca2 +\Name toca2 - File - Alternative Language Short Table of Contents Text +\Description Alternative language short table of contents text +\OccursUnder h h1 h2 h3 +\Rank 1 +\TextType Other +\TextProperties paragraph publishable vernacular +\StyleType Paragraph +\FontSize 10 +\Italic +\Color 8421504 +#!\ColorName gray + +\Marker toca3 +\Name toca3 - File - Alternative Language Book Abbreviation +\Description Alternative language book Abbreviation +\OccursUnder h h1 h2 h3 +\Rank 1 +\TextType Other +\TextProperties paragraph publishable vernacular +\StyleType Paragraph +\FontSize 10 +\Italic +\Color 8421504 +#!\ColorName gray + +# Remarks and Comments + +\Marker rem +\Name rem - File - Remark +\Description Comments and remarks +\OccursUnder id ide c +\TextType Other +\TextProperties paragraph nonpublishable nonvernacular +\StyleType Paragraph +\FontSize 12 +\Color 16711680 +#!\ColorName highcon blue + +\Marker sts +\Name rem - File - Status +\Description Status of this file +\OccursUnder id ide c +\TextType Other +\TextProperties paragraph nonpublishable nonvernacular +\StyleType Paragraph +\FontSize 12 +\Color 16711680 +#!\ColorName highcon blue + +\Marker restore +\Name restore - File - Restore Information +\Description Project restore information +\OccursUnder id +\Rank 99 +\TextType Other +\TextProperties paragraph nonpublishable nonvernacular +\StyleType Paragraph +\FontSize 12 +\Color 16711680 +#!\ColorName highcon blue + +# Introduction + +\Marker imt +\Name imt - Introduction - Major Title Level 1 +\Description Introduction major title, level 1 (if single level) (basic) +\OccursUnder id +\Rank 5 +\TextProperties paragraph publishable vernacular level_1 +\TextType Other +\StyleType Paragraph +\FontSize 14 +\Bold +\Justification Center +\SpaceBefore 8 +\SpaceAfter 4 + +\Marker imt1 +\Name imt1 - Introduction - Major Title Level 1 +\Description Introduction major title, level 1 (if multiple levels) +\OccursUnder id +\Rank 5 +\TextProperties paragraph publishable vernacular level_1 +\TextType Other +\StyleType Paragraph +\FontSize 14 +\Bold +\Justification Center +\SpaceBefore 8 +\SpaceAfter 4 + +\Marker imt2 +\Name imt2 - Introduction - Major Title Level 2 +\Description Introduction major title, level 2 +\OccursUnder id +\Rank 5 +\TextProperties paragraph publishable vernacular level_2 +\TextType other +\StyleType Paragraph +\FontSize 13 +\Italic +\Justification Center +\SpaceBefore 6 +\SpaceAfter 3 + +\Marker imt3 +\Name imt3 - Introduction - Major Title Level 3 +\Description Introduction major title, level 3 +\OccursUnder id +\Rank 5 +\TextProperties paragraph publishable vernacular level_3 +\TextType Other +\StyleType Paragraph +\FontSize 12 +\Bold +\Justification Center +\SpaceBefore 2 +\SpaceAfter 2 + +\Marker imt4 +\Name imt4 - Introduction - Major Title Level 4 +\Description Introduction major title, level 4 (usually within parenthesis) +\OccursUnder id +\Rank 5 +\TextProperties paragraph publishable vernacular level_4 +\TextType Other +\StyleType Paragraph +\FontSize 12 +\Italic +\Justification Center +\SpaceBefore 2 +\SpaceAfter 2 + +\Marker imte +\Name imte - Introduction - [Uncommon] Major Title at Introduction End Level 1 +\Description Introduction major title at introduction end, level 1 (if single level) +\TextProperties paragraph publishable vernacular level_1 +\TextType Other +\OccursUnder id +\Rank 7 +\StyleType Paragraph +\FontSize 20 +\Bold +\Justification Center +\SpaceBefore 8 +\SpaceAfter 4 + +\Marker imte1 +\Name imte1 - Introduction - [Uncommon] Major Title at Introduction End Level 1 +\Description Introduction major title at introduction end, level 1 (if multiple levels) +\TextProperties paragraph publishable vernacular level_1 +\TextType Other +\OccursUnder id +\Rank 7 +\StyleType Paragraph +\FontSize 20 +\Bold +\Justification Center +\SpaceBefore 8 +\SpaceAfter 4 + +\Marker imte2 +\Name imte2 - Introduction - [Uncommon] Major Title at Introduction End Level 2 +\Description Introduction major title at introduction end, level 2 +\TextProperties paragraph publishable vernacular level_2 +\TextType Other +\OccursUnder id +\Rank 7 +\StyleType Paragraph +\FontSize 16 +\Italic +\Justification Center +\SpaceAfter 2 + +\Marker is +\Name is - Introduction - Section Heading Level 1 +\Description Introduction section heading, level 1 (if single level) (basic) +\OccursUnder id +\Rank 6 +\TextType Other +\TextProperties paragraph publishable vernacular level_1 +\StyleType Paragraph +\FontSize 14 +\Bold +\Justification Center +\SpaceBefore 8 +\SpaceAfter 4 + +\Marker is1 +\Name is1 - Introduction - Section Heading Level 1 +\Description Introduction section heading, level 1 (if multiple levels) +\OccursUnder id +\Rank 6 +\TextType Other +\TextProperties paragraph publishable vernacular level_1 +\StyleType Paragraph +\FontSize 14 +\Bold +\Justification Center +\SpaceBefore 8 +\SpaceAfter 4 + +\Marker is2 +\Name is2 - Introduction - Section Heading Level 2 +\Description Introduction section heading, level 2 +\OccursUnder id +\Rank 6 +\TextType Other +\TextProperties paragraph publishable vernacular level_2 +\StyleType Paragraph +\FontSize 12 +\Bold +\Justification Center +\SpaceBefore 8 +\SpaceAfter 4 + +\Marker iot +\Name iot - Introduction - Outline Title +\Description Introduction outline title (basic) +\OccursUnder id +\Rank 6 +\TextType Other +\TextProperties paragraph publishable vernacular +\StyleType Paragraph +\FontSize 12 +\Bold +\Justification Center +\SpaceBefore 8 +\SpaceAfter 4 + +\Marker io +\Name io - Introduction - Outline Level 1 +\Description Introduction outline text, level 1 (if single level) +\OccursUnder id +\Rank 6 +\TextType Other +\TextProperties paragraph publishable vernacular level_1 +\StyleType paragraph +\FontSize 12 +\LeftMargin .5 + +\Marker io1 +\Name io1 - Introduction - Outline Level 1 +\Description Introduction outline text, level 1 (if multiple levels) (basic) +\OccursUnder id +\Rank 6 +\TextType Other +\TextProperties paragraph publishable vernacular level_1 +\StyleType paragraph +\FontSize 12 +\LeftMargin .5 + +\Marker io2 +\Name io2 - Introduction - Outline Level 2 +\Description Introduction outline text, level 2 +\OccursUnder id +\Rank 6 +\TextType Other +\TextProperties paragraph publishable vernacular level_2 +\StyleType paragraph +\FontSize 12 +\LeftMargin .75 + +\Marker io3 +\Name io3 - Introduction - Outline Level 3 +\Description Introduction outline text, level 3 +\OccursUnder id +\Rank 6 +\TextType Other +\TextProperties paragraph publishable vernacular level_3 +\StyleType paragraph +\FontSize 12 +\LeftMargin 1 + +\Marker io4 +\Name io4 - Introduction - Outline Level 4 +\Description Introduction outline text, level 4 +\OccursUnder id +\Rank 6 +\TextType Other +\TextProperties paragraph publishable vernacular level_4 +\StyleType paragraph +\FontSize 12 +\LeftMargin 1.25 + +\Marker ior +\Endmarker ior* +\Name ior...ior* - Introduction - Outline References Range +\Description Introduction references range for outline entry; for marking references separately +\OccursUnder id io io1 io2 io3 io4 NEST +\TextType Other +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 + +\Marker ip +\Name ip - Introduction - Paragraph +\Description Introduction prose paragraph (basic) +\OccursUnder id c +\Rank 6 +\TextType Other +\TextProperties paragraph publishable vernacular +\StyleType Paragraph +\FontSize 12 +\FirstLineIndent .125 # 1/8 inch first line indent +\Color 8421504 +#!\ColorName gray + +\Marker im +\Name im - Introduction - Paragraph - no first line indent +\Description Introduction prose paragraph, with no first line indent (may occur after poetry) +\OccursUnder id +\Rank 6 +\TextType Other +\TextProperties paragraph publishable vernacular +\StyleType Paragraph +\FontSize 12 + +\Marker ipi +\Name ipi - Introduction - Indented Para - first line indent +\Description Introduction prose paragraph, indented, with first line indent +\OccursUnder id +\Rank 6 +\TextType Other +\TextProperties paragraph publishable vernacular +\StyleType Paragraph +\FontSize 12 +\FirstLineIndent .125 # 1/8 inch first line indent +\LeftMargin .25 +\RightMargin .25 + +\Marker imi +\Name imi - Introduction - Indented Para - no first line indent +\Description Introduction prose paragraph text, indented, with no first line indent +\OccursUnder id +\Rank 6 +\TextType Other +\TextProperties paragraph publishable vernacular +\StyleType Paragraph +\FontSize 12 +\LeftMargin .25 +\RightMargin .25 + +\Marker ili +\Name ili - Introduction - List Entry - Level 1 +\Description A list entry, level 1 (if single level) +\OccursUnder id +\Rank 6 +\TextType Other +\TextProperties paragraph publishable vernacular level_1 +\StyleType paragraph +\FontSize 12 +\LeftMargin .5 +\FirstLineIndent -.375 # 1/8 inch indent, 1/2 inch wrap + +\Marker ili1 +\Name ili1 - Introduction - List Entry - Level 1 +\Description A list entry, level 1 (if multiple levels) +\OccursUnder id +\Rank 6 +\TextType Other +\TextProperties paragraph publishable vernacular level_1 +\StyleType paragraph +\FontSize 12 +\LeftMargin .5 +\FirstLineIndent -.375 # 1/8 inch indent, 1/2 inch wrap + +\Marker ili2 +\Name ili2 - Introduction - List Entry - Level 2 +\Description A list entry, level 2 +\OccursUnder id +\Rank 6 +\TextType Other +\TextProperties paragraph publishable vernacular level_2 +\StyleType paragraph +\FontSize 12 +\LeftMargin .75 +\FirstLineIndent -.375 + +\Marker ipq +\Name ipq - Introduction - Paragraph - quote from text +\Description Introduction prose paragraph, quote from the body text +\OccursUnder id +\Rank 6 +\TextType Other +\TextProperties paragraph publishable vernacular +\StyleType Paragraph +\FontSize 12 +\LeftMargin .25 +\RightMargin .25 +\FirstLineIndent .125 # 1/8 inch first line indent +\Italic + +\Marker imq +\Name imq - Introduction - Paragraph - quote from text - no first line indent +\Description Introduction prose paragraph, quote from the body text, with no first line indent +\OccursUnder id +\Rank 6 +\TextType Other +\TextProperties paragraph publishable vernacular +\StyleType Paragraph +\FontSize 12 +\LeftMargin .25 +\RightMargin .25 +\Italic + +\Marker ipr +\Name ipr - Introduction - Paragraph - right aligned +\Description Introduction prose paragraph, right aligned +\OccursUnder id +\Rank 6 +\TextType Other +\TextProperties paragraph publishable vernacular +\StyleType Paragraph +\FontSize 12 +\LeftMargin .25 +\RightMargin .25 +\Justification Right +\Italic + +\Marker ib +\Name ib - Introduction - Blank Line +\Description Introduction blank line +\OccursUnder id +\Rank 6 +\TextProperties paragraph publishable vernacular poetic +\TextType Other +\FontSize 10 +\StyleType paragraph + +\Marker iq +\Name iq - Introduction - Poetry Level 1 +\Description Introduction poetry text, level 1 (if single level) +\OccursUnder id +\Rank 6 +\TextType Other +\TextProperties paragraph publishable vernacular poetic level_1 +\StyleType Paragraph +\FontSize 12 +\LeftMargin 1 +\FirstLineIndent -.75 # 1/4 inch indent, 1 inch wrap +\Italic + +\Marker iq1 +\Name iq1 - Introduction - Poetry Level 1 +\Description Introduction poetry text, level 1 (if multiple levels) +\OccursUnder id +\Rank 6 +\TextType Other +\TextProperties paragraph publishable vernacular poetic level_1 +\StyleType Paragraph +\FontSize 12 +\LeftMargin 1 +\FirstLineIndent -.75 # 1/4 inch indent, 1 inch wrap +\Italic + +\Marker iq2 +\Name iq2 - Introduction - Poetry Level 2 +\Description Introduction poetry text, level 2 +\OccursUnder id +\Rank 6 +\TextType Other +\TextProperties paragraph publishable vernacular poetic level_2 +\StyleType Paragraph +\FontSize 12 +\LeftMargin 1 +\FirstLineIndent -.5 # 1/2 inch indent, 1 inch wrap +\Italic + +\Marker iq3 +\Name iq3 - Introduction - Poetry Level 3 +\Description Introduction poetry text, level 3 +\OccursUnder id +\Rank 6 +\TextType Other +\TextProperties paragraph publishable vernacular poetic level_3 +\StyleType Paragraph +\FontSize 12 +\LeftMargin 1 +\FirstLineIndent -.25 # 3/4 inch indent, 1 inch wrap +\Italic + +\Marker iex +\Name iex - Introduction - Explanatory or Bridge Text +\Description Introduction explanatory or bridge text (e.g. explanation of missing book in Short Old Testament) +\OccursUnder id +\TextType Other +\TextProperties paragraph publishable vernacular +\StyleType Paragraph +\FontSize 12 +\FirstLineIndent .125 # 1/8 inch first line indent +\SpaceBefore 4 +\SpaceAfter 4 + +\Marker iqt +\Endmarker iqt* +\Name iqt...iqt* - Special Text - Quoted Scripture Text in Introduction +\Description For quoted scripture text appearing in the introduction +\OccursUnder id NEST +\TextType Other +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 +\Italic + +\Marker ie +\Name ie - Introduction - End Marker +\Description Introduction ending marker +\OccursUnder id +\Rank 6 +\TextProperties paragraph publishable vernacular +\TextType Other +\FontSize 10 +\StyleType paragraph + +# Chapters and Verses + +\Marker c +\Name c - Chapter Number +\Description Chapter number (necessary for normal Paratext operation) +\OccursUnder id +\Rank 8 +\TextType ChapterNumber +\TextProperties chapter +\StyleType Paragraph +\Bold +\FontSize 18 +\SpaceBefore 8 +\SpaceAfter 4 + +\Marker ca +\Endmarker ca* +\Name ca...ca* - Chapter Number - Alternate +\Description Second (alternate) chapter number (for coding dual versification; useful for places where different traditions of chapter breaks need to be supported in the same translation) +\OccursUnder c +\TextType Other +\StyleType Character +\Italic +\FontSize 16 +\Color 2263842 +#!\ColorName green + +\Marker cp +\Name cp - Chapter Number - Publishing Alternate +\Description Published chapter number (chapter string that should appear in the published text) +\OccursUnder c +\Rank 4 +\TextType Other +\TextProperties paragraph +\StyleType Paragraph +\Bold +\FontSize 18 +\SpaceBefore 8 +\SpaceAfter 4 +\Color 16711680 +#!\ColorName highcon blue + +\Marker cl +\Name cl - Chapter - Publishing Label +\Description Chapter label used for translations that add a word such as "Chapter" before chapter numbers (e.g. Psalms). The subsequent text is the chapter label. +\OccursUnder id c ms ms1 ms2 ms3 mr +\TextType Other +\TextProperties paragraph +\StyleType Paragraph +\Bold +\FontSize 18 +\SpaceBefore 8 +\SpaceAfter 4 +\Justification Center + +\Marker cd +\Name cd - Chapter - Description +\Description Chapter Description (Publishing option D, e.g. in Russian Bibles) +\OccursUnder c +\TextType Other +\TextProperties paragraph +\StyleType Paragraph +\FontSize 11 +\SpaceBefore 8 +\SpaceAfter 4 + +\Marker v +\Name v - Verse Number +\Description A verse number (Necessary for normal paratext operation) (basic) +\OccursUnder lh li li1 li2 li3 li4 lf lim lim1 lim2 lim3 lim4 m mi nb p pc ph phi pi pi1 pi2 pi3 pr pmo pm pmc pmr po q q1 q2 q3 q4 qc qr qd qm qm1 qm2 qm3 tr tc1 tc2 tc3 tc4 tcr1 tcr2 tcr3 tcr4 s3 d sp +\TextType VerseNumber +\TextProperties verse +\StyleType Character +\FontSize 12 +\Superscript + +\Marker va +\Endmarker va* +\Name va...va* - Verse Number - Alternate +\Description Second (alternate) verse number (for coding dual numeration in Psalms; see also NRSV Exo 22.1-4) +\OccursUnder lh li li1 li2 li3 li4 lf lim lim1 lim2 lim3 lim4 m mi nb p pc ph phi pi pi1 pi2 pi3 pr pmo pm pmc pmr po q q1 q2 q3 q4 qc qr qd qm qm1 qm2 qm3 tr tc1 tc2 tc3 tc4 tcr1 tcr2 tcr3 tcr4 s3 d sp +\TextType Other +\StyleType Character +\FontSize 12 +\Superscript +\Color 2263842 +#!\ColorName green + +\Marker vp +\Endmarker vp* +\Name vp...vp* - Verse Number - Publishing Alternate +\Description Published verse marker (verse string that should appear in the published text) +\OccursUnder cd lh li li1 li2 li3 li4 lf lim lim1 lim2 lim3 lim4 m mi nb p pc ph phi pi pi1 pi2 pi3 pr pmo pm pmc pmr po q q1 q2 q3 q4 qc qr qd qm qm1 qm2 qm3 tr tc1 tc2 tc3 tc4 tcr1 tcr2 tcr3 tcr4 s3 d sp +\TextType Other +\StyleType Character +\FontSize 12 +\Superscript +\Color 16711680 +#!\ColorName highcon blue + +# Paragraphs + +\Marker p +\Name p - Paragraph - Normal - First Line Indent +\Description Paragraph text, with first line indent (basic) +\OccursUnder c esb ms ms1 ms2 s s1 s2 s3 s4 ip +\Rank 4 +\TextType VerseText +\TextProperties paragraph publishable vernacular +\StyleType Paragraph +\FontSize 12 +\FirstLineIndent .125 # 1/8 inch first line indent + +\Marker m +\Name m - Paragraph - Margin - No First Line Indent +\Description Paragraph text, with no first line indent (may occur after poetry) (basic) +\OccursUnder c esb ms ms1 ms2 s s1 s2 s3 s4 ip +\Rank 4 +\TextType VerseText +\TextProperties paragraph publishable vernacular +\StyleType Paragraph +\FontSize 12 + +\Marker po +\Name po - Paragraph - Letter Opening +\Description Letter opening +\OccursUnder c +\Rank 4 +\TextType VerseText +\TextProperties paragraph publishable vernacular +\StyleType Paragraph +\FontSize 12 +\FirstLineIndent .125 # 1/8 inch first line indent +\SpaceBefore 4 +\SpaceAfter 4 + +\Marker pr +\Name pr - Paragraph - Text Refrain (right aligned) +\Description Text refrain (paragraph text, right aligned) +\OccursUnder c +\Rank 4 +\TextType VerseText +\TextProperties paragraph publishable vernacular +\StyleType Paragraph +\Justification Right +\FontSize 12 + +\Marker cls +\Name cls - Paragraph - Letter Closing +\Description Letter Closing +\OccursUnder c +\Rank 4 +\TextType VerseText +\TextProperties paragraph publishable vernacular +\StyleType Paragraph +\FontSize 12 +\Justification Right + +\Marker pmo +\Name pmo - Paragraph - Embedded Text Opening +\Description Embedded text opening +\OccursUnder m mi nb p pc ph phi pi pi1 pi2 pi3 pr q q1 q2 q3 q4 qc qr b s1 s2 s3 s4 +\TextType VerseText +\TextProperties paragraph publishable vernacular +\StyleType Paragraph +\FontSize 12 +\LeftMargin .25 +\RightMargin .25 + +\Marker pm +\Name pm - Paragraph - Embedded Text +\Description Embedded text paragraph +\OccursUnder m mi nb p pc ph phi pi pi1 pi2 pi3 pr psi q q1 q2 q3 q4 qc qr b s1 s2 s3 s4 +\TextType VerseText +\TextProperties paragraph publishable vernacular +\StyleType Paragraph +\FontSize 12 +\FirstLineIndent .125 # 1/8 inch first line indent +\LeftMargin .25 +\RightMargin .25 + +\Marker pmc +\Name pmc - Paragraph - Embedded Text Closing +\Description Embedded text closing +\OccursUnder m mi nb p pc ph phi pi pi1 pi2 pi3 pr q q1 q2 q3 q4 qc qr b s1 s2 s3 s4 +\TextType VerseText +\TextProperties paragraph publishable vernacular +\StyleType Paragraph +\FontSize 12 +\LeftMargin .25 +\RightMargin .25 + +\Marker pmr +\Name pmr - Paragraph - Embedded Text Refrain +\Description Embedded text refrain (e.g. Then all the people shall say, "Amen!") +\OccursUnder li li1 li2 li3 li4 lim lim1 lim2 lim3 lim4 m mi nb p pc ph phi pi pi1 pi2 pi3 pr po q q1 q2 q3 q4 qc qr b s1 s2 s3 s4 +\TextType VerseText +\TextProperties paragraph publishable vernacular +\StyleType Paragraph +\FontSize 12 +\Justification Right +\LeftMargin .25 +\RightMargin .25 + +\Marker pi +\Name pi - Paragraph - Indented - Level 1 - First Line Indent +\Description Paragraph text, level 1 indent (if single level), with first line indent; often used for discourse (basic) +\OccursUnder c esb ms ms1 ms2 s s1 s2 s3 s4 ip +\Rank 4 +\TextType VerseText +\TextProperties paragraph publishable vernacular level_1 +\StyleType Paragraph +\FontSize 12 +\FirstLineIndent .125 # 1/8 inch first line indent +\LeftMargin .25 +\RightMargin .25 + +\Marker pi1 +\Name pi1 - Paragraph - Indented - Level 1 - First Line Indent +\Description Paragraph text, level 1 indent (if multiple levels), with first line indent; often used for discourse +\OccursUnder c esb ms ms1 ms2 s s1 s2 s3 s4 ip +\Rank 4 +\TextType VerseText +\TextProperties paragraph publishable vernacular level_1 +\StyleType Paragraph +\FontSize 12 +\FirstLineIndent .125 # 1/8 inch first line indent +\LeftMargin .25 +\RightMargin .25 + +\Marker pi2 +\Name pi2 - Paragraph - Indented - Level 2 - First Line Indent +\Description Paragraph text, level 2 indent, with first line indent; often used for discourse +\OccursUnder c esb ms ms1 ms2 s s1 s2 s3 s4 ip +\Rank 4 +\TextType VerseText +\TextProperties paragraph publishable vernacular level_2 +\StyleType Paragraph +\FontSize 12 +\FirstLineIndent .125 # 1/8 inch first line indent +\LeftMargin .5 +\RightMargin .25 + +\Marker pi3 +\Name pi3 - Paragraph - Indented - Level 3 - First Line Indent +\Description Paragraph text, level 3 indent, with first line indent; often used for discourse +\OccursUnder c esb ms ms1 ms2 s s1 s2 s3 s4 ip +\Rank 4 +\TextType VerseText +\TextProperties paragraph publishable vernacular level_3 +\StyleType Paragraph +\FontSize 12 +\FirstLineIndent .125 # 1/8 inch first line indent +\LeftMargin .75 +\RightMargin .25 + +\Marker pc +\Name pc - Paragraph - Centered (for Inscription) +\Description Paragraph text, centered (for Inscription) +\OccursUnder c esb ms ms1 ms2 s s1 s2 s3 s4 ip +\Rank 4 +\TextType VerseText +\TextProperties paragraph publishable vernacular +\StyleType Paragraph +\Justification Center +\FontSize 12 + +\Marker mi +\Name mi - Paragraph - Indented - No First Line Indent +\Description Paragraph text, indented, with no first line indent; often used for discourse +\OccursUnder c esb ms ms1 ms2 s s1 s2 s3 s4 ip +\Rank 4 +\TextType VerseText +\TextProperties paragraph publishable vernacular +\StyleType Paragraph +\FontSize 12 +\LeftMargin .25 +\RightMargin .25 + +\Marker nb +\Name nb - Paragraph - No Break with Previous Paragraph +\Description Paragraph text, with no break from previous paragraph text (at chapter boundary) (basic) +\OccursUnder c +\Rank 4 +\TextType VerseText +\TextProperties paragraph publishable vernacular +\StyleType Paragraph +\FontSize 12 + +# Poetry + +\Marker q +\Name q - Poetry - Indent Level 1 - Single Level Only +\Description Poetry text, level 1 indent (if single level) +\OccursUnder c +\Rank 4 +\TextType VerseText +\TextProperties paragraph publishable vernacular poetic level_1 +\StyleType Paragraph +\FontSize 12 +\LeftMargin 0.75 +\FirstLineIndent -0.5 # 1/8 inch indent, 3/4 inch wrap + +\Marker q1 +\Name q1 - Poetry - Indent Level 1 +\Description Poetry text, level 1 indent (if multiple levels) (basic) +\OccursUnder c +\Rank 4 +\TextType VerseText +\TextProperties paragraph publishable vernacular poetic level_1 +\StyleType Paragraph +\FontSize 12 +\LeftMargin 0.75 +\FirstLineIndent -0.5 # 1/8 inch indent, 3/4 inch wrap + +\Marker q2 +\Name q2 - Poetry - Indent Level 2 +\Description Poetry text, level 2 indent (basic) +\OccursUnder c +\Rank 4 +\TextType VerseText +\TextProperties paragraph publishable vernacular poetic level_2 +\StyleType Paragraph +\FontSize 12 +\LeftMargin 0.75 +\FirstLineIndent -0.375 # 1/4 inch indent, 3/4 inch wrap + +\Marker q3 +\Name q3 - Poetry - Indent Level 3 +\Description Poetry text, level 3 indent +\OccursUnder c +\Rank 4 +\TextType VerseText +\TextProperties paragraph publishable vernacular poetic level_3 +\StyleType Paragraph +\FontSize 12 +\LeftMargin 0.75 +\FirstLineIndent -0.25 # 3/8 inch indent, 3/4 inch wrap + +\Marker q4 +\Name q4 - Poetry - Indent Level 4 +\Description Poetry text, level 4 indent +\OccursUnder c +\Rank 4 +\TextType VerseText +\TextProperties paragraph publishable vernacular poetic level_4 +\StyleType Paragraph +\FontSize 12 +\LeftMargin 0.75 +\FirstLineIndent -0.125 # 1/2 inch indent, 3/4 inch wrap + +\Marker qc +\Name qc - Poetry - Centered +\Description Poetry text, centered +\OccursUnder c esb ms ms1 ms2 s s1 s2 s3 s4 ip +\Rank 4 +\TextType VerseText +\TextProperties paragraph publishable vernacular poetic +\StyleType Paragraph +\FontSize 12 +\Justification Center + +\Marker qr +\Name qr - Poetry - Right Aligned +\Description Poetry text, Right Aligned +\OccursUnder c esb ms ms1 ms2 s s1 s2 s3 s4 ip +\Rank 4 +\TextType VerseText +\TextProperties paragraph publishable vernacular poetic +\StyleType Paragraph +\FontSize 12 +\Justification Right + +\Marker qs +\Endmarker qs* +\Name qs...qs* - Poetry Text - Selah +\Description Poetry text, Selah +\OccursUnder q q1 q2 q3 q4 qc qr NEST +\Rank 4 +\TextType VerseText +\TextProperties publishable vernacular poetic +\StyleType Character +\FontSize 12 +\Italic + +\Marker qa +\Name qa - Poetry - Acrostic Heading/Marker +\Description Poetry text, Acrostic marker/heading +\OccursUnder c esb ms ms1 ms2 s s1 s2 s3 s4 ip +\Rank 4 +\TextType Other +\TextProperties paragraph publishable vernacular poetic +\StyleType Paragraph +\FontSize 12 +\Italic + +\Marker qac +\Endmarker qac* +\Name qac...qac* - Poetry Text - Acrostic Letter +\Description Poetry text, Acrostic markup of the first character of a line of acrostic poetry +\OccursUnder q q1 q2 q3 q4 qc qr NEST +\Rank 4 +\TextType Other +\TextProperties publishable vernacular poetic +\StyleType Character +\FontSize 12 +\Italic + +\Marker qm +\Name qm - Poetry - Embedded Text - Indent Level 1 - Single Level Only +\Description Poetry text, embedded, level 1 indent (if single level) +\OccursUnder m mi nb p pc ph phi pi pi1 pi2 pi3 pr q q1 q2 q3 q4 qc qr b +\TextType VerseText +\TextProperties paragraph publishable vernacular poetic +\StyleType Paragraph +\FontSize 12 +\LeftMargin 1 +\FirstLineIndent -.75 # 1/4 inch indent, 1 inch wrap + +\Marker qm1 +\Name qm1 - Poetry - Embedded Text - Indent Level 1 +\Description Poetry text, embedded, level 1 indent (if multiple levels) +\OccursUnder m mi nb p pc ph phi pi pi1 pi2 pi3 pr q q1 q2 q3 q4 qc qr b +\TextType VerseText +\TextProperties paragraph publishable vernacular poetic level_1 +\StyleType Paragraph +\FontSize 12 +\LeftMargin 1 +\FirstLineIndent -.75 # 1/4 inch indent, 1 inch wrap + +\Marker qm2 +\Name qm2 - Poetry - Embedded Text - Indent Level 2 +\Description Poetry text, embedded, level 2 indent +\OccursUnder m mi nb p pc ph phi pi pi1 pi2 pi3 pr q q1 q2 q3 q4 qc qr b +\TextType VerseText +\TextProperties paragraph publishable vernacular poetic level_2 +\StyleType Paragraph +\FontSize 12 +\LeftMargin 1 +\FirstLineIndent -.5 # 1/2 inch indent, 1 inch wrap + +\Marker qm3 +\Name qm3 - Poetry - Embedded Text - Indent Level 3 +\Description Poetry text, embedded, level 3 indent +\OccursUnder m mi nb p pc ph phi pi pi1 pi2 pi3 pr q q1 q2 q3 q4 qc qr b +\TextType VerseText +\TextProperties paragraph publishable vernacular poetic level_3 +\StyleType Paragraph +\FontSize 12 +\LeftMargin 1 +\FirstLineIndent -.25 # 3/4 inch indent, 1 inch wrap + +\Marker qd +\Name qd - Poetry - Hebrew Note +\Description A Hebrew musical performance annotation, similar in content to Hebrew descriptive title. +\OccursUnder c +\Rank 4 +\TextType VerseText +\TextProperties paragraph publishable vernacular poetic +\StyleType Paragraph +\FontSize 12 +\Italic +\LeftMargin .25 + +\Marker b +\Name b - Poetry - Stanza Break (Blank Line) +\Description Poetry text stanza break (e.g. stanza break) (basic) +\OccursUnder c esb ms ms1 ms2 s s1 s2 s3 s4 ip +\Rank 4 +\TextProperties paragraph publishable vernacular poetic +\TextType VerseText +\FontSize 10 +\StyleType paragraph + +# Titles & Headings + +\Marker mt +\Name mt - Title - Major Title Level 1 +\Description The main title of the book (if single level) +\OccursUnder id +\Rank 3 +\TextProperties paragraph publishable vernacular level_1 +\TextType Title +\StyleType Paragraph +\FontSize 20 +\Bold +\Justification Center +\SpaceBefore 8 +\SpaceAfter 4 + +\Marker mt1 +\Name mt1 - Title - Major Title Level 1 +\Description The main title of the book (if multiple levels) (basic) +\OccursUnder id +\Rank 3 +\TextProperties paragraph publishable vernacular level_1 +\TextType Title +\StyleType Paragraph +\FontSize 20 +\Bold +\Justification Center +\SpaceBefore 2 +\SpaceAfter 4 + +\Marker mt2 +\Name mt2 - Title - Major Title Level 2 +\Description A secondary title usually occurring before the main title (basic) +\OccursUnder id +\Rank 3 +\TextProperties paragraph publishable vernacular level_2 +\TextType Title +\StyleType Paragraph +\FontSize 16 +\Italic +\Justification Center +\SpaceAfter 2 + +\Marker mt3 +\Name mt3 - Title - Major Title Level 3 +\Description A secondary title occurring after the main title +\OccursUnder id +\Rank 3 +\TextProperties paragraph publishable vernacular level_3 +\TextType Title +\StyleType Paragraph +\FontSize 16 +\Bold +\Justification Center +\SpaceBefore 2 +\SpaceAfter 2 + +\Marker mt4 +\Name mt4 - Title - Major Title level 4 +\Description A small secondary title sometimes occurring within parentheses +\OccursUnder id +\Rank 3 +\TextProperties paragraph publishable vernacular level_4 +\TextType Title +\StyleType Paragraph +\FontSize 12 +\Justification Center +\SpaceBefore 2 +\SpaceAfter 2 + +\Marker mte +\Name mte - Title - [Uncommon] Major Title Ending Level 1 +\Description The main title of the book repeated at the end of the book, level 1 (if single level) +\TextProperties paragraph publishable vernacular level_1 +\TextType Title +\OccursUnder c +\Rank 2 +\StyleType Paragraph +\FontSize 20 +\Bold +\Justification Center +\SpaceBefore 8 +\SpaceAfter 4 + +\Marker mte1 +\Name mte1 - Title - [Uncommon] Major Title Ending Level 1 +\Description The main title of the book repeated at the end of the book, level 1 (if multiple levels) +\TextProperties paragraph publishable vernacular level_1 +\TextType Title +\OccursUnder lh li li1 li2 li3 li4 lf lim lim1 lim2 lim3 lim4 m mi nb p pc ph phi pi pi1 pi2 pi3 pr pmo pm pmc pmr po q q1 q2 q3 q4 qc qr qd qm qm1 qm2 qm3 tc1 tc2 tc3 tc4 s3 d +\Rank 2 +\StyleType Paragraph +\FontSize 20 +\Bold +\Justification Center +\SpaceBefore 8 +\SpaceAfter 4 + +\Marker mte2 +\Name mte2 - Title - [Uncommon] Major Title Ending Level 2 +\Description A secondary title occurring before or after the 'ending' main title +\TextProperties paragraph publishable vernacular level_2 +\TextType Title +\OccursUnder mte1 +\Rank 2 +\StyleType Paragraph +\FontSize 16 +\Italic +\Justification Center +\SpaceAfter 2 + +\Marker ms +\Name ms - Heading - Major Section Level 1 +\Description A major section division heading, level 1 (if single level) (basic) +\OccursUnder c esb +\TextType Section +\TextProperties paragraph publishable vernacular level_1 +\StyleType Paragraph +\FontSize 14 +\Bold +\Justification Center +\SpaceBefore 16 +\SpaceAfter 4 + +\Marker mse +\Name mse - Heading - Major Section Ending Level 1 +\Description A major section division ending heading, level 1 (if single level) +\OccursUnder c +\TextType Section +\TextProperties paragraph publishable vernacular level_1 +\StyleType Paragraph +\FontSize 14 +\Bold +\Justification Center +\SpaceBefore 16 +\SpaceAfter 4 + +\Marker ms1 +\Name ms1 - Heading - Major Section Level 1 +\Description A major section division heading, level 1 (if multiple levels) +\OccursUnder c +\TextType Section +\TextProperties paragraph publishable vernacular level_1 +\StyleType Paragraph +\FontSize 14 +\Bold +\Justification Center +\SpaceBefore 16 +\SpaceAfter 4 + +\Marker ms2 +\Name ms2 - Heading - Major Section Level 2 +\Description A major section division heading, level 2 +\OccursUnder c +\TextType Section +\TextProperties paragraph publishable vernacular level_1 +\StyleType Paragraph +\FontSize 14 +\Bold +\Justification Center +\SpaceBefore 16 +\SpaceAfter 4 + +\Marker ms2e +\Name ms2e - Heading - Major Section Ending Level 2 +\Description A major section division ending heading, level 2 +\OccursUnder c +\TextType Section +\TextProperties paragraph publishable vernacular level_1 +\StyleType Paragraph +\FontSize 14 +\Bold +\Justification Center +\SpaceBefore 16 +\SpaceAfter 4 + +\Marker ms3 +\Name ms3 - Heading - Major Section Level 3 +\Description A major section division heading, level 3 +\OccursUnder c +\TextType Section +\TextProperties paragraph publishable vernacular level_1 +\StyleType Paragraph +\FontSize 14 +\Italic +\Justification Center +\SpaceBefore 16 +\SpaceAfter 4 + +\Marker ms3e +\Name ms3e - Heading - Major Section Ending Level 3 +\Description A major section division ending heading, level 3 +\OccursUnder c +\TextType Section +\TextProperties paragraph publishable vernacular level_1 +\StyleType Paragraph +\FontSize 14 +\Italic +\Justification Center +\SpaceBefore 16 +\SpaceAfter 4 + +\Marker mr +\Name mr - Heading - Major Section Range References +\Description A major section division references range heading (basic) +\OccursUnder ms ms1 ms2 ms3 +\TextType Section +\TextProperties paragraph publishable vernacular level_1 +\StyleType Paragraph +\FontSize 12 +\Italic +\Justification Center +\SpaceAfter 4 + +\Marker s +\Name s - Heading - Section Level 1 +\Description A section heading, level 1 (if single level) (basic) +\OccursUnder c +\TextType Section +\TextProperties paragraph publishable vernacular level_1 +\StyleType Paragraph +\FontSize 12 +\Bold +\Justification Center +\SpaceBefore 8 +\SpaceAfter 4 + +\Marker s1 +\Name s1 - Heading - Section Level 1 +\Description A section heading, level 1 (if multiple levels) +\OccursUnder c +\TextType Section +\TextProperties paragraph publishable vernacular level_1 +\StyleType Paragraph +\FontSize 12 +\Bold +\Justification Center +\SpaceBefore 8 +\SpaceAfter 4 + +\Marker s1e +\Name s1e - Heading - Section Ending Level 1 +\Description A section ending heading, level 1 (if multiple levels) +\OccursUnder c +\TextType Section +\TextProperties paragraph publishable vernacular level_1 +\StyleType Paragraph +\FontSize 12 +\Bold +\Justification Center +\SpaceBefore 8 +\SpaceAfter 4 + +\Marker s2 +\Name s2 - Heading - Section Level 2 +\Description A section heading, level 2 (e.g. Proverbs 22-24) +\OccursUnder c +\TextType Section +\TextProperties paragraph publishable vernacular level_2 +\StyleType Paragraph +\FontSize 12 +\Italic +\Justification Center +\SpaceBefore 8 +\SpaceAfter 4 + +\Marker s2e +\Name s2e - Heading - Section Ending Level 2 +\Description A section ending heading, level 2 +\OccursUnder c +\TextType Section +\TextProperties paragraph publishable vernacular level_2 +\StyleType Paragraph +\FontSize 12 +\Italic +\Justification Center +\SpaceBefore 8 +\SpaceAfter 4 + +\Marker s3 +\Name s3 - Heading - Section Level 3 +\Description A section heading, level 3 (e.g. Genesis "The First Day") +\OccursUnder c +\TextType Section +\TextProperties paragraph publishable vernacular level_3 +\StyleType Paragraph +\FontSize 12 +\Italic +\Justification Left +\SpaceBefore 6 +\SpaceAfter 3 + +\Marker s3e +\Name s3e - Heading - Section Ending Level 3 +\Description A section ending heading, level 3 +\OccursUnder c +\TextType Section +\TextProperties paragraph publishable vernacular level_3 +\StyleType Paragraph +\FontSize 12 +\Italic +\Justification Left +\SpaceBefore 6 +\SpaceAfter 3 + +\Marker s4 +\Name s4 - Heading - Section Level 4 +\Description A section heading, level 4 +\OccursUnder c +\TextType Section +\TextProperties paragraph publishable vernacular level_4 +\StyleType Paragraph +\FontSize 12 +\Italic +\Justification Left +\SpaceBefore 6 +\SpaceAfter 3 + +\Marker s4e +\Name s4e - Heading - Section Ending Level 4 +\Description A section ending heading, level 4 +\OccursUnder c +\TextType Section +\TextProperties paragraph publishable vernacular level_4 +\StyleType Paragraph +\FontSize 12 +\Italic +\Justification Left +\SpaceBefore 6 +\SpaceAfter 3 + +\Marker sr +\Name sr - Heading - Section Range References +\Description A section division references range heading +\OccursUnder s s1 s2 s3 s4 +\TextType Section +\TextProperties paragraph publishable vernacular level_1 +\StyleType Paragraph +\FontSize 12 +\Bold +\Justification Center +\SpaceAfter 4 + +\Marker r +\Name r - Heading - Parallel References +\Description Parallel reference(s) (basic) +\OccursUnder c s s1 s2 s3 s4 +\TextType Section +\TextProperties paragraph publishable vernacular level_1 +\StyleType Paragraph +\FontSize 12 +\Italic +\Justification Center +\SpaceAfter 4 + +\Marker sp +\Name sp - Label - Speaker +\Description A heading, to identify the speaker (e.g. Job) +\OccursUnder c +\Rank 4 +\TextType Section +\TextProperties paragraph publishable vernacular level_1 +\StyleType Paragraph +\FontSize 12 +\Italic +\Justification Left +\SpaceBefore 8 +\SpaceAfter 4 + +\Marker d +\Name d - Label - Descriptive Title - Hebrew Subtitle +\Description A Hebrew text heading, to provide description (e.g. Psalms) +\OccursUnder c +\Rank 4 +\TextType VerseText +\TextProperties paragraph publishable vernacular level_1 +\StyleType Paragraph +\FontSize 12 +\Italic +\Justification Center +\SpaceBefore 4 +\SpaceAfter 4 + +\Marker sd +\Name sd - Label - Semantic Division Location - Level 1 +\Description Vertical space used to divide the text into sections, level 1 (if single level) +\OccursUnder c +\Rank 4 +\TextType Section +\TextProperties paragraph publishable vernacular level_1 +\StyleType Paragraph +\SpaceBefore 24 +\SpaceAfter 24 + +\Marker sd1 +\Name sd1 - Label - Semantic Division Location - Level 1 +\Description Vertical space used to divide the text into sections, level 1 (if multiple levels) +\OccursUnder c +\Rank 4 +\TextType Section +\TextProperties paragraph publishable vernacular level_1 +\StyleType Paragraph +\SpaceBefore 24 +\SpaceAfter 24 + +\Marker sd2 +\Name sd2 - Label - Semantic Division Location - Level 2 +\Description Vertical space used to divide the text into sections, level 2 +\OccursUnder c +\Rank 4 +\TextType Section +\TextProperties paragraph publishable vernacular level_2 +\StyleType Paragraph +\SpaceBefore 18 +\SpaceAfter 18 + +\Marker sd3 +\Name sd3 - Label - Semantic Division Location - Level 3 +\Description Vertical space used to divide the text into sections, level 3 +\OccursUnder c +\Rank 4 +\TextType Section +\TextProperties paragraph publishable vernacular level_3 +\StyleType Paragraph +\SpaceBefore 12 +\SpaceAfter 12 + +\Marker sd4 +\Name sd4 - Label - Semantic Division Location - Level 4 +\Description Vertical space used to divide the text into sections, level 4 +\OccursUnder c +\Rank 4 +\TextType Section +\TextProperties paragraph publishable vernacular level_4 +\StyleType Paragraph +\SpaceBefore 8 +\SpaceAfter 8 + +# Tables + +\Marker tr +\Name tr - Table - Row +\Description A new table row (basic) +\OccursUnder c esb ms ms1 ms2 s s1 s2 s3 s4 ip +\TextType VerseText +\TextProperties paragraph publishable vernacular +\StyleType Paragraph +\FontSize 12 +\LeftMargin .5 +\FirstLineIndent -.25 # 6/16 inch + +\Marker th1 +\Name th1 - Table - Column 1 Heading +\Description A table heading, column 1 +\OccursUnder tr +\TextType VerseText +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 +\Italic + +\Marker th2 +\Name th2 - Table - Column 2 Heading +\Description A table heading, column 2 +\OccursUnder tr +\TextType VerseText +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 +\Italic + +\Marker th3 +\Name th3 - Table - Column 3 Heading +\Description A table heading, column 3 +\OccursUnder tr +\TextType VerseText +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 +\Italic + +\Marker th4 +\Name th4 - Table - Column 4 Heading +\Description A table heading, column 4 +\OccursUnder tr +\TextType VerseText +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 +\Italic + +\Marker th5 +\Name th5 - Table - Column 5 Heading +\Description A table heading, column 5 +\OccursUnder tr +\TextType VerseText +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 +\Italic + +\Marker th6 +\Name th6 - Table - Column 6 Heading +\Description A table heading, column 6 +\OccursUnder tr +\TextType VerseText +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 +\Italic + +\Marker th7 +\Name th7 - Table - Column 7 Heading +\Description A table heading, column 7 +\OccursUnder tr +\TextType VerseText +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 +\Italic + +\Marker th8 +\Name th8 - Table - Column 8 Heading +\Description A table heading, column 4 +\OccursUnder tr +\TextType VerseText +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 +\Italic + +\Marker tc1 +\Name tc1 - Table - Column 1 Cell +\Description A table cell item, column 1 +\OccursUnder tr +\TextType VerseText +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 + +\Marker tc2 +\Name tc2 - Table - Column 2 Cell +\Description A table cell item, column 2 +\OccursUnder tr +\TextType VerseText +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 + +\Marker tc3 +\Name tc3 - Table - Column 3 Cell +\Description A table cell item, column 3 +\OccursUnder tr +\TextType VerseText +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 + +\Marker tc4 +\Name tc4 - Table - Column 4 Cell +\Description A table cell item, column 4 +\OccursUnder tr +\TextType VerseText +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 + +\Marker tc5 +\Name tc5 - Table - Column 5 Cell +\Description A table cell item, column 5 +\OccursUnder tr +\TextType VerseText +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 + +\Marker tc6 +\Name tc6 - Table - Column 6 Cell +\Description A table cell item, column 6 +\OccursUnder tr +\TextType VerseText +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 + +\Marker tc7 +\Name tc7 - Table - Column 7 Cell +\Description A table cell item, column 7 +\OccursUnder tr +\TextType VerseText +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 + +\Marker tc8 +\Name tc8 - Table - Column 8 Cell +\Description A table cell item, column 8 +\OccursUnder tr +\TextType VerseText +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 + +\Marker tc9 +\Name tc9 - Table - Column 9 Cell +\Description A table cell item, column 9 +\OccursUnder tr +\TextType VerseText +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 + +\Marker tc10 +\Name tc10 - Table - Column 10 Cell +\Description A table cell item, column 10 +\OccursUnder tr +\TextType VerseText +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 + +\Marker tc11 +\Name tc11 - Table - Column 11 Cell +\Description A table cell item, column 11 +\OccursUnder tr +\TextType VerseText +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 + +\Marker tc12 +\Name tc12 - Table - Column 12 Cell +\Description A table cell item, column 12 +\OccursUnder tr +\TextType VerseText +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 + +# Center Aligned Table Heads and Columns + +\Marker thc1 +\Name thc1 - Table - Column 1 Heading - Center Aligned +\Description A table heading, column 1, center aligned +\OccursUnder tr +\TextType VerseText +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 +\Italic +\Justification Center + +\Marker thc2 +\Name thc2 - Table - Column 2 Heading - Center Aligned +\Description A table heading, column 2, center aligned +\OccursUnder tr +\TextType VerseText +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 +\Italic +\Justification Center + +\Marker thc3 +\Name thc3 - Table - Column 3 Heading - Center Aligned +\Description A table heading, column 3, center aligned +\OccursUnder tr +\TextType VerseText +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 +\Italic +\Justification Center + +\Marker thc4 +\Name thc4 - Table - Column 4 Heading - Center Aligned +\Description A table heading, column 4, center aligned +\OccursUnder tr +\TextType VerseText +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 +\Italic +\Justification Center + +\Marker thc5 +\Name thc5 - Table - Column 5 Heading - Center Aligned +\Description A table heading, column 5, center aligned +\OccursUnder tr +\TextType VerseText +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 +\Italic +\Justification Center + +\Marker thc6 +\Name thc6 - Table - Column 6 Heading - Center Aligned +\Description A table heading, column 6, center aligned +\OccursUnder tr +\TextType VerseText +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 +\Italic +\Justification Center + +\Marker thc7 +\Name thc7 - Table - Column 7 Heading - Center Aligned +\Description A table heading, column 7, center aligned +\OccursUnder tr +\TextType VerseText +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 +\Italic +\Justification Center + +\Marker thc8 +\Name thc8 - Table - Column 8 Heading - Center Aligned +\Description A table heading, column 8, center aligned +\OccursUnder tr +\TextType VerseText +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 +\Italic +\Justification Center + +\Marker thc9 +\Name thc9 - Table - Column 9 Heading - Center Aligned +\Description A table heading, column 9, center aligned +\OccursUnder tr +\TextType VerseText +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 +\Italic +\Justification Center + +\Marker thc10 +\Name thc10 - Table - Column 10 Heading - Center Aligned +\Description A table heading, column 10, center aligned +\OccursUnder tr +\TextType VerseText +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 +\Italic +\Justification Center + +\Marker thc11 +\Name thc11 - Table - Column 11 Heading - Center Aligned +\Description A table heading, column 11, center aligned +\OccursUnder tr +\TextType VerseText +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 +\Italic +\Justification Center + +\Marker thc12 +\Name thc12 - Table - Column 12 Heading - Center Aligned +\Description A table heading, column 12, center aligned +\OccursUnder tr +\TextType VerseText +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 +\Italic +\Justification Center + +\Marker tcc1 +\Name tcc1 - Table - Column 1 Cell - Center Aligned +\Description A table cell item, column 1, center aligned +\OccursUnder tr +\TextType VerseText +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 +\Justification Center + +\Marker tcc2 +\Name tcc2 - Table - Column 2 Cell - Center Aligned +\Description A table cell item, column 2, center aligned +\OccursUnder tr +\TextType VerseText +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 +\Justification Center + +\Marker tcc3 +\Name tcc3 - Table - Column 3 Cell - Center Aligned +\Description A table cell item, column 3, center aligned +\OccursUnder tr +\TextType VerseText +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 +\Justification Center + +\Marker tcc4 +\Name tcc4 - Table - Column 4 Cell - Center Aligned +\Description A table cell item, column 4, center aligned +\OccursUnder tr +\TextType VerseText +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 +\Justification Center + +\Marker tcc5 +\Name tcc5 - Table - Column 5 Cell - Center Aligned +\Description A table cell item, column 5, center aligned +\OccursUnder tr +\TextType VerseText +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 +\Justification Center + +\Marker tcc6 +\Name tcc6 - Table - Column 6 Cell - Center Aligned +\Description A table cell item, column 6, center aligned +\OccursUnder tr +\TextType VerseText +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 +\Justification Center + +\Marker tcc7 +\Name tcc7 - Table - Column 7 Cell - Center Aligned +\Description A table cell item, column 7, center aligned +\OccursUnder tr +\TextType VerseText +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 +\Justification Center + +\Marker tcc8 +\Name tcc8 - Table - Column 8 Cell - Center Aligned +\Description A table cell item, column 8, center aligned +\OccursUnder tr +\TextType VerseText +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 +\Justification Center + +\Marker tcc9 +\Name tcc9 - Table - Column 9 Cell - Center Aligned +\Description A table cell item, column 9, center aligned +\OccursUnder tr +\TextType VerseText +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 +\Justification Center + +\Marker tcc10 +\Name tcc10 - Table - Column 10 Cell - Center Aligned +\Description A table cell item, column 10, center aligned +\OccursUnder tr +\TextType VerseText +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 +\Justification Center + +\Marker tcc11 +\Name tcc11 - Table - Column 11 Cell - Center Aligned +\Description A table cell item, column 11, center aligned +\OccursUnder tr +\TextType VerseText +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 +\Justification Center + +\Marker tcc12 +\Name tcc12 - Table - Column 12 Cell - Center Aligned +\Description A table cell item, column 12, center aligned +\OccursUnder tr +\TextType VerseText +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 +\Justification Center + +# Right Aligned Table Heads and Columns + +\Marker thr1 +\Name thr1 - Table - Column 1 Heading - Right Aligned +\Description A table heading, column 1, right aligned +\OccursUnder tr +\TextType VerseText +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 +\Italic +\Justification Right + +\Marker thr2 +\Name thr2 - Table - Column 2 Heading - Right Aligned +\Description A table heading, column 2, right aligned +\OccursUnder tr +\TextType VerseText +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 +\Italic +\Justification Right + +\Marker thr3 +\Name thr3 - Table - Column 3 Heading - Right Aligned +\Description A table heading, column 3, right aligned +\OccursUnder tr +\TextType VerseText +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 +\Italic +\Justification Right + +\Marker thr4 +\Name thr4 - Table - Column 4 Heading - Right Aligned +\Description A table heading, column 4, right aligned +\OccursUnder tr +\TextType VerseText +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 +\Italic +\Justification Right + +\Marker thr5 +\Name thr5 - Table - Column 5 Heading - Right Aligned +\Description A table heading, column 5, right aligned +\OccursUnder tr +\TextType VerseText +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 +\Italic +\Justification Right + +\Marker thr6 +\Name thr6 - Table - Column 6 Heading - Right Aligned +\Description A table heading, column 6, right aligned +\OccursUnder tr +\TextType VerseText +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 +\Italic +\Justification right + +\Marker thr7 +\Name thr7 - Table - Column 7 Heading - Right Aligned +\Description A table heading, column 7, right aligned +\OccursUnder tr +\TextType VerseText +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 +\Italic +\Justification right + +\Marker thr8 +\Name thr8 - Table - Column 8 Heading - Right Aligned +\Description A table heading, column 8, right aligned +\OccursUnder tr +\TextType VerseText +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 +\Italic +\Justification right + +\Marker thr9 +\Name thr9 - Table - Column 9 Heading - Right Aligned +\Description A table heading, column 9, right aligned +\OccursUnder tr +\TextType VerseText +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 +\Italic +\Justification right + +\Marker thr10 +\Name thr10 - Table - Column 10 Heading - Right Aligned +\Description A table heading, column 10, right aligned +\OccursUnder tr +\TextType VerseText +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 +\Italic +\Justification right + +\Marker thr11 +\Name thr11 - Table - Column 11 Heading - Right Aligned +\Description A table heading, column 11, right aligned +\OccursUnder tr +\TextType VerseText +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 +\Italic +\Justification right + +\Marker thr12 +\Name thr12 - Table - Column 12 Heading - Right Aligned +\Description A table heading, column 12, right aligned +\OccursUnder tr +\TextType VerseText +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 +\Italic +\Justification right + +\Marker tcr1 +\Name tcr1 - Table - Column 1 Cell - Right Aligned +\Description A table cell item, column 1, right aligned +\OccursUnder tr +\TextType VerseText +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 +\Justification Right + +\Marker tcr2 +\Name tcr2 - Table - Column 2 Cell - Right Aligned +\Description A table cell item, column 2, right aligned +\OccursUnder tr +\TextType VerseText +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 +\Justification Right + +\Marker tcr3 +\Name tcr3 - Table - Column 3 Cell - Right Aligned +\Description A table cell item, column 3, right aligned +\OccursUnder tr +\TextType VerseText +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 +\Justification Right + +\Marker tcr4 +\Name tcr4 - Table - Column 4 Cell - Right Aligned +\Description A table cell item, column 4, right aligned +\OccursUnder tr +\TextType VerseText +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 +\Justification Right + +\Marker tcr5 +\Name tcr5 - Table - Column 5 Cell - Right Aligned +\Description A table cell item, column 5, right aligned +\OccursUnder tr +\TextType VerseText +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 +\Justification Right + +\Marker tcr6 +\Name tcr6 - Table - Column 6 Cell - Right Aligned +\Description A table cell item, column 6, right aligned +\OccursUnder tr +\TextType VerseText +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 +\Justification right + +\Marker tcr7 +\Name tcr7 - Table - Column 7 Cell - Right Aligned +\Description A table cell item, column 7, right aligned +\OccursUnder tr +\TextType VerseText +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 +\Justification right + +\Marker tcr8 +\Name tcr8 - Table - Column 8 Cell - Right Aligned +\Description A table cell item, column 8, right aligned +\OccursUnder tr +\TextType VerseText +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 +\Justification right + +\Marker tcr9 +\Name tcr9 - Table - Column 9 Cell - Right Aligned +\Description A table cell item, column 9, right aligned +\OccursUnder tr +\TextType VerseText +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 +\Justification right + +\Marker tcr10 +\Name tcr10 - Table - Column 10 Cell - Right Aligned +\Description A table cell item, column 10, right aligned +\OccursUnder tr +\TextType VerseText +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 +\Justification right + +\Marker tcr11 +\Name tcr11 - Table - Column 11 Cell - Right Aligned +\Description A table cell item, column 11, right aligned +\OccursUnder tr +\TextType VerseText +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 +\Justification right + +\Marker tcr12 +\Name tcr12 - Table - Column 12 Cell - Right Aligned +\Description A table cell item, column 12, right aligned +\OccursUnder tr +\TextType VerseText +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 +\Justification right + +# Lists + +\Marker lh +\Name lh - List Header +\Description List header (introductory remark) +\OccursUnder c esb ms ms1 ms2 s s1 s2 s3 s4 ip +\Rank 4 +\TextType VerseText +\TextProperties paragraph publishable vernacular +\StyleType Paragraph +\FontSize 12 +\FirstLineIndent .125 # 1/8 inch first line indent + +\Marker li +\Name li - List Entry - Level 1 +\Description A list entry, level 1 (if single level) +\OccursUnder c esb ms ms1 ms2 s s1 s2 s3 s4 ip +\TextType VerseText +\TextProperties paragraph publishable vernacular level_1 +\StyleType paragraph +\FontSize 12 +\LeftMargin .5 +\FirstLineIndent -.375 # 1/8 inch indent, 1/2 inch wrap + +\Marker li1 +\Name li1 - List Entry - Level 1 +\Description A list entry, level 1 (if multiple levels) (basic) +\OccursUnder c esb ms ms1 ms2 s s1 s2 s3 s4 ip +\TextType VerseText +\TextProperties paragraph publishable vernacular level_1 +\StyleType paragraph +\FontSize 12 +\LeftMargin .5 +\FirstLineIndent -.375 # 1/8 inch indent, 1/2 inch wrap + +\Marker li2 +\Name li2 - List Entry - Level 2 +\Description A list entry, level 2 (basic) +\OccursUnder c esb ms ms1 ms2 s s1 s2 s3 s4 ip +\TextType VerseText +\TextProperties paragraph publishable vernacular level_2 +\StyleType paragraph +\FontSize 12 +\LeftMargin .75 +\FirstLineIndent -.375 + +\Marker li3 +\Name li3 - List Entry - Level 3 +\Description A list entry, level 3 +\OccursUnder c esb ms ms1 ms2 s s1 s2 s3 s4 ip +\TextType VerseText +\TextProperties paragraph publishable vernacular level_3 +\StyleType paragraph +\FontSize 12 +\LeftMargin 1 +\FirstLineIndent -.375 + +\Marker li4 +\Name li4 - List Entry - Level 4 +\Description A list entry, level 4 +\OccursUnder c esb ms ms1 ms2 s s1 s2 s3 s4 ip +\TextType VerseText +\TextProperties paragraph publishable vernacular level_4 +\StyleType paragraph +\FontSize 12 +\LeftMargin 1.25 +\FirstLineIndent -.375 + +\Marker lf +\Name lf - List Footer +\Description List footer (concluding remark) +\OccursUnder c esb ms ms1 ms2 s s1 s2 s3 s4 ip +\Rank 4 +\TextType VerseText +\TextProperties paragraph publishable vernacular +\StyleType Paragraph +\FontSize 12 + +\Marker lim +\Name lim - Embedded List Entry - Level 1 +\Description An embedded list entry, level 1 (if single level) +\OccursUnder c +\Rank 4 +\TextType VerseText +\TextProperties paragraph publishable vernacular level_1 +\StyleType paragraph +\FontSize 12 +\LeftMargin .75 +\FirstLineIndent -.375 +\RightMargin .25 + +\Marker lim1 +\Name lim1 - Embedded List Entry - Level 1 +\Description An embedded list entry, level 1 (if multiple levels) +\OccursUnder c +\Rank 4 +\TextType VerseText +\TextProperties paragraph publishable vernacular level_1 +\StyleType paragraph +\FontSize 12 +\LeftMargin .75 +\FirstLineIndent -.375 +\RightMargin .25 + +\Marker lim2 +\Name lim2 - Embedded List Entry - Level 2 +\Description An embedded list entry, level 2 +\OccursUnder c +\Rank 4 +\TextType VerseText +\TextProperties paragraph publishable vernacular level_2 +\StyleType paragraph +\FontSize 12 +\LeftMargin 1 +\FirstLineIndent -.375 + +\Marker lim3 +\Name lim3 - Embedded List Item - Level 3 +\Description An embedded list item, level 3 +\OccursUnder c +\Rank 4 +\TextType VerseText +\TextProperties paragraph publishable vernacular level_3 +\StyleType paragraph +\FontSize 12 +\LeftMargin 1.25 +\FirstLineIndent -.375 + +\Marker lim4 +\Name lim4 - Embedded List Entry - Level 4 +\Description An embedded list entry, level 4 +\OccursUnder c +\Rank 4 +\TextType VerseText +\TextProperties paragraph publishable vernacular level_4 +\StyleType paragraph +\FontSize 12 +\LeftMargin 1.5 +\FirstLineIndent -.375 + +\Marker litl +\Endmarker litl* +\Name litl...litl* - List Entry - Total +\Description List entry total text +\OccursUnder li li1 li2 li3 li4 lim lim1 lim2 lim3 lim4 NEST +\TextType VerseText +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 +\Italic + +\Marker lik +\Endmarker lik* +\Name lik...lik* - Structured List Entry - Key +\Description Structure list entry key text +\OccursUnder li li1 li2 li3 li4 lim lim1 lim2 lim3 lim4 NEST +\TextType VerseText +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 +\Italic + +\Marker liv +\Endmarker liv* +\Name liv...liv* - Structured List Entry - Value 1 +\Description Structured list entry value 1 content (if single value) +\OccursUnder li li1 li2 li3 li4 lim lim1 lim2 lim3 lim4 NEST +\TextType VerseText +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 + +\Marker liv1 +\Endmarker liv1* +\Name liv1...liv1* - Structured List Entry - Value 1 +\Description Structured list entry value 1 content (if multiple values) +\OccursUnder li li1 li2 li3 li4 lim lim1 lim2 lim3 lim4 NEST +\TextType VerseText +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 + +\Marker liv2 +\Endmarker liv2* +\Name liv2...liv2* - Structured List Entry - Value 2 +\Description Structured list entry value 2 content +\OccursUnder li li1 li2 li3 li4 lim lim1 lim2 lim3 lim4 NEST +\TextType VerseText +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 + +\Marker liv3 +\Endmarker liv3* +\Name liv3...liv3* - Structured List Entry - Value 3 +\Description Structured list entry value 3 content +\OccursUnder li li1 li2 li3 li4 lim lim1 lim2 lim3 lim4 NEST +\TextType VerseText +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 + +\Marker liv4 +\Endmarker liv4* +\Name liv4...liv4* - Structured List Entry - Value 4 +\Description Structured list entry value 4 content +\OccursUnder li li1 li2 li3 li4 lim lim1 lim2 lim3 lim4 NEST +\TextType VerseText +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 + +# Footnotes + +\Marker f +\Endmarker f* +\Name f...f* - Footnote +\Description A Footnote text item (basic) +\OccursUnder c cp lh li li1 li2 li3 li4 lf lim lim1 lim2 lim3 lim4 m mi nb p pc ph phi pi pi1 pi2 pi3 pr pmo pm pmc pmr po q q1 q2 q3 q4 qc qr qd qm qm1 qm2 qm3 qs sp tc1 tc2 tc3 tc4 mt mt1 mt2 mt3 ms ms1 ms2 ms3 s s1 s2 s3 d ip +\TextProperties publishable vernacular note +\TextType NoteText +\StyleType Note +\FontSize 12 + +\Marker fe +\Endmarker fe* +\Name fe...fe* - Endnote +\Description An Endnote text item +\OccursUnder c lh li li1 li2 li3 li4 lf lim lim1 lim2 lim3 lim4 m mi nb p pc ph phi pi pi1 pi2 pi3 pr pmo pm pmc pmr po q q1 q2 q3 q4 qc qr qd qm qm1 qm2 qm3 sp tc1 tc2 tc3 tc4 ms ms1 ms2 ms3 s s1 s2 s3 d ip +\TextProperties publishable vernacular note +\TextType NoteText +\StyleType Note +\FontSize 12 + +\Marker fr +\Endmarker fr* +\Name fr - Footnote - Reference +\Description The origin reference for the footnote (basic) +\OccursUnder f fe ef +\TextType NoteText +\TextProperties publishable vernacular note +\StyleType Character +\FontSize 12 +\Bold + +\Marker ft +\Endmarker ft* +\Name ft - Footnote - Text +\Description Footnote text, Protocanon (basic) +\OccursUnder f fe ef +\TextProperties publishable vernacular note +\TextType NoteText +\StyleType Character +\FontSize 12 + +\Marker fk +\Endmarker fk* +\Name fk - Footnote - Keyword +\Description A footnote keyword (basic) +\OccursUnder f fe ef +\TextProperties publishable vernacular note +\TextType NoteText +\StyleType Character +\FontSize 12 +\Bold +\Italic + +\Marker fq +\Endmarker fq* +\Name fq - Footnote - Quotation or Alternate Rendering +\Description A footnote scripture quote or alternate rendering (basic) +\OccursUnder f fe ef +\TextProperties publishable vernacular note +\TextType NoteText +\StyleType Character +\FontSize 12 +\Italic + +\Marker fqa +\Endmarker fqa* +\Name fqa - Footnote - Alternate Translation Rendering +\Description A footnote alternate rendering for a portion of scripture text +\OccursUnder f fe ef +\TextProperties publishable vernacular note +\TextType NoteText +\StyleType Character +\FontSize 12 +\Italic + +\Marker fl +\Endmarker fl* +\Name fl - Footnote - Label Text +\Description A footnote label text item, for marking or "labelling" the type or alternate translation being provided in the note. +\OccursUnder f fe ef +\TextProperties publishable vernacular note +\TextType NoteText +\StyleType Character +\FontSize 12 +\Italic +\Bold + +\Marker fw +\Endmarker fw* +\Name fw - Footnote - Witness List +\Description A footnote witness list, for distinguishing a list of sigla representing witnesses in critical editions. +\OccursUnder f fe +\TextProperties publishable vernacular note +\TextType NoteText +\StyleType Character +\FontSize 12 + +\Marker fp +\Endmarker fp* +\Name fp - Footnote Paragraph Mark +\Description A Footnote additional paragraph marker +\OccursUnder f fe ef +\TextProperties publishable vernacular note +\TextType NoteText +\StyleType Character +\FontSize 12 + +\Marker fs +\Endmarker fs* +\Name DEPRECATED fs - Footnote - Footnote Summary +\Description A summary text for the concept/idea/quotation from the scripture translation for which the note is being provided. +\OccursUnder f fe ef +\TextProperties publishable vernacular note +\TextType NoteText +\StyleType Character +\FontSize 12 +\Italic + +\Marker fv +\Endmarker fv* +\Name fv...fv* - Footnote - Embedded Verse Number +\Description A verse number within the footnote text +\OccursUnder f fe ef +\TextProperties publishable vernacular note +\TextType NoteText +\StyleType Character +\FontSize 12 +\Superscript + +\Marker fdc +\Endmarker fdc* +\Name DEPRECATED fdc...fdc* - Footnote - DC text +\Description Footnote text, applies to Deuterocanon only +\OccursUnder f fe ef +\TextProperties publishable vernacular note +\TextType NoteText +\StyleType Character +\FontSize 12 + +\Marker fm +\Endmarker fm* +\Name fm - Footnote - Additional Caller to Previous Note +\Description An additional footnote marker location for a previous footnote +\OccursUnder lh li li1 li2 li3 li4 lf lim lim1 lim2 lim3 lim4 m mi nb p pc ph phi pi pi1 pi2 pi3 pr pmo pm pmc pmr po q q1 q2 q3 q4 qc qr qd qm qm1 qm2 qm3 sp tc1 tc2 tc3 tc4 ms ms1 ms2 s s1 s2 s3 d ip +\TextType Other +\TextProperties paragraph publishable vernacular +\StyleType Character +\FontSize 12 +\Superscript + +# Cross References + +\Marker x +\Endmarker x* +\Name x...x* - Cross Reference +\Description A list of cross references (basic) +\OccursUnder lh li li1 li2 li3 li4 lf lim lim1 lim2 lim3 lim4 m mi nb p pc ph phi pi pi1 pi2 pi3 pr pmo pm pmc pmr po q q1 q2 q3 q4 qc qr qd qm qm1 qm2 qm3 qs sp tc1 tc2 tc3 tc4 mt mt1 mt2 mt3 ms ms1 ms2 s s1 s2 s3 d +\TextProperties publishable vernacular note crossreference +\TextType NoteText +\StyleType Note +\FontSize 12 + +\Marker xo +\Endmarker xo* +\Name xo - Cross Reference - Origin Reference +\Description The cross reference origin reference (basic) +\OccursUnder x ex +\TextProperties publishable vernacular note +\TextType NoteText +\StyleType Character +\FontSize 12 +\Bold + +\Marker xop +\Endmarker xop* +\Name xop - Cross Reference - Origin Reference Publishing Alternate +\Description Published cross reference origin reference (origin reference that should appear in the published text) +\OccursUnder x +\TextProperties publishable vernacular note +\TextType NoteText +\StyleType Character +\FontSize 12 + +\Marker xt +\Endmarker xt* +\Name xt - Cross Reference - Target References +\Description The cross reference target reference(s), protocanon only (basic) +\OccursUnder ip im ipi imi ipq imq ipr iq iq1 iq2 iq3 io io1 io2 io3 io4 ms ms1 ms2 s s1 s2 s3 s4 cd sp d lh li li1 li2 li3 li4 lf lim lim1 lim2 lim3 lim4 m mi nb p pc ph phi pi pi1 pi2 pi3 pr pmo pm pmc pmr po q q1 q2 q3 q4 qc qr qd qm qm1 qm2 qm3 tr th1 th2 th3 th4 thr1 thr2 thr3 thr4 tc1 tc2 tc3 tc4 tcr1 tcr2 tcr3 tcr4 f fe x ef ex NEST +\TextProperties publishable vernacular note +\TextType NoteText +\StyleType Character +\FontSize 12 +#!\Attributes ?link-href + +\Marker xta +\Endmarker xta* +\Name xta - Cross Reference - Target References Added Text +\Description Cross reference target references added text +\OccursUnder x +\TextProperties publishable vernacular note +\TextType NoteText +\StyleType Character +\FontSize 12 + +\Marker xk +\Endmarker xk* +\Name xk - Cross Reference - Keyword +\Description A cross reference keyword +\OccursUnder x ex +\TextProperties publishable vernacular note +\TextType NoteText +\StyleType Character +\FontSize 12 +\Italic + +\Marker xq +\Endmarker xq* +\Name xq - Cross Reference - Quotation +\Description A cross-reference quotation from the scripture text +\OccursUnder x ex +\TextProperties publishable vernacular note +\TextType NoteText +\StyleType Character +\FontSize 12 +\Italic + +\Marker xot +\Endmarker xot* +\Name xot...xot* - Cross Reference - OT Target Refs (optional) +\Description Cross-reference target reference(s), Old Testament only +\OccursUnder x ex +\TextProperties publishable vernacular note +\TextType NoteText +\StyleType Character +\FontSize 12 + +\Marker xnt +\Endmarker xnt* +\Name xnt...xnt* - Cross Reference - NT Target Refs (optional) +\Description Cross-reference target reference(s), New Testament only +\OccursUnder x ex +\TextProperties publishable vernacular note +\TextType NoteText +\StyleType Character +\FontSize 12 + +\Marker xdc +\Endmarker xdc* +\Name DEPRECATED xdc...xdc* - Cross Reference - DC Target Refs +\Description Cross-reference target reference(s), Deuterocanon only +\OccursUnder x ex +\TextProperties publishable vernacular note +\TextType NoteText +\StyleType Character +\FontSize 12 + +\Marker rq +\Endmarker rq* +\Name rq...rq* - Cross Reference - Inline Quotation References +\Description A cross-reference indicating the source text for the preceding quotation. +\OccursUnder lh li li1 li2 li3 li4 lf lim lim1 lim2 lim3 lim4 m mi nb p pc ph phi pi pi1 pi2 pi3 pr pmo pm pmc pmr po q q1 q2 q3 q4 qc qr qd qm qm1 qm2 qm3 NEST +\TextType Other +\TextProperties publishable vernacular +\StyleType Character +\FontSize 10 +\Italic + +# Study material extensions to existing USFM markup. + +\Marker ef +\Endmarker ef* +\Name ef...ef* - Study - Extended Footnote +\Description Study Bible extended footnote (basic) +\OccursUnder c li li1 li2 li3 li4 m mi nb p pc ph phi pi pi1 pi2 pi3 pr pmo pm pmc pmr q q1 q2 q3 q4 qc qr qm qm1 qm2 qm3 qs sp tc1 tc2 tc3 tc4 mt mt1 mt2 mt3 ms ms1 ms2 ms3 s s1 s2 s3 d ip cp +\TextProperties publishable vernacular note +\TextType NoteText +\StyleType Note +\FontSize 12 + +\Marker ex +\Endmarker ex* +\Name ex - Study - Extended Cross Reference +\Description List of study Bible extended cross references +\OccursUnder c li li1 li2 li3 li4 m mi nb p pc ph phi pi pi1 pi2 pi3 pr pmo pm pmc pmr q q1 q2 q3 q4 qc qr qm qm1 qm2 qm3 qs sp tc1 tc2 tc3 tc4 mt mt1 mt2 mt3 ms ms1 ms2 ms3 s s1 s2 s3 d ip cp +\TextProperties publishable vernacular note +\TextType NoteText +\StyleType Note +\FontSize 12 + +\Marker esb +\Name esb - Study - Sidebar (Mini Article) +\Description Study Bible sidebar (mini article) +\OccursUnder id c +\TextProperties publishable vernacular note +\TextType Other +\StyleType Paragraph +\FontSize 12 + +\Marker esbe +\Name esbe - Study - Sidebar Ending +\Description Study Bible sidebar ending +\OccursUnder id c esb +\TextProperties publishable vernacular note +\TextType Other +\StyleType Paragraph +\FontSize 12 + +\Marker erq +\Name erq - Study - Reflective Questions +\Description Study Bible reflective questions +\OccursUnder id c +\TextProperties publishable vernacular note +\TextType Other +\StyleType Paragraph +\FontSize 12 + +\Marker erqe +\Name erq - Study - Reflective Questions Ending +\Description Study Bible reflective questions ending +\OccursUnder id c erq +\TextProperties publishable vernacular note +\TextType Other +\StyleType Paragraph +\FontSize 12 + +\Marker cat +\Endmarker cat* +\Name cat - Study - Note Category +\Description Study note category +\TextType NoteText +\TextProperties publishable vernacular note +\StyleType Character +\FontSize 14 +\Color 8388736 +#!\ColorName highcon purple + +# Other Special Text + +\Marker qt +\Endmarker qt* +\Name qt...qt* - Special Text - Quoted Text - OT in NT +\Description For Old Testament quoted text appearing in the New Testament (basic) +\OccursUnder ip im ipi imi ipq imq ipr iq iq1 iq2 iq3 io io1 io2 io3 io4 ms ms1 ms2 s s1 s2 s3 s4 cd sp d lh li li1 li2 li3 li4 lf lim lim1 lim2 lim3 lim4 m mi nb p pc ph phi pi pi1 pi2 pi3 pr pmo pm pmc pmr po q q1 q2 q3 q4 qc qr qd qm qm1 qm2 qm3 tr th1 th2 th3 th4 thr1 thr2 thr3 thr4 tc1 tc2 tc3 tc4 tcr1 tcr2 tcr3 tcr4 f fe NEST +\TextType VerseText +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 +\Italic + +\Marker nd +\Endmarker nd* +\Name nd...nd* - Special Text - Name of Deity +\Description For name of deity (basic) +\OccursUnder ip im ipi imi ipq imq ipr iq iq1 iq2 iq3 io io1 io2 io3 io4 ms ms1 ms2 s s1 s2 s3 s4 cd sp d lh li li1 li2 li3 li4 lf lim lim1 lim2 lim3 lim4 m mi nb p pc ph phi pi pi1 pi2 pi3 pr pmo pm pmc pmr po q q1 q2 q3 q4 qc qr qd qm qm1 qm2 qm3 tr th1 th2 th3 th4 thr1 thr2 thr3 thr4 tc1 tc2 tc3 tc4 tcr1 tcr2 tcr3 tcr4 f fe NEST +\TextType VerseText +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 +\Underline + +\Marker tl +\Endmarker tl* +\Name tl...tl* - Special Text - Transliterated Word +\Description For transliterated words +\OccursUnder ip im ipi imi ipq imq ipr iq iq1 iq2 iq3 io io1 io2 io3 io4 ms ms1 ms2 s s1 s2 s3 s4 cd sp d lh li li1 li2 li3 li4 lf lim lim1 lim2 lim3 lim4 m mi nb p pc ph phi pi pi1 pi2 pi3 pr pmo pm pmc pmr po q q1 q2 q3 q4 qc qr qd qm qm1 qm2 qm3 cls tr th1 th2 th3 th4 thr1 thr2 thr3 thr4 tc1 tc2 tc3 tc4 tcr1 tcr2 tcr3 tcr4 f fe NEST +\TextType VerseText +\TextProperties publishable nonvernacular +\StyleType Character +\FontSize 12 +\Italic + +\Marker dc +\Endmarker dc* +\Name dc...dc* - Special Text - Deuterocanonical/LXX Additions +\Description Deuterocanonical/LXX additions or insertions in the Protocanonical text +\OccursUnder ip im ipi imi ipq imq ipr iq iq1 iq2 iq3 io io1 io2 io3 io4 ms ms1 ms2 s s1 s2 s3 s4 cd sp d lh li li1 li2 li3 li4 lf lim lim1 lim2 lim3 lim4 m mi nb p pc ph phi pi pi1 pi2 pi3 pr pmo pm pmc pmr po q q1 q2 q3 q4 qc qr qd qm qm1 qm2 qm3 tr th1 th2 th3 th4 thr1 thr2 thr3 thr4 tc1 tc2 tc3 tc4 tcr1 tcr2 tcr3 tcr4 f fe NEST +\TextType VerseText +\TextProperties publishable vernacular +\StyleType Character +\Italic + +\Marker bk +\Endmarker bk* +\Name bk...bk* - Special Text - Quoted book title +\Description For the quoted name of a book +\OccursUnder imt imt1 imt2 imt3 imt4 imte imte1 imte2 is is1 is2 ili ili1 ili2 ip im ipi imi ipq imq ipr iq iq1 iq2 iq3 io io1 io2 io3 io4 ms ms1 ms2 s s1 s2 s3 s4 cd sp d lh li li1 li2 li3 li4 lf lim lim1 lim2 lim3 lim4 m mi nb p pc ph phi pi pi1 pi2 pi3 pr pmo pm pmc pmr po q q1 q2 q3 q4 qc qr qd qm qm1 qm2 qm3 tr th1 th2 th3 th4 thr1 thr2 thr3 thr4 tc1 tc2 tc3 tc4 tcr1 tcr2 tcr3 tcr4 f fe NEST +\TextType VerseText +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 +\Italic + +\Marker sig +\Endmarker sig* +\Name sig...sig* - Special Text - Author's Signature (Epistles) +\Description For the signature of the author of an Epistle +\OccursUnder ip im ipi imi ipq imq ipr iq iq1 iq2 iq3 io io1 io2 io3 io4 ms ms1 ms2 s s1 s2 s3 s4 cd sp d lh li li1 li2 li3 li4 lf lim lim1 lim2 lim3 lim4 m mi nb p pc ph phi pi pi1 pi2 pi3 pr pmo pm pmc pmr po q q1 q2 q3 q4 qc qr qd qm qm1 qm2 qm3 cls tr th1 th2 th3 th4 thr1 thr2 thr3 thr4 tc1 tc2 tc3 tc4 tcr1 tcr2 tcr3 tcr4 f fe NEST +\TextType VerseText +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 +\Italic + +\Marker pn +\Endmarker pn* +\Name pn...pn* - Special Text - Proper Name +\Description For a proper name +\OccursUnder ip im ipi imi ipq imq ipr iq iq1 iq2 iq3 io io1 io2 io3 io4 ms ms1 ms2 s s1 s2 s3 s4 cd sp d lh li li1 li2 li3 li4 lf lim lim1 lim2 lim3 lim4 m mi nb p pc ph phi pi pi1 pi2 pi3 pr pmo pm pmc pmr po q q1 q2 q3 q4 qc qr qd qm qm1 qm2 qm3 cls tr th1 th2 th3 th4 thr1 thr2 thr3 thr4 tc1 tc2 tc3 tc4 tcr1 tcr2 tcr3 tcr4 f fe NEST +\TextType VerseText +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 +\Bold +\Underline + +\Marker png +\Endmarker png* +\Name png...png* - Special Text - Geographic Proper Name +\Description For a geographic proper name +\OccursUnder ip im ipi imi ipq imq ipr iq iq1 iq2 iq3 io io1 io2 io3 io4 ms ms1 ms2 s s1 s2 s3 s4 cd sp d lh li li1 li2 li3 li4 lf lim lim1 lim2 lim3 lim4 m mi nb p pc ph phi pi pi1 pi2 pi3 pr pmo pm pmc pmr po q q1 q2 q3 q4 qc qr qd qm qm1 qm2 qm3 cls tr th1 th2 th3 th4 thr1 thr2 thr3 thr4 tc1 tc2 tc3 tc4 tcr1 tcr2 tcr3 tcr4 f fe NEST +\TextType VerseText +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 +\Underline + +\Marker addpn +\Endmarker addpn* +\Name DEPRECATED addpn...addpn* - Special Text for Chinese +\Description For chinese words to be dot underline & underline +\OccursUnder ip im ipi imi ipq imq ipr iq iq1 iq2 iq3 io io1 io2 io3 io4 ms ms1 ms2 s s1 s2 s3 s4 cd sp d lh li li1 li2 li3 li4 lf lim lim1 lim2 lim3 lim4 m mi nb p pc ph phi pi pi1 pi2 pi3 pr pmo pm pmc pmr po q q1 q2 q3 q4 qc qr qd qm qm1 qm2 qm3 cls tr th1 th2 th3 th4 thr1 thr2 thr3 thr4 tc1 tc2 tc3 tc4 tcr1 tcr2 tcr3 tcr4 f fe NEST +\TextType VerseText +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 +#\Color 2263842 +##!\ColorName green +\Bold +\Italic +\Underline + +\Marker wj +\Endmarker wj* +\Name wj...wj* - Special Text - Words of Jesus +\Description For marking the words of Jesus +\OccursUnder ip im ipi imi ipq imq ipr iq iq1 iq2 iq3 io io1 io2 io3 io4 ms ms1 ms2 s s1 s2 s3 s4 cd sp d lh li li1 li2 li3 li4 lf lim lim1 lim2 lim3 lim4 m mi nb p pc ph phi pi pi1 pi2 pi3 pr pmo pm pmc pmr po q q1 q2 q3 q4 qc qr qd qm qm1 qm2 qm3 tr th1 th2 th3 th4 thr1 thr2 thr3 thr4 tc1 tc2 tc3 tc4 tcr1 tcr2 tcr3 tcr4 f fe NEST +\TextType VerseText +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 +\Color 255 +#!\ColorName highcon red + +\Marker k +\Endmarker k* +\Name k...k* - Special Text - Keyword +\Description For a keyword +\OccursUnder ip im ipi imi ipq imq ipr iq iq1 iq2 iq3 io io1 io2 io3 io4 ms ms1 ms2 s s1 s2 s3 s4 cd sp d lh li li1 li2 li3 li4 lf lim lim1 lim2 lim3 lim4 m mi nb p pc ph phi pi pi1 pi2 pi3 pr pmo pm pmc pmr po q q1 q2 q3 q4 qc qr qd qm qm1 qm2 qm3 tr th1 th2 th3 th4 thr1 thr2 thr3 thr4 tc1 tc2 tc3 tc4 tcr1 tcr2 tcr3 tcr4 f fe NEST +\TextType VerseText +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 +\Italic +\Bold + +\Marker sls +\Endmarker sls* +\Name sls...sls* - Special Text - Secondary Language or Text Source +\Description To represent where the original text is in a secondary language or from an alternate text source +\OccursUnder lh li li1 li2 li3 li4 lf lim lim1 lim2 lim3 lim4 m mi nb p pc ph phi pi pi1 pi2 pi3 pr pmo pm pmc pmr po q q1 q2 q3 q4 qc qr qd qm qm1 qm2 qm3 sp tr th1 th2 th3 th4 thr1 thr2 thr3 thr4 tc1 tc2 tc3 tc4 tcr1 tcr2 tcr3 tcr4 f fe NEST +\TextType VerseText +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 +\Italic + +\Marker ord +\Endmarker ord* +\Name ord...ord* - Special Text - Ordinal number text portion +\Description For the text portion of an ordinal number +\OccursUnder ip im ipi imi ipq imq ipr iq iq1 iq2 iq3 io io1 io2 io3 io4 ms ms1 ms2 s s1 s2 s3 s4 cd sp d lh li li1 li2 li3 li4 lf lim lim1 lim2 lim3 lim4 m mi nb p pc ph phi pi pi1 pi2 pi3 pr pmo pm pmc pmr po q q1 q2 q3 q4 qc qr qd qm qm1 qm2 qm3 tr th1 th2 th3 th4 thr1 thr2 thr3 thr4 tc1 tc2 tc3 tc4 tcr1 tcr2 tcr3 tcr4 f fe NEST +\TextType VerseText +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 +\Superscript + +\Marker add +\Endmarker add* +\Name add...add* - Special Text - Translational Addition +\Description For a translational addition to the text +\OccursUnder ip im ipi imi ipq imq ipr iq iq1 iq2 iq3 io io1 io2 io3 io4 ms ms1 ms2 s s1 s2 s3 s4 cd sp d lh li li1 li2 li3 li4 lf lim lim1 lim2 lim3 lim4 m mi nb p pc ph phi pi pi1 pi2 pi3 pr pmo pm pmc pmr po q q1 q2 q3 q4 qc qr qd qm qm1 qm2 qm3 cls tr th1 th2 th3 th4 thr1 thr2 thr3 thr4 tc1 tc2 tc3 tc4 tcr1 tcr2 tcr3 tcr4 f fe NEST +\TextType VerseText +\TextProperties publishable vernacular +\StyleType Character +#\Color 2263842 +##!\ColorName green +\Bold +\Italic + +\Marker lit +\Name lit - Special Text - Liturgical note +\Description For a comment or note inserted for liturgical use +\OccursUnder c +\TextType Other +\TextProperties paragraph publishable vernacular +\StyleType Paragraph +\Justification Right +\FontSize 12 +\Bold + +# Character Styling + +\Marker no +\Endmarker no* +\Name no...no* - Character - Normal Text +\Description A character style, use normal text +\OccursUnder is ip ipi im imi ili ili1 ili2 imq ipq iex iq iot io1 io2 io3 io4 s s1 s2 s3 NEST +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 + +\Marker it +\Endmarker it* +\Name it...it* - Character - Italic Text +\Description A character style, use italic text +\OccursUnder ip im ipi imi ipq imq ipr iq iq1 iq2 iq3 io io1 io2 io3 io4 ms ms1 ms2 s s1 s2 s3 s4 cd sp d lh li li1 li2 li3 li4 lf lim lim1 lim2 lim3 lim4 m mi nb p pc ph phi pi pi1 pi2 pi3 pr pmo pm pmc pmr po q q1 q2 q3 q4 qc qr qd qm qm1 qm2 qm3 tr th1 th2 th3 th4 thr1 thr2 thr3 thr4 tc1 tc2 tc3 tc4 tcr1 tcr2 tcr3 tcr4 f fe x NEST +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 +\Italic + +\Marker bd +\Endmarker bd* +\Name bd...bd* - Character - Bold Text +\Description A character style, use bold text +\OccursUnder ip im ipi imi ipq imq ipr iq iq1 iq2 iq3 io io1 io2 io3 io4 ms ms1 ms2 s s1 s2 s3 s4 cd sp d lh li li1 li2 li3 li4 lf lim lim1 lim2 lim3 lim4 m mi nb p pc ph phi pi pi1 pi2 pi3 pr pmo pm pmc pmr po q q1 q2 q3 q4 qc qr qd qm qm1 qm2 qm3 tr th1 th2 th3 th4 thr1 thr2 thr3 thr4 tc1 tc2 tc3 tc4 tcr1 tcr2 tcr3 tcr4 f fe x NEST +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 +\Bold + +\Marker bdit +\Endmarker bdit* +\Name bdit...bdit* - Character - BoldItalic Text +\Description A character style, use bold + italic text +\OccursUnder ip im ipi imi ipq imq ipr iq iq1 iq2 iq3 io io1 io2 io3 io4 ms ms1 ms2 s s1 s2 s3 s4 cd sp d lh li li1 li2 li3 li4 lf lim lim1 lim2 lim3 lim4 m mi nb p pc ph phi pi pi1 pi2 pi3 pr pmo pm pmc pmr po q q1 q2 q3 q4 qc qr qd qm qm1 qm2 qm3 tr th1 th2 th3 th4 thr1 thr2 thr3 thr4 tc1 tc2 tc3 tc4 tcr1 tcr2 tcr3 tcr4 f fe x NEST +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 +\Bold +\Italic + +\Marker em +\Endmarker em* +\Name em...em* - Character - Emphasized Text +\Description A character style, use emphasized text style +\OccursUnder ip im ipi imi ipq imq ipr iq iq1 iq2 iq3 io io1 io2 io3 io4 ms ms1 ms2 s s1 s2 s3 s4 cd sp d lh li li1 li2 li3 li4 lf lim lim1 lim2 lim3 lim4 m mi nb p pc ph phi pi pi1 pi2 pi3 pr pmo pm pmc pmr po q q1 q2 q3 q4 qc qr qd qm qm1 qm2 qm3 tr th1 th2 th3 th4 thr1 thr2 thr3 thr4 tc1 tc2 tc3 tc4 tcr1 tcr2 tcr3 tcr4 f fe x NEST +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 +\Italic + +\Marker sc +\Endmarker sc* +\Name sc...sc* - Character - Small Caps +\Description A character style, for small capitalization text +\OccursUnder ip im ipi imi ipq imq ipr iq iq1 iq2 iq3 io io1 io2 io3 io4 ms ms1 ms2 s s1 s2 s3 s4 cd sp d lh li li1 li2 li3 li4 lf lim lim1 lim2 lim3 lim4 m mi nb p pc ph phi pi pi1 pi2 pi3 pr pmo pm pmc pmr po q q1 q2 q3 q4 qc qr qd qm qm1 qm2 qm3 tr th1 th2 th3 th4 thr1 thr2 thr3 thr4 tc1 tc2 tc3 tc4 tcr1 tcr2 tcr3 tcr4 f fe x NEST +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 +\Smallcaps + +\Marker sup +\Endmarker sup* +\Name sup...sup* - Character - Superscript +\Description A character style, for superscript text. Typically for use in critical edition footnotes. +\OccursUnder ip im ipi imi ipq imq ipr iq iq1 iq2 iq3 io io1 io2 io3 io4 ms ms1 ms2 s s1 s2 s3 s4 cd sp d lh li li1 li2 li3 li4 lf lim lim1 lim2 lim3 lim4 m mi nb p pc ph phi pi pi1 pi2 pi3 pr pmo pm pmc pmr po q q1 q2 q3 q4 qc qr qd qm qm1 qm2 qm3 tr th1 th2 th3 th4 thr1 thr2 thr3 thr4 tc1 tc2 tc3 tc4 tcr1 tcr2 tcr3 tcr4 f fe x NEST +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 +\Superscript + +# Breaks + +\Marker pb +\Name pb - Break - Page Break +\Description Page Break used for new reader portions and children's bibles where content is controlled by the page +\OccursUnder c +\Rank 4 +\TextType Other +\TextProperties publishable +\StyleType Paragraph +\FontSize 12 + +# Special Features + +\Marker fig +\Endmarker fig* +\Name fig...fig* - Auxiliary - Figure/Illustration/Map +\Description Illustration [Columns to span, height, filename, caption text] +\OccursUnder lh li li1 li2 li3 li4 lf lim lim1 lim2 lim3 lim4 m mi nb p pc ph phi pi pi1 pi2 pi3 pr pmo pm pmc pmr po q q1 q2 q3 q4 qc qr qd qm qm1 qm2 qm3 sp tr th1 th2 th3 th4 thr1 thr2 thr3 thr4 tc1 tc2 tc3 tc4 tcr1 tcr2 tcr3 tcr4 ms ms1 ms2 s s1 s2 s3 d ip +\TextType Other +\TextProperties paragraph publishable vernacular +\StyleType Character +\FontSize 12 +#!\Attributes src size ref ?alt ?loc ?copy + +\Marker jmp +\Endmarker jmp* +\Name jmp...jmp* - Link text +\Description For associating linking attributes to a span of text +\OccursUnder ip im ipi imi ipq imq ipr iq iq1 iq2 iq3 io io1 io2 io3 io4 ms ms1 ms2 s s1 s2 s3 s4 cd sp d lh li li1 li2 li3 li4 lf lim lim1 lim2 lim3 lim4 m mi nb p pc ph phi pi pi1 pi2 pi3 pr pmo pm pmc pmr po q q1 q2 q3 q4 qc qr qd qm qm1 qm2 qm3 tr th1 th2 th3 th4 thr1 thr2 thr3 thr4 tc1 tc2 tc3 tc4 tcr1 tcr2 tcr3 tcr4 f fe x NEST +\TextType Other +\StyleType Character +\Color 16711680 +#!\ColorName highcon blue +\Underline +#!\Attributes ?link-href ?link-id ?link-title + +\Marker pro +\Endmarker pro* +\Name DEPRECATED pro...pro* - Special Text - CJK Pronunciation +\Description For indicating pronunciation in CJK texts +\OccursUnder ip im ipi imi ipq imq ipr iq iq1 iq2 iq3 li li1 li2 li3 li4 m mi nb p pc ph phi pi pi1 pi2 pi3 pr pmo pm pmc pmr q q1 q2 q3 q4 qc qr qm qm1 qm2 qm3 sp tr th1 th2 th3 th4 thr1 thr2 thr3 thr4 tc1 tc2 tc3 tc4 tcr1 tcr2 tcr3 tcr4 ms ms1 ms2 s s1 s2 s3 d ip f fe NEST +\TextType Other +\TextProperties Nonpublishable +\StyleType Character +\FontSize 10 + +\Marker rb +\Endmarker rb* +\Name rb...rb* - Special Text - Ruby Glossing +\Description Most often used to provide a reading / pronunciation guide in ideographic scripts +\OccursUnder ip im ipi imi ipq imq ipr iq iq1 iq2 iq3 io io1 io2 io3 io4 lh li li1 li2 li3 li4 lf lim lim1 lim2 lim3 lim4 m mi nb p pc ph phi pi pi1 pi2 pi3 pr pmo pm pmc pmr po q q1 q2 q3 q4 qc qr qd qm qm1 qm2 qm3 sp tr th1 th2 th3 th4 thr1 thr2 thr3 thr4 tc1 tc2 tc3 tc4 tcr1 tcr2 tcr3 tcr4 ms ms1 ms2 s s1 s2 s3 d ip f fe NEST +\TextType VerseText +\TextProperties publishable vernacular +\StyleType Character +#!\Attributes gloss + +# Peripheral References + +\Marker w +\Endmarker w* +\Name w...w* - Peripheral Ref - Wordlist Entry +\Description A wordlist text item +\OccursUnder ip im ipi imi ipq imq ipr iq iq1 iq2 iq3 io io1 io2 io3 io4 ms ms1 ms2 s s1 s2 s3 s4 cd sp d lh li li1 li2 li3 li4 lf lim lim1 lim2 lim3 lim4 m mi nb p pc ph phi pi pi1 pi2 pi3 pr pmo pm pmc pmr po q q1 q2 q3 q4 qc qr qd qm qm1 qm2 qm3 tr th1 th2 th3 th4 thr1 thr2 thr3 thr4 tc1 tc2 tc3 tc4 tcr1 tcr2 tcr3 tcr4 f fe ef erq esb x ex NEST +\TextType VerseText +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 +#!\Attributes ?lemma ?strong ?srcloc + +\Marker wh +\Endmarker wh* +\Name wh...wh* - Peripheral Ref - Hebrew Wordlist Entry +\Description A Hebrew wordlist text item +\OccursUnder ip im ipi imi ipq imq ipr iq iq1 iq2 iq3 io io1 io2 io3 io4 ms ms1 ms2 s s1 s2 s3 s4 cd sp d lh li li1 li2 li3 li4 lf lim lim1 lim2 lim3 lim4 m mi nb p pc ph phi pi pi1 pi2 pi3 pr pmo pm pmc pmr po q q1 q2 q3 q4 qc qr qd qm qm1 qm2 qm3 tr th1 th2 th3 th4 thr1 thr2 thr3 thr4 tc1 tc2 tc3 tc4 tcr1 tcr2 tcr3 tcr4 f fe ef erq esb x ex NEST +\TextType VerseText +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 + +\Marker wg +\Endmarker wg* +\Name wg...wg* - Peripheral Ref - Greek Wordlist Entry +\Description A Greek Wordlist text item +\OccursUnder ip im ipi imi ipq imq ipr iq iq1 iq2 iq3 io io1 io2 io3 io4 ms ms1 ms2 s s1 s2 s3 s4 cd sp d lh li li1 li2 li3 li4 lf lim lim1 lim2 lim3 lim4 m mi nb p pc ph phi pi pi1 pi2 pi3 pr pmo pm pmc pmr po q q1 q2 q3 q4 qc qr qd qm qm1 qm2 qm3 tr th1 th2 th3 th4 thr1 thr2 thr3 thr4 tc1 tc2 tc3 tc4 tcr1 tcr2 tcr3 tcr4 f fe ef erq esb x ex NEST +\TextType VerseText +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 + +\Marker wa +\Endmarker wa* +\Name wa...wa* - Peripheral Ref - Aramaic Wordlist Entry +\Description An Aramaic Wordlist text item +\OccursUnder ip im ipi imi ipq imq ipr iq iq1 iq2 iq3 io io1 io2 io3 io4 ms ms1 ms2 s s1 s2 s3 s4 cd sp d lh li li1 li2 li3 li4 lf lim lim1 lim2 lim3 lim4 m mi nb p pc ph phi pi pi1 pi2 pi3 pr pmo pm pmc pmr po q q1 q2 q3 q4 qc qr qd qm qm1 qm2 qm3 tr th1 th2 th3 th4 thr1 thr2 thr3 thr4 tc1 tc2 tc3 tc4 tcr1 tcr2 tcr3 tcr4 f fe ef erq esb x ex NEST +\TextType VerseText +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 + +\Marker ndx +\Endmarker ndx* +\Name ndx...ndx* - Peripheral Ref - Subject Index Entry +\Description A subject index text item +\OccursUnder ip im ipi imi ipq imq ipr iq iq1 iq2 iq3 io io1 io2 io3 io4 ms ms1 ms2 s s1 s2 s3 s4 cd sp d lh li li1 li2 li3 li4 lf lim lim1 lim2 lim3 lim4 m mi nb p pc ph phi pi pi1 pi2 pi3 pr pmo pm pmc pmr po q q1 q2 q3 q4 qc qr qd qm qm1 qm2 qm3 tr th1 th2 th3 th4 thr1 thr2 thr3 thr4 tc1 tc2 tc3 tc4 tcr1 tcr2 tcr3 tcr4 f fe ef erq esb x ex NEST +\TextType VerseText +\TextProperties publishable vernacular +\StyleType Character +\FontSize 12 + +# Peripheral Materials +# Content Division Marker + +\Marker periph +\Name periph - Peripherals - Content Division Marker +\Description Peripheral content division marker which should be followed by an additional division argument/title. +\TextType Section +\TextProperties paragraph publishable vernacular +\StyleType Paragraph +\FontSize 14 +\Bold +\SpaceBefore 16 +\SpaceAfter 4 +\Color 33023 +#!\ColorName orange + +# Additional peripheral material extensions to existing USFM markup. + +\Marker p1 +\Name p1 - Periph - Front/Back Matter Paragraph Level 1 +\Description Front or back matter text paragraph, level 1 (if multiple levels) +\OccursUnder id +\Rank 1 +\TextType Other +\TextProperties paragraph publishable vernacular +\StyleType Paragraph +\FontSize 12 +\FirstLineIndent .125 # 1/8 inch first line indent + +\Marker p2 +\Name p2 - Periph - Front/Back Matter Paragraph Level 2 +\Description Front or back matter text paragraph, level 2 (if multiple levels) +\OccursUnder id +\Rank 1 +\TextType Other +\TextProperties paragraph publishable vernacular +\StyleType Paragraph +\FontSize 12 +\FirstLineIndent .125 # 1/4 inch first line indent +\LeftMargin .125 + +\Marker k1 +\Name k1 - Periph - Concordance Keyword Level 1 +\Description Concordance main entry text or keyword, level 1 +\OccursUnder id +\Rank 1 +\TextType Other +\TextProperties paragraph publishable vernacular +\StyleType Paragraph +\FontSize 12 + +\Marker k2 +\Name k2 - Periph - Concordance Keyword Level 2 +\Description Concordance main entry text or keyword, level 2 +\OccursUnder id +\Rank 1 +\TextType Other +\TextProperties paragraph publishable vernacular +\StyleType Paragraph +\FontSize 12 + +\Marker xtSee +\Endmarker xtSee* +\Name xtSee - Concordance and Names Index - Alternate Entry Target Reference +\Description Concordance and Names Index markup for an alternate entry target reference. +\OccursUnder p +\TextProperties publishable vernacular +\TextType NoteText +\StyleType Character +\FontSize 12 +\Italic +\Color 16711680 +#!\ColorName highcon blue + +\Marker xtSeeAlso +\Endmarker xtSeeAlso* +\Name xtSeeAlso - Concordance and Names Index - Additional Entry Target Reference +\Description Concordance and Names Index markup for an additional entry target reference. +\OccursUnder p +\TextProperties publishable vernacular +\TextType Other +\StyleType Character +\FontSize 12 +\Italic +\Color 16711680 +#!\ColorName highcon blue + +# Milestones - these are not compatible with USFM2, so whole entries are preceded with #! + +#!\Marker qt-s +#!\Endmarker qt-e +#!\Name Quotation start/end milestone +#!\Description Quotation start/end milestone, level 1 (if single level) +#!\OccursUnder id +#!\StyleType Milestone +#!\Attributes ?who ?sid ?eid + +#!\Marker qt1-s +#!\Endmarker qt1-e +#!\Name Quotation start/end milestone - Level 1 +#!\Description Quotation start/end milestone, level 1 (if multiple levels) +#!\OccursUnder id +#!\StyleType Milestone +#!\Attributes ?who ?sid ?eid + +#!\Marker qt2-s +#!\Endmarker qt2-e +#!\Name Quotation start/end milestone - Level 2 +#!\Description Quotation start/end milestone, level 2 +#!\OccursUnder id +#!\StyleType Milestone +#!\Attributes ?who ?sid ?eid + +#!\Marker qt3-s +#!\Endmarker qt3-e +#!\Name Quotation start/end milestone - Level 3 +#!\Description Quotation start/end milestone, level 3 +#!\OccursUnder id +#!\StyleType Milestone +#!\Attributes ?who ?sid ?eid + +#!\Marker qt4-s +#!\Endmarker qt4-e +#!\Name Quotation start/end milestone - Level 4 +#!\Description Quotation start/end milestone, level 4 +#!\OccursUnder id +#!\StyleType Milestone +#!\Attributes ?who ?sid ?eid + +#!\Marker qt5-s +#!\Endmarker qt5-e +#!\Name Quotation start/end milestone - Level 5 +#!\Description Quotation start/end milestone, level 5 +#!\OccursUnder id +#!\StyleType Milestone +#!\Attributes ?who ?sid ?eid + +#!\Marker ts-s +#!\Endmarker ts-e +#!\Name Translator's section start/end milestone +#!\Description Translator's section start/end milestone +#!\OccursUnder id +#!\StyleType Milestone +#!\Attributes ?sid ?eid + +# Other special text elements specified in USFM +# ~ = fixed (no-break) space +# // = discretionary line break + +# Obsolete, deprecated, or no longer officially part of USFM. +# These markers may have existed in earlier resource and stylesheet revisions. + +\Marker ph +\Name DEPRECATED ph - Paragraph - Hanging Indent - Level 1 +\Description Paragraph text, with level 1 hanging indent (if single level) +\OccursUnder c +\Rank 4 +\TextType VerseText +\TextProperties paragraph publishable vernacular +\StyleType Paragraph +\LeftMargin .5 +\FirstLineIndent -.25 # 1/4 inch indent, 1/2 inch wrap +\FontSize 12 + +\Marker ph1 +\Name DEPRECATED ph1 - Paragraph - Hanging Indent - Level 1 +\Description Paragraph text, with level 1 hanging indent (if multiple levels) +\OccursUnder c +\Rank 4 +\TextType VerseText +\TextProperties paragraph publishable vernacular +\StyleType Paragraph +\LeftMargin .5 +\FirstLineIndent -.25 # 1/4 inch indent, 1/2 inch wrap +\FontSize 12 + +\Marker ph2 +\Name DEPRECATED ph2 - Paragraph - Hanging Indent - Level 2 +\Description Paragraph text, with level 2 hanging indent +\OccursUnder c +\Rank 4 +\TextType VerseText +\TextProperties paragraph publishable vernacular +\StyleType Paragraph +\LeftMargin .75 +\FirstLineIndent -.25 # 1/2 inch indent, 3/4 inch wrap +\FontSize 12 + +\Marker ph3 +\Name DEPRECATED ph3 - Paragraph - Hanging Indent - Level 3 +\Description Paragraph text, with level 3 hanging indent +\OccursUnder c +\Rank 4 +\TextType VerseText +\TextProperties paragraph publishable vernacular +\StyleType Paragraph +\LeftMargin 1 +\FirstLineIndent -.25 # 3/4 inch indent, 1 inch wrap +\FontSize 12 + +\Marker phi +\Name DEPRECATED phi - Paragraph - Indented - Hanging Indent +\Description Paragraph text, indented with hanging indent +\OccursUnder c +\Rank 4 +\TextType VerseText +\TextProperties paragraph publishable vernacular +\StyleType Paragraph +\LeftMargin 1 + +\Marker tr1 +\Name OBSOLETE tr1 - Table - Row - Level 1 +\Description A table Row +\OccursUnder c +\Rank 4 +\TextType VerseText +\TextProperties paragraph publishable vernacular +\StyleType Paragraph +\FontSize 12 +\LeftMargin .5 +\FirstLineIndent -.25 # 6/16 inch + +\Marker tr2 +\Name OBSOLETE tr2 - Table - Row - Level 2 +\Description A table Row +\OccursUnder c +\Rank 4 +\TextType VerseText +\TextProperties paragraph publishable vernacular +\StyleType Paragraph +\FontSize 12 +\LeftMargin .75 +\FirstLineIndent -.25 # 6/16 inch + +\Marker ps +\Name OBSOLETE ps - Paragraph - No Break with Next Paragraph +\Description Paragraph text, no break with next paragraph text at chapter boundary +\OccursUnder c +\Rank 4 +\TextType VerseText +\TextProperties paragraph publishable vernacular +\StyleType Paragraph +\FontSize 12 +\FirstLineIndent .125 # 1/8 inch first line indent + +\Marker psi +\Name OBSOLETE psi - Paragraph - Indented - No Break with Next +\Description Paragraph text, indented, with no break with next paragraph text (at chapter boundary) +\OccursUnder c +\Rank 4 +\TextType VerseText +\TextProperties paragraph publishable vernacular +\StyleType Paragraph +\FirstLineIndent .125 # 1/8 inch first line indent +\LeftMargin .25 +\RightMargin .25 +\FontSize 12 + +\Marker wr +\Endmarker wr* +\Name OBSOLETE wr...wr* - Auxiliary - Wordlist/Glossary Reference +\Description A Wordlist text item +\OccursUnder ms s li li1 li2 li3 li4 m mi nb p pc ph phi pi pi1 pi2 pi3 pr q q1 q2 q3 q4 qc qr tc1 tc2 tc3 tc4 f fe NEST +\TextProperties publishable vernacular +\TextType VerseText +\StyleType Character +\FontSize 12 +\Italic + +# 2.0x peripheral markup (replaced with \periph + Content Division Title/Argument) + +\Marker pub +\Name OBSOLETE pub Peripherals - Front Matter Publication Data +\Description Front matter publication data +\OccursUnder id +\Rank 4 +\TextProperties paragraph publishable vernacular poetic +\TextType VerseText +\FontSize 10 +\StyleType paragraph + +\Marker toc +\Name OBSOLETE toc Peripherals - Front Matter Table of Contents +\Description Front matter table of contents +\OccursUnder id +\Rank 4 +\TextProperties paragraph publishable vernacular poetic +\TextType VerseText +\FontSize 10 +\StyleType paragraph + +\Marker pref +\Name OBSOLETE pref Peripherals - Front Matter Preface +\Description Front matter preface +\OccursUnder id +\Rank 4 +\TextProperties paragraph publishable vernacular poetic +\TextType VerseText +\FontSize 10 +\StyleType paragraph + +\Marker intro +\Name OBSOLETE intro Peripherals - Front Matter Introduction +\Description Front matter introduction +\OccursUnder id +\Rank 4 +\TextProperties paragraph publishable vernacular poetic +\TextType VerseText +\FontSize 10 +\StyleType paragraph + +\Marker conc +\Name OBSOLETE conc Peripherals - Back Matter Concordance +\Description Back matter concordance +\OccursUnder id +\Rank 4 +\TextProperties paragraph publishable vernacular poetic +\TextType VerseText +\FontSize 10 +\StyleType paragraph + +\Marker glo +\Name OBSOLETE glo Peripherals - Back Matter Glossary +\Description Back matter glossary +\OccursUnder id +\Rank 4 +\TextProperties paragraph publishable vernacular poetic +\TextType VerseText +\FontSize 10 +\StyleType paragraph + +\Marker idx +\Name OBSOLETE idx Peripherals - Back Matter Index +\Description Back matter index +\OccursUnder id +\Rank 4 +\TextProperties paragraph publishable vernacular poetic +\TextType VerseText +\FontSize 10 +\StyleType paragraph + +\Marker maps +\Name OBSOLETE maps Peripherals - Back Matter Map Index +\Description Back matter map index +\OccursUnder id +\Rank 4 +\TextProperties paragraph publishable vernacular poetic +\TextType VerseText +\FontSize 10 +\StyleType paragraph + +\Marker cov +\Name OBSOLETE cov Peripherals - Other - Cover +\Description Other peripheral materials - cover +\OccursUnder id +\Rank 4 +\TextProperties paragraph publishable vernacular poetic +\TextType VerseText +\FontSize 10 +\StyleType paragraph + +\Marker spine +\Name OBSOLETE spine Peripherals - Other - Spine +\Description Other peripheral materials - spine +\OccursUnder id +\Rank 4 +\TextProperties paragraph publishable vernacular poetic +\TextType VerseText +\FontSize 10 +\StyleType paragraph + +\Marker pubinfo +\Name OBSOLETE pubinfo - Publication - Information +\Description Publication information - Lang,Credit,Version,Copies,Publisher,Id,Logo +\OccursUnder id ide +\TextType Other +\TextProperties paragraph nonpublishable nonvernacular +\StyleType Paragraph +\FontSize 12 +\Color 16711680 +#!\ColorName highcon blue + +# Concordance/Names Index Tools - special sfms for use in Publishing Assistant + +\Marker zpa-xb +\Endmarker zpa-xb* +\Name zpa-xb - Periph - Book +\Description Book Ref +\OccursUnder id +\Rank 1 +\TextType VerseText +\TextProperties paragraph publishable vernacular +\StyleType Character +\FontSize 12 + +\Marker zpa-xc +\Endmarker zpa-xc* +\Name zpa-xc - Periph - Chapter +\Description Chapter Ref +\OccursUnder id +\Rank 1 +\TextType VerseText +\TextProperties paragraph publishable vernacular +\StyleType Character +\FontSize 12 +\Bold + +\Marker zpa-xv +\Endmarker zpa-xv* +\Name zpa-xv - Periph - Verse +\Description Verse Ref +\OccursUnder id +\Rank 1 +\TextType VerseText +\TextProperties paragraph publishable vernacular +\StyleType Character +\FontSize 12 + +\Marker zpa-d +\Endmarker zpa-d* +\Name zpa-d - Periph - Description +\Description Description +\OccursUnder id +\Rank 1 +\TextType VerseText +\TextProperties paragraph publishable vernacular +\StyleType Character +\FontSize 12 diff --git a/src/index.ts b/src/index.ts index 0a7939e..38b7e52 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,31 +1,6 @@ -export { createRange, Range } from './annotations/range'; -export { hasSentenceEnding, toSentenceCase } from './string-utils'; -export { Detokenizer } from './tokenization/detokenizer'; -export { LatinSentenceTokenizer } from './tokenization/latin-sentence-tokenizer'; -export { LatinWordDetokenizer } from './tokenization/latin-word-detokenizer'; -export { LatinWordTokenizer } from './tokenization/latin-word-tokenizer'; -export { LineSegmentTokenizer } from './tokenization/line-segment-tokenizer'; -export { RangeTokenizer } from './tokenization/range-tokenizer'; -export { Tokenizer } from './tokenization/tokenizer'; -export { WHITESPACE_DETOKENIZER, WhitespaceDetokenizer } from './tokenization/whitespace-detokenizer'; -export { WHITESPACE_TOKENIZER, WhitespaceTokenizer } from './tokenization/whitespace-tokenizer'; -export { ZwspWordDetokenizer } from './tokenization/zwsp-word-detokenizer'; -export { ZwspWordTokenizer } from './tokenization/zwsp-word-tokenizer'; -export { MAX_SEGMENT_LENGTH } from './translation/constants'; -export { ErrorCorrectionModel } from './translation/error-correction-model'; -export { InteractiveTranslationEngine } from './translation/interactive-translation-engine'; -export { InteractiveTranslator } from './translation/interactive-translator'; -export { InteractiveTranslatorFactory } from './translation/interactive-translator-factory'; -export { Phrase } from './translation/phrase'; -export { PhraseInfo } from './translation/phrase-info'; -export { PhraseTranslationSuggester } from './translation/phrase-translation-suggester'; -export { ProgressStatus } from './translation/progress-status'; -export { TranslationEngine } from './translation/translation-engine'; -export { TranslationResult } from './translation/translation-result'; -export { TranslationResultBuilder } from './translation/translation-result-builder'; -export { TranslationSources } from './translation/translation-sources'; -export { TranslationSuggester } from './translation/translation-suggester'; -export { TranslationSuggestion } from './translation/translation-suggestion'; -export { WordAlignmentMatrix } from './translation/word-alignment-matrix'; -export { INITIAL_STATE, WordGraph } from './translation/word-graph'; -export { WordGraphArc } from './translation/word-graph-arc'; +export * from './annotations'; +export * from './corpora'; +export * from './statistics'; +export * from './string-utils'; +export * from './tokenization'; +export * from './translation'; diff --git a/src/iterable-utils.ts b/src/iterable-utils.ts index 2d9b568..080102b 100644 --- a/src/iterable-utils.ts +++ b/src/iterable-utils.ts @@ -1,12 +1,21 @@ -export function all(items: Iterable, predicate: (item: T) => boolean): boolean { +export function all(items: Iterable, predicate?: (item: T) => boolean): boolean { for (const item of items) { - if (!predicate(item)) { + if (predicate != null && !predicate(item)) { return false; } } return true; } +export function any(items: Iterable, predicate?: (item: T) => boolean): boolean { + for (const item of items) { + if (predicate == null || predicate(item)) { + return true; + } + } + return false; +} + export function* concat(items1: Iterable, items2: Iterable): IterableIterator { yield* items1; yield* items2; @@ -19,6 +28,14 @@ export function* map(items: Iterable, selector: (item: T1) => T2): I } export function first(items: Iterable, selector?: (item: T) => boolean): T { + const item: T | undefined = firstOrUndefined(items, selector); + if (item != null) { + return item; + } + throw new Error('The collection does not contain any items.'); +} + +export function firstOrUndefined(items: Iterable, selector?: (item: T) => boolean): T | undefined { for (const item of items) { if (selector != null) { if (selector(item)) { @@ -28,17 +45,43 @@ export function first(items: Iterable, selector?: (item: T) => boolean): T return item; } } +} + +export function last(items: Iterable, selector?: (item: T) => boolean): T { + const item: T | undefined = lastOrUndefined(items, selector); + if (item != null) { + return item; + } throw new Error('The collection does not contain any items.'); } -export function firstOrUndefined(items: Iterable, selector?: (item: T) => boolean): T | undefined { - for (const item of items) { - if (selector != null) { - if (selector(item)) { +export function lastOrUndefined(items: Iterable, selector?: (item: T) => boolean): T | undefined { + if (Array.isArray(items)) { + const array = items as T[]; + for (let i = array.length - 1; i >= 0; i--) { + const item = array[i]; + if (selector != null) { + if (selector(item)) { + return item; + } + } else { return item; } - } else { - return item; + } + } else { + let lastItem: T | undefined = undefined; + for (const item of items) { + if (selector != null) { + if (selector(item)) { + lastItem = item; + } + } else { + lastItem = item; + } + } + + if (lastItem != null) { + return lastItem; } } } diff --git a/src/statistics/index.ts b/src/statistics/index.ts new file mode 100644 index 0000000..79c1b28 --- /dev/null +++ b/src/statistics/index.ts @@ -0,0 +1 @@ +export { LOG_ONE, LOG_ZERO, logAdd, logDivide, logMultiply, toLogSpace, toStandardSpace } from './log-space'; diff --git a/src/tokenization/index.ts b/src/tokenization/index.ts new file mode 100644 index 0000000..cf4a58c --- /dev/null +++ b/src/tokenization/index.ts @@ -0,0 +1,11 @@ +export { Detokenizer } from './detokenizer'; +export { LatinSentenceTokenizer } from './latin-sentence-tokenizer'; +export { LatinWordDetokenizer } from './latin-word-detokenizer'; +export { LatinWordTokenizer } from './latin-word-tokenizer'; +export { LineSegmentTokenizer } from './line-segment-tokenizer'; +export { RangeTokenizer } from './range-tokenizer'; +export { Tokenizer } from './tokenizer'; +export { WHITESPACE_DETOKENIZER, WhitespaceDetokenizer } from './whitespace-detokenizer'; +export { WHITESPACE_TOKENIZER, WhitespaceTokenizer } from './whitespace-tokenizer'; +export { ZwspWordDetokenizer } from './zwsp-word-detokenizer'; +export { ZwspWordTokenizer } from './zwsp-word-tokenizer'; diff --git a/src/translation/index.ts b/src/translation/index.ts new file mode 100644 index 0000000..3f20f75 --- /dev/null +++ b/src/translation/index.ts @@ -0,0 +1,18 @@ +export { MAX_SEGMENT_LENGTH } from './constants'; +export { ErrorCorrectionModel } from './error-correction-model'; +export { InteractiveTranslationEngine } from './interactive-translation-engine'; +export { InteractiveTranslator } from './interactive-translator'; +export { InteractiveTranslatorFactory } from './interactive-translator-factory'; +export { Phrase } from './phrase'; +export { PhraseInfo } from './phrase-info'; +export { PhraseTranslationSuggester } from './phrase-translation-suggester'; +export { ProgressStatus } from './progress-status'; +export { TranslationEngine } from './translation-engine'; +export { TranslationResult } from './translation-result'; +export { TranslationResultBuilder } from './translation-result-builder'; +export { TranslationSources } from './translation-sources'; +export { TranslationSuggester } from './translation-suggester'; +export { TranslationSuggestion } from './translation-suggestion'; +export { WordAlignmentMatrix } from './word-alignment-matrix'; +export { INITIAL_STATE, WordGraph } from './word-graph'; +export { WordGraphArc } from './word-graph-arc'; diff --git a/tsconfig.build.json b/tsconfig.build.json index 837de28..5db0cef 100644 --- a/tsconfig.build.json +++ b/tsconfig.build.json @@ -1,9 +1,5 @@ { "extends": "./tsconfig.json", - "compilerOptions": { - "declaration": true, - "outDir": "./lib" - }, "include": ["src"], "exclude": ["**/*.test.ts", "node_modules"] } diff --git a/tsconfig.json b/tsconfig.json index 962967e..eba0ff8 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -4,6 +4,8 @@ "moduleResolution": "Node", "module": "ES2015", "strict": true, + "declaration": true, + "sourceMap": true, "esModuleInterop": true, "lib": ["ES2017", "DOM", "ES2018.Regexp"], "skipLibCheck": true, diff --git a/tsup.config.js b/tsup.config.js new file mode 100644 index 0000000..12f9095 --- /dev/null +++ b/tsup.config.js @@ -0,0 +1,13 @@ +import { defineConfig } from 'tsup'; +import { fixImportsPlugin } from 'esbuild-fix-imports-plugin'; + +export default defineConfig({ + entry: ['src/**/*.ts', '!src/**/*.test.ts', '!src/**/test-helpers.ts'], + dts: true, + clean: true, + format: ['esm', 'cjs'], + tsconfig: 'tsconfig.build.json', + bundle: false, + sourcemap: false, + esbuildPlugins: [fixImportsPlugin()], +});