[tex4ht-commits] [SCM] tex4ht updated: r356 - trunk/doc/tex4ht-doc

michal_h21 at gnu.org.ua michal_h21 at gnu.org.ua
Fri Dec 8 15:14:09 CET 2017


Author: michal_h21
Date: 2017-12-08 16:14:09 +0200 (Fri, 08 Dec 2017)
New Revision: 356

Modified:
   trunk/doc/tex4ht-doc/config.cfg
   trunk/doc/tex4ht-doc/tex4ht-doc.tex
   trunk/doc/tex4ht-doc/tex4ht-styles.sty
Log:
Added HTML code for basic example

Modified: trunk/doc/tex4ht-doc/config.cfg
===================================================================
--- trunk/doc/tex4ht-doc/config.cfg	2017-12-08 13:07:04 UTC (rev 355)
+++ trunk/doc/tex4ht-doc/config.cfg	2017-12-08 14:14:09 UTC (rev 356)
@@ -3,6 +3,8 @@
 \Configure{@HEAD}{\HCode{<link rel="stylesheet" type="text/css" href="style.css">}}
 \Configure{texttt}{\HCode{<code>}\NoFonts}{\EndNoFonts\HCode{</code>}}
 \ConfigureEnv{texsource}{\ifvmode\IgnorePar\fi\EndP\HCode{<code>}}{\ifvmode\IgnorePar\fi\EndP\HCode{</code>}}{}{}
+\ConfigureEnv{shellcommand}{\ifvmode\IgnorePar\fi\EndP\HCode{<code>}}{\ifvmode\IgnorePar\fi\EndP\HCode{</code>}}{}{}
+\ConfigureEnv{htmlsource}{\ifvmode\IgnorePar\fi\EndP\HCode{<code>}}{\ifvmode\IgnorePar\fi\EndP\HCode{</code>}}{}{}
 
 \begin{document}
 \EndPreamble

Modified: trunk/doc/tex4ht-doc/tex4ht-doc.tex
===================================================================
--- trunk/doc/tex4ht-doc/tex4ht-doc.tex	2017-12-08 13:07:04 UTC (rev 355)
+++ trunk/doc/tex4ht-doc/tex4ht-doc.tex	2017-12-08 14:14:09 UTC (rev 356)
@@ -98,12 +98,12 @@
 
 Basic template for \file{tex4ht-4ht.tex}
 
+% examples/basicpackage/sample.4ht
 \begin{texsource}
 \<sample.4ht\><<<
 % sample.4ht (|version), generated from |jobname.tex
 % Copyright 2017 TeX Users Group
 |<TeX4ht license text|>
-
 \NewConfigure{hello}{2}
 \pend:def\hello{\a:hello}
 \append:def\hello{\b:hello}
@@ -127,6 +127,8 @@
 
 The configuration for \HTML\ must be placed in the \file{tex4ht-html4.tex} file:
 
+
+% examples/basicpackage/config.cfg
 \begin{texsource}
 \<configure html4 sample\><<<
 \Configure{hello}{\HCode{<span class="hello">}}{\HCode{</span>}}
@@ -135,15 +137,42 @@
 \end{texsource}
 
 The configuration for a package must be placed in \texcommand{\<configure html4 packagename\>} block.
+% ToDo: write more info
 
 
-
 The package name must be also included in \file{mktex4ht-cnf.tex}:
 
 \begin{texsource}
 \AddFile{9}{sample}
 \end{texsource}
 
+The \file{.4ht} files can be generated simply using 
+
+\begin{shellcommand}
+make
+\end{shellcommand}
+
+command.
+
+The following sample \TeX\ file:
+
+
+% examples/basicpackage/hello.tex
+\begin{texsource}
+\documentclass{article}
+\usepackage{sample}
+\begin{document}
+  \hello\ world.
+\end{document}
+\end{texsource}
+
+Produces a following \HTML\ code:
+
+\begin{htmlsource}
+<!--l. 4--><p class="noindent" >
+<span class="hello">world</span> world. 
+</p> 
+\end{htmlsource}
 \chapter{Glossary}
 \chapter{Bibliography}
 \chapter{Index}

Modified: trunk/doc/tex4ht-doc/tex4ht-styles.sty
===================================================================
--- trunk/doc/tex4ht-doc/tex4ht-styles.sty	2017-12-08 13:07:04 UTC (rev 355)
+++ trunk/doc/tex4ht-doc/tex4ht-styles.sty	2017-12-08 14:14:09 UTC (rev 356)
@@ -16,7 +16,11 @@
 % https://tex.stackexchange.com/a/45292/2891
 \NewDocumentCommand\texcommand{v}{\texttt{#1}}
 
-\lstnewenvironment{texsource}{\lstset{language=TeX}}{}
+\lstnewenvironment{texsource}{\lstset{language=TeX,escapechar=*}}{}
+\lstnewenvironment{htmlsource}{\lstset{language=HTML,escapechar=*}}{}
+\lstnewenvironment{shellcommand}{\lstset{language=bash}}{}
 \newcommand\texinput[1]{\lstinputlisting[language=TeX]{#1}}
 
+
+
 \endinput



More information about the tex4ht-commits mailing list