Tue Jul 25 20:52:47 2023, original submission:
reference and screen shots at
https://tex.stackexchange.com/questions/691986/large-difference-in-spacing-of-toc-between-book-and-article-class-with-tex4ht-h
Compare this TOC in book class with tex4ht
--------------------------
\documentclass[12pt]{article}
\setcounter{tocdepth}{5} % for main TOC must be in preamble
\setcounter{secnumdepth}{5}
\begin{document}
\title{my book}
\author{me}
\date{\today}
\maketitle
\tableofcontents
\section{section name}
section data
\subsection{subsection name}
subsection data
\subsubsection{subsubsection name}
subsubsection data
\paragraph{paragraph name}
paragraph data
\end{document}
-----------------
Compiled with
make4ht -ulm default -a debug main.tex 'mathjax,htm'
gives (showing only the TOC)
enter image description here
Notice the amount of shift to the right. Now compare with this MWE which is the same but book class
------------------------------
\documentclass[12pt]{book}
\setcounter{tocdepth}{5} % for main TOC must be in preamble
\setcounter{secnumdepth}{5}
\begin{document}
\title{my book}
\author{me}
\date{\today}
\maketitle
\tableofcontents
\chapter{book name}
my book
\section{section name}
section data
\subsection{subsection name}
subsection data
\subsubsection{subsubsection name}
subsubsection data
\paragraph{paragraph name}
paragraph data
\end{document}
-------------------------
Compiled using same command gives
enter image description here
I see two problems:
1. In first example above, the amount of shift to the right is too small, it could be little larger, also the paragraph number which 1.1.1.1 is not shifted to the right of the subsubsection
2. In book class, the amount of shift to the right is way too large compared to the article class. It will be better if all classes have same amount of shift in TOC. Notice that in book class the paragraph number is now shifted to the right of the subsubsection, which is the correct way to do it, except the shift is too large.
I just like to have nice looking TOC's, even in HTML and not just in PDF :)
Any suggestion how to fix the above two issues?
TL 2023
Thanks
--Nasser
|