New Upstream Release - txt2tags

Ready changes

Summary

Merged new upstream version: 3.8 (was: 3.4).

Resulting package

Built on 2023-05-26T17:45 (took 5m12s)

The resulting binary packages can be installed (if you have the apt repository enabled) by running one of:

apt install -t fresh-releases txt2tags

Lintian Result

Diff

diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md
new file mode 100644
index 0000000..af80967
--- /dev/null
+++ b/.github/PULL_REQUEST_TEMPLATE.md
@@ -0,0 +1,15 @@
+<!--- Provide a general summary of your changes in the Title above -->
+
+## Description
+<!--- Describe your changes in detail -->
+
+## Related Issue
+<!--- Ideally, new features and changes are discussed in an issue first. -->
+<!--- If there is a corresponding issue, link to it here. Otherwise, remove this section. -->
+
+## Checklist:
+<!--- Go over the following points, and put an `x` into all boxes that apply. -->
+
+- [ ] I have updated the documentation in the README.md file or my changes don't require an update.
+- [ ] I have added an entry in CHANGELOG.md.
+- [ ] I have added or adapted tests to cover my changes.
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
new file mode 100644
index 0000000..379a1a8
--- /dev/null
+++ b/.github/workflows/main.yml
@@ -0,0 +1,48 @@
+name: CI
+
+on:
+  push:
+    branches: [ v3 ]
+  pull_request:
+    branches: [ v3 ]
+
+jobs:
+  test:
+    runs-on: ${{ matrix.os }}
+    strategy:
+      fail-fast: false
+      matrix:
+        python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
+        os: [macos-latest, ubuntu-latest]
+
+    steps:
+    - name: Checkout code
+      uses: actions/checkout@v3
+
+    - name: Set up Python ${{ matrix.python-version }}
+      uses: actions/setup-python@v4
+      with:
+        python-version: ${{ matrix.python-version }}
+
+    - name: Install dependencies
+      run: |
+        python -m pip install --upgrade pip
+        python -m pip install --upgrade setuptools tox wheel
+
+    - name: Build wheel
+      run: python setup.py bdist_wheel
+
+    - name: Install from wheel
+      run: "python -m pip install --only-binary=:all: ./dist/txt2tags-*.whl"
+
+    - name: Run
+      run: |
+        txt2tags -t html samples/sample.t2t
+        python -m txt2tags -t html samples/sample.t2t
+
+    - name: Run tests
+      run: python -m tox -e py
+
+    - name: Check for style issues
+      if: ${{ matrix.python-version == 3.11 && matrix.os == 'ubuntu-latest' }}
+      run: python -m tox -e style
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index 96a071d..0000000
--- a/.travis.yml
+++ /dev/null
@@ -1,17 +0,0 @@
-language: python
-
-matrix:
-  include:
-  - python: "pypy"
-  - python: "pypy3"
-  - python: "2.7"
-  - python: "3.5"
-  - python: "3.6"
-  - python: "3.7"
-  - python: "3.8"
-install:
-  - pip install tox
-script:
-  - python --version
-  - tox -e py
-  - if [ "$TRAVIS_PYTHON_VERSION" == "3.6" ]; then tox -e style; fi
diff --git a/CHANGELOG.md b/CHANGELOG.md
index defcc54..d18e7be 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,9 +1,43 @@
-# Version 3.4 (2019-12-25)
+# 3.8 (2023-02-17)
+
+* Raise minimum supported Python version to 3.7 (Jendrik Seipp).
+* Add continuous integration tests for Python 3.10 and 3.11 (Jendrik Seipp).
+* Add ConTeXt target (#224, @goetzschnell).
+* Fix W3C validator warnings (#225, @goetzschnell).
+* Don't use \multicolumn for single LaTeX table cells (Jendrik Seipp).
+* Fix LaTeX escapes (#244, @ThexXTURBOXx).
+* Use correct table title separators for Markdown target (#243, @db-inf).
+
+# 3.7 (2020-02-10)
+
+* Make CSS style prettier (Jendrik Seipp).
+* Remove `--toc-only` and `--toc-level` options (Jendrik Seipp).
+* Remove `--mask-email` option (Jendrik Seipp).
+* Polish help text (Jendrik Seipp).
+
+# 3.6 (2020-02-05)
+
+* Escape underscores in Latex headers (Jendrik Seipp).
+* Don't center Latex tables (Jendrik Seipp).
+* Use booktabs package for prettier Latex tables (Jendrik Seipp).
+* Use normal font for Latex table headers (Jendrik Seipp).
+* Remove `--dump-config` and `--dump-source` options (Jendrik Seipp).
+* Remove txt2tags version from output. (Jendrik Seipp).
+* Remove support for multiple input files (Jendrik Seipp).
+
+# 3.5 (2020-02-01)
+
+* Add Markdown target (Eric Forgeot, #213).
+* Drop `--encoding` option and always use UTF-8. Files in other encodings are not supported anymore (Jendrik Seipp, Aurelio Jargas, #221).
+* Show the original error message when a file read/write operation fails (Aurelio Jargas, #216 #217).
+* Improve the exception handling when reading input data from files and from stdin (Aurelio Jargas, #218 #219).
+
+# 3.4 (2019-12-25)
 
 * Remove macros (Jendrik Seipp).
 * Fix MoinMoin URL and email syntax (Jendrik Seipp).
 
-# Version 3.3 (2019-11-04)
+# 3.3 (2019-11-04)
 
 * Update html target to HTML5 and drop xhtml target (Jendrik Seipp).
 * Remove ASCII art and PageMaker targets (Jendrik Seipp).
@@ -20,551 +54,545 @@
 * Fold sample tests into main test suite (Jendrik Seipp).
 * Explain how to install txt2tags with pipx in README file (Jendrik Seipp).
 
-# Version 3.2 (2019-10-30)
-
- * Remove GUI (Jendrik Seipp).
- * Rename txt2tags to txt2tags.py (Jendrik Seipp).
- * Add setup.py file (Jendrik Seipp).
- * Upload txt2tags to PyPI (Jendrik Seipp).
-
-# Version 3.1 (2019-10-29)
-
- * Check code format with black (Jendrik Seipp).
- * Correctly compute title length under Python 3 for txt target (Jendrik Seipp).
- * Update and continuously check Python sample scripts under samples/module (Jendrik Seipp).
- * Check that sample file is converted to all targets correctly in CI (Jendrik Seipp).
- * lout: fix email markup (Martin Michel, backported by Jendrik Seipp).
- * man: fix closing lists (Matteo Cypriani, backported by Jendrik Seipp).
- * Improve table regex (Aurelio Jargas, backported by Jendrik Seipp).
- * man: fix extra line (Nicolas Delvaux, backported by Jendrik Seipp).
- * Improve comments inside doHeader() (Aurelio Jargas, backported by Jendrik Seipp).
- * Don't list targets manually (Aurelio Jargas, backported by Jendrik Seipp).
- * Canonicalize paths before checking whether input and output files match (Jason Seeley, backported by Jendrik Seipp).
-
-# Version 3.0 (2019-10-21)
-
- * Convert changelog file to Markdown (Jendrik Seipp).
- * Add travis-ci config file (Jendrik Seipp).
- * Add tox.ini file for testing multiple Python versions (Jendrik Seipp).
- * Reformat test suite with black (Jendrik Seipp).
- * Support running test suite under Python 3 (Jendrik Seipp).
- * Fix and refactor tests (Jendrik Seipp).
- * Add support for SVG images (Jendrik Seipp).
- * Don't escape underscores in tagged and raw LaTeX text (Jendrik Seipp).
- * Support Python 3 (Jendrik Seipp).
- * Use spaces instead of tabs (Jendrik Seipp).
-
-# Version 2.6 (2010-11-05)
-
- * New target: art (ASCII Art). (Florent Gallaire)
- * New target: adoc (AsciiDoc). (Neil Voss)
- * New target: creole (Creole 1.0). (Eric Forgeot)
- * New target: dbk (DocBook). (David Hajage)
- * New target: pmw (PmWiki). (Ritesh Sood)
-
- * New mark: `''tagged''` for inline tagged text.
- * New mark: `'''` for blocks of tagged text.
-
- * New option: `--targets` to list all the available targets.
- * New option: `--slides` to format output as presentation slides (-t art). (Florent Gallaire)
- * New option: `--width` to set the document's width (used by -t art). (Florent Gallaire)
- * New option: `--height` to set the document's height (used by -t art). (Florent Gallaire)
- * New option: `--art-chars` to set the ASCII Art decorations. (Florent Gallaire)
- * New options (turn off): `--no-slides`, `--no-targets`.
-
- * New command: `%!csv` to include an external CSV file as a table. (Florent Gallaire)
-
- * HTML/XHTML: Removed those random `<P></P>` that used to appear on the output.
- * HTML: Headers changed to avoid orphan tags when not using `--css-sugar`. (Thomas Hafner)
- * HTML: Removed `id="toc"` from the toc DIV, but `class="toc"` still remains.
- * LaTeX: New compact lists with no paragraph breaks between items. (Mark White)
- * LaTeX: Added column span and cell alignment to tables. (Mark White)
- * LaTeX: UTF-8 encoding is now correctly set as `utf8` instead `utf-8`. (Aad Mathijssen)
- * Lout: Removed list indent to avoid gaps in text. (Barrie Stott)
- * Lout: Now paragraphs are allowed inside lists. (Barrie Stott)
- * Man: Removed indentation in verbatim blocks.
-
- * i18n: Sample files converted to UTF-8.
- * i18n: Manual Pages converted to UTF-8.
- * i18n: All .po files converted to UTF-8.
- * i18n: Added po/tools folder and po/stats.txt file.
- * i18n: Added Basque translations. (Ales Zabala Alava)
- * i18n: Added Ukrainian translations. (Bunyk Taras)
- * Docs: the Manual Page was rewritten: now a reference not a guide.
- * Docs: Markup Demo, Sample File, Manual Page translated to Basque. (Ales Zabala Alava)
- * Docs: User Guide translated to Chinese (simplified). (Chris Leng)
- * Docs: Sample File translated to Ukrainian. (Bunyk Taras)
-
- * extras: Added syntax files for JOE, "ne", "le" text editors. (Stefano D'Archino)
- * extras: Added a txt2tags markup set for markItUp! (Florent Gallaire)
- * extras: Added "dynartslides", a script to generate art slides dynamically. (Florent Gallaire)
- * extras: Added the Cookbook to use txt2tags markup in a PmWiki website. (Eric Forgeot)
- * extras: t2tmake.rb: Now compatible with ruby 1.9. (Lucas Buchala)
- * extras: Improved txt2tags.vim, unhtml.vim and txt2tagsrc files.
- * extras: Removed TextMate Bundle, it's already available at TextMate's SVN.
-
- * PHP Web interface improved: targets in alphabetical order, new $dfttarget.
- * Blank lines were added/removed to improve the generated code of all targets.
- * No more several blank lines at the end of the document.
- * Raw and tagged blocks are allowed inside paragraphs, they don't close it. (Kruzslicz Ferenc)
- * If called with no arguments, don't load the Gui. Must use `--gui` to load it.
- * The ":" char is now allowed in the query component of a URI (link). (sphaira, Chris lavabit)
- * Added TOC formatting example in samples/module/module-body.py file. (Jendrik Seipp)
- * Test-suite: 256 tests. New modules: art, csv, include, includeconf, sample.
- * Improved some error messages. (Leo Rosa)
- * Raise error when using `(target)` in `%!target` and `%!includeconf`.
- * The program code is now cleaner/safer with the help of `pychecker`.
- * Removed string module import: using `foo.upper()` instead `string.upper(foo)`.
- * Bugfix: Now `-C`,`--config-file` respects `(target)` in the config file settings. (Emmanuel Godard)
- * Bugfix: Now inline verbatim, raw and tagged marks are really mutually
-exclusive. No marks are interpreted inside them.
-
- * **IMPORTANT:** This release requires Python 2.2 or newer. The only exception
-is the new %!csv command that requires Python 2.3 or newer.
-
- * New website: http://txt2tags.org - Thanks Florent Gallaire for the domain!
-
- * This release was sponsored by Rubens Queiroz de Almeida.
-
-# Version 2.5 (2008-07-26)
-
- * New target: wiki (Wikipedia) (Eric Forgeot @ .fr for the idea)
- * New target: gwiki (Google Code Wiki)
- * New target: doku (DokuWiki) (Joerg Desch)
- * New mark `--` for ~~strikeout~~ text, currently implemented for:
-html, xhtml, tex, wiki, gwiki, doku, moin
- * New document: How to add a new target to txt2tags
- * New tools: TextMate bundle, Gedit language file, gensite program
-(see 'extras' folder)
-
- * Improved Unicode (UTF-8) support
- * PHP Web interface rewrote: now configurable, clean and modular
- * Moin target improved: added support for definition list and strong line
- * LaTeX target improved: Added support for anchors and local links
- * Lout target improved: Added support for anchors in titles
- * Added PreProc sample on the samples/module/module-body.py file
-
- * i18n: Added Finnish translations (Mikko J Piippo)
- * Docs: Sample file translated to Finnish (Mikko J Piippo)
- * Docs: Man Page translated to Chinese (Abby Pan)
- * Docs: Portuguese Man Page updated
-
- * Bugfix: Fixed title underline length on txt target for UTF-8 files (Jan Rejlek)
- * Bugfix: Fixed fatal error on sources files with UTF-8 encoding (Miguel Filho)
-
- * **IMPORTANT:** Txt2tags is not compatible with old Python 1.5.2 anymore,
-because Unicode strings were added in Python 2.0. If your Python is
-older than 2.0, please use txt2tags version 2.4.
-
- * This release was sponsored by Dmitri Popov.
-
-# Version 2.4 (2006-12-24)
-
- * New mark `%%%` for commented blocks (Leo Rosa)
- * The Style config now may be used multiple times
- * Different list types on the same indent now forces previous to close
- * Empty anchor is now part of a link (i.e. foo.html#) (Fabiano Engler)
- * tex: Default headers cleanup, now it's minimalist
- * tex: Now limiting the maximum quote depth to six
- * tex: User-defined styles now overwrite default formatting on headers
- * (x)html: New header comment showing the CSS file path, when using
+# 3.2 (2019-10-30)
+
+* Remove GUI (Jendrik Seipp).
+* Rename txt2tags to txt2tags.py (Jendrik Seipp).
+* Add setup.py file (Jendrik Seipp).
+* Upload txt2tags to PyPI (Jendrik Seipp).
+
+# 3.1 (2019-10-29)
+
+* Check code format with black (Jendrik Seipp).
+* Correctly compute title length under Python 3 for txt target (Jendrik Seipp).
+* Update and continuously check Python sample scripts under samples/module (Jendrik Seipp).
+* Check that sample file is converted to all targets correctly in CI (Jendrik Seipp).
+* lout: fix email markup (Martin Michel, backported by Jendrik Seipp).
+* man: fix closing lists (Matteo Cypriani, backported by Jendrik Seipp).
+* Improve table regex (Aurelio Jargas, backported by Jendrik Seipp).
+* man: fix extra line (Nicolas Delvaux, backported by Jendrik Seipp).
+* Improve comments inside doHeader() (Aurelio Jargas, backported by Jendrik Seipp).
+* Don't list targets manually (Aurelio Jargas, backported by Jendrik Seipp).
+* Canonicalize paths before checking whether input and output files match (Jason Seeley, backported by Jendrik Seipp).
+
+# 3.0 (2019-10-21)
+
+* Convert changelog file to Markdown (Jendrik Seipp).
+* Add travis-ci config file (Jendrik Seipp).
+* Add tox.ini file for testing multiple Python versions (Jendrik Seipp).
+* Reformat test suite with black (Jendrik Seipp).
+* Support running test suite under Python 3 (Jendrik Seipp).
+* Fix and refactor tests (Jendrik Seipp).
+* Add support for SVG images (Jendrik Seipp).
+* Don't escape underscores in tagged and raw LaTeX text (Jendrik Seipp).
+* Support Python 3 (Jendrik Seipp).
+* Use spaces instead of tabs (Jendrik Seipp).
+
+# 2.6 (2010-11-05)
+
+* New target: art (ASCII Art). (Florent Gallaire)
+* New target: adoc (AsciiDoc). (Neil Voss)
+* New target: creole (Creole 1.0). (Eric Forgeot)
+* New target: dbk (DocBook). (David Hajage)
+* New target: pmw (PmWiki). (Ritesh Sood)
+
+* New mark: `''tagged''` for inline tagged text.
+* New mark: `'''` for blocks of tagged text.
+
+* New option: `--targets` to list all the available targets.
+* New option: `--slides` to format output as presentation slides (-t art). (Florent Gallaire)
+* New option: `--width` to set the document's width (used by -t art). (Florent Gallaire)
+* New option: `--height` to set the document's height (used by -t art). (Florent Gallaire)
+* New option: `--art-chars` to set the ASCII Art decorations. (Florent Gallaire)
+* New options (turn off): `--no-slides`, `--no-targets`.
+
+* New command: `%!csv` to include an external CSV file as a table. (Florent Gallaire)
+
+* HTML/XHTML: Removed those random `<P></P>` that used to appear on the output.
+* HTML: Headers changed to avoid orphan tags when not using `--css-sugar`. (Thomas Hafner)
+* HTML: Removed `id="toc"` from the toc DIV, but `class="toc"` still remains.
+* LaTeX: New compact lists with no paragraph breaks between items. (Mark White)
+* LaTeX: Added column span and cell alignment to tables. (Mark White)
+* LaTeX: UTF-8 encoding is now correctly set as `utf8` instead `utf-8`. (Aad Mathijssen)
+* Lout: Removed list indent to avoid gaps in text. (Barrie Stott)
+* Lout: Now paragraphs are allowed inside lists. (Barrie Stott)
+* Man: Removed indentation in verbatim blocks.
+
+* i18n: Sample files converted to UTF-8.
+* i18n: Manual Pages converted to UTF-8.
+* i18n: All .po files converted to UTF-8.
+* i18n: Added po/tools folder and po/stats.txt file.
+* i18n: Added Basque translations. (Ales Zabala Alava)
+* i18n: Added Ukrainian translations. (Bunyk Taras)
+* Docs: the Manual Page was rewritten: now a reference not a guide.
+* Docs: Markup Demo, Sample File, Manual Page translated to Basque. (Ales Zabala Alava)
+* Docs: User Guide translated to Chinese (simplified). (Chris Leng)
+* Docs: Sample File translated to Ukrainian. (Bunyk Taras)
+
+* extras: Added syntax files for JOE, "ne", "le" text editors. (Stefano D'Archino)
+* extras: Added a txt2tags markup set for markItUp! (Florent Gallaire)
+* extras: Added "dynartslides", a script to generate art slides dynamically. (Florent Gallaire)
+* extras: Added the Cookbook to use txt2tags markup in a PmWiki website. (Eric Forgeot)
+* extras: t2tmake.rb: Now compatible with ruby 1.9. (Lucas Buchala)
+* extras: Improved txt2tags.vim, unhtml.vim and txt2tagsrc files.
+* extras: Removed TextMate Bundle, it's already available at TextMate's SVN.
+
+* PHP Web interface improved: targets in alphabetical order, new $dfttarget.
+* Blank lines were added/removed to improve the generated code of all targets.
+* No more several blank lines at the end of the document.
+* Raw and tagged blocks are allowed inside paragraphs, they don't close it. (Kruzslicz Ferenc)
+* If called with no arguments, don't load the Gui. Must use `--gui` to load it.
+* The ":" char is now allowed in the query component of a URI (link). (sphaira, Chris lavabit)
+* Added TOC formatting example in samples/module/module-body.py file. (Jendrik Seipp)
+* Test-suite: 256 tests. New modules: art, csv, include, includeconf, sample.
+* Improved some error messages. (Leo Rosa)
+* Raise error when using `(target)` in `%!target` and `%!includeconf`.
+* The program code is now cleaner/safer with the help of `pychecker`.
+* Removed string module import: using `foo.upper()` instead `string.upper(foo)`.
+* Bugfix: Now `-C`,`--config-file` respects `(target)` in the config file settings. (Emmanuel Godard)
+* Bugfix: Now inline verbatim, raw and tagged marks are really mutually
+  exclusive. No marks are interpreted inside them.
+
+* **IMPORTANT:** This release requires Python 2.2 or newer. The only exception
+  is the new %!csv command that requires Python 2.3 or newer.
+
+* New website: http://txt2tags.org - Thanks Florent Gallaire for the domain!
+
+* This release was sponsored by Rubens Queiroz de Almeida.
+
+# 2.5 (2008-07-26)
+
+* New target: wiki (Wikipedia) (Eric Forgeot @ .fr for the idea)
+* New target: gwiki (Google Code Wiki)
+* New target: doku (DokuWiki) (Joerg Desch)
+* New mark `--` for ~~strikeout~~ text, currently implemented for:
+  html, xhtml, tex, wiki, gwiki, doku, moin
+* New document: How to add a new target to txt2tags
+* New tools: TextMate bundle, Gedit language file, gensite program
+  (see 'extras' folder)
+
+* Improved Unicode (UTF-8) support
+* PHP Web interface rewrote: now configurable, clean and modular
+* Moin target improved: added support for definition list and strong line
+* LaTeX target improved: Added support for anchors and local links
+* Lout target improved: Added support for anchors in titles
+* Added PreProc sample on the samples/module/module-body.py file
+
+* i18n: Added Finnish translations (Mikko J Piippo)
+* Docs: Sample file translated to Finnish (Mikko J Piippo)
+* Docs: Man Page translated to Chinese (Abby Pan)
+* Docs: Portuguese Man Page updated
+
+* Bugfix: Fixed title underline length on txt target for UTF-8 files (Jan Rejlek)
+* Bugfix: Fixed fatal error on sources files with UTF-8 encoding (Miguel Filho)
+
+* **IMPORTANT:** Txt2tags is not compatible with old Python 1.5.2 anymore,
+  because Unicode strings were added in Python 2.0. If your Python is
+  older than 2.0, please use txt2tags version 2.4.
+
+* This release was sponsored by Dmitri Popov.
+
+# 2.4 (2006-12-24)
+
+* New mark `%%%` for commented blocks (Leo Rosa)
+* The Style config now may be used multiple times
+* Different list types on the same indent now forces previous to close
+* Empty anchor is now part of a link (i.e. foo.html#) (Fabiano Engler)
+* tex: Default headers cleanup, now it's minimalist
+* tex: Now limiting the maximum quote depth to six
+* tex: User-defined styles now overwrite default formatting on headers
+* (x)html: New header comment showing the CSS file path, when using
 `--css-inside`
 
- * i18n: Added Chinese translations (wfifi)
-
- * Bugfix: xhtml: Fixed encoding declaration when using `--css-sugar`
- * Bugfix: (x)html: No empty `<STYLE>` tag on `--css-inside` when CSS file is missing
- * Bugfix: (x)html: Removed useless `<P></P>` after table followed by blank line
- * Bugfix: tex: Now removing `.sty` extension of user style files
- * Bugfix: Macro at line beginning now closes Quote
- * Bugfix: Verbatim and Raw areas are now mutually exclusive
- * Bugfix: Fixed protocol adding to uppercased URLs like WWW.FOO.COM
- * Bugfix: Fixed fatal error on macro after table (i.e. "| x |\n%%date")
- * Bugfix: Fixed fatal error on table inside deflist (i.e. ": | foo")
- * Bugfix: Fixed fatal error on empty table (i.e. "| |")
- * Bugfix: Fixed fatal error on malformed lists (i.e. ": foo\n- bar")
-
- * Raw doesn't close Quote anymore
- * Optimization changes made the program execution slightly faster (Campbell Barton)
- * Unknown errors now sent to STDERR and exiting 1
- * Gui: Now using a green theme, following the new website colors
- * Test-suite with new modules and a total of 152 tests
- * Tarball clean up (less files, easier to generate and package)
- * Spell check and Capitalization on the code comments :)
-
-# Version 2.3 (2005-06-17)
-
- * New rule to allow COLSPAN in table cells
- * New option `--dump-source` to show source file with t2t includes expanded
- * New options `--config-file` and `-C` to include an external config file
- * New options (turn off): `--no-infile`, `--no-dump-config`, `--no-dump-source`
- * New 'test' folder with the program test-suite
- * tex: FitV changed to FitH in hyperref package PDF settings
-
- * Docs: New "Markup Rules" document, obsoleting old RULES and Abuse Me docs
- * Docs: All documentation translated to French (Claude Hiebel @ .fr for making them)
- * Docs: Sample file translated to Hungarian (Adam Schmideg)
- * Docs: Sample file and Markup Demo translated to Chinese (Zoom Quiet)
- * Docs: Little fixes at the program man page and pt_BR.po potfile
-
- * Bugfix: Option `--css-inside` now working for xhtml target also
- * Bugfix: Macros names are case insensitive again (it was broken on v2.1)
- * Bugfix: Not dumping traceback when input file is empty
- * Bugfix: Now identifying invalid filter replacement (as \1 with no group)
- * Bugfix: Outfile buffer \n's expanded *before* postproc filters
- * Bugfix: Detection when `%!includeconf` is including itself (loop)
- * Bugfix: Module: Improved support, samples/module/* updated
- * Bugfix: Module: finish_him() has not module-aware
- * Bugfix: Module: Using `%%mtime` was dumping error (Ulysses Almeida)
-
-# Version 2.2 (2004-12-30)
-
- * New target: lout
- * New option `--css-inside` to include the CSS file contents inside
-HTML/XHTML headers
- * New T2TCONFIG environment variable to specify RC file location
- * The strong bar
- * tex: Now links are blue and clickable on PDF, using 'hyperref' package (Rahul Bhargava)
-
- * Debug messages revamped: categorized with IDs, background color setting
- * The `--help` message was improved with metavars (i.e. `--target=TYPE`)
- * The "wrote file" message now shows the full path if -o was used on
-the command line
- * Module: New samples/module dir with sample Python scripts
- * Module: Better interface to use a string as a full marked file
- * Gui: Now all errors are printed *and* placed inside windows
-
- * i18n: Added French translations (Claude Hiebel)
- * i18n: Added German translations (Manfred Schreiweis)
- * i18n: Added Spanish translations (Ielton Ferreira)
- * Docs: "Markup Demo" translated to portuguese
-
- * Bugfix: outfile location inside %!options now respects infile path
- * Bugfix: xhtml: now the enconding is defined on <?xml> tag, not <meta>
- * Bugfix: tex: not escaping the underscore char '_' on image paths anymore
- * Bugfix: Module: now raising exceptions on errors instead print/sys.exit
-
-# Version 2.1 (2004-11-13)
-
- * New `%%toc` macro to specify the TOC position
- * New `%%infile` and `%%outfile` macros, to get file information
- * New `%%mtime` macro, for source file modification time (Tamas Ivan)
- * New options `-q` and `--quiet` for quiet operation
- * New extras/gvim-menu.vim file for the gVim text editor (Otavio Correa)
-
- * Pre/Postproc regexes now compiled once (faster conversion!)
- * Now an empty item closes the current list
- * Option `--toc-only` now respecting `--outfile` (if any)
- * Tables with no "cellpadding" declaration when using `--css-sugar`
- * URL matcher: char "+" added on address and ";$" added for form data
- * The hyphen char "-" now can be used in anchors (Stefano Spinucci)
- * Misspelled option`--css-suggar` changed to `--css-sugar` (both works now)
-
- * i18n: Added Italian translations (Stefano Spinucci)
- * i18n: Added Hungarian translations (Tamas Ivan)
- * Docs: New "Markup Demo" document, which obsoleted old RULES file
- * Docs: New "Writing Books with Txt2tags" document
- * Docs: New "Reference Card" document in portuguese (Jose Inacio Coelho and Leslie Watter)
- * Docs: New "FAQ" document in portuguese (Wilson Freitas)
- * Docs: User Guide revamped: new chapters and now is a PDF
- * Docs: Abuseme and sample files translated to Spanish (Luis Cortazar)
- * Docs: Fixed typo on the program manpage
-
- * Bugfix: Detecting when input file is empty (zero sized)
- * Bugfix: Now deals with user malformed list: sublist before list
- * Bugfix: Windows RC file directory now pointing to %homepath%
- * Bugfix: Maximize result window on Gui now working (Marcus Aurelius Farias)
- * Bugfix: A macro right after the headers begins Body
-
-# Version 2.0 (2004-07-25)
-
- * Program internationalized (i18n) and translated to Portuguese
- * New user configuration file `~/.txt2tagsrc`
- * New mark `"""` for Raw Text Area
- * New `%!includeconf` command to insert external file config
- * New `%!include: ""file""` command to include raw text
- * New pre-checking on Pre/Post Proc filters for regex errors
- * Graphical interface color configurable via `%!guicolors`
- * The program is now an importable Python module
- * Code changes to make pychecker happy (from 123 warnings to 10)
- * HTML and XHTML codes approved by w3c validator
- * New options: --dump-config, --debug, -v, --verbose, --encoding,
--i, --infile, --rc, --css-suggar
- * New options (turn off): --no-style, --no-toc, --no-toc-only,
---no-enum-title, --no-mask-email, --no-rc, --no-css-suggar,
---no-encoding, --no-infile, --no-outfile
-
- * Bugfix: fixed the program description on the documentation
- * Bugfix: sgml: removed useless <rowsep> from table last row
- * Bugfix: tex: now escaping correctly <, > and | chars
- * Bugfix: TOC and list errors when inverting order
- * New optional anchor specification for title: `=title=[anchor]`
- * New CSS sample files to help CSS beginners (Osvaldo Santana)
- * New target: xhtml (XHTML page) (Peter Valach and Christian Zuckschwerdt)
- * Tex: now using `--style` to load `\usepackage` modules
- * User Guide images on the tarball
-
- * Man target improved: added support for lists, quote and tables
- * Mgp target improved: image is now alignable
- * Moin target improved: added support for underline, quote, table
-cell align, comment and TOC
- * Tex target improved: removed amssymb from headers, not breaking
-pages anymore, mapping `--style` do \usepackage, using \clearpage,
-image tag not using {figure} anymore (Leo Rosa, Leslie Watter and Sandor Markon)
-
- * Graphical and web interfaces improved (blue theme)
- * Error messages improved and prefixed by txt2tags string
- * New rules for beautifiers: glued and greedy
- * Solo centered images now requires spaces on both sides
- * Added & to URL filename valid chars (~michaelreaves/D&Dpreface.html)
- * User config on source code for i18n, debug and HTML lowered tags
-
- * Old `--type` option changed to `--target`
- * Old `--noheaders` option changed to `--no-headers`
- * Old `--enumtitle` option changed to `--enum-title`
- * Old `--maskemail` option changed to `--mask-email`
- * Old `--toclevel` option changed to `--toc-level`
- * Old `--toconly` option changed to `--toc-only`
-
- * Old ``pre`` mark changed to ```pre```
- * Old ```raw``` mark changed to `""""raw""""`
- * Old `---` mark changed to ````` for Verbatim Area
- * Old `= term:` mark changed to `: term` for definition list term
- * Old bolditalic mark removed, use `**//bold+italic//**` instead
-
- * Old `%!cmdline` config changed to `%!target` and `%!options`
- * Old `%!include: `file.txt`` changed to `%!include: ``file.txt```
-when including a text file
- * Old `%!include: 'file.html'` changed to `%!include: ''file.html''`
-when including a tagged file
-
-# Version 1.7 (2003-11-30)
-
- * New `%!include` command to insert external files
- * Command line options errors now more descriptive
- * Regex errors now detected on Pre/Post proc filters
- * Program man page added to the tarball (Jose Inacio Coelho)
- * Rewritten the Emacs syntax highlight file (Leslie Watter)
-
- * Bugfix: moin: first level lists must have a leading space
- * Bugfix: man: headers using quotes
- * Bugfix: Footer composer on Windows was dumping error
- * Bugfix: Gui + STDOUT not showing `%!postproc` edits
-
-# Version 1.6 (2003-07-23)
-
- * New mark `+` for explicit numbered titles, +like this+
- * New `%!preproc:` and `%!postproc:` user defined filters
- * New `%!key(target):` optional format to apply a config to a target,
+* i18n: Added Chinese translations (wfifi)
+
+* Bugfix: xhtml: Fixed encoding declaration when using `--css-sugar`
+* Bugfix: (x)html: No empty `<STYLE>` tag on `--css-inside` when CSS file is missing
+* Bugfix: (x)html: Removed useless `<P></P>` after table followed by blank line
+* Bugfix: tex: Now removing `.sty` extension of user style files
+* Bugfix: Macro at line beginning now closes Quote
+* Bugfix: Verbatim and Raw areas are now mutually exclusive
+* Bugfix: Fixed protocol adding to uppercased URLs like WWW.FOO.COM
+* Bugfix: Fixed fatal error on macro after table (i.e. "| x |\n%%date")
+* Bugfix: Fixed fatal error on table inside deflist (i.e. ": | foo")
+* Bugfix: Fixed fatal error on empty table (i.e. "| |")
+* Bugfix: Fixed fatal error on malformed lists (i.e. ": foo\n- bar")
+
+* Raw doesn't close Quote anymore
+* Optimization changes made the program execution slightly faster (Campbell Barton)
+* Unknown errors now sent to STDERR and exiting 1
+* Gui: Now using a green theme, following the new website colors
+* Test-suite with new modules and a total of 152 tests
+* Tarball clean up (less files, easier to generate and package)
+* Spell check and Capitalization on the code comments :)
+
+# 2.3 (2005-06-17)
+
+* New rule to allow COLSPAN in table cells
+* New option `--dump-source` to show source file with t2t includes expanded
+* New options `--config-file` and `-C` to include an external config file
+* New options (turn off): `--no-infile`, `--no-dump-config`, `--no-dump-source`
+* New 'test' folder with the program test-suite
+* tex: FitV changed to FitH in hyperref package PDF settings
+
+* Docs: New "Markup Rules" document, obsoleting old RULES and Abuse Me docs
+* Docs: All documentation translated to French (Claude Hiebel @ .fr for making them)
+* Docs: Sample file translated to Hungarian (Adam Schmideg)
+* Docs: Sample file and Markup Demo translated to Chinese (Zoom Quiet)
+* Docs: Little fixes at the program man page and pt_BR.po potfile
+
+* Bugfix: Option `--css-inside` now working for xhtml target also
+* Bugfix: Macros names are case insensitive again (it was broken on v2.1)
+* Bugfix: Not dumping traceback when input file is empty
+* Bugfix: Now identifying invalid filter replacement (as \1 with no group)
+* Bugfix: Outfile buffer \n's expanded *before* postproc filters
+* Bugfix: Detection when `%!includeconf` is including itself (loop)
+* Bugfix: Module: Improved support, samples/module/* updated
+* Bugfix: Module: finish_him() has not module-aware
+* Bugfix: Module: Using `%%mtime` was dumping error (Ulysses Almeida)
+
+# 2.2 (2004-12-30)
+
+* New target: lout
+* New option `--css-inside` to include the CSS file contents inside HTML/XHTML headers
+* New T2TCONFIG environment variable to specify RC file location
+* The strong bar
+* tex: Now links are blue and clickable on PDF, using 'hyperref' package (Rahul Bhargava)
+
+* Debug messages revamped: categorized with IDs, background color setting
+* The `--help` message was improved with metavars (i.e. `--target=TYPE`)
+* The "wrote file" message now shows the full path if -o was used on the command line
+* Module: New samples/module dir with sample Python scripts
+* Module: Better interface to use a string as a full marked file
+* Gui: Now all errors are printed *and* placed inside windows
+
+* i18n: Added French translations (Claude Hiebel)
+* i18n: Added German translations (Manfred Schreiweis)
+* i18n: Added Spanish translations (Ielton Ferreira)
+* Docs: "Markup Demo" translated to portuguese
+
+* Bugfix: outfile location inside %!options now respects infile path
+* Bugfix: xhtml: now the enconding is defined on <?xml> tag, not <meta>
+* Bugfix: tex: not escaping the underscore char '_' on image paths anymore
+* Bugfix: Module: now raising exceptions on errors instead print/sys.exit
+
+# 2.1 (2004-11-13)
+
+* New `%%toc` macro to specify the TOC position
+* New `%%infile` and `%%outfile` macros, to get file information
+* New `%%mtime` macro, for source file modification time (Tamas Ivan)
+* New options `-q` and `--quiet` for quiet operation
+* New extras/gvim-menu.vim file for the gVim text editor (Otavio Correa)
+
+* Pre/Postproc regexes now compiled once (faster conversion!)
+* Now an empty item closes the current list
+* Option `--toc-only` now respecting `--outfile` (if any)
+* Tables with no "cellpadding" declaration when using `--css-sugar`
+* URL matcher: char "+" added on address and ";$" added for form data
+* The hyphen char "-" now can be used in anchors (Stefano Spinucci)
+* Misspelled option`--css-suggar` changed to `--css-sugar` (both works now)
+
+* i18n: Added Italian translations (Stefano Spinucci)
+* i18n: Added Hungarian translations (Tamas Ivan)
+* Docs: New "Markup Demo" document, which obsoleted old RULES file
+* Docs: New "Writing Books with Txt2tags" document
+* Docs: New "Reference Card" document in portuguese (Jose Inacio Coelho and Leslie Watter)
+* Docs: New "FAQ" document in portuguese (Wilson Freitas)
+* Docs: User Guide revamped: new chapters and now is a PDF
+* Docs: Abuseme and sample files translated to Spanish (Luis Cortazar)
+* Docs: Fixed typo on the program manpage
+
+* Bugfix: Detecting when input file is empty (zero sized)
+* Bugfix: Now deals with user malformed list: sublist before list
+* Bugfix: Windows RC file directory now pointing to %homepath%
+* Bugfix: Maximize result window on Gui now working (Marcus Aurelius Farias)
+* Bugfix: A macro right after the headers begins Body
+
+# 2.0 (2004-07-25)
+
+* Program internationalized (i18n) and translated to Portuguese
+* New user configuration file `~/.txt2tagsrc`
+* New mark `"""` for Raw Text Area
+* New `%!includeconf` command to insert external file config
+* New `%!include: ""file""` command to include raw text
+* New pre-checking on Pre/Post Proc filters for regex errors
+* Graphical interface color configurable via `%!guicolors`
+* The program is now an importable Python module
+* Code changes to make pychecker happy (from 123 warnings to 10)
+* HTML and XHTML codes approved by w3c validator
+* New options: --dump-config, --debug, -v, --verbose, --encoding, -i, --infile,
+  --rc, --css-suggar
+* New options (turn off): --no-style, --no-toc, --no-toc-only, --no-enum-title,
+  --no-mask-email, --no-rc, --no-css-suggar, --no-encoding, --no-infile, --no-outfile
+
+* Bugfix: fixed the program description on the documentation
+* Bugfix: sgml: removed useless <rowsep> from table last row
+* Bugfix: tex: now escaping correctly <, > and | chars
+* Bugfix: TOC and list errors when inverting order
+* New optional anchor specification for title: `=title=[anchor]`
+* New CSS sample files to help CSS beginners (Osvaldo Santana)
+* New target: xhtml (XHTML page) (Peter Valach and Christian Zuckschwerdt)
+* Tex: now using `--style` to load `\usepackage` modules
+* User Guide images on the tarball
+
+* Man target improved: added support for lists, quote and tables
+* Mgp target improved: image is now alignable
+* Moin target improved: added support for underline, quote, table cell align, comment and TOC
+* Tex target improved: removed amssymb from headers, not breaking pages anymore,
+  mapping `--style` do \usepackage, using \clearpage, image tag not using {figure}
+  anymore (Leo Rosa, Leslie Watter and Sandor Markon)
+
+* Graphical and web interfaces improved (blue theme)
+* Error messages improved and prefixed by txt2tags string
+* New rules for beautifiers: glued and greedy
+* Solo centered images now requires spaces on both sides
+* Added & to URL filename valid chars (~michaelreaves/D&Dpreface.html)
+* User config on source code for i18n, debug and HTML lowered tags
+
+* Old `--type` option changed to `--target`
+* Old `--noheaders` option changed to `--no-headers`
+* Old `--enumtitle` option changed to `--enum-title`
+* Old `--maskemail` option changed to `--mask-email`
+* Old `--toclevel` option changed to `--toc-level`
+* Old `--toconly` option changed to `--toc-only`
+
+* Old ``pre`` mark changed to ```pre```
+* Old ```raw``` mark changed to `""""raw""""`
+* Old `---` mark changed to ````` for Verbatim Area
+* Old `= term:` mark changed to `: term` for definition list term
+* Old bolditalic mark removed, use `**//bold+italic//**` instead
+
+* Old `%!cmdline` config changed to `%!target` and `%!options`
+* Old `%!include: `file.txt`` changed to `%!include: ``file.txt``` when including a text file
+* Old `%!include: 'file.html'` changed to `%!include: ''file.html''` when including a tagged file
+
+# 1.7 (2003-11-30)
+
+* New `%!include` command to insert external files
+* Command line options errors now more descriptive
+* Regex errors now detected on Pre/Post proc filters
+* Program man page added to the tarball (Jose Inacio Coelho)
+* Rewritten the Emacs syntax highlight file (Leslie Watter)
+
+* Bugfix: moin: first level lists must have a leading space
+* Bugfix: man: headers using quotes
+* Bugfix: Footer composer on Windows was dumping error
+* Bugfix: Gui + STDOUT not showing `%!postproc` edits
+
+# 1.6 (2003-07-23)
+
+* New mark `+` for explicit numbered titles, +like this+
+* New `%!preproc:` and `%!postproc:` user defined filters
+* New `%!key(target):` optional format to apply a config to a target,
 as in `%!encoding(html): iso-8859-1`
- * Removed accented letter from Author's name
- * Added separator blank line before and after titles for txt target
-
- * Bugfix: `--toconly` now respects `--toclevel` setting
- * Bugfix: no more double spaced lines on Windows (Guaracy Monteiro @ .br for fixing)
- * Bugfix: man: escaping \ with \e
- * Bugfix: man: escaping lines that begin with . and '
- * Bugfix: tex: solved lots of LaTeX special chars issues: ~ ^ \
- * Bugfix: tex: the _ char is now escaped on titles
- * Bugfix: html: escaping '--' on comment lines
- * Bugfix: html: `<IMG ALIGN="middle">` (not "center")
- * Bugfix: html: closing `<A NAME>` tag with `</A>`
- * Bugfix: tex: now using \section* as the
- * Bugfix: tex: now respecting `--enumtitle`
-
- * Gui: now showing
- * Gui: refresh checkboxes when a new file is loaded
- * Gui: accepts extra options when called via command line, example:
+* Removed accented letter from Author's name
+* Added separator blank line before and after titles for txt target
+
+* Bugfix: `--toconly` now respects `--toclevel` setting
+* Bugfix: no more double spaced lines on Windows (Guaracy Monteiro @ .br for fixing)
+* Bugfix: man: escaping \ with \e
+* Bugfix: man: escaping lines that begin with . and '
+* Bugfix: tex: solved lots of LaTeX special chars issues: ~ ^ \
+* Bugfix: tex: the _ char is now escaped on titles
+* Bugfix: html: escaping '--' on comment lines
+* Bugfix: html: `<IMG ALIGN="middle">` (not "center")
+* Bugfix: html: closing `<A NAME>` tag with `</A>`
+* Bugfix: tex: now using \section* as the
+* Bugfix: tex: now respecting `--enumtitle`
+
+* Gui: now showing
+* Gui: refresh checkboxes when a new file is loaded
+* Gui: accepts extra options when called via command line, example:
 `txt2tags --gui -n file.t2t`
 
-# Version 1.5.1 (2003-05-14)
+# 1.5.1 (2003-05-14)
 
- * Just a patch for v1.5, in which the GUI was broken
+* Just a patch for v1.5, in which the GUI was broken
 
-# Version 1.5 (2003-05-09)
+# 1.5 (2003-05-09)
 
- * New `%!cmdline:` setting to specify a default command line
- * Target LaTeX now supporting images (Leslie Watter)
- * New option `-n`, short for `--enumtitle`
- * New option `-H`, short for `--noheaders`
- * New options `-o` and `--outfile` to set the output filename
+* New `%!cmdline:` setting to specify a default command line
+* Target LaTeX now supporting images (Leslie Watter)
+* New option `-n`, short for `--enumtitle`
+* New option `-H`, short for `--noheaders`
+* New options `-o` and `--outfile` to set the output filename
 
- * New `<!DOCTYPE>` declaration on HTML target headers
- * Now the TODO file is public, included on the tarball
- * Some improvements on extras/unhtml.vim file
+* New `<!DOCTYPE>` declaration on HTML target headers
+* Now the TODO file is public, included on the tarball
+* Some improvements on extras/unhtml.vim file
 
- * Syntax: Headers are parsed as plain text, except `%%date`
- * Syntax: Comma added as valid URL form data char
+* Syntax: Headers are parsed as plain text, except `%%date`
+* Syntax: Comma added as valid URL form data char
 
- * Bugfix: Masking of encoding name on tex was not working
- * Bugfix: \1, \2, \N special chars was not correctly escaped
- * Bugfix: '1linePre' regex was matching empty line as '--- '
- * Bugfix: Some targets don't support images as links
- * Bugfix: URL special chars was not escaped on Sgml target
- * Bugfix: Marks was being parsed on TOC items on man,pm6,moin,mgp,txt
- * Bugfix: Most targets don't support images as definition list term
- * Bugfix: Fixed escape char \ issues (now it is masked)
+* Bugfix: Masking of encoding name on tex was not working
+* Bugfix: \1, \2, \N special chars was not correctly escaped
+* Bugfix: '1linePre' regex was matching empty line as '--- '
+* Bugfix: Some targets don't support images as links
+* Bugfix: URL special chars was not escaped on Sgml target
+* Bugfix: Marks was being parsed on TOC items on man,pm6,moin,mgp,txt
+* Bugfix: Most targets don't support images as definition list term
+* Bugfix: Fixed escape char \ issues (now it is masked)
 
-# Version 1.4 (2003-02-18)
+# 1.4 (2003-02-18)
 
- * New table smart align for the full table (left,center)
- * New table smart align for each table cell
- * New option `--style` and `%!style:` setting for doc style
- * New option `--toclevel` to set the maximum TOC deepness
- * Syntax: now comment lines doesn't close tables
- * If no headers, now the title is left empty (no more "`-NO TITLE-`")
+* New table smart align for the full table (left,center)
+* New table smart align for each table cell
+* New option `--style` and `%!style:` setting for doc style
+* New option `--toclevel` to set the maximum TOC deepness
+* Syntax: now comment lines doesn't close tables
+* If no headers, now the title is left empty (no more "`-NO TITLE-`")
 
- * Bugfix: `--maskemail` was not working since v1.2  :/
- * Bugfix: \t,\n,\r & friends was parsed as specials inside tables
- * Bugfix: Paragraph+comment+blankline+paragraph was parsed as one
+* Bugfix: `--maskemail` was not working since v1.2  :/
+* Bugfix: \t,\n,\r & friends was parsed as specials inside tables
+* Bugfix: Paragraph+comment+blankline+paragraph was parsed as one
 paragraph
 
-# Version 1.3 (2002-12-20)
+# 1.3 (2002-12-20)
 
- * New "Txt2tags User Guide" document
- * New mark `""` for RAW strings (pass-thru txt2tags parsing)
- * New `%!encoding:` command to specify the document charset
- * New 'contrib' dir for user contributed stuff
- * Improvements on SGML target: now using `<toc>` and `<descrip>`
- * Added '$' and '@' chars to the URL matcher, so http://this.is/valid@$99
+* New "Txt2tags User Guide" document
+* New mark `""` for RAW strings (pass-thru txt2tags parsing)
+* New `%!encoding:` command to specify the document charset
+* New 'contrib' dir for user contributed stuff
+* Improvements on SGML target: now using `<toc>` and `<descrip>`
+* Added '$' and '@' chars to the URL matcher, so http://this.is/valid@$99
 
- * Sanity: Removed from code structures marked as obsoleted on v1.1
- * Sanity: Removed `\email{}` tag from LaTeX headers. Using `\url{}`.
- * Sanity: `\usepackage[latin1]{inputenc}` is not default anymore on
+* Sanity: Removed from code structures marked as obsoleted on v1.1
+* Sanity: Removed `\email{}` tag from LaTeX headers. Using `\url{}`.
+* Sanity: `\usepackage[latin1]{inputenc}` is not default anymore on
 LaTeX headers. If needed, use new *encoding* command.
 
- * Bugfix: LaTeX target added on the Web Interface menu
- * Bugfix: \n, \t and other special pairs escaped under `inline mono`
- * Bugfix: TOC anchor respecting maximum TOC level
- * Bugfix: Beautifiers not parsed on TOC items
- * Bugfix: Special chars not double escaped on TOC items
+* Bugfix: LaTeX target added on the Web Interface menu
+* Bugfix: \n, \t and other special pairs escaped under `inline mono`
+* Bugfix: TOC anchor respecting maximum TOC level
+* Bugfix: Beautifiers not parsed on TOC items
+* Bugfix: Special chars not double escaped on TOC items
 
-# Version 1.2 (2002-12-03)
+# 1.2 (2002-12-03)
 
- * New target: tex (LaTeX document) (Leslie Watter)
- * Now multiple source files can be specified on the command line
+* New target: tex (LaTeX document) (Leslie Watter)
+* Now multiple source files can be specified on the command line
 as `txt2tags -t html *.t2t` (Maksim Ischenko @ .ua for the idea)
- * URL matcher was improved and now gets valid insane paths as
+* URL matcher was improved and now gets valid insane paths as
 http://this.com/// and http://this.com?var=abc#anchor
- * Added a COPYING file on the tarball, with the GPL license
- * Added a handy unhtml.vim script to the extras directory, to
+* Added a COPYING file on the tarball, with the GPL license
+* Added a handy unhtml.vim script to the extras directory, to
 convert by brute force an HTML file to a txt2tags file on Vim.
- * Bugfix: Special chars escaped on link label
+* Bugfix: Special chars escaped on link label
 
-# Version 1.1 (2002-11-06)
+# 1.1 (2002-11-06)
 
- * Images can now point to links, as: `[[img.gif] www.abc.com]`
- * New foldmethod=syntax rules on the Vim syntax file
- * Now any non-table line closes a table (blank line or not)
- * Begin of the major code-cleanup (aka complete rewrite)
+* Images can now point to links, as: `[[img.gif] www.abc.com]`
+* New foldmethod=syntax rules on the Vim syntax file
+* Now any non-table line closes a table (blank line or not)
+* Begin of the major code-cleanup (aka complete rewrite)
 
- * Sanity: New RULE for headers: if the very first line of the file
+* Sanity: New RULE for headers: if the very first line of the file
 is blank, this means 'this file has no header information'
- * Sanity: New comment char: % at the line beginning (no leading spaces!)
- * Sanity: Marks are not parsed on title lines
- * Sanity: // as comment mark is obsoleted, due conflicts with
+* Sanity: New comment char: % at the line beginning (no leading spaces!)
+* Sanity: Marks are not parsed on title lines
+* Sanity: // as comment mark is obsoleted, due conflicts with
 italic mark. will be removed on version 1.3
- * Sanity: TAB-made tables are marked as obsoleted, will be removed on
+* Sanity: TAB-made tables are marked as obsoleted, will be removed on
 version 1.3. Use the PIPE-made tables instead.
- * Sanity: Removed support for filename with spaces on the image mark,
+* Sanity: Removed support for filename with spaces on the image mark,
 due conflicts with named URL mark, `[like this.gif]`
- * New option `--fixme` (temporary) to update obsoleted structures and
+* New option `--fixme` (temporary) to update obsoleted structures and
 automatically fix all this Sanity changes
 
- * Bugfix: `--noheaders` now act just as 'suppress headers from output',
+* Bugfix: `--noheaders` now act just as 'suppress headers from output',
 and not 'treat headers as plain text'
- * Bugfix: Trailing . is now part of the URL when it contains anchor
+* Bugfix: Trailing . is now part of the URL when it contains anchor
 location or form data (as #abc. and ?var=abc.)
- * Bugfix: Trailing / added to the URL matcher (as [www.abc.com/](http://www.abc.com/))
- * Bugfix: Title with \ char now is correctly handled
+* Bugfix: Trailing / added to the URL matcher (as [www.abc.com/](http://www.abc.com/))
+* Bugfix: Title with \ char now is correctly handled
 
-# Version 1.0 (2002-09-25)
+# 1.0 (2002-09-25)
 
- * New Graphical Tk Interface
- * Fixed target file format on Windows and Mac platforms
- * TOC deepness now is limited to level 3
- * RULES file sync'ed with actual rules (sorry!)
- * ChangeLog (this file) is now a txt2tags file
- * Added underscore char _ to anchor on URL regex
+* New Graphical Tk Interface
+* Fixed target file format on Windows and Mac platforms
+* TOC deepness now is limited to level 3
+* RULES file sync'ed with actual rules (sorry!)
+* ChangeLog (this file) is now a txt2tags file
+* Added underscore char _ to anchor on URL regex
 
- * Bugfix: Closing any open list or table at EOF
- * Bugfix: HTML anchor name have no #
+* Bugfix: Closing any open list or table at EOF
+* Bugfix: HTML anchor name have no #
 
-# Version 0.9 (2002-08-23)
+# 0.9 (2002-08-23)
 
- * Now txt2tags is a 100% pure Python script. The bash part has gone
+* Now txt2tags is a 100% pure Python script. The bash part has gone
 so now it runs nicely on MS Windows and other Python aware platforms
- * New options `--toc` and `--toconly` to generate Table Of Contents
- * Defined `.t2t` as the official txt2tags file extension
- * Txt.vim file renamed to txt2tags.vim, and added instructions
- * Now titles are underlined on target txt
- * Cmdline used to generate the document is inserted as a comment on it
- * Tarball reorganized, adding 'extras' and 'samples' directories
-
- * Bugfix: When all ok, force system exit status to 0
-
-# Version 0.8 (2002-07-03)
-
- * New abuseme.txt complex sample file (test-suite)
- * New smart image align feature for HTML (see abuseme.t2t)
- * New option `--maskemail` to hide email from SPAM robots
- * Table now can have border or no on HTML
- * Improvements on txt.vim syntax file, now colors works on gui also
- * Image mark can't accept filename with spaces (conflicts named link)
-
- * Bugfix: Parse more than one `%%date` on the same line
- * Bugfix: Special chars now escaped inside `preformatted`
- * Bugfix: Closing quote mark was kinda broken
-
-# Version 0.7 (2002-06-20)
-
- * New Emacs syntax highlight file for txt2tags rules (Leslie Watter)
- * New mark `:` for definition lists (<DL> on HTML)
- * Now adding protocol to guessed link like [www.abc.com](http://www.abc.com)
- * Explicit link mark changed from `["label" url]` to `[label url]`
+* New options `--toc` and `--toconly` to generate Table Of Contents
+* Defined `.t2t` as the official txt2tags file extension
+* Txt.vim file renamed to txt2tags.vim, and added instructions
+* Now titles are underlined on target txt
+* Cmdline used to generate the document is inserted as a comment on it
+* Tarball reorganized, adding 'extras' and 'samples' directories
+
+* Bugfix: When all ok, force system exit status to 0
+
+# 0.8 (2002-07-03)
+
+* New abuseme.txt complex sample file (test-suite)
+* New smart image align feature for HTML (see abuseme.t2t)
+* New option `--maskemail` to hide email from SPAM robots
+* Table now can have border or no on HTML
+* Improvements on txt.vim syntax file, now colors works on gui also
+* Image mark can't accept filename with spaces (conflicts named link)
+
+* Bugfix: Parse more than one `%%date` on the same line
+* Bugfix: Special chars now escaped inside `preformatted`
+* Bugfix: Closing quote mark was kinda broken
+
+# 0.7 (2002-06-20)
+
+* New Emacs syntax highlight file for txt2tags rules (Leslie Watter)
+* New mark `:` for definition lists (<DL> on HTML)
+* Now adding protocol to guessed link like [www.abc.com](http://www.abc.com)
+* Explicit link mark changed from `["label" url]` to `[label url]`
 in other words, quotes are not necessary anymore
- * Image mark now correctly handles filenames with space for html
- * Corrected typos on sample.txt file
- * Named links now can point to local links as file.html, #anchor
+* Image mark now correctly handles filenames with space for html
+* Corrected typos on sample.txt file
+* Named links now can point to local links as file.html, #anchor
 and file.html#anchor
 
-# Version 0.6 (2002-04-10)
+# 0.6 (2002-04-10)
 
- * Tables are now supported for sgml and moin targets
- * New option `--enumtitle` to enumerate all titles as 1, 1.1, 1.1.1, etc
- * New mark `+` for numbered list type for all targets
- * Better pre-formatted font escaping (won't parse marks)
- * URL matcher now supports ftp://user:passwd@domain.com login URLs
+* Tables are now supported for sgml and moin targets
+* New option `--enumtitle` to enumerate all titles as 1, 1.1, 1.1.1, etc
+* New mark `+` for numbered list type for all targets
+* Better pre-formatted font escaping (won't parse marks)
+* URL matcher now supports ftp://user:passwd@domain.com login URLs
 and user@domain.com?subject=test&cc=me@domain.com filled emails
 
-# Version 0.5 (2002-03-22)
+# 0.5 (2002-03-22)
 
- * New handy Web interface to use it online (Internet or Intranet)
- * New option `--noheaders` to suppress headers information
- * Now it can read the marked text from STDIN (specify - as file)
- * Adapted to work on python old v1.5 also
+* New handy Web interface to use it online (Internet or Intranet)
+* New option `--noheaders` to suppress headers information
+* Now it can read the marked text from STDIN (specify - as file)
+* Adapted to work on python old v1.5 also
 
-# Version 0.4 (2002-03-11)
+# 0.4 (2002-03-11)
 
- * New simple table support (just for HTML by now)
- * Fixed lots of bugs on the man target, now it's kinda usable
- * The preformatted line mark must have a space after the dashes: '--- '
- * The preformatted line now has leading spaces
- * New options `-h`, `--help`, `-V` and `--version`
- * URL matcher is smarter, supporting `#local_anchors` and `?form=data`
+* New simple table support (just for HTML by now)
+* Fixed lots of bugs on the man target, now it's kinda usable
+* The preformatted line mark must have a space after the dashes: '--- '
+* The preformatted line now has leading spaces
+* New options `-h`, `--help`, `-V` and `--version`
+* URL matcher is smarter, supporting `#local_anchors` and `?form=data`
 
-# Version 0.3 (2001-11-09)
+# 0.3 (2001-11-09)
 
- * New mark `["my label" http://duh.com]` for explicit URL/email with label
- * Date macro now supports format string like `%%date(%m/%d/%Y)`
+* New mark `["my label" http://duh.com]` for explicit URL/email with label
+* Date macro now supports format string like `%%date(%m/%d/%Y)`
 
-# Version 0.2 (2001-10-01)
+# 0.2 (2001-10-01)
 
- * New target: man (UNIX man page)
- * Nice shell wrapper to deal with files/directories/options.
+* New target: man (UNIX man page)
+* Nice shell wrapper to deal with files/directories/options.
 in fact, the python code is now "embedded" on the sh script.
- * New options `--lang` and `--split` (for sgml2html)
+* New options `--lang` and `--split` (for sgml2html)
 
-# Version 0.1 (2001-07-26)
+# 0.1 (2001-07-26)
 
- * Initial release
+* Initial release
diff --git a/README.md b/README.md
index 45d2fbf..96714eb 100644
--- a/README.md
+++ b/README.md
@@ -16,6 +16,7 @@ to the following formats:
  * LaTeX
  * Lout
  * MagicPoint
+ * Markdown
  * MoinMoin
  * PmWiki
  * Plain Text
diff --git a/TODO.md b/TODO.md
index ae6e102..7c86d0b 100644
--- a/TODO.md
+++ b/TODO.md
@@ -1,7 +1,8 @@
+* Use argparse (https://stackoverflow.com/a/31347222/1277298).
+* Expose all rules and set tabletitlerowinbold=1 for Latex again.
+* Don't remove markup just because the target doesn't support it.
 * Clean up the code
-* Remove more seldom-used features
 * Make the code faster
-* Drop --encoding option and always use UTF-8
 * Inspect the following commits from https://github.com/txt2tags/txt2tags and backport useful changes:
 
   * Escaping:
diff --git a/debian/changelog b/debian/changelog
index 24716d8..c8983b6 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+txt2tags (3.8-1) UNRELEASED; urgency=low
+
+  * New upstream release.
+
+ -- Debian Janitor <janitor@jelmer.uk>  Fri, 26 May 2023 17:40:52 -0000
+
 txt2tags (3.4-4) unstable; urgency=medium
 
   [ Debian Janitor ]
diff --git a/debian/patches/doc-makefile.patch b/debian/patches/doc-makefile.patch
index d251e29..93ce2fa 100644
--- a/debian/patches/doc-makefile.patch
+++ b/debian/patches/doc-makefile.patch
@@ -1,6 +1,8 @@
 Build manual pages for all languages for txt2tags
+Index: txt2tags.git/doc/Makefile
+===================================================================
 --- /dev/null
-+++ txt2tags/doc/Makefile
++++ txt2tags.git/doc/Makefile
 @@ -0,0 +1,32 @@
 +#!/usr/bin/make -f
 +# -*- makefile -*-
diff --git a/debian/patches/po-makefile.patch b/debian/patches/po-makefile.patch
index 876bf63..86f28c4 100644
--- a/debian/patches/po-makefile.patch
+++ b/debian/patches/po-makefile.patch
@@ -1,6 +1,8 @@
 Build and install l10n files for txt2tags
+Index: txt2tags.git/po/Makefile
+===================================================================
 --- /dev/null
-+++ txt2tags/po/Makefile
++++ txt2tags.git/po/Makefile
 @@ -0,0 +1,24 @@
 +INSTALL= /usr/bin/install -c
 +INSTALLNLSDIR=$(BASEDIR)/usr/share/locale
diff --git a/debian/patches/py3k-shebang.patch b/debian/patches/py3k-shebang.patch
index 1cf351b..71097c1 100644
--- a/debian/patches/py3k-shebang.patch
+++ b/debian/patches/py3k-shebang.patch
@@ -1,13 +1,17 @@
---- a/test/run.py
-+++ b/test/run.py
+Index: txt2tags.git/test/run.py
+===================================================================
+--- txt2tags.git.orig/test/run.py
++++ txt2tags.git/test/run.py
 @@ -1,4 +1,4 @@
 -#!/usr/bin/env python
 +#!/usr/bin/env python3
  #
  # txt2tags test-suite (http://txt2tags.org)
  # See also: lib.py, */run.py
---- a/txt2tags.py
-+++ b/txt2tags.py
+Index: txt2tags.git/txt2tags.py
+===================================================================
+--- txt2tags.git.orig/txt2tags.py
++++ txt2tags.git/txt2tags.py
 @@ -1,4 +1,4 @@
 -#!/usr/bin/env python
 +#!/usr/bin/env python3
diff --git a/dev/make-release-notes.py b/dev/make-release-notes.py
new file mode 100755
index 0000000..334e06a
--- /dev/null
+++ b/dev/make-release-notes.py
@@ -0,0 +1,45 @@
+#! /usr/bin/env python3
+
+import re
+import sys
+
+_, VERSION, CHANGELOG, LIST = sys.argv
+HEADER_REGEX = fr"# {VERSION} \(\d\d\d\d-\d\d-\d\d\)\n"
+
+notes_list = []
+
+
+def add_to_release_notes(line):
+    assert line.endswith('.'), line
+    notes_list.append(f'* {line}\n')
+
+
+with open(CHANGELOG) as f:
+    first_line = next(f)
+    if not re.match(HEADER_REGEX, first_line):
+        sys.exit(
+            f'First changelog line "{first_line.rstrip()}" must '
+            f'start with "{HEADER_REGEX.rstrip()}"')
+    notes_list.extend([first_line[2:], "\n"])
+    for line in f:
+        if not line.strip():
+            continue
+        if line.startswith("* "):
+            add_to_release_notes(line[2:].strip())
+        else:
+            break
+
+
+def check(name, text):
+    print('*' * 60)
+    print(text)
+    print('*' * 60)
+    response = input('Accept this %s (Y/n)? ' % name).strip().lower()
+    if response and response != 'y':
+        sys.exit(1)
+
+
+check('changelog', ''.join(notes_list))
+
+with open(LIST, 'w') as f:
+    f.writelines(notes_list)
diff --git a/release.sh b/dev/release.sh
similarity index 66%
rename from release.sh
rename to dev/release.sh
index 4c9b649..f93b35f 100755
--- a/release.sh
+++ b/dev/release.sh
@@ -3,9 +3,14 @@
 set -exuo pipefail
 
 VERSION="$1"
+CHANGES="/tmp/txt2tags-$VERSION-changes"
+
+cd "$(dirname ${0})/../"
 
 # Check dependencies.
-twine -h > /dev/null
+hub --version > /dev/null
+python3 -m twine -h > /dev/null
+tox --version > /dev/null
 
 # Check for uncommited changes.
 set +e
@@ -23,15 +28,20 @@ git pull
 # Check that changelog file is up-to-date.
 grep "$VERSION" CHANGELOG.md || (echo "Version $VERSION missing in changelog." && exit 1)
 
+./dev/make-release-notes.py "$VERSION" CHANGELOG.md "$CHANGES"
+
 tox
 
 # Bump version.
 sed -i -e "s/__version__ = \".*\"/__version__ = \"${VERSION}\"/" txt2tags.py
 git commit -am "Update version number to ${VERSION} for release."
-git tag "$VERSION"
+git tag -a "$VERSION" -m "$VERSION"
 
 python3 setup.py sdist bdist_wheel --universal
 python3 -m twine upload dist/txt2tags-${VERSION}.tar.gz dist/txt2tags-${VERSION}-py2.py3-none-any.whl
 
 git push
-git push --tags
+git push origin "$VERSION"  # push new tag
+
+# Add changelog to Github release.
+hub release create "$VERSION" --file "$CHANGES"
diff --git a/docs/markup/markup.t2t b/docs/markup/markup.t2t
index 81b00d1..4dc99cb 100644
--- a/docs/markup/markup.t2t
+++ b/docs/markup/markup.t2t
@@ -2,7 +2,6 @@ Txt2tags Markup Demo
 See marks converted to HTML
 
 %!target: html
-%!encoding: UTF-8
 %!preproc: t2t\.png ../../samples/img/t2tpowered.png
 %!options: -o markup.html
 
diff --git a/docs/rules/rules.conf b/docs/rules/rules.conf
index f0b5972..71561c3 100644
--- a/docs/rules/rules.conf
+++ b/docs/rules/rules.conf
@@ -1,5 +1,5 @@
 
-%!options: --toc --toc-level 2
+%!options: --toc
 %!options: --style rules.css
 %!options: -o rules.html
 
diff --git a/docs/userguide/userguide.t2t b/docs/userguide/userguide.t2t
index d82b17a..64681a1 100644
--- a/docs/userguide/userguide.t2t
+++ b/docs/userguide/userguide.t2t
@@ -2,7 +2,7 @@ Txt2tags User Guide
 
 Aurelio Jargas
 %!target: html
-%!options: --toc --toc-level 2 --style userguide.css
+%!options: --toc --style userguide.css
 
 % easy way to change all image locations once, when changing file location
 %!preproc: IMGPATH .
@@ -287,11 +287,7 @@ Examples:
 | **Including Table Of Contents** | ``$ txt2tags -t html --toc file.t2t``
 | **And also, numbering titles**  | ``$ txt2tags -t html --toc --enum-title file.t2t``
 |  | .
-| **Contents quick view**         | ``$ txt2tags --toc-only file.t2t``
-| **Maybe enumerate them?**       | ``$ txt2tags --toc-only --enum-title file.t2t``
-|  | .
 | **One liners from STDIN**       | ``$ echo -e "\n**bold**" | txt2tags -t html --no-headers -``
-| **Testing Mask Email feature**  | ``$ echo -e "\njohn.wayne@farwest.com" | txt2tags -t txt --mask-email --no-headers -``
 
 
 ========================================================================
@@ -305,7 +301,7 @@ Just download the program and run it on your machine.
 == Download & Install Python ==[download-python]
 
 First of all, you must download and install [Python http://www.python.org] on
-your system. Txt2tags requires Python version 2.2 or newer.
+your system.
 
 Note that Python is already installed by default in Linux and Mac systems. If you're using those, you're done, just skip this step.
 
@@ -532,7 +528,6 @@ My Date
 
 %!target  : html
 %!style   : fancy.css
-%!encoding: UTF-8
 %!options : --toc --enum-title
 
 Hi! This is my test document.
@@ -609,7 +604,7 @@ enjoy the power and control it provides.
 
 The CONFAREA is used to store document-specific settings, so you don't
 have to type them on the command line when converting the document. For
-example, you can set the default document target type and encoding.
+example, you can set the default document target type.
 
 Please read the [Settings section #settings-overview] for more
 information about them.
@@ -649,7 +644,6 @@ List of valid keywords:
  |   Target   | Set the default target to the document be converted to.
  |  Options   | Set the default options to be used on the conversion. The format is the same as the command line options.
  |   Style    | Set the document style. Used to define a CSS file for HTML/XHTML and to load a package in LaTeX.
- |  Encoding  | Set the document Character Set. Used if the document contains accented letters or other not-ASCII characters.
  |   PreProc  | Input filter. Sets "find and replace" rules to be applied on the BODYAREA of the source document.
  |  PostProc  | Output filter. Sets "find and replace" rules to be applied on the converted document.
 
@@ -657,9 +651,8 @@ Example:
 
 ```
 %!target  : html
-%!options : --toc --toc-level 3
+%!options : --toc
 %!style   : fancy.css
-%!encoding: UTF-8
 %!preproc : "AMJ"        "Aurelio Marinho Jargas"
 %!postproc: '<BODY.*?>'  '<BODY bgcolor="yellow">'
 ```
@@ -682,10 +675,9 @@ hyphens followed by one or more words, like ``-t`` and ``--target``.
 % are optional.
 
 Options that are generally used are ``--outfile`` to define a customized
-output file name, ``--toc`` to turn on the automatic TOC generation and
-``--encoding`` to set the document character set. Most of the options
-can be turned off prefixing a "no-" before its name, for example:
-``--no-encoding`` and ``--no-toc``.
+output file name and ``--toc`` to turn on the automatic TOC generation.
+Most of the options can be turned off prefixing a "no-" before its name,
+for example: ``--no-toc``.
 
 You can register the desired options for a source file inside its
 CONFAREA, using the ``%!options`` setting. This way you don't have to
@@ -729,14 +721,8 @@ The format of the settings is exactly the same as the ones used on the
 ```
 % my configs
 
-%%% Always use CSS-friendly tags in HTML
-%!options(html): --css-sugar
-
-%%% Change the default TOC depth for all targets
-%!options: --toc-level 4
-
-%%% Set the default encoding for all documents
-%!options: --encoding UTF-8
+%%% Add a TOC for all targets.
+%!options: --toc
 ```
 
 Any line that is not blank, a comment or a valid config line will raise
@@ -762,9 +748,6 @@ document CONFAREA for settings and if found, they are applied also,
 overriding the RC ones in case of conflict. Finally comes the command
 line options, stronger than the other two.
 
-So, if the document encoding was defined on the three resources, the
-command line will be the one used.
-
 -----------------------------------------------------------------------
 
 == %!include command ==[include]
@@ -1348,14 +1331,14 @@ specification and the source filename from the ending.
 
 For example, if you do use this command line to convert your document:
 
-``` $ txt2tags -t html --toc --toc-level 2 --enum-title file.t2t
+``` $ txt2tags -t html --toc --enum-title file.t2t
 
 You can save yourself from typing pain using this Options setting inside
 the document source:
 
 ```
 %!target: html
-%!options(html): --toc --toc-level 2 --enum-title
+%!options(html): --toc --enum-title
 ```
 
 Now the options are registered inside the source file, so you can convert it with this simple command:
@@ -1366,37 +1349,6 @@ Now the options are registered inside the source file, so you can convert it wit
 
 -----------------------------------------------------------------------
 
-== %!encoding ==[setting-encoding]
-
-The Encoding setting is needed by non-english writers, who uses
-accented letters and other locale specific details, so the target
-document //Character Set// must be customized (if allowed).
-
-The valid values for the Encoding setting are the same charset names
-valid for HTML documents, like //iso-8859-1// and //koi8-r//. If
-you're not sure which encoding you should use, try //utf-8//. If that doesn't work,
-[this complete (and long!) list http://www.iana.org/assignments/character-sets]
-should help.
-
-The LaTeX target uses alias names for encoding. This is not a problem
-for the user, because txt2tags translate the names internally. Some
-examples:
-
-      || txt2tags/HTML   |  >  | LaTeX  |
-       | windows-1250    | >>> | cp1250 |
-       | windows-1252    | >>> | cp1252 |
-       | ibm850          | >>> | cp850  |
-       | ibm852          | >>> | cp852  |
-       | iso-8859-1      | >>> | latin1 |
-       | iso-8859-2      | >>> | latin2 |
-       | koi8-r          | >>> | koi8-r |
-
-
-If the value is unknown to txt2tags, it will be passed "as is",
-allowing the user to specify custom encodings.
-
------------------------------------------------------------------------
-
 == %!preproc ==[setting-preproc]
 
 The PreProc is an input filter that changes the BODYAREA of the source document. It is a "find
@@ -1501,7 +1453,6 @@ document:
 %!target: sgml
 %!options(sgml): --toc
 %!options(html): --style foo.css
-%!options(txt ): --toc-only --toc-level 2
 ```
 
 In this example, the default target is Sgml and it will use TOC. If the
diff --git a/extras/txt2tagsrc b/extras/txt2tagsrc
index b9abe3b..e808e76 100644
--- a/extras/txt2tagsrc
+++ b/extras/txt2tagsrc
@@ -14,8 +14,7 @@
 %            %!keyword  (target)  :  value
 %
 % Keywords:
-%    target, options, encoding, style, preproc, postproc,
-%    guicolors
+%    target, options, style, preproc, postproc
 % Targets:
 %    The valid txt2tags targets (i.e.: html, man, tex)
 %
@@ -33,22 +32,6 @@
 %   Useful if you always use the same target for all documents
 %%!target: html
 
-% Set the default encoding for all documents
-%   Examples: iso-8859-1, UTF-8
-%   This can be turned off later with --no-encoding
-%%!encoding: UTF-8
-
-% Set the TOC depth for all targets
-%   Valid values: 1, 2, 3, 4, 5
-%   The default is 3
-%%!options: --toc-level 2
-
-% Always mask e-mails from robots in HTML and MOIN documents
-%   Example: john@company.com turns to <john (a) company com>
-%   This can be turned off later with --no-mask-email
-%%!options(html): --mask-email
-%%!options(moin): --mask-email
-
 % Always enumerate all title lines for text output
 %   This can be turned off later with --no-enum-title
 %%!options(txt): --enum-title
diff --git a/samples/module/module-body.py b/samples/module/module-body.py
index 3ee2fb2..e5170f8 100755
--- a/samples/module/module-body.py
+++ b/samples/module/module-body.py
@@ -8,7 +8,6 @@
 #   This way you can fully control txt2tags behavior.
 #
 
-from __future__ import print_function
 
 # Remember to place the 'txt2tags.py' file on the same dir
 import txt2tags
@@ -24,8 +23,6 @@ headers = ["Header 1", "Header 2", "Header 3"]
 config = txt2tags.ConfigMaster()._get_defaults()
 config["outfile"] = txt2tags.MODULEOUT  # results as list
 config["target"] = "html"  # target type: HTML
-config["encoding"] = "UTF-8"  # document encoding
-config["css-sugar"] = 1  # CSS friendly
 config["toc"] = 1  # show Table Of Contents
 
 # The Pre (and Post) processing config is a list of lists:
diff --git a/samples/module/module-full.py b/samples/module/module-full.py
index 8031029..db02a4b 100755
--- a/samples/module/module-full.py
+++ b/samples/module/module-full.py
@@ -7,7 +7,6 @@
 #   No post config or setting is made.
 #
 
-from __future__ import print_function
 
 # Remember to place the 'txt2tags.py' file on the same dir
 import txt2tags
diff --git a/samples/sample.ctx b/samples/sample.ctx
new file mode 100644
index 0000000..9787ac2
--- /dev/null
+++ b/samples/sample.ctx
@@ -0,0 +1,272 @@
+\mainlanguage[en]
+\definecolor[linkcolor][h=0007F0]
+\setupcolors[state=start]
+\setupinteraction[state=start,
+    title={TXT2TAGS SAMPLE},
+    author={Aurelio Jargas},
+    contrastcolor=linkcolor,
+    color=linkcolor,
+    ]
+\placebookmarks[section,subsection,subsubsection]
+\definehead[myheaderone][title]
+\setuphead
+  [myheaderone]
+  [textstyle=cap,
+   align=middle,
+   after=\nowhitespace
+  ]
+\definehead[myheadertwo][subject]
+\setuphead
+  [myheadertwo]
+  [ before=\nowhitespace,
+   align=middle,
+   after=\nowhitespace
+  ]
+\definehead[myheaderthree][subsubject]
+\setuphead
+  [myheaderthree]
+  [before=\nowhitespace,
+   align=middle,
+  ]
+\definedescription
+   [compdesc]
+   [alternative=serried,
+    headstyle=bold,
+    width=broad,
+    ]
+\setupTABLE[frame=off]
+\setupexternalfigures[maxwidth=0.7\textwidth]
+\setupheadertexts[]
+\setupfootertexts[pagenumber]
+\setupwhitespace[medium]
+\setupheads[number=no]
+\starttext
+
+\myheaderone{TXT2TAGS SAMPLE}
+\myheadertwo{Aurelio Jargas}
+
+
+\startsection[title=Introduction, reference=]
+
+Welcome to the txt2tags sample file.
+
+Here you have examples and a brief explanation of all
+marks.
+
+The first 3 lines of the this file are used as headers,
+on the following format:
+
+\starttyping
+line1: document title
+line2: author name, email
+line3: date, version
+\stoptyping
+
+Lines with balanced equal signs = around are titles.
+
+\stopsection
+
+\startsection[title=Fonts and Beautifiers, reference=]
+
+We have two sets of fonts:
+
+The NORMAL type that can be improved with beautifiers.
+
+The TYPEWRITER type that uses monospaced font for
+pre-formatted text.
+
+We will now enter on a subtitle...
+
+\startsubsection[title=Beautifiers, reference=]
+
+The text marks for beautifiers are simple, just as you
+type on a plain text email message.
+
+We use double *, /, - and _ to represent {\bf bold},
+{\em italic}, \overstrike{strike} and \overstrike{underline}.
+
+The {\bf {\em bold italic}} style is also supported as a
+combination.
+
+\stopsubsection
+
+\startsubsection[title=Pre-Formatted Text, reference=]
+
+We can put a code sample or other pre-formatted text:
+
+\starttyping
+  here    is     pre-formatted
+//marks// are  **not**  ``interpreted``
+\stoptyping
+
+And also, it's easy to put a one line pre-formatted
+text:
+
+\starttyping
+prompt$ ls /etc
+\stoptyping
+
+Or use {\tt pre-formatted} inside sentences.
+
+\stopsubsection
+
+\startsubsection[title=More Cosmetics, reference=]
+
+Special entities like email (\goto{duh@somewhere.com}[url(mailto:duh@somewhere.com)]) and
+URL (\goto{http://www.duh.com}[url(http://www.duh.com)]) are detected automagically,
+as well as horizontal lines:
+
+\hairline
+
+\pagebreak
+
+You can also specify an \goto{explicit link}[url(http://duh.org)]
+with label.
+
+And remember,
+
+	\startblockquote
+A TAB in front of the line does a quotation.
+
+		\startblockquote
+More TABs, more depth (if allowed).
+		\stopblockquote
+
+	\stopblockquote
+
+Nice.
+
+\stopsubsection
+
+\stopsection
+
+\startsection[title=Lists, reference=]
+
+A list of items is natural, just putting a {\bf dash} or
+a {\bf plus} at the beginning of the line.
+
+\startsubsection[title=Plain List, reference=]
+
+The dash is the default list identifier. For sublists,
+just add {\bf spaces} at the beginning of the line. More
+spaces, more sublists.
+
+\startitemize[joinedup,nowhite]
+\item earth
+  \startitemize[joinedup,nowhite]
+  \item america
+    \startitemize[joinedup,nowhite]
+    \item south america
+      \startitemize[joinedup,nowhite]
+      \item brazil
+        \startitemize[joinedup,nowhite]
+        \item how deep can i go?
+        \stopitemize
+      \stopitemize
+    \stopitemize
+  \item europe
+    \startitemize[joinedup,nowhite]
+    \item lots of countries
+    \stopitemize
+  \stopitemize
+\item mars
+  \startitemize[joinedup,nowhite]
+  \item who knows?
+  \stopitemize
+\stopitemize
+
+The list ends with {\bf two} consecutive blank lines.
+
+\stopsubsection
+
+\startsubsection[title=Numbered List, reference=]
+
+The same rules as the plain list, just a different
+identifier (plus).
+
+\startitemize[n,joinedup,nowhite]
+\item one
+\item two
+\item three
+  \startitemize[joinedup,nowhite]
+  \item mixed lists!
+  \item what a mess
+    \startitemize[n,joinedup,nowhite]
+    \item counting again
+    \item ...
+    \stopitemize
+  \stopitemize
+\item four
+\stopitemize
+
+\stopsubsection
+
+\startsubsection[title=Definition List, reference=]
+
+The definition list identifier is a colon, followed by
+the term. The term contents is placed on the next line.
+
+\compdesc{orange}
+  a yellow fruit
+\compdesc{apple}
+  a green or red fruit
+\compdesc{other fruits}
+  \startitemize[joinedup,nowhite]
+  \item wee!
+  \item mixing lists
+    \startitemize[n,joinedup,nowhite]
+    \item again!
+    \item and again!
+    \stopitemize
+  \stopitemize
+
+\stopsubsection
+
+\stopsection
+
+\startsection[title=Tables, reference=]
+
+Use pipes to compose table rows and cells.
+Double pipe at the line beginning starts a heading row.
+Natural spaces specify each cell alignment.
+
+\blank[medium]\startalignment[middle]{\bTABLE[frame=on]
+\bTR\bTH{\bf heading 1}\eTH\bTH{\bf heading 2}\eTH\bTH{\bf heading 3}\eTH\eTR
+\bTR\bTD[]cell 1.1\eTD\bTD[align=middle]cell 1.2\eTD\bTD[align=left]cell 1.3\eTD\eTR
+\bTR\bTD[]cell 2.1\eTD\bTD[align=middle]cell 2.2\eTD\bTD[align=left]cell 2.3\eTD\eTR
+\eTABLE}\stopalignment
+
+Without the last pipe, no border:
+
+\blank[medium]\startalignment[middle]{\bTABLE[]
+\bTR\bTH{\bf heading 1}\eTH\bTH{\bf heading 2}\eTH\bTH{\bf heading 3}\eTH\eTR
+\bTR\bTD[]cell 1.1\eTD\bTD[align=middle]cell 1.2\eTD\bTD[align=left]cell 1.3\eTD\eTR
+\bTR\bTD[]cell 2.1\eTD\bTD[align=middle]cell 2.2\eTD\bTD[align=left]cell 2.3\eTD\eTR
+\eTABLE}\stopalignment
+
+\stopsection
+
+\startsection[title=Special Entities, reference=]
+
+Because things were too simple.
+
+\startsubsection[title=Images, reference=]
+
+The image mark is as simple as it can be: {\tt [filename]}.
+
+\startalignment[middle]\dontleavehmode{\externalfigure[img/photo.jpg]}\stopalignment
+
+\startitemize[joinedup,nowhite]
+\item The filename must end in PNG, JPG, GIF, or similar.
+\item No spaces inside the brackets!
+\stopitemize
+
+\hairline
+
+\startalignment[middle]\dontleavehmode{\externalfigure[img/t2tpowered.png]}\stopalignment
+
+\stopsubsection
+
+\stopsection
+
+\stoptext
diff --git a/samples/sample.dbk b/samples/sample.dbk
index 1c991e6..5b417ba 100644
--- a/samples/sample.dbk
+++ b/samples/sample.dbk
@@ -252,6 +252,4 @@ The image mark is as simple as it can be: <code>[filename]</code>.
   </sect2>
 </sect1>
 
-<!-- dbk code generated by txt2tags 3.3 (http://txt2tags.org) -->
-<!-- cmdline: txt2tags -q -\-no-rc -t dbk -o sample.dbk /home/jendrik/projects/txt2tags/samples/sample.t2t -->
 </article>
diff --git a/samples/sample.html b/samples/sample.html
index 45a2111..04d5c3b 100644
--- a/samples/sample.html
+++ b/samples/sample.html
@@ -1,20 +1,26 @@
 <!DOCTYPE html>
-<html>
+<html lang="en">
 <head>
 <meta charset="utf-8">
 <title>TXT2TAGS SAMPLE</title>
-<meta name="generator" content="http://txt2tags.org">
+<meta name="generator" content="https://txt2tags.org">
 <style>
-body{background-color:#fff;color:#000;}
+blockquote{margin: 1em 2em; border-left: 2px solid #999;
+  font-style: oblique; padding-left: 1em;}
+blockquote:first-letter{margin: .2em .1em .1em 0; font-size: 160%; font-weight: bold;}
+blockquote:first-line{font-weight: bold;}
+body{font-family: sans-serif;}
 hr{background-color:#000;border:0;color:#000;}
-hr.heavy{height:5px;}
+hr.heavy{height:2px;}
 hr.light{height:1px;}
 img{border:0;display:block;}
 img.right{margin:0 0 0 auto;}
 img.center{border:0;margin:0 auto;}
-table th,table td{padding:4px;}
-.center,header{text-align:center;}
-table.center {margin-left:auto; margin-right:auto;}
+table{border-collapse: collapse;}
+table th,table td{padding: 3px 7px 2px 7px;}
+table th{background-color: lightgrey;}
+table.center{margin-left:auto; margin-right:auto;}
+.center{text-align:center;}
 .right{text-align:right;}
 .left{text-align:left;}
 .tableborder,.tableborder td,.tableborder th{border:1px solid #000;}
@@ -28,9 +34,9 @@ table.center {margin-left:auto; margin-right:auto;}
 <h2>Aurelio Jargas</h2>
 </hgroup>
 </header>
-<article>
 
-<div class="body" id="body">
+
+<div class="body">
 
 <section>
 <h1>Introduction</h1>
@@ -353,6 +359,4 @@ The image mark is as simple as it can be: <code>[filename]</code>.
 </section>
 </div>
 
-<!-- html code generated by txt2tags 3.3 (http://txt2tags.org) -->
-<!-- cmdline: txt2tags -q -\-no-rc -t html -o sample.html /home/jendrik/projects/txt2tags/samples/sample.t2t -->
-</article></body></html>
+</body></html>
diff --git a/samples/sample.lout b/samples/sample.lout
index 153da0c..c2ae100 100644
--- a/samples/sample.lout
+++ b/samples/sample.lout
@@ -287,6 +287,4 @@ The image mark is as simple as it can be: {@F {[filename]}}.
  @EndSubSections
 @End @Section
 @EndSections
-# lout code generated by txt2tags 3.3 (http://txt2tags.org)
-# cmdline: txt2tags -q --no-rc -t lout -o sample.lout /home/jendrik/projects/txt2tags/samples/sample.t2t
 @End @Text
diff --git a/samples/sample.man b/samples/sample.man
index b985b94..c89ab40 100644
--- a/samples/sample.man
+++ b/samples/sample.man
@@ -241,5 +241,3 @@ No spaces inside the brackets!
 .P
 img/t2tpowered.png
 
-.\" man code generated by txt2tags 3.3 (http://txt2tags.org)
-.\" cmdline: txt2tags -q --no-rc -t man -o sample.man /home/jendrik/projects/txt2tags/samples/sample.t2t
diff --git a/samples/sample.md b/samples/sample.md
new file mode 100644
index 0000000..16743b8
--- /dev/null
+++ b/samples/sample.md
@@ -0,0 +1,163 @@
+TXT2TAGS SAMPLE
+Aurelio Jargas
+
+
+# Introduction 
+
+Welcome to the txt2tags sample file.
+
+Here you have examples and a brief explanation of all
+marks.
+
+The first 3 lines of the this file are used as headers,
+on the following format:
+
+    line1: document title
+    line2: author name, email
+    line3: date, version
+
+Lines with balanced equal signs = around are titles.
+
+# Fonts and Beautifiers 
+
+We have two sets of fonts:
+
+The NORMAL type that can be improved with beautifiers.
+
+The TYPEWRITER type that uses monospaced font for
+pre-formatted text.
+
+We will now enter on a subtitle...
+
+## Beautifiers 
+
+The text marks for beautifiers are simple, just as you
+type on a plain text email message.
+
+We use double *, /, - and _ to represent **bold**,
+*italic*, ~~strike~~ and underline.
+
+The ***bold italic*** style is also supported as a
+combination.
+
+## Pre-Formatted Text 
+
+We can put a code sample or other pre-formatted text:
+
+      here    is     pre-formatted
+    //marks// are  **not**  ``interpreted``
+
+And also, it's easy to put a one line pre-formatted
+text:
+
+    prompt$ ls /etc
+
+Or use `pre-formatted` inside sentences.
+
+## More Cosmetics 
+
+Special entities like email (<duh@somewhere.com>) and
+URL (http://www.duh.com) are detected automagically,
+as well as horizontal lines:
+
+---
+
+---
+
+You can also specify an [explicit link](http://duh.org)
+with label.
+
+And remember,
+
+> A TAB in front of the line does a quotation.
+> > More TABs, more depth (if allowed).
+
+Nice.
+
+# Lists 
+
+A list of items is natural, just putting a **dash** or
+a **plus** at the beginning of the line.
+
+## Plain List 
+
+The dash is the default list identifier. For sublists,
+just add **spaces** at the beginning of the line. More
+spaces, more sublists.
+
+ * earth
+  * america
+   * south america
+    * brazil
+     * how deep can i go?
+  * europe
+   * lots of countries
+ * mars
+  * who knows?
+
+The list ends with **two** consecutive blank lines.
+
+## Numbered List 
+
+The same rules as the plain list, just a different
+identifier (plus).
+
+1. one
+1. two
+1. three
+  * mixed lists!
+  * what a mess
+1. counting again
+1. ...
+1. four
+
+## Definition List 
+
+The definition list identifier is a colon, followed by
+the term. The term contents is placed on the next line.
+
+: orange
+a yellow fruit
+: apple
+a green or red fruit
+: other fruits
+  * wee!
+  * mixing lists
+1. again!
+1. and again!
+
+# Tables 
+
+Use pipes to compose table rows and cells.
+Double pipe at the line beginning starts a heading row.
+Natural spaces specify each cell alignment.
+
+| heading 1 |heading 2 |heading 3|
+|---|---|---|
+|cell 1.1 |cell 1.2 |cell 1.3|
+|cell 2.1 |cell 2.2 |cell 2.3|
+
+Without the last pipe, no border:
+
+| heading 1 |heading 2 |heading 3|
+|---|---|---|
+|cell 1.1 |cell 1.2 |cell 1.3|
+|cell 2.1 |cell 2.2 |cell 2.3|
+
+# Special Entities 
+
+Because things were too simple.
+
+## Images 
+
+The image mark is as simple as it can be: `[filename]`.
+
+![](img/photo.jpg)
+
+ * The filename must end in PNG, JPG, GIF, or similar.
+ * No spaces inside the brackets!
+
+---
+
+![](img/t2tpowered.png)
+
diff --git a/samples/sample.mgp b/samples/sample.mgp
index 27ec402..2b067ed 100644
--- a/samples/sample.mgp
+++ b/samples/sample.mgp
@@ -339,6 +339,4 @@ The image mark is as simple as it can be:
 %left
 
 
-%% mgp code generated by txt2tags 3.3 (http://txt2tags.org)
-%% cmdline: txt2tags -q --no-rc -t mgp -o sample.mgp /home/jendrik/projects/txt2tags/samples/sample.t2t
 %%EOD
diff --git a/samples/sample.moin b/samples/sample.moin
index d790a63..1ac76a5 100644
--- a/samples/sample.moin
+++ b/samples/sample.moin
@@ -166,5 +166,3 @@ The image mark is as simple as it can be: {{{[filename]}}}.
 
 [img/t2tpowered.png]
 
-/* moin code generated by txt2tags 3.3 (http://txt2tags.org) */
-/* cmdline: txt2tags -q --no-rc -t moin -o sample.moin /home/jendrik/projects/txt2tags/samples/sample.t2t */
diff --git a/samples/sample.sgml b/samples/sample.sgml
index eea2706..a48e069 100644
--- a/samples/sample.sgml
+++ b/samples/sample.sgml
@@ -230,6 +230,4 @@ The image mark is as simple as it can be: <tt>&lsqb;filename]</tt>.
 <p>
 <figure><ph vspace=""><img src="img/t2tpowered.png"></figure>
 
-<!-- sgml code generated by txt2tags 3.3 (http://txt2tags.org) -->
-<!-- cmdline: txt2tags -q -\-no-rc -t sgml -o sample.sgml /home/jendrik/projects/txt2tags/samples/sample.t2t -->
 </article>
diff --git a/samples/sample.t2t b/samples/sample.t2t
index ea0c542..d77cf2f 100644
--- a/samples/sample.t2t
+++ b/samples/sample.t2t
@@ -1,9 +1,6 @@
 TXT2TAGS SAMPLE
 Aurelio Jargas
 
-
-%!encoding: utf-8
-
                   =  Introduction  =
 
 Welcome to the txt2tags sample file.
diff --git a/samples/sample.tex b/samples/sample.tex
index 4aa59e6..5a46e6c 100644
--- a/samples/sample.tex
+++ b/samples/sample.tex
@@ -1,4 +1,5 @@
 \documentclass{article}
+\usepackage{booktabs} % needed for tables
 \usepackage{graphicx}
 \usepackage{paralist} % needed for compact lists
 \usepackage[normalem]{ulem} % needed by strike
@@ -176,19 +177,21 @@ Use pipes to compose table rows and cells.
 Double pipe at the line beginning starts a heading row.
 Natural spaces specify each cell alignment.
 
-\begin{center}\begin{tabular}{|l|c|r|}
-\hline \textbf{heading 1} & \textbf{heading 2} & \textbf{heading 3} \\
-\hline cell 1.1 & cell 1.2 & cell 1.3 \\
-\hline cell 2.1 & cell 2.2 & cell 2.3 \\
-\hline \end{tabular}\end{center}
+\begin{tabular}{@{}lcr@{}}
+heading 1 & heading 2 & heading 3 \\
+\midrule
+cell 1.1 & cell 1.2 & cell 1.3 \\
+cell 2.1 & cell 2.2 & cell 2.3 \\
+\end{tabular}
 
 Without the last pipe, no border:
 
-\begin{center}\begin{tabular}{lcr}
-\textbf{heading 1} & \textbf{heading 2} & \textbf{heading 3} \\
+\begin{tabular}{@{}lcr@{}}
+heading 1 & heading 2 & heading 3 \\
+\midrule
 cell 1.1 & cell 1.2 & cell 1.3 \\
 cell 2.1 & cell 2.2 & cell 2.3 \\
-\end{tabular}\end{center}
+\end{tabular}
 
 \section*{Special Entities}
 
@@ -209,6 +212,4 @@ The image mark is as simple as it can be: \texttt{[filename]}.
 
 \includegraphics{img/t2tpowered.png}
 
-% LaTeX2e code generated by txt2tags 3.3 (http://txt2tags.org)
-% cmdline: txt2tags -q --no-rc -t tex -o sample.tex /home/jendrik/projects/txt2tags/samples/sample.t2t
 \end{document}
diff --git a/samples/sample.wiki b/samples/sample.wiki
index f48e807..131f064 100644
--- a/samples/sample.wiki
+++ b/samples/sample.wiki
@@ -181,5 +181,3 @@ The image mark is as simple as it can be: <tt>[filename]</tt>.
 
 [[Image:img/t2tpowered.png|center]]
 
-<!-- wiki code generated by txt2tags 3.3 (http://txt2tags.org) -->
-<!-- cmdline: txt2tags -q -\-no-rc -t wiki -o sample.wiki /home/jendrik/projects/txt2tags/samples/sample.t2t -->
diff --git a/setup.py b/setup.py
index 2e5092b..52e187d 100644
--- a/setup.py
+++ b/setup.py
@@ -41,18 +41,18 @@ setuptools.setup(
         "Intended Audience :: End Users/Desktop",
         "License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+)",
         "Programming Language :: Python",
-        "Programming Language :: Python :: 2",
-        "Programming Language :: Python :: 2.7",
         "Programming Language :: Python :: 3",
-        "Programming Language :: Python :: 3.5",
-        "Programming Language :: Python :: 3.6",
         "Programming Language :: Python :: 3.7",
+        "Programming Language :: Python :: 3.8",
+        "Programming Language :: Python :: 3.9",
+        "Programming Language :: Python :: 3.10",
+        "Programming Language :: Python :: 3.11",
         "Programming Language :: Python :: Implementation :: CPython",
         "Programming Language :: Python :: Implementation :: PyPy",
         "Topic :: Text Processing :: Markup",
     ],
     py_modules=["txt2tags"],
     entry_points={"console_scripts": ["txt2tags=txt2tags:exec_command_line"]},
-    python_requires=">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*",
+    python_requires=">=3.7",
     tests_require=["tox"],
 )
diff --git a/test/bugs/run.py b/test/bugs/run.py
index 029ac97..68140f6 100644
--- a/test/bugs/run.py
+++ b/test/bugs/run.py
@@ -6,7 +6,6 @@
 # In older releases they dump an ugly Error Traceback.
 #
 
-from __future__ import print_function
 
 import glob
 import sys
diff --git a/test/crossing/ok/bar.html b/test/crossing/ok/bar.html
index c6ff797..9b7d842 100644
--- a/test/crossing/ok/bar.html
+++ b/test/crossing/ok/bar.html
@@ -1,4 +1,4 @@
-<div class="body" id="body">
+<div class="body">
 
 <section~A~>
 <h1></h1>
diff --git a/test/crossing/ok/bar2.html b/test/crossing/ok/bar2.html
index e695038..c8c6c97 100644
--- a/test/crossing/ok/bar2.html
+++ b/test/crossing/ok/bar2.html
@@ -1,4 +1,4 @@
-<div class="body" id="body">
+<div class="body">
 
 <section~A~>
 <h1></h1>
diff --git a/test/crossing/ok/comment.html b/test/crossing/ok/comment.html
index 55c8abd..f60a308 100644
--- a/test/crossing/ok/comment.html
+++ b/test/crossing/ok/comment.html
@@ -1,4 +1,4 @@
-<div class="body" id="body">
+<div class="body">
 
 <section~A~>
 <h1></h1>
diff --git a/test/crossing/ok/deflist.html b/test/crossing/ok/deflist.html
index 7495b73..487d214 100644
--- a/test/crossing/ok/deflist.html
+++ b/test/crossing/ok/deflist.html
@@ -1,4 +1,4 @@
-<div class="body" id="body">
+<div class="body">
 
 <section~A~>
 <h1></h1>
diff --git a/test/crossing/ok/list.html b/test/crossing/ok/list.html
index fed1869..f7f61ca 100644
--- a/test/crossing/ok/list.html
+++ b/test/crossing/ok/list.html
@@ -1,4 +1,4 @@
-<div class="body" id="body">
+<div class="body">
 
 <section~A~>
 <h1></h1>
diff --git a/test/crossing/ok/numlist.html b/test/crossing/ok/numlist.html
index d34aa58..0c3af65 100644
--- a/test/crossing/ok/numlist.html
+++ b/test/crossing/ok/numlist.html
@@ -1,4 +1,4 @@
-<div class="body" id="body">
+<div class="body">
 
 <section~A~>
 <h1></h1>
diff --git a/test/crossing/ok/paragraph.html b/test/crossing/ok/paragraph.html
index 6195228..09ce48a 100644
--- a/test/crossing/ok/paragraph.html
+++ b/test/crossing/ok/paragraph.html
@@ -1,4 +1,4 @@
-<div class="body" id="body">
+<div class="body">
 
 <section~A~>
 <h1></h1>
diff --git a/test/crossing/ok/quote.html b/test/crossing/ok/quote.html
index 190d8ad..753e37b 100644
--- a/test/crossing/ok/quote.html
+++ b/test/crossing/ok/quote.html
@@ -1,4 +1,4 @@
-<div class="body" id="body">
+<div class="body">
 
 <section~A~>
 <h1></h1>
diff --git a/test/crossing/ok/raw.html b/test/crossing/ok/raw.html
index 0e1704e..05220b0 100644
--- a/test/crossing/ok/raw.html
+++ b/test/crossing/ok/raw.html
@@ -1,4 +1,4 @@
-<div class="body" id="body">
+<div class="body">
 
 <section~A~>
 <h1></h1>
diff --git a/test/crossing/ok/table.html b/test/crossing/ok/table.html
index 2014bb1..59094af 100644
--- a/test/crossing/ok/table.html
+++ b/test/crossing/ok/table.html
@@ -1,4 +1,4 @@
-<div class="body" id="body">
+<div class="body">
 
 <section~A~>
 <h1></h1>
diff --git a/test/crossing/ok/tagged.html b/test/crossing/ok/tagged.html
index 8384e10..614af16 100644
--- a/test/crossing/ok/tagged.html
+++ b/test/crossing/ok/tagged.html
@@ -1,4 +1,4 @@
-<div class="body" id="body">
+<div class="body">
 
 <section~A~>
 <h1></h1>
diff --git a/test/crossing/ok/verbatim.html b/test/crossing/ok/verbatim.html
index b85ec91..16cfded 100644
--- a/test/crossing/ok/verbatim.html
+++ b/test/crossing/ok/verbatim.html
@@ -1,4 +1,4 @@
-<div class="body" id="body">
+<div class="body">
 
 <section~A~>
 <h1></h1>
diff --git a/test/crossing/run.py b/test/crossing/run.py
index 9fff041..d81ffbe 100644
--- a/test/crossing/run.py
+++ b/test/crossing/run.py
@@ -3,7 +3,6 @@
 # See also: ../run.py ../lib.py
 #
 
-from __future__ import print_function
 
 import glob
 import os
diff --git a/test/gotchas/ok/list-bumping.html b/test/gotchas/ok/list-bumping.html
index 44882d6..a10c047 100644
--- a/test/gotchas/ok/list-bumping.html
+++ b/test/gotchas/ok/list-bumping.html
@@ -1,4 +1,4 @@
-<div class="body" id="body">
+<div class="body">
 
 <section~A~>
 <h1></h1>
diff --git a/test/gotchas/ok/sublist-before-list.html b/test/gotchas/ok/sublist-before-list.html
index e8b7d73..b84b2dd 100644
--- a/test/gotchas/ok/sublist-before-list.html
+++ b/test/gotchas/ok/sublist-before-list.html
@@ -1,4 +1,4 @@
-<div class="body" id="body">
+<div class="body">
 
 <section~A~>
 <h1></h1>
diff --git a/test/gotchas/ok/subtitle-before-title-toc.html b/test/gotchas/ok/subtitle-before-title-toc.html
index dc47237..4655f45 100644
--- a/test/gotchas/ok/subtitle-before-title-toc.html
+++ b/test/gotchas/ok/subtitle-before-title-toc.html
@@ -1,27 +1,30 @@
-<div class="body" id="body">
+<div class="body">
 
-    <ul>
-    <li><a href="#toc1">0.1. Subtitle before title</a>
-      <ul>
-      <li><a href="#toc2">0.1.1. Before, level 3</a>
-      </li>
-      </ul>
-    </li>
-    <li><a href="#toc3">0.2. Before, level 2</a>
-    </li>
-    </ul>
+<section~A~>
+<h1></h1>
+<section>
+<h2>0.1. Subtitle before title</h2>
 
-  <ol>
-  <li><a href="#toc4">Heading 1</a>
-    <ul>
-    <li><a href="#toc5">1.1. After, level 2</a>
-      <ul>
-      <li><a href="#toc6">1.1.1. After, level 3</a>
-      </li>
-      </ul>
-    </li>
-    </ul>
-  </li>
-  </ol>
+<section>
+<h3>0.1.1. Before, level 3</h3>
 
+</section>
+</section>
+<section>
+<h2>0.2. Before, level 2</h2>
+
+</section>
+</section>
+<section>
+<h1>1. Heading 1</h1>
+
+<section>
+<h2>1.1. After, level 2</h2>
+
+<section>
+<h3>1.1.1. After, level 3</h3>
+
+</section>
+</section>
+</section>
 </div>
diff --git a/test/gotchas/ok/subtitle-before-title.html b/test/gotchas/ok/subtitle-before-title.html
index 8bd629e..4655f45 100644
--- a/test/gotchas/ok/subtitle-before-title.html
+++ b/test/gotchas/ok/subtitle-before-title.html
@@ -1,4 +1,4 @@
-<div class="body" id="body">
+<div class="body">
 
 <section~A~>
 <h1></h1>
diff --git a/test/gotchas/subtitle-before-title-toc.t2t b/test/gotchas/subtitle-before-title-toc.t2t
index fc6fae6..7d8044e 100644
--- a/test/gotchas/subtitle-before-title-toc.t2t
+++ b/test/gotchas/subtitle-before-title-toc.t2t
@@ -1,6 +1,6 @@
 
 %!includeconf: test.conf
-%!options: -n --toc-only -o subtitle-before-title-toc.html
+%!options: -n -o subtitle-before-title-toc.html
 
 %!postproc: title$	title on TOC
 
diff --git a/test/headers/ok/1.html b/test/headers/ok/1.html
index 4af5a72..926c345 100644
--- a/test/headers/ok/1.html
+++ b/test/headers/ok/1.html
@@ -4,16 +4,23 @@
 
 
 
-body{background-color:#fff;color:#000;}
+
+blockquote{margin: 1em 2em; border-left: 2px solid #999;
+  font-style: oblique; padding-left: 1em;}
+blockquote:first-letter{margin: .2em .1em .1em 0; font-size: 160%; font-weight: bold;}
+blockquote:first-line{font-weight: bold;}
+body{font-family: sans-serif;}
 hr{background-color:#000;border:0;color:#000;}
-hr.heavy{height:5px;}
+hr.heavy{height:2px;}
 hr.light{height:1px;}
 img{border:0;display:block;}
 img.right{margin:0 0 0 auto;}
 img.center{border:0;margin:0 auto;}
-table th,table td{padding:4px;}
-.center,header{text-align:center;}
-table.center {margin-left:auto; margin-right:auto;}
+table{border-collapse: collapse;}
+table th,table td{padding: 3px 7px 2px 7px;}
+table th{background-color: lightgrey;}
+table.center{margin-left:auto; margin-right:auto;}
+.center{text-align:center;}
 .right{text-align:right;}
 .left{text-align:left;}
 .tableborder,.tableborder td,.tableborder th{border:1px solid #000;}
@@ -32,5 +39,3 @@ table.center {margin-left:auto; margin-right:auto;}
 
 
 
-
-
diff --git a/test/headers/ok/12.html b/test/headers/ok/12.html
index 603a466..607e6af 100644
--- a/test/headers/ok/12.html
+++ b/test/headers/ok/12.html
@@ -4,16 +4,23 @@
 
 
 
-body{background-color:#fff;color:#000;}
+
+blockquote{margin: 1em 2em; border-left: 2px solid #999;
+  font-style: oblique; padding-left: 1em;}
+blockquote:first-letter{margin: .2em .1em .1em 0; font-size: 160%; font-weight: bold;}
+blockquote:first-line{font-weight: bold;}
+body{font-family: sans-serif;}
 hr{background-color:#000;border:0;color:#000;}
-hr.heavy{height:5px;}
+hr.heavy{height:2px;}
 hr.light{height:1px;}
 img{border:0;display:block;}
 img.right{margin:0 0 0 auto;}
 img.center{border:0;margin:0 auto;}
-table th,table td{padding:4px;}
-.center,header{text-align:center;}
-table.center {margin-left:auto; margin-right:auto;}
+table{border-collapse: collapse;}
+table th,table td{padding: 3px 7px 2px 7px;}
+table th{background-color: lightgrey;}
+table.center{margin-left:auto; margin-right:auto;}
+.center{text-align:center;}
 .right{text-align:right;}
 .left{text-align:left;}
 .tableborder,.tableborder td,.tableborder th{border:1px solid #000;}
@@ -33,5 +40,3 @@ table.center {margin-left:auto; margin-right:auto;}
 
 
 
-
-
diff --git a/test/headers/ok/123.html b/test/headers/ok/123.html
index 8fca556..0b42537 100644
--- a/test/headers/ok/123.html
+++ b/test/headers/ok/123.html
@@ -4,16 +4,23 @@
 
 
 
-body{background-color:#fff;color:#000;}
+
+blockquote{margin: 1em 2em; border-left: 2px solid #999;
+  font-style: oblique; padding-left: 1em;}
+blockquote:first-letter{margin: .2em .1em .1em 0; font-size: 160%; font-weight: bold;}
+blockquote:first-line{font-weight: bold;}
+body{font-family: sans-serif;}
 hr{background-color:#000;border:0;color:#000;}
-hr.heavy{height:5px;}
+hr.heavy{height:2px;}
 hr.light{height:1px;}
 img{border:0;display:block;}
 img.right{margin:0 0 0 auto;}
 img.center{border:0;margin:0 auto;}
-table th,table td{padding:4px;}
-.center,header{text-align:center;}
-table.center {margin-left:auto; margin-right:auto;}
+table{border-collapse: collapse;}
+table th,table td{padding: 3px 7px 2px 7px;}
+table th{background-color: lightgrey;}
+table.center{margin-left:auto; margin-right:auto;}
+.center{text-align:center;}
 .right{text-align:right;}
 .left{text-align:left;}
 .tableborder,.tableborder td,.tableborder th{border:1px solid #000;}
@@ -34,5 +41,3 @@ table.center {margin-left:auto; margin-right:auto;}
 
 
 
-
-
diff --git a/test/headers/ok/123b.html b/test/headers/ok/123b.html
index 5c9aeab..a457e8e 100644
--- a/test/headers/ok/123b.html
+++ b/test/headers/ok/123b.html
@@ -4,16 +4,23 @@
 
 
 
-body{background-color:#fff;color:#000;}
+
+blockquote{margin: 1em 2em; border-left: 2px solid #999;
+  font-style: oblique; padding-left: 1em;}
+blockquote:first-letter{margin: .2em .1em .1em 0; font-size: 160%; font-weight: bold;}
+blockquote:first-line{font-weight: bold;}
+body{font-family: sans-serif;}
 hr{background-color:#000;border:0;color:#000;}
-hr.heavy{height:5px;}
+hr.heavy{height:2px;}
 hr.light{height:1px;}
 img{border:0;display:block;}
 img.right{margin:0 0 0 auto;}
 img.center{border:0;margin:0 auto;}
-table th,table td{padding:4px;}
-.center,header{text-align:center;}
-table.center {margin-left:auto; margin-right:auto;}
+table{border-collapse: collapse;}
+table th,table td{padding: 3px 7px 2px 7px;}
+table th{background-color: lightgrey;}
+table.center{margin-left:auto; margin-right:auto;}
+.center{text-align:center;}
 .right{text-align:right;}
 .left{text-align:left;}
 .tableborder,.tableborder td,.tableborder th{border:1px solid #000;}
@@ -37,5 +44,3 @@ body: Text.
 
 
 
-
-
diff --git a/test/headers/ok/123eb.html b/test/headers/ok/123eb.html
index 5c9aeab..a457e8e 100644
--- a/test/headers/ok/123eb.html
+++ b/test/headers/ok/123eb.html
@@ -4,16 +4,23 @@
 
 
 
-body{background-color:#fff;color:#000;}
+
+blockquote{margin: 1em 2em; border-left: 2px solid #999;
+  font-style: oblique; padding-left: 1em;}
+blockquote:first-letter{margin: .2em .1em .1em 0; font-size: 160%; font-weight: bold;}
+blockquote:first-line{font-weight: bold;}
+body{font-family: sans-serif;}
 hr{background-color:#000;border:0;color:#000;}
-hr.heavy{height:5px;}
+hr.heavy{height:2px;}
 hr.light{height:1px;}
 img{border:0;display:block;}
 img.right{margin:0 0 0 auto;}
 img.center{border:0;margin:0 auto;}
-table th,table td{padding:4px;}
-.center,header{text-align:center;}
-table.center {margin-left:auto; margin-right:auto;}
+table{border-collapse: collapse;}
+table th,table td{padding: 3px 7px 2px 7px;}
+table th{background-color: lightgrey;}
+table.center{margin-left:auto; margin-right:auto;}
+.center{text-align:center;}
 .right{text-align:right;}
 .left{text-align:left;}
 .tableborder,.tableborder td,.tableborder th{border:1px solid #000;}
@@ -37,5 +44,3 @@ body: Text.
 
 
 
-
-
diff --git a/test/headers/ok/123k.html b/test/headers/ok/123k.html
index 8fca556..0b42537 100644
--- a/test/headers/ok/123k.html
+++ b/test/headers/ok/123k.html
@@ -4,16 +4,23 @@
 
 
 
-body{background-color:#fff;color:#000;}
+
+blockquote{margin: 1em 2em; border-left: 2px solid #999;
+  font-style: oblique; padding-left: 1em;}
+blockquote:first-letter{margin: .2em .1em .1em 0; font-size: 160%; font-weight: bold;}
+blockquote:first-line{font-weight: bold;}
+body{font-family: sans-serif;}
 hr{background-color:#000;border:0;color:#000;}
-hr.heavy{height:5px;}
+hr.heavy{height:2px;}
 hr.light{height:1px;}
 img{border:0;display:block;}
 img.right{margin:0 0 0 auto;}
 img.center{border:0;margin:0 auto;}
-table th,table td{padding:4px;}
-.center,header{text-align:center;}
-table.center {margin-left:auto; margin-right:auto;}
+table{border-collapse: collapse;}
+table th,table td{padding: 3px 7px 2px 7px;}
+table th{background-color: lightgrey;}
+table.center{margin-left:auto; margin-right:auto;}
+.center{text-align:center;}
 .right{text-align:right;}
 .left{text-align:left;}
 .tableborder,.tableborder td,.tableborder th{border:1px solid #000;}
@@ -34,5 +41,3 @@ table.center {margin-left:auto; margin-right:auto;}
 
 
 
-
-
diff --git a/test/headers/ok/123kb.html b/test/headers/ok/123kb.html
index 5c9aeab..a457e8e 100644
--- a/test/headers/ok/123kb.html
+++ b/test/headers/ok/123kb.html
@@ -4,16 +4,23 @@
 
 
 
-body{background-color:#fff;color:#000;}
+
+blockquote{margin: 1em 2em; border-left: 2px solid #999;
+  font-style: oblique; padding-left: 1em;}
+blockquote:first-letter{margin: .2em .1em .1em 0; font-size: 160%; font-weight: bold;}
+blockquote:first-line{font-weight: bold;}
+body{font-family: sans-serif;}
 hr{background-color:#000;border:0;color:#000;}
-hr.heavy{height:5px;}
+hr.heavy{height:2px;}
 hr.light{height:1px;}
 img{border:0;display:block;}
 img.right{margin:0 0 0 auto;}
 img.center{border:0;margin:0 auto;}
-table th,table td{padding:4px;}
-.center,header{text-align:center;}
-table.center {margin-left:auto; margin-right:auto;}
+table{border-collapse: collapse;}
+table th,table td{padding: 3px 7px 2px 7px;}
+table th{background-color: lightgrey;}
+table.center{margin-left:auto; margin-right:auto;}
+.center{text-align:center;}
 .right{text-align:right;}
 .left{text-align:left;}
 .tableborder,.tableborder td,.tableborder th{border:1px solid #000;}
@@ -37,5 +44,3 @@ body: Text.
 
 
 
-
-
diff --git a/test/headers/ok/12cb.html b/test/headers/ok/12cb.html
index 5c9aeab..a457e8e 100644
--- a/test/headers/ok/12cb.html
+++ b/test/headers/ok/12cb.html
@@ -4,16 +4,23 @@
 
 
 
-body{background-color:#fff;color:#000;}
+
+blockquote{margin: 1em 2em; border-left: 2px solid #999;
+  font-style: oblique; padding-left: 1em;}
+blockquote:first-letter{margin: .2em .1em .1em 0; font-size: 160%; font-weight: bold;}
+blockquote:first-line{font-weight: bold;}
+body{font-family: sans-serif;}
 hr{background-color:#000;border:0;color:#000;}
-hr.heavy{height:5px;}
+hr.heavy{height:2px;}
 hr.light{height:1px;}
 img{border:0;display:block;}
 img.right{margin:0 0 0 auto;}
 img.center{border:0;margin:0 auto;}
-table th,table td{padding:4px;}
-.center,header{text-align:center;}
-table.center {margin-left:auto; margin-right:auto;}
+table{border-collapse: collapse;}
+table th,table td{padding: 3px 7px 2px 7px;}
+table th{background-color: lightgrey;}
+table.center{margin-left:auto; margin-right:auto;}
+.center{text-align:center;}
 .right{text-align:right;}
 .left{text-align:left;}
 .tableborder,.tableborder td,.tableborder th{border:1px solid #000;}
@@ -37,5 +44,3 @@ body: Text.
 
 
 
-
-
diff --git a/test/headers/ok/12e.html b/test/headers/ok/12e.html
index 603a466..607e6af 100644
--- a/test/headers/ok/12e.html
+++ b/test/headers/ok/12e.html
@@ -4,16 +4,23 @@
 
 
 
-body{background-color:#fff;color:#000;}
+
+blockquote{margin: 1em 2em; border-left: 2px solid #999;
+  font-style: oblique; padding-left: 1em;}
+blockquote:first-letter{margin: .2em .1em .1em 0; font-size: 160%; font-weight: bold;}
+blockquote:first-line{font-weight: bold;}
+body{font-family: sans-serif;}
 hr{background-color:#000;border:0;color:#000;}
-hr.heavy{height:5px;}
+hr.heavy{height:2px;}
 hr.light{height:1px;}
 img{border:0;display:block;}
 img.right{margin:0 0 0 auto;}
 img.center{border:0;margin:0 auto;}
-table th,table td{padding:4px;}
-.center,header{text-align:center;}
-table.center {margin-left:auto; margin-right:auto;}
+table{border-collapse: collapse;}
+table th,table td{padding: 3px 7px 2px 7px;}
+table th{background-color: lightgrey;}
+table.center{margin-left:auto; margin-right:auto;}
+.center{text-align:center;}
 .right{text-align:right;}
 .left{text-align:left;}
 .tableborder,.tableborder td,.tableborder th{border:1px solid #000;}
@@ -33,5 +40,3 @@ table.center {margin-left:auto; margin-right:auto;}
 
 
 
-
-
diff --git a/test/headers/ok/12eb.html b/test/headers/ok/12eb.html
index 53894a2..a9f040b 100644
--- a/test/headers/ok/12eb.html
+++ b/test/headers/ok/12eb.html
@@ -4,16 +4,23 @@
 
 
 
-body{background-color:#fff;color:#000;}
+
+blockquote{margin: 1em 2em; border-left: 2px solid #999;
+  font-style: oblique; padding-left: 1em;}
+blockquote:first-letter{margin: .2em .1em .1em 0; font-size: 160%; font-weight: bold;}
+blockquote:first-line{font-weight: bold;}
+body{font-family: sans-serif;}
 hr{background-color:#000;border:0;color:#000;}
-hr.heavy{height:5px;}
+hr.heavy{height:2px;}
 hr.light{height:1px;}
 img{border:0;display:block;}
 img.right{margin:0 0 0 auto;}
 img.center{border:0;margin:0 auto;}
-table th,table td{padding:4px;}
-.center,header{text-align:center;}
-table.center {margin-left:auto; margin-right:auto;}
+table{border-collapse: collapse;}
+table th,table td{padding: 3px 7px 2px 7px;}
+table th{background-color: lightgrey;}
+table.center{margin-left:auto; margin-right:auto;}
+.center{text-align:center;}
 .right{text-align:right;}
 .left{text-align:left;}
 .tableborder,.tableborder td,.tableborder th{border:1px solid #000;}
@@ -36,5 +43,3 @@ body: Text.
 
 
 
-
-
diff --git a/test/headers/ok/1c3b.html b/test/headers/ok/1c3b.html
index 5c9aeab..a457e8e 100644
--- a/test/headers/ok/1c3b.html
+++ b/test/headers/ok/1c3b.html
@@ -4,16 +4,23 @@
 
 
 
-body{background-color:#fff;color:#000;}
+
+blockquote{margin: 1em 2em; border-left: 2px solid #999;
+  font-style: oblique; padding-left: 1em;}
+blockquote:first-letter{margin: .2em .1em .1em 0; font-size: 160%; font-weight: bold;}
+blockquote:first-line{font-weight: bold;}
+body{font-family: sans-serif;}
 hr{background-color:#000;border:0;color:#000;}
-hr.heavy{height:5px;}
+hr.heavy{height:2px;}
 hr.light{height:1px;}
 img{border:0;display:block;}
 img.right{margin:0 0 0 auto;}
 img.center{border:0;margin:0 auto;}
-table th,table td{padding:4px;}
-.center,header{text-align:center;}
-table.center {margin-left:auto; margin-right:auto;}
+table{border-collapse: collapse;}
+table th,table td{padding: 3px 7px 2px 7px;}
+table th{background-color: lightgrey;}
+table.center{margin-left:auto; margin-right:auto;}
+.center{text-align:center;}
 .right{text-align:right;}
 .left{text-align:left;}
 .tableborder,.tableborder td,.tableborder th{border:1px solid #000;}
@@ -37,5 +44,3 @@ body: Text.
 
 
 
-
-
diff --git a/test/headers/ok/1ccb.html b/test/headers/ok/1ccb.html
index 5c9aeab..a457e8e 100644
--- a/test/headers/ok/1ccb.html
+++ b/test/headers/ok/1ccb.html
@@ -4,16 +4,23 @@
 
 
 
-body{background-color:#fff;color:#000;}
+
+blockquote{margin: 1em 2em; border-left: 2px solid #999;
+  font-style: oblique; padding-left: 1em;}
+blockquote:first-letter{margin: .2em .1em .1em 0; font-size: 160%; font-weight: bold;}
+blockquote:first-line{font-weight: bold;}
+body{font-family: sans-serif;}
 hr{background-color:#000;border:0;color:#000;}
-hr.heavy{height:5px;}
+hr.heavy{height:2px;}
 hr.light{height:1px;}
 img{border:0;display:block;}
 img.right{margin:0 0 0 auto;}
 img.center{border:0;margin:0 auto;}
-table th,table td{padding:4px;}
-.center,header{text-align:center;}
-table.center {margin-left:auto; margin-right:auto;}
+table{border-collapse: collapse;}
+table th,table td{padding: 3px 7px 2px 7px;}
+table th{background-color: lightgrey;}
+table.center{margin-left:auto; margin-right:auto;}
+.center{text-align:center;}
 .right{text-align:right;}
 .left{text-align:left;}
 .tableborder,.tableborder td,.tableborder th{border:1px solid #000;}
@@ -37,5 +44,3 @@ body: Text.
 
 
 
-
-
diff --git a/test/headers/ok/1e.html b/test/headers/ok/1e.html
index 4af5a72..926c345 100644
--- a/test/headers/ok/1e.html
+++ b/test/headers/ok/1e.html
@@ -4,16 +4,23 @@
 
 
 
-body{background-color:#fff;color:#000;}
+
+blockquote{margin: 1em 2em; border-left: 2px solid #999;
+  font-style: oblique; padding-left: 1em;}
+blockquote:first-letter{margin: .2em .1em .1em 0; font-size: 160%; font-weight: bold;}
+blockquote:first-line{font-weight: bold;}
+body{font-family: sans-serif;}
 hr{background-color:#000;border:0;color:#000;}
-hr.heavy{height:5px;}
+hr.heavy{height:2px;}
 hr.light{height:1px;}
 img{border:0;display:block;}
 img.right{margin:0 0 0 auto;}
 img.center{border:0;margin:0 auto;}
-table th,table td{padding:4px;}
-.center,header{text-align:center;}
-table.center {margin-left:auto; margin-right:auto;}
+table{border-collapse: collapse;}
+table th,table td{padding: 3px 7px 2px 7px;}
+table th{background-color: lightgrey;}
+table.center{margin-left:auto; margin-right:auto;}
+.center{text-align:center;}
 .right{text-align:right;}
 .left{text-align:left;}
 .tableborder,.tableborder td,.tableborder th{border:1px solid #000;}
@@ -32,5 +39,3 @@ table.center {margin-left:auto; margin-right:auto;}
 
 
 
-
-
diff --git a/test/headers/ok/1e3b.html b/test/headers/ok/1e3b.html
index 53894a2..a9f040b 100644
--- a/test/headers/ok/1e3b.html
+++ b/test/headers/ok/1e3b.html
@@ -4,16 +4,23 @@
 
 
 
-body{background-color:#fff;color:#000;}
+
+blockquote{margin: 1em 2em; border-left: 2px solid #999;
+  font-style: oblique; padding-left: 1em;}
+blockquote:first-letter{margin: .2em .1em .1em 0; font-size: 160%; font-weight: bold;}
+blockquote:first-line{font-weight: bold;}
+body{font-family: sans-serif;}
 hr{background-color:#000;border:0;color:#000;}
-hr.heavy{height:5px;}
+hr.heavy{height:2px;}
 hr.light{height:1px;}
 img{border:0;display:block;}
 img.right{margin:0 0 0 auto;}
 img.center{border:0;margin:0 auto;}
-table th,table td{padding:4px;}
-.center,header{text-align:center;}
-table.center {margin-left:auto; margin-right:auto;}
+table{border-collapse: collapse;}
+table th,table td{padding: 3px 7px 2px 7px;}
+table th{background-color: lightgrey;}
+table.center{margin-left:auto; margin-right:auto;}
+.center{text-align:center;}
 .right{text-align:right;}
 .left{text-align:left;}
 .tableborder,.tableborder td,.tableborder th{border:1px solid #000;}
@@ -36,5 +43,3 @@ body: Text.
 
 
 
-
-
diff --git a/test/headers/ok/1ec.html b/test/headers/ok/1ec.html
index 603a466..607e6af 100644
--- a/test/headers/ok/1ec.html
+++ b/test/headers/ok/1ec.html
@@ -4,16 +4,23 @@
 
 
 
-body{background-color:#fff;color:#000;}
+
+blockquote{margin: 1em 2em; border-left: 2px solid #999;
+  font-style: oblique; padding-left: 1em;}
+blockquote:first-letter{margin: .2em .1em .1em 0; font-size: 160%; font-weight: bold;}
+blockquote:first-line{font-weight: bold;}
+body{font-family: sans-serif;}
 hr{background-color:#000;border:0;color:#000;}
-hr.heavy{height:5px;}
+hr.heavy{height:2px;}
 hr.light{height:1px;}
 img{border:0;display:block;}
 img.right{margin:0 0 0 auto;}
 img.center{border:0;margin:0 auto;}
-table th,table td{padding:4px;}
-.center,header{text-align:center;}
-table.center {margin-left:auto; margin-right:auto;}
+table{border-collapse: collapse;}
+table th,table td{padding: 3px 7px 2px 7px;}
+table th{background-color: lightgrey;}
+table.center{margin-left:auto; margin-right:auto;}
+.center{text-align:center;}
 .right{text-align:right;}
 .left{text-align:left;}
 .tableborder,.tableborder td,.tableborder th{border:1px solid #000;}
@@ -33,5 +40,3 @@ table.center {margin-left:auto; margin-right:auto;}
 
 
 
-
-
diff --git a/test/headers/ok/1ee.html b/test/headers/ok/1ee.html
index 4af5a72..926c345 100644
--- a/test/headers/ok/1ee.html
+++ b/test/headers/ok/1ee.html
@@ -4,16 +4,23 @@
 
 
 
-body{background-color:#fff;color:#000;}
+
+blockquote{margin: 1em 2em; border-left: 2px solid #999;
+  font-style: oblique; padding-left: 1em;}
+blockquote:first-letter{margin: .2em .1em .1em 0; font-size: 160%; font-weight: bold;}
+blockquote:first-line{font-weight: bold;}
+body{font-family: sans-serif;}
 hr{background-color:#000;border:0;color:#000;}
-hr.heavy{height:5px;}
+hr.heavy{height:2px;}
 hr.light{height:1px;}
 img{border:0;display:block;}
 img.right{margin:0 0 0 auto;}
 img.center{border:0;margin:0 auto;}
-table th,table td{padding:4px;}
-.center,header{text-align:center;}
-table.center {margin-left:auto; margin-right:auto;}
+table{border-collapse: collapse;}
+table th,table td{padding: 3px 7px 2px 7px;}
+table th{background-color: lightgrey;}
+table.center{margin-left:auto; margin-right:auto;}
+.center{text-align:center;}
 .right{text-align:right;}
 .left{text-align:left;}
 .tableborder,.tableborder td,.tableborder th{border:1px solid #000;}
@@ -32,5 +39,3 @@ table.center {margin-left:auto; margin-right:auto;}
 
 
 
-
-
diff --git a/test/headers/ok/1eeb.html b/test/headers/ok/1eeb.html
index 9f8c59d..dfae4cf 100644
--- a/test/headers/ok/1eeb.html
+++ b/test/headers/ok/1eeb.html
@@ -4,16 +4,23 @@
 
 
 
-body{background-color:#fff;color:#000;}
+
+blockquote{margin: 1em 2em; border-left: 2px solid #999;
+  font-style: oblique; padding-left: 1em;}
+blockquote:first-letter{margin: .2em .1em .1em 0; font-size: 160%; font-weight: bold;}
+blockquote:first-line{font-weight: bold;}
+body{font-family: sans-serif;}
 hr{background-color:#000;border:0;color:#000;}
-hr.heavy{height:5px;}
+hr.heavy{height:2px;}
 hr.light{height:1px;}
 img{border:0;display:block;}
 img.right{margin:0 0 0 auto;}
 img.center{border:0;margin:0 auto;}
-table th,table td{padding:4px;}
-.center,header{text-align:center;}
-table.center {margin-left:auto; margin-right:auto;}
+table{border-collapse: collapse;}
+table th,table td{padding: 3px 7px 2px 7px;}
+table th{background-color: lightgrey;}
+table.center{margin-left:auto; margin-right:auto;}
+.center{text-align:center;}
 .right{text-align:right;}
 .left{text-align:left;}
 .tableborder,.tableborder td,.tableborder th{border:1px solid #000;}
@@ -35,5 +42,3 @@ body: Text.
 
 
 
-
-
diff --git a/test/headers/ok/c.html b/test/headers/ok/c.html
index 4af5a72..926c345 100644
--- a/test/headers/ok/c.html
+++ b/test/headers/ok/c.html
@@ -4,16 +4,23 @@
 
 
 
-body{background-color:#fff;color:#000;}
+
+blockquote{margin: 1em 2em; border-left: 2px solid #999;
+  font-style: oblique; padding-left: 1em;}
+blockquote:first-letter{margin: .2em .1em .1em 0; font-size: 160%; font-weight: bold;}
+blockquote:first-line{font-weight: bold;}
+body{font-family: sans-serif;}
 hr{background-color:#000;border:0;color:#000;}
-hr.heavy{height:5px;}
+hr.heavy{height:2px;}
 hr.light{height:1px;}
 img{border:0;display:block;}
 img.right{margin:0 0 0 auto;}
 img.center{border:0;margin:0 auto;}
-table th,table td{padding:4px;}
-.center,header{text-align:center;}
-table.center {margin-left:auto; margin-right:auto;}
+table{border-collapse: collapse;}
+table th,table td{padding: 3px 7px 2px 7px;}
+table th{background-color: lightgrey;}
+table.center{margin-left:auto; margin-right:auto;}
+.center{text-align:center;}
 .right{text-align:right;}
 .left{text-align:left;}
 .tableborder,.tableborder td,.tableborder th{border:1px solid #000;}
@@ -32,5 +39,3 @@ table.center {margin-left:auto; margin-right:auto;}
 
 
 
-
-
diff --git a/test/headers/ok/c23b.html b/test/headers/ok/c23b.html
index 5c9aeab..a457e8e 100644
--- a/test/headers/ok/c23b.html
+++ b/test/headers/ok/c23b.html
@@ -4,16 +4,23 @@
 
 
 
-body{background-color:#fff;color:#000;}
+
+blockquote{margin: 1em 2em; border-left: 2px solid #999;
+  font-style: oblique; padding-left: 1em;}
+blockquote:first-letter{margin: .2em .1em .1em 0; font-size: 160%; font-weight: bold;}
+blockquote:first-line{font-weight: bold;}
+body{font-family: sans-serif;}
 hr{background-color:#000;border:0;color:#000;}
-hr.heavy{height:5px;}
+hr.heavy{height:2px;}
 hr.light{height:1px;}
 img{border:0;display:block;}
 img.right{margin:0 0 0 auto;}
 img.center{border:0;margin:0 auto;}
-table th,table td{padding:4px;}
-.center,header{text-align:center;}
-table.center {margin-left:auto; margin-right:auto;}
+table{border-collapse: collapse;}
+table th,table td{padding: 3px 7px 2px 7px;}
+table th{background-color: lightgrey;}
+table.center{margin-left:auto; margin-right:auto;}
+.center{text-align:center;}
 .right{text-align:right;}
 .left{text-align:left;}
 .tableborder,.tableborder td,.tableborder th{border:1px solid #000;}
@@ -37,5 +44,3 @@ body: Text.
 
 
 
-
-
diff --git a/test/headers/ok/c2cb.html b/test/headers/ok/c2cb.html
index 5c9aeab..a457e8e 100644
--- a/test/headers/ok/c2cb.html
+++ b/test/headers/ok/c2cb.html
@@ -4,16 +4,23 @@
 
 
 
-body{background-color:#fff;color:#000;}
+
+blockquote{margin: 1em 2em; border-left: 2px solid #999;
+  font-style: oblique; padding-left: 1em;}
+blockquote:first-letter{margin: .2em .1em .1em 0; font-size: 160%; font-weight: bold;}
+blockquote:first-line{font-weight: bold;}
+body{font-family: sans-serif;}
 hr{background-color:#000;border:0;color:#000;}
-hr.heavy{height:5px;}
+hr.heavy{height:2px;}
 hr.light{height:1px;}
 img{border:0;display:block;}
 img.right{margin:0 0 0 auto;}
 img.center{border:0;margin:0 auto;}
-table th,table td{padding:4px;}
-.center,header{text-align:center;}
-table.center {margin-left:auto; margin-right:auto;}
+table{border-collapse: collapse;}
+table th,table td{padding: 3px 7px 2px 7px;}
+table th{background-color: lightgrey;}
+table.center{margin-left:auto; margin-right:auto;}
+.center{text-align:center;}
 .right{text-align:right;}
 .left{text-align:left;}
 .tableborder,.tableborder td,.tableborder th{border:1px solid #000;}
@@ -37,5 +44,3 @@ body: Text.
 
 
 
-
-
diff --git a/test/headers/ok/c2eb.html b/test/headers/ok/c2eb.html
index 53894a2..a9f040b 100644
--- a/test/headers/ok/c2eb.html
+++ b/test/headers/ok/c2eb.html
@@ -4,16 +4,23 @@
 
 
 
-body{background-color:#fff;color:#000;}
+
+blockquote{margin: 1em 2em; border-left: 2px solid #999;
+  font-style: oblique; padding-left: 1em;}
+blockquote:first-letter{margin: .2em .1em .1em 0; font-size: 160%; font-weight: bold;}
+blockquote:first-line{font-weight: bold;}
+body{font-family: sans-serif;}
 hr{background-color:#000;border:0;color:#000;}
-hr.heavy{height:5px;}
+hr.heavy{height:2px;}
 hr.light{height:1px;}
 img{border:0;display:block;}
 img.right{margin:0 0 0 auto;}
 img.center{border:0;margin:0 auto;}
-table th,table td{padding:4px;}
-.center,header{text-align:center;}
-table.center {margin-left:auto; margin-right:auto;}
+table{border-collapse: collapse;}
+table th,table td{padding: 3px 7px 2px 7px;}
+table th{background-color: lightgrey;}
+table.center{margin-left:auto; margin-right:auto;}
+.center{text-align:center;}
 .right{text-align:right;}
 .left{text-align:left;}
 .tableborder,.tableborder td,.tableborder th{border:1px solid #000;}
@@ -36,5 +43,3 @@ body: Text.
 
 
 
-
-
diff --git a/test/headers/ok/cc3b.html b/test/headers/ok/cc3b.html
index 5c9aeab..a457e8e 100644
--- a/test/headers/ok/cc3b.html
+++ b/test/headers/ok/cc3b.html
@@ -4,16 +4,23 @@
 
 
 
-body{background-color:#fff;color:#000;}
+
+blockquote{margin: 1em 2em; border-left: 2px solid #999;
+  font-style: oblique; padding-left: 1em;}
+blockquote:first-letter{margin: .2em .1em .1em 0; font-size: 160%; font-weight: bold;}
+blockquote:first-line{font-weight: bold;}
+body{font-family: sans-serif;}
 hr{background-color:#000;border:0;color:#000;}
-hr.heavy{height:5px;}
+hr.heavy{height:2px;}
 hr.light{height:1px;}
 img{border:0;display:block;}
 img.right{margin:0 0 0 auto;}
 img.center{border:0;margin:0 auto;}
-table th,table td{padding:4px;}
-.center,header{text-align:center;}
-table.center {margin-left:auto; margin-right:auto;}
+table{border-collapse: collapse;}
+table th,table td{padding: 3px 7px 2px 7px;}
+table th{background-color: lightgrey;}
+table.center{margin-left:auto; margin-right:auto;}
+.center{text-align:center;}
 .right{text-align:right;}
 .left{text-align:left;}
 .tableborder,.tableborder td,.tableborder th{border:1px solid #000;}
@@ -37,5 +44,3 @@ body: Text.
 
 
 
-
-
diff --git a/test/headers/ok/ce3b.html b/test/headers/ok/ce3b.html
index 53894a2..a9f040b 100644
--- a/test/headers/ok/ce3b.html
+++ b/test/headers/ok/ce3b.html
@@ -4,16 +4,23 @@
 
 
 
-body{background-color:#fff;color:#000;}
+
+blockquote{margin: 1em 2em; border-left: 2px solid #999;
+  font-style: oblique; padding-left: 1em;}
+blockquote:first-letter{margin: .2em .1em .1em 0; font-size: 160%; font-weight: bold;}
+blockquote:first-line{font-weight: bold;}
+body{font-family: sans-serif;}
 hr{background-color:#000;border:0;color:#000;}
-hr.heavy{height:5px;}
+hr.heavy{height:2px;}
 hr.light{height:1px;}
 img{border:0;display:block;}
 img.right{margin:0 0 0 auto;}
 img.center{border:0;margin:0 auto;}
-table th,table td{padding:4px;}
-.center,header{text-align:center;}
-table.center {margin-left:auto; margin-right:auto;}
+table{border-collapse: collapse;}
+table th,table td{padding: 3px 7px 2px 7px;}
+table th{background-color: lightgrey;}
+table.center{margin-left:auto; margin-right:auto;}
+.center{text-align:center;}
 .right{text-align:right;}
 .left{text-align:left;}
 .tableborder,.tableborder td,.tableborder th{border:1px solid #000;}
@@ -36,5 +43,3 @@ body: Text.
 
 
 
-
-
diff --git a/test/headers/ok/eb.html b/test/headers/ok/eb.html
index 75c7350..5f11a5f 100644
--- a/test/headers/ok/eb.html
+++ b/test/headers/ok/eb.html
@@ -3,16 +3,23 @@
 
 
 
-body{background-color:#fff;color:#000;}
+
+blockquote{margin: 1em 2em; border-left: 2px solid #999;
+  font-style: oblique; padding-left: 1em;}
+blockquote:first-letter{margin: .2em .1em .1em 0; font-size: 160%; font-weight: bold;}
+blockquote:first-line{font-weight: bold;}
+body{font-family: sans-serif;}
 hr{background-color:#000;border:0;color:#000;}
-hr.heavy{height:5px;}
+hr.heavy{height:2px;}
 hr.light{height:1px;}
 img{border:0;display:block;}
 img.right{margin:0 0 0 auto;}
 img.center{border:0;margin:0 auto;}
-table th,table td{padding:4px;}
-.center,header{text-align:center;}
-table.center {margin-left:auto; margin-right:auto;}
+table{border-collapse: collapse;}
+table th,table td{padding: 3px 7px 2px 7px;}
+table th{background-color: lightgrey;}
+table.center{margin-left:auto; margin-right:auto;}
+.center{text-align:center;}
 .right{text-align:right;}
 .left{text-align:left;}
 .tableborder,.tableborder td,.tableborder th{border:1px solid #000;}
@@ -33,5 +40,3 @@ body: Text.
 
 
 
-
-
diff --git a/test/headers/ok/ecb.html b/test/headers/ok/ecb.html
index 75c7350..5f11a5f 100644
--- a/test/headers/ok/ecb.html
+++ b/test/headers/ok/ecb.html
@@ -3,16 +3,23 @@
 
 
 
-body{background-color:#fff;color:#000;}
+
+blockquote{margin: 1em 2em; border-left: 2px solid #999;
+  font-style: oblique; padding-left: 1em;}
+blockquote:first-letter{margin: .2em .1em .1em 0; font-size: 160%; font-weight: bold;}
+blockquote:first-line{font-weight: bold;}
+body{font-family: sans-serif;}
 hr{background-color:#000;border:0;color:#000;}
-hr.heavy{height:5px;}
+hr.heavy{height:2px;}
 hr.light{height:1px;}
 img{border:0;display:block;}
 img.right{margin:0 0 0 auto;}
 img.center{border:0;margin:0 auto;}
-table th,table td{padding:4px;}
-.center,header{text-align:center;}
-table.center {margin-left:auto; margin-right:auto;}
+table{border-collapse: collapse;}
+table th,table td{padding: 3px 7px 2px 7px;}
+table th{background-color: lightgrey;}
+table.center{margin-left:auto; margin-right:auto;}
+.center{text-align:center;}
 .right{text-align:right;}
 .left{text-align:left;}
 .tableborder,.tableborder td,.tableborder th{border:1px solid #000;}
@@ -33,5 +40,3 @@ body: Text.
 
 
 
-
-
diff --git a/test/headers/ok/ek.html b/test/headers/ok/ek.html
index fbbcf61..88fa40d 100644
--- a/test/headers/ok/ek.html
+++ b/test/headers/ok/ek.html
@@ -3,16 +3,23 @@
 
 
 
-body{background-color:#fff;color:#000;}
+
+blockquote{margin: 1em 2em; border-left: 2px solid #999;
+  font-style: oblique; padding-left: 1em;}
+blockquote:first-letter{margin: .2em .1em .1em 0; font-size: 160%; font-weight: bold;}
+blockquote:first-line{font-weight: bold;}
+body{font-family: sans-serif;}
 hr{background-color:#000;border:0;color:#000;}
-hr.heavy{height:5px;}
+hr.heavy{height:2px;}
 hr.light{height:1px;}
 img{border:0;display:block;}
 img.right{margin:0 0 0 auto;}
 img.center{border:0;margin:0 auto;}
-table th,table td{padding:4px;}
-.center,header{text-align:center;}
-table.center {margin-left:auto; margin-right:auto;}
+table{border-collapse: collapse;}
+table th,table td{padding: 3px 7px 2px 7px;}
+table th{background-color: lightgrey;}
+table.center{margin-left:auto; margin-right:auto;}
+.center{text-align:center;}
 .right{text-align:right;}
 .left{text-align:left;}
 .tableborder,.tableborder td,.tableborder th{border:1px solid #000;}
@@ -30,5 +37,3 @@ table.center {margin-left:auto; margin-right:auto;}
 
 
 
-
-
diff --git a/test/headers/ok/ekb.html b/test/headers/ok/ekb.html
index 75c7350..5f11a5f 100644
--- a/test/headers/ok/ekb.html
+++ b/test/headers/ok/ekb.html
@@ -3,16 +3,23 @@
 
 
 
-body{background-color:#fff;color:#000;}
+
+blockquote{margin: 1em 2em; border-left: 2px solid #999;
+  font-style: oblique; padding-left: 1em;}
+blockquote:first-letter{margin: .2em .1em .1em 0; font-size: 160%; font-weight: bold;}
+blockquote:first-line{font-weight: bold;}
+body{font-family: sans-serif;}
 hr{background-color:#000;border:0;color:#000;}
-hr.heavy{height:5px;}
+hr.heavy{height:2px;}
 hr.light{height:1px;}
 img{border:0;display:block;}
 img.right{margin:0 0 0 auto;}
 img.center{border:0;margin:0 auto;}
-table th,table td{padding:4px;}
-.center,header{text-align:center;}
-table.center {margin-left:auto; margin-right:auto;}
+table{border-collapse: collapse;}
+table th,table td{padding: 3px 7px 2px 7px;}
+table th{background-color: lightgrey;}
+table.center{margin-left:auto; margin-right:auto;}
+.center{text-align:center;}
 .right{text-align:right;}
 .left{text-align:left;}
 .tableborder,.tableborder td,.tableborder th{border:1px solid #000;}
@@ -33,5 +40,3 @@ body: Text.
 
 
 
-
-
diff --git a/test/headers/ok/ekkkb.html b/test/headers/ok/ekkkb.html
index 75c7350..5f11a5f 100644
--- a/test/headers/ok/ekkkb.html
+++ b/test/headers/ok/ekkkb.html
@@ -3,16 +3,23 @@
 
 
 
-body{background-color:#fff;color:#000;}
+
+blockquote{margin: 1em 2em; border-left: 2px solid #999;
+  font-style: oblique; padding-left: 1em;}
+blockquote:first-letter{margin: .2em .1em .1em 0; font-size: 160%; font-weight: bold;}
+blockquote:first-line{font-weight: bold;}
+body{font-family: sans-serif;}
 hr{background-color:#000;border:0;color:#000;}
-hr.heavy{height:5px;}
+hr.heavy{height:2px;}
 hr.light{height:1px;}
 img{border:0;display:block;}
 img.right{margin:0 0 0 auto;}
 img.center{border:0;margin:0 auto;}
-table th,table td{padding:4px;}
-.center,header{text-align:center;}
-table.center {margin-left:auto; margin-right:auto;}
+table{border-collapse: collapse;}
+table th,table td{padding: 3px 7px 2px 7px;}
+table th{background-color: lightgrey;}
+table.center{margin-left:auto; margin-right:auto;}
+.center{text-align:center;}
 .right{text-align:right;}
 .left{text-align:left;}
 .tableborder,.tableborder td,.tableborder th{border:1px solid #000;}
@@ -33,5 +40,3 @@ body: Text.
 
 
 
-
-
diff --git a/test/headers/run.py b/test/headers/run.py
index a2ca169..faa8416 100644
--- a/test/headers/run.py
+++ b/test/headers/run.py
@@ -23,15 +23,14 @@ txt = {
     "c": "% comment",  # Comment line
     "k": "%%%\ncomment\n%%%",  # Comment block
     "b": "Text.",  # Body line
-    "f": "%!encoding: enc",  # Config line
 }
 
 # the registered tests
 tests = """
-eb    efb   ecb
-1ee   1ef   1ec    1eeb   1e3b   1c3b    1ccb
-12e   12eb  12fb   12cb
-123   123b  123eb  123fb  123cf  123cfb  123ecefeb
+eb    ecb
+1ee   1ec   1eeb   1e3b   1c3b    1ccb
+12e   12eb  12cb
+123   123b  123eb
 1     c     1e     12
 ce3b  cc3b  c2eb   c2cb   c23b
 ekb   123kb ek     123k   ekkkb
diff --git a/test/include/ok/include-empty-other.html b/test/include/ok/include-empty-other.html
index 1c4ba4a..a656ee7 100644
--- a/test/include/ok/include-empty-other.html
+++ b/test/include/ok/include-empty-other.html
@@ -1,4 +1,4 @@
-<div class="body" id="body">
+<div class="body">
 
 <pre>
 </pre>
diff --git a/test/include/ok/include-empty-t2t.out b/test/include/ok/include-empty-t2t.out
index 6df5716..d94207e 100644
--- a/test/include/ok/include-empty-t2t.out
+++ b/test/include/ok/include-empty-t2t.out
@@ -1 +1 @@
-txt2tags: Error: The input file is empty: _empty.inc
+Error: The input file is empty: _empty.inc
diff --git a/test/include/ok/include-itself.out b/test/include/ok/include-itself.out
index 3ddbe22..49fe973 100644
--- a/test/include/ok/include-itself.out
+++ b/test/include/ok/include-itself.out
@@ -1 +1 @@
-txt2tags: Error: A file cannot include itself (loop!): include-itself.t2t
+Error: A file cannot include itself (loop!): include-itself.t2t
diff --git a/test/include/ok/include-nesting-folder-back.html b/test/include/ok/include-nesting-folder-back.html
index 3cb4091..573e589 100644
--- a/test/include/ok/include-nesting-folder-back.html
+++ b/test/include/ok/include-nesting-folder-back.html
@@ -1,4 +1,4 @@
-<div class="body" id="body">
+<div class="body">
 <p>
 Folder - Level 2.
 Folder - Level 1.
diff --git a/test/include/ok/include-nesting-folder.html b/test/include/ok/include-nesting-folder.html
index 4f2f999..315c474 100644
--- a/test/include/ok/include-nesting-folder.html
+++ b/test/include/ok/include-nesting-folder.html
@@ -1,4 +1,4 @@
-<div class="body" id="body">
+<div class="body">
 <p>
 Folder - Level 0.
 Folder - Level 1.
diff --git a/test/include/ok/include-nesting.html b/test/include/ok/include-nesting.html
index 87f3325..001d38d 100644
--- a/test/include/ok/include-nesting.html
+++ b/test/include/ok/include-nesting.html
@@ -1,4 +1,4 @@
-<div class="body" id="body">
+<div class="body">
 <p>
 Level 0.
 Level 1.
diff --git a/test/include/ok/include-types.html b/test/include/ok/include-types.html
index 15e37e2..1da06c7 100644
--- a/test/include/ok/include-types.html
+++ b/test/include/ok/include-types.html
@@ -1,4 +1,4 @@
-<div class="body" id="body">
+<div class="body">
 <p>
 <strong>bold</strong>
 </p>
diff --git a/test/includeconf/ok/C-not-found.out b/test/includeconf/ok/C-not-found.out
index bb89f38..31d36c3 100644
--- a/test/includeconf/ok/C-not-found.out
+++ b/test/includeconf/ok/C-not-found.out
@@ -1 +1,2 @@
-txt2tags: Error: Cannot read file: XXX.inc
+Error: Cannot read file: XXX.inc
+[Errno 2] No such file or directory: 'XXX.inc'
diff --git a/test/includeconf/ok/C-text.out b/test/includeconf/ok/C-text.out
index a562af2..089b8d8 100644
--- a/test/includeconf/ok/C-text.out
+++ b/test/includeconf/ok/C-text.out
@@ -1,2 +1,2 @@
-txt2tags: Error: Invalid CONFIG line on _text.inc
+Error: Invalid CONFIG line on _text.inc
 001:Text.
diff --git a/test/includeconf/ok/config-file-not-found.out b/test/includeconf/ok/config-file-not-found.out
index bb89f38..31d36c3 100644
--- a/test/includeconf/ok/config-file-not-found.out
+++ b/test/includeconf/ok/config-file-not-found.out
@@ -1 +1,2 @@
-txt2tags: Error: Cannot read file: XXX.inc
+Error: Cannot read file: XXX.inc
+[Errno 2] No such file or directory: 'XXX.inc'
diff --git a/test/includeconf/ok/config-file-text.out b/test/includeconf/ok/config-file-text.out
index a562af2..089b8d8 100644
--- a/test/includeconf/ok/config-file-text.out
+++ b/test/includeconf/ok/config-file-text.out
@@ -1,2 +1,2 @@
-txt2tags: Error: Invalid CONFIG line on _text.inc
+Error: Invalid CONFIG line on _text.inc
 001:Text.
diff --git a/test/includeconf/ok/includeconf-itself.out b/test/includeconf/ok/includeconf-itself.out
index 681f4cb..571fbf6 100644
--- a/test/includeconf/ok/includeconf-itself.out
+++ b/test/includeconf/ok/includeconf-itself.out
@@ -1 +1 @@
-txt2tags: Error: A file cannot include itself (loop!): %!includeconf: includeconf-itself.t2t
+Error: A file cannot include itself (loop!): %!includeconf: includeconf-itself.t2t
diff --git a/test/includeconf/ok/includeconf-not-found.out b/test/includeconf/ok/includeconf-not-found.out
index bb89f38..31d36c3 100644
--- a/test/includeconf/ok/includeconf-not-found.out
+++ b/test/includeconf/ok/includeconf-not-found.out
@@ -1 +1,2 @@
-txt2tags: Error: Cannot read file: XXX.inc
+Error: Cannot read file: XXX.inc
+[Errno 2] No such file or directory: 'XXX.inc'
diff --git a/test/includeconf/ok/includeconf-targeted.out b/test/includeconf/ok/includeconf-targeted.out
index 674f239..c85479b 100644
--- a/test/includeconf/ok/includeconf-targeted.out
+++ b/test/includeconf/ok/includeconf-targeted.out
@@ -1,2 +1,2 @@
-txt2tags: Error: You can't use (target) with %!includeconf
+Error: You can't use (target) with %!includeconf
 %!includeconf(html): _failed.inc
diff --git a/test/includeconf/ok/includeconf-text.out b/test/includeconf/ok/includeconf-text.out
index a562af2..089b8d8 100644
--- a/test/includeconf/ok/includeconf-text.out
+++ b/test/includeconf/ok/includeconf-text.out
@@ -1,2 +1,2 @@
-txt2tags: Error: Invalid CONFIG line on _text.inc
+Error: Invalid CONFIG line on _text.inc
 001:Text.
diff --git a/test/includeconf/ok/not-numbered.html b/test/includeconf/ok/not-numbered.html
index f21fe6c..7c602c5 100644
--- a/test/includeconf/ok/not-numbered.html
+++ b/test/includeconf/ok/not-numbered.html
@@ -1,4 +1,4 @@
-<div class="body" id="body">
+<div class="body">
 
 <section>
 <h1>title</h1>
diff --git a/test/includeconf/ok/numbered.html b/test/includeconf/ok/numbered.html
index 914ebe7..d030d14 100644
--- a/test/includeconf/ok/numbered.html
+++ b/test/includeconf/ok/numbered.html
@@ -1,4 +1,4 @@
-<div class="body" id="body">
+<div class="body">
 
 <section>
 <h1>1. title</h1>
diff --git a/test/includeconf/run.py b/test/includeconf/run.py
index 7798d00..1108ad1 100644
--- a/test/includeconf/run.py
+++ b/test/includeconf/run.py
@@ -70,7 +70,11 @@ def run():
             cmdline = ["-H", "-i", infile, "-o", outfile]
 
         if lib.initTest(basename, infile, outfile, okfile):
-            lib.test(cmdline, outfile, okfile)
+            if basename in errors:
+                lib._convert(cmdline)
+                lib._grep(okfile, outfile)
+            else:
+                lib.test(cmdline, outfile, okfile)
 
     # Now test -C and --config-file command line options.
     errors = ["C-not-found", "C-text"]
diff --git a/test/lib.py b/test/lib.py
index 2b549ce..140eb81 100644
--- a/test/lib.py
+++ b/test/lib.py
@@ -3,7 +3,6 @@
 # See also: run.py, */run.py
 #
 
-from __future__ import print_function
 
 import difflib
 import os
@@ -19,7 +18,7 @@ TEST_DIR = os.path.dirname(os.path.abspath(__file__))
 print("Testing txt2tags on Python", platform.python_version())
 
 # Path for txt2tags (change here if your txt2tags is in a different location)
-TXT2TAGS = "../txt2tags.py"
+TXT2TAGS = os.path.join(TEST_DIR, "..", "txt2tags.py")
 
 CONFIG_FILE = "config"
 CSS_FILE = "css"
@@ -43,7 +42,7 @@ def get_output(cmd):
 # file tools
 #
 def ReadFile(filename):
-    with open(filename, "r") as f:
+    with open(filename) as f:
         return f.read()
 
 
@@ -88,8 +87,6 @@ def _convert(options):
 def remove_version_and_dates(text):
     version_re = r"\d+\.\d+(\.\d+)?"
     for regex in [
-        r"Txt2tags {version_re}",
-        r"txt2tags {version_re}",
         r"txt2tags version {version_re}",
         # Remove date from header.
         r"\d{{2}}/\d{{2}}/\d{{4}}",
@@ -100,7 +97,6 @@ def remove_version_and_dates(text):
         r"which gives: \d{{2}}-\d{{2}}-\d{{4}}",
         # man escapes - with \-
         r"which gives: \d{{2}}\\-\d{{2}}\\-\d{{4}}",
-        r"cmdline: txt2tags .*\n",
     ]:
         text = re.sub(regex.format(**locals()), "", text)
     return text
@@ -134,6 +130,20 @@ def override(okfile, outfile):
         MoveFile(outfile, okfile)
 
 
+def _grep(okfile, outfile):
+    """grep if the okfile snippet is contained in outfile"""
+    ok = ReadFile(okfile)
+    out = ReadFile(outfile)
+    if ok not in out:
+        if OVERRIDE:
+            override(okfile, outfile)
+        else:
+            mark_failed(outfile, okfile=okfile)
+            print("_grep: {okfile} contents not found in {outfile}".format(**locals()))
+    else:
+        mark_ok(outfile)
+
+
 def _diff(outfile, okfile):
     out = ReadFile(outfile)
     out = remove_version_and_dates(out)
diff --git a/test/marks/ok/comment.html b/test/marks/ok/comment.html
index 38e4077..78c2f17 100644
--- a/test/marks/ok/comment.html
+++ b/test/marks/ok/comment.html
@@ -1,18 +1,25 @@
 <!DOCTYPE html>
-<html>
+<html lang="en">
 <head>
-<meta name="generator" content="http://txt2tags.org">
+<meta charset="utf-8">
+<meta name="generator" content="https://txt2tags.org">
 <style>
-body{background-color:#fff;color:#000;}
+blockquote{margin: 1em 2em; border-left: 2px solid #999;
+  font-style: oblique; padding-left: 1em;}
+blockquote:first-letter{margin: .2em .1em .1em 0; font-size: 160%; font-weight: bold;}
+blockquote:first-line{font-weight: bold;}
+body{font-family: sans-serif;}
 hr{background-color:#000;border:0;color:#000;}
-hr.heavy{height:5px;}
+hr.heavy{height:2px;}
 hr.light{height:1px;}
 img{border:0;display:block;}
 img.right{margin:0 0 0 auto;}
 img.center{border:0;margin:0 auto;}
-table th,table td{padding:4px;}
-.center,header{text-align:center;}
-table.center {margin-left:auto; margin-right:auto;}
+table{border-collapse: collapse;}
+table th,table td{padding: 3px 7px 2px 7px;}
+table th{background-color: lightgrey;}
+table.center{margin-left:auto; margin-right:auto;}
+.center{text-align:center;}
 .right{text-align:right;}
 .left{text-align:left;}
 .tableborder,.tableborder td,.tableborder th{border:1px solid #000;}
@@ -24,9 +31,9 @@ table.center {margin-left:auto; margin-right:auto;}
 <hgroup>
 </hgroup>
 </header>
-<article>
 
-<div class="body" id="body">
+
+<div class="body">
 
 <section~A~>
 <h1></h1>
@@ -55,6 +62,4 @@ some text     % half line comments are not allowed
 </section>
 </div>
 
-<!-- html code generated by txt2tags (http://txt2tags.org) -->
-<!-- cmdline: txt2tags -q -\-no-rc comment.t2t -->
-</article></body></html>
+</body></html>
diff --git a/test/marks/ok/deflist.html b/test/marks/ok/deflist.html
index ddf9592..ea79dc0 100644
--- a/test/marks/ok/deflist.html
+++ b/test/marks/ok/deflist.html
@@ -1,18 +1,25 @@
 <!DOCTYPE html>
-<html>
+<html lang="en">
 <head>
-<meta name="generator" content="http://txt2tags.org">
+<meta charset="utf-8">
+<meta name="generator" content="https://txt2tags.org">
 <style>
-body{background-color:#fff;color:#000;}
+blockquote{margin: 1em 2em; border-left: 2px solid #999;
+  font-style: oblique; padding-left: 1em;}
+blockquote:first-letter{margin: .2em .1em .1em 0; font-size: 160%; font-weight: bold;}
+blockquote:first-line{font-weight: bold;}
+body{font-family: sans-serif;}
 hr{background-color:#000;border:0;color:#000;}
-hr.heavy{height:5px;}
+hr.heavy{height:2px;}
 hr.light{height:1px;}
 img{border:0;display:block;}
 img.right{margin:0 0 0 auto;}
 img.center{border:0;margin:0 auto;}
-table th,table td{padding:4px;}
-.center,header{text-align:center;}
-table.center {margin-left:auto; margin-right:auto;}
+table{border-collapse: collapse;}
+table th,table td{padding: 3px 7px 2px 7px;}
+table th{background-color: lightgrey;}
+table.center{margin-left:auto; margin-right:auto;}
+.center{text-align:center;}
 .right{text-align:right;}
 .left{text-align:left;}
 .tableborder,.tableborder td,.tableborder th{border:1px solid #000;}
@@ -24,9 +31,9 @@ table.center {margin-left:auto; margin-right:auto;}
 <hgroup>
 </hgroup>
 </header>
-<article>
 
-<div class="body" id="body">
+
+<div class="body">
 
 <section~A~>
 <h1></h1>
@@ -421,6 +428,4 @@ table.center {margin-left:auto; margin-right:auto;}
 </section>
 </section>
 </div>
-<!-- html code generated by txt2tags (http://txt2tags.org) -->
-<!-- cmdline: txt2tags -q -\-no-rc -C config -o deflist.html list.t2t -->
-</article></body></html>
+</body></html>
diff --git a/test/marks/ok/image.html b/test/marks/ok/image.html
index 988aefb..39a0276 100644
--- a/test/marks/ok/image.html
+++ b/test/marks/ok/image.html
@@ -1,18 +1,25 @@
 <!DOCTYPE html>
-<html>
+<html lang="en">
 <head>
-<meta name="generator" content="http://txt2tags.org">
+<meta charset="utf-8">
+<meta name="generator" content="https://txt2tags.org">
 <style>
-body{background-color:#fff;color:#000;}
+blockquote{margin: 1em 2em; border-left: 2px solid #999;
+  font-style: oblique; padding-left: 1em;}
+blockquote:first-letter{margin: .2em .1em .1em 0; font-size: 160%; font-weight: bold;}
+blockquote:first-line{font-weight: bold;}
+body{font-family: sans-serif;}
 hr{background-color:#000;border:0;color:#000;}
-hr.heavy{height:5px;}
+hr.heavy{height:2px;}
 hr.light{height:1px;}
 img{border:0;display:block;}
 img.right{margin:0 0 0 auto;}
 img.center{border:0;margin:0 auto;}
-table th,table td{padding:4px;}
-.center,header{text-align:center;}
-table.center {margin-left:auto; margin-right:auto;}
+table{border-collapse: collapse;}
+table th,table td{padding: 3px 7px 2px 7px;}
+table th{background-color: lightgrey;}
+table.center{margin-left:auto; margin-right:auto;}
+.center{text-align:center;}
 .right{text-align:right;}
 .left{text-align:left;}
 .tableborder,.tableborder td,.tableborder th{border:1px solid #000;}
@@ -24,9 +31,9 @@ table.center {margin-left:auto; margin-right:auto;}
 <hgroup>
 </hgroup>
 </header>
-<article>
 
-<div class="body" id="body">
+
+<div class="body">
 
 <section~A~>
 <h1></h1>
@@ -105,6 +112,4 @@ Images glued together: <img class="center" src="../../samples/img/t2tbutton.png"
 </section>
 </div>
 
-<!-- html code generated by txt2tags (http://txt2tags.org) -->
-<!-- cmdline: txt2tags -q -\-no-rc image.t2t -->
-</article></body></html>
+</body></html>
diff --git a/test/marks/ok/inline.html b/test/marks/ok/inline.html
index 23c4b8c..e4dbc4a 100644
--- a/test/marks/ok/inline.html
+++ b/test/marks/ok/inline.html
@@ -1,18 +1,25 @@
 <!DOCTYPE html>
-<html>
+<html lang="en">
 <head>
-<meta name="generator" content="http://txt2tags.org">
+<meta charset="utf-8">
+<meta name="generator" content="https://txt2tags.org">
 <style>
-body{background-color:#fff;color:#000;}
+blockquote{margin: 1em 2em; border-left: 2px solid #999;
+  font-style: oblique; padding-left: 1em;}
+blockquote:first-letter{margin: .2em .1em .1em 0; font-size: 160%; font-weight: bold;}
+blockquote:first-line{font-weight: bold;}
+body{font-family: sans-serif;}
 hr{background-color:#000;border:0;color:#000;}
-hr.heavy{height:5px;}
+hr.heavy{height:2px;}
 hr.light{height:1px;}
 img{border:0;display:block;}
 img.right{margin:0 0 0 auto;}
 img.center{border:0;margin:0 auto;}
-table th,table td{padding:4px;}
-.center,header{text-align:center;}
-table.center {margin-left:auto; margin-right:auto;}
+table{border-collapse: collapse;}
+table th,table td{padding: 3px 7px 2px 7px;}
+table th{background-color: lightgrey;}
+table.center{margin-left:auto; margin-right:auto;}
+.center{text-align:center;}
 .right{text-align:right;}
 .left{text-align:left;}
 .tableborder,.tableborder td,.tableborder th{border:1px solid #000;}
@@ -24,9 +31,9 @@ table.center {margin-left:auto; margin-right:auto;}
 <hgroup>
 </hgroup>
 </header>
-<article>
 
-<div class="body" id="body">
+
+<div class="body">
 
 <section~A~>
 <h1></h1>
@@ -80,6 +87,4 @@ table.center {margin-left:auto; margin-right:auto;}
 </section>
 </div>
 
-<!-- html code generated by txt2tags (http://txt2tags.org) -->
-<!-- cmdline: txt2tags -q -\-no-rc inline.t2t -->
-</article></body></html>
+</body></html>
diff --git a/test/marks/ok/line.html b/test/marks/ok/line.html
index b2642a5..f5f7abd 100644
--- a/test/marks/ok/line.html
+++ b/test/marks/ok/line.html
@@ -1,18 +1,25 @@
 <!DOCTYPE html>
-<html>
+<html lang="en">
 <head>
-<meta name="generator" content="http://txt2tags.org">
+<meta charset="utf-8">
+<meta name="generator" content="https://txt2tags.org">
 <style>
-body{background-color:#fff;color:#000;}
+blockquote{margin: 1em 2em; border-left: 2px solid #999;
+  font-style: oblique; padding-left: 1em;}
+blockquote:first-letter{margin: .2em .1em .1em 0; font-size: 160%; font-weight: bold;}
+blockquote:first-line{font-weight: bold;}
+body{font-family: sans-serif;}
 hr{background-color:#000;border:0;color:#000;}
-hr.heavy{height:5px;}
+hr.heavy{height:2px;}
 hr.light{height:1px;}
 img{border:0;display:block;}
 img.right{margin:0 0 0 auto;}
 img.center{border:0;margin:0 auto;}
-table th,table td{padding:4px;}
-.center,header{text-align:center;}
-table.center {margin-left:auto; margin-right:auto;}
+table{border-collapse: collapse;}
+table th,table td{padding: 3px 7px 2px 7px;}
+table th{background-color: lightgrey;}
+table.center{margin-left:auto; margin-right:auto;}
+.center{text-align:center;}
 .right{text-align:right;}
 .left{text-align:left;}
 .tableborder,.tableborder td,.tableborder th{border:1px solid #000;}
@@ -24,9 +31,9 @@ table.center {margin-left:auto; margin-right:auto;}
 <hgroup>
 </hgroup>
 </header>
-<article>
 
-<div class="body" id="body">
+
+<div class="body">
 
 <section~A~>
 <h1></h1>
@@ -88,6 +95,4 @@ table.center {margin-left:auto; margin-right:auto;}
 </section>
 </div>
 
-<!-- html code generated by txt2tags (http://txt2tags.org) -->
-<!-- cmdline: txt2tags -q -\-no-rc line.t2t -->
-</article></body></html>
+</body></html>
diff --git a/test/marks/ok/link.html b/test/marks/ok/link.html
index 13456ed..a6a8e32 100644
--- a/test/marks/ok/link.html
+++ b/test/marks/ok/link.html
@@ -1,18 +1,25 @@
 <!DOCTYPE html>
-<html>
+<html lang="en">
 <head>
-<meta name="generator" content="http://txt2tags.org">
+<meta charset="utf-8">
+<meta name="generator" content="https://txt2tags.org">
 <style>
-body{background-color:#fff;color:#000;}
+blockquote{margin: 1em 2em; border-left: 2px solid #999;
+  font-style: oblique; padding-left: 1em;}
+blockquote:first-letter{margin: .2em .1em .1em 0; font-size: 160%; font-weight: bold;}
+blockquote:first-line{font-weight: bold;}
+body{font-family: sans-serif;}
 hr{background-color:#000;border:0;color:#000;}
-hr.heavy{height:5px;}
+hr.heavy{height:2px;}
 hr.light{height:1px;}
 img{border:0;display:block;}
 img.right{margin:0 0 0 auto;}
 img.center{border:0;margin:0 auto;}
-table th,table td{padding:4px;}
-.center,header{text-align:center;}
-table.center {margin-left:auto; margin-right:auto;}
+table{border-collapse: collapse;}
+table th,table td{padding: 3px 7px 2px 7px;}
+table th{background-color: lightgrey;}
+table.center{margin-left:auto; margin-right:auto;}
+.center{text-align:center;}
 .right{text-align:right;}
 .left{text-align:left;}
 .tableborder,.tableborder td,.tableborder th{border:1px solid #000;}
@@ -24,9 +31,9 @@ table.center {margin-left:auto; margin-right:auto;}
 <hgroup>
 </hgroup>
 </header>
-<article>
 
-<div class="body" id="body">
+
+<div class="body">
 
 <section~A~>
 <h1></h1>
@@ -235,6 +242,4 @@ any text: <a href="http://www.domain.com/dir/index.html#anchor.">http://www.doma
 </section>
 </div>
 
-<!-- html code generated by txt2tags (http://txt2tags.org) -->
-<!-- cmdline: txt2tags -q -\-no-rc link.t2t -->
-</article></body></html>
+</body></html>
diff --git a/test/marks/ok/list.html b/test/marks/ok/list.html
index 2b4dad7..1e13d42 100644
--- a/test/marks/ok/list.html
+++ b/test/marks/ok/list.html
@@ -1,18 +1,25 @@
 <!DOCTYPE html>
-<html>
+<html lang="en">
 <head>
-<meta name="generator" content="http://txt2tags.org">
+<meta charset="utf-8">
+<meta name="generator" content="https://txt2tags.org">
 <style>
-body{background-color:#fff;color:#000;}
+blockquote{margin: 1em 2em; border-left: 2px solid #999;
+  font-style: oblique; padding-left: 1em;}
+blockquote:first-letter{margin: .2em .1em .1em 0; font-size: 160%; font-weight: bold;}
+blockquote:first-line{font-weight: bold;}
+body{font-family: sans-serif;}
 hr{background-color:#000;border:0;color:#000;}
-hr.heavy{height:5px;}
+hr.heavy{height:2px;}
 hr.light{height:1px;}
 img{border:0;display:block;}
 img.right{margin:0 0 0 auto;}
 img.center{border:0;margin:0 auto;}
-table th,table td{padding:4px;}
-.center,header{text-align:center;}
-table.center {margin-left:auto; margin-right:auto;}
+table{border-collapse: collapse;}
+table th,table td{padding: 3px 7px 2px 7px;}
+table th{background-color: lightgrey;}
+table.center{margin-left:auto; margin-right:auto;}
+.center{text-align:center;}
 .right{text-align:right;}
 .left{text-align:left;}
 .tableborder,.tableborder td,.tableborder th{border:1px solid #000;}
@@ -24,9 +31,9 @@ table.center {margin-left:auto; margin-right:auto;}
 <hgroup>
 </hgroup>
 </header>
-<article>
 
-<div class="body" id="body">
+
+<div class="body">
 
 <section~A~>
 <h1></h1>
@@ -420,6 +427,4 @@ table.center {margin-left:auto; margin-right:auto;}
 </section>
 </section>
 </div>
-<!-- html code generated by txt2tags (http://txt2tags.org) -->
-<!-- cmdline: txt2tags -q -\-no-rc list.t2t -->
-</article></body></html>
+</body></html>
diff --git a/test/marks/ok/numlist.html b/test/marks/ok/numlist.html
index ac6cfef..9f6159e 100644
--- a/test/marks/ok/numlist.html
+++ b/test/marks/ok/numlist.html
@@ -1,18 +1,25 @@
 <!DOCTYPE html>
-<html>
+<html lang="en">
 <head>
-<meta name="generator" content="http://txt2tags.org">
+<meta charset="utf-8">
+<meta name="generator" content="https://txt2tags.org">
 <style>
-body{background-color:#fff;color:#000;}
+blockquote{margin: 1em 2em; border-left: 2px solid #999;
+  font-style: oblique; padding-left: 1em;}
+blockquote:first-letter{margin: .2em .1em .1em 0; font-size: 160%; font-weight: bold;}
+blockquote:first-line{font-weight: bold;}
+body{font-family: sans-serif;}
 hr{background-color:#000;border:0;color:#000;}
-hr.heavy{height:5px;}
+hr.heavy{height:2px;}
 hr.light{height:1px;}
 img{border:0;display:block;}
 img.right{margin:0 0 0 auto;}
 img.center{border:0;margin:0 auto;}
-table th,table td{padding:4px;}
-.center,header{text-align:center;}
-table.center {margin-left:auto; margin-right:auto;}
+table{border-collapse: collapse;}
+table th,table td{padding: 3px 7px 2px 7px;}
+table th{background-color: lightgrey;}
+table.center{margin-left:auto; margin-right:auto;}
+.center{text-align:center;}
 .right{text-align:right;}
 .left{text-align:left;}
 .tableborder,.tableborder td,.tableborder th{border:1px solid #000;}
@@ -24,9 +31,9 @@ table.center {margin-left:auto; margin-right:auto;}
 <hgroup>
 </hgroup>
 </header>
-<article>
 
-<div class="body" id="body">
+
+<div class="body">
 
 <section~A~>
 <h1></h1>
@@ -420,6 +427,4 @@ table.center {margin-left:auto; margin-right:auto;}
 </section>
 </section>
 </div>
-<!-- html code generated by txt2tags (http://txt2tags.org) -->
-<!-- cmdline: txt2tags -q -\-no-rc -C config -o numlist.html list.t2t -->
-</article></body></html>
+</body></html>
diff --git a/test/marks/ok/numtitle.html b/test/marks/ok/numtitle.html
index e0f65f8..7492b5f 100644
--- a/test/marks/ok/numtitle.html
+++ b/test/marks/ok/numtitle.html
@@ -1,18 +1,25 @@
 <!DOCTYPE html>
-<html>
+<html lang="en">
 <head>
-<meta name="generator" content="http://txt2tags.org">
+<meta charset="utf-8">
+<meta name="generator" content="https://txt2tags.org">
 <style>
-body{background-color:#fff;color:#000;}
+blockquote{margin: 1em 2em; border-left: 2px solid #999;
+  font-style: oblique; padding-left: 1em;}
+blockquote:first-letter{margin: .2em .1em .1em 0; font-size: 160%; font-weight: bold;}
+blockquote:first-line{font-weight: bold;}
+body{font-family: sans-serif;}
 hr{background-color:#000;border:0;color:#000;}
-hr.heavy{height:5px;}
+hr.heavy{height:2px;}
 hr.light{height:1px;}
 img{border:0;display:block;}
 img.right{margin:0 0 0 auto;}
 img.center{border:0;margin:0 auto;}
-table th,table td{padding:4px;}
-.center,header{text-align:center;}
-table.center {margin-left:auto; margin-right:auto;}
+table{border-collapse: collapse;}
+table th,table td{padding: 3px 7px 2px 7px;}
+table th{background-color: lightgrey;}
+table.center{margin-left:auto; margin-right:auto;}
+.center{text-align:center;}
 .right{text-align:right;}
 .left{text-align:left;}
 .tableborder,.tableborder td,.tableborder th{border:1px solid #000;}
@@ -24,9 +31,9 @@ table.center {margin-left:auto; margin-right:auto;}
 <hgroup>
 </hgroup>
 </header>
-<article>
 
-<div class="body" id="body">
+
+<div class="body">
 
 <section~A~>
 <h1></h1>
@@ -157,6 +164,4 @@ table.center {margin-left:auto; margin-right:auto;}
 </section>
 </div>
 
-<!-- html code generated by txt2tags (http://txt2tags.org) -->
-<!-- cmdline: txt2tags -q -\-no-rc -C config -o numtitle.html title.t2t -->
-</article></body></html>
+</body></html>
diff --git a/test/marks/ok/paragraph.html b/test/marks/ok/paragraph.html
index 98dbba4..13240f2 100644
--- a/test/marks/ok/paragraph.html
+++ b/test/marks/ok/paragraph.html
@@ -1,18 +1,25 @@
 <!DOCTYPE html>
-<html>
+<html lang="en">
 <head>
-<meta name="generator" content="http://txt2tags.org">
+<meta charset="utf-8">
+<meta name="generator" content="https://txt2tags.org">
 <style>
-body{background-color:#fff;color:#000;}
+blockquote{margin: 1em 2em; border-left: 2px solid #999;
+  font-style: oblique; padding-left: 1em;}
+blockquote:first-letter{margin: .2em .1em .1em 0; font-size: 160%; font-weight: bold;}
+blockquote:first-line{font-weight: bold;}
+body{font-family: sans-serif;}
 hr{background-color:#000;border:0;color:#000;}
-hr.heavy{height:5px;}
+hr.heavy{height:2px;}
 hr.light{height:1px;}
 img{border:0;display:block;}
 img.right{margin:0 0 0 auto;}
 img.center{border:0;margin:0 auto;}
-table th,table td{padding:4px;}
-.center,header{text-align:center;}
-table.center {margin-left:auto; margin-right:auto;}
+table{border-collapse: collapse;}
+table th,table td{padding: 3px 7px 2px 7px;}
+table th{background-color: lightgrey;}
+table.center{margin-left:auto; margin-right:auto;}
+.center{text-align:center;}
 .right{text-align:right;}
 .left{text-align:left;}
 .tableborder,.tableborder td,.tableborder th{border:1px solid #000;}
@@ -24,9 +31,9 @@ table.center {margin-left:auto; margin-right:auto;}
 <hgroup>
 </hgroup>
 </header>
-<article>
 
-<div class="body" id="body">
+
+<div class="body">
 
 <section~A~>
 <h1></h1>
@@ -68,6 +75,4 @@ currently open paragraph.
 </section>
 </div>
 
-<!-- html code generated by txt2tags (http://txt2tags.org) -->
-<!-- cmdline: txt2tags -q -\-no-rc paragraph.t2t -->
-</article></body></html>
+</body></html>
diff --git a/test/marks/ok/quote.html b/test/marks/ok/quote.html
index ef0db8e..369117e 100644
--- a/test/marks/ok/quote.html
+++ b/test/marks/ok/quote.html
@@ -1,18 +1,25 @@
 <!DOCTYPE html>
-<html>
+<html lang="en">
 <head>
-<meta name="generator" content="http://txt2tags.org">
+<meta charset="utf-8">
+<meta name="generator" content="https://txt2tags.org">
 <style>
-body{background-color:#fff;color:#000;}
+blockquote{margin: 1em 2em; border-left: 2px solid #999;
+  font-style: oblique; padding-left: 1em;}
+blockquote:first-letter{margin: .2em .1em .1em 0; font-size: 160%; font-weight: bold;}
+blockquote:first-line{font-weight: bold;}
+body{font-family: sans-serif;}
 hr{background-color:#000;border:0;color:#000;}
-hr.heavy{height:5px;}
+hr.heavy{height:2px;}
 hr.light{height:1px;}
 img{border:0;display:block;}
 img.right{margin:0 0 0 auto;}
 img.center{border:0;margin:0 auto;}
-table th,table td{padding:4px;}
-.center,header{text-align:center;}
-table.center {margin-left:auto; margin-right:auto;}
+table{border-collapse: collapse;}
+table th,table td{padding: 3px 7px 2px 7px;}
+table th{background-color: lightgrey;}
+table.center{margin-left:auto; margin-right:auto;}
+.center{text-align:center;}
 .right{text-align:right;}
 .left{text-align:left;}
 .tableborder,.tableborder td,.tableborder th{border:1px solid #000;}
@@ -24,9 +31,9 @@ table.center {margin-left:auto; margin-right:auto;}
 <hgroup>
 </hgroup>
 </header>
-<article>
 
-<div class="body" id="body">
+
+<div class="body">
 
 <section~A~>
 <h1></h1>
@@ -171,6 +178,4 @@ Any non-tabbed line closes the quote block.
 </section>
 </div>
 
-<!-- html code generated by txt2tags (http://txt2tags.org) -->
-<!-- cmdline: txt2tags -q -\-no-rc quote.t2t -->
-</article></body></html>
+</body></html>
diff --git a/test/marks/ok/raw.html b/test/marks/ok/raw.html
index e7ddd40..f54b130 100644
--- a/test/marks/ok/raw.html
+++ b/test/marks/ok/raw.html
@@ -1,18 +1,25 @@
 <!DOCTYPE html>
-<html>
+<html lang="en">
 <head>
-<meta name="generator" content="http://txt2tags.org">
+<meta charset="utf-8">
+<meta name="generator" content="https://txt2tags.org">
 <style>
-body{background-color:#fff;color:#000;}
+blockquote{margin: 1em 2em; border-left: 2px solid #999;
+  font-style: oblique; padding-left: 1em;}
+blockquote:first-letter{margin: .2em .1em .1em 0; font-size: 160%; font-weight: bold;}
+blockquote:first-line{font-weight: bold;}
+body{font-family: sans-serif;}
 hr{background-color:#000;border:0;color:#000;}
-hr.heavy{height:5px;}
+hr.heavy{height:2px;}
 hr.light{height:1px;}
 img{border:0;display:block;}
 img.right{margin:0 0 0 auto;}
 img.center{border:0;margin:0 auto;}
-table th,table td{padding:4px;}
-.center,header{text-align:center;}
-table.center {margin-left:auto; margin-right:auto;}
+table{border-collapse: collapse;}
+table th,table td{padding: 3px 7px 2px 7px;}
+table th{background-color: lightgrey;}
+table.center{margin-left:auto; margin-right:auto;}
+.center{text-align:center;}
 .right{text-align:right;}
 .left{text-align:left;}
 .tableborder,.tableborder td,.tableborder th{border:1px solid #000;}
@@ -24,9 +31,9 @@ table.center {margin-left:auto; margin-right:auto;}
 <hgroup>
 </hgroup>
 </header>
-<article>
 
-<div class="body" id="body">
+
+<div class="body">
 
 <section~A~>
 <h1></h1>
@@ -85,6 +92,4 @@ the currently open raw area.
 </section>
 </div>
 
-<!-- html code generated by txt2tags (http://txt2tags.org) -->
-<!-- cmdline: txt2tags -q -\-no-rc -C config -o raw.html verbatim.t2t -->
-</article></body></html>
+</body></html>
diff --git a/test/marks/ok/table.html b/test/marks/ok/table.html
index 1fae227..71efd56 100644
--- a/test/marks/ok/table.html
+++ b/test/marks/ok/table.html
@@ -1,18 +1,25 @@
 <!DOCTYPE html>
-<html>
+<html lang="en">
 <head>
-<meta name="generator" content="http://txt2tags.org">
+<meta charset="utf-8">
+<meta name="generator" content="https://txt2tags.org">
 <style>
-body{background-color:#fff;color:#000;}
+blockquote{margin: 1em 2em; border-left: 2px solid #999;
+  font-style: oblique; padding-left: 1em;}
+blockquote:first-letter{margin: .2em .1em .1em 0; font-size: 160%; font-weight: bold;}
+blockquote:first-line{font-weight: bold;}
+body{font-family: sans-serif;}
 hr{background-color:#000;border:0;color:#000;}
-hr.heavy{height:5px;}
+hr.heavy{height:2px;}
 hr.light{height:1px;}
 img{border:0;display:block;}
 img.right{margin:0 0 0 auto;}
 img.center{border:0;margin:0 auto;}
-table th,table td{padding:4px;}
-.center,header{text-align:center;}
-table.center {margin-left:auto; margin-right:auto;}
+table{border-collapse: collapse;}
+table th,table td{padding: 3px 7px 2px 7px;}
+table th{background-color: lightgrey;}
+table.center{margin-left:auto; margin-right:auto;}
+.center{text-align:center;}
 .right{text-align:right;}
 .left{text-align:left;}
 .tableborder,.tableborder td,.tableborder th{border:1px solid #000;}
@@ -24,9 +31,9 @@ table.center {margin-left:auto; margin-right:auto;}
 <hgroup>
 </hgroup>
 </header>
-<article>
 
-<div class="body" id="body">
+
+<div class="body">
 
 <section~A~>
 <h1></h1>
@@ -408,6 +415,4 @@ table.center {margin-left:auto; margin-right:auto;}
 </section>
 </div>
 
-<!-- html code generated by txt2tags (http://txt2tags.org) -->
-<!-- cmdline: txt2tags -q -\-no-rc table.t2t -->
-</article></body></html>
+</body></html>
diff --git a/test/marks/ok/tagged.html b/test/marks/ok/tagged.html
index 1b1d08c..d1996cb 100644
--- a/test/marks/ok/tagged.html
+++ b/test/marks/ok/tagged.html
@@ -1,18 +1,25 @@
 <!DOCTYPE html>
-<html>
+<html lang="en">
 <head>
-<meta name="generator" content="http://txt2tags.org">
+<meta charset="utf-8">
+<meta name="generator" content="https://txt2tags.org">
 <style>
-body{background-color:#fff;color:#000;}
+blockquote{margin: 1em 2em; border-left: 2px solid #999;
+  font-style: oblique; padding-left: 1em;}
+blockquote:first-letter{margin: .2em .1em .1em 0; font-size: 160%; font-weight: bold;}
+blockquote:first-line{font-weight: bold;}
+body{font-family: sans-serif;}
 hr{background-color:#000;border:0;color:#000;}
-hr.heavy{height:5px;}
+hr.heavy{height:2px;}
 hr.light{height:1px;}
 img{border:0;display:block;}
 img.right{margin:0 0 0 auto;}
 img.center{border:0;margin:0 auto;}
-table th,table td{padding:4px;}
-.center,header{text-align:center;}
-table.center {margin-left:auto; margin-right:auto;}
+table{border-collapse: collapse;}
+table th,table td{padding: 3px 7px 2px 7px;}
+table th{background-color: lightgrey;}
+table.center{margin-left:auto; margin-right:auto;}
+.center{text-align:center;}
 .right{text-align:right;}
 .left{text-align:left;}
 .tableborder,.tableborder td,.tableborder th{border:1px solid #000;}
@@ -24,9 +31,9 @@ table.center {margin-left:auto; margin-right:auto;}
 <hgroup>
 </hgroup>
 </header>
-<article>
 
-<div class="body" id="body">
+
+<div class="body">
 
 <section~A~>
 <h1></h1>
@@ -85,6 +92,4 @@ the currently open tagged area.
 </section>
 </div>
 
-<!-- html code generated by txt2tags (http://txt2tags.org) -->
-<!-- cmdline: txt2tags -q -\-no-rc -C config -o tagged.html verbatim.t2t -->
-</article></body></html>
+</body></html>
diff --git a/test/marks/ok/title.html b/test/marks/ok/title.html
index fd491dd..10d00eb 100644
--- a/test/marks/ok/title.html
+++ b/test/marks/ok/title.html
@@ -1,18 +1,25 @@
 <!DOCTYPE html>
-<html>
+<html lang="en">
 <head>
-<meta name="generator" content="http://txt2tags.org">
+<meta charset="utf-8">
+<meta name="generator" content="https://txt2tags.org">
 <style>
-body{background-color:#fff;color:#000;}
+blockquote{margin: 1em 2em; border-left: 2px solid #999;
+  font-style: oblique; padding-left: 1em;}
+blockquote:first-letter{margin: .2em .1em .1em 0; font-size: 160%; font-weight: bold;}
+blockquote:first-line{font-weight: bold;}
+body{font-family: sans-serif;}
 hr{background-color:#000;border:0;color:#000;}
-hr.heavy{height:5px;}
+hr.heavy{height:2px;}
 hr.light{height:1px;}
 img{border:0;display:block;}
 img.right{margin:0 0 0 auto;}
 img.center{border:0;margin:0 auto;}
-table th,table td{padding:4px;}
-.center,header{text-align:center;}
-table.center {margin-left:auto; margin-right:auto;}
+table{border-collapse: collapse;}
+table th,table td{padding: 3px 7px 2px 7px;}
+table th{background-color: lightgrey;}
+table.center{margin-left:auto; margin-right:auto;}
+.center{text-align:center;}
 .right{text-align:right;}
 .left{text-align:left;}
 .tableborder,.tableborder td,.tableborder th{border:1px solid #000;}
@@ -24,9 +31,9 @@ table.center {margin-left:auto; margin-right:auto;}
 <hgroup>
 </hgroup>
 </header>
-<article>
 
-<div class="body" id="body">
+
+<div class="body">
 
 <section~A~>
 <h1></h1>
@@ -157,6 +164,4 @@ table.center {margin-left:auto; margin-right:auto;}
 </section>
 </div>
 
-<!-- html code generated by txt2tags (http://txt2tags.org) -->
-<!-- cmdline: txt2tags -q -\-no-rc title.t2t -->
-</article></body></html>
+</body></html>
diff --git a/test/marks/ok/verbatim.html b/test/marks/ok/verbatim.html
index 6b8edb0..dc8ca17 100644
--- a/test/marks/ok/verbatim.html
+++ b/test/marks/ok/verbatim.html
@@ -1,18 +1,25 @@
 <!DOCTYPE html>
-<html>
+<html lang="en">
 <head>
-<meta name="generator" content="http://txt2tags.org">
+<meta charset="utf-8">
+<meta name="generator" content="https://txt2tags.org">
 <style>
-body{background-color:#fff;color:#000;}
+blockquote{margin: 1em 2em; border-left: 2px solid #999;
+  font-style: oblique; padding-left: 1em;}
+blockquote:first-letter{margin: .2em .1em .1em 0; font-size: 160%; font-weight: bold;}
+blockquote:first-line{font-weight: bold;}
+body{font-family: sans-serif;}
 hr{background-color:#000;border:0;color:#000;}
-hr.heavy{height:5px;}
+hr.heavy{height:2px;}
 hr.light{height:1px;}
 img{border:0;display:block;}
 img.right{margin:0 0 0 auto;}
 img.center{border:0;margin:0 auto;}
-table th,table td{padding:4px;}
-.center,header{text-align:center;}
-table.center {margin-left:auto; margin-right:auto;}
+table{border-collapse: collapse;}
+table th,table td{padding: 3px 7px 2px 7px;}
+table th{background-color: lightgrey;}
+table.center{margin-left:auto; margin-right:auto;}
+.center{text-align:center;}
 .right{text-align:right;}
 .left{text-align:left;}
 .tableborder,.tableborder td,.tableborder th{border:1px solid #000;}
@@ -24,9 +31,9 @@ table.center {margin-left:auto; margin-right:auto;}
 <hgroup>
 </hgroup>
 </header>
-<article>
 
-<div class="body" id="body">
+
+<div class="body">
 
 <section~A~>
 <h1></h1>
@@ -95,6 +102,4 @@ the currently open verbatim area.
 </section>
 </section>
 </div>
-<!-- html code generated by txt2tags (http://txt2tags.org) -->
-<!-- cmdline: txt2tags -q -\-no-rc verbatim.t2t -->
-</article></body></html>
+</body></html>
diff --git a/test/nesting/ok/deflist.html b/test/nesting/ok/deflist.html
index e9a5c46..d5134d5 100644
--- a/test/nesting/ok/deflist.html
+++ b/test/nesting/ok/deflist.html
@@ -1,4 +1,4 @@
-<div class="body" id="body">
+<div class="body">
 
 <section~A~>
 <h1></h1>
diff --git a/test/nesting/ok/list.html b/test/nesting/ok/list.html
index 987c694..25d177b 100644
--- a/test/nesting/ok/list.html
+++ b/test/nesting/ok/list.html
@@ -1,4 +1,4 @@
-<div class="body" id="body">
+<div class="body">
 
 <section~A~>
 <h1></h1>
diff --git a/test/nesting/ok/numlist.html b/test/nesting/ok/numlist.html
index 1b60727..c6d97ee 100644
--- a/test/nesting/ok/numlist.html
+++ b/test/nesting/ok/numlist.html
@@ -1,4 +1,4 @@
-<div class="body" id="body">
+<div class="body">
 
 <section~A~>
 <h1></h1>
diff --git a/test/nesting/ok/quote.html b/test/nesting/ok/quote.html
index 3052ecd..4758c47 100644
--- a/test/nesting/ok/quote.html
+++ b/test/nesting/ok/quote.html
@@ -1,4 +1,4 @@
-<div class="body" id="body">
+<div class="body">
 
 <section~A~>
 <h1></h1>
diff --git a/test/nesting/ok/table.html b/test/nesting/ok/table.html
index 68a2ef8..253e647 100644
--- a/test/nesting/ok/table.html
+++ b/test/nesting/ok/table.html
@@ -1,4 +1,4 @@
-<div class="body" id="body">
+<div class="body">
 
 <section~A~>
 <h1></h1>
diff --git a/test/options/ok/H.html b/test/options/ok/H.html
index 49aa39f..1795b7e 100644
--- a/test/options/ok/H.html
+++ b/test/options/ok/H.html
@@ -1,4 +1,4 @@
-<div class="body" id="body">
+<div class="body">
 <p>
 Text.
 </p>
diff --git a/test/options/ok/V.out b/test/options/ok/V.out
index a043e20..df714cc 100644
--- a/test/options/ok/V.out
+++ b/test/options/ok/V.out
@@ -1 +1 @@
-txt2tags version 2.6 <http://txt2tags.org>
+txt2tags version 3.6 <https://txt2tags.org>
diff --git a/test/options/ok/arguments-missing.out b/test/options/ok/arguments-missing.out
index 9a37075..60bf33e 100644
--- a/test/options/ok/arguments-missing.out
+++ b/test/options/ok/arguments-missing.out
@@ -1,4 +1 @@
-txt2tags: Error: Missing input file (try --help)
-
-Please inform an input file (.t2t) at the end of the command.
-Example: txt2tags -t html file.t2t
+Error: Pass exactly one input file (see --help). Example: txt2tags -t html file.t2t
diff --git a/test/options/ok/css-sugar-1.html b/test/options/ok/css-sugar-1.html
deleted file mode 100644
index 49aa39f..0000000
--- a/test/options/ok/css-sugar-1.html
+++ /dev/null
@@ -1,5 +0,0 @@
-<div class="body" id="body">
-<p>
-Text.
-</p>
-</div>
diff --git a/test/options/ok/css-sugar-2.html b/test/options/ok/css-sugar-2.html
deleted file mode 100644
index fcf9164..0000000
--- a/test/options/ok/css-sugar-2.html
+++ /dev/null
@@ -1,9 +0,0 @@
-<nav>
-<div class="body" id="body">
-</div>
-</nav>
-<div class="body" id="body">
-<p>
-Text.
-</p>
-</div>
diff --git a/test/options/ok/css-sugar-3.html b/test/options/ok/css-sugar-3.html
deleted file mode 100644
index a75ad57..0000000
--- a/test/options/ok/css-sugar-3.html
+++ /dev/null
@@ -1,68 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-<title>Header 1</title>
-<meta name="generator" content="http://txt2tags.org">
-<style>
-body{background-color:#fff;color:#000;}
-hr{background-color:#000;border:0;color:#000;}
-hr.heavy{height:5px;}
-hr.light{height:1px;}
-img{border:0;display:block;}
-img.right{margin:0 0 0 auto;}
-img.center{border:0;margin:0 auto;}
-table th,table td{padding:4px;}
-.center,header{text-align:center;}
-table.center {margin-left:auto; margin-right:auto;}
-.right{text-align:right;}
-.left{text-align:left;}
-.tableborder,.tableborder td,.tableborder th{border:1px solid #000;}
-.underline{text-decoration:underline;}
-</style>
-</head>
-<body>
-<header>
-<hgroup>
-<h1>Header 1</h1>
-<h2>Header 2</h2>
-<h3>Header 3</h3>
-</hgroup>
-</header>
-<article>
-
-<nav>
-<div class="body" id="body">
-
-  <ul>
-  <li><a href="#toc1">Title 1</a>
-    <ul>
-    <li><a href="#toc2">Title 2</a>
-    </li>
-    </ul>
-  </li>
-  </ul>
-
-</div>
-</nav>
-<div class="body" id="body">
-
-<section id="toc1">
-<h1>Title 1</h1>
-
-<p>
-Text.
-</p>
-
-<section id="toc2">
-<h2>Title 2</h2>
-
-<p>
-Text.
-</p>
-</section>
-</section>
-</div>
-
-<!-- html code generated by txt2tags (http://txt2tags.org) -->
-<!-- cmdline: txt2tags -q -\-no-rc -t html -\-toc css-sugar-3.t2t -->
-</article></body></html>
diff --git a/test/options/ok/dump-config.out b/test/options/ok/dump-config.out
deleted file mode 100644
index 891df8b..0000000
--- a/test/options/ok/dump-config.out
+++ /dev/null
@@ -1,22 +0,0 @@
-RAW config for RC file
-
-RAW config for source document
-  (all)    target........: html
-
-RAW config for command line
-  (all)    quiet.........: ON
-  (all)    no-rc.........: ON
-  (all)    dump-config...: ON
-  (all)    infile........: dump-config.t2t
-  (all)    realcmdline...: ['-q', '--no-rc', '--dump-config', 'dump-config.t2t']
-
-Full PARSED config
-           dump-config...: ON
-           infile........: dump-config.t2t
-           quiet.........: ON
-           rc............: OFF
-           realcmdline...: -q, --no-rc, --dump-config, dump-config.t2t
-           sourcefile....: dump-config.t2t
-           target........: html
-
-Active filters
diff --git a/test/options/ok/dump-source.out b/test/options/ok/dump-source.out
deleted file mode 100644
index ae5b52b..0000000
--- a/test/options/ok/dump-source.out
+++ /dev/null
@@ -1,5 +0,0 @@
-Header 1
-Header 2
-Header 3
-%!target: html
-Text.
diff --git a/test/options/ok/encoding-1.html b/test/options/ok/encoding-1.html
deleted file mode 100644
index 273a407..0000000
--- a/test/options/ok/encoding-1.html
+++ /dev/null
@@ -1,38 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-<meta charset="iso-8859-1">
-<meta name="generator" content="http://txt2tags.org">
-<style>
-body{background-color:#fff;color:#000;}
-hr{background-color:#000;border:0;color:#000;}
-hr.heavy{height:5px;}
-hr.light{height:1px;}
-img{border:0;display:block;}
-img.right{margin:0 0 0 auto;}
-img.center{border:0;margin:0 auto;}
-table th,table td{padding:4px;}
-.center,header{text-align:center;}
-table.center {margin-left:auto; margin-right:auto;}
-.right{text-align:right;}
-.left{text-align:left;}
-.tableborder,.tableborder td,.tableborder th{border:1px solid #000;}
-.underline{text-decoration:underline;}
-</style>
-</head>
-<body>
-<header>
-<hgroup>
-</hgroup>
-</header>
-<article>
-
-<div class="body" id="body">
-<p>
-Text.
-</p>
-</div>
-
-<!-- html code generated by txt2tags (http://txt2tags.org) -->
-<!-- cmdline: txt2tags -q -\-no-rc -t html -\-encoding iso-8859-1 encoding-1.t2t -->
-</article></body></html>
diff --git a/test/options/ok/encoding-2.html b/test/options/ok/encoding-2.html
deleted file mode 100644
index e22b1ff..0000000
--- a/test/options/ok/encoding-2.html
+++ /dev/null
@@ -1,38 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-<meta charset="iso-8859-1">
-<meta name="generator" content="http://txt2tags.org">
-<style>
-body{background-color:#fff;color:#000;}
-hr{background-color:#000;border:0;color:#000;}
-hr.heavy{height:5px;}
-hr.light{height:1px;}
-img{border:0;display:block;}
-img.right{margin:0 0 0 auto;}
-img.center{border:0;margin:0 auto;}
-table th,table td{padding:4px;}
-.center,header{text-align:center;}
-table.center {margin-left:auto; margin-right:auto;}
-.right{text-align:right;}
-.left{text-align:left;}
-.tableborder,.tableborder td,.tableborder th{border:1px solid #000;}
-.underline{text-decoration:underline;}
-</style>
-</head>
-<body>
-<header>
-<hgroup>
-</hgroup>
-</header>
-<article>
-
-<div class="body" id="body">
-<p>
-Text.
-</p>
-</div>
-
-<!-- html code generated by txt2tags (http://txt2tags.org) -->
-<!-- cmdline: txt2tags -q -\-no-rc -t html -\-encoding ISO88591 encoding-2.t2t -->
-</article></body></html>
diff --git a/test/options/ok/encoding-3.html b/test/options/ok/encoding-3.html
deleted file mode 100644
index 8b7fff6..0000000
--- a/test/options/ok/encoding-3.html
+++ /dev/null
@@ -1,38 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-<meta charset="fake-999">
-<meta name="generator" content="http://txt2tags.org">
-<style>
-body{background-color:#fff;color:#000;}
-hr{background-color:#000;border:0;color:#000;}
-hr.heavy{height:5px;}
-hr.light{height:1px;}
-img{border:0;display:block;}
-img.right{margin:0 0 0 auto;}
-img.center{border:0;margin:0 auto;}
-table th,table td{padding:4px;}
-.center,header{text-align:center;}
-table.center {margin-left:auto; margin-right:auto;}
-.right{text-align:right;}
-.left{text-align:left;}
-.tableborder,.tableborder td,.tableborder th{border:1px solid #000;}
-.underline{text-decoration:underline;}
-</style>
-</head>
-<body>
-<header>
-<hgroup>
-</hgroup>
-</header>
-<article>
-
-<div class="body" id="body">
-<p>
-Text.
-</p>
-</div>
-
-<!-- html code generated by txt2tags (http://txt2tags.org) -->
-<!-- cmdline: txt2tags -q -\-no-rc -t html -\-encoding fake-999 encoding-3.t2t -->
-</article></body></html>
diff --git a/test/options/ok/encoding-4.tex b/test/options/ok/encoding-4.tex
deleted file mode 100644
index 298dc22..0000000
--- a/test/options/ok/encoding-4.tex
+++ /dev/null
@@ -1,17 +0,0 @@
-\documentclass{article}
-\usepackage{graphicx}
-\usepackage{paralist} % needed for compact lists
-\usepackage[normalem]{ulem} % needed by strike
-\usepackage[urlcolor=blue,colorlinks=true]{hyperref}
-\usepackage[latin1]{inputenc}  % char encoding
-
-\begin{document}
-\maketitle
-\clearpage
-
-
-Text.
-
-% LaTeX2e code generated by txt2tags (http://txt2tags.org)
-% cmdline: txt2tags -q --no-rc -t tex --encoding iso-8859-1 encoding-4.t2t
-\end{document}
diff --git a/test/options/ok/enum-title-1.html b/test/options/ok/enum-title-1.html
index 3e6d224..098e633 100644
--- a/test/options/ok/enum-title-1.html
+++ b/test/options/ok/enum-title-1.html
@@ -1,4 +1,4 @@
-<div class="body" id="body">
+<div class="body">
 
 <section>
 <h1>1. Title 1</h1>
diff --git a/test/options/ok/enum-title-2.html b/test/options/ok/enum-title-2.html
index 9745d6f..8e1bd90 100644
--- a/test/options/ok/enum-title-2.html
+++ b/test/options/ok/enum-title-2.html
@@ -1,5 +1,5 @@
 <nav>
-<div class="body" id="body">
+<div class="body">
 
   <ol>
   <li><a href="#toc1">Title 1</a>
@@ -12,7 +12,7 @@
 
 </div>
 </nav>
-<div class="body" id="body">
+<div class="body">
 
 <section id="toc1">
 <h1>1. Title 1</h1>
diff --git a/test/options/ok/enum-title-3.html b/test/options/ok/enum-title-3.html
index 49aa39f..1795b7e 100644
--- a/test/options/ok/enum-title-3.html
+++ b/test/options/ok/enum-title-3.html
@@ -1,4 +1,4 @@
-<div class="body" id="body">
+<div class="body">
 <p>
 Text.
 </p>
diff --git a/test/options/ok/headers-1.html b/test/options/ok/headers-1.html
index 0bc3f6f..9cb29bf 100644
--- a/test/options/ok/headers-1.html
+++ b/test/options/ok/headers-1.html
@@ -1,18 +1,25 @@
 <!DOCTYPE html>
-<html>
+<html lang="en">
 <head>
-<meta name="generator" content="http://txt2tags.org">
+<meta charset="utf-8">
+<meta name="generator" content="https://txt2tags.org">
 <style>
-body{background-color:#fff;color:#000;}
+blockquote{margin: 1em 2em; border-left: 2px solid #999;
+  font-style: oblique; padding-left: 1em;}
+blockquote:first-letter{margin: .2em .1em .1em 0; font-size: 160%; font-weight: bold;}
+blockquote:first-line{font-weight: bold;}
+body{font-family: sans-serif;}
 hr{background-color:#000;border:0;color:#000;}
-hr.heavy{height:5px;}
+hr.heavy{height:2px;}
 hr.light{height:1px;}
 img{border:0;display:block;}
 img.right{margin:0 0 0 auto;}
 img.center{border:0;margin:0 auto;}
-table th,table td{padding:4px;}
-.center,header{text-align:center;}
-table.center {margin-left:auto; margin-right:auto;}
+table{border-collapse: collapse;}
+table th,table td{padding: 3px 7px 2px 7px;}
+table th{background-color: lightgrey;}
+table.center{margin-left:auto; margin-right:auto;}
+.center{text-align:center;}
 .right{text-align:right;}
 .left{text-align:left;}
 .tableborder,.tableborder td,.tableborder th{border:1px solid #000;}
@@ -24,14 +31,12 @@ table.center {margin-left:auto; margin-right:auto;}
 <hgroup>
 </hgroup>
 </header>
-<article>
 
-<div class="body" id="body">
+
+<div class="body">
 <p>
 Text.
 </p>
 </div>
 
-<!-- html code generated by txt2tags (http://txt2tags.org) -->
-<!-- cmdline: txt2tags -q -\-no-rc -t html -\-headers headers-1.t2t -->
-</article></body></html>
+</body></html>
diff --git a/test/options/ok/headers-2.html b/test/options/ok/headers-2.html
index a409785..9cb29bf 100644
--- a/test/options/ok/headers-2.html
+++ b/test/options/ok/headers-2.html
@@ -1,18 +1,25 @@
 <!DOCTYPE html>
-<html>
+<html lang="en">
 <head>
-<meta name="generator" content="http://txt2tags.org">
+<meta charset="utf-8">
+<meta name="generator" content="https://txt2tags.org">
 <style>
-body{background-color:#fff;color:#000;}
+blockquote{margin: 1em 2em; border-left: 2px solid #999;
+  font-style: oblique; padding-left: 1em;}
+blockquote:first-letter{margin: .2em .1em .1em 0; font-size: 160%; font-weight: bold;}
+blockquote:first-line{font-weight: bold;}
+body{font-family: sans-serif;}
 hr{background-color:#000;border:0;color:#000;}
-hr.heavy{height:5px;}
+hr.heavy{height:2px;}
 hr.light{height:1px;}
 img{border:0;display:block;}
 img.right{margin:0 0 0 auto;}
 img.center{border:0;margin:0 auto;}
-table th,table td{padding:4px;}
-.center,header{text-align:center;}
-table.center {margin-left:auto; margin-right:auto;}
+table{border-collapse: collapse;}
+table th,table td{padding: 3px 7px 2px 7px;}
+table th{background-color: lightgrey;}
+table.center{margin-left:auto; margin-right:auto;}
+.center{text-align:center;}
 .right{text-align:right;}
 .left{text-align:left;}
 .tableborder,.tableborder td,.tableborder th{border:1px solid #000;}
@@ -24,14 +31,12 @@ table.center {margin-left:auto; margin-right:auto;}
 <hgroup>
 </hgroup>
 </header>
-<article>
 
-<div class="body" id="body">
+
+<div class="body">
 <p>
 Text.
 </p>
 </div>
 
-<!-- html code generated by txt2tags (http://txt2tags.org) -->
-<!-- cmdline: txt2tags -q -\-no-rc -t html -\-no-headers -\-headers headers-2.t2t -->
-</article></body></html>
+</body></html>
diff --git a/test/options/ok/i.html b/test/options/ok/i.html
index 49aa39f..1795b7e 100644
--- a/test/options/ok/i.html
+++ b/test/options/ok/i.html
@@ -1,4 +1,4 @@
-<div class="body" id="body">
+<div class="body">
 <p>
 Text.
 </p>
diff --git a/test/options/ok/infile-empty.out b/test/options/ok/infile-empty.out
index 0fcb52b..92bf657 100644
--- a/test/options/ok/infile-empty.out
+++ b/test/options/ok/infile-empty.out
@@ -1 +1 @@
-txt2tags: Error: The input file is empty: infile-empty.t2t
+Error: The input file is empty: infile-empty.t2t
diff --git a/test/options/ok/infile-missing.out b/test/options/ok/infile-missing.out
index 9a37075..60bf33e 100644
--- a/test/options/ok/infile-missing.out
+++ b/test/options/ok/infile-missing.out
@@ -1,4 +1 @@
-txt2tags: Error: Missing input file (try --help)
-
-Please inform an input file (.t2t) at the end of the command.
-Example: txt2tags -t html file.t2t
+Error: Pass exactly one input file (see --help). Example: txt2tags -t html file.t2t
diff --git a/test/options/ok/infile-not-found-1.out b/test/options/ok/infile-not-found-1.out
index 136a16f..e248f29 100644
--- a/test/options/ok/infile-not-found-1.out
+++ b/test/options/ok/infile-not-found-1.out
@@ -1 +1,2 @@
-txt2tags: Error: Cannot read file: ERROR.t2t
+Error: Cannot read file: ERROR.t2t
+[Errno 2] No such file or directory: 'ERROR.t2t'
diff --git a/test/options/ok/infile-not-found-2.out b/test/options/ok/infile-not-found-2.out
index 136a16f..e248f29 100644
--- a/test/options/ok/infile-not-found-2.out
+++ b/test/options/ok/infile-not-found-2.out
@@ -1 +1,2 @@
-txt2tags: Error: Cannot read file: ERROR.t2t
+Error: Cannot read file: ERROR.t2t
+[Errno 2] No such file or directory: 'ERROR.t2t'
diff --git a/test/options/ok/infile.html b/test/options/ok/infile.html
index 49aa39f..1795b7e 100644
--- a/test/options/ok/infile.html
+++ b/test/options/ok/infile.html
@@ -1,4 +1,4 @@
-<div class="body" id="body">
+<div class="body">
 <p>
 Text.
 </p>
diff --git a/test/options/ok/invalid-long-1.out b/test/options/ok/invalid-long-1.out
index 8b16af2..f92ed49 100644
--- a/test/options/ok/invalid-long-1.out
+++ b/test/options/ok/invalid-long-1.out
@@ -1 +1 @@
-txt2tags: Error: option --zzzz not recognized (try --help)
+Error: option --zzzz not recognized (try --help)
diff --git a/test/options/ok/invalid-long-2.out b/test/options/ok/invalid-long-2.out
index 8b16af2..f92ed49 100644
--- a/test/options/ok/invalid-long-2.out
+++ b/test/options/ok/invalid-long-2.out
@@ -1 +1 @@
-txt2tags: Error: option --zzzz not recognized (try --help)
+Error: option --zzzz not recognized (try --help)
diff --git a/test/options/ok/invalid-short-1.out b/test/options/ok/invalid-short-1.out
index ad70b8d..716a2ed 100644
--- a/test/options/ok/invalid-short-1.out
+++ b/test/options/ok/invalid-short-1.out
@@ -1 +1 @@
-txt2tags: Error: option -z not recognized (try --help)
+Error: option -z not recognized (try --help)
diff --git a/test/options/ok/invalid-short-2.out b/test/options/ok/invalid-short-2.out
index ad70b8d..716a2ed 100644
--- a/test/options/ok/invalid-short-2.out
+++ b/test/options/ok/invalid-short-2.out
@@ -1 +1 @@
-txt2tags: Error: option -z not recognized (try --help)
+Error: option -z not recognized (try --help)
diff --git a/test/options/ok/mask-email.html b/test/options/ok/mask-email.html
deleted file mode 100644
index e520caf..0000000
--- a/test/options/ok/mask-email.html
+++ /dev/null
@@ -1,5 +0,0 @@
-<div class="body" id="body">
-<p>
-&lt;user (a) domain com&gt;
-</p>
-</div>
diff --git a/test/options/ok/n.html b/test/options/ok/n.html
index 3e6d224..098e633 100644
--- a/test/options/ok/n.html
+++ b/test/options/ok/n.html
@@ -1,4 +1,4 @@
-<div class="body" id="body">
+<div class="body">
 
 <section>
 <h1>1. Title 1</h1>
diff --git a/test/options/ok/no-css-sugar-1.html b/test/options/ok/no-css-sugar-1.html
deleted file mode 100644
index 49aa39f..0000000
--- a/test/options/ok/no-css-sugar-1.html
+++ /dev/null
@@ -1,5 +0,0 @@
-<div class="body" id="body">
-<p>
-Text.
-</p>
-</div>
diff --git a/test/options/ok/no-dump-config.out b/test/options/ok/no-dump-config.out
deleted file mode 100644
index 49aa39f..0000000
--- a/test/options/ok/no-dump-config.out
+++ /dev/null
@@ -1,5 +0,0 @@
-<div class="body" id="body">
-<p>
-Text.
-</p>
-</div>
diff --git a/test/options/ok/no-dump-source.out b/test/options/ok/no-dump-source.out
deleted file mode 100644
index 49aa39f..0000000
--- a/test/options/ok/no-dump-source.out
+++ /dev/null
@@ -1,5 +0,0 @@
-<div class="body" id="body">
-<p>
-Text.
-</p>
-</div>
diff --git a/test/options/ok/no-encoding-1.html b/test/options/ok/no-encoding-1.html
deleted file mode 100644
index 877a497..0000000
--- a/test/options/ok/no-encoding-1.html
+++ /dev/null
@@ -1,37 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-<meta name="generator" content="http://txt2tags.org">
-<style>
-body{background-color:#fff;color:#000;}
-hr{background-color:#000;border:0;color:#000;}
-hr.heavy{height:5px;}
-hr.light{height:1px;}
-img{border:0;display:block;}
-img.right{margin:0 0 0 auto;}
-img.center{border:0;margin:0 auto;}
-table th,table td{padding:4px;}
-.center,header{text-align:center;}
-table.center {margin-left:auto; margin-right:auto;}
-.right{text-align:right;}
-.left{text-align:left;}
-.tableborder,.tableborder td,.tableborder th{border:1px solid #000;}
-.underline{text-decoration:underline;}
-</style>
-</head>
-<body>
-<header>
-<hgroup>
-</hgroup>
-</header>
-<article>
-
-<div class="body" id="body">
-<p>
-Text.
-</p>
-</div>
-
-<!-- html code generated by txt2tags (http://txt2tags.org) -->
-<!-- cmdline: txt2tags -q -\-no-rc -t html -\-no-encoding no-encoding-1.t2t -->
-</article></body></html>
diff --git a/test/options/ok/no-encoding-2.html b/test/options/ok/no-encoding-2.html
deleted file mode 100644
index 623c95d..0000000
--- a/test/options/ok/no-encoding-2.html
+++ /dev/null
@@ -1,37 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-<meta name="generator" content="http://txt2tags.org">
-<style>
-body{background-color:#fff;color:#000;}
-hr{background-color:#000;border:0;color:#000;}
-hr.heavy{height:5px;}
-hr.light{height:1px;}
-img{border:0;display:block;}
-img.right{margin:0 0 0 auto;}
-img.center{border:0;margin:0 auto;}
-table th,table td{padding:4px;}
-.center,header{text-align:center;}
-table.center {margin-left:auto; margin-right:auto;}
-.right{text-align:right;}
-.left{text-align:left;}
-.tableborder,.tableborder td,.tableborder th{border:1px solid #000;}
-.underline{text-decoration:underline;}
-</style>
-</head>
-<body>
-<header>
-<hgroup>
-</hgroup>
-</header>
-<article>
-
-<div class="body" id="body">
-<p>
-Text.
-</p>
-</div>
-
-<!-- html code generated by txt2tags (http://txt2tags.org) -->
-<!-- cmdline: txt2tags -q -\-no-rc -t html -\-encoding iso-8859-1 -\-no-encoding no-encoding-2.t2t -->
-</article></body></html>
diff --git a/test/options/ok/no-enum-title-1.html b/test/options/ok/no-enum-title-1.html
index 8128d85..75aefa4 100644
--- a/test/options/ok/no-enum-title-1.html
+++ b/test/options/ok/no-enum-title-1.html
@@ -1,4 +1,4 @@
-<div class="body" id="body">
+<div class="body">
 
 <section>
 <h1>Title 1</h1>
diff --git a/test/options/ok/no-enum-title-2.html b/test/options/ok/no-enum-title-2.html
index 8128d85..75aefa4 100644
--- a/test/options/ok/no-enum-title-2.html
+++ b/test/options/ok/no-enum-title-2.html
@@ -1,4 +1,4 @@
-<div class="body" id="body">
+<div class="body">
 
 <section>
 <h1>Title 1</h1>
diff --git a/test/options/ok/no-headers.html b/test/options/ok/no-headers.html
index 49aa39f..1795b7e 100644
--- a/test/options/ok/no-headers.html
+++ b/test/options/ok/no-headers.html
@@ -1,4 +1,4 @@
-<div class="body" id="body">
+<div class="body">
 <p>
 Text.
 </p>
diff --git a/test/options/ok/no-infile-1.html b/test/options/ok/no-infile-1.html
index 49aa39f..1795b7e 100644
--- a/test/options/ok/no-infile-1.html
+++ b/test/options/ok/no-infile-1.html
@@ -1,4 +1,4 @@
-<div class="body" id="body">
+<div class="body">
 <p>
 Text.
 </p>
diff --git a/test/options/ok/no-infile-2.html b/test/options/ok/no-infile-2.html
index 49aa39f..1795b7e 100644
--- a/test/options/ok/no-infile-2.html
+++ b/test/options/ok/no-infile-2.html
@@ -1,4 +1,4 @@
-<div class="body" id="body">
+<div class="body">
 <p>
 Text.
 </p>
diff --git a/test/options/ok/no-infile-3.html b/test/options/ok/no-infile-3.html
index 49aa39f..1795b7e 100644
--- a/test/options/ok/no-infile-3.html
+++ b/test/options/ok/no-infile-3.html
@@ -1,4 +1,4 @@
-<div class="body" id="body">
+<div class="body">
 <p>
 Text.
 </p>
diff --git a/test/options/ok/no-mask-email-1.html b/test/options/ok/no-mask-email-1.html
deleted file mode 100644
index 15303c9..0000000
--- a/test/options/ok/no-mask-email-1.html
+++ /dev/null
@@ -1,5 +0,0 @@
-<div class="body" id="body">
-<p>
-<a href="mailto:user@domain.com">user@domain.com</a>
-</p>
-</div>
diff --git a/test/options/ok/no-mask-email-2.html b/test/options/ok/no-mask-email-2.html
deleted file mode 100644
index 15303c9..0000000
--- a/test/options/ok/no-mask-email-2.html
+++ /dev/null
@@ -1,5 +0,0 @@
-<div class="body" id="body">
-<p>
-<a href="mailto:user@domain.com">user@domain.com</a>
-</p>
-</div>
diff --git a/test/options/ok/no-outfile-1.html b/test/options/ok/no-outfile-1.html
index 49aa39f..1795b7e 100644
--- a/test/options/ok/no-outfile-1.html
+++ b/test/options/ok/no-outfile-1.html
@@ -1,4 +1,4 @@
-<div class="body" id="body">
+<div class="body">
 <p>
 Text.
 </p>
diff --git a/test/options/ok/no-outfile-2.html b/test/options/ok/no-outfile-2.html
index 49aa39f..1795b7e 100644
--- a/test/options/ok/no-outfile-2.html
+++ b/test/options/ok/no-outfile-2.html
@@ -1,4 +1,4 @@
-<div class="body" id="body">
+<div class="body">
 <p>
 Text.
 </p>
diff --git a/test/options/ok/no-style-1.html b/test/options/ok/no-style-1.html
index f4df117..9cb29bf 100644
--- a/test/options/ok/no-style-1.html
+++ b/test/options/ok/no-style-1.html
@@ -1,18 +1,25 @@
 <!DOCTYPE html>
-<html>
+<html lang="en">
 <head>
-<meta name="generator" content="http://txt2tags.org">
+<meta charset="utf-8">
+<meta name="generator" content="https://txt2tags.org">
 <style>
-body{background-color:#fff;color:#000;}
+blockquote{margin: 1em 2em; border-left: 2px solid #999;
+  font-style: oblique; padding-left: 1em;}
+blockquote:first-letter{margin: .2em .1em .1em 0; font-size: 160%; font-weight: bold;}
+blockquote:first-line{font-weight: bold;}
+body{font-family: sans-serif;}
 hr{background-color:#000;border:0;color:#000;}
-hr.heavy{height:5px;}
+hr.heavy{height:2px;}
 hr.light{height:1px;}
 img{border:0;display:block;}
 img.right{margin:0 0 0 auto;}
 img.center{border:0;margin:0 auto;}
-table th,table td{padding:4px;}
-.center,header{text-align:center;}
-table.center {margin-left:auto; margin-right:auto;}
+table{border-collapse: collapse;}
+table th,table td{padding: 3px 7px 2px 7px;}
+table th{background-color: lightgrey;}
+table.center{margin-left:auto; margin-right:auto;}
+.center{text-align:center;}
 .right{text-align:right;}
 .left{text-align:left;}
 .tableborder,.tableborder td,.tableborder th{border:1px solid #000;}
@@ -24,14 +31,12 @@ table.center {margin-left:auto; margin-right:auto;}
 <hgroup>
 </hgroup>
 </header>
-<article>
 
-<div class="body" id="body">
+
+<div class="body">
 <p>
 Text.
 </p>
 </div>
 
-<!-- html code generated by txt2tags (http://txt2tags.org) -->
-<!-- cmdline: txt2tags -q -\-no-rc -t html -\-no-style no-style-1.t2t -->
-</article></body></html>
+</body></html>
diff --git a/test/options/ok/no-style-2.html b/test/options/ok/no-style-2.html
index cea345c..9cb29bf 100644
--- a/test/options/ok/no-style-2.html
+++ b/test/options/ok/no-style-2.html
@@ -1,18 +1,25 @@
 <!DOCTYPE html>
-<html>
+<html lang="en">
 <head>
-<meta name="generator" content="http://txt2tags.org">
+<meta charset="utf-8">
+<meta name="generator" content="https://txt2tags.org">
 <style>
-body{background-color:#fff;color:#000;}
+blockquote{margin: 1em 2em; border-left: 2px solid #999;
+  font-style: oblique; padding-left: 1em;}
+blockquote:first-letter{margin: .2em .1em .1em 0; font-size: 160%; font-weight: bold;}
+blockquote:first-line{font-weight: bold;}
+body{font-family: sans-serif;}
 hr{background-color:#000;border:0;color:#000;}
-hr.heavy{height:5px;}
+hr.heavy{height:2px;}
 hr.light{height:1px;}
 img{border:0;display:block;}
 img.right{margin:0 0 0 auto;}
 img.center{border:0;margin:0 auto;}
-table th,table td{padding:4px;}
-.center,header{text-align:center;}
-table.center {margin-left:auto; margin-right:auto;}
+table{border-collapse: collapse;}
+table th,table td{padding: 3px 7px 2px 7px;}
+table th{background-color: lightgrey;}
+table.center{margin-left:auto; margin-right:auto;}
+.center{text-align:center;}
 .right{text-align:right;}
 .left{text-align:left;}
 .tableborder,.tableborder td,.tableborder th{border:1px solid #000;}
@@ -24,14 +31,12 @@ table.center {margin-left:auto; margin-right:auto;}
 <hgroup>
 </hgroup>
 </header>
-<article>
 
-<div class="body" id="body">
+
+<div class="body">
 <p>
 Text.
 </p>
 </div>
 
-<!-- html code generated by txt2tags (http://txt2tags.org) -->
-<!-- cmdline: txt2tags -q -\-no-rc -t html -\-style fake.css -\-no-style no-style-2.t2t -->
-</article></body></html>
+</body></html>
diff --git a/test/options/ok/no-targets.out b/test/options/ok/no-targets.out
index 49aa39f..1795b7e 100644
--- a/test/options/ok/no-targets.out
+++ b/test/options/ok/no-targets.out
@@ -1,4 +1,4 @@
-<div class="body" id="body">
+<div class="body">
 <p>
 Text.
 </p>
diff --git a/test/options/ok/no-toc-1.html b/test/options/ok/no-toc-1.html
index 8128d85..75aefa4 100644
--- a/test/options/ok/no-toc-1.html
+++ b/test/options/ok/no-toc-1.html
@@ -1,4 +1,4 @@
-<div class="body" id="body">
+<div class="body">
 
 <section>
 <h1>Title 1</h1>
diff --git a/test/options/ok/no-toc-2.html b/test/options/ok/no-toc-2.html
index 8128d85..75aefa4 100644
--- a/test/options/ok/no-toc-2.html
+++ b/test/options/ok/no-toc-2.html
@@ -1,4 +1,4 @@
-<div class="body" id="body">
+<div class="body">
 
 <section>
 <h1>Title 1</h1>
diff --git a/test/options/ok/o.html b/test/options/ok/o.html
index 49aa39f..1795b7e 100644
--- a/test/options/ok/o.html
+++ b/test/options/ok/o.html
@@ -1,4 +1,4 @@
-<div class="body" id="body">
+<div class="body">
 <p>
 Text.
 </p>
diff --git a/test/options/ok/outfile-1.html b/test/options/ok/outfile-1.html
index 49aa39f..1795b7e 100644
--- a/test/options/ok/outfile-1.html
+++ b/test/options/ok/outfile-1.html
@@ -1,4 +1,4 @@
-<div class="body" id="body">
+<div class="body">
 <p>
 Text.
 </p>
diff --git a/test/options/ok/outfile-2.foo b/test/options/ok/outfile-2.foo
index 49aa39f..1795b7e 100644
--- a/test/options/ok/outfile-2.foo
+++ b/test/options/ok/outfile-2.foo
@@ -1,4 +1,4 @@
-<div class="body" id="body">
+<div class="body">
 <p>
 Text.
 </p>
diff --git a/test/options/ok/style-1.html b/test/options/ok/style-1.html
index 5b75dd0..d6775a4 100644
--- a/test/options/ok/style-1.html
+++ b/test/options/ok/style-1.html
@@ -1,19 +1,26 @@
 <!DOCTYPE html>
-<html>
+<html lang="en">
 <head>
-<meta name="generator" content="http://txt2tags.org">
+<meta charset="utf-8">
+<meta name="generator" content="https://txt2tags.org">
 <link rel="stylesheet" href="css">
 <style>
-body{background-color:#fff;color:#000;}
+blockquote{margin: 1em 2em; border-left: 2px solid #999;
+  font-style: oblique; padding-left: 1em;}
+blockquote:first-letter{margin: .2em .1em .1em 0; font-size: 160%; font-weight: bold;}
+blockquote:first-line{font-weight: bold;}
+body{font-family: sans-serif;}
 hr{background-color:#000;border:0;color:#000;}
-hr.heavy{height:5px;}
+hr.heavy{height:2px;}
 hr.light{height:1px;}
 img{border:0;display:block;}
 img.right{margin:0 0 0 auto;}
 img.center{border:0;margin:0 auto;}
-table th,table td{padding:4px;}
-.center,header{text-align:center;}
-table.center {margin-left:auto; margin-right:auto;}
+table{border-collapse: collapse;}
+table th,table td{padding: 3px 7px 2px 7px;}
+table th{background-color: lightgrey;}
+table.center{margin-left:auto; margin-right:auto;}
+.center{text-align:center;}
 .right{text-align:right;}
 .left{text-align:left;}
 .tableborder,.tableborder td,.tableborder th{border:1px solid #000;}
@@ -25,14 +32,12 @@ table.center {margin-left:auto; margin-right:auto;}
 <hgroup>
 </hgroup>
 </header>
-<article>
 
-<div class="body" id="body">
+
+<div class="body">
 <p>
 Text.
 </p>
 </div>
 
-<!-- html code generated by txt2tags (http://txt2tags.org) -->
-<!-- cmdline: txt2tags -q -\-no-rc -t html -\-style css style-1.t2t -->
-</article></body></html>
+</body></html>
diff --git a/test/options/ok/style-2.html b/test/options/ok/style-2.html
index d878368..b405039 100644
--- a/test/options/ok/style-2.html
+++ b/test/options/ok/style-2.html
@@ -1,20 +1,27 @@
 <!DOCTYPE html>
-<html>
+<html lang="en">
 <head>
-<meta name="generator" content="http://txt2tags.org">
+<meta charset="utf-8">
+<meta name="generator" content="https://txt2tags.org">
 <link rel="stylesheet" href="other.css">
 <link rel="stylesheet" href="css">
 <style>
-body{background-color:#fff;color:#000;}
+blockquote{margin: 1em 2em; border-left: 2px solid #999;
+  font-style: oblique; padding-left: 1em;}
+blockquote:first-letter{margin: .2em .1em .1em 0; font-size: 160%; font-weight: bold;}
+blockquote:first-line{font-weight: bold;}
+body{font-family: sans-serif;}
 hr{background-color:#000;border:0;color:#000;}
-hr.heavy{height:5px;}
+hr.heavy{height:2px;}
 hr.light{height:1px;}
 img{border:0;display:block;}
 img.right{margin:0 0 0 auto;}
 img.center{border:0;margin:0 auto;}
-table th,table td{padding:4px;}
-.center,header{text-align:center;}
-table.center {margin-left:auto; margin-right:auto;}
+table{border-collapse: collapse;}
+table th,table td{padding: 3px 7px 2px 7px;}
+table th{background-color: lightgrey;}
+table.center{margin-left:auto; margin-right:auto;}
+.center{text-align:center;}
 .right{text-align:right;}
 .left{text-align:left;}
 .tableborder,.tableborder td,.tableborder th{border:1px solid #000;}
@@ -26,14 +33,12 @@ table.center {margin-left:auto; margin-right:auto;}
 <hgroup>
 </hgroup>
 </header>
-<article>
 
-<div class="body" id="body">
+
+<div class="body">
 <p>
 Text.
 </p>
 </div>
 
-<!-- html code generated by txt2tags (http://txt2tags.org) -->
-<!-- cmdline: txt2tags -q -\-no-rc -t html -\-style other.css -\-style css style-2.t2t -->
-</article></body></html>
+</body></html>
diff --git a/test/options/ok/style-3.tex b/test/options/ok/style-3.tex
index 6f91b43..a730a5c 100644
--- a/test/options/ok/style-3.tex
+++ b/test/options/ok/style-3.tex
@@ -1,8 +1,10 @@
 \documentclass{article}
+\usepackage{booktabs} % needed for tables
 \usepackage{graphicx}
 \usepackage{paralist} % needed for compact lists
 \usepackage[normalem]{ulem} % needed by strike
 \usepackage[urlcolor=blue,colorlinks=true]{hyperref}
+\usepackage[utf8]{inputenc}  % char encoding
 \usepackage{mypackage}  % user defined
 
 \begin{document}
@@ -12,6 +14,4 @@
 
 Text.
 
-% LaTeX2e code generated by txt2tags (http://txt2tags.org)
-% cmdline: txt2tags -q --no-rc -t tex --style mypackage style-3.t2t
 \end{document}
diff --git a/test/options/ok/style-4.tex b/test/options/ok/style-4.tex
index 3652052..17c33c7 100644
--- a/test/options/ok/style-4.tex
+++ b/test/options/ok/style-4.tex
@@ -1,8 +1,10 @@
 \documentclass{article}
+\usepackage{booktabs} % needed for tables
 \usepackage{graphicx}
 \usepackage{paralist} % needed for compact lists
 \usepackage[normalem]{ulem} % needed by strike
 \usepackage[urlcolor=blue,colorlinks=true]{hyperref}
+\usepackage[utf8]{inputenc}  % char encoding
 \usepackage{mypackage,otherpackage,another}  % user defined
 
 \begin{document}
@@ -12,6 +14,4 @@
 
 Text.
 
-% LaTeX2e code generated by txt2tags (http://txt2tags.org)
-% cmdline: txt2tags -q --no-rc -t tex --style mypackage,otherpackage,another style-4.t2t
 \end{document}
diff --git a/test/options/ok/style-5.tex b/test/options/ok/style-5.tex
index 097f933..2915367 100644
--- a/test/options/ok/style-5.tex
+++ b/test/options/ok/style-5.tex
@@ -1,8 +1,10 @@
 \documentclass{article}
+\usepackage{booktabs} % needed for tables
 \usepackage{graphicx}
 \usepackage{paralist} % needed for compact lists
 \usepackage[normalem]{ulem} % needed by strike
 \usepackage[urlcolor=blue,colorlinks=true]{hyperref}
+\usepackage[utf8]{inputenc}  % char encoding
 \usepackage{foo}  % user defined
 \usepackage{bar}  % user defined
 \usepackage{baz}  % user defined
@@ -14,6 +16,4 @@
 
 Text.
 
-% LaTeX2e code generated by txt2tags (http://txt2tags.org)
-% cmdline: txt2tags -q --no-rc -t tex --style foo.sty --style bar.STY --style baz style-5.t2t
 \end{document}
diff --git a/test/options/ok/t-invalid.out b/test/options/ok/t-invalid.out
index 1f51840..e0914f5 100644
--- a/test/options/ok/t-invalid.out
+++ b/test/options/ok/t-invalid.out
@@ -1,3 +1,3 @@
-txt2tags: Error: Invalid target 'ERROR'
+Error: Invalid target 'ERROR'
 
 Run 'txt2tags --targets' to see all the available targets.
diff --git a/test/options/ok/t.html b/test/options/ok/t.html
index 49aa39f..1795b7e 100644
--- a/test/options/ok/t.html
+++ b/test/options/ok/t.html
@@ -1,4 +1,4 @@
-<div class="body" id="body">
+<div class="body">
 <p>
 Text.
 </p>
diff --git a/test/options/ok/target-invalid.out b/test/options/ok/target-invalid.out
index 1f51840..e0914f5 100644
--- a/test/options/ok/target-invalid.out
+++ b/test/options/ok/target-invalid.out
@@ -1,3 +1,3 @@
-txt2tags: Error: Invalid target 'ERROR'
+Error: Invalid target 'ERROR'
 
 Run 'txt2tags --targets' to see all the available targets.
diff --git a/test/options/ok/target.html b/test/options/ok/target.html
index 49aa39f..1795b7e 100644
--- a/test/options/ok/target.html
+++ b/test/options/ok/target.html
@@ -1,4 +1,4 @@
-<div class="body" id="body">
+<div class="body">
 <p>
 Text.
 </p>
diff --git a/test/options/ok/toc-1.html b/test/options/ok/toc-1.html
index a0c2477..536fd6e 100644
--- a/test/options/ok/toc-1.html
+++ b/test/options/ok/toc-1.html
@@ -1,5 +1,5 @@
 <nav>
-<div class="body" id="body">
+<div class="body">
 
   <ul>
   <li><a href="#toc1">Title 1</a>
@@ -12,7 +12,7 @@
 
 </div>
 </nav>
-<div class="body" id="body">
+<div class="body">
 
 <section id="toc1">
 <h1>Title 1</h1>
diff --git a/test/options/ok/toc-2.html b/test/options/ok/toc-2.html
index fcf9164..1f125b0 100644
--- a/test/options/ok/toc-2.html
+++ b/test/options/ok/toc-2.html
@@ -1,8 +1,8 @@
 <nav>
-<div class="body" id="body">
+<div class="body">
 </div>
 </nav>
-<div class="body" id="body">
+<div class="body">
 <p>
 Text.
 </p>
diff --git a/test/options/ok/toc-3.html b/test/options/ok/toc-3.html
index f18e75c..c3c27bd 100644
--- a/test/options/ok/toc-3.html
+++ b/test/options/ok/toc-3.html
@@ -1,6 +1,6 @@
 <nav>
-<div class="body" id="body">
+<div class="body">
 </div>
 </nav>
-<div class="body" id="body">
+<div class="body">
 </div>
diff --git a/test/options/ok/toc-level-1.html b/test/options/ok/toc-level-1.html
deleted file mode 100644
index ffc6a50..0000000
--- a/test/options/ok/toc-level-1.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<nav>
-<div class="body" id="body">
-
-  <ul>
-  <li><a href="#toc1">Title 1</a>
-  </li>
-  </ul>
-
-</div>
-</nav>
-<div class="body" id="body">
-
-<section id="toc1">
-<h1>Title 1</h1>
-
-<p>
-Text.
-</p>
-
-<section>
-<h2>Title 2</h2>
-
-<p>
-Text.
-</p>
-</section>
-</section>
-</div>
diff --git a/test/options/ok/toc-level-2.html b/test/options/ok/toc-level-2.html
deleted file mode 100644
index a0c2477..0000000
--- a/test/options/ok/toc-level-2.html
+++ /dev/null
@@ -1,32 +0,0 @@
-<nav>
-<div class="body" id="body">
-
-  <ul>
-  <li><a href="#toc1">Title 1</a>
-    <ul>
-    <li><a href="#toc2">Title 2</a>
-    </li>
-    </ul>
-  </li>
-  </ul>
-
-</div>
-</nav>
-<div class="body" id="body">
-
-<section id="toc1">
-<h1>Title 1</h1>
-
-<p>
-Text.
-</p>
-
-<section id="toc2">
-<h2>Title 2</h2>
-
-<p>
-Text.
-</p>
-</section>
-</section>
-</div>
diff --git a/test/options/ok/toc-level-3.html b/test/options/ok/toc-level-3.html
deleted file mode 100644
index 8128d85..0000000
--- a/test/options/ok/toc-level-3.html
+++ /dev/null
@@ -1,18 +0,0 @@
-<div class="body" id="body">
-
-<section>
-<h1>Title 1</h1>
-
-<p>
-Text.
-</p>
-
-<section>
-<h2>Title 2</h2>
-
-<p>
-Text.
-</p>
-</section>
-</section>
-</div>
diff --git a/test/options/ok/v-1.txt b/test/options/ok/v-1.txt
index 6876b4e..ce63b04 100644
--- a/test/options/ok/v-1.txt
+++ b/test/options/ok/v-1.txt
@@ -1,7 +1,7 @@
------ Txt2tags 2.6 processing begins
+----- Processing begins
 ----- Ignoring user configuration file
 ----- Loading source document
------ Parsing and saving all config found (008 items)
+----- Parsing and saving all config found (007 items)
 ----- Composing target Headers
 ----- Composing target Body
 ----- Composing target Footer
diff --git a/test/options/ok/v-2.txt b/test/options/ok/v-2.txt
index fc59220..4aa567b 100644
--- a/test/options/ok/v-2.txt
+++ b/test/options/ok/v-2.txt
@@ -1,11 +1,11 @@
------ Txt2tags 2.6 processing begins
+----- Processing begins
 ----- Ignoring user configuration file
 ----- Loading source document
 ---------- File read (2 lines): v-2.t2t
 ---------- Areas found:   body (  2)
 ---------- Source document contents stored
------ Parsing and saving all config found (009 items)
----------- Added the following keys: infile, outfile, rc, realcmdline, target, verbose
+----- Parsing and saving all config found (008 items)
+---------- Added the following keys: infile, outfile, rc, target, verbose
 ----- Composing target Headers
 ----- Composing target Body
 ----- Composing target Footer
diff --git a/test/options/ok/v-3.txt b/test/options/ok/v-3.txt
index f510581..e87edde 100644
--- a/test/options/ok/v-3.txt
+++ b/test/options/ok/v-3.txt
@@ -1,10 +1,10 @@
------ Txt2tags 2.6 processing begins
+----- Processing begins
 ----- Ignoring user configuration file
 ----- Loading source document
 ---------- File read (2 lines): v-3.t2t
 ---------- Areas found:   body (  2)
 ---------- Source document contents stored
------ Parsing and saving all config found (010 items)
+----- Parsing and saving all config found (009 items)
 --------------- Added config .......quiet : 1
 --------------- Added config ..........rc : 0
 --------------- Added config ......target : txt
@@ -13,8 +13,7 @@
 --------------- Added config .....verbose : 1
 --------------- Added config .....outfile : -
 --------------- Added config ......infile : v-3.t2t
---------------- Added config .realcmdline : ['-q', '--no-rc', '-t', 'txt', '--no-quiet', '-v', '-v', '-v', '-o-', 'v-3.t2t']
----------- Added the following keys: infile, outfile, rc, realcmdline, target, verbose
+---------- Added the following keys: infile, outfile, rc, target, verbose
 ----- Composing target Headers
 ----- Composing target Body
 ----- Composing target Footer
diff --git a/test/options/ok/v-4.txt b/test/options/ok/v-4.txt
index 37d28a0..f772802 100644
--- a/test/options/ok/v-4.txt
+++ b/test/options/ok/v-4.txt
@@ -1,10 +1,10 @@
------ Txt2tags 2.6 processing begins
+----- Processing begins
 ----- Ignoring user configuration file
 ----- Loading source document
 ---------- File read (2 lines): v-4.t2t
 ---------- Areas found:   body (  2)
 ---------- Source document contents stored
------ Parsing and saving all config found (011 items)
+----- Parsing and saving all config found (010 items)
 --------------- Added config .......quiet : 1
 --------------- Added config ..........rc : 0
 --------------- Added config ......target : txt
@@ -14,8 +14,7 @@
 --------------- Added config .....verbose : 1
 --------------- Added config .....outfile : -
 --------------- Added config ......infile : v-4.t2t
---------------- Added config .realcmdline : ['-q', '--no-rc', '-t', 'txt', '--no-quiet', '-v', '-v', '-v', '-v', '-o-', 'v-4.t2t']
----------- Added the following keys: infile, outfile, rc, realcmdline, target, verbose
+---------- Added the following keys: infile, outfile, rc, target, verbose
 ----- Composing target Headers
 ----- Composing target Body
 ----- Composing target Footer
diff --git a/test/options/ok/v-5.txt b/test/options/ok/v-5.txt
index d422451..699d2af 100644
--- a/test/options/ok/v-5.txt
+++ b/test/options/ok/v-5.txt
@@ -1,10 +1,10 @@
------ Txt2tags 2.6 processing begins
+----- Processing begins
 ----- Ignoring user configuration file
 ----- Loading source document
 ---------- File read (2 lines): v-5.t2t
 ---------- Areas found:   body (  2)
 ---------- Source document contents stored
------ Parsing and saving all config found (012 items)
+----- Parsing and saving all config found (011 items)
 --------------- Added config .......quiet : 1
 --------------- Added config ..........rc : 0
 --------------- Added config ......target : txt
@@ -15,8 +15,7 @@
 --------------- Added config .....verbose : 1
 --------------- Added config .....outfile : -
 --------------- Added config ......infile : v-5.t2t
---------------- Added config .realcmdline : ['-q', '--no-rc', '-t', 'txt', '--no-quiet', '-v', '-v', '-v', '-v', '-v', '-o-', 'v-5.t2t']
----------- Added the following keys: infile, outfile, rc, realcmdline, target, verbose
+---------- Added the following keys: infile, outfile, rc, target, verbose
 ----- Composing target Headers
 ----- Composing target Body
 ----- Composing target Footer
diff --git a/test/options/ok/verbose-1.txt b/test/options/ok/verbose-1.txt
index 6876b4e..ce63b04 100644
--- a/test/options/ok/verbose-1.txt
+++ b/test/options/ok/verbose-1.txt
@@ -1,7 +1,7 @@
------ Txt2tags 2.6 processing begins
+----- Processing begins
 ----- Ignoring user configuration file
 ----- Loading source document
------ Parsing and saving all config found (008 items)
+----- Parsing and saving all config found (007 items)
 ----- Composing target Headers
 ----- Composing target Body
 ----- Composing target Footer
diff --git a/test/options/ok/verbose-2.txt b/test/options/ok/verbose-2.txt
index d79a90c..6ba656c 100644
--- a/test/options/ok/verbose-2.txt
+++ b/test/options/ok/verbose-2.txt
@@ -1,11 +1,11 @@
------ Txt2tags 2.6 processing begins
+----- Processing begins
 ----- Ignoring user configuration file
 ----- Loading source document
 ---------- File read (2 lines): verbose-2.t2t
 ---------- Areas found:   body (  2)
 ---------- Source document contents stored
------ Parsing and saving all config found (009 items)
----------- Added the following keys: infile, outfile, rc, realcmdline, target, verbose
+----- Parsing and saving all config found (008 items)
+---------- Added the following keys: infile, outfile, rc, target, verbose
 ----- Composing target Headers
 ----- Composing target Body
 ----- Composing target Footer
diff --git a/test/options/ok/verbose-3.txt b/test/options/ok/verbose-3.txt
index 8d733fa..062a7a8 100644
--- a/test/options/ok/verbose-3.txt
+++ b/test/options/ok/verbose-3.txt
@@ -1,10 +1,10 @@
------ Txt2tags 2.6 processing begins
+----- Processing begins
 ----- Ignoring user configuration file
 ----- Loading source document
 ---------- File read (2 lines): verbose-3.t2t
 ---------- Areas found:   body (  2)
 ---------- Source document contents stored
------ Parsing and saving all config found (010 items)
+----- Parsing and saving all config found (009 items)
 --------------- Added config .......quiet : 1
 --------------- Added config ..........rc : 0
 --------------- Added config ......target : txt
@@ -13,8 +13,7 @@
 --------------- Added config .....verbose : 1
 --------------- Added config .....outfile : -
 --------------- Added config ......infile : verbose-3.t2t
---------------- Added config .realcmdline : ['-q', '--no-rc', '-t', 'txt', '--no-quiet', '--verbose', '--verbose', '--verbose', '-o-', 'verbose-3.t2t']
----------- Added the following keys: infile, outfile, rc, realcmdline, target, verbose
+---------- Added the following keys: infile, outfile, rc, target, verbose
 ----- Composing target Headers
 ----- Composing target Body
 ----- Composing target Footer
diff --git a/test/options/ok/verbose-4.txt b/test/options/ok/verbose-4.txt
index da4282d..51c1aec 100644
--- a/test/options/ok/verbose-4.txt
+++ b/test/options/ok/verbose-4.txt
@@ -1,10 +1,10 @@
------ Txt2tags 2.6 processing begins
+----- Processing begins
 ----- Ignoring user configuration file
 ----- Loading source document
 ---------- File read (2 lines): verbose-4.t2t
 ---------- Areas found:   body (  2)
 ---------- Source document contents stored
------ Parsing and saving all config found (011 items)
+----- Parsing and saving all config found (010 items)
 --------------- Added config .......quiet : 1
 --------------- Added config ..........rc : 0
 --------------- Added config ......target : txt
@@ -14,8 +14,7 @@
 --------------- Added config .....verbose : 1
 --------------- Added config .....outfile : -
 --------------- Added config ......infile : verbose-4.t2t
---------------- Added config .realcmdline : ['-q', '--no-rc', '-t', 'txt', '--no-quiet', '--verbose', '--verbose', '--verbose', '--verbose', '-o-', 'verbose-4.t2t']
----------- Added the following keys: infile, outfile, rc, realcmdline, target, verbose
+---------- Added the following keys: infile, outfile, rc, target, verbose
 ----- Composing target Headers
 ----- Composing target Body
 ----- Composing target Footer
diff --git a/test/options/ok/verbose-5.txt b/test/options/ok/verbose-5.txt
index 3c0aa22..c976f48 100644
--- a/test/options/ok/verbose-5.txt
+++ b/test/options/ok/verbose-5.txt
@@ -1,10 +1,10 @@
------ Txt2tags 2.6 processing begins
+----- Processing begins
 ----- Ignoring user configuration file
 ----- Loading source document
 ---------- File read (2 lines): verbose-5.t2t
 ---------- Areas found:   body (  2)
 ---------- Source document contents stored
------ Parsing and saving all config found (012 items)
+----- Parsing and saving all config found (011 items)
 --------------- Added config .......quiet : 1
 --------------- Added config ..........rc : 0
 --------------- Added config ......target : txt
@@ -15,8 +15,7 @@
 --------------- Added config .....verbose : 1
 --------------- Added config .....outfile : -
 --------------- Added config ......infile : verbose-5.t2t
---------------- Added config .realcmdline : ['-q', '--no-rc', '-t', 'txt', '--no-quiet', '--verbose', '--verbose', '--verbose', '--verbose', '--verbose', '-o-', 'verbose-5.t2t']
----------- Added the following keys: infile, outfile, rc, realcmdline, target, verbose
+---------- Added the following keys: infile, outfile, rc, target, verbose
 ----- Composing target Headers
 ----- Composing target Body
 ----- Composing target Footer
diff --git a/test/options/ok/version.out b/test/options/ok/version.out
index a043e20..df714cc 100644
--- a/test/options/ok/version.out
+++ b/test/options/ok/version.out
@@ -1 +1 @@
-txt2tags version 2.6 <http://txt2tags.org>
+txt2tags version 3.6 <https://txt2tags.org>
diff --git a/test/options/ok/vv.txt b/test/options/ok/vv.txt
index 603c40b..0c64104 100644
--- a/test/options/ok/vv.txt
+++ b/test/options/ok/vv.txt
@@ -1,11 +1,11 @@
------ Txt2tags 2.6 processing begins
+----- Processing begins
 ----- Ignoring user configuration file
 ----- Loading source document
 ---------- File read (2 lines): vv.t2t
 ---------- Areas found:   body (  2)
 ---------- Source document contents stored
------ Parsing and saving all config found (009 items)
----------- Added the following keys: infile, outfile, rc, realcmdline, target, verbose
+----- Parsing and saving all config found (008 items)
+---------- Added the following keys: infile, outfile, rc, target, verbose
 ----- Composing target Headers
 ----- Composing target Body
 ----- Composing target Footer
diff --git a/test/options/ok/vvv.txt b/test/options/ok/vvv.txt
index dddc45f..234b383 100644
--- a/test/options/ok/vvv.txt
+++ b/test/options/ok/vvv.txt
@@ -1,10 +1,10 @@
------ Txt2tags 2.6 processing begins
+----- Processing begins
 ----- Ignoring user configuration file
 ----- Loading source document
 ---------- File read (2 lines): vvv.t2t
 ---------- Areas found:   body (  2)
 ---------- Source document contents stored
------ Parsing and saving all config found (010 items)
+----- Parsing and saving all config found (009 items)
 --------------- Added config .......quiet : 1
 --------------- Added config ..........rc : 0
 --------------- Added config ......target : txt
@@ -13,8 +13,7 @@
 --------------- Added config .....verbose : 1
 --------------- Added config .....outfile : -
 --------------- Added config ......infile : vvv.t2t
---------------- Added config .realcmdline : ['-q', '--no-rc', '-t', 'txt', '--no-quiet', '-vvv', '-o-', 'vvv.t2t']
----------- Added the following keys: infile, outfile, rc, realcmdline, target, verbose
+---------- Added the following keys: infile, outfile, rc, target, verbose
 ----- Composing target Headers
 ----- Composing target Body
 ----- Composing target Footer
diff --git a/test/options/ok/vvvv.txt b/test/options/ok/vvvv.txt
index 5f832e1..0c59546 100644
--- a/test/options/ok/vvvv.txt
+++ b/test/options/ok/vvvv.txt
@@ -1,10 +1,10 @@
------ Txt2tags 2.6 processing begins
+----- Processing begins
 ----- Ignoring user configuration file
 ----- Loading source document
 ---------- File read (2 lines): vvvv.t2t
 ---------- Areas found:   body (  2)
 ---------- Source document contents stored
------ Parsing and saving all config found (011 items)
+----- Parsing and saving all config found (010 items)
 --------------- Added config .......quiet : 1
 --------------- Added config ..........rc : 0
 --------------- Added config ......target : txt
@@ -14,8 +14,7 @@
 --------------- Added config .....verbose : 1
 --------------- Added config .....outfile : -
 --------------- Added config ......infile : vvvv.t2t
---------------- Added config .realcmdline : ['-q', '--no-rc', '-t', 'txt', '--no-quiet', '-vvvv', '-o-', 'vvvv.t2t']
----------- Added the following keys: infile, outfile, rc, realcmdline, target, verbose
+---------- Added the following keys: infile, outfile, rc, target, verbose
 ----- Composing target Headers
 ----- Composing target Body
 ----- Composing target Footer
diff --git a/test/options/ok/vvvvv.txt b/test/options/ok/vvvvv.txt
index 6d17107..7ef8d6f 100644
--- a/test/options/ok/vvvvv.txt
+++ b/test/options/ok/vvvvv.txt
@@ -1,10 +1,10 @@
------ Txt2tags 2.6 processing begins
+----- Processing begins
 ----- Ignoring user configuration file
 ----- Loading source document
 ---------- File read (2 lines): vvvvv.t2t
 ---------- Areas found:   body (  2)
 ---------- Source document contents stored
------ Parsing and saving all config found (012 items)
+----- Parsing and saving all config found (011 items)
 --------------- Added config .......quiet : 1
 --------------- Added config ..........rc : 0
 --------------- Added config ......target : txt
@@ -15,8 +15,7 @@
 --------------- Added config .....verbose : 1
 --------------- Added config .....outfile : -
 --------------- Added config ......infile : vvvvv.t2t
---------------- Added config .realcmdline : ['-q', '--no-rc', '-t', 'txt', '--no-quiet', '-vvvvv', '-o-', 'vvvvv.t2t']
----------- Added the following keys: infile, outfile, rc, realcmdline, target, verbose
+---------- Added the following keys: infile, outfile, rc, target, verbose
 ----- Composing target Headers
 ----- Composing target Body
 ----- Composing target Footer
diff --git a/test/options/run.py b/test/options/run.py
index b909b5a..f1e3b75 100644
--- a/test/options/run.py
+++ b/test/options/run.py
@@ -371,85 +371,6 @@ tests = [
         "content": EMPTY_HEADER + TITLED_BODY,
         "cmdline": ["-H --toc --no-toc"],
     },
-    {
-        "name": "toc-level-1",
-        "target": "html",
-        "content": EMPTY_HEADER + TITLED_BODY,
-        "cmdline": ["-H --toc --toc-level 1"],
-    },
-    {
-        "name": "toc-level-2",  # very deep
-        "target": "html",
-        "content": EMPTY_HEADER + TITLED_BODY,
-        "cmdline": ["-H --toc --toc-level 999"],
-    },
-    {
-        "name": "toc-level-3",  # useless (no --toc)
-        "target": "html",
-        "content": EMPTY_HEADER + TITLED_BODY,
-        "cmdline": ["-H --toc-level 1"],
-    },
-    {
-        "name": "toc-only-1",
-        "target": "html",
-        "content": EMPTY_HEADER + TITLED_BODY,
-        "cmdline": ["--toc-only -o toc-only-1.html"],
-    },
-    {
-        "name": "toc-only-2",  # empty toc (no title)
-        "target": "html",
-        "content": EMPTY_HEADER + SIMPLE_BODY,
-        "cmdline": ["--toc-only -o toc-only-2.html"],
-    },
-    {
-        "name": "toc-only-3",  # no target, defaults to txt
-        "target": "out",
-        "content": EMPTY_HEADER + TITLED_BODY,
-        "cmdline": ["--toc-only -o toc-only-3.out"],
-        "extra": ["notarget"],
-    },
-    {
-        "name": "toc-only-4",  # with --toc-level
-        "target": "html",
-        "content": EMPTY_HEADER + TITLED_BODY,
-        "cmdline": ["--toc-only --toc-level 1 -o toc-only-4.html"],
-    },
-    {
-        "name": "toc-only-5",  # with --enum-title
-        "target": "html",
-        "content": EMPTY_HEADER + TITLED_BODY,
-        "cmdline": ["--toc-only --enum-title -o toc-only-5.html"],
-    },
-    {
-        "name": "no-toc-only-1",  # useless
-        "target": "html",
-        "content": EMPTY_HEADER + TITLED_BODY,
-        "cmdline": ["-H --no-toc-only"],
-    },
-    {
-        "name": "no-toc-only-2",  # turning OFF
-        "target": "html",
-        "content": EMPTY_HEADER + TITLED_BODY,
-        "cmdline": ["-H --toc-only --no-toc-only"],
-    },
-    {
-        "name": "mask-email",
-        "target": "html",
-        "content": EMPTY_HEADER + EMAIL,
-        "cmdline": ["-H --mask-email"],
-    },
-    {
-        "name": "no-mask-email-1",  # useless
-        "target": "html",
-        "content": EMPTY_HEADER + EMAIL,
-        "cmdline": ["-H --no-mask-email"],
-    },
-    {
-        "name": "no-mask-email-2",  # turning OFF
-        "target": "html",
-        "content": EMPTY_HEADER + EMAIL,
-        "cmdline": ["-H --mask-email --no-mask-email"],
-    },
     {
         "name": "headers-1",  # useless
         "target": "html",
@@ -474,42 +395,6 @@ tests = [
         "content": EMPTY_HEADER + SIMPLE_BODY,
         "cmdline": ["-H"],
     },
-    {
-        "name": "encoding-1",
-        "target": "html",
-        "content": EMPTY_HEADER + VERSION_GOTCHA + SIMPLE_BODY,
-        "cmdline": ["--encoding iso-8859-1"],
-    },
-    {
-        "name": "encoding-2",  # normalization
-        "target": "html",
-        "content": EMPTY_HEADER + VERSION_GOTCHA + SIMPLE_BODY,
-        "cmdline": ["--encoding ISO88591"],
-    },
-    {
-        "name": "encoding-3",  # customized
-        "target": "html",
-        "content": EMPTY_HEADER + VERSION_GOTCHA + SIMPLE_BODY,
-        "cmdline": ["--encoding fake-999"],
-    },
-    {
-        "name": "encoding-4",  # LaTeX translation
-        "target": "tex",
-        "content": EMPTY_HEADER + VERSION_GOTCHA + SIMPLE_BODY,
-        "cmdline": ["--encoding iso-8859-1"],
-    },
-    {
-        "name": "no-encoding-1",  # useless
-        "target": "html",
-        "content": EMPTY_HEADER + VERSION_GOTCHA + SIMPLE_BODY,
-        "cmdline": ["--no-encoding"],
-    },
-    {
-        "name": "no-encoding-2",  # turning OFF
-        "target": "html",
-        "content": EMPTY_HEADER + VERSION_GOTCHA + SIMPLE_BODY,
-        "cmdline": ["--encoding iso-8859-1 --no-encoding"],
-    },
     {
         "name": "style-1",
         "target": "html",
@@ -552,58 +437,6 @@ tests = [
         "content": EMPTY_HEADER + VERSION_GOTCHA + SIMPLE_BODY,
         "cmdline": ["--style fake.css --no-style"],
     },
-    {
-        "name": "css-sugar-1",  # just body
-        "target": "html",
-        "content": EMPTY_HEADER + SIMPLE_BODY,
-        "cmdline": ["-H"],
-    },
-    {
-        "name": "css-sugar-2",  # empty toc & body
-        "target": "html",
-        "content": EMPTY_HEADER + SIMPLE_BODY,
-        "cmdline": ["-H --toc"],
-    },
-    {
-        "name": "css-sugar-3",  # headers, toc & body
-        "target": "html",
-        "content": FULL_HEADER + VERSION_GOTCHA + TITLED_BODY,
-        "cmdline": ["--toc"],
-    },
-    {
-        "name": "no-css-sugar-1",  # useless
-        "target": "html",
-        "content": EMPTY_HEADER + SIMPLE_BODY,
-        "cmdline": ["-H"],
-    },
-    {
-        "name": "dump-config",
-        "content": EMPTY_HEADER + CONFIG_FILE_TXT + SIMPLE_BODY,
-        "cmdline": ["--dump-config"],
-        "redir": ["> dump-config.out"],
-        "extra": ["notarget"],
-    },
-    {
-        "name": "no-dump-config",
-        "content": EMPTY_HEADER + CONFIG_FILE_TXT + SIMPLE_BODY,
-        "cmdline": ["-H -o- --dump-config --no-dump-config"],
-        "redir": ["> no-dump-config.out"],
-        "extra": ["notarget"],
-    },
-    {
-        "name": "dump-source",
-        "content": FULL_HEADER + CONFIG_FILE_TXT + SIMPLE_BODY,
-        "cmdline": ["--dump-source"],
-        "redir": ["> dump-source.out"],
-        "extra": ["notarget"],
-    },
-    {
-        "name": "no-dump-source",
-        "content": EMPTY_HEADER + CONFIG_FILE_TXT + SIMPLE_BODY,
-        "cmdline": ["-H -o- --dump-source --no-dump-source"],
-        "redir": ["> no-dump-source.out"],
-        "extra": ["notarget"],
-    },
     {
         "name": "no-targets",
         "content": EMPTY_HEADER + CONFIG_FILE_TXT + SIMPLE_BODY,
diff --git a/test/run.py b/test/run.py
index eef38f0..b951ff7 100755
--- a/test/run.py
+++ b/test/run.py
@@ -15,7 +15,6 @@
 # TIP: To quickly check the errors, run:
 #      for f in */error/*; do diff -u ${f/error/ok} $f; done
 
-from __future__ import print_function
 
 import argparse
 import os.path
@@ -87,4 +86,8 @@ if lib.ERROR_FILES:
     print()
     print("Check out the files with errors:")
     print("\n".join(lib.ERROR_FILES))
+    print(
+        '\nIf the diffs look fine, run "./test/run.py --override" '
+        "to update the reference files."
+    )
     sys.exit(1)
diff --git a/test/sample/run.py b/test/sample/run.py
index a8dfba4..1801546 100644
--- a/test/sample/run.py
+++ b/test/sample/run.py
@@ -1,5 +1,3 @@
-from __future__ import print_function
-
 import os.path
 import sys
 
diff --git a/tox.ini b/tox.ini
index a8cd3fe..8021570 100644
--- a/tox.ini
+++ b/tox.ini
@@ -1,5 +1,5 @@
 [tox]
-envlist = py{27,36,37,38}, style, docs
+envlist = py{37,38,310,311}, style, docs  # Skip py39 since it causes problems.
 skip_missing_interpreters = true
 
 [testenv]
@@ -10,27 +10,27 @@ commands =
   bash -c "python ../samples/module/module-full.py > /dev/null"
   txt2tags -t html -o /dev/null {toxinidir}/samples/sample.t2t
   bash ../samples/css/build
-whitelist_externals = bash
+allowlist_externals = bash
 
 [testenv:style]
 basepython = python3
 changedir = {toxinidir}
 deps =
-  black
-  flake8
-  flake8-2020
-  flake8-bugbear
-  flake8-comprehensions
-  pyupgrade
+  black==22.10.0
+  flake8==5.0.4
+  flake8-2020==1.7.0
+  flake8-bugbear==22.9.23
+  flake8-comprehensions==3.10.0
+  pyupgrade==3.1.0
 commands =
-  black --check setup.py txt2tags.py samples/module/ test/
-  flake8 --max-line-length=90 --extend-ignore E402 --exclude .tox .
+  black --check --diff setup.py txt2tags.py samples/module/ test/
+  flake8 --max-line-length=90 --extend-ignore E402 --exclude .tox,.venv .
   bash -c "pyupgrade `find samples/module test -name '*.py'` txt2tags.py"
-whitelist_externals = bash
+allowlist_externals = bash
 
 [testenv:docs]
 basepython = python3
 changedir = {toxinidir}/docs/
 commands =
   bash build-docs.sh
-whitelist_externals = bash
+allowlist_externals = bash
diff --git a/txt2tags.py b/txt2tags.py
index 83fb411..c2b6151 100755
--- a/txt2tags.py
+++ b/txt2tags.py
@@ -42,7 +42,7 @@
 #
 # These functions get information about the input file(s) and take
 # care of the init processing:
-# get_infiles_config(), process_source_file() and convert_this_files()
+# process_source_file() and convert_file()
 #
 ########################################################################
 
@@ -67,7 +67,6 @@
 # Two complete body scans will be *slow*, don't know if it worths.
 # One solution may be add the titles as postproc rules
 
-from __future__ import print_function
 
 import collections
 import getopt
@@ -78,15 +77,14 @@ import sys
 ##############################################################################
 
 # Program information
-my_url = "http://txt2tags.org"
+my_url = "https://txt2tags.org"
 my_name = "txt2tags"
 my_email = "jendrikseipp@gmail.com"
-__version__ = "3.4"
+__version__ = "3.8"
 
 # FLAGS   : the conversion related flags  , may be used in %!options
 # OPTIONS : the conversion related options, may be used in %!options
 # ACTIONS : the other behavior modifiers, valid on command line only
-# SETTINGS: global miscellaneous settings, valid on RC file only
 # NO_TARGET: actions that don't require a target specification
 # NO_MULTI_INPUT: actions that don't accept more than one input file
 # CONFIG_KEYWORDS: the valid %!key:val keywords
@@ -98,40 +96,18 @@ __version__ = "3.4"
 # behavior may occur. There is no --no-<action>.
 # Options --version and --help inside %!options are odd.
 
-FLAGS = {
-    "headers": 1,
-    "enum-title": 0,
-    "mask-email": 0,
-    "toc-only": 0,
-    "toc": 0,
-    "rc": 1,
-    "quiet": 0,
-    "slides": 0,
-}
+FLAGS = {"headers": 1, "enum-title": 0, "toc": 0, "rc": 1, "quiet": 0, "slides": 0}
 OPTIONS = {
     "target": "",
-    "toc-level": 3,
     "style": "",
     "infile": "",
     "outfile": "",
-    "encoding": "",
     "config-file": "",
     "lang": "",
-    "show-config-value": "",
-}
-ACTIONS = {
-    "help": 0,
-    "version": 0,
-    "verbose": 0,
-    "debug": 0,
-    "dump-config": 0,
-    "dump-source": 0,
-    "targets": 0,
 }
-SETTINGS = {}  # for future use
-NO_TARGET = ["help", "version", "toc-only", "dump-config", "dump-source", "targets"]
-NO_MULTI_INPUT = ["dump-config", "dump-source"]
-CONFIG_KEYWORDS = ["target", "encoding", "style", "options", "preproc", "postproc"]
+ACTIONS = {"help": 0, "version": 0, "verbose": 0, "debug": 0, "targets": 0}
+NO_TARGET = ["help", "version", "targets"]
+CONFIG_KEYWORDS = ["target", "style", "options", "preproc", "postproc"]
 
 TARGET_NAMES = {
     "html": "HTML page",
@@ -149,6 +125,8 @@ TARGET_NAMES = {
     "txt": "Plain Text",
     "adoc": "AsciiDoc document",
     "creole": "Creole 1.0 document",
+    "md": "Markdown document",
+    "ctx": "ConTeXt document",
 }
 
 TARGETS = sorted(TARGET_NAMES)
@@ -157,6 +135,7 @@ DEBUG = 0  # do not edit here, please use --debug
 VERBOSE = 0  # do not edit here, please use -v, -vv or -vvv
 QUIET = 0  # do not edit here, please use --quiet
 
+ENCODING = "utf-8"
 DFT_TEXT_WIDTH = 72
 
 RC_RAW = []
@@ -181,43 +160,34 @@ VERSIONSTR = "{} version {} <{}>".format(my_name, __version__, my_url)
 USAGE = "\n".join(
     [
         "",
-        "Usage: %s [OPTIONS] [infile.t2t ...]" % my_name,
+        "Usage: %s [OPTIONS] infile.t2t" % my_name,
         "",
-        "      --targets       print a list of all the available targets and exit",
+        "      --targets       list available targets and exit",
         "  -t, --target=TYPE   set target document type. currently supported:",
-        "                      %s," % ", ".join(TARGETS[:9]),
-        "                      %s" % ", ".join(TARGETS[9:]),
+        "                      %s" % ", ".join(TARGETS),
         "  -i, --infile=FILE   set FILE as the input file name ('-' for STDIN)",
         "  -o, --outfile=FILE  set FILE as the output file name ('-' for STDOUT)",
-        "      --encoding=ENC  set target file encoding (utf-8, iso-8859-1, etc)",
-        "      --toc           add an automatic Table of Contents to the output",
-        "      --toc-level=N   set maximum TOC level (depth) to N",
-        "      --toc-only      print the Table of Contents and exit",
-        "  -n, --enum-title    enumerate all titles as 1, 1.1, 1.1.1, etc",
-        "      --style=FILE    use FILE as the document style (like HTML CSS)",
-        "  -H, --no-headers    suppress header and footer from the output",
-        "      --mask-email    hide email from spam robots. x@y.z turns <x (a) y z>",
+        "      --toc           add a table of contents to the output",
+        "  -n, --enum-title    enumerate all titles as 1, 1.1, 1.1.1, etc.",
+        "      --style=FILE    use FILE as the document style (e.g., a CSS file)",
+        "  -H, --no-headers    omit header and footer from output",
         "  -C, --config-file=F read configuration from file F",
-        "  -q, --quiet         quiet mode, suppress all output (except errors)",
+        "  -q, --quiet         suppress all output (except errors)",
         "  -v, --verbose       print informative messages during conversion",
-        "  -h, --help          print this help information and exit",
+        "  -h, --help          print this help text and exit",
         "  -V, --version       print program version and exit",
-        "      --dump-config   print all the configuration found and exit",
-        "      --dump-source   print the document source, with includes expanded",
         "",
-        "Turn OFF options:",
-        "     --no-dump-config, --no-dump-source,",
-        "     --no-encoding, --no-enum-title, --no-headers, --no-infile,",
-        "     --no-mask-email, --no-outfile, --no-quiet, --no-rc, --no-slides,",
-        "     --no-style, --no-targets, --no-toc, --no-toc-only",
+        "Turn off options:",
+        "     --no-enum-title, --headers, --no-quiet,",
+        "     --no-rc, --no-style, --no-toc",
         "",
         "Example:",
         "     {} -t html --toc {}".format(my_name, "file.t2t"),
         "",
         "By default, converted output is saved to 'infile.<target>'.",
         "Use --outfile to force an output file name.",
-        "If  input file is '-', reads from STDIN.",
-        "If output file is '-', dumps output to STDOUT.",
+        "If  input file is '-', read from STDIN.",
+        "If output file is '-', dump output to STDOUT.",
         "",
         my_url,
         "",
@@ -232,7 +202,7 @@ USAGE = "\n".join(
 # You may edit them to fit your needs
 #  - the %(HEADERn)s strings represent the Header lines
 #  - the %(STYLE)s string is changed by --style contents
-#  - the %(ENCODING)s string is changed by --encoding contents
+#  - the %(ENCODING)s string is changed to "utf-8"
 #  - if any of the above is empty, the full line is removed
 #  - use %% to represent a literal %
 #
@@ -249,28 +219,31 @@ HEADER_TEMPLATE = {
 <author>%(HEADER2)s
 <date>%(HEADER3)s
 """,
-    # HTML5 reference code:
-    # https://github.com/h5bp/html5-boilerplate/blob/master/index.html
-    # https://github.com/murtaugh/HTML5-Reset/blob/master/index.html
     "html": """\
 <!DOCTYPE html>
-<html>
+<html lang="en">
 <head>
 <meta charset="%(ENCODING)s">
 <title>%(HEADER1)s</title>
-<meta name="generator" content="http://txt2tags.org">
+<meta name="generator" content="https://txt2tags.org">
 <link rel="stylesheet" href="%(STYLE)s">
 <style>
-body{background-color:#fff;color:#000;}
+blockquote{margin: 1em 2em; border-left: 2px solid #999;
+  font-style: oblique; padding-left: 1em;}
+blockquote:first-letter{margin: .2em .1em .1em 0; font-size: 160%%; font-weight: bold;}
+blockquote:first-line{font-weight: bold;}
+body{font-family: sans-serif;}
 hr{background-color:#000;border:0;color:#000;}
-hr.heavy{height:5px;}
+hr.heavy{height:2px;}
 hr.light{height:1px;}
 img{border:0;display:block;}
 img.right{margin:0 0 0 auto;}
 img.center{border:0;margin:0 auto;}
-table th,table td{padding:4px;}
-.center,header{text-align:center;}
-table.center {margin-left:auto; margin-right:auto;}
+table{border-collapse: collapse;}
+table th,table td{padding: 3px 7px 2px 7px;}
+table th{background-color: lightgrey;}
+table.center{margin-left:auto; margin-right:auto;}
+.center{text-align:center;}
 .right{text-align:right;}
 .left{text-align:left;}
 .tableborder,.tableborder td,.tableborder th{border:1px solid #000;}
@@ -285,7 +258,7 @@ table.center {margin-left:auto; margin-right:auto;}
 <h3>%(HEADER3)s</h3>
 </hgroup>
 </header>
-<article>
+
 """,
     "dbk": """\
 <?xml version="1.0"
@@ -377,6 +350,7 @@ _%(HEADER3)s_
 ''%(HEADER3)s''
 """,
     "tex": r"""\documentclass{article}
+\usepackage{booktabs} %% needed for tables
 \usepackage{graphicx}
 \usepackage{paralist} %% needed for compact lists
 \usepackage[normalem]{ulem} %% needed by strike
@@ -411,7 +385,62 @@ _%(HEADER3)s_
 %(HEADER1)s
 %(HEADER2)s
 %(HEADER3)s
-"""
+""",
+    "md": """\
+%(HEADER1)s
+%(HEADER2)s
+%(HEADER3)s
+""",
+    "ctx": r"""\mainlanguage[en]
+\definecolor[linkcolor][h=0007F0]
+\setupcolors[state=start]
+\setupinteraction[state=start,
+    title={%(HEADER1)s},
+    author={%(HEADER2)s},
+    contrastcolor=linkcolor,
+    color=linkcolor,
+    ]
+\placebookmarks[section,subsection,subsubsection]
+\definehead[myheaderone][title]
+\setuphead
+  [myheaderone]
+  [textstyle=cap,
+   align=middle,
+   after=\nowhitespace
+  ]
+\definehead[myheadertwo][subject]
+\setuphead
+  [myheadertwo]
+  [ before=\nowhitespace,
+   align=middle,
+   after=\nowhitespace
+  ]
+\definehead[myheaderthree][subsubject]
+\setuphead
+  [myheaderthree]
+  [before=\nowhitespace,
+   align=middle,
+  ]
+\definedescription
+   [compdesc]
+   [alternative=serried,
+    headstyle=bold,
+    width=broad,
+    ]
+\setupTABLE[frame=off]
+\setupexternalfigures[maxwidth=0.7\textwidth]
+\setupheadertexts[]
+\setupfootertexts[pagenumber]
+\setupwhitespace[medium]
+\setupheads[number=no]
+\usemodule[%(STYLE)s]
+\starttext
+
+\myheaderone{%(HEADER1)s}
+\myheadertwo{%(HEADER2)s}
+\myheaderthree{%(HEADER3)s}
+
+""",
     # @SysInclude { tbl }                   # Tables support
     # setup: @MakeContents { Yes }          # show TOC
     # setup: @SectionGap                    # break page at each section
@@ -441,7 +470,7 @@ def getTags(config):
     blockTitle3Open     blockTitle3Close
 
     paragraphOpen       paragraphClose
-    blockVerbOpen       blockVerbClose
+    blockVerbOpen       blockVerbClose  blockVerbLine
     blockQuoteOpen      blockQuoteClose blockQuoteLine
     blockCommentOpen    blockCommentClose
 
@@ -517,7 +546,7 @@ def getTags(config):
             "blockVerbClose": "</pre>",
             "blockVerbOpen": "<pre>",
             "bodyClose": "</div>",
-            "bodyOpen": '<div class="body" id="body">',
+            "bodyOpen": '<div class="body">',
             "comment": "<!-- \a -->",
             "cssClose": "</style>",
             "cssOpen": "<style>",
@@ -529,7 +558,7 @@ def getTags(config):
             "deflistOpen": "<dl>",
             "email": '<a href="mailto:\a">\a</a>',
             "emailMark": '<a href="mailto:\a">\a</a>',
-            "EOD": "</article></body></html>",
+            "EOD": "</body></html>",
             "fontBoldClose": "</strong>",
             "fontBoldOpen": "<strong>",
             "fontItalicClose": "</em>",
@@ -655,8 +684,8 @@ def getTags(config):
             "fontItalicClose": "</emphasis>",
             "fontUnderlineOpen": '<emphasis role="underline">',
             "fontUnderlineClose": "</emphasis>",
-            # 'fontStrikeOpen'       : '<emphasis role="strikethrough">'   , # Don't know
-            # 'fontStrikeClose'      : '</emphasis>'                       ,
+            "fontStrikeOpen": None,  # Maybe <emphasis role="strikethrough">
+            "fontStrikeClose": None,  # Maybe </emphasis>
             "listOpen": "<itemizedlist>",
             "listClose": "</itemizedlist>",
             "listItemOpen": "<listitem><para>",
@@ -671,8 +700,8 @@ def getTags(config):
             "deflistItem1Close": "</term>",
             "deflistItem2Open": "<listitem><para>",
             "deflistItem2Close": "</para></listitem></varlistentry>",
-            # 'bar1'                 : '<>'                                , # Don't know
-            # 'bar2'                 : '<>'                                , # Don't know
+            "bar1": None,
+            "bar2": None,
             "url": '<ulink url="\a">\a</ulink>',
             "urlMark": '<ulink url="\a">\a</ulink>',
             "email": "<email>\a</email>",
@@ -681,10 +710,7 @@ def getTags(config):
                 '<mediaobject><imageobject><imagedata fileref="\a"/>'
                 "</imageobject></mediaobject>"
             ),
-            # '_imgAlignLeft'        : ''                                 , # Don't know
-            # '_imgAlignCenter'      : ''                                 , # Don't know
-            # '_imgAlignRight'       : ''                                 , # Don't know
-            # Don't work, need to know number of cols
+            # Tables not supported, need to know number of columns.
             # 'tableOpen'            : '<informaltable><tgroup cols=""><tbody>',
             # 'tableClose'           : '</tbody></tgroup></informaltable>' ,
             # 'tableRowOpen'         : '<row>'                             ,
@@ -750,10 +776,11 @@ def getTags(config):
             "email": "\\htmladdnormallink{\a}{mailto:\a}",
             "emailMark": "\\htmladdnormallink{\a}{mailto:\a}",
             "img": "\\includegraphics{\a}",
-            "tableOpen": "\\begin{center}\\begin{tabular}{|~C~|}",
-            "tableClose": "\\end{tabular}\\end{center}",
-            "tableRowOpen": "\\hline ",
+            "tableOpen": "\\begin{tabular}{@{}~C~@{}}",
+            "tableClose": "\\end{tabular}",
+            "tableRowOpen": None,
             "tableRowClose": " \\\\",
+            "tableTitleRowClose": " \\\\\n\\midrule",
             "tableCellSep": " & ",
             "_tableColAlignLeft": "l",
             "_tableColAlignRight": "r",
@@ -762,9 +789,9 @@ def getTags(config):
             "_tableCellAlignRight": "r",
             "_tableCellAlignCenter": "c",
             "_tableCellColSpan": "\a",
-            "_tableCellMulticolOpen": "\\multicolumn{\a}{|~C~|}{",
+            "_tableCellMulticolOpen": "\\multicolumn{\a}{~C~}{",
             "_tableCellMulticolClose": "}",
-            "tableColAlignSep": "|",
+            "tableColAlignSep": None,
             "comment": "% \a",
             "TOC": "\\tableofcontents",
             "pageBreak": "\\clearpage",
@@ -1015,9 +1042,6 @@ def getTags(config):
             "anchor": "[[#\a]]\n",
             # Image markup
             "img": "\a",
-            # 'imgAlignLeft'         : '{{\a }}'       ,
-            # 'imgAlignRight'        : '{{ \a}}'       ,
-            # 'imgAlignCenter'       : '{{ \a }}'      ,
             # Table attributes
             "tableTitleRowOpen": "||! ",
             "tableTitleRowClose": "||",
@@ -1165,16 +1189,16 @@ def getTags(config):
             "blockVerbOpen": "{{{",
             "blockVerbClose": "}}}",
             "blockQuoteLine": "  ",
-            #       'fontMonoOpen'         : '##'            ,  # planned for 2.0,
-            #       'fontMonoClose'        : '##'            ,  # meanwhile we disable it
+            "fontMonoOpen": None,  # planned for 2.0,
+            "fontMonoClose": None,  # meanwhile we disable it
             "fontBoldOpen": "**",
             "fontBoldClose": "**",
             "fontItalicOpen": "//",
             "fontItalicClose": "//",
             "fontUnderlineOpen": "//",  # no underline in 1.0, planned for 2.0,
-            "fontUnderlineClose": "//",  # meanwhile we can use italic (emphasized)
-            #       'fontStrikeOpen'       : '--'            ,  # planned for 2.0,
-            #       'fontStrikeClose'      : '--'            ,  # meanwhile we disable it
+            "fontUnderlineClose": "//",  # meanwhile we use italic (emphasized)
+            "fontStrikeOpen": None,  # planned for 2.0,
+            "fontStrikeClose": None,  # meanwhile we disable it
             "listItemLine": "*",
             "numlistItemLine": "#",
             "deflistItem2LinePrefix": ":",
@@ -1191,18 +1215,156 @@ def getTags(config):
             # TODO: placeholder (mark for unknown syntax)
             # if possible: http://www.wikicreole.org/wiki/Placeholder
         },
+        # regular markdown: http://daringfireball.net/projects/markdown/syntax
+        # markdown extra:   http://michelf.com/projects/php-markdown/extra/
+        "md": {
+            "title1": "# \a ",
+            "title2": "## \a ",
+            "title3": "### \a ",
+            "title4": "#### \a ",
+            "title5": "##### \a ",
+            "blockVerbLine": "    ",
+            "blockQuoteLine": "> ",
+            "fontMonoOpen": "`",
+            "fontMonoClose": "`",
+            "fontBoldOpen": "**",
+            "fontBoldClose": "**",
+            "fontItalicOpen": "*",
+            "fontItalicClose": "*",
+            "fontUnderlineOpen": None,
+            "fontUnderlineClose": None,
+            "fontStrikeOpen": "~~",
+            "fontStrikeClose": "~~",
+            # Lists
+            "listOpenCompact": None,
+            "listItemLine": " ",
+            "listItemOpen": "*",
+            "numlistItemLine": None,
+            "numlistItemOpen": "1.",
+            "deflistItem1Open": ": ",
+            "deflistItem1Close": None,
+            "deflistItem2Open": None,
+            "deflistItem2Close": None,
+            # Verbatim block
+            "blockVerbOpen": None,
+            "blockVerbClose": None,
+            "bar1": "---",
+            "bar2": "---",
+            # URL, email and anchor
+            "url": "\a",
+            "urlMark": "[\a](\a)",
+            "email": "<\a>",
+            "emailMark": "[\a](mailto:\a)",
+            "anchor": None,
+            # Image markup
+            "img": "![](\a)",
+            "imgAlignLeft": None,
+            "imgAlignRight": None,
+            "imgAlignCenter": None,
+            # Table attributes
+            "tableTitleRowOpen": "| ",
+            "tableTitleRowClose": None,
+            "tableTitleCellSep": " |",
+            "tableRowOpen": "|",
+            "tableRowClose": "|",
+            "tableCellSep": " |",
+        },
+        "ctx": {
+            "anchor": "\a",
+            "bar1": "\\hairline",
+            "bar2": "\\blackrule",
+            "blockQuoteClose": "\\stopblockquote",
+            "blockQuoteOpen": "\\startblockquote",
+            "blockVerbClose": "\\stoptyping",
+            "blockVerbOpen": "\\starttyping",
+            "bodyClose": None,
+            "bodyOpen": None,
+            "comment": "% \a",
+            "deflistClose": None,
+            "deflistItem1Close": "}",
+            "deflistItem1Open": "\\compdesc{",
+            "deflistItem2Close": None,
+            "deflistItem2Open": None,
+            "deflistOpen": None,
+            "email": "\\goto{\a}[url(mailto:\a)]",
+            "emailMark": "\\goto{\a}[url(mailto:\a)]",
+            "EOD": "\\stoptext",
+            "fontBoldClose": "}",
+            "fontBoldOpen": "{\\bf ",
+            "fontItalicClose": "}",
+            "fontItalicOpen": "{\\em ",
+            "fontMonoClose": "}",
+            "fontMonoOpen": "{\\tt ",
+            "fontStrikeClose": "}",
+            "fontStrikeOpen": "\\overstrike{",
+            "fontUnderlineClose": "}",
+            "fontUnderlineOpen": "\\overstrike{",
+            "_imgAlignCenter": "middle",
+            "_imgAlignLeft": "flushleft",
+            "_imgAlignRight": "flushright",
+            "img": "\\startalignment[~A~]\\dontleavehmode{"
+            "\\externalfigure[\a]}\\stopalignment",
+            "listClose": "\\stopitemize",
+            "listCloseCompact": "\\stopitemize",
+            "listItemClose": None,
+            "listItemLine": None,
+            "listItemOpen": "\\item ",
+            "listOpen": "\\startitemize",
+            "listOpenCompact": "\\startitemize[joinedup,nowhite]",
+            "numlistClose": "\\stopitemize",
+            "numlistCloseCompact": "\\stopitemize",
+            "numlistItemClose": None,
+            "numlistItemLine": None,
+            "numlistItemOpen": "\\item ",
+            "numlistOpen": "\\startitemize[n]",
+            "numlistOpenCompact": "\\startitemize[n,joinedup,nowhite]",
+            "pageBreak": "\\pagebreak",
+            "paragraphClose": None,
+            "paragraphOpen": None,
+            "_tableAlignCenter": "middle",
+            "_tableBorder": "frame=on",
+            "_tableCellAlignCenter": "align=middle",
+            "_tableCellAlignRight": "align=left",
+            "tableCellClose": "\\eTD",
+            "_tableCellColSpan": ",nc=\a",
+            "tableCellOpen": "\\bTD[~A~~s~]",
+            "tableClose": "\\eTABLE}\\stopalignment",
+            "tableOpen": "\\blank[medium]\\startalignment[~A~]{\\bTABLE[~B~]",
+            "tableRowClose": "\\eTR",
+            "tableRowOpen": "\\bTR",
+            "tableTitleCellClose": "\\eTH",
+            "tableTitleCellOpen": "\\bTH",
+            "title1Close": "\\stopsection\n",
+            "title1Open": "\\startsection[title=\a, reference=~A~]",
+            "title2Close": "\\stopsubsection\n",
+            "title2Open": "\\startsubsection[title=\a, reference=~A~]",
+            "title3Close": "\\stopsubsubsection\n",
+            "title3Open": "\\startsubsubsection[title=\a, reference=~A~]",
+            "title4Close": None,
+            "title4Open": None,
+            "title5Close": None,
+            "title5Open": None,
+            "tocClose": None,
+            "tocOpen": None,
+            "TOC": "\\subsubject{Contents}  \\placecontent",
+            "url": "\\goto{\a}[url(\a)]",
+            "urlMark": "\\goto{\a}[url(\a)]",
+        },
     }
     assert set(alltags) == set(TARGETS)
 
     for target, tags in alltags.items():
-        for key in tags:
+        for key, value in tags.items():
             if key not in keys:
                 raise AssertionError("{} target has invalid key {}".format(target, key))
+            if value is not None and not value:
+                raise AssertionError("{} target drops {}".format(target, key))
 
     # Compose the target tags dictionary.
     tags = collections.defaultdict(str)
     for key, value in alltags[config["target"]].items():
-        tags[key] = maskEscapeChar(value)
+        if value:  # Skip unsupported markup.
+            tags[key] = maskEscapeChar(value)
 
     # Map strong line to pagebreak
     if rules["mapbar2pagebreak"] and tags["pageBreak"]:
@@ -1394,7 +1556,7 @@ def getRules(config):
             "parainsidelist": 1,
             "tableable": 1,
             "tablecellstrip": 1,
-            "tabletitlerowinbold": 1,
+            "tabletitlerowinbold": 0,
             "verbblocknotescaped": 1,
             "keeplistindent": 1,
             "listmaxdepth": 4,  # deflist is 6
@@ -1605,6 +1767,74 @@ def getRules(config):
             "blanksaroundbar": 1,
             "blanksaroundtitle": 1,
         },
+        "md": {
+            # "keeplistindent": 1,
+            "linkable": 1,
+            "labelbeforelink": 1,
+            "tableable": 1,
+            "imglinkable": 1,
+            "tablecellstrip": 1,
+            "autonumberlist": 1,
+            "spacedlistitemopen": 1,
+            "spacednumlistitemopen": 1,
+            "deflisttextstrip": 1,
+            "blanksaroundpara": 1,
+            "blanksaroundlist": 1,
+            "blanksaroundnumlist": 1,
+            # "blanksarounddeflist": 1,
+            "blanksaroundtable": 1,
+            "blanksaroundbar": 1,
+            "blanksaroundtitle": 1,
+        },
+        "ctx": {
+            "autonumberlist": 1,  # target supports numbered lists natively
+            "autonumbertitle": 0,  # target supports numbered titles natively
+            "autotocnewpageafter": 0,  # break page after automatic TOC
+            "autotocnewpagebefore": 0,  # break page before automatic TOC
+            "autotocwithbars": 0,  # automatic TOC surrounded by bars
+            "barinsidequote": 0,  # bars are allowed inside quote blocks
+            "compactlist": 1,  # separate enclosing tags for compact lists
+            "escapeurl": 1,  # escape special in link URL
+            "finalescapetitle": 1,  # perform final escapes on title lines
+            "imgalignable": 1,  # target supports image alignment
+            "imglinkable": 1,  # target supports images as links
+            "labelbeforelink": 1,  # label comes before the link on the tag
+            "linkable": 1,  # target supports external links
+            "listnotnested": 0,  # lists cannot be nested
+            "mapbar2pagebreak": 1,  # map the strong bar to a page break
+            "onelinepara": 0,  # dump paragraph as a single long line
+            "parainsidelist": 1,  # lists items supports paragraph
+            "quotenotnested": 0,  # quotes cannot be nested
+            "spacedlistitem": 1,  # lists support blank lines between items
+            "stylable": 1,  # target supports external style files
+            "tableable": 1,  # target supports tables
+            "tablecellmulticol": 0,  # separate open+close tags for multicol cells
+            "tablecellspannable": 1,  # the table cells can have span attribute
+            "tablecellstrip": 1,  # strip extra spaces from each table cell
+            "tabletitlerowinbold": 1,  # manually bold any cell on table titles
+            "titleblocks": 1,  # titles must be on open/close section blocks
+            "verbblockfinalescape": 0,  # do final escapes in verb block
+            "verbblocknotescaped": 1,  # don't escape specials in verb block
+            "blankendautotoc": 1,  # append a blank line at the auto TOC end
+            "blanksaroundbar": 1,  # put a blank line before and after bars
+            "blanksarounddeflist": 1,  # put a blank line before and after deflists
+            "blanksaroundlist": 1,  # put a blank line before and after lists
+            "blanksaroundnumlist": 1,  # put a blank line before and after numlists
+            "blanksaroundnumtitle": 0,  # put a blank line before and after numtitles
+            "blanksaroundpara": 1,  # put a blank line before and after paragraphs
+            "blanksaroundquote": 1,  # put a blank line before and after quotes
+            "blanksaroundtable": 1,  # put a blank line before and after tables
+            "blanksaroundtitle": 0,  # put a blank line before and after titles
+            "blanksaroundverb": 1,  # put a blank line before and after verb blocks
+            "breaktablecell": 0,  # break lines after any table cell
+            "breaktablelineopen": 0,  # break line after opening table line
+            "indentverbblock": 0,  # add leading spaces to verb block lines
+            "keeplistindent": 1,  # don't remove the leading spaces on lists
+            "keepquoteindent": 0,  # don't remove the leading TABs on quotes
+            "notbreaklistopen": 0,  # don't break line after opening a new list
+            "tagnotindentable": 0,  # tags must be placed at the line beginning
+            "tablecellaligntype": "cell",  # type of table cell align: cell, column
+        },
     }
     assert set(rules_bank) == set(TARGETS)
 
@@ -1765,8 +1995,7 @@ def Quit(msg=""):
 
 
 def Error(msg):
-    msg = "%s: Error: " % my_name + msg
-    raise error(msg)
+    sys.exit("Error: {}".format(msg))
 
 
 def getTraceback():
@@ -1805,35 +2034,33 @@ def Debug(msg, id_=0, linenr=None):
     print("++ {}: {}".format(ids[id_], msg))
 
 
-def Readfile(file_path, remove_linebreaks=False, ignore_error=False):
-    data = []
+def Readfile(file_path):
     if file_path == "-":
         try:
-            data = sys.stdin.readlines()
-        except Exception:
-            if not ignore_error:
-                Error("You must feed me with data on STDIN!")
+            contents = sys.stdin.read()
+        except KeyboardInterrupt:
+            Error("You must feed me with data on STDIN!")
     else:
         try:
-            f = open(file_path)
-            data = f.readlines()
-            f.close()
-        except Exception:
-            if not ignore_error:
-                Error("Cannot read file:" + " " + file_path)
-    if remove_linebreaks:
-        data = [re.sub("[\n\r]+$", "", x) for x in data]
-    Message("File read (%d lines): %s" % (len(data), file_path), 2)
-    return data
+            with open(file_path, encoding=ENCODING) as f:
+                contents = f.read()
+        except OSError as exception:
+            Error("Cannot read file: {}\n{}".format(file_path, exception))
+    lines = contents.splitlines()
+    Message("File read (%d lines): %s" % (len(lines), file_path), 2)
+    return lines
 
 
 def Savefile(file_path, lines):
+    contents = "\n".join(lines) + "\n"
     try:
-        with open(file_path, "w") as f:
-            for line in lines:
-                f.write(line + "\n")
-    except IOError:
-        Error("Cannot open file for writing:" + " " + file_path)
+        with open(file_path, "w", encoding=ENCODING) as f:
+            try:
+                f.write(contents)
+            except TypeError:
+                f.write(contents.decode(ENCODING))
+    except OSError as exception:
+        Error("Cannot open file for writing: {}\n{}".format(file_path, exception))
 
 
 def dotted_spaces(txt=""):
@@ -1944,9 +2171,8 @@ class CommandLine:
         ret.extend(self.all_flags)  # flag ON
         ret.extend(self.all_actions)  # actions
         ret.extend(["no-" + x for x in self.all_flags])  # add no-*
-        ret.extend(["no-style", "no-encoding"])  # turn OFF
+        ret.extend(["no-style"])  # turn OFF
         ret.extend(["no-outfile", "no-infile"])  # turn OFF
-        ret.extend(["no-dump-config", "no-dump-source"])  # turn OFF
         ret.extend(["no-targets"])  # turn OFF
         # Debug('Valid LONG options: %s'%ret)
         return ret
@@ -1978,7 +2204,7 @@ class CommandLine:
         ret = []
 
         # We need lists, not strings (such as from %!options)
-        if isinstance(cmdline, str):
+        if not isinstance(cmdline, list):
             cmdline = self._tokenize(cmdline)
 
         # Extract name/value pair of all configs, check for invalid names
@@ -2021,9 +2247,6 @@ class CommandLine:
                     filtered.append([target, name, value])
             ret = filtered[:]
 
-        # Add the original command line string as 'realcmdline'
-        ret.append(["all", "realcmdline", cmdline])
-
         return ret
 
 
@@ -2111,7 +2334,7 @@ class SourceDocument:
     def scan_file(self, filename):
         Debug("source file: %s" % filename)
         Message("Loading source document", 1)
-        buf = Readfile(filename, remove_linebreaks=1)
+        buf = Readfile(filename)
         self.scan(buf)
 
     def scan(self, lines):
@@ -2155,7 +2378,7 @@ class SourceDocument:
         self.buffer = buf
         # Fancyness sample: head conf body (1 4 8)
         self.areas_fancy = "{} ({})".format(
-            " ".join(self.areas), " ".join(map(str, [x or "" for x in ref]))
+            " ".join(self.areas), " ".join(str(x or "") for x in ref)
         )
         Message("Areas found: %s" % self.areas_fancy, 2)
 
@@ -2188,7 +2411,6 @@ class ConfigMaster:
       self.defaults    - Stores the default values for all keys
       self.off         - Stores the OFF values for all keys
       self.multi       - List of keys which can have multiple values
-      self.numeric     - List of keys which value must be a number
       self.incremental - List of keys which are incremental
 
     RAW FORMAT:
@@ -2227,11 +2449,9 @@ class ConfigMaster:
         self.dft_options = OPTIONS.copy()
         self.dft_flags = FLAGS.copy()
         self.dft_actions = ACTIONS.copy()
-        self.dft_settings = SETTINGS.copy()
         self.defaults = self._get_defaults()
         self.off = self._get_off()
         self.incremental = ["verbose"]
-        self.numeric = ["toc-level"]
         self.multi = ["infile", "preproc", "postproc", "options", "style"]
 
     def _get_defaults(self):
@@ -2242,8 +2462,6 @@ class ConfigMaster:
         empty.update(self.dft_options)
         empty.update(self.dft_flags)
         empty.update(self.dft_actions)
-        empty.update(self.dft_settings)
-        empty["realcmdline"] = ""  # internal use only
         empty["sourcefile"] = ""  # internal use only
         return empty
 
@@ -2281,8 +2499,6 @@ class ConfigMaster:
         # %!options
         if key == "options":
             ignoreme = list(self.dft_actions.keys()) + ["target"]
-            ignoreme.remove("dump-config")
-            ignoreme.remove("dump-source")
             ignoreme.remove("targets")
             raw_opts = CommandLine().get_raw_config(val, ignore=ignoreme)
             for _target, key, val in raw_opts:
@@ -2367,8 +2583,7 @@ class ConfigMaster:
                 + "Run 'txt2tags --targets' to see all available targets."
             )
         # And of course, an infile also
-        # TODO#1: It seems that this checking is never reached
-        if not config.get("infile"):
+        if "infile" not in config:
             Error("Missing input file (try --help)")
         # Is the target valid?
         if not TARGETS.count(target):
@@ -2381,18 +2596,6 @@ class ConfigMaster:
         empty = self.defaults.copy()
         empty.update(config)
         config = empty.copy()
-        # Check integers options
-        for key in config.keys():
-            if key in self.numeric:
-                try:
-                    config[key] = int(config[key])
-                except ValueError:
-                    Error("--%s value must be a number" % key)
-        # --toc-only is stronger than others
-        if config["toc-only"]:
-            config["headers"] = 0
-            config["toc"] = 0
-            config["outfile"] = config["outfile"] or STDOUT
         # Restore target
         config["target"] = target
         # Set output file name
@@ -2473,7 +2676,7 @@ class ConfigLines:
         if not filename:
             return []
         errormsg = "Invalid CONFIG line on %s" + "\n%03d:%s"
-        lines = Readfile(filename, remove_linebreaks=1)
+        lines = Readfile(filename)
         # Sanity: try to find invalid config lines
         for i in range(len(lines)):
             line = lines[i].rstrip()
@@ -2863,20 +3066,12 @@ class TitleMaster:
         "Compose and save title label, used by anchors."
         # Remove invalid chars from label set by user
         self.label = re.sub("[^A-Za-z0-9_-]", "", self.label or "")
-        # Generate name as 15 first :alnum: chars
-        # TODO how to translate safely accented chars to plain?
-        # self.label = re.sub('[^A-Za-z0-9]', '', self.txt)[:15]
-        # 'tocN' label - sequential count, ignoring 'toc-level'
-        # self.label = self.anchor_prefix + str(len(self.toc)+1)
 
     def _get_tagged_anchor(self):
         "Return anchor if user defined a label, or TOC is on."
         ret = ""
         label = self.label
-        if CONF["toc"] and self.level <= CONF["toc-level"]:
-            # This count is needed bcos self.toc stores all
-            # titles, regardless of the 'toc-level' setting,
-            # so we can't use self.toc length to number anchors
+        if CONF["toc"]:
             self.anchor_count += 1
             # Autonumber label (if needed)
             label = label or "{}{}".format(self.anchor_prefix, self.anchor_count)
@@ -2922,19 +3117,17 @@ class TitleMaster:
             ret.append(tagged)
             # Get the right letter count for UTF
             if isinstance(full_title, bytes):
-                full_title = full_title.decode("utf-8")
+                full_title = full_title.decode(ENCODING)
             ret.append(regex["x"].sub("=" * len(full_title), self.tag))
         else:
             ret.append(tagged)
         return ret
 
-    def dump_marked_toc(self, max_level=99):
+    def dump_marked_toc(self):
         "Dumps all toc itens as a valid t2t-marked list"
         ret = []
         toc_count = 1
         for level, count_id, txt, label in self.toc:
-            if level > max_level:
-                continue  # ignore
             indent = "  " * level
             id_txt = ("{} {}".format(count_id, txt)).lstrip()
             label = label or self.anchor_prefix + repr(toc_count)
@@ -2944,7 +3137,7 @@ class TitleMaster:
             if TAGS["anchor"]:
                 if CONF["enum-title"] and level == 1:
                     # 1. [Foo #anchor] is more readable than [1. Foo #anchor] in level 1.
-                    # This is a stoled idea from Windows .CHM help files.
+                    # This is an idea stolen from Windows .CHM help files.
                     tocitem = '{}+ [""{}"" #{}]'.format(indent, txt, label)
                 else:
                     tocitem = '{}- [""{}"" #{}]'.format(indent, id_txt, label)
@@ -2968,7 +3161,7 @@ class TitleMaster:
 class TableMaster:
     def __init__(self, line=""):
         self.rows = []
-        self.border = 0
+        self.border = False
         self.align = "Left"
         self.cellalign = []
         self.colalign = []
@@ -2983,7 +3176,7 @@ class TableMaster:
 
     def _get_col_align(self):
         colalign = []
-        for cell in range(0, len(self.cellalign)):
+        for cell in range(len(self.cellalign)):
             align = self.cellalign[cell]
             span = self.cellspan[cell]
             colalign.extend([align] * span)
@@ -3043,16 +3236,13 @@ class TableMaster:
         sep = TAGS["tableCellSep"]
         calign = [TAGS["_tableCellAlign" + x] for x in rowdata["cellalign"]]
         calignsep = TAGS["tableColAlignSep"]
-        ncolumns = len(self.colalign)
 
         # Populate the span and multicol open tags
         cspan = []
         multicol = []
         colindex = 0
         for cellindex in range(0, len(rowdata["cellspan"])):
-
             span = rowdata["cellspan"][cellindex]
-            align = rowdata["cellalign"][cellindex]
 
             if span > 1:
                 cspan.append(regex["x"].sub(str(span), TAGS["_tableCellColSpan"]))
@@ -3061,12 +3251,7 @@ class TableMaster:
                 multicol.append(mcopen)
             else:
                 cspan.append("")
-
-                if colindex < ncolumns and align != self.colalign[colindex]:
-                    mcopen = regex["x"].sub("1", TAGS["_tableCellMulticolOpen"])
-                    multicol.append(mcopen)
-                else:
-                    multicol.append("")
+                multicol.append("")
 
             if not self.border:
                 multicol[-1] = multicol[-1].replace(calignsep, "")
@@ -3129,8 +3314,8 @@ class TableMaster:
     def parse_row(self, line):
         # Default table properties
         ret = {
-            "border": 0,
-            "title": 0,
+            "border": False,
+            "title": False,
             "align": "Left",
             "cells": [],
             "cellalign": [],
@@ -3142,14 +3327,14 @@ class TableMaster:
         line = line.lstrip()
         # Detect title mark
         if line[1] == "|":
-            ret["title"] = 1
+            ret["title"] = True
         # Detect border mark and normalize the EOL
         m = re.search(r" (\|+) *$", line)
         if m:
-            line = line + " "
-            ret["border"] = 1
+            line += " "
+            ret["border"] = True
         else:
-            line = line + " | "
+            line += " | "
         # Delete table mark
         line = regex["table"].sub("", line)
         # Detect colspan  | foo | bar baz |||
@@ -3189,10 +3374,7 @@ class TableMaster:
                 close = rowopen + close
 
         # Now we tag all the table cells on each row
-        # tagged_cells = map(lambda x: self._tag_cells(x), rows) #!py15
-        tagged_cells = []
-        for cell in rows:
-            tagged_cells.append(self._tag_cells(cell))
+        tagged_cells = [self._tag_cells(cell) for cell in rows]
 
         # Add row separator tags between lines
         tagged_rows = []
@@ -3209,6 +3391,11 @@ class TableMaster:
                     o, c = rowopen, rowclose
                 row = tagged_cells.pop(0)
                 tagged_rows.append(o + row + c)
+                if rowdata["title"] and TARGET == "md":
+                    titrowcloserow = "|"
+                    for _cell in rowdata["cells"]:
+                        titrowcloserow += "---|"
+                    tagged_rows.append(titrowcloserow)
 
         # Join the pieces together
         fulltable = []
@@ -3351,7 +3538,7 @@ class BlockMaster:
 
     def blockout(self):
         if not self.BLK:
-            Error("No block to pop")
+            raise AssertionError("No block to pop")
         blockname = self.BLK.pop()
         result = getattr(self, blockname)()
         parsed = self.HLD.pop()
@@ -3490,6 +3677,8 @@ class BlockMaster:
         for line in self.hold():
             if not rules["verbblocknotescaped"]:
                 line = doEscape(TARGET, line)
+            if TAGS["blockVerbLine"]:
+                line = TAGS["blockVerbLine"] + line
             if rules["indentverbblock"]:
                 line = "  " + line
             if rules["verbblockfinalescape"]:
@@ -3750,52 +3939,6 @@ def listTargets():
         print("{:8}{}".format(target, name))
 
 
-def dumpConfig(source_raw, parsed_config):
-    onoff = {1: "ON", 0: "OFF"}
-    data = [
-        ("RC file", RC_RAW),
-        ("source document", source_raw),
-        ("command line", CMDLINE_RAW),
-    ]
-    # First show all RAW data found
-    for label, cfg in data:
-        print("RAW config for %s" % label)
-        for target, key, val in cfg:
-            target = "(%s)" % target
-            key = dotted_spaces("%-14s" % key)
-            val = val or "ON"
-            print("  {:<8} {}: {}".format(target, key, val))
-        print()
-    # Then the parsed results of all of them
-    print("Full PARSED config")
-    keys = list(parsed_config.keys())
-    keys.sort()  # sorted
-    for key in keys:
-        val = parsed_config[key]
-        # Filters are the last
-        if key == "preproc" or key == "postproc":
-            continue
-        # Flag beautifier
-        if key in list(FLAGS.keys()) or key in list(ACTIONS.keys()):
-            val = onoff.get(val) or val
-        # List beautifier
-        if isinstance(val, list):
-            if key == "options":
-                sep = " "
-            else:
-                sep = ", "
-            val = sep.join(val)
-        print("{:>25}: {}".format(dotted_spaces("%-14s" % key), val))
-    print()
-    print("Active filters")
-    for filter_ in ["preproc", "postproc"]:
-        for rule in parsed_config.get(filter_) or []:
-            print(
-                "%25s: %s  ->  %s"
-                % (dotted_spaces("%-14s" % filter_), rule[0], rule[1])
-            )
-
-
 def get_file_body(file_):
     "Returns all the document BODY lines"
     return process_source_file(file_, noconf=1)[1][2]
@@ -3824,9 +3967,11 @@ def finish_him(outlist, config):
     if outfile == MODULEOUT:
         return outlist
     elif outfile == STDOUT:
+        Message("Saving results to the output file", 1)
         for line in outlist:
             print(line)
     else:
+        Message("Saving results to the output file", 1)
         Savefile(outfile, outlist)
         if not QUIET:
             print("{} wrote {}".format(my_name, outfile))
@@ -3834,28 +3979,25 @@ def finish_him(outlist, config):
 
 def toc_tagger(toc, config):
     "Returns the tagged TOC, as a single tag or a tagged list"
-    ret = []
+    if not config["toc"]:
+        return []
+    elif TAGS["TOC"]:
+        # Our TOC list is not needed, the target already knows how to do a TOC
+        ret = [TAGS["TOC"]]
     # Convert the TOC list (t2t-marked) to the target's list format
-    if config["toc-only"] or (config["toc"] and not TAGS["TOC"]):
+    else:
         fakeconf = config.copy()
         fakeconf["headers"] = 0
-        fakeconf["toc-only"] = 0
-        fakeconf["mask-email"] = 0
         fakeconf["preproc"] = []
         fakeconf["postproc"] = []
         ret, _ = convert(toc, fakeconf)
         set_global_config(config)  # restore config
-    # Our TOC list is not needed, the target already knows how to do a TOC
-    elif config["toc"] and TAGS["TOC"]:
-        ret = [TAGS["TOC"]]
     return ret
 
 
 def toc_formatter(toc, config):
     "Formats TOC for automatic placement between headers and body"
 
-    if config["toc-only"]:
-        return toc  # no formatting needed
     if not config["toc"]:
         return []  # TOC disabled
     ret = toc
@@ -3887,28 +4029,23 @@ def doHeader(headers, config):
     if not headers:
         headers = ["", "", ""]
     target = config["target"]
-    if target not in HEADER_TEMPLATE:
-        Error("doHeader: Unknown target '%s'" % target)
 
     template = HEADER_TEMPLATE[target].split("\n")
 
-    head_data = {"STYLE": [], "ENCODING": ""}
-    for key in head_data.keys():
-        val = config.get(key.lower())
-        # Remove .sty extension from each style filename (freaking tex)
-        # XXX Can't handle --style foo.sty,bar.sty
-        if target == "tex" and key == "STYLE":
-            val = [re.sub(r"(?i)\.sty$", "", x) for x in val]
-        if key == "ENCODING":
-            val = get_encoding_string(val, target)
-        head_data[key] = val
+    style = config.get("style")
+    # Tex: strip .sty extension from each style filename.
+    if target == "tex":
+        style = [os.path.splitext(x)[0] for x in style]
+
+    head_data = {"STYLE": style, "ENCODING": get_encoding_string(target)}
+
     # Parse header contents
     for i in 0, 1, 2:
         contents = headers[i]
         # Escapes - on tex, just do it if any \tag{} present
         if target != "tex" or (target == "tex" and re.search(r"\\\w+{", contents)):
             contents = doEscape(target, contents)
-        if target == "lout":
+        if target in ["lout", "tex"]:
             contents = doFinalEscape(target, contents)
 
         head_data["HEADER%d" % (i + 1)] = contents
@@ -3920,8 +4057,8 @@ def doHeader(headers, config):
     # If found, remove the reference
     # If there isn't any other key reference on the same line, remove it
     # TODO loop by template line > key
-    for key in head_data.keys():
-        if head_data.get(key):
+    for key, value in head_data.items():
+        if value:
             continue
         for line in template:
             if line.count("%%(%s)s" % key):
@@ -3950,17 +4087,6 @@ def doHeader(headers, config):
     return template.split("\n")
 
 
-def doCommentLine(txt):
-    # The -- string ends a (h|sg|xht)ml comment :(
-    txt = maskEscapeChar(txt)
-    if TAGS["comment"].count("--") and txt.count("--"):
-        txt = re.sub("-(?=-)", r"-\\", txt)
-
-    if TAGS["comment"]:
-        return regex["x"].sub(txt, TAGS["comment"])
-    return ""
-
-
 def doFooter(config):
     ret = []
 
@@ -3972,20 +4098,6 @@ def doFooter(config):
     if not rules.get("blanksaround" + BLOCK.last):
         ret.append("")
 
-    # Add txt2tags info at footer, if target supports comments
-    if TAGS["comment"]:
-        target = config["target"]
-        if target == "tex":
-            target = "LaTeX2e"
-
-        t2t_version = "{} code generated by {} {} ({})".format(
-            target, my_name, __version__, my_url
-        )
-        cmdline = "cmdline: {} {}".format(my_name, " ".join(config["realcmdline"]))
-
-        ret.append(doCommentLine(t2t_version))
-        ret.append(doCommentLine(cmdline))
-
     # Maybe we have a specific tag to close the document?
     if TAGS["EOD"]:
         ret.append(TAGS["EOD"])
@@ -4014,7 +4126,7 @@ def doEscape(target, txt):
         txt = txt.replace('"', '"%s""' % ESCCHAR)  # "\""
         txt = re.sub("([|&{}@#^~])", '"\\1"', txt)  # "@"
         txt = txt.replace(tmpmask, '"%s"' % (ESCCHAR * 2))  # "\\"
-    elif target == "tex":
+    elif target in ("tex", "ctx"):
         # Mark literal \ to be changed to $\backslash$ later
         txt = txt.replace(ESCCHAR, tmpmask)
         txt = re.sub("([#$&%{}])", ESCCHAR + r"\1", txt)  # \%
@@ -4138,24 +4250,15 @@ def get_tagged_link(label, url):
 
     # Simple link (not guessed)
     if not label and not guessurl:
-        if CONF["mask-email"] and linktype == "email":
-            # Do the email mask feature (no TAGs, just text)
-            url = url.replace("@", " (a) ")
-            url = url.replace(".", " ")
-            url = "<%s>" % url
-            if rules["linkable"]:
-                url = doEscape(target, url)
-            ret = url
-        else:
-            # Just add link data to tag
-            tag = TAGS[linktype]
-            ret = regex["x"].sub(url, tag)
+        # Just add link data to tag
+        tag = TAGS[linktype]
+        ret = regex["x"].sub(url, tag)
 
     # Named link or guessed simple link
     else:
         # Adjusts for guessed link
         if not label:
-            label = url  # no   protocol
+            label = url  # no protocol
         if guessurl:
             url = guessurl  # with protocol
 
@@ -4226,41 +4329,8 @@ def get_image_align(line):
     return align
 
 
-# Reference: http://www.iana.org/assignments/character-sets
-# http://www.drclue.net/F1.cgi/HTML/META/META.html
-def get_encoding_string(enc, target):
-    if not enc:
-        return ""
-    # Target specific translation table
-    translate = {
-        "tex": {
-            # missing: ansinew , applemac , cp437 , cp437de , cp865
-            "utf-8": "utf8",
-            "us-ascii": "ascii",
-            "windows-1250": "cp1250",
-            "windows-1252": "cp1252",
-            "ibm850": "cp850",
-            "ibm852": "cp852",
-            "iso-8859-1": "latin1",
-            "iso-8859-2": "latin2",
-            "iso-8859-3": "latin3",
-            "iso-8859-4": "latin4",
-            "iso-8859-5": "latin5",
-            "iso-8859-9": "latin9",
-            "koi8-r": "koi8-r",
-        }
-    }
-    # Normalization
-    enc = re.sub("(?i)(us[-_]?)?ascii|us|ibm367", "us-ascii", enc)
-    enc = re.sub("(?i)(ibm|cp)?85([02])", "ibm85\\2", enc)
-    enc = re.sub("(?i)(iso[_-]?)?8859[_-]?", "iso-8859-", enc)
-    enc = re.sub("iso-8859-($|[^1-9]).*", "iso-8859-1", enc)
-    # Apply translation table
-    try:
-        enc = translate[target][enc.lower()]
-    except Exception:
-        pass
-    return enc
+def get_encoding_string(target):
+    return "utf8" if target == "tex" else "utf-8"
 
 
 def process_source_file(file_="", noconf=0, contents=None):
@@ -4280,7 +4350,7 @@ def process_source_file(file_="", noconf=0, contents=None):
 
     All the conversion process will be based on the data and
     configuration returned by this function.
-    The source files is read on this step only.
+    The source file is read in this step only.
     """
     if contents:
         source = SourceDocument(contents=contents)
@@ -4302,80 +4372,36 @@ def process_source_file(file_="", noconf=0, contents=None):
             full_parsed["outfile"] = MODULEOUT
         else:
             full_parsed["sourcefile"] = file_
-        # Maybe should we dump the config found?
-        if full_parsed.get("dump-config"):
-            dumpConfig(source_raw, full_parsed)
-            Quit()
-        # The user just want to know a single config value (hidden feature)
-        # TODO pick a better name than --show-config-value
-        elif full_parsed.get("show-config-value"):
-            config_value = full_parsed.get(full_parsed["show-config-value"])
-            if config_value:
-                if isinstance(config_value, list):
-                    print("\n".join(config_value))
-                else:
-                    print(config_value)
-            Quit()
-        # Okay, all done
-        Debug("FULL config for this file: %s" % full_parsed, 1)
+        Debug("Complete config: %s" % full_parsed, 1)
     else:
         full_parsed = {}
     return full_parsed, (head, conf, body)
 
 
-def get_infiles_config(infiles):
-    """
-    Find and Join into a single list, all configuration available
-    for each input file. This function is supposed to be the very
-    first one to be called, before any processing.
-    """
-    return list(map(process_source_file, infiles))
-
-
-def convert_this_files(configs):
-    global CONF
-    for myconf, doc in configs:  # multifile support
-        target_head = []
-        target_toc = []
-        target_body = []
-        target_foot = []
-        source_head, source_conf, source_body = doc
-        myconf = ConfigMaster().sanity(myconf)
-        # Compose the target file Headers
-        # TODO escape line before?
-        # TODO see exceptions by tex and mgp
-        Message("Composing target Headers", 1)
-        target_head = doHeader(source_head, myconf)
-        # Parse the full marked body into tagged target
-        first_body_line = (len(source_head) or 1) + len(source_conf) + 1
-        Message("Composing target Body", 1)
-        target_body, marked_toc = convert(
-            source_body, myconf, firstlinenr=first_body_line
-        )
-        # If dump-source, we're done
-        if myconf["dump-source"]:
-            for line in source_head + source_conf + target_body:
-                print(line)
-            return
+def convert_file(headers, body, config, first_body_lineno=1):
+    config = ConfigMaster().sanity(config)
+    # Compose the target file Headers
+    # TODO escape line before?
+    # TODO see exceptions by tex and mgp
+    Message("Composing target Headers", 1)
+    target_head = doHeader(headers, config)
+    # Parse the full marked body into tagged target
 
-        # Compose the target file Footer
-        Message("Composing target Footer", 1)
-        target_foot = doFooter(myconf)
-
-        # Make TOC (if needed)
-        Message("Composing target TOC", 1)
-        tagged_toc = toc_tagger(marked_toc, myconf)
-        target_toc = toc_formatter(tagged_toc, myconf)
-
-        # Finally, we have our document
-        outlist = target_head + target_toc + target_body + target_foot
-        # If module, return finish_him as list
-        # Else, write results to file or STDOUT
-        if myconf.get("outfile") == MODULEOUT:
-            return finish_him(outlist, myconf), myconf
-        else:
-            Message("Saving results to the output file", 1)
-            finish_him(outlist, myconf)
+    Message("Composing target Body", 1)
+    target_body, marked_toc = convert(body, config, firstlinenr=first_body_lineno)
+
+    # Compose the target file Footer
+    Message("Composing target Footer", 1)
+    target_foot = doFooter(config)
+
+    # Make TOC (if needed)
+    Message("Composing target TOC", 1)
+    tagged_toc = toc_tagger(marked_toc, config)
+    target_toc = toc_formatter(tagged_toc, config)
+
+    # Finally, we have our document
+    outlist = target_head + target_toc + target_body + target_foot
+    return finish_him(outlist, config)
 
 
 def parse_images(line):
@@ -4437,7 +4463,7 @@ def get_include_contents(file_, path=""):
     # Handle remote dir execution
     filepath = os.path.join(path, file_)
     # Read included file contents
-    lines = Readfile(filepath, remove_linebreaks=1)
+    lines = Readfile(filepath)
     # Default txt2tags marked text, just BODY matters
     if id_ == "t2t":
         lines = get_file_body(filepath)
@@ -4471,7 +4497,6 @@ def convert(bodylines, config, firstlinenr=1):
     TITLE = TitleMaster()
 
     ret = []
-    dump_source = []
     f_lastwasblank = 0
 
     # Compiling all PreProc regexes
@@ -4486,7 +4511,6 @@ def convert(bodylines, config, firstlinenr=1):
         results_box = ""
 
         untouchedline = bodylines[lineref]
-        dump_source.append(untouchedline)
 
         line = re.sub("[\n\r]+$", "", untouchedline)  # del line break
 
@@ -4678,7 +4702,6 @@ def convert(bodylines, config, firstlinenr=1):
 
             # %!include command
             if key == "include":
-
                 incpath = os.path.dirname(CONF["sourcefile"])
                 incfile = val
                 err = "A file cannot include itself (loop!)"
@@ -4695,20 +4718,10 @@ def convert(bodylines, config, firstlinenr=1):
                     # Insert include lines into body
                     # TODO include maxdepth limit
                     bodylines = bodylines[:lineref] + inclines + bodylines[lineref:]
-                    # TODO fix path if include@include
-                    # Remove %!include call
-                    if CONF["dump-source"]:
-                        dump_source.pop()
 
                 # This line is done, go to next
                 continue
 
-        # ---------------------[ dump-source ]-----------------------
-
-        # We don't need to go any further
-        if CONF["dump-source"]:
-            continue
-
         # ---------------------[ Comments ]--------------------------
 
         # Just skip them
@@ -4957,13 +4970,7 @@ def convert(bodylines, config, firstlinenr=1):
     if TAGS["bodyClose"]:
         ret.append(TAGS["bodyClose"])
 
-    if CONF["toc-only"]:
-        ret = []
-    marked_toc = TITLE.dump_marked_toc(CONF["toc-level"])
-
-    # If dump-source, all parsing is ignored
-    if CONF["dump-source"]:
-        ret = dump_source[:]
+    marked_toc = TITLE.dump_marked_toc()
 
     return ret, marked_toc
 
@@ -4980,7 +4987,7 @@ def exec_command_line(user_cmdline=None):
     QUIET = cmdline_parsed.get("quiet") or 0
     infiles = cmdline_parsed.get("infile") or []
 
-    Message("Txt2tags %s processing begins" % __version__, 1)
+    Message("Processing begins", 1)
 
     # The easy ones
     if cmdline_parsed.get("help"):
@@ -4991,13 +4998,6 @@ def exec_command_line(user_cmdline=None):
         listTargets()
         Quit()
 
-    # Multifile haters
-    if len(infiles) > 1:
-        errmsg = "Option --%s can't be used with multiple input files"
-        for option in NO_MULTI_INPUT:
-            if cmdline_parsed.get(option):
-                Error(errmsg % option)
-
     Debug("system platform: %s" % sys.platform)
     Debug("python version: %s" % (sys.version.split("(")[0]))
     Debug("command line: %s" % sys.argv)
@@ -5015,21 +5015,20 @@ def exec_command_line(user_cmdline=None):
         Debug("rc file: %s" % rc_file)
         Debug("rc file raw config: %s" % RC_RAW, 1)
 
-    # Get all infiles config (if any)
-    infiles_config = get_infiles_config(infiles)
-
     # TODO#1: this checking should be only in ConfigMaster.sanity()
-    if not infiles:
+    if len(infiles) == 1:
+        infile = infiles[0]
+    else:
         Error(
-            "Missing input file (try --help)"
-            + "\n\n"
-            + "Please inform an input file (.t2t) at the end of the command."
-            + "\n"
-            + "Example:"
-            + " {} -t html {}".format(my_name, "file.t2t")
+            "Pass exactly one input file (see --help). "
+            "Example: {} -t html file.t2t".format(my_name)
         )
 
-    convert_this_files(infiles_config)
+    config, doc = process_source_file(infile)
+    headers, config_source, body = doc
+
+    first_body_lineno = (len(headers) or 1) + len(config_source) + 1
+    convert_file(headers, body, config, first_body_lineno=first_body_lineno)
 
     Message("Txt2tags finished successfully", 1)
 

Debdiff

[The following lists of changes regard files as different if they have different names, permissions or owners.]

Files in second set of .debs but not in first

-rw-r--r--  root/root   /usr/lib/python3/dist-packages/txt2tags-3.8.egg-info/PKG-INFO
-rw-r--r--  root/root   /usr/lib/python3/dist-packages/txt2tags-3.8.egg-info/dependency_links.txt
-rw-r--r--  root/root   /usr/lib/python3/dist-packages/txt2tags-3.8.egg-info/entry_points.txt
-rw-r--r--  root/root   /usr/lib/python3/dist-packages/txt2tags-3.8.egg-info/top_level.txt
-rw-r--r--  root/root   /usr/share/doc/txt2tags/examples/sample.ctx
-rw-r--r--  root/root   /usr/share/doc/txt2tags/examples/sample.md

Files in first set of .debs but not in second

-rw-r--r--  root/root   /usr/lib/python3/dist-packages/txt2tags-3.4.egg-info/PKG-INFO
-rw-r--r--  root/root   /usr/lib/python3/dist-packages/txt2tags-3.4.egg-info/dependency_links.txt
-rw-r--r--  root/root   /usr/lib/python3/dist-packages/txt2tags-3.4.egg-info/entry_points.txt
-rw-r--r--  root/root   /usr/lib/python3/dist-packages/txt2tags-3.4.egg-info/top_level.txt

No differences were encountered in the control files

More details

Full run details