[tex4ht] [bug #605] Large difference in spacing of TOC between book and article class
Nasser M. Abbasi
puszcza-hackers at gnu.org.ua
Tue Jul 25 22:52:47 CEST 2023
URL:
<http://puszcza.gnu.org.ua/bugs/?605>
Summary: Large difference in spacing of TOC between book and
article class
Project: tex4ht
Submitted by: nma123
Submitted on: Tue Jul 25 20:52:47 2023
Category: None
Priority: 5 - Normal
Severity: 5 - Normal
Status: None
Privacy: Public
Assigned to: None
Originator Email:
Open/Closed: Open
Discussion Lock: Any
_______________________________________________________
Details:
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
_______________________________________________________
Reply to this item at:
<http://puszcza.gnu.org.ua/bugs/?605>
_______________________________________________
Message sent via/by Puszcza
http://puszcza.gnu.org.ua/
More information about the tex4ht
mailing list.