I try to configure the below xml structure through TeX4Ht

<fig id="fig_ch1_001">
<label>Figure 1.1</label>
<caption><title>Sample Text</title></caption>
<graphic xlink:href="demo.eps"/>


\caption{Sample Text}


\ConfigureEnv{figure}{\ifvmode\IgnorePar\fi \EndP\HCode{<fig id="fig_ch\thechapter_\thefigure">}%
                      \HtmlParOff\bgroup \Configure{float}{\ShowPar}{}{}}


  {\HCode{<graphic xlink:href="\Gin@base\Gin@ext}}

I getting the correct output for figure environment and caption but in the image part, i am getting the wrong output as expected (i tried to modify in the \Configure{graphics}).

How to configure IMG part with the exact figure name `' ?

if we change `IMG' it will affect the equation image conversion?

  • the eps file is converted to png. do you want to use the generated png, or rather stick with original eps?
    – michal.h21
    May 12 '17 at 10:02
  • @michal no need to convert png, we need to retain as eps for later usage.
    – vctu
    May 12 '17 at 11:03

Try the following configuration:

  \HCode{<graphic xling:href="\Gin@base\Gin@ext" ></graphic>}%
  \special{t4ht+@File: \Gin@base\Gin@ext}%

This configuration will <graphic> element at every \includegraphics, it won't do any conversions of the required image. You need to use \Configure{graphics*}{extension} for each graphic format you want to support.

This is the result:

   <fig id="fig_ch0_0">


<graphic xling:href="demo.eps" ></graphic>
<label>Figure 1</label><caption><title>Sample Text</title></caption>


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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