Verbatim-safe typography, ^-punctuation quoting, full-range ^UUUU^, polyglot html

Typographic transforms (---, quote pairs, ~) no longer touch verbatim
text: @c/@code/@source_listing content and ^'...'^ spans show exactly the
characters written. "^" before any punctuation character quotes it in
every target (the apostrophe excepted: ^' opens a literal span), with the
new :resolve option on @@@target declaring per-target renderings. The
^UUUU^ code-point form accepts 4-6 hex digits, the full Unicode range.
The html output and transform spellings are polyglot (XML-valid), in
preparation for an EPUB target. New suites: transform_test, character_test
(engine), typography_test (SKS).

(from dev 07ce5ea86a0a)
This commit is contained in:
2026-08-23 20:48:26 +02:00
parent d982c0d6cc
commit 37b6ba1c4f
77 changed files with 1665 additions and 1608 deletions

View File

@@ -11,11 +11,10 @@ inline std::string command_pathname { "Pathname of command executed on the comma
class Error : std::exception {
public:
Error(const std::string& error_type, const std::string& description,
const Locator& locator = Locator(), bool do_justify = true)
const Locator& locator = Locator())
: m_type(error_type)
, m_desc(description)
, m_loc(locator)
, m_just(do_justify)
{}
void print_message(const std::string& epilog="");
@@ -23,57 +22,56 @@ public:
std::string m_type {};
std::string m_desc {};
Locator m_loc; // {};
bool m_just { true };
};
class Parsing_error : public Error {
public:
explicit Parsing_error(
const std::string& description, const Locator& locator=Locator(), bool do_justify=true)
: Error("parsing", description, locator, do_justify) {};
const std::string& description, const Locator& locator=Locator())
: Error("parsing", description, locator) {};
};
class File_error : public Error {
public:
explicit File_error(
const std::string& description, const Locator& locator=Locator(), bool do_justify=true)
: Error("file", description, locator, do_justify) {};
const std::string& description, const Locator& locator=Locator())
: Error("file", description, locator) {};
};
class Target_error : public Error {
public:
explicit Target_error(
const std::string& description, const Locator& locator=Locator(), bool do_justify=true)
: Error("target", description, locator, do_justify) {};
const std::string& description, const Locator& locator=Locator())
: Error("target", description, locator) {};
};
class Klammerset_error : public Error {
public:
explicit Klammerset_error(
const std::string& description, const Locator& locator=Locator(), bool do_justify=true)
: Error("klammerset", description, locator, do_justify) {};
const std::string& description, const Locator& locator=Locator())
: Error("klammerset", description, locator) {};
};
class Definition_error : public Error {
public:
explicit Definition_error(
const std::string& description, const Locator& locator=Locator(), bool do_justify=true)
: Error("definition", description, locator, do_justify) {};
const std::string& description, const Locator& locator=Locator())
: Error("definition", description, locator) {};
};
class Argument_error : public Error {
public:
explicit Argument_error(
const std::string& description, const Locator& locator=Locator(), bool do_justify=true)
: Error("argument", description, locator, do_justify) {};
const std::string& description, const Locator& locator=Locator())
: Error("argument", description, locator) {};
};
class Environment_error : public Error {
public:
explicit Environment_error(
const std::string& description, const Locator& locator=Locator(), bool do_justify=true)
: Error("environment", description, locator, do_justify) {};
const std::string& description, const Locator& locator=Locator())
: Error("environment", description, locator) {};
};
// Klammer application nested deeper than the engine's limit. Raised by the
@@ -83,13 +81,13 @@ public:
class Recursion_error : public Error {
public:
explicit Recursion_error(
const std::string& description, const Locator& locator=Locator(), bool do_justify=true)
: Error("recursion", description, locator, do_justify) {};
const std::string& description, const Locator& locator=Locator())
: Error("recursion", description, locator) {};
};
class Internal_error : public Error {
public:
explicit Internal_error(
const std::string& description, const Locator& locator=Locator(), bool do_justify=true)
: Error("internal", description, locator, do_justify) {};
const std::string& description, const Locator& locator=Locator())
: Error("internal", description, locator) {};
};