Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I have an exact problem as this post. I have checked the answers there, and found a probable reply here. Sad that I am in linux, and cannot use bat file.

Pasted is my latex file, which compiles well with xelatex:

\documentclass[dvipdfmx]{article}
\usepackage{fontspec}
\usepackage[pass,paperwidth=4in,paperheight=4in]{geometry}
%
%\font\serif="FreeSerif:script=beng"
\font\serifbb="SolaimanLipi:script=beng" at 16pt%
\font\deffont="Lohit-Bengali:script=beng" at 14pt%
%
\author{\serifbb {শক্তি চট্টোপাধ্যায়}}%
\title{\serifbb {যখন বৃষ্টি নামলো}}%
\date{}

\begin{document}
\deffont %Default font used for the document
\maketitle
\noindent
\begin{center}বুকের মধ্যে বৃষ্টি নামে নৌকা টলোমলো\\
কূল ছেড়ে আজ অকূলে যাই এমনও সম্বল\\
নেই নিকটে - হয়ত ছিল বৃষ্টি আসার আগে\\
চলচ্ছক্তিহীন হয়েছি, তাই কি মনে জাগে\\
পোড়োবাড়ির স্মৃতি? আমার স্বপ্নে মেশা দিন\\
চলচ্ছক্তিহীন হয়েছি, চলচ্ছক্তিহীন।
‌\vspace{.5in}\\
বৃষ্টি নামলো যখন আমি উঠোন-পানে একা,\\
দৌড়ে গিয়ে ভেবেছিলাম তোমার পাব দেখা।\\
হয়ত মেঘে-বৃষ্টিতে বা শিউলিগাছের তলে\\
আজানুকেশ ভিজিয়ে নিচ্ছো আকাশ-ছেঁচা জলে\\
কিন্তু তুমি নেই বাহিরে – অন্তরে মেঘ করে,\\
ভারি ব্যাপক বৃষ্টি আমার বুকের মধ্যে ঝরে!\end{center}
\end{document}

using xelatex, its working properly:

$ xelatex jbn.tex
...
*geometry* driver: auto-detecting
*geometry* detected driver: xetex
[1] (./jbn.aux) )
Output written on jbn.pdf (1 page).
Transcript written on jbn.log.

I tried using htxelatex:

$htxelatex trial.tex html
...
(/usr/share/texlive/texmf-dist/tex/generic/tex4ht/html4-math.4ht)) (./jbn.aux)
(/usr/share/texlive/texmf-dist/tex/latex/tipa/t3cmr.fd)

! LaTeX Error: Command `\acute' already defined in `'.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              

l.13 \begin{document}

? 

and then starts printing many things ending up with:

 [-S<image-script>]
   [-s<css-file-ext>]   default: -s4cs; multiple entries allowed
   [-t<tfm-font-dir>]
   [-u10]               base 10 for unicode characters
   [-utf8]              utf-8 encoding for unicode characters
   [-v<idv version>]    replacement for the given dvi version
   [-xs]           ms-dos file names for automatically generated gifs
/usr/bin/t4ht: fork: retry: No child processes
/usr/bin/t4ht: fork: retry: No child processes
/usr/bin/t4ht: fork: retry: No child processes
/usr/bin/t4ht: fork: retry: No child processes
/usr/bin/t4ht: fork: Resource temporarily unavailable

May I get some help?

EDIT Friends,

I have solved the ! LaTeX Error: Command ``\acute' already defined in'. problem by putting \usepackage[no-math]{fontspec}

but, no child process error is still there, and also, html's body is essentially empty: html output:

<html > 
<head><title>  </title> 
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> 
<meta name="generator" content="TeX4ht (http://www.cse.ohio-state.edu/~gurari/TeX4ht/)"> 
<meta name="originator" content="TeX4ht (http://www.cse.ohio-state.edu/~gurari/TeX4ht/)"> 
<!-- html --> 
<meta name="src" content="jbn.tex"> 
<meta name="date" content="2013-09-23 18:48:00"> 
<link rel="stylesheet" type="text/css" href="jbn.css"> 
</head><body 
>
   <div class="maketitle">



<h2 class="titleHead">  </h2>
<div class="author" > </div>
<br />
<div class="date" ></div>
   </div>
<div class="center" 
>
<!--l. 17--><p class="noindent" >
<!--l. 17--><p class="noindent" >     <br />
      <br />
       <br />
     <br />
     <br />
   <br />
     <br />
     <br />
    <br />
    <br />
       <br />
      </div>

</body></html> 

Make4ht getting error:

~/Downloads/make4ht/make4ht -u -c config -x jbn.tex 
/home/rudra/Downloads/make4ht/make4ht:11: module 'make4ht-lib' not found:
    no field package.preload['make4ht-lib']
    [kpse lua searcher] file not found: 'make4ht-lib'
    [kpse C searcher] file not found: 'make4ht-lib'

*After 2nd comment *

I have added the path, as per your instruction and this link.

 $kpsewhich -var-value TEXMFHOME
/home/rudra/texmf
$ echo $PATH
/home/rudra/texmf/scripts/lua/make4ht:

but I am still getting the same error:

$ make4ht -u -c config.cfg jbn.tex
tex4ht.c (2012-07-25-19:36 kpathsea)
tex4ht 
--- error --- improper command line
tex4ht [-f<path-separator-ch>]in-file[.dvi]
   [-.<ext>]            replacement to default file extension name .dvi
   [-c<tag name>]       choose named segment in env file
   [-e<env-file>]
   [-f<path-separator-ch>]        remove path from the file name
   [-F<ch-code>]        replacement for missing font characters; 0--255; default 0
   [-g<bitmap-file-ext>]
   [-h(e|f|F|g|s|v|V)]  trace: e-errors/warnings, f-htf, F-htf search
                            g-groups, s-specials, v-env, V-env search
   [-i<htf-font-dir>]
   [-l<bookkeeping-file>]
   [-P(*|<filter>)]     permission for system calls: *-always, filter
   [-S<image-script>]
   [-s<css-file-ext>]   default: -s4cs; multiple entries allowed
   [-t<tfm-font-dir>]
   [-u10]               base 10 for unicode characters
   [-utf8]              utf-8 encoding for unicode characters
   [-v<idv version>]    replacement for the given dvi version
   [-xs]           ms-dos file names for automatically generated gifs
/usr/bin/t4ht: fork: retry: No child processes
/usr/bin/t4ht: fork: retry: No child processes
/usr/bin/t4ht: fork: retry: No child processes
/usr/bin/t4ht: fork: retry: No child processes
/usr/bin/t4ht: fork: Resource temporarily unavailable
Parse LG
parse_lg process file: jbn.html
outdir: 
parse_lg process file: jbn.css
outdir: 
parse_lg process file: jbn.tmp
tmp file
share|improve this question
    
you must install make4ht to your local <a href="github.com/michal-h21/make4ht#instalation">texmf tree</a> –  michal.h21 Sep 24 '13 at 12:43
    
you need to use either -x or -l option to compile your document with xelatex or lualatex. But that error message is strange anyway, could you post your whole compilation log, please? –  michal.h21 Sep 24 '13 at 14:51
add comment

1 Answer 1

You may try experimental fontspec support for tex4ht. There is also some documentation. I just added support for bengali language.

With some modifications to your source file:

\documentclass[dvipdfmx]{article}
\usepackage{fontspec}
\usepackage[pass,paperwidth=4in,paperheight=4in]{geometry}
%
%\font\serif="FreeSerif:script=beng"
%\font\serifbb="SolaimanLipi:script=beng" at 16pt%
%\font\deffont="Lohit-Bengali:script=beng" at 14pt%
\newfontfamily\serifbb[Script=Bengali]{SolaimanLipi}
\newfontfamily\deffont[Script=Bengali]{Lohit-Bengali}

\author{\serifbb {শক্তি চট্টোপাধ্যায়}}%
\title{\serifbb {যখন বৃষ্টি নামলো}}%
\date{}

\begin{document}
\deffont %Default font used for the document
\maketitle
\noindent
\begin{center}বুকের মধ্যে বৃষ্টি নামে নৌকা টলোমলো\\
কূল ছেড়ে আজ অকূলে যাই এমনও সম্বল\\
নেই নিকটে - হয়ত ছিল বৃষ্টি আসার আগে\\
চলচ্ছক্তিহীন হয়েছি, তাই কি মনে জাগে\\
পোড়োবাড়ির স্মৃতি? আমার স্বপ্নে মেশা দিন\\
চলচ্ছক্তিহীন হয়েছি, চলচ্ছক্তিহীন।\vspace{.5in}\\
বৃষ্টি নামলো যখন আমি উঠোন-পানে একা,\\
দৌড়ে গিয়ে ভেবেছিলাম তোমার পাব দেখা\\
হয়ত মেঘে-বৃষ্টিতে বা শিউলিগাছের তলে\\
আজানুকেশ ভিজিয়ে নিচ্ছো আকাশ-ছেঁচা জলে\\
কিন্তু তুমি নেই বাহিরে – অন্তরে মেঘ করে,\\
ভারি ব্যাপক বৃষ্টি আমার বুকের মধ্যে ঝরে!\end{center}
\end{document}

(You must use \newfontfamily insead of \font\serifbb).

For some adjustments, use custom config file, config.cfg:

\Preamble{xhtml, NoFonts}
\renewcommand\vspace[1]{
\HCode{<div class="vspace"></div>}
}
\Css{.vspace{height:.5em;}}
\Css{img[src*=ec-lmr]{display:none;}}
\begin{document}
\EndPreamble

There is configuration for \vspace command and css declaration for hiding some unwanted images mysteriously generated by tex4ht (I said that this is experimental package!)

Unfortunately, I cannot get correct result with classical ht(xe|lua)latex scripts, so I used make4ht:

make4ht -u -c config -x trial.tex

-u switch set output file to utf-8, -c is for config file inclusion, -x is for xelatex

The result:

enter image description here

share|improve this answer
    
michal, Thanks for your reply. I have cloned make4ht. But can not build it. Can't see how to build. I tried those Make:htlatex() etc and not working. –  BaRud Sep 24 '13 at 11:49
    
you don't have to build it. you only have to clone it to local texmf dir (see github.com/michal-h21/make4ht#instalation), make file make4ht executable (chmod +x make4ht) and add make4ht dir to the path, so this script can be executed from anywhere –  michal.h21 Sep 24 '13 at 12:11
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.