[tex4ht] [bug #592] inconsistent font sizes used for subsubsection/paragraph titles in tex4ht. How to fix?

2023-04-18 Thread Michal Hoftich
Update of bug #592 (project tex4ht):

 Open/Closed:Open => Closed 


___

Reply to this item at:

  

___
  Message sent via/by Puszcza
  http://puszcza.gnu.org.ua/



[tex4ht] [bug #592] inconsistent font sizes used for subsubsection/paragraph titles in tex4ht. How to fix?

2023-01-10 Thread Michal Hoftich
Follow-up Comment #5, bug #592 (project tex4ht):

I've just added the default style. It fixes the section titles, page
dimensions, and images in the dark mode. The default CSS can be disabled using
the "nostyle" option.

___

Reply to this item at:

  

___
  Message sent via/by Puszcza
  http://puszcza.gnu.org.ua/



[tex4ht] [bug #592] inconsistent font sizes used for subsubsection/paragraph titles in tex4ht. How to fix?

2023-01-05 Thread Michal Hoftich
Follow-up Comment #4, bug #592 (project tex4ht):

Maybe we could add a CSS style that would address not only the size of
sections, but also other issues, like responsive page size or images in dark
mode. The question is whether to use it by default, or just by option. What
speaks for default use is that, as Nasser noted, most users use the default
settings and have no idea how to solve such problems. For users who want to
use a custom style, we could provide an option that would ignore the default
styles.

___

Reply to this item at:

  

___
  Message sent via/by Puszcza
  http://puszcza.gnu.org.ua/



Re: [tex4ht] [bug #592] inconsistent font sizes used for subsubsection/paragraph titles in tex4ht. How to fix?

2023-01-01 Thread Michal Hoftich
> Looking at it, it looks like font for paragprah is same size
> as the text font size body of page but in bold font.
>

Yes, paragraph should be in the same size, as the following text
continues at the same line as the paragraph title.


[tex4ht] [bug #592] inconsistent font sizes used for subsubsection/paragraph titles in tex4ht. How to fix?

2023-01-01 Thread Michal Hoftich
Follow-up Comment #3, bug #592 (project tex4ht):

I agree that it is really strange  that  and  are smaller than 1em. I
think we should still use correct heading levels, for semantic and
accessibility reasons. As only \subsubsection uses such small font size, I
think we can just set font size for this element to 1em. 

And maybe we can also provide some option to request a nicer default CSS.

___

Reply to this item at:

  

___
  Message sent via/by Puszcza
  http://puszcza.gnu.org.ua/



Re: [tex4ht] [bug #592] inconsistent font sizes used for subsubsection/paragraph titles in tex4ht. How to fix?

2023-01-01 Thread Nasser M. Abbasi

On 1/1/2023 3:33 PM, Karl Berry wrote:

Follow-up Comment #2, bug #592 (project tex4ht):

To my mind, this is a bug in the browser(s). Browsers should not render any
 tag as less than the body size. That's nonsensical.

But given that reality, and that it's unlikely to change, my suggestion for
tex4ht is to avoid h5 and h6, since they are useless, and just use h4 for all
those lower-level sectioning elements. Maybe with a class="subsubsection" or
whatever so they can be distinguished if anyone cares to.

This seems cleaner to me than specifying explicit sizes for everything.



Hello;

I looked this up and it says

http://zuga.net/articles/html-heading-elements/

"The W3C HTML5 specification describes six HTML
heading elements: h1, h2, h3, h4, h5 and h6.  ref
The height of a heading element is specified in the
browser's default stylesheet. See col 4 below.  ref

The height of 1 em is usually 16 pixels.

The em is a unit of measure from the field of printed type,
and is equal to the width of the letter M"

And then it gives table of example header for each hN with default
size.

h1  font-size: 2em
h2  font-size: 1.5em
h3  font-size: 1.17em
h4  font-size: 1em
h5  font-size: .83em
h6  font-size: .67em

I've compile the MWE with only Michal fix in my.cfg and this is the result
to compare the font sizes with normal text font ib body

https://12000.org/tmp/01012023/foo.htm

Looking at it, it looks like font for paragprah is same size
as the text font size body of page but in bold font.

This look OK, right?

--Nasser


[tex4ht] [bug #592] inconsistent font sizes used for subsubsection/paragraph titles in tex4ht. How to fix?

2023-01-01 Thread Karl Berry
Follow-up Comment #2, bug #592 (project tex4ht):

To my mind, this is a bug in the browser(s). Browsers should not render any
 tag as less than the body size. That's nonsensical.

But given that reality, and that it's unlikely to change, my suggestion for
tex4ht is to avoid h5 and h6, since they are useless, and just use h4 for all
those lower-level sectioning elements. Maybe with a class="subsubsection" or
whatever so they can be distinguished if anyone cares to.

This seems cleaner to me than specifying explicit sizes for everything.



___

Reply to this item at:

  

___
  Message sent via/by Puszcza
  http://puszcza.gnu.org.ua/



Re: [tex4ht] [bug #592] inconsistent font sizes used for subsubsection/paragraph titles in tex4ht. How to fix?

2023-01-01 Thread Nasser M. Abbasi

On 1/1/2023 2:49 PM, Michal Hoftich wrote:

as it is
preferable if users set high level design elements themselves


The way I look at it, I use tex4ht to convert latex to HTML
so I do not have to know any HTML or Css commands.

So the more this process is automated, with as little need for
one to add any special extra HTML/Css code themselves, the
better it is. I know sometimes this is not possible all the time.

(99.99% of Latex users would not know these Css commands anyway)

So if this fix could be automated/buildin in tex4ht, that
would be better I think.

Is the issue is what font sizes to use?  Will not your nice
solution which I tested on small document and now testing on
a very large document

\Css{.partHead { font-size: 2em; }}
\Css{.chapterHead { font-size: 1.7411em; }}
\Css{.sectionHead { font-size: 1.5157em; }}
\Css{.subsectionHead { font-size: 1.3195em; }}
\Css{.subsubsectionHead { font-size: 1.1487em; }}

work for all cases?

or do you mean this might not be a universal solution?
If not, then the user can override it if they want in the
.cfg file they use. Right?

So why not have it build-in?  This way every user gets
the benefit of it.

Thank you,
--Nasser




[tex4ht] [bug #592] inconsistent font sizes used for subsubsection/paragraph titles in tex4ht. How to fix?

2023-01-01 Thread Michal Hoftich
Follow-up Comment #1, bug #592 (project tex4ht):

I've posted my solution at TeX.sx. It is just a matter of few lines of CSS. I
am not sure if it is good idea to add it to TeX4ht sources, as it is
preferable if users set high level design elements themselves, IMHO. But it is
true that it is not really good that \subsubsection is rendered that small,
and lot of people will not try to fix that. 

So that is my question: should we set default sizes for sectioning commands?

___

Reply to this item at:

  

___
  Message sent via/by Puszcza
  http://puszcza.gnu.org.ua/



Re: [tex4ht] [bug #592] inconsistent font sizes used for subsubsection/paragraph titles in tex4ht. How to fix?

2023-01-01 Thread Nasser M. Abbasi



copy/paste error. Forgeot the document class when copying.

MWE should be

--
\documentclass{book}

\setcounter{tocdepth}{5}
\setcounter{secnumdepth}{5}

\begin{document}
\title{my book title}
\author{me}
\date{\today}
\maketitle

\part{first part}
\chapter{first chapter}
\section{first section}
\subsection{first subsection}
\subsubsection{first subsubsection}
\paragraph{first paragraph}

\end{document}
-

On 1/1/2023 12:28 PM, Nasser M. Abbasi wrote:

URL:
   

  Summary: inconsistent font sizes used for
subsubsection/paragraph titles in tex4ht. How to fix?
  Project: tex4ht
 Submitted by: nma123
 Submitted on: Sun Jan  1 18:28:48 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 shot at

https://tex.stackexchange.com/questions/670328/inconsistent-font-sizes-used-for-subsubsection-paragraph-titles-in-tex4ht-how-t

I noticed in tex4ht that the size of the font used for the paragraph title is
the same as that of the section title (i.e. too large) and the size of the
font for the subsubsection is smaller than that used for the paragraph, which
it should be larger or at least the same size.

This makes looking at titles confusing as font size gives indication of
order.

The font size should decrease all the way from chapter to paragraph. Now it
decreases but then starts to increase once it reaches paragraph.

in PDF, it is consistent, as the sizes decrease correctly from chapter to
paragraph. Screen shots below

MWE

--
\begin{document}
\title{my book title}
\author{me}
\date{\today}
\maketitle

\part{first part}
\chapter{first chapter}
\section{first section}
\subsection{first subsection}
\subsubsection{first subsubsection}
\paragraph{first paragraph}

\end{document}
---


Compiled using

make4ht -ulm default -a debug  foo.tex 'mathjax,htm'

Gives

   enter image description here

Compare to the pdf where the sizes decreases uniformly (but hard to see if
font used for paragraph is smaller or same as subsubsection, but at least it
is not larger like with the HTML)

   enter image description here

Question is: How to make the size of the font used for paragraph title with
tex4ht not be larger than subsubsection? Is there a way to control these
settings?

TL 2022





 ___

Reply to this item at:

   

___
   Message sent via/by Puszcza
   http://puszcza.gnu.org.ua/





[tex4ht] [bug #592] inconsistent font sizes used for subsubsection/paragraph titles in tex4ht. How to fix?

2023-01-01 Thread Nasser M. Abbasi
URL:
  

 Summary: inconsistent font sizes used for
subsubsection/paragraph titles in tex4ht. How to fix?
 Project: tex4ht
Submitted by: nma123
Submitted on: Sun Jan  1 18:28:48 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 shot at

https://tex.stackexchange.com/questions/670328/inconsistent-font-sizes-used-for-subsubsection-paragraph-titles-in-tex4ht-how-t

I noticed in tex4ht that the size of the font used for the paragraph title is
the same as that of the section title (i.e. too large) and the size of the
font for the subsubsection is smaller than that used for the paragraph, which
it should be larger or at least the same size.

This makes looking at titles confusing as font size gives indication of
order.

The font size should decrease all the way from chapter to paragraph. Now it
decreases but then starts to increase once it reaches paragraph.

in PDF, it is consistent, as the sizes decrease correctly from chapter to
paragraph. Screen shots below

MWE

--
\begin{document}
\title{my book title}
\author{me}
\date{\today}
\maketitle

\part{first part}
\chapter{first chapter}
\section{first section}
\subsection{first subsection}
\subsubsection{first subsubsection}
\paragraph{first paragraph}

\end{document}
---


Compiled using

make4ht -ulm default -a debug  foo.tex 'mathjax,htm'

Gives

  enter image description here

Compare to the pdf where the sizes decreases uniformly (but hard to see if
font used for paragraph is smaller or same as subsubsection, but at least it
is not larger like with the HTML)

  enter image description here

Question is: How to make the size of the font used for paragraph title with
tex4ht not be larger than subsubsection? Is there a way to control these
settings?

TL 2022





___

Reply to this item at:

  

___
  Message sent via/by Puszcza
  http://puszcza.gnu.org.ua/