diff options
author | Norbert Preining <norbert@preining.info> | 2021-07-27 03:01:57 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2021-07-27 03:01:57 +0000 |
commit | cef58753eba8ad7e2071195dbd92454febe82d32 (patch) | |
tree | df909696e42fb25ce108e30258c7f935ded86079 /support/make4ht/README | |
parent | 84465d50d746dfed1bfbe7bb5065279665fa87de (diff) |
CTAN sync 202107270301
Diffstat (limited to 'support/make4ht/README')
-rw-r--r-- | support/make4ht/README | 77 |
1 files changed, 72 insertions, 5 deletions
diff --git a/support/make4ht/README b/support/make4ht/README index 490b9c4a63..89cfac9141 100644 --- a/support/make4ht/README +++ b/support/make4ht/README @@ -175,6 +175,19 @@ cross-references work. It can save quite a lot of the compilation time: $ make4ht -um draft filename.tex +Another buil-in mode is `clean`. It executes the `Make:clean()` command to +remove all generated and temporary files from the current directory. +No \LaTeX\ compilation happens in this mode. + +It should be used in this way: + + # copy generated files to a direcory + $ make4ht -d outdir filename.tex + # remove all generated files in the current dir + # the -a info option will print files that are removed + $ make4ht -m clean -a info filename.tex + + More information about the build files can be found in section \ref{sec:buildfiles}. ## Handling of the generated files @@ -248,7 +261,7 @@ common\_domfilters : clean the HTML file using DOM filters. It is more powerful than `common_filters`. Used DOM filters are `fixinlines`, `idcolons`, -`joincharacters`, and `tablerows`. +`joincharacters`, `sectionid` and `tablerows`. detect\_engine @@ -416,6 +429,12 @@ detect compilation errors in the TeX log file. : One call to the TeX engine with special configuration for loading of the `tex4ht.sty` package. +`Make:clean` + +: This command removes all generated files, including images, HTML files and + various auxilary files, from the current directory. It keeps files whose + file names don't match the input file name. + `Make:httex` : Variant of `Make:htlatex` suitable for Plain \TeX. @@ -653,6 +672,12 @@ mathmlfixes : fix common issues for MathML. +sectionid + +: create `id` attribute for HTML sectioning elements derived from the section + title. It also updates links to these sections. Use the `notoc` command line + option to prevent that. + t4htlinks : fix hyperlinks in the ODT format. @@ -935,7 +960,7 @@ options `toc_query` -: CSS selector for selecting the table of contents container. +: CSS selector for selection of element that contains the table of contents. `title_query` @@ -945,12 +970,33 @@ options : table containing a hierarchy of classes used in TOC +`max_depth` + +: set detph of displayed children TOC levels + Default values: filter_settings "collapsetoc" { toc_query = ".tableofcontents", - title_query = ".partHead a, .chapterHead a, .sectionHead a, .subsectionHead a", - toc_levels = {"partToc", "chapterToc", "sectionToc", "subsectionToc", "subsubsectionToc"} + title_query = "h1 a, h2 a, h3 a, h4 a, h5 a, h6 a", + max_depth = 1, + toc_levels = { + tocpart = 1, + toclikepart = 1, + tocappendix = 1, + toclikechapter = 2, + tocchapter = 2, + tocsection = 3, + toclikesection = 3, + tocsubsection = 4, + toclikesubsection = 4, + tocsubsubsection = 5, + toclikesubsubsection = 5, + tocparagraph = 6, + toclikeparagraph = 6, + tocsubparagraph = 7, + toclikesubparagraph = 7, + } } ## The `fixinlines` dom filter @@ -1034,15 +1080,22 @@ header table value is a function, it is executed with current parameters and HTML page DOM object as arguments. +remove\_maketitle + +: the `staticsite` extension removes text produced by the `\maketitle` command by default. Set this +option to `false` to disable the removal. + Example: + -- set the environmental variable 'blog_root' with path to + -- the directory that should hold the generated HTML files local outdir = os.getenv "blog_root" filter_settings "staticsite" { site_root = outdir, map = { - [".css$"] = "../css/" + [".css$"] = "/css/" }, header = { layout="post", @@ -1262,6 +1315,20 @@ Another option is to add a space before the `tex4ht` options: The former way is preferable, though. +## Table of Contents points to a wrong destination + +The `sectionid` DOM filter creates better link destinations for sectioning commands. +In some cases, for example if you use Pandoc, the document may already contain the +link destination with the same name. In such cases the original destination is preserved +in the file. In this case links to the section will point to that place, instead of +correct destination in the section. This may happen for example if you use Pandoc for +the Markdown to \LaTeX\ conversion. It creates `\hypertarget` commands that are placed +just before section. The links points to that place, instead of the actual section. + +In this case you don't want to update links. Use the `notoc` option to prevent that. + + + ## Filenames containing spaces `tex4ht` command cannot handle filenames containing spaces. to fix this issue, `make4ht` |