使用 htlatex 和 bibtex 转换为 html 然后转换为 word 时出现的问题

使用 htlatex 和 bibtex 转换为 html 然后转换为 word 时出现的问题

我现在正尝试将 .tex 文件转换为 HTML,然后转换为 word,但存在图形问题。

如果要调试此类文件,则需要另外四个文件。它们是

1 iopams,latex 样式文件 2 iopart,latex 类文件 3 iopart10.clo,clo 文件 4 iopart12.clo,clo 文件。它们可以从英国物理学会(IOP)期刊格式中找到。

源文件是

\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}

参考 bib tex 文件是

@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}
}

我使用代码将 tex 文件转换为 HTML 文件,顺序如下所列

htlatex 测试.tex bibtex 测试.tex htlatex 测试.tex

引用存在问题

1Nie QY、Ren CS、Wang DZ、Li SZ、Zhang JL 和 Kong MG 2007 应用物理快报 90 221504 [2] Itoh H 和 Suzuki S 2014 等离子体源科学与技术 23 054014 [3] Gurevich E、Zanin A、Moskalenko A 和 Purwins HG 2003 物理评论快报 91 154501 [4] Schoenbach KH、Moselhy M 和 Shi W 2004 等离子体源科学与技术 13 177

但是,每个引用都应该另起一行,如下例所示

1Nie QY、Ren CS、Wang DZ、Li SZ、Zhang JL 和 Kong MG 2007 应用物理快报 90 221504

[2] Itoh H 和 Suzuki S 2014 等离子体源科学与技术 23 054014

[3] Gurevich E, Zanin A, Moskalenko A 和 Purwins HG 2003 物理评论快报 91 154501

[4] Schoenbach KH、Moselhy M 和 Shi W,2004,等离子体源科学与技术,13,177

另外,由于我使用了 pdf 图表,所以图表中也有错误,我之前也问过类似的问题。 使用Htlatex生成HTML文件的表格和参考书目问题

答案1

对于 PDF 图像支持,请更新您的 TeX Live 发行版,该功能已于上周添加。主要问题是您使用的iopart类未包含在 TeX 发行版中,并且显然不受支持tex4ht。它似乎以不兼容的方式重新定义了许多标准 LaTeX 命令,因此某些功能无法正常工作也就不足为奇了。

首先,我们需要创建虚拟配置文件来iopart加载基本tex4ht定义iopart.4ht

\input article.4ht

\Hinput{iopart}

\endinput

这里应该有更多配置,但这对于开始来说已经足够了。我不得不修改你的文档才能编译时不出错,最明显的是导致致命错误,其他错误是由命令\maketitle引起的:\br

\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}

还有许多过时的命令,如\rm\it。我没有删除它们,但一般应该避免使用它们。

结果如下:

在此处输入图片描述

我不明白为什么第三部分上方会出现杂散3,但我怀疑它是由某些iopart标准宏的重新定义引起的。

相关内容