bugtex4ht - Bugs: bug #605, Large difference in spacing of TOC...

 
 
Show feedback again

You are not allowed to post comments on this tracker with your current authentification level.

bug #605: Large difference in spacing of TOC between book and article class

Submitted by:  Nasser M. Abbasi <nma123>
Submitted on:  Tue Jul 25 20:52:47 2023  
 
Category: NonePriority: 5 - Normal
Severity: 5 - NormalStatus: None
Privacy: PublicAssigned to: None
Open/Closed: Closed

Mon Oct 9 11:42:39 2023, comment #1:

I've made a big change in the TOC processing. I've removed hard spaces that were inserted, and indentation should be done solely using CSS. I've changed the indentation for each TOC level, now they change by 1em instead of 2em as previously. I've also removed lot of complicated CSS rules that were used for the Book class, and added CSS rules for Article and Report.

I hope it will work better than previously.

Michal Hoftich <michal_h21>
Project Member
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

Nasser M. Abbasi <nma123>

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by michal_h21 (Posted a comment)
  • -unavailable- added by nma123 (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    1 latest change follows.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed Oct 18 13:22:59 2023michal_h21Open/ClosedOpen=>Closed
    Show feedback again

    Back to the top


    Powered by Savane 3.1-cleanup+gray