diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/lwarp/lwarp.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/lwarp/lwarp.sty | 824 |
1 files changed, 500 insertions, 324 deletions
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp.sty index 115f6dcf1e4..0ad1c8aa5b0 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/11/19 v0.62 Allows LaTeX to directly produce HTML5 output.] + [2018/12/03 v0.63 Allows LaTeX to directly produce HTML5 output.] @@ -41,278 +41,12 @@ \fi \RequirePackage{ifpdf} -\newcommand{\LWR@mdfive}[1]{% -\PackageError{lwarp} -{No MD5 macro was found.} -{Lwarp must find the macros pdfmdfivesum or mdfivesum.} -} - -\ifPDFTeX% pdflatex or dvi latex -\let\LWR@mdfive\pdfmdfivesum -\fi - -\ifLuaTeX -\RequirePackage{pdftexcmds} -\let\LWR@mdfive\pdf@mdfivesum -\fi - -\ifXeTeX -\@ifundefined{pdffivesum}{} - {\let\LWR@mdfive\pdfmdfivesum} -\@ifundefined{mdfivesum}{} - {\let\LWR@mdfive\mdfivesum} -\fi -\ifPDFTeX% pdflatex or dvi latex -\RequirePackage[T1]{fontenc} - -\@ifpackageloaded{inputenc}{}{ - \@ifpackageloaded{inputenx}{}{ - \RequirePackage[utf8]{inputenc} - } -} -\fi -\RequirePackage{newunicodechar} - -\newunicodechar{⨯}{\texttimes} - -\ifPDFTeX% pdflatex or dvi latex -\newunicodechar{ff}{ff}% the first arguments are ligatures -\newunicodechar{fi}{fi} -\newunicodechar{fl}{fl} -\newunicodechar{ffi}{ffi} -\newunicodechar{ffl}{ffl} -\newunicodechar{—}{---} -\newunicodechar{–}{--} -\RequirePackage{upquote} -\else -\fi -\newcommand*\LWR@providelength[1]{% - \ifdeflength{#1}{}{\newlength{#1}}% -} -\newcommand*{\LWR@convertto}[2]{\strip@pt\dimexpr #2*65536/\number\dimexpr 1#1} - -\newcommand*{\LWR@patcherror}[2]{% -\PackageError{lwarp} -{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{ifptex} \RequirePackage{etoolbox}[2011/01/03]% v2.6 for \BeforeBeginEnvironment, etc. \RequirePackage{xpatch} \RequirePackage{ifplatform}% sense op-system platform \RequirePackage{letltxmacro} - -\let\LWRpercent\@percentchar -\catcode`\$=12 -\def\LWRdollar{$} -\catcode`\$=3 -\catcode`\&=12 -\def\LWRamp{&} -\catcode`\&=4 -\catcode`\&=0 -&catcode`&\=12 -&def&LWRbackslash{\} -&catcode`&\=0 -\catcode`\&=4 -\catcode`\#=12 -\def\LWRhash{#} -\catcode`\#=6 -\def\LWRopquote{'} -\def\LWRopseq{\space\LWRamp\LWRamp\space\space} -\newbool{usingOSWindows} -\boolfalse{usingOSWindows} - - -\newcommand*{\OSPathSymbol}{/} - - -\newcommand*{\LWR@setOSWindows} -{ -\booltrue{usingOSWindows} -\renewcommand*{\OSPathSymbol}{\@backslashchar} -\def\LWRopquote{"} -\def\LWRopseq{\space\LWRamp\space\space} -} -\ifwindows -\LWR@setOSWindows -\fi - - -\RequirePackage{kvoptions} -\SetupKeyvalOptions{family=LWR,prefix=LWR@} - -\newcommand{\lwarpsetup}[1]{\setkeys{LWR}{#1}} - -\newbool{warpingprint} -\newbool{warpingHTML} -\newbool{mathjax} -\newbool{LWR@origmathjax} -\booltrue{warpingprint}% -\boolfalse{warpingHTML}% -\boolfalse{mathjax}% -\DeclareVoidOption{warpprint}{% -\PackageInfo{lwarp}{Using option 'warpprint'} -\booltrue{warpingprint}% -\boolfalse{warpingHTML}% -} - -\DeclareVoidOption{warpHTML}{% -\PackageInfo{lwarp}{Using option 'warpHTML'}% -\booltrue{warpingHTML}% -\boolfalse{warpingprint}% -} - -\DeclareVoidOption{mathsvg}{% -\PackageInfo{lwarp}{Using option 'mathsvg'} -\boolfalse{mathjax}% -\boolfalse{LWR@origmathjax}% -} -\DeclareVoidOption{mathjax}{% -\PackageInfo{lwarp}{Using option 'mathjax'} -\booltrue{mathjax}% -\booltrue{LWR@origmathjax}% -} - - -\DeclareStringOption[\jobname]{BaseJobname} - -\DeclareStringOption[lwarp.ist]{makeindexStyle} - -\DeclareStringOption[lwarp.xdy]{xindyStyle} - -\DeclareStringOption[english]{xindyLanguage} - -\DeclareStringOption[utf8]{xindyCodepage} - -\DeclareStringOption[UTF-8]{pdftotextEnc} - -\newbool{LWR@creatinglwarpmk} -\boolfalse{LWR@creatinglwarpmk} - -\DeclareVoidOption{lwarpmk}{ -\PackageInfo{lwarp}{Using option 'lwarpmk'} -\booltrue{LWR@creatinglwarpmk} -} - -\DeclareVoidOption{OSWindows}{ -\PackageInfo{lwarp}{Using option 'OSWindows'} -\LWR@setOSWindows -} - -\DeclareStringOption[]{HomeHTMLFilename} - -\DeclareStringOption[]{HTMLFilename} - -\DeclareStringOption[]{PrintLatexCmd} - -\DeclareStringOption[]{HTMLLatexCmd} - -\DeclareStringOption[]{PrintIndexCmd} - -\DeclareStringOption[]{HTMLIndexCmd} - -\DeclareStringOption[]{LatexmkIndexCmd} - -\DeclareBoolOption[false]{makeindex} - -\DeclareBoolOption[false]{xindy} - -\DeclareStringOption[makeglossaries]{GlossaryCmd} - -\DeclareBoolOption[false]{latexmk} - -\DeclareBoolOption[false]{dvips} - -\DeclareBoolOption[false]{dvipdfm} - -\DeclareBoolOption[false]{dvipdfmx} - -\ProcessKeyvalOptions*\relax - -\providecommand*{\BaseJobname}{\LWR@BaseJobname} - -\ifcsempty{LWR@HomeHTMLFilename}{ -\newcommand*{\HomeHTMLFilename}{\BaseJobname} -}{ -\csedef{HomeHTMLFilename}{\LWR@HomeHTMLFilename} -} - -\csedef{HTMLFilename}{\LWR@HTMLFilename} -\ifdefempty{\LWR@PrintIndexCmd}{ - \renewcommand{\LWR@PrintIndexCmd}{% - makeindex -s \LWR@makeindexStyle \space \jobname.idx% - } - \ifbool{LWR@xindy}{ - \renewcommand{\LWR@PrintIndexCmd}{% - xindy - -M \LWR@xindyStyle \space - -L \LWR@xindyLanguage \space - -C \LWR@xindyCodepage \space - \jobname.idx% - } - }{} -}{} - -\ifdefempty{\LWR@HTMLIndexCmd}{ - \renewcommand{\LWR@HTMLIndexCmd}{% - makeindex -s \LWR@makeindexStyle \space \jobname_html.idx% - } - \ifbool{LWR@xindy}{ - \renewcommand{\LWR@HTMLIndexCmd}{% - xindy - -M \LWR@xindyStyle \space - -L \LWR@xindyLanguage \space - -C \LWR@xindyCodepage \space - \jobname_html.idx% - } - }{} -}{} - -\ifdefempty{\LWR@LatexmkIndexCmd}{ - \renewcommand{\LWR@LatexmkIndexCmd}{% - makeindex -s \LWR@makeindexStyle% - } - \ifbool{LWR@xindy}{ - \renewcommand{\LWR@LatexmkIndexCmd}{% - xindy - -M \LWR@xindyStyle \space - -L \LWR@xindyLanguage \space - -C \LWR@xindyCodepage% - } - }{} -}{} -\newcommand{\warpprintonly}[1]{\ifbool{warpingprint}{#1}{}} -\newcommand{\warpHTMLonly}[1]{\ifbool{warpingHTML}{#1}{}} -\RequirePackage{comment} - -\ifbool{warpingHTML}{ -\def\DefaultCutFileName{\def\CommentCutFile{comment_html.cut}} -}{} - -\ifbool{warpingprint}{ -\def\DefaultCutFileName{\def\CommentCutFile{comment_print.cut}} -}{} - -\includecomment{warpall} - -\ifbool{warpingHTML} -{\includecomment{warpHTML}} -{\excludecomment{warpHTML}}% - -\ifbool{warpingprint} -{\includecomment{warpprint}} -{\excludecomment{warpprint}} - - -\ifbool{LWR@creatinglwarpmk} -{\includecomment{LWR@createlwarpmk}} -{\excludecomment{LWR@createlwarpmk}} - \newcommand*{\LWR@loadafter}[1]{% \@ifpackageloaded{#1} { @@ -329,6 +63,21 @@ after lwarp.} {\newcommand*{\LWR@notmemoirloadafter}[1]{}} {\LetLtxMacro\LWR@notmemoirloadafter\LWR@loadafter} +\LetLtxMacro\LWR@notbxjsloadafter\LWR@loadafter + +\@ifclassloaded{bxjsarticle}{\renewcommand*{\LWR@notbxjsloadafter}[1]{}}{} +\@ifclassloaded{bxjsbook}{\renewcommand*{\LWR@notbxjsloadafter}[1]{}}{} +\@ifclassloaded{bxjsreport}{\renewcommand*{\LWR@notbxjsloadafter}[1]{}}{} +\@ifclassloaded{bxjsslide}{\renewcommand*{\LWR@notbxjsloadafter}[1]{}}{} + +\LetLtxMacro\LWR@notltjsloadafter\LWR@loadafter + +\@ifclassloaded{ltjsarticle}{\renewcommand*{\LWR@notltjsloadafter}[1]{}}{} +\@ifclassloaded{ltjsbook}{\renewcommand*{\LWR@notltjsloadafter}[1]{}}{} +\@ifclassloaded{ltjsreport}{\renewcommand*{\LWR@notltjsloadafter}[1]{}}{} +\@ifclassloaded{ltjspf}{\renewcommand*{\LWR@notltjsloadafter}[1]{}}{} +\@ifclassloaded{ltjsiyou}{\renewcommand*{\LWR@notltjsloadafter}[1]{}}{} + \newcommand*{\LWR@loadbefore}[1]{% \@ifpackageloaded{#1} {} @@ -339,6 +88,13 @@ after lwarp.} } } +\newcommand*{\LWR@checkloadbefore}[2]{% + \edef\LWR@tempone{#1}% + \ifdefstring{\LWR@tempone}{#2}{% + \LWR@loadbefore{#1}% + }{}% +} + \newcommand*{\LWR@loadnever}[2]{% \PackageError{lwarp} {Package #1 is not supported by lwarp's HTML conversion. @@ -347,6 +103,12 @@ Package(s) #2 may be useful instead} or is superceded by another package. For a possible alternative, see package(s) #2.} } +\newcommand*{\LWR@checkloadnever}[3]{% + \edef\LWR@tempone{#1}% + \ifdefstring{\LWR@tempone}{#2}{% + \LWR@loadnever{#2}{#3}% + }{}% +} \newcommand*{\LWR@earlyloadnever}[2]{% \@ifpackageloaded{#1}{% \PackageError{lwarp} @@ -357,6 +119,19 @@ or is superceded by another package. For a possible alternative, see package(s) #2.} }{}% } +\newcommand*{\LWR@earlyclassloadnever}[2]{% +\@ifclassloaded{#1}{% +\PackageError{lwarp} +{Class #1 is not supported by lwarp's HTML conversion. +Class(es) #2 may be useful instead} +{Class #1 might conflict with lwarp in some way, +or is superceded by another class. +For a possible alternative, see class(es) #2.} +}{}% +} +\LWR@earlyclassloadnever{utarticle}{ujarticle} +\LWR@earlyclassloadnever{utbook}{ujbook} +\LWR@earlyclassloadnever{utreport}{ujreport} \LWR@earlyloadnever{ae}{cm-super, lmodern} \LWR@earlyloadnever{aecompl}{cm-super, lmodern} \LWR@earlyloadnever{aecc}{cm-super, lmodern} @@ -366,6 +141,8 @@ For a possible alternative, see package(s) #2.} \LWR@earlyloadnever{CJK}{ctex, xeCJK} \LWR@earlyloadnever{CJKutf8}{ctex, xeCJK} } +\LWR@earlyloadnever{bxcjkjatype}{pLaTeX, upLaTeX, bxjsarticle, ujarticle} +\LWR@earlyloadnever{hangul}{kotex, xetexko, luatexko} \LWR@earlyloadnever{fancyheadings}{fancyhdr} \LWR@earlyloadnever{glossary}{glossaries} \LWR@earlyloadnever{t1enc}{fontenc, inputenc, inputenx} @@ -502,7 +279,7 @@ For a possible alternative, see package(s) #2.} \LWR@loadafter{fullpage} \LWR@loadafter{fullwidth} \LWR@loadafter{fwlw} -\LWR@loadafter{geometry} +\LWR@notbxjsloadafter{geometry} \LWR@loadafter{glossaries} \LWR@loadafter{glossary} \LWR@loadafter{grffile} @@ -643,7 +420,7 @@ For a possible alternative, see package(s) #2.} \LWR@loadafter{srcltx} \LWR@loadafter{srctex} \LWR@loadafter{stabular} -\LWR@loadafter{stfloats} +\LWR@notltjsloadafter{stfloats} \LWR@loadafter{subfig} \LWR@loadafter{subfigure} \LWR@loadafter{supertabular} @@ -704,10 +481,291 @@ For a possible alternative, see package(s) #2.} \LWR@loadafter{xltxtra} \LWR@loadafter{xmpincl} \LWR@loadafter{xpiano} +\LWR@loadafter{xpinyin} \LWR@loadafter{xtab} \LWR@loadafter{xurl} \LWR@loadafter{xy} \LWR@loadafter{zwpagelayout} +\newcommand{\LWR@mdfive}[1]{% +\PackageError{lwarp} +{No MD5 macro was found.} +{Lwarp must find the macros pdfmdfivesum or mdfivesum.} +} +\let\LWR@mdfive\pdfmdfivesum +\ifLuaTeX +\RequirePackage{pdftexcmds} +\let\LWR@mdfive\pdf@mdfivesum +\fi +\ifXeTeX +\@ifundefined{pdffivesum}{} + {\let\LWR@mdfive\pdfmdfivesum} +\@ifundefined{mdfivesum}{} + {\let\LWR@mdfive\mdfivesum} +\fi +\newcommand*{\LWR@pdfencoding}{% + \RequirePackage[T1]{fontenc} + + \@ifpackageloaded{inputenc}{}{ + \@ifpackageloaded{inputenx}{}{ + \RequirePackage[utf8]{inputenc} + } + } +} +\ifPDFTeX% pdflatex or dvi latex + \LWR@pdfencoding +\fi + +\ifpTeX + \LWR@pdfencoding +\fi +\ifpTeX +\else +\RequirePackage{newunicodechar} + +\newunicodechar{⨯}{\texttimes} + +\ifPDFTeX% pdflatex or dvi latex +\newunicodechar{ff}{ff}% the first arguments are ligatures +\newunicodechar{fi}{fi} +\newunicodechar{fl}{fl} +\newunicodechar{ffi}{ffi} +\newunicodechar{ffl}{ffl} +\newunicodechar{—}{---} +\newunicodechar{–}{--} +\fi + +\fi +\ifPDFTeX +\RequirePackage{upquote} +\fi + +\ifpTeX + \RequirePackage{upquote} +\fi +\newcommand*\LWR@providelength[1]{% + \ifdeflength{#1}{}{\newlength{#1}}% +} +\newcommand*{\LWR@convertto}[2]{\strip@pt\dimexpr #2*65536/\number\dimexpr 1#1} + +\newcommand*{\LWR@patcherror}[2]{% +\PackageError{lwarp} +{Unable to patch package #1, macro #2} +{Please contact the author of the lwarp package.} +} +\newcommand{\LWR@isolate}[1]{#1}% + +\@ifpackageloaded{ctexpatch}{ + \renewcommand{\LWR@isolate}[1]{\null#1\null}% +}{} + +\@ifpackageloaded{xeCJK}{ + \renewcommand{\LWR@isolate}[1]{\null#1\null}% +}{} +\let\LWRpercent\@percentchar +\catcode`\$=12 +\def\LWRdollar{$} +\catcode`\$=3 +\catcode`\&=12 +\def\LWRamp{&} +\catcode`\&=4 +\catcode`\&=0 +&catcode`&\=12 +&def&LWRbackslash{\} +&catcode`&\=0 +\catcode`\&=4 +\catcode`\#=12 +\def\LWRhash{#} +\catcode`\#=6 +\def\LWRopquote{'} +\def\LWRopseq{\space\LWRamp\LWRamp\space\space} +\newbool{usingOSWindows} +\boolfalse{usingOSWindows} + + +\newcommand*{\OSPathSymbol}{/} + + +\newcommand*{\LWR@setOSWindows} +{ +\booltrue{usingOSWindows} +\renewcommand*{\OSPathSymbol}{\@backslashchar} +\def\LWRopquote{"} +\def\LWRopseq{\space\LWRamp\space\space} +} +\ifwindows +\LWR@setOSWindows +\fi + + +\RequirePackage{kvoptions} +\SetupKeyvalOptions{family=LWR,prefix=LWR@} + +\newcommand{\lwarpsetup}[1]{\setkeys{LWR}{#1}} + +\newbool{warpingprint} +\newbool{warpingHTML} +\newbool{mathjax} +\newbool{LWR@origmathjax} +\booltrue{warpingprint}% +\boolfalse{warpingHTML}% +\boolfalse{mathjax}% +\DeclareVoidOption{warpprint}{% +\PackageInfo{lwarp}{Using option 'warpprint'} +\booltrue{warpingprint}% +\boolfalse{warpingHTML}% +} + +\DeclareVoidOption{warpHTML}{% +\PackageInfo{lwarp}{Using option 'warpHTML'}% +\booltrue{warpingHTML}% +\boolfalse{warpingprint}% +} + +\DeclareVoidOption{mathsvg}{% +\PackageInfo{lwarp}{Using option 'mathsvg'} +\boolfalse{mathjax}% +\boolfalse{LWR@origmathjax}% +} +\DeclareVoidOption{mathjax}{% +\PackageInfo{lwarp}{Using option 'mathjax'} +\booltrue{mathjax}% +\booltrue{LWR@origmathjax}% +} + + +\DeclareStringOption[\jobname]{BaseJobname} + +\DeclareStringOption[lwarp.ist]{makeindexStyle} + +\DeclareStringOption[lwarp.xdy]{xindyStyle} + +\DeclareStringOption[english]{xindyLanguage} + +\DeclareStringOption[utf8]{xindyCodepage} + +\DeclareStringOption[UTF-8]{pdftotextEnc} + +\newbool{LWR@creatinglwarpmk} +\boolfalse{LWR@creatinglwarpmk} + +\DeclareVoidOption{lwarpmk}{ +\PackageInfo{lwarp}{Using option 'lwarpmk'} +\booltrue{LWR@creatinglwarpmk} +} + +\DeclareVoidOption{OSWindows}{ +\PackageInfo{lwarp}{Using option 'OSWindows'} +\LWR@setOSWindows +} + +\DeclareStringOption[]{HomeHTMLFilename} + +\DeclareStringOption[]{HTMLFilename} + +\DeclareStringOption[]{PrintLatexCmd} + +\DeclareStringOption[]{HTMLLatexCmd} + +\DeclareStringOption[]{PrintIndexCmd} + +\DeclareStringOption[]{HTMLIndexCmd} + +\DeclareStringOption[]{LatexmkIndexCmd} + +\DeclareBoolOption[false]{makeindex} + +\DeclareBoolOption[false]{xindy} + +\DeclareStringOption[makeglossaries]{GlossaryCmd} + +\DeclareBoolOption[false]{latexmk} + +\DeclareBoolOption[false]{dvips} + +\DeclareBoolOption[false]{dvipdfm} + +\DeclareBoolOption[false]{dvipdfmx} + +\ProcessKeyvalOptions*\relax + +\providecommand*{\BaseJobname}{\LWR@BaseJobname} + +\ifcsempty{LWR@HomeHTMLFilename}{ +\newcommand*{\HomeHTMLFilename}{\BaseJobname} +}{ +\csedef{HomeHTMLFilename}{\LWR@HomeHTMLFilename} +} + +\csedef{HTMLFilename}{\LWR@HTMLFilename} +\ifdefempty{\LWR@PrintIndexCmd}{ + \renewcommand{\LWR@PrintIndexCmd}{% + makeindex -s \LWR@makeindexStyle \space \jobname.idx% + } + \ifbool{LWR@xindy}{ + \renewcommand{\LWR@PrintIndexCmd}{% + xindy + -M \LWR@xindyStyle \space + -L \LWR@xindyLanguage \space + -C \LWR@xindyCodepage \space + \jobname.idx% + } + }{} +}{} + +\ifdefempty{\LWR@HTMLIndexCmd}{ + \renewcommand{\LWR@HTMLIndexCmd}{% + makeindex -s \LWR@makeindexStyle \space \jobname_html.idx% + } + \ifbool{LWR@xindy}{ + \renewcommand{\LWR@HTMLIndexCmd}{% + xindy + -M \LWR@xindyStyle \space + -L \LWR@xindyLanguage \space + -C \LWR@xindyCodepage \space + \jobname_html.idx% + } + }{} +}{} + +\ifdefempty{\LWR@LatexmkIndexCmd}{ + \renewcommand{\LWR@LatexmkIndexCmd}{% + makeindex -s \LWR@makeindexStyle% + } + \ifbool{LWR@xindy}{ + \renewcommand{\LWR@LatexmkIndexCmd}{% + xindy + -M \LWR@xindyStyle \space + -L \LWR@xindyLanguage \space + -C \LWR@xindyCodepage% + } + }{} +}{} +\newcommand{\warpprintonly}[1]{\ifbool{warpingprint}{#1}{}} +\newcommand{\warpHTMLonly}[1]{\ifbool{warpingHTML}{#1}{}} +\RequirePackage{comment} + +\ifbool{warpingHTML}{ +\def\DefaultCutFileName{\def\CommentCutFile{comment_html.cut}} +}{} + +\ifbool{warpingprint}{ +\def\DefaultCutFileName{\def\CommentCutFile{comment_print.cut}} +}{} + +\includecomment{warpall} + +\ifbool{warpingHTML} +{\includecomment{warpHTML}} +{\excludecomment{warpHTML}}% + +\ifbool{warpingprint} +{\includecomment{warpprint}} +{\excludecomment{warpprint}} + + +\ifbool{LWR@creatinglwarpmk} +{\includecomment{LWR@createlwarpmk}} +{\excludecomment{LWR@createlwarpmk}} \begin{warpHTML} @@ -735,10 +793,14 @@ For a possible alternative, see package(s) #2.} \end{warpHTML} \begin{warpHTML} -\RequirePackage[paperheight=190in,paperwidth=20in,% -left=2in,right=6in,% -top=1in,bottom=1in,% -]{geometry} +\RequirePackage{geometry} +\geometry{ + paperheight=190in,% + paperwidth=20in,% + left=2in,right=6in,% + top=1in,bottom=1in,% +} + \@twosidefalse \@mparswitchfalse \end{warpHTML} @@ -760,6 +822,8 @@ top=1in,bottom=1in,% \RequirePackage{gettitlestring} +\@ifundefined{bxjs@everypar}{}{\let\everypar\bxjs@everypar} + \RequirePackage{everyhook} \end{warpHTML} @@ -833,6 +897,32 @@ top=1in,bottom=1in,% \newcommand*{\LWR@parsedrequirepackagenames}{} +\newcommand*{\LWR@checkloadfilename}[1]{% +\LWR@checkloadnever{#1}{ae}{latinmodern} +\LWR@checkloadnever{#1}{aecc}{latinmodern} +\LWR@checkloadnever{#1}{boxedminipage}{boxedminipage2e} +\LWR@checkloadnever{#1}{caption2}{caption} +\LWR@checkloadnever{#1}{ccaption}{caption} +\LWR@checkloadnever{#1}{fancyheadings}{fancyhdr} +\LWR@checkloadnever{#1}{glossary}{glossaries} +\LWR@checkloadnever{#1}{t1enc}{fontenc, inputenc, inputenx} +\LWR@checkloadnever{#1}{wasysym}{textcomp, amssymb, amsfonts, mnsymbol, fdsymbol} +\LWR@checkloadbefore{#1}{ctex} +\LWR@checkloadbefore{#1}{fontspec} +\LWR@checkloadbefore{#1}{inputenc} +\LWR@checkloadbefore{#1}{inputenx} +\LWR@checkloadbefore{#1}{kotex} +\LWR@checkloadbefore{#1}{luatexja} +\LWR@checkloadbefore{#1}{luatexja-fontspec} +\LWR@checkloadbefore{#1}{luatexko} +\LWR@checkloadbefore{#1}{morewrites} +\LWR@checkloadbefore{#1}{newclude} +\LWR@checkloadbefore{#1}{newunicodechar} +\LWR@checkloadbefore{#1}{xeCJK} +\LWR@checkloadbefore{#1}{xetexko} +\LWR@checkloadbefore{#1}{zxjatype} +} + \newcommand*\LWR@findword[3][,]{% \StrBetween[#3,\numexpr#3+1]{#1#2#1}{#1}{#1}% } @@ -840,9 +930,9 @@ top=1in,bottom=1in,% \LWR@findword{\LWR@requirepackagenames}{#1}[\LWR@strresult]% \StrSubstitute[100]{\LWR@strresult}{ }{}[\LWR@strresulttwo]% \IfStrEq{\LWR@strresulttwo}{}% -{% -}% no filename -{% yes filename +{}% no filename +{% yes filename was found +\LWR@checkloadfilename{\LWR@strresulttwo}% \IfFileExists{lwarp-\LWR@strresulttwo.sty}% {% lwarp-* file found \ifdefvoid{\LWR@parsedrequirepackagenames}{% @@ -1383,6 +1473,16 @@ top=1in,bottom=1in,% \@percentchar S% } } +\newcommand*{\LWR@compileuplatex}{ + \def\LWR@tempprintlatexcmd{% + \LWR@compilecmd{uplatex}{} + \LWR@addcompilecmd{dvipdfmx}{} + } + \def\LWR@tempHTMLlatexcmd{% + \LWR@compilecmd{uplatex}{_html} + \LWR@addcompilecmd{dvipdfmx}{_html} + } +} \ifbool{LWR@latexmk}{ \ifpdf \ifPDFTeX @@ -1473,12 +1573,15 @@ top=1in,bottom=1in,% \fi% \ifXeTeX \fi% \ifpdf }% latexmk - \ifdefempty{\LWR@PrintLatexCmd}{ - \def\LWR@PrintLatexCmd{\LWR@tempprintlatexcmd} - }{} - \ifdefempty{\LWR@HTMLLatexCmd}{ - \def\LWR@HTMLLatexCmd{\LWR@tempHTMLlatexcmd} - }{} +\@ifclassloaded{ujarticle}{\LWR@compileuplatex}{} +\@ifclassloaded{ujbook}{\LWR@compileuplatex}{} +\@ifclassloaded{ujreport}{\LWR@compileuplatex}{} +\ifdefempty{\LWR@PrintLatexCmd}{ + \def\LWR@PrintLatexCmd{\LWR@tempprintlatexcmd} +}{} +\ifdefempty{\LWR@HTMLLatexCmd}{ + \def\LWR@HTMLLatexCmd{\LWR@tempHTMLlatexcmd} +}{} \newcommand{\LWR@writeconf}[1]{ \ifcsdef{LWR@quickfile}{}{\newwrite{\LWR@quickfile}} \immediate\openout\LWR@quickfile=#1 @@ -1629,6 +1732,10 @@ span.overline { text-decoration-skip: auto ; } +/* for vertical text: */ +div.verticalrl { writing-mode: vertical-rl } +div.horizontaltb { writing-mode: horizontal-tb } + /* for diagbox */ div.diagboxtitleN { border-bottom: 1px solid gray } div.diagboxtitleS { border-top: 1px solid gray } @@ -2173,12 +2280,8 @@ div.wpminipage { border: 1px solid green ; margin: .5ex ; padding: .5ex ;} } .mdframed { -/* padding: 0ex ; */ -/* border: 1px solid blafck; */ -/* border-radius: 0px ; */ padding: 0ex ; - margin: 3ex 5% 3ex 5% ; -/* display: inline-block ; */ + margin: 2ex 0em 2ex 0em ; } .mdframed p { padding: 0ex .5em 0ex .5em ; } @@ -2186,27 +2289,23 @@ div.wpminipage { border: 1px solid green ; margin: .5ex ; padding: .5ex ;} .mdframed dl { padding: 0ex .5em 0ex .5em ; } .mdframedtitle { - padding: .5em ; + padding: .5ex 0pt 0pt 0pt ; + border-radius: 10pt 10pt 0pt 0pt ; display: block ; - font-size: 130% ; margin-bottom: 1ex ; } .mdframedsubtitle { - padding: 0ex .5em 0ex .5em ; display: block ; - font-size: 115% ; } .mdframedsubsubtitle { - padding: 0ex .5em 0ex .5em ; display: block ; } .mdtheorem { padding: 0ex .5em 0ex .5em ; margin: 3ex 5% 3ex 5% ; -/* display: inline-block ; */ } /* framed package */ @@ -3540,7 +3639,7 @@ src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.4/MathJax.js?config=TeX- -- Copyright 2016-2018 Brian Dunn -printversion = "v0.62" +printversion = "v0.63" requiredconfversion = "1" -- also at *lwarpmk.conf function printhelp () @@ -4635,12 +4734,36 @@ end -- not --version \end{warpHTML} +\begin{warpall} + +\newcommand{\linkhomename}{Home} + +\end{warpall} + \begin{warpHTML} \newcommand*{\LinkHome}{% -\LWR@subhyperrefclass{\HomeHTMLFilename.html}{Home}{linkhome}% +\LWR@subhyperrefclass{\HomeHTMLFilename.html}{\linkhomename}{linkhome}% +} + +\end{warpHTML} + +\begin{warpprint} + +\AtBeginDocument{ +\@ifundefined{hyperref}{ + \newcommand*{\LinkHome}{\linkhomename\ --- page \pageref{page-LWRfirstpage}} +}{ + \newcommand*{\LinkHome}{\hyperref[page-LWRfirstpage]{\linkhomename}} +} } +\AfterEndPreamble{\label{page-LWRfirstpage}} + +\end{warpprint} + +\begin{warpHTML} + \newcommand*{\LWR@topnavigation}{ \LWR@htmlelementclassline{nav}{topnavigation}{\LinkHome} } @@ -4874,7 +4997,7 @@ end -- not --version \begingroup% \LWR@FBcancel% \ifmmode\else\protect\LWR@origttfamily\fi% -\LWR@print@mbox{\LWR@origtextless{}!{-}{-}}% +\LWR@print@mbox{\LWR@origtextless{}!-\/-}% \endgroup% }% } @@ -4884,7 +5007,7 @@ end -- not --version \begingroup% \LWR@FBcancel% \ifmmode\else\protect\LWR@origttfamily\fi% -\LWR@print@mbox{{-}{-}\LWR@origtextgreater}% +\LWR@print@mbox{-\/-\LWR@origtextgreater}% \endgroup% }% } @@ -4909,8 +5032,16 @@ end -- not --version \NewDocumentCommand{\LWR@subhtmlelementclass}{m O{} m}{% \LWR@traceinfo{LWR@subhtmlelementclass !#1!#2!#3!}% \ifblank{#2}% -{\LWR@htmltag{#1 class="#3"}}% empty option -{\LWR@htmltag{#1 class="#3" style="#2"}}% non-empty option +{% empty option + \LWR@htmltag{#1 class=\textquotedbl#3\textquotedbl}% +}% +{% non-empty option + \LWR@htmltag{% + #1 % space + class=\textquotedbl#3\textquotedbl\ % space + style=\textquotedbl#2\textquotedbl% + }% +}% \LWR@traceinfo{LWR@subhtmlelementclass done}% } @@ -5016,15 +5147,17 @@ end -- not --version {% \addtocounter{LWR@thisautoidWP}{1}% \LWR@htmltag{% - div class="#3" % - id="\LWR@print@mbox{autoidWP-\arabic{LWR@thisautoidWP}}"% - \ifblank{#1}{}{ style="#1"}% + div class=\textquotedbl#3\textquotedbl % space + id=\textquotedbl% + \LWR@print@mbox{autoidWP-\arabic{LWR@thisautoidWP}}% + \textquotedbl% + \ifblank{#1}{}{ style=\textquotedbl#1\textquotedbl}% }% }% FormatWP {% not FormatWP \LWR@htmltag{% - div class="#3"% - \ifblank{#2}{}{ style="#2"}% + div class=\textquotedbl#3\textquotedbl% + \ifblank{#2}{}{ style=\textquotedbl#2\textquotedbl}% }% }% not FormatWP \LWR@startpars% @@ -5675,7 +5808,10 @@ end -- not --version } \newcommand*{\LWR@createautosec}[1]{% -\LWR@htmltag{#1 id="\LWR@print@mbox{autosec-\arabic{page}}"}% +\LWR@htmltag{% + #1 % space + id=\textquotedbl\LWR@print@mbox{autosec-\arabic{page}}\textquotedbl% +}% } \NewDocumentCommand{\LWR@pushoneclose}{m m}{% @@ -5994,27 +6130,46 @@ end -- not --version \LWR@nullfonts% \edef\theHTMLSection{#1}% \LWR@htmltag{!DOCTYPE html}\LWR@orignewline -\LWR@htmltag{html lang="\LWR@currentHTMLLanguage"}\LWR@orignewline +\LWR@htmltag{% + html lang=\textquotedbl\LWR@currentHTMLLanguage\textquotedbl% +}\LWR@orignewline \LWR@htmltag{head}\LWR@orignewline -\LWR@htmltag{meta charset="UTF-8" /}\LWR@orignewline +\LWR@htmltag{% + meta charset=\textquotedbl{}UTF-8\textquotedbl\ /% +}\LWR@orignewline \ifthenelse{\equal{\theHTMLAuthor}{}}% {}% -{\LWR@htmltag{meta name="author" content="\theHTMLAuthor" /}\LWR@orignewline}% -\LWR@htmltag{meta name="generator" content="LaTeX lwarp package" /}% - \LWR@orignewline -\ifdefempty{\LWR@currentHTMLDescription}{}{% +{% + \LWR@htmltag{% + meta name=\textquotedbl{}author\textquotedbl\ % space + content=\textquotedbl\theHTMLAuthor\textquotedbl\ /% + }\LWR@orignewline% +}% \LWR@htmltag{% -meta name="description" content="\LWR@currentHTMLDescription" /}% - \LWR@orignewline + meta % space + name=\textquotedbl{}generator\textquotedbl\ % space + content=\textquotedbl{}LaTeX lwarp package\textquotedbl\ /% +}\LWR@orignewline% +\ifdefempty{\LWR@currentHTMLDescription}{}{% + \LWR@htmltag{% + meta name=\textquotedbl{}description\textquotedbl\ % space + content=\textquotedbl\LWR@currentHTMLDescription\textquotedbl\ /% + }\LWR@orignewline }% -\LWR@htmltag{meta name="viewport" % -content="width=device-width, initial-scale=1.0" /}% - \LWR@orignewline -\LWR@htmltag{!{-}{-}[if lt IE 9]}\LWR@orignewline \LWR@htmltag{% -script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"}% + meta % space + name=\textquotedbl{}viewport\textquotedbl\ % space + content=\textquotedbl{}width=device-width, initial-scale=1.0\textquotedbl\ /% +}\LWR@orignewline +\LWR@htmltag{!-\/-[if lt IE 9]}\LWR@orignewline +\LWR@htmltag{% + script % space + src=\textquotedbl{}% + http://html5shiv.googlecode.com/svn/trunk/html5.js% + \textquotedbl% +}% \LWR@htmltag{/script}\LWR@orignewline -\LWR@htmltag{![endif]{-}{-}}\LWR@orignewline +\LWR@htmltag{![endif]-\/-}\LWR@orignewline \ifthenelse{\equal{\theHTMLTitle}{}}% {}% {% @@ -6025,7 +6180,11 @@ script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"}% \LWR@htmltag{/title}\LWR@orignewline% }% \LWR@htmltag{% -link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% + link % space + rel=\textquotedbl{}stylesheet\textquotedbl\ % space + type=\textquotedbl{}text/css\textquotedbl\ % space + href=\textquotedbl\LWR@currentcss\textquotedbl\ /% +}% \LWR@orignewline \ifbool{mathjax}% {% @@ -6101,7 +6260,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% \LWR@stoppars \LWR@htmltag{/header}\LWR@orignewline \LWR@traceinfo{LWR@lwarpStart: Generating textbody.} -\LWR@htmltag{section class="textbody"} +\LWR@htmltag{section class=\textquotedbl{}textbody\textquotedbl} \LWR@patchlists \catcode`\$=\active \immediate\write\@mainaux{\catcode`\string$\active}% @@ -6443,8 +6602,8 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% \setlength{\parskip}{0ex}% \LWR@stoppars% \ifbool{LWR@verbtags}{% - \LWR@htmltag{pre class="#3" - \ifthenelse{\equal{#1}{}}{}{style="#1"}% + \LWR@htmltag{pre class=\textquotedbl#3\textquotedbl% + \ifthenelse{\equal{#1}{}}{}{ style=\textquotedbl#1\textquotedbl}% }% \LWR@orignewline% pre \leavevmode\unskip\LWR@print@vspace*{-#2\baselineskip}% @@ -10106,6 +10265,8 @@ autopage-\theLWR@currentautosec% \LWR@PreloadedPackage{ulem} +\LWR@PreloadedPackage{xetexko-vertical} + \end{warpHTML} @@ -11254,6 +11415,21 @@ width:\LWR@printlength{\LWR@tempwidth}% \end{warpHTML} \begin{warpHTML} +\@ifclassloaded{bxjsarticle}{\RequirePackage{lwarp-geometry}}{} +\@ifclassloaded{bxjsbook}{\RequirePackage{lwarp-geometry}}{} +\@ifclassloaded{bxjsreport}{\RequirePackage{lwarp-geometry}}{} +\@ifclassloaded{bxjsslide}{\RequirePackage{lwarp-geometry}}{} +\end{warpHTML} + +\begin{warpHTML} +\@ifclassloaded{ltjsarticle}{\RequirePackage{lwarp-stfloats}}{} +\@ifclassloaded{ltjsbook}{\RequirePackage{lwarp-stfloats}}{} +\@ifclassloaded{ltjsreport}{\RequirePackage{lwarp-stfloats}}{} +\@ifclassloaded{ltjspf}{\RequirePackage{lwarp-stfloats}}{} +\@ifclassloaded{ltjsiyou}{\RequirePackage{lwarp-stfloats}}{} +\end{warpHTML} + +\begin{warpHTML} \AtBeginDocument{ \@ifpackageloaded{ctexpatch}{% \def\@partcntformat#1{% |