1

I am looking for a place to find how to configure the \bibitem tag in tex4ebook/make4ht. All bibitems are inlined without </br>

I tried: {\Configure{bibitem}{\NoFonts \HCode{</br>}}{}\EndNoFonts}}

but the result is:

<a id="Q1-5-19"></a>1</br>X1García, P. A., <span class="p1xi-">Compen....

I would like something like

</br> <a id="Q1-5-19"></a>1X1García, P. A., <span class="p1xi-">Compen....

or inside some p or div or...

=================== act 2 =======================

i narrow the problem : 2 version : 1 with <p>

\documentclass{book}
\usepackage[french]{babel}
\usepackage{pxfonts} 
\begin{document}
oh \cite{1} aahhh
\begin{thebibliography}{99}
\bibitem{1}Sample Bib text
\bibitem{2}Sample Bib text
\end{thebibliography}
\end{document}

with the p tag

1 without <p>

\documentclass{book}
\usepackage[french]{babel}
\usepackage{pxfonts} 
\usepackage{titlesec}
\titleformat{\chapter}
[block]
{\normalfont\huge\bfseries \scshape \flushleft}
{\thechapter.}{0pt}{\hspace{5pt}\huge \bfseries \scshape}
\titlespacing*{\chapter}{0pt}{0pt}{20pt}
\begin{document}
 oh \cite{1} aahhh
 \begin{thebibliography}{99}
 \bibitem{1}Sample Bib text
 \bibitem{2}Sample Bib text
 \end{thebibliography}
 \end{document}

same without p tag

the problem is that i need the chapter thing in my document to format how chapter appears in the pdf and in the epub

2
  • 1
    We need a sample document
    – michal.h21
    Sep 21, 2018 at 13:12
  • i don't understand.. it seems working...
    – herve_02
    Sep 21, 2018 at 18:50

1 Answer 1

1

The issue is caused by your titlesec configuration for \chapter. In particular, the line:

{\normalfont\huge\bfseries \scshape \flushleft}

The \flushleft command starts a list environment that overwrites tex4ht configuration for the bibliography, which is also a list environment. For use as a text switch, \raggedright is the correct command to use. So your TeX file should look like this:

\documentclass{book}
\usepackage[french]{babel}
\usepackage{pxfonts} 
\usepackage{titlesec}

\titleformat{\chapter}
[block]
{\normalfont\huge\bfseries \scshape\flushleft}
{\thechapter.}{0pt}{\hspace{5pt}\huge \bfseries \scshape}
\titlespacing*{\chapter}{0pt}{0pt}{20pt}
\begin{document}
\chapter{hello}

world

 oh \cite{1} 

 \begin{thebibliography}{99}
   % \expandafter\show\csname a:bibitem\endcsname
 \bibitem{1}Sample Bib text
 \bibitem{2}Sample Bib text
 \end{thebibliography}

 \end{document}

This is the result:

 <h2 class="likechapterHead"><a 
 id="x1-20001"></a>Bibliographie</h2>
    <div class="thebibliography">
    <p class="bibitem" ><span class="biblabel">
  [1]<span class="bibsp">   </span></span><a 
 id="X1"></a>Sample Bib text
    </p>
    <p class="bibitem" ><span class="biblabel">
  [2]<span class="bibsp">   </span></span><a 
 id="X2"></a>Sample Bib text</p></div>

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .