1

i am now trying to convert .tex file to HTML and then to word, but there is problem about figure.

if you want debug such file, four other file are needed. they are

1 iopams, latex style file 2 iopart, latex class file 3 iopart10.clo , clo file 4 iopart12.clo, clo file. they can be found from the Institure of physics(IOP) journal fomrat.

The source file is

\documentclass[12pt]{iopart}

\newcommand{\gguide}{{\it Preparing graphics for IOP journals}}


\newcommand{\tablecell}[2][c]{\begin{tabular}[#1]{@{}l@{}}#2\end{tabular}}
%\let\oldtabular\tabular 
%\renewcommand{\tabular}{\footnotesize\oldtabular}


\usepackage{epstopdf}
\usepackage{subfigure}
\usepackage{cite}
\usepackage{multirow}
\usepackage{graphicx}

%\usepackage{units}
%\usepackage[version=3]{mhchem}
\usepackage{iopams}

\usepackage{adjustbox}

\usepackage{upgreek}

\begin{document}

\title[]{ How to change tex into html and then to word}
\author{Tex$^1$}
\address{$^1$Online investigator}
\begin{abstract}
The main problem here is as listed: 1, the figure can not be changed well engough, 2 the tabe is also not so good 3, espeially is the refrence list that can not be listed one by one. 
speccial character test N$_2$(C $^3\it{\Pi}$ - B $^3\it{\Pi}$) 

\end{abstract}

%Uncomment for PACS numbers title message
%\pacs{00.00, 20.00, 42.10}
% Keywords required only for MST, PB, PMB, PM, JOA, JOB?
%\vspace{2pc}
%\noindent{\it Keywords}: Article preparation, IOP journals
% Uncomment for Submitted to journal title message
%\submitto{\JPA}
% Comment out if separate title page not required
\maketitle

\section{Introduction}
here in the introduction part, the reference list is tested. the reference is  \cite{nie2007self, itoh2014hexagonal, purwins2014synergetic}.
I’ve never seen a big gas flare up close. engine running at full tilt. Then there’s the bludgeoning waves of heat, the intense brightness of the flame and the fine mist of oily droplets that drift from it \ref{Tabletest}.


\begin{table}[tbph]
\centering
\caption{\label{Tabletest} {\scriptsize\rm Table caption.}}
\begin{indented}
\lineup

\item[]\begin{tabular}{@{}cll}

\br

 &{\scriptsize\rm A}&{\scriptsize\rm B}\\
\mr
{\scriptsize\rm AC} &{\scriptsize\rm\tablecell{Item A \cite{gurevich2003concentric}\\ Item B }   }&  {\scriptsize\rm\tablecell{Item C \\to be continue }}
\\
\mr
{\scriptsize\rm DC} &{\scriptsize\rm\tablecell{CBLD\cite{schoenbach2004self} \\ItemE \\Item F on anode } }&{\scriptsize\rm\tablecell{Item G\\to be continue  and without}}
\\

\br
\end{tabular}

\end{indented}
\end{table}


Above is the table 

\section{Results and discussions} 

\subsection{To be discussed A}
\label{OESAxially}


\begin{figure}[h]
\centering
\subfigure[]{
\includegraphics[width=0.45 \textwidth]{pdffigure//Plasmaimage1.pdf}
\label{PictureofPlasmajet}
}
\subfigure[]{
\includegraphics[width=0.45 \textwidth]{pdffigure//SpatialEmissionPPicxorignial.pdf}
\label{EmissionPicture}
}
\caption{(a) is the picuture to be tested (b) is the picture to be tested.}
\label{Emission}
\end{figure}


Here the picture to be tested is in figure \ref{PictureofPlasmajet}. And also the picuture b is also tested in figure \ref{EmissionPicture}. 


 At each station, the compressors use fuel, usually 1 – 2\% of the gas which is being transported. Burning this fuel creates its own carbon emissions. For a line of several thousand kilometres, say from the Urals to Western Europe, this fuel use and its associated emissions can be substantial. In addition, there may be leakage of methane from points on the line, particularly if the pipe is old or poorly maintained.

the equation is as list 
\begin{equation}
\label{ElectricCurrent}
j = en_{\rm e}\mu_{\rm e}E
\end{equation}

\subsection{Sub section C}
\subsubsection{The layer to be tested}


This is subsubsection A


\subsubsection{Subsubsection}
This is subsubsection B

\section{Conclusions}
It is better to convert the tex to word form by the command 

htlatex, 

bibtex, 

htlatex. 

it is better to set the configuration format. 


\section*{Acknowledgments}
Thanks for all the contributor to the work 

\section*{References}
\bibliography{BibloIndex}
\bibliographystyle{iopart-num}

\end{document}

The reference bib tex file is

@article{nie2007self,
  title={Self-organized pattern formation of an atmospheric pressure plasma jet in a dielectric barrier discharge configuration},
  author={Nie, Qiu-Yue and Ren, Chun-Sheng and Wang, De-Zhen and Li, Shou-Zhe and Zhang, Jia-Liang and Kong, Michael G},
  journal={Applied physics letters},
  volume={90},
  number={22},
  pages={221504},
  year={2007},
  publisher={AIP}
}


@article{itoh2014hexagonal,
  title={Hexagonal arrayed patterns with bright and dark spots observed in a compact plasma reactor based on a piezoelectric transformer},
  author={Itoh, H and Suzuki, S},
  journal={Plasma Sources Science and Technology},
  volume={23},
  number={5},
  pages={054014},
  year={2014},
  publisher={IOP Publishing}
}

@article{gurevich2003concentric,
  title={Concentric-ring patterns in a dielectric barrier discharge system},
  author={Gurevich, EL and Zanin, AL and Moskalenko, AS and Purwins, H-G},
  journal={Physical review letters},
  volume={91},
  number={15},
  pages={154501},
  year={2003},
  publisher={APS}
}

@article{schoenbach2004self,
  title={Self-organization in cathode boundary layer microdischarges},
  author={Schoenbach, Karl H and Moselhy, Mohamed and Shi, Wenhui},
  journal={Plasma Sources Science and Technology},
  volume={13},
  number={1},
  pages={177},
  year={2004},
  publisher={IOP Publishing}
}

I use the code to convert the tex file to HTML file the order is as listed

htlatex Test.tex bibtex Test.tex htlatex Test.tex

There are problems about the reference

1 Nie Q Y, Ren C S, Wang D Z, Li S Z, Zhang J L and Kong M G 2007 Applied physics letters 90 221504 [2] Itoh H and Suzuki S 2014 Plasma Sources Science and Technology 23 054014 [3] Gurevich E, Zanin A, Moskalenko A and Purwins H G 2003 Physical review letters 91 154501 [4] Schoenbach K H, Moselhy M and Shi W 2004 Plasma Sources Science and Technology 13 177

however the reference should be in new line for each reference, like the example below

1 Nie Q Y, Ren C S, Wang D Z, Li S Z, Zhang J L and Kong M G 2007 Applied physics letters 90 221504

[2] Itoh H and Suzuki S 2014 Plasma Sources Science and Technology 23 054014

[3] Gurevich E, Zanin A, Moskalenko A and Purwins H G 2003 Physical review letters 91 154501

[4] Schoenbach K H, Moselhy M and Shi W 2004 Plasma Sources Science and Technology 13 177

also there is error about the figures because i used pdf figure i also ask similar problem before. table and biblography problem using Htlatex to generate HTML file

0

For the PDF image support, please update your TeX Live distribution, it have been added last week. The main issue is that you use the iopart class, which is not included in TeX distributions and obviously isn't supported by tex4ht. It seems that it redefines lot of standard LaTeX commands in non-compatible way, so it is no surprise that some things don't work correctly.

First of all, we need to create dummy configuration file for iopart which will load basic tex4ht definitions, iopart.4ht:

\input article.4ht

\Hinput{iopart}

\endinput

More configurations should go here, but it suffices for the beginning. I had to modify your document to compile without errors, most notably \maketitle causes fatal error, other errors are caused by \br commands:

\documentclass[12pt]{iopart}

\newcommand{\gguide}{{\it Preparing graphics for IOP journals}}


\newcommand{\tablecell}[2][c]{\begin{tabular}[#1]{@{}l@{}}#2\end{tabular}}
%\let\oldtabular\tabular 
%\renewcommand{\tabular}{\footnotesize\oldtabular}


\usepackage{epstopdf}
\usepackage{subfigure}
\usepackage{cite}
\usepackage{multirow}
\usepackage{graphicx}

%\usepackage{units}
%\usepackage[version=3]{mhchem}
\usepackage{iopams}

\usepackage{adjustbox}

\usepackage{upgreek}

\begin{document}

\title{ How to change tex into html and then to word}
\author{Tex}
\address{Online investigator}
\begin{abstract}
The main problem here is as listed: 1, the figure can not be changed well engough, 2 the tabe is also not so good 3, espeially is the refrence list that can not be listed one by one. 
speccial character test N$_2$(C $^3\it{\Pi}$ - B $^3\it{\Pi}$) 

\end{abstract}

%Uncomment for PACS numbers title message
\pacs{00.00, 20.00, 42.10}
 Keywords required only for MST, PB, PMB, PM, JOA, JOB?
\vspace{2pc}
\noindent{\it Keywords}: Article preparation, IOP journals
% Uncomment for Submitted to journal title message
\submitto{\JPA}
% Comment out if separate title page not required
% \maketitle

\section{Introduction}
here in the introduction part, the reference list is tested. the reference is  \cite{nie2007self, itoh2014hexagonal, purwins2014synergetic}.
I’ve never seen a big gas flare up close. engine running at full tilt. Then there’s the bludgeoning waves of heat, the intense brightness of the flame and the fine mist of oily droplets that drift from it \ref{Tabletest}.


\begin{table}[tbph]
\centering
\caption{\label{Tabletest} {\scriptsize\rm Types of plasma device with formed self-organized patterns.}}
\begin{indented}
\lineup

\item[]
  \begin{tabular}{@{}cll}

% \br

 &{\scriptsize\rm A}&{\scriptsize\rm B}\\
\mr
{\scriptsize\rm AC} &{\scriptsize\rm\tablecell{Item A \cite{gurevich2003concentric}\\ Item B }   }&  {\scriptsize\rm\tablecell{Item C \\to be continue }}
\\
\mr
{\scriptsize\rm DC} &{\scriptsize\rm\tablecell{CBLD\cite{schoenbach2004self} \\ItemE \\Item F on anode } }&{\scriptsize\rm\tablecell{Item G\\to be continue  and without}}
\\

% \br
\end{tabular}

\end{indented}
\end{table}


Above is the table 

\section{Results and discussions} 

\subsection{To be discussed A}
\label{OESAxially}


\begin{figure}[h]
\centering
\subfigure[]{
\includegraphics[width=0.45 \textwidth]{pdffigure//Plasmaimage1.pdf}
\label{PictureofPlasmajet}
}
\subfigure[]{
\includegraphics[width=0.45 \textwidth]{pdffigure//SpatialEmissionPPicxorignial.pdf}
\label{EmissionPicture}
}
\caption{(a) is the picuture to be tested (b) is the picture to be tested.}
\label{Emission}
\end{figure}


Here the picture to be tested is in figure \ref{PictureofPlasmajet}. And also the picuture b is also tested in figure \ref{EmissionPicture}. 


 At each station, the compressors use fuel, usually 1 – 2\% of the gas which is being transported. Burning this fuel creates its own carbon emissions. For a line of several thousand kilometres, say from the Urals to Western Europe, this fuel use and its associated emissions can be substantial. In addition, there may be leakage of methane from points on the line, particularly if the pipe is old or poorly maintained.

the equation is as list 
\begin{equation}
\label{ElectricCurrent}
j = en_{\rm e}\mu_{\rm e}E
\end{equation}

\subsection{Sub section C}
\subsubsection{The layer to be tested}


This is subsubsection A


\subsubsection{Subsubsection}
This is subsubsection B

\section{Conclusions}
It is better to convert the tex to word form by the command 

htlatex, 

bibtex, 

htlatex. 

it is better to set the configuration format. 


\section*{Acknowledgments}
Thanks for all the contributor to the work 

\section*{References}
\bibliography{BibloIndex}
\bibliographystyle{iopart-num}

\end{document}

There are also lots of obsolete commands like \rm, \it etc. I didn't remove them, but they should be avoided generally.

This is the result:

enter image description here

I don't understand why there is a spurious 3 above the third section, but I suspect that it is caused by some iopart redefinition of standard macros.

  • thanks greatly. at least this is the answer i want. i would figure it out later. The question is how you use the iopart.4ht file? i create a such file and put it in current file path then run htlatex test.tex;bibtex test.tex is OK? for the \br, i also found the erro when debug it. it is because of the newcommand definiation i think, because it is redifned as \bhine. but i don't have error from \makeit. anyway your answer is of great help for me to understand this conversion mechanism. – shqiang Oct 24 '17 at 15:18
  • @shqiang yes, you may put it to the same directory as your document for the beginning. It surely needs more configurations, because there is lot of things that are broken. – michal.h21 Oct 24 '17 at 15:21
  • could you take a look at my new post if you have time ?@michal.h21 tex.stackexchange.com/questions/397863/… – shqiang Oct 24 '17 at 19:20

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.