summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/lwarp/lwarp.sty
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2018-11-19 21:54:31 +0000
committerKarl Berry <karl@freefriends.org>2018-11-19 21:54:31 +0000
commit1850a94e252ed29b333b59a110dbb5a537787d57 (patch)
treee9a0a8d95079252240316228273855ab8bcd3708 /Master/texmf-dist/tex/latex/lwarp/lwarp.sty
parentf5e9d83dcdcb9517a654c1ed8287545279f528c8 (diff)
lwarp (19nov18)
git-svn-id: svn://tug.org/texlive/trunk@49196 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/lwarp/lwarp.sty')
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp.sty834
1 files changed, 505 insertions, 329 deletions
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp.sty
index 38d80c02841..115f6dcf1e4 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp.sty
@@ -17,7 +17,7 @@
%% version 2005/12/01 or later.
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
\ProvidesPackage{lwarp}
- [2018/10/13 v0.61 Allows LaTeX to directly produce HTML5 output.]
+ [2018/11/19 v0.62 Allows LaTeX to directly produce HTML5 output.]
@@ -96,7 +96,11 @@
{Unable to patch package #1, macro #2}
{Please contact the author of the lwarp package.}
}
-
+\@ifpackageloaded{ctexpatch}{
+ \newcommand{\LWR@isolate}[1]{\null#1\null}%
+}{
+ \newcommand{\LWR@isolate}[1]{#1}%
+}
\RequirePackage{etoolbox}[2011/01/03]% v2.6 for \BeforeBeginEnvironment, etc.
\RequirePackage{xpatch}
@@ -174,6 +178,7 @@
\booltrue{LWR@origmathjax}%
}
+
\DeclareStringOption[\jobname]{BaseJobname}
\DeclareStringOption[lwarp.ist]{makeindexStyle}
@@ -293,13 +298,10 @@
\def\DefaultCutFileName{\def\CommentCutFile{comment_print.cut}}
}{}
-\excludecomment{testing}
-
\includecomment{warpall}
-\ifbool{warpingHTML}{%
-\includecomment{warpHTML}
-}
+\ifbool{warpingHTML}
+{\includecomment{warpHTML}}
{\excludecomment{warpHTML}}%
\ifbool{warpingprint}
@@ -360,10 +362,15 @@ For a possible alternative, see package(s) #2.}
\LWR@earlyloadnever{aecc}{cm-super, lmodern}
\LWR@earlyloadnever{boxedminipage}{boxedminipage2e}
\LWR@earlyloadnever{caption2}{caption}
+\@ifpackageloaded{xeCJK}{}{
+ \LWR@earlyloadnever{CJK}{ctex, xeCJK}
+ \LWR@earlyloadnever{CJKutf8}{ctex, xeCJK}
+}
\LWR@earlyloadnever{fancyheadings}{fancyhdr}
\LWR@earlyloadnever{glossary}{glossaries}
\LWR@earlyloadnever{t1enc}{fontenc, inputenc, inputenx}
\LWR@earlyloadnever{wasysym}{textcomp, amssymb, amsfonts, mnsymbol, fdsymbol}
+\LWR@loadafter{2in1}
\LWR@loadafter{2up}
\LWR@loadafter{a4}
\LWR@loadafter{a4wide}
@@ -398,6 +405,7 @@ For a possible alternative, see package(s) #2.}
\LWR@loadafter{balance}
\LWR@loadafter{bigdelim}
\LWR@loadafter{bigstrut}
+\LWR@loadafter{bitpattern}
\LWR@loadafter{blowup}
\LWR@loadafter{booklet}
\LWR@loadafter{bookmark}
@@ -472,6 +480,7 @@ For a possible alternative, see package(s) #2.}
\LWR@loadafter{fixme}
\LWR@loadafter{fixmetodonotes}
\LWR@loadafter{flafter}
+\LWR@loadafter{flippdf}
\LWR@loadafter{float}
\LWR@loadafter{floatflt}
\LWR@loadafter{floatpag}
@@ -551,6 +560,7 @@ For a possible alternative, see package(s) #2.}
\LWR@notmemoirloadafter{mparhack}
\LWR@loadafter{multirow}
\LWR@loadafter{multitoc}
+\LWR@loadafter{musicography}
\LWR@loadafter{nameref}
\LWR@loadafter{natbib}
\LWR@notmemoirloadafter{nccfancyhdr}
@@ -561,8 +571,10 @@ For a possible alternative, see package(s) #2.}
\LWR@loadafter{nonfloat}
\LWR@loadafter{nonumonpart}
\LWR@loadafter{nopageno}
+\LWR@loadafter{notespages}
\LWR@loadafter{nowidow}
\LWR@loadafter{ntheorem}
+\LWR@loadafter{octave}
\LWR@loadafter{overpic}
\LWR@loadafter{pagegrid}
\LWR@notmemoirloadafter{pagenote}
@@ -571,10 +583,12 @@ For a possible alternative, see package(s) #2.}
\LWR@loadafter{parnotes}
\LWR@notmemoirloadafter{parskip}
\LWR@loadafter{pbox}
-\LWR@loadafter{pdfrender}
+\LWR@loadafter{pdfcomment}
\LWR@loadafter{pdflscape}
+\LWR@loadafter{pdfmarginpar}
\LWR@loadafter{pdfpages}
\LWR@loadafter{pdfprivacy}
+\LWR@loadafter{pdfrender}
\LWR@loadafter{pdfsync}
\LWR@loadafter{pdftricks}
\LWR@loadafter{pdfx}
@@ -602,6 +616,7 @@ For a possible alternative, see package(s) #2.}
\LWR@loadafter{romanbarpagenumber}
\LWR@loadafter{rotating}
\LWR@loadafter{rotfloat}
+\LWR@loadafter{rviewport}
\LWR@loadafter{savetrees}
\LWR@loadafter{schemata}
\LWR@loadafter{scrextend}
@@ -612,6 +627,7 @@ For a possible alternative, see package(s) #2.}
\LWR@loadafter{section}
\LWR@loadafter{sectionbreak}
\LWR@loadafter{sectsty}
+\LWR@loadafter{semantic-markup}
\LWR@notmemoirloadafter{setspace}
\LWR@loadafter{shadow}
\LWR@notmemoirloadafter{showidx}
@@ -655,13 +671,15 @@ For a possible alternative, see package(s) #2.}
\LWR@loadafter{tocstyle}
\LWR@loadafter{todo}
\LWR@loadafter{todonotes}
+\LWR@loadafter{tram}
\LWR@loadafter{transparent}
\LWR@loadafter{trimclip}
\LWR@loadafter{trivfloat}
\LWR@loadafter{turnthepage}
-\LWR@loadafter{ulem}
+\LWR@loadafter{twoup}
\LWR@loadafter{underscore}
\LWR@loadafter{units}
+\LWR@loadafter{unitsdef}
\LWR@loadafter{upref}
\LWR@loadafter{url}
\LWR@loadafter{uspace}
@@ -679,6 +697,7 @@ For a possible alternative, see package(s) #2.}
\LWR@loadafter{wrapfig}
\LWR@loadafter{xbmks}
\LWR@loadafter{xcolor}
+\LWR@loadafter{xechangebar}
\LWR@loadafter{xellipsis}
\LWR@loadafter{xfrac}
\LWR@loadafter{xltabular}
@@ -694,7 +713,7 @@ For a possible alternative, see package(s) #2.}
\begin{warpHTML}
\ifxetexorluatex
\@ifpackageloaded{fontspec}{}{
-\usepackage[no-math]{fontspec}
+ \usepackage[no-math]{fontspec}
}
\defaultfontfeatures[\rmfamily]{Ligatures={NoCommon,TeX}}
\defaultfontfeatures[\sffamily]{Ligatures={NoCommon,TeX}}
@@ -729,6 +748,8 @@ top=1in,bottom=1in,%
\RequirePackage{xparse}
+\RequirePackage{calc}
+
\end{warpall}
\begin{warpHTML}
@@ -762,8 +783,6 @@ top=1in,bottom=1in,%
\RequirePackage{verbatim}
-\RequirePackage{calc}
-
\RequirePackage{refcount}
\RequirePackage{newfloat}
@@ -892,6 +911,8 @@ top=1in,bottom=1in,%
\IfValueTF{#2}
{\LWR@origRequirePackage{#1}[#2]}
{\LWR@origRequirePackage{#1}}
+\DeclareOption*{}%
+\ProcessOptions\relax
}
\NewDocumentCommand{\LWR@ProvidesPackageDrop}{m o}{
@@ -1187,18 +1208,6 @@ top=1in,bottom=1in,%
\let\LWR@origtextellipsis\textellipsis
-\LetLtxMacro\LWR@origtextrm\textrm
-\LetLtxMacro\LWR@origtextsf\textsf
-\LetLtxMacro\LWR@origtexttt\texttt
-\LetLtxMacro\LWR@origtextnormal\textnormal
-\LetLtxMacro\LWR@origtextbf\textbf
-\LetLtxMacro\LWR@origtextmd\textmd
-\LetLtxMacro\LWR@origtextit\textit
-\LetLtxMacro\LWR@origtextsl\textsl
-\LetLtxMacro\LWR@origtextsc\textsc
-\LetLtxMacro\LWR@origtextup\textup
-\LetLtxMacro\LWR@origemph\emph
-
\LetLtxMacro\LWR@origrmfamily\rmfamily
\LetLtxMacro\LWR@origsffamily\sffamily
\LetLtxMacro\LWR@origttfamily\ttfamily
@@ -1585,11 +1594,18 @@ span.textit, div.textit { font-style: italic; }
span.textmd, div.textmd { font-weight: normal; }
-span.textsc, div.textsc { font-variant: small-caps; }
+span.textsc, div.textsc {
+ font-variant: small-caps;
+ font-variant-numeric: oldstyle-nums ;
+}
span.textsl, div.textsl { font-style: oblique; }
-span.textup, div.textup { font-variant: normal; }
+span.textup, div.textup {
+ font-style: normal;
+ font-variant: normal;
+ font-variant-numeric: normal ;
+}
span.textrm, div.textrm {
font-family: "DejaVu Serif", "Bitstream Vera Serif",
@@ -2325,6 +2341,8 @@ figure div.minipage, figure div.minipage div.minipage {
}
*/
+figure figure { margin: 0pt }
+
figure div.minipage p { font-size: 85% ; }
figure.subfigure, figure.subtable {
@@ -2527,7 +2545,7 @@ div.published
font-variant: normal ;
font-style: italic ;
font-size: 1em ;
- margin: 3ex 0em 3ex 0em ;
+ margin: 1ex 0em 1ex 0em ;
}
div.subtitle
@@ -2536,7 +2554,7 @@ div.subtitle
font-variant: normal ;
font-style: italic ;
font-size: 1.25em ;
- margin: 3ex 0em 3ex 0em ;
+ margin: 1ex 0em 1ex 0em ;
}
div.subtitle p { margin: 1ex ; }
@@ -2546,17 +2564,17 @@ div.author
font-variant: normal ;
font-style: normal ;
font-size: 1em ;
- margin: 3ex 0em 3ex 0em ;
+ margin: 1ex 0em 1ex 0em ;
}
div.oneauthor {
display: inline-block ;
- margin: 3ex 1em 0ex 1em ;
+ margin: 0ex 1em 0ex 1em ;
}
/*
div.author table {
- margin: 3ex auto 0ex auto ;
+ margin: 1ex auto 0ex auto ;
background: none ;
}
@@ -2569,7 +2587,7 @@ div.titledate {
text-align: center ;
font-size: .85em ;
font-style: italic;
- margin: 6ex 0em 6ex 0em ;
+ margin: 1ex 0em 1ex 0em ;
}
nav.topnavigation{
@@ -2669,6 +2687,16 @@ div.multicols { -webkit-columns: 3 380px ;
-moz-columns: 3 380px ; columns: 3 380px ; }
div.multicols p {margin-top: 0ex}
+/* Used for xfrac and nicefrac: */
+span.numerator {
+ font-size: 60% ;
+ vertical-align: .4em ;
+}
+
+span.denominator {
+ font-size: 60%
+}
+
/* Used for algorithm2e: */
div.alg2evline{
margin-left: 1em ;
@@ -2771,9 +2799,7 @@ span.amsthmnoteremark {}
/*
For CSS LaTeX and related logos:
-Based on:
-http://edward.oconnor.cx/2007/08/tex-poshlet
-http://nitens.org/taraborelli/texlogo
+Based on spacing demonstrated by the metafont package.
*/
.latexlogofont {
@@ -2785,48 +2811,48 @@ http://nitens.org/taraborelli/texlogo
.latexlogo {
font-family: "Linux Libertine O", "Nimbus Roman No 9 L",
"FreeSerif", "Hoefler Text", Times, "Times New Roman", serif;
- letter-spacing: .03em ;
font-size: 1.1em;
}
-.latexlogo sup {
+.latexlogosup {
text-transform: uppercase;
letter-spacing: .03em ;
- font-size: 0.85em;
- vertical-align: 0.15em;
- margin-left: -0.36em;
+ font-size: 0.7em;
+ vertical-align: 0.25em;
+ margin-left: -0.4em;
margin-right: -0.15em;
}
-.latexlogo sub {
+.latexlogosub {
text-transform: uppercase;
- vertical-align: -0.5ex;
- margin-left: -0.1667em;
- margin-right: -0.125em;
+ vertical-align: -0.27ex;
+ margin-left: -0.08em;
+ margin-right: -0.07em;
font-size: 1em;
}
-.xetexlogo {
+.latexlogotwoe {
+ text-transform: none ;
+ font-variant-numeric: oldstyle-nums ;
+}
+
+.latexlogotwoesub {
+ font-style:italic ;
+ vertical-align: -0.27ex;
+ margin-left: -0.11em;
+ margin-right: -0.1em;
+ font-size: 1em;
+}
+
+.xelatexlogo {
font-family: "Linux Libertine O", "Nimbus Roman No 9 L",
"FreeSerif", "Hoefler Text", Times, "Times New Roman", serif;
letter-spacing: .03em ;
font-size: 1.1em;
}
-/* A smaller gap between Xe and Tex v.s. LaTeX: */
-.xetexlogo sub {
- text-transform: uppercase;
- vertical-align: -0.5ex;
- margin-left: -0.0667em;
- margin-right: -0.2em;
- font-size: 1em;
- letter-spacing: .03em ;
-}
-
-/* A large gap between Xe and LaTeX v.s. TeX: */
-.xelatexlogo sub {
- text-transform: uppercase;
- vertical-align: -0.5ex;
+.xelatexlogosub {
+ vertical-align: -0.27ex;
margin-left: -0.0667em;
margin-right: -.05em;
font-size: 1em;
@@ -2837,8 +2863,8 @@ http://nitens.org/taraborelli/texlogo
font-family: "TeXGyreChorus","URW Chancery L",
"Apple Chancery","ITC Zapf Chancery","Monotype Corsiva",
"Linux Libertine O", "Nimbus Roman No 9 L", "FreeSerif",
- "Hoefler Text", Times, "Times New Roman", serif;
- font-style: italic;
+ "Hoefler Text", Times, "Times New Roman", serif ;
+ font-style: italic ;
}
.lyxlogo {
@@ -3251,13 +3277,6 @@ div.fancyvrblabel{
border: none ;
}
-.verse {
- font-family: "Linux Libertine O", "Hoefler Text", "Garamond",
- "Bembo", "Janson", "TeX Gyre Pagella", "Palatino",
- "Liberation Serif", "Nimbus Roman No 9 L", "FreeSerif", Times,
- "Times New Roman", serif;
-}
-
figure {
margin: 5ex 5% 5ex 5% ;
padding: 1ex 1em 1ex 1em ;
@@ -3486,21 +3505,6 @@ MathJax.Hub.Register.StartupHook("TeX AMSmath Ready",function () {
"https://cdn.mathjax.org/mathjax/contrib";
</script>
-<!-- https://github.com/burnpanck/MathJax-siunitx -->
-
-<script type="text/x-mathjax-config">
- MathJax.Hub.Config({
- extensions: ["tex2jax.js","[siunitx]/siunitx.js"],
- jax: ["input/TeX","output/HTML-CSS"],
- tex2jax: {
- inlineMath: [["$","$"],["\\(","\\)"]] ,
- processClass: "tabbing|verse"
- },
- TeX: {extensions: ["AMSmath.js","AMSsymbols.js", "sinuitx.js"]}
- });
- MathJax.Ajax.config.path['siunitx'] = 'http://rawgit.com/burnpanck/MathJax-siunitx/master/';
- </script>
-
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
TeX: {
@@ -3527,13 +3531,16 @@ src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.4/MathJax.js?config=TeX-
\end{LWRwriteconf}
+
+
+
\begin{LWR@createlwarpmk}
\begin{filecontents*}{lwarpmk.lua}
#!/usr/bin/env texlua
-- Copyright 2016-2018 Brian Dunn
-printversion = "v0.61"
+printversion = "v0.62"
requiredconfversion = "1" -- also at *lwarpmk.conf
function printhelp ()
@@ -3562,8 +3569,9 @@ lwarpmk pdftohtml [-p project]:
Finishes the HTML conversion even if there was a compile error.
lwarpmk pdftosvg <list of file names>: Converts each PDF file to SVG.
lwarpmk epstopdf <list of file names>: Converts each EPS file to PDF.
-lwarpmk clean [-p project]: Remove .aux, .toc, .lof/t, .idx, .ind, .log, *_html_inc.*, .gl*
-lwarpmk cleanall [-p project]: Remove auxiliary files and also project.pdf, *.html
+lwarpmk clean [-p project]: Remove *.aux, *.toc, *.lof/t,
+ *.idx, *.ind, *.log, *_html_inc.*, .gl*
+lwarpmk cleanall [-p project]: Remove auxiliary files, project.pdf, *.html
lwarpmk cleanlimages: Removes all images from the "lateximages" directory.
lwarpmk -h: Print this help message.
lwarpmk --help: Print this help message.
@@ -4545,7 +4553,7 @@ end -- not --version
\begingroup%
\LWR@FBcancel%
\LWR@origampersand#1;%
-\endgroup
+\endgroup%
}
\newcommand*{\HTMLunicode}[1]{\HTMLentity{\LWR@origpound{}x#1}}
@@ -4610,7 +4618,7 @@ end -- not --version
\LWR@traceinfo{Prefixing the index name with an underscore.}%
\_#1.html%
}%
- {\HTMLFilename#1.html}%
+ {\HTMLFilename\LWR@isolate{#1}.html}%
}%
\LWR@traceinfo{LWR@htmlsectionfilename Z}%
}
@@ -4794,7 +4802,7 @@ end -- not --version
\LWR@FBcancel%
\ifmmode\else\protect\LWR@origttfamily\fi%
\protect\LWR@origtextless%
-#1%
+\LWR@isolate{#1}%
\protect\LWR@origtextgreater%
\endgroup%
}
@@ -4980,13 +4988,17 @@ end -- not --version
\end{warpHTML}
\begin{warpprint}
-\NewDocumentCommand{\InlineClass}{o m +m}{#3}%
+\NewDocumentCommand{\InlineClass}{D{(}{)}{} o m +m}{#4}%
\end{warpprint}
\begin{warpHTML}
-\NewDocumentCommand{\LWR@print@InlineClass}{o m +m}{#3}%
+\NewDocumentCommand{\LWR@print@InlineClass}{D{(}{)}{} o m +m}{#4}%
-\NewDocumentCommand{\LWR@HTML@InlineClass}{o m +m}{%
- \LWR@htmlspanclass[#1]{#2}{#3}%
+\NewDocumentCommand{\LWR@HTML@InlineClass}{D{(}{)}{} o m +m}{%
+\ifbool{FormatWP}{%
+ \LWR@htmlspanclass[#1]{#3}{#4}%
+}{%
+ \LWR@htmlspanclass[#2]{#3}{#4}%
+}%
}
\LWR@formatted{InlineClass}
@@ -5177,8 +5189,8 @@ end -- not --version
}% an intentionally blank line
{}%
\ifbool{LWR@doingstartpars}%
- {\ClearPreHook{par}}%
- {}%
+ {\ClearPreHook{par}}%
+ {}%
\global\setbool{LWR@doingstartpars}{false}%
\global\boolfalse{LWR@doingapar}%
}% nestspan
@@ -5422,6 +5434,7 @@ end -- not --version
\edef\LWR@thisnewfilename{#1}%
\LWR@traceinfo{LWR@filenamenoblanks edef: !\LWR@thisnewfilename!}%
\fullexpandarg%
+\StrSubstitute{\LWR@thisnewfilename}{\ }{-}[\LWR@thisnewfilename]
\StrSubstitute{\LWR@thisnewfilename}{ }{-}[\LWR@thisnewfilename]
\StrSubstitute{\LWR@thisnewfilename}{,}{-}[\LWR@thisnewfilename]
\StrSubstitute{\LWR@thisnewfilename}{'}{-}[\LWR@thisnewfilename]
@@ -5442,7 +5455,6 @@ end -- not --version
{\textgreater}{-}[\LWR@thisnewfilename]
\StrSubstitute{\LWR@thisnewfilename}{\LWR@origpound}{-}[\LWR@thisnewfilename]
\StrSubstitute{\LWR@thisnewfilename}{\_}{-}[\LWR@thisnewfilename]
-\StrSubstitute{\LWR@thisnewfilename}{\ }{-}[\LWR@thisnewfilename]
\StrSubstitute{\LWR@thisnewfilename}{\%}{-}[\LWR@thisnewfilename]
\StrSubstitute{\LWR@thisnewfilename}{\{}{-}[\LWR@thisnewfilename]
\StrSubstitute{\LWR@thisnewfilename}{\}}{-}[\LWR@thisnewfilename]
@@ -5503,6 +5515,7 @@ end -- not --version
}%
}
+
\newcommand*{\LWR@customizedMathJax}{}
\newcommand*{\CustomizeMathJax}[1]{%
@@ -5530,12 +5543,17 @@ end -- not --version
}{}
}
+
+
+
+
\end{warpHTML}
\begin{warpprint}
\newcommand*{\CustomizeMathJax}[1]{}
+
\end{warpprint}
\begin{warpHTML}
@@ -5584,15 +5602,7 @@ end -- not --version
\LWR@stoppars
-\ifPDFTeX% pdflatex or dvi latex
-\ifdefstring{\inputencodingname}{utf8}{%
-\LWR@filestart{ — #1}% there is an EMdash in front of the #1
-}{
-\LWR@filestart{ - #1}% hyphen
-}
-\else%
-\LWR@filestart{ — #1}% there is an EMdash in front of the #1
-\fi%
+\LWR@filestart[#1]
\setcounter{LWR@latestautopage}{\value{page}}%
\LWR@newautopagelabel{LWR@latestautopage}%
@@ -5682,10 +5692,11 @@ end -- not --version
\def\@seccntformat#1{\csname the#1\endcsname\protect\quad}
\newcommand*{\simplechapterdelim}{}
\let\@chapcntformat\@seccntformat
+\let\@partcntformat\@seccntformat
+\newcommand*{\@partnameformat}{\LWR@isolate{\partname}~}%
\newcounter{LWR@currentautosec}
\DeclareDocumentCommand{\LWR@section}{m m m m}{%
-\LWR@traceinfo{LWR@section |#2| |#3|}%
-\LWR@traceinfo{LWR@section: not an empty section}%
+\LWR@traceinfo{LWR@section: starting}%
\LWR@stoppars%
\global\boolfalse{LWR@minipagethispar}%
\LWR@traceinfo{LWR@section: testing whether to start a new HTML file}%
@@ -5747,13 +5758,17 @@ end -- not --version
{}%
\LWR@traceinfo{LWR@section: about to LWR@createautosec}%
\LWR@createautosec{\@nameuse{LWR@tag#4}}%
-\setcounter{LWR@currentautosec}{\value{page}}
+\setcounter{LWR@currentautosec}{\value{page}}%
\IfBooleanTF{#1}%
{%
-\LWR@traceinfo{LWR@section: starred}%
-\ifbool{LWR@forcinghtmltoc}%
-{\addcontentsline{toc}{#4}{\IfValueTF{#2}{#2}{#3}}}%
-{}%
+ \LWR@traceinfo{LWR@section: starred}%
+ \ifbool{LWR@forcinghtmltoc}%
+ {%
+ \addcontentsline{toc}{#4}{%
+ \IfValueTF{#2}{\LWR@isolate{#2}}{\LWR@isolate{#3}}%
+ }%
+ }%
+ {}%
}% starred
{% not starred
\ifthenelse{%
@@ -5769,17 +5784,24 @@ end -- not --version
\addcontentsline{toc}{#4}%
{%
\protect\numberline{\@nameuse{the#4}}%
- {\ignorespaces\IfValueTF{#2}{#2}{#3}\protect\relax}%
+ {%
+ \ignorespaces%
+ \IfValueTF{#2}{\LWR@isolate{#2}}{\LWR@isolate{#3}}\protect\relax%
+ }%
}%
\LWR@traceinfo{LWR@section: finished addcontentsline}%
}% end of if main matter
{% not main matter
\LWR@traceinfo{LWR@section: no main matter}%
- \addcontentsline{toc}{#4}{\IfValueTF{#2}{#2}{#3}}%
+ \addcontentsline{toc}{#4}{%
+ \IfValueTF{#2}{\LWR@isolate{#2}}{\LWR@isolate{#3}}%
+ }%
}% end of not main matter
}% end of secnumdepth
{%
- \addcontentsline{toc}{#4}{\IfValueTF{#2}{#2}{#3}}%
+ \addcontentsline{toc}{#4}{%
+ \IfValueTF{#2}{\LWR@isolate{#2}}{\LWR@isolate{#3}}%
+ }%
}%
\ifbool{LWR@mainmatter}%
{%
@@ -5788,23 +5810,28 @@ end -- not --version
{\value{secnumdepth}}\) \AND%
\(\cnttest{\@nameuse{LWR@depth#4}}{<=}{\LWR@depthpart}\)%
}%
- {\@nameuse{#4name}~{}}%
+ {\@partnameformat}%
{}%
\LWR@traceinfo{LWR@section: about to print section number}%
\ifthenelse{%
\cnttest{\@nameuse{LWR@depth#4}}{<=}{\value{secnumdepth}}%
}%
{%
- \ifstrequal{#4}{chapter}%
- {\protect\LWR@sectionnumber{\@chapcntformat{#4}}}%
- {\protect\LWR@sectionnumber{\@seccntformat{#4}}}%
+ \ifstrequal{#4}{part}%
+ {%
+ \protect\LWR@sectionnumber{\@partcntformat{#4}}%
+ }{%
+ \ifstrequal{#4}{chapter}%
+ {\protect\LWR@sectionnumber{\@chapcntformat{#4}}}%
+ {\protect\LWR@sectionnumber{\@seccntformat{#4}}}%
+ }%
}%
{}%
\LWR@traceinfo{LWR@section: finished print section number}%
}{}%
}% end of not starred
\LWR@traceinfo{LWR@section: about to print the section name}%
-#3%
+\LWR@isolate{#3}%
\LWR@traceinfo{LWR@section: about to close the heading tag}%
\LWR@htmltag{\@nameuse{LWR@tag#4end}}%
\LWR@traceinfo{LWR@section: about to create the LaTeX label}%
@@ -5874,11 +5901,7 @@ end -- not --version
}
\DeclareDocumentCommand{\section}{s o o m}{%
-\IfValueTF{#2}{
-\LWR@traceinfo{section #2}%
-}{
-\LWR@traceinfo{section #4}%
-}
+\LWR@traceinfo{section: starting}%
\LWR@maybeprintpendingfootnotes{\LWR@depthsection}%
\LWR@stoppars%
@@ -5935,15 +5958,41 @@ end -- not --version
\renewcommand*{\LWR@currentHTMLLanguage}{#1}%
}
+\ifPDFTeX% pdflatex or dvi latex
+\ifdefstring{\inputencodingname}{utf8}{%
+ \newcommand*{\theHTMLTitleSeparator}{ — }% EMdash
+}{%
+ \newcommand*{\theHTMLTitleSeparator}{ - }% hyphen
+}%
+\else%
+ \newcommand*{\theHTMLTitleSeparator}{ — }% EMdash
+\fi%
+
+\newcommand*{\HTMLTitleBeforeSection}{%
+ \def\theHTMLTitleSection{%
+ \theHTMLTitle\theHTMLTitleSeparator\theHTMLSection%
+ }
+}
+
+\newcommand*{\HTMLTitleAfterSection}{%
+ \def\theHTMLTitleSection{%
+ \theHTMLSection\theHTMLTitleSeparator\theHTMLTitle%
+ }
+}
+
+\HTMLTitleBeforeSection
+
+\newcommand*{\theHTMLSection}{}
+
\end{warpall}
\begin{warpHTML}
-
-\newcommand*{\LWR@filestart}[1]{
-\LWR@traceinfo{LWR@filestart !#1!}
-\begingroup
-\LWR@nullfonts
+\newcommand*{\LWR@filestart}[1][]{%
+\LWR@traceinfo{LWR@filestart !#1!}%
+\begingroup%
+\LWR@nullfonts%
+\edef\theHTMLSection{#1}%
\LWR@htmltag{!DOCTYPE html}\LWR@orignewline
\LWR@htmltag{html lang="\LWR@currentHTMLLanguage"}\LWR@orignewline
\LWR@htmltag{head}\LWR@orignewline
@@ -5968,7 +6017,13 @@ script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"}%
\LWR@htmltag{![endif]{-}{-}}\LWR@orignewline
\ifthenelse{\equal{\theHTMLTitle}{}}%
{}%
-{\LWR@htmltag{title}\theHTMLTitle#1\LWR@htmltag{/title}\LWR@orignewline}%
+{%
+ \LWR@htmltag{title}%
+ \ifdefempty{\theHTMLSection}%
+ {\theHTMLTitle}%
+ {\theHTMLTitleSection}%
+ \LWR@htmltag{/title}\LWR@orignewline%
+}%
\LWR@htmltag{%
link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\LWR@orignewline
@@ -5976,11 +6031,11 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
{%
\begingroup%
\LWR@restoreoriglists%
- \boolfalse{LWR@verbtags}
- \verbatiminput{lwarp_mathjax.txt}%
- \booltrue{LWR@verbtags}
+ \boolfalse{LWR@verbtags}%
+ \verbatiminput{lwarp_mathjax.txt}%
+ \booltrue{LWR@verbtags}%
\endgroup%
- \LWR@stoppars
+ \LWR@stoppars%
}% end of mathjax
{}%
\LWR@htmltag{/head}\LWR@orignewline
@@ -6026,19 +6081,19 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\let\LWR@origcaption\caption
\let\LWR@origltx@label\ltx@label
\let\ltx@label\LWR@htmlmathlabel
-\let\TeX\LWR@TeX
-\let\LaTeX\LWR@LaTeX
-\let\LuaTeX\LWR@LuaTeX
-\let\LuaLaTeX\LWR@LuaLaTeX
-\let\XeTeX\LWR@XeTeX
-\let\XeLaTeX\LWR@XeLaTeX
-\let\ConTeXt\LWR@ConTeXt
+\LetLtxMacro\TeX\LWR@TeX
+\LetLtxMacro\LaTeX\LWR@LaTeX
+\LetLtxMacro\LuaTeX\LWR@LuaTeX
+\LetLtxMacro\LuaLaTeX\LWR@LuaLaTeX
+\LetLtxMacro\XeTeX\LWR@XeTeX
+\LetLtxMacro\XeLaTeX\LWR@XeLaTeX
+\LetLtxMacro\ConTeXt\LWR@ConTeXt
\global\boolfalse{LWR@doingapar}
\global\boolfalse{LWR@doingstartpars}
\mainmatter
\LWR@origpagenumbering{arabic}
\LWR@traceinfo{LWR@lwarpStart: Starting new file.}
-\LWR@filestart{}
+\LWR@filestart
\LWR@traceinfo{LWR@lwarpStart: Generating first header.}
\LWR@htmltag{header}\LWR@orignewline
\LWR@startpars
@@ -7853,7 +7908,7 @@ rowspan="#2" %
\IfBooleanTF{#1}% star?
{% yes star
\LWR@figcaption%
- #3%
+ \LWR@isolate{#3}%
\endLWR@figcaption%
}%
{% No star:
@@ -7869,7 +7924,9 @@ rowspan="#2" %
}%
}{}%
\LWR@figcaption%
- \@nameuse{fnum@\LTcaptype}\CaptionSeparator#3%
+ \LWR@isolate{\@nameuse{fnum@\LTcaptype}}%
+ \CaptionSeparator%
+ \LWR@isolate{#3}%
\endLWR@figcaption%
\ifblank{#2}% TOC entry empty
{}%
@@ -7880,9 +7937,9 @@ rowspan="#2" %
{\@nameuse{ext@\LTcaptype}}%
{\LTcaptype}%
{%
- \protect\numberline%
- {\@nameuse{p@\LTcaptype}\@nameuse{the\LTcaptype}}%
- {\ignorespaces #3\protect\relax}%
+ \protect\numberline%
+ {\LWR@isolate{\@nameuse{p@\LTcaptype}}\@nameuse{the\LTcaptype}}%
+ {\ignorespaces \LWR@isolate{#3}\protect\relax}%
}%
}% end of No TOC entry
{% yes TOC entry
@@ -7890,9 +7947,9 @@ rowspan="#2" %
{\@nameuse{ext@\LTcaptype}}%
{\LTcaptype}%
{%
- \protect\numberline%
- {\@nameuse{p@\LTcaptype}\@nameuse{the\LTcaptype}}%
- {\ignorespaces #2\protect\relax}%
+ \protect\numberline%
+ {\LWR@isolate{\@nameuse{p@\LTcaptype}}\@nameuse{the\LTcaptype}}%
+ {\ignorespaces \LWR@isolate{#2}\protect\relax}%
}%
}% end of yes TOC entry
}% end of TOC entry not empty
@@ -8291,8 +8348,8 @@ rowspan="#2" %
\GetTitleStringExpand{#1}%
\edef\@currentlabelname{\detokenize\expandafter{\GetTitleStringResult}}%
\edef\@currentlabelname{%
-\expandafter\LWR@stripperiod\@currentlabelname%
-\ltx@empty.\ltx@empty\@nil%
+ \expandafter\LWR@stripperiod\@currentlabelname%
+ \ltx@empty.\ltx@empty\@nil%
}%
}
@@ -8641,7 +8698,7 @@ autopage-\theLWR@currentautosec%
\AtBeginDocument{\renewcommand{\@makecaption}[2]{%
\LWR@traceinfo{@makecaption}%
- #1\CaptionSeparator#2%
+ \LWR@isolate{#1}\CaptionSeparator\LWR@isolate{#2}%
\LWR@traceinfo{@makecaption: done}%
}%
}
@@ -8659,19 +8716,19 @@ autopage-\theLWR@currentautosec%
\newenvironment*{LWR@figcaption}
{%
-\LWR@traceinfo{LWR@figcaption env start}%
-\LWR@htmlblocktag{figcaption}%
-\ifbool{FormatWP}{%
-\begin{BlockClass}[font-style:italic]{italic}
-\LWR@print@vspace*{\baselineskip}
-}{}%
-\LWR@traceinfo{LWR@figcaption env start: done}%
+ \LWR@traceinfo{LWR@figcaption env start}%
+ \LWR@htmlblocktag{figcaption}%
+ \ifbool{FormatWP}{%
+ \begin{BlockClass}[font-style:italic]{italic}
+ \LWR@print@vspace*{\baselineskip}
+ }{}%
+ \LWR@traceinfo{LWR@figcaption env start: done}%
}
{%
-\LWR@traceinfo{LWR@figcaption env end}%
-\ifbool{FormatWP}{\end{BlockClass}}{}%
-\LWR@htmlblocktag{/figcaption}%
-\LWR@traceinfo{LWR@figcaption env end: done}%
+ \LWR@traceinfo{LWR@figcaption env end}%
+ \ifbool{FormatWP}{\end{BlockClass}}{}%
+ \LWR@htmlblocktag{/figcaption}%
+ \LWR@traceinfo{LWR@figcaption env end: done}%
}
\newcommand*{\LWR@HTML@caption@begin}[1]
{
@@ -8923,8 +8980,12 @@ autopage-\theLWR@currentautosec%
\DeclareDocumentCommand{\l@part}{m m}{\hypertoc{-1}{part}{#1}{#2}}
+\@ifundefined{chapter}
+{}
+{
\DeclareDocumentCommand{\l@chapter}{m m}
{\hypertoc{0}{chapter}{#1}{#2}}
+}
\renewcommand{\l@section}[2]{\hypertoc{1}{section}{#1}{#2}}
@@ -9010,15 +9071,15 @@ autopage-\theLWR@currentautosec%
}
\newcommand{\LWR@hyperindexrefnullified}{%
-\renewrobustcmd{\emph}[1]{\LWR@HTMLemph{\LWR@doindexentry{##1}}}%
-\renewrobustcmd{\textbf}[1]{\LWR@HTMLtextbf{\LWR@doindexentry{##1}}}%
-\renewrobustcmd{\textrm}[1]{\LWR@HTMLtextrm{\LWR@doindexentry{##1}}}%
-\renewrobustcmd{\textsf}[1]{\LWR@HTMLtextsf{\LWR@doindexentry{##1}}}%
-\renewrobustcmd{\texttt}[1]{\LWR@HTMLtexttt{\LWR@doindexentry{##1}}}%
-\renewrobustcmd{\textup}[1]{\LWR@HTMLtextup{\LWR@doindexentry{##1}}}%
-\renewrobustcmd{\textsc}[1]{\LWR@HTMLtextsc{\LWR@doindexentry{##1}}}%
-\renewrobustcmd{\textit}[1]{\LWR@HTMLtextit{\LWR@doindexentry{##1}}}%
-\renewrobustcmd{\textsl}[1]{\LWR@HTMLtextsl{\LWR@doindexentry{##1}}}%
+\renewrobustcmd{\emph}[1]{\LWR@HTML@emph{\LWR@doindexentry{##1}}}%
+\renewrobustcmd{\textbf}[1]{\LWR@HTML@textbf{\LWR@doindexentry{##1}}}%
+\renewrobustcmd{\textrm}[1]{\LWR@HTML@textrm{\LWR@doindexentry{##1}}}%
+\renewrobustcmd{\textsf}[1]{\LWR@HTML@textsf{\LWR@doindexentry{##1}}}%
+\renewrobustcmd{\texttt}[1]{\LWR@HTML@texttt{\LWR@doindexentry{##1}}}%
+\renewrobustcmd{\textup}[1]{\LWR@HTML@textup{\LWR@doindexentry{##1}}}%
+\renewrobustcmd{\textsc}[1]{\LWR@HTML@textsc{\LWR@doindexentry{##1}}}%
+\renewrobustcmd{\textit}[1]{\LWR@HTML@textit{\LWR@doindexentry{##1}}}%
+\renewrobustcmd{\textsl}[1]{\LWR@HTML@textsl{\LWR@doindexentry{##1}}}%
}
\newcommand{\hyperindexref}[1]{%
@@ -9092,17 +9153,6 @@ autopage-\theLWR@currentautosec%
\let\textellipsis\LWR@origtextellipsis%
\let\textless\LWR@origtextless%
\let\textgreater\LWR@origtextgreater%
-\LetLtxMacro\textrm\LWR@origtextrm%
-\LetLtxMacro\textsf\LWR@origtextsf%
-\LetLtxMacro\texttt\LWR@origtexttt%
-\LetLtxMacro\textbf\LWR@origtextbf%
-\LetLtxMacro\textmd\LWR@origtextmd%
-\LetLtxMacro\textit\LWR@origtextit%
-\LetLtxMacro\textsl\LWR@origtextsl%
-\LetLtxMacro\textsc\LWR@origtextsc%
-\LetLtxMacro\textup\LWR@origtextup%
-\LetLtxMacro\textnormal\LWR@origtextnormal%
-\LetLtxMacro\emph\LWR@origemph%
\LetLtxMacro\rmfamily\LWR@origrmfamily%
\LetLtxMacro\sffamily\LWR@origsffamily%
\LetLtxMacro\ttfamily\LWR@origttfamily%
@@ -10044,12 +10094,17 @@ autopage-\theLWR@currentautosec%
\end{warpHTML}
\begin{warpHTML}
-\@ifpackageloaded{textcomp}{\LWR@origRequirePackage{lwarp-textcomp}}{}
+\newcommand*{\LWR@PreloadedPackage}[1]{%
+\@ifpackageloaded{#1}{\LWR@origRequirePackage{lwarp-#1}}{}
+}
+\LWR@PreloadedPackage{textcomp}
+
+\LWR@PreloadedPackage{xunicode}
-\@ifpackageloaded{xunicode}{\LWR@origRequirePackage{lwarp-xunicode}}{}
+\LWR@PreloadedPackage{graphics}
+\LWR@PreloadedPackage{graphicx}
-\@ifpackageloaded{graphics}{\LWR@origRequirePackage{lwarp-graphics}}{}
-\@ifpackageloaded{graphicx}{\LWR@origRequirePackage{lwarp-graphicx}}{}
+\LWR@PreloadedPackage{ulem}
\end{warpHTML}
@@ -10107,7 +10162,7 @@ autopage-\theLWR@currentautosec%
\begin{lrbox}{\LWR@colorminipagebox}%
#5%
\end{lrbox}%
-\ifthenelse{\equal{#4}{none}}%
+\ifstrequal{#4}{none}%
{% #4 none
\LWR@traceinfo{background is none}%
{% scope the \colorlet
@@ -10152,7 +10207,7 @@ autopage-\theLWR@currentautosec%
\end{minipage}%
\end{lrbox}%
\LWR@traceinfo{*** starting end fcolorminipage #1 #2 #3 #4 #8}%
-\ifthenelse{\equal{#4}{none}}%
+\ifstrequal{#4}{none}%
{% #4 none
{% scope the \colorlet
\colorlet{LWR@currentcolor}{.}%
@@ -10537,7 +10592,8 @@ padding:\LWR@printlength{\fboxsep}%
\endminipage%
}
-\newenvironment{fminipage}{\LWR@print@fminipage}{\endLWR@print@fminipage}
+\LetLtxMacro\fminipage\LWR@print@fminipage
+\LetLtxMacro\endfminipage\endLWR@print@fminipage
\end{warpall}
@@ -10549,6 +10605,7 @@ padding:\LWR@printlength{\fboxsep}%
\LWR@forceminwidth{\fboxrule}%
\setlength{\LWR@tempwidth}{#4}%
\IfValueT{#2}{\setlength{\LWR@tempheight}{#2}}%
+\LWR@stoppars%
\begin{BlockClass}[%
\LWR@blackborderpadding ; %
\IfValueT{#2}{height:\LWR@printlength{\LWR@tempheight} ; }%
@@ -10557,6 +10614,7 @@ width:\LWR@printlength{\LWR@tempwidth}%
}
{%
\end{BlockClass}%
+\global\booltrue{LWR@minipagethispar}%
\LWR@traceinfo{fminipage done}%
}
@@ -10576,125 +10634,161 @@ width:\LWR@printlength{\LWR@tempwidth}%
\begin{warpHTML}
-\DeclareRobustCommand{\LWR@HTMLtextstyle}[3]{%
-\ifbool{FormatWP}%
-{\LWR@htmlspanclass[#1]{#2}{#3}}%
-{\LWR@htmlspanclass{#2}{#3}}%
+\DeclareRobustCommand{\LWR@HTML@emph}[1]{%
+ {%
+ \itshape%
+ \LWR@htmlspan{em}{#1}%
+ }%
}
+\LWR@formatted{emph}
-\DeclareRobustCommand{\LWR@HTMLemph}[1]{\LWR@htmlspan{em}{#1}}
-\DeclareRobustCommand{\LWR@nullemph}[1]{#1}
-\LetLtxMacro\emph\LWR@HTMLemph
+\DeclareRobustCommand{\LWR@null@emph}[1]{#1}
-\DeclareRobustCommand{\LWR@HTMLtextmd}[1]{%
-\LWR@HTMLtextstyle{font-weight:normal}{textmd}{#1}%
+\DeclareRobustCommand{\LWR@HTML@textmd}[1]{%
+ {%
+ \mdseries%
+ \InlineClass(font-weight:normal){textmd}{#1}%
+ }%
}
-\DeclareRobustCommand{\LWR@nulltextmd}[1]{#1}
-
-\LetLtxMacro\textmd\LWR@HTMLtextmd
+\LWR@formatted{textmd}
-\DeclareRobustCommand{\LWR@HTMLtextbf}[1]{\LWR@htmlspan{b}{#1}}
-\DeclareRobustCommand{\LWR@nulltextbf}[1]{#1}
-\LetLtxMacro\textbf\LWR@HTMLtextbf
+\DeclareRobustCommand{\LWR@null@textmd}[1]{#1}
-\DeclareRobustCommand{\LWR@HTMLtextrm}[1]{%
-\LWR@HTMLtextstyle{font-family:serif}{textrm}{#1}%
+\DeclareRobustCommand{\LWR@HTML@textbf}[1]{%
+ {%
+ \bfseries%
+ \LWR@htmlspan{b}{#1}%
+ }%
}
+\LWR@formatted{textbf}
-\DeclareRobustCommand{\LWR@nulltextrm}[1]{#1}
+\DeclareRobustCommand{\LWR@null@textbf}[1]{#1}
-\LetLtxMacro\textrm\LWR@HTMLtextrm
+\DeclareRobustCommand{\LWR@HTML@textrm}[1]{%
+ {%
+ \rmfamily%
+ \InlineClass(font-family:serif){textrm}{#1}%
+ }%
+}
+\LWR@formatted{textrm}
-\DeclareRobustCommand{\LWR@HTMLtextsf}[1]{%
-\LWR@HTMLtextstyle{font-family:sans}{textsf}{#1}%
+\DeclareRobustCommand{\LWR@null@textrm}[1]{#1}
+
+\DeclareRobustCommand{\LWR@HTML@textsf}[1]{%
+ {%
+ \sffamily%
+ \InlineClass(font-family:sans){textsf}{#1}%
+ }%
}
-\DeclareRobustCommand{\LWR@nulltextsf}[1]{#1}
-\LetLtxMacro\textsf\LWR@HTMLtextsf
+\LWR@formatted{textsf}
-\DeclareRobustCommand{\LWR@HTMLtexttt}[1]{\LWR@htmlspan{kbd}{#1}}
-\DeclareRobustCommand{\LWR@nulltexttt}[1]{#1}
-\LetLtxMacro\texttt\LWR@HTMLtexttt
+\DeclareRobustCommand{\LWR@null@textsf}[1]{#1}
-\DeclareRobustCommand{\LWR@HTMLtextup}[1]{%
-\LWR@HTMLtextstyle{font-variant:normal}{textup}{#1}%
+\DeclareRobustCommand{\LWR@HTML@texttt}[1]{%
+ {%
+ \ttfamily%
+ \LWR@htmlspan{kbd}{#1}%
+ }%
}
+\LWR@formatted{texttt}
-\DeclareRobustCommand{\LWR@nulltextup}[1]{#1}
+\DeclareRobustCommand{\LWR@null@texttt}[1]{#1}
-\LetLtxMacro\textup\LWR@HTMLtextup
+\DeclareRobustCommand{\LWR@HTML@textup}[1]{%
+ {%
+ \upshape%
+ \InlineClass(font-style:normal){textup}{#1}%
+ }%
+}
+\LWR@formatted{textup}
-\DeclareRobustCommand{\LWR@HTMLtextit}[1]{\LWR@htmlspan{i}{#1}}
-\DeclareRobustCommand{\LWR@nulltextit}[1]{#1}
-\LetLtxMacro\textit\LWR@HTMLtextit
+\DeclareRobustCommand{\LWR@null@textup}[1]{#1}
-\DeclareRobustCommand{\LWR@HTMLtextsc}[1]{%
-\LWR@HTMLtextstyle{font-variant:small-caps}{textsc}{#1}%
+\DeclareRobustCommand{\LWR@HTML@textit}[1]{%
+ {%
+ \itshape%
+ \LWR@htmlspan{i}{#1}%
+ }%
}
+\LWR@formatted{textit}
+
+\DeclareRobustCommand{\LWR@null@textit}[1]{#1}
-\DeclareRobustCommand{\LWR@nulltextsc}[1]{#1}
+\DeclareRobustCommand{\LWR@HTML@textsc}[1]{%
+ {%
+ \scshape%
+ \InlineClass(
+ font-variant: small-caps ;
+ font-variant-numeric: oldstyle-nums ;
+ ){textsc}{#1}%
+ }%
+}
+\LWR@formatted{textsc}
-\LetLtxMacro\textsc\LWR@HTMLtextsc
+\DeclareRobustCommand{\LWR@null@textsc}[1]{#1}
-\DeclareRobustCommand{\LWR@HTMLtextsl}[1]{%
-\LWR@HTMLtextstyle{font-style:oblique}{textsl}{#1}%
+\DeclareRobustCommand{\LWR@HTML@textsl}[1]{%
+ {%
+ \slshape%
+ \InlineClass(font-style:oblique){textsl}{#1}%
+ }%
}
+\LWR@formatted{textsl}
-\DeclareRobustCommand{\LWR@nulltextsl}[1]{#1}
+\DeclareRobustCommand{\LWR@null@textsl}[1]{#1}
-\LetLtxMacro\textsl\LWR@HTMLtextsl
+\DeclareRobustCommand{\LWR@HTML@textnormal}[1]{\textmd{\textrm{\textup{#1}}}}
+\LWR@formatted{textnormal}
-\DeclareRobustCommand{\LWR@HTMLtextnormal}[1]{\textmd{\textrm{\textup{#1}}}}
-\DeclareRobustCommand{\LWR@nulltextnormal}[1]{#1}
-\LetLtxMacro\textnormal\LWR@HTMLtextnormal
+\DeclareRobustCommand{\LWR@null@textnormal}[1]{#1}
-\DeclareRobustCommand{\LWR@nullrmfamily}{}
-\DeclareRobustCommand{\LWR@nullsffamily}{}
-\DeclareRobustCommand{\LWR@nullttfamily}{}
-\DeclareRobustCommand{\LWR@nullbfseries}{}
-\DeclareRobustCommand{\LWR@nullmdseries}{}
-\DeclareRobustCommand{\LWR@nullupshape}{}
-\DeclareRobustCommand{\LWR@nullslshape}{}
-\DeclareRobustCommand{\LWR@nullscshape}{}
-\DeclareRobustCommand{\LWR@nullitshape}{}
-\DeclareRobustCommand{\LWR@nullem}[1]{}
-\DeclareRobustCommand{\LWR@nullnormalfont}{}
+\DeclareRobustCommand{\LWR@null@rmfamily}{}
+\DeclareRobustCommand{\LWR@null@sffamily}{}
+\DeclareRobustCommand{\LWR@null@ttfamily}{}
+\DeclareRobustCommand{\LWR@null@bfseries}{}
+\DeclareRobustCommand{\LWR@null@mdseries}{}
+\DeclareRobustCommand{\LWR@null@upshape}{}
+\DeclareRobustCommand{\LWR@null@slshape}{}
+\DeclareRobustCommand{\LWR@null@scshape}{}
+\DeclareRobustCommand{\LWR@null@itshape}{}
+\DeclareRobustCommand{\LWR@null@normalfont}{}
+\DeclareRobustCommand{\LWR@null@em}{}
\newcommand*{\LWR@nullfonts}{%
-\LetLtxMacro\emph\LWR@nullemph%
-\LetLtxMacro\textmd\LWR@nulltextmd%
-\LetLtxMacro\textbf\LWR@nulltextbf%
-\LetLtxMacro\textrm\LWR@nulltextrm%
-\LetLtxMacro\textsf\LWR@nulltextsf%
-\LetLtxMacro\texttt\LWR@nulltexttt%
-\LetLtxMacro\textup\LWR@nulltextup%
-\LetLtxMacro\textit\LWR@nulltextit%
-\LetLtxMacro\textsc\LWR@nulltextsc%
-\LetLtxMacro\textsl\LWR@nulltextsl%
-\LetLtxMacro\textnormal\LWR@nulltextnormal%
-\LetLtxMacro\rmfamily\LWR@nullrmfamily%
-\LetLtxMacro\sffamily\LWR@nullsffamily%
-\LetLtxMacro\ttfamily\LWR@nullttfamily%
-\LetLtxMacro\bfseries\LWR@nullbfseries%
-\LetLtxMacro\mdseries\LWR@nullmdseries%
-\LetLtxMacro\upshape\LWR@nullupshape%
-\LetLtxMacro\slshape\LWR@nullslshape%
-\LetLtxMacro\scshape\LWR@nullscshape%
-\LetLtxMacro\itshape\LWR@nullitshape%
-\LetLtxMacro\em\LWR@nullem%
-\LetLtxMacro\normalfont\LWR@nullnormalfont%
+\LetLtxMacro\emph\LWR@null@emph%
+\LetLtxMacro\textmd\LWR@null@textmd%
+\LetLtxMacro\textbf\LWR@null@textbf%
+\LetLtxMacro\textrm\LWR@null@textrm%
+\LetLtxMacro\textsf\LWR@null@textsf%
+\LetLtxMacro\texttt\LWR@null@texttt%
+\LetLtxMacro\textup\LWR@null@textup%
+\LetLtxMacro\textit\LWR@null@textit%
+\LetLtxMacro\textsc\LWR@null@textsc%
+\LetLtxMacro\textsl\LWR@null@textsl%
+\LetLtxMacro\textnormal\LWR@null@textnormal%
+\LetLtxMacro\rmfamily\LWR@null@rmfamily%
+\LetLtxMacro\sffamily\LWR@null@sffamily%
+\LetLtxMacro\ttfamily\LWR@null@ttfamily%
+\LetLtxMacro\bfseries\LWR@null@bfseries%
+\LetLtxMacro\mdseries\LWR@null@mdseries%
+\LetLtxMacro\upshape\LWR@null@upshape%
+\LetLtxMacro\slshape\LWR@null@slshape%
+\LetLtxMacro\scshape\LWR@null@scshape%
+\LetLtxMacro\itshape\LWR@null@itshape%
+\LetLtxMacro\normalfont\LWR@null@normalfont%
+\LetLtxMacro\em\LWR@null@em%
\renewcommand*{\,}{-}%
\renewcommand*{~}{-}%
\renewcommand*{\newline}{ }%
\renewcommand*{\textellipsis}{-}%
-\renewcommand*{\HTMLunicode}[1]{-}%
-\renewcommand*{\HTMLentity}[1]{-}%
+\renewcommand*{\HTMLunicode}[1]{}%
+\renewcommand*{\HTMLentity}[1]{}%
\renewcommand*{\&}{and}%
\renewcommand{\textsuperscript}[1]{##1}%
\renewcommand{\textsubscript}[1]{##1}%
\renewcommand{\underline}[1]{##1}%
\RenewDocumentCommand{\LWR@htmlspanclass}{o m +m}{##3}%
-\DeclareExpandableDocumentCommand{\InlineClass}{+o +m +m}{##3}%
-\DeclareRobustCommand{\LWR@HTMLtextstyle}[3]{##3}%
+\DeclareExpandableDocumentCommand{\InlineClass}{D{(}{)}{} o m +m}{##4}%
\def\(##1\){}%
\def\[##1\]{}%
\RenewDocumentCommand{\LWR@subsingledollar}{s m m m}{}%
@@ -10707,13 +10801,26 @@ width:\LWR@printlength{\LWR@tempwidth}%
\newcommand*{\LWR@f@series}{md}
\newcommand*{\LWR@f@shape}{up}
+\newcounter{LWR@textcurrentfontdepth}
+\setcounter{LWR@textcurrentfontdepth}{0}
+
\newcommand*{\LWR@textcurrentfont}[1]{%
-\InlineClass{%
- text\LWR@f@family\LWR@origtilde{}%
- text\LWR@f@series\LWR@origtilde{}%
- text\LWR@f@shape%
- }%
- {#1}%
+ \ifnumcomp{\value{LWR@textcurrentfontdepth}}{>}{0}%
+ {%
+ \addtocounter{LWR@textcurrentfontdepth}{1}%
+ #1%
+ \addtocounter{LWR@textcurrentfontdepth}{-1}%
+ }%
+ {%
+ \addtocounter{LWR@textcurrentfontdepth}{1}%
+ \InlineClass{%
+ text\LWR@f@family\LWR@origtilde{}%
+ text\LWR@f@series\LWR@origtilde{}%
+ text\LWR@f@shape%
+ }%
+ {#1}%
+ \addtocounter{LWR@textcurrentfontdepth}{-1}%
+ }%
}
\newenvironment*{LWR@blocktextcurrentfont}{%
@@ -10740,6 +10847,8 @@ width:\LWR@printlength{\LWR@tempwidth}%
\renewrobustcmd*{\scshape}{\renewcommand*{\LWR@f@shape}{sc}}
+\renewrobustcmd*{\slshape}{\renewcommand*{\LWR@f@shape}{sl}}
+
\renewrobustcmd*{\normalfont}{\rmfamily\mdseries\upshape}
@@ -10765,15 +10874,15 @@ width:\LWR@printlength{\LWR@tempwidth}%
\AtBeginDocument{\let\fup\textsuperscript}
\renewcommand{\underline}[1]{%
-\LWR@HTMLtextstyle%
- {text-decoration:underline; text-decoration-skip: auto}%
- {underline}{#1}%
+ \InlineClass%
+ (text-decoration:underline; text-decoration-skip: auto)%
+ {underline}{#1}%
}
\newcommand{\LWR@overline}[1]{%
-\LWR@HTMLtextstyle%
- {text-decoration:overline; text-decoration-skip: auto}%
- {overline}{#1}%
+ \InlineClass%
+ (text-decoration:overline; text-decoration-skip: auto)%
+ {overline}{#1}%
}
\newcommand*{\LWR@currenttextcolor}{black}
@@ -10789,6 +10898,14 @@ width:\LWR@printlength{\LWR@tempwidth}%
\end{warpHTML}
+\begin{warpprint}
+
+\newcommand*{\LWR@textcurrentfont}[1]{#1}
+
+\newenvironment*{LWR@blocktextcurrentfont}{}{}
+
+\end{warpprint}
+
\begin{warpHTML}
\AtBeginDocument{
@@ -10852,9 +10969,11 @@ width:\LWR@printlength{\LWR@tempwidth}%
\LetLtxMacro\newline\LWR@newlinebr
\LetLtxMacro\LWR@origendofline\\
-\NewDocumentCommand{\LWR@endofline}{s o}
+\NewDocumentCommand{\LWR@endofline}{s O{0pt}}
{%
\newline%
+\setlength{\LWR@templengthone}{#2}%
+\ifdimgreater{\LWR@templengthone}{0pt}{\newline}{}%
}
\newcommand*{\LWR@minipagestartpars}{%
@@ -11009,70 +11128,111 @@ width:\LWR@printlength{\LWR@tempwidth}%
\begin{warpHTML}
-\let\LWR@origTeX\TeX
+\LetLtxMacro\LWR@origTeX\TeX
-\newcommand*{\LWR@TeX}
+\newrobustcmd*{\LWR@TeX}
{%
\InlineClass{latexlogofont}%
{%
- \LWR@HTMLtextstyle%
- {text-transform:uppercase}%
- {latexlogo}%
- {T\textsubscript{e}X}%
+ \InlineClass{latexlogo}%
+ {%
+ T%
+ \InlineClass{latexlogosub}{e}%
+ X%
+ }%
}%
}
-\let\LWR@origLaTeX\LaTeX
+\LetLtxMacro\LWR@origLaTeX\LaTeX
-\newcommand*{\LWR@LaTeX}
+\newrobustcmd*{\LWR@LaTeX}
{%
\InlineClass{latexlogofont}%
{%
- \LWR@HTMLtextstyle%
- {text-transform:uppercase}%
- {latexlogo}%
- {L\textsuperscript{a}T\textsubscript{e}X}%
+ \InlineClass{latexlogo}%
+ {%
+ L%
+ \InlineClass{latexlogosup}{a}%
+ T%
+ \InlineClass{latexlogosub}{e}%
+ X%
+ }%
+ }%
+}
+
+\LetLtxMacro\LWR@origLaTeXe\LaTeXe
+
+\renewrobustcmd*{\LaTeXe}
+{%
+ \LaTeX%
+ \InlineClass{latexlogofont}{%
+ \InlineClass{latexlogotwoe}{%
+ 2%
+ \InlineClass{latexlogotwoesub}{\HTMLunicode{03B5}}%
+ }%
}%
}
+\newrobustcmd*{\LWR@LuaTeX}{\InlineClass{latexlogofont}{Lua}\TeX}
+\newrobustcmd*{\LWR@LuaLaTeX}{\InlineClass{latexlogofont}{Lua}\LaTeX}
+\newrobustcmd*{\Xe}
+ {%
+ X%
+ \InlineClass{xelatexlogosub}{\HTMLunicode{18e}}%
+ }
-\let\LWR@origLaTeXe\LaTeXe
+\newrobustcmd*{\LWR@XeTeX}{\InlineClass{xelatexlogo}{\Xe}\TeX}
-\renewcommand*{\LaTeXe}
-{\LaTeX\InlineClass{latexlogofont}%
-{\,2\textsubscript{\textit{\HTMLunicode{3B5}}}}}
-\newcommand*{\LWR@LuaTeX}{\InlineClass{latexlogofont}{Lua}\TeX}
-\newcommand*{\LWR@LuaLaTeX}{\InlineClass{latexlogofont}{Lua}\LaTeX}
-\newcommand*{\Xe}
- {X\textsubscript{\HTMLunicode{18e}}}
-\newcommand*{\LWR@XeTeX}{\InlineClass{xetexlogo}{\Xe}\TeX}
-\newcommand*{\LWR@XeLaTeX}{\InlineClass{xelatexlogo}{\Xe}\LaTeX}
-\newcommand*{\LWR@ConTeXt}
+\newrobustcmd*{\LWR@XeLaTeX}{\InlineClass{xelatexlogo}{\Xe}\LaTeX}
+\newrobustcmd*{\LWR@ConTeXt}
{\InlineClass{latexlogofont}{Con}\TeX{}%
\InlineClass{latexlogofont}{t}}
-\providecommand*{\BibTeX}
+\providerobustcmd*{\BibTeX}
{\InlineClass{latexlogofont}{B\textsc{ib}}\TeX}
-\newcommand*{\MakeIndex}
+\newrobustcmd*{\MakeIndex}
{\InlineClass{latexlogofont}{\textit{MakeIndex}}}
-\AtBeginDocument{\DeclareDocumentCommand{\AmS}{}
-{\InlineClass{amslogo}{\textit{A\textsubscript{M}S}}}}
-\newcommand*{\MiKTeX}{\InlineClass{latexlogofont}{MiK}\TeX}
-\newcommand*{\LyX}{\InlineClass{lyxlogo}{LyX}}
+\AtBeginDocument{%
+\DeclareDocumentCommand{\AmS}{}
+{%
+ \InlineClass{amslogo}{%
+ \textit{%
+ A%
+ \InlineClass{latexlogosub}{M}%
+ S%
+ }%
+ }%
+}%
+}
+\newrobustcmd*{\MiKTeX}{\InlineClass{latexlogofont}{MiK}\TeX}
+\newrobustcmd*{\LyX}{\InlineClass{lyxlogo}{LyX}}
\end{warpHTML}
\begin{warpprint}
-\newcommand*{\XeTeXrevE}
- {\hspace{-.1667em}\raisebox{-.5ex}{\reflectbox{E}}\hspace{-.125em}}
-\providecommand*{\XeTeX}{\mbox{X\XeTeXrevE\TeX}}
-\providecommand*{\XeLaTeX}{\mbox{X\XeTeXrevE\LaTeX}}
-\providecommand*{\AmS}{%
-\leavevmode\hbox{$\mathcal A\kern-.2em\lower.376ex%
-\hbox{$\mathcal M$}\kern-.2em\mathcal S$}}
-\newcommand*{\LyX}{\textsf{LyX}}
-\providecommand*{\LuaTeX}{\mbox{Lua\TeX}}
-\providecommand*{\LuaLaTeX}{\mbox{Lua\LaTeX}}
-\providecommand*{\BibTeX}{\mbox{B\textsc{ib}\TeX}}
-\providecommand*{\MakeIndex}{\mbox{\textit{MakeIndex}}}
-\providecommand*{\ConTeXt}{\mbox{Con\TeX{}t}}
-\providecommand*{\MiKTeX}{\mbox{MiK\TeX}}
+
+\newrobustcmd*{\XeTeXrevE}
+ {\hspace{-.1667em}\raisebox{-.5ex}{E}\hspace{-.125em}}
+
+\AtBeginDocument{
+\@ifpackageloaded{graphics}{
+ \renewrobustcmd*{\XeTeXrevE}
+ {\hspace{-.1667em}\raisebox{-.5ex}{\reflectbox{E}}\hspace{-.125em}}
+}{
+ \PackageWarning{lwarp}{Load graphicx or graphics
+ for improved XeTeX logo}
+}
+}
+
+\providerobustcmd*{\XeTeX}{\mbox{X\XeTeXrevE\TeX}}
+\providerobustcmd*{\XeLaTeX}{\mbox{X\XeTeXrevE\LaTeX}}
+\providerobustcmd*{\AmS}{%
+ \leavevmode\hbox{$\mathcal A\kern-.2em\lower.376ex%
+ \hbox{$\mathcal M$}\kern-.2em\mathcal S$}%
+}
+\newrobustcmd*{\LyX}{\textsf{LyX}}
+\providerobustcmd*{\LuaTeX}{\mbox{Lua\TeX}}
+\providerobustcmd*{\LuaLaTeX}{\mbox{Lua\LaTeX}}
+\providerobustcmd*{\BibTeX}{\mbox{B\textsc{ib}\TeX}}
+\providerobustcmd*{\MakeIndex}{\mbox{\textit{MakeIndex}}}
+\providerobustcmd*{\ConTeXt}{\mbox{Con\TeX{}t}}
+\providerobustcmd*{\MiKTeX}{\mbox{MiK\TeX}}
\end{warpprint}
@@ -11093,7 +11253,23 @@ width:\LWR@printlength{\LWR@tempwidth}%
\@ifclassloaded{memoir}{\RequirePackage{lwarp-patch-memoir}}{}
\end{warpHTML}
+\begin{warpHTML}
+\AtBeginDocument{
+ \@ifpackageloaded{ctexpatch}{%
+ \def\@partcntformat#1{%
+ \LWR@isolate{\CTEX@partname}~%
+ \CTEX@part@aftername%
+ }%
+
+ \def\@partnameformat{}
+ \def\@chapcntformat#1{%
+ \LWR@isolate{\CTEX@chaptername}~%
+ \CTEX@chapter@aftername%
+ }%
+ }{}
+}
+\end{warpHTML}
\endinput
%%
%% End of file `lwarp.sty'.