% $Id: tex4ht-word.tex 65 2010-11-17 19:16:45Z karl $ % compile 3 times: latex tex4ht-word % or xhlatex tex4ht-word "html,3,sections+" % Copyright (C) 2009-2010 TeX Users Group % Copyright (C) 2000-2009 Eitan M. Gurari % Released under LPPL 1.3c+. % See tex4ht-cpright.tex for license text. %%%%%%%%%%%%%%%%%% load style files %%%%%%%%%%%%%%%%%%%%%%%%%% \ifx \HTML\UnDef \def\HTML{htmlw} \def\CONFIG{\jobname} \def\MAKETITLE{\author{Eitan M. Gurari}} \def\next{\input mktex4ht.4ht \endinput} \expandafter\next \fi \input{common.tex} \input{tex4ht-cpright.tex} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \section{Preamble} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \<<< % htmlw.4ht (|version), generated from |jobname.tex % Copyright (C) 2009-2010 TeX Users Group % Copyright (C) |CopyYear.2000. Eitan M. Gurari | >>> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \section{General} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \<<< % \Configure{Picture}{.wmf} >>> \<<< \Css{body {text-align:both;}} >>> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \section{Char Set} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \<<< \def\:temp#1#2{% \def\:tempa{#1}\ifx \languagename\:tempa \def\A:charset{#2}\ifx \A:charset\empty\else \def\A:charset{charset=#2}% \fi\fi} \:temp{afrikaans}{windows-1252} \:temp{arabic}{windows-1256} \:temp{austrian}{windows-1252} \:temp{brazilian}{windows-1252} \:temp{brazil}{windows-1252} \:temp{catalan}{windows-1252} \:temp{croatian}{windows-1251} \:temp{czech}{windows-1251} \:temp{danish}{windows-1252} \:temp{dutch}{windows-1252} \:temp{estonian}{windows-1251} \:temp{finnish}{windows-1252} \:temp{francais}{windows-1252} \:temp{frenchb}{windows-1252} \:temp{french}{windows-1252} \:temp{galician}{windows-1252} \:temp{germanb}{windows-1252} \:temp{german}{windows-1252} \:temp{greek}{windows-1253} \:temp{hebrew}{windows-1255} \:temp{hungarian}{windows-1250} \:temp{ngerman}{windows-1252} \:temp{norsk}{windows-1252} \:temp{nynorsk}{windows-1252} \:temp{polish}{windows-1252} \:temp{polutonikogreek}{windows-1253} \:temp{portuges}{windows-1252} \:temp{portuguese}{windows-1252} \:temp{romanian}{windows-1250} \:temp{russian}{windows-1251} \:temp{scottish}{windows-1252} \:temp{slovak}{windows-1250} \:temp{slovene}{windows-1250} \:temp{spanish}{windows-1252} \:temp{swedish}{windows-1252} \:temp{ukrainian}{windows-1251} \:temp{uppersorbian}{windows-1252} \:temp{welsh}{windows-1252} >>> \<<< \def\A:charset{charset=windows-1252} >>> \<<< \def\A:charset{charset=windows-1252} >>> \<<< \def\A:charset{charset=windows-1251} >>> \<<< \def\A:charset{charset=windows-1251} >>> \<<< \def\A:charset{charset=windows-1252} >>> \<<< \def\A:charset{charset=windows-1252} >>> \<<< \def\A:charset{charset=windows-1251} >>> \<<< \def\A:charset{charset=windows-1251} >>> \<<< \def\A:charset{charset=windows-1252} >>> \<<< \def\A:charset{charset=windows-1252} >>> \<<< \def\A:charset{charset=windows-1252} >>> \<<< \def\A:charset{charset=windows-1252} >>> \<<< \def\A:charset{charset=windows-1253} >>> \<<< \def\A:charset{charset=windows-1255} >>> \<<< \def\A:charset{charset=windows-1252} >>> \<<< \def\A:charset{charset=windows-1252} >>> \<<< \def\A:charset{charset=windows-1252} >>> \<<< \def\A:charset{charset=windows-1252} >>> \<<< \def\A:charset{charset=windows-1250} >>> \<<< \def\A:charset{charset=windows-1251} >>> \<<< \def\A:charset{charset=windows-1252} >>> \<<< \def\A:charset{charset=windows-1250} >>> \<<< \def\A:charset{charset=windows-1250} >>> \<<< \def\A:charset{charset=windows-1252} >>> \<<< \def\A:charset{charset=windows-1252} >>> \<<< \def\A:charset{charset=windows-1251} >>> \<<< \def\A:charset{charset=windows-1252} >>> \<<< \def\A:charset{charset=windows-1252} >>> \<<< \def\A:charset{charset=windows-1255} >>> \<<< \def\A:charset{charset=windows-1252} >>> \<<< \def\A:charset{charset=windows-1252} >>> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \section{Etc} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \<<< \Configure{toclvld} {}{} {\ifvmode \IgnorePar\fi \EndP\IgnorePar \HCode{

}\TitleMark\space\HtmlParOff} {\HCode{

}\HtmlParOn \IgnoreIndent \par} \Configure{toclvle} {}{} {\ifvmode \IgnorePar\fi \EndP\IgnorePar \HCode{

}\TitleMark\space\HtmlParOff} {\HCode{

}\HtmlParOn \IgnoreIndent \par} \Configure{toclvlf} {}{} {\ifvmode \IgnorePar\fi \EndP\IgnorePar \HCode{

}\TitleMark\space\HtmlParOff} {\HCode{

}\HtmlParOn \IgnoreIndent \par} \Configure{toclvlg} {}{} {\ifvmode \IgnorePar\fi \EndP\IgnorePar \HCode{

}\TitleMark\space\HtmlParOff} {\HCode{

}\HtmlParOn \IgnoreIndent \par} \Configure{toclvlh} {}{} {\ifvmode \IgnorePar\fi \EndP\IgnorePar \HCode{

}\TitleMark\space\HtmlParOff} {\HCode{

}\HtmlParOn \IgnoreIndent \par} \Configure{toclvli} {}{} {\ifvmode \IgnorePar\fi \EndP\IgnorePar \HCode{

}\TitleMark\space\HtmlParOff} {\HCode{

}\HtmlParOn \IgnoreIndent \par} \Configure{toclvlj} {}{} {\ifvmode \IgnorePar\fi \EndP\IgnorePar \HCode{

}\TitleMark\space\HtmlParOff} {\HCode{

}\HtmlParOn \IgnoreIndent \par} \Configure{toclvlk} {}{} {\ifvmode \IgnorePar\fi \EndP\IgnorePar \HCode{

}\TitleMark\space\HtmlParOff} {\HCode{

}\HtmlParOn \IgnoreIndent \par} \Configure{toclvll} {}{} {\ifvmode \IgnorePar\fi \EndP\IgnorePar \HCode{

}\TitleMark\space\HtmlParOff} {\HCode{

}\HtmlParOn \IgnoreIndent \par} \Css{p.MsoHeading6 {margin-top:12.0pt; margin-right:0cm; margin-bottom:3.0pt; margin-left:0cm; font-size:11.0pt;}} \Css{p.MsoHeading7 {margin-top:12.0pt; margin-right:0cm; margin-bottom:3.0pt; margin-left:0cm; font-size:12.0pt;}} \Css{p.MsoHeading8 {margin-top:12.0pt; margin-right:0cm; margin-bottom:3.0pt; margin-left:0cm; font-size:12.0pt; font-style:italic;}} \Css{p.MsoHeading9 {margin-top:12.0pt; margin-right:0cm; margin-bottom:3.0pt; margin-left:0cm; font-size:11.0pt; font-family:Arial;}} >>> \begin{verbatim} >> But they should go for h6, h7, h8 ... (which is not the case now). EG> But HTML does not recognize h* tags besides h1--h5. What we can do is EG> to set diffent CSS code there--however, I didn't see differents in EG> fonts there. -eitan This is true as far as plain html is concerned. But you can use higher h? if you are planning to convert to *.doc because word interprets h1 as heading 1 or h9 as heading 9 (presumably) as long as they are defined in normal.dot. EG> Do you know how can I inspect the content of that file? Under EG> emacs it all looks like junk. -eitan Which file do you mean? --- I suppose normal.dot. I do not think that there is a possibility to view that file (apart from looking at it with an hex editor). But you can see the result quite easily if you produce an html-file with several headings (lets say h1 to h9) and load that file into word. After saving that file in a word format (*.doc) you will realize that your headings are assigned to word's styles Heading 1 to Heading 9. Start then a new document with a different template. Let's say thesis. Copy the hole text by Edit/Select All, Edit/Copy and Edit/Paste into the new document. Then you will realize that all headings are formated according to the heading styles of the thesis template. This feature makes tex4ht even more interesting for converting latex to word. Because you can write your texts with latex, convert them to word and use then a template which is given to you by your publisher. Unfortunately, German publishers do that quite often now because nearly 90 % of all German lawyers are using word for writing their essays these days. \end{verbatim} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \section{Plain Footnotes} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \<<< \:CheckOption{fn-in}\if:Option | | \fi >>> \<<< \Configure{vfootnote} {|} {|} {|} \Css{span.MsoFootnoteReference {vertical-align:super;}} >>> \<<< \Link{fn\FNnum}{fn\FNnum-bk}\HCode{}% \ifx \FNmark\empty +\else \FNmark\fi\HCode{}\EndLink >>> \<<< | \Link{fn\FNnum-bk}{fn\FNnum}\HCode{}% \ifx \FNmark\empty +\else \FNmark\fi \space\HCode{}\EndLink >>> \<<< | >>> \<<< \Configure{HtmlPar} {\EndP\HCode{}\HCode{

}} {\EndP\HCode{}\HCode{

}} {\:xhtml{\Tg

}} {\:xhtml{\Tg

}} >>> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \section{Latex Footnotes} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \<<< \:CheckOption{fn-out}\if:Option \else \Log:Note{for offline footnotes use command line option `fn-out'} \edef\Preamble{\Preamble,fn-in} \fi >>> \<<< \:CheckOption{fn-in}\if:Option | | | \fi >>> \<<< \Configure{footnotemark} {\leavevmode |% \NoFonts \Tag{|}{}} {\EndNoFonts |% \expandafter\global\expandafter \let\csname (|-bk)\endcsname\def} >>> \<<< \Configure{footnotetext} {|% \leavevmode |% \NoFonts \Tag{|-bk}{} } {\EndNoFonts |} {\expandafter\global\expandafter \let\csname (|)\endcsname\def |} >>> \<<< \SaveEndP\global\setbox\fn:box=\vtop\bgroup\ShowPar |% \ifvoid\fn:box\else \csname unvbox\endcsname\fn:box\fi >>> \<<< \EndP\egroup\RecallEndP >>> \<<< \ifTag{|} {\expandafter\ifx\csname (|)\endcsname\def \Link{|-bk}{}% \HCode{}% \else \Link{|-bk}{|}% \HCode{}% \fi } {\expandafter\ifx\csname (|)\endcsname\def \else \Link{}{|}% \HCode{}% \fi }% >>> \<<< \ifTag{|} {\space\HCode{}\EndLink } {\expandafter\ifx\csname (|)\endcsname\def \else \space\HCode{}\EndLink \fi }% >>> \<<< |% \ifTag{|-bk} {\expandafter\ifx\csname (|-bk)\endcsname\def \Link[ |\Hnewline ]{|}{}% \else \Link[ |\Hnewline ]{|}{|-bk}% \fi } {\expandafter\ifx\csname (|-bk)\endcsname\def \else \Link[ |\Hnewline ]{}{|-bk}\fi }% >>> \<<< \ifTag{|-bk} {\expandafter\ifx\csname (|-bk)\endcsname\def \Link{|}{}% \HCode{}% \else \Link{|}{|-bk}% \HCode{}% \fi } {\expandafter\ifx\csname (|-bk)\endcsname\def \else \Link{}{|-bk} \HCode{}% \fi }% >>> \<<< \ifTag{|-bk} {\HCode{}\EndLink} {\expandafter\ifx\csname (|-bk)\endcsname\def \else \HCode{}\EndLink\fi }% >>> \<<< \Css{span.footnotetext{ font-size:80\%; font-style:italic; } } \Css{div.footnotes{border-bottom:0;}} >>> \<<< \:CheckOption{fn-in}\if:Option \Css{span.MsoFootnoteReference {vertical-align:super;}} \fi >>> \<<< fn\FNnum x\minipageNum >>> \<<< | >>> \<<< | >>> \<<< | >>> \endinput