diff --git a/chapterbib.hva b/chapterbib.hva index 0fd3caf3..800e220e 100644 --- a/chapterbib.hva +++ b/chapterbib.hva @@ -1,8 +1,8 @@ \let\chapterbib@include\include \newcounter{chap@included} \newcommand{\maketocbibitem}{} -\newcommand{\@sectionbib@maketocbibitem}{\@auxdowrite{\@print{\@addcontentsline{htoc}}\{0\}\{\@print{\ahrefloc}\{bib:chap\thechap@included\}\{\refname{}\}\}\@print{ -}}} +\newcommand{\@sectionbib@maketocbibitem}{% + \@auxdowrite{\@print{\@addcontentsline{htoc}}\{0\}\{\@print{\ahrefloc}\{bib:chap\thechap@included\}\{\refname{}\}\}\@print@endline{}}} \renewcommand{\include}[1] {\stepcounter{chap@included}% \def\chapterbib@include@name{#1}% diff --git a/cut.mll b/cut.mll index e2dbbe3f..9ca5191f 100644 --- a/cut.mll +++ b/cut.mll @@ -859,8 +859,7 @@ and collect_header = parse end} | '\n'? "']* '>' {skip_title lexbuf ; collect_header lexbuf} -| "' - '\n'? +| " -}\fi\fi -\ife\css@link\else\css@link\fi -\undef\hevea@css\undef\newstyle} +\newcommand{\@meta}{% + \@print{}% + \@print{}% + \ife\hevea@css + \relax + \else + \ifexternalcss + \loadcssfile{\hva@dump@css}% + \else + \@print@endline{}% + \fi + \fi + \ife\css@link + \relax + \else + \css@link + \fi + \undef\hevea@css + \undef\newstyle +} \newenvironment{document}{% \@end{document}% \@atbegindocument% \@restartoutput\unskip% -\@print{ -}\@print{ +\@print@endline{}% +\@print{ } \@meta% \@print{}% \ifu\@title\jobname\else \@notags{\begin{@norefs}\let\@print@u\@print@u@default\@getprint{\@title}\end{@norefs}} \fi -\@print{ -}% -\ifmathml\@print{ -}\fi -\@print{ -}% -\@print{ -}% -\@print{ -}% +\@print@endline{}% +\ifmathml\@print@endline{}\fi +\@print@endline{}% +\@print{}% +\@print{}% {\@nostyle\@print{}}% -\ife\@htmlhead\else{\@nostyle\@print{ -}}% +\ife\@htmlhead\else{\@nostyle\@print@endline{}}% \usebox{\@htmlhead}% -{\@nostyle\@print{ -}}\fi% +{\@nostyle\@print@endline{}}\fi% \ife\@htmlprefix\else\@printnostyle{ @@ -336,9 +330,9 @@ \@atenddocument% \@final@footer% \@clearstyle% -\@print{ - -}\@raise@enddocument} +\@print@endline{ +}% +\@raise@enddocument} \newstyle{.center}{text-align:center;margin-left:auto;margin-right:auto;}% \newstyle{.flushleft}{text-align:left;margin-left:0ex;margin-right:auto;}% \newstyle{.flushright}{text-align:right;margin-left:auto;margin-right:0ex;}% @@ -578,16 +572,16 @@ \newcommand{\@table@attributes@border}{style="border-spacing:0" class="cellpadding1"} % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% Redefining \textoverline of latexcommon.hva % -% Here we can use HTML primitives % +% Redefining \textoverline of latexcommon.hva % +% Here we can use HTML primitives % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % \newcommand{\overlinedbox}[1]% - {{\@styleattr{span}{style="text-decoration:overline"}#1}}% + {{\@styleattr{span}{style="text-decoration:overline"}#1}}% \renewcommand{\textoverline}[1]{\overlinedbox{#1}}% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% Redefining \fbox of latexcommon.hva % -% Here we can use HTML primitives % +% Redefining \fbox of latexcommon.hva % +% Here we can use HTML primitives % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \newstyle{.lrbox}{box-sizing:border-box;display:inline-block;overflow:visible;white-space:nowrap;} \newstyle{.center-lrbox}{display:inline-block;margin-left:50\%;transform:translateX(-50\%);} diff --git a/html/symb-mathml.hva b/html/symb-mathml.hva index 4cbf93f8..81553ab5 100644 --- a/html/symb-mathml.hva +++ b/html/symb-mathml.hva @@ -47,20 +47,17 @@ % Roots \newcommand{\sqrt}[2][!*!]{\ifthenelse{\equal{#1}{!*!}}% -{\@print{ -}% +{\@print@endline{}% #2\@print{ }% -}{\@print{ -}\@open{display}{}% +}{\@print@endline{}\@open{display}{}% #2 \@close{display}{}% \@open{display}{}% #1% \@close{display}{}% -\@print{ - -}}} +\@print@endline{ +}}} % Ellipsis \renewcommand{\ldots}{\ifmath\@mop{TripleDot}\else{...}\fi} diff --git a/labeltype.hva b/labeltype.hva index 7eadecff..62606cd5 100644 --- a/labeltype.hva +++ b/labeltype.hva @@ -9,8 +9,7 @@ \let\@rt@old@label\label \renewcommand{\label}[2][] {\@rt@old@label[#1]{#2}% -\@auxdowrite{\@print{\@deflabeltype}\{#2\}\{\currentlabeltype\}\@print{ -}}} +\@auxdowrite{\@print{\@deflabeltype}\{#2\}\{\currentlabeltype\}\@print@endline{}}} %%Hum also redefines \enumerate... \let\@rt@oldenumerate\enumerate \renewcommand{\enumerate}{\def\currentlabeltype{item}\@rt@oldenumerate} diff --git a/latexcommon.hva b/latexcommon.hva index 5a955dcd..e01dde7b 100644 --- a/latexcommon.hva +++ b/latexcommon.hva @@ -85,7 +85,7 @@ \renewcommand{\@hevea@amper} {\ifthenelse{\value{@eqna@col}<2} {\stepcounter{@eqna@col}\@PAM} - {\hva@warn{Extra column in eqnarray}}} + {\hva@warn{Extra column in eqnarray}}} \renewcommand{\\}[1][]{\@eqna@complete\@PAM\@number\setcounter{@eqna@col}{0}\@yesnumber\stepcounter{equation}\@PBS} \@array{rclr}} {\\{}\addtocounter{equation}{-1}\end@array\]\@close{div}} @@ -227,11 +227,11 @@ \setcounter{\@itemcount}{0}} {\@close{OL}\addtocounter{enumcount}{-1}} % -%% Modified to support styles e.g. +%% Modified to support styles e.g. %%
, %%
%% ONLY CHANGES : 1) class=list added to \@open{DL} argument -%% 2) \@dt replaced by \@list@dtdd +%% 2) \@dt replaced by \@list@dtdd %% Remove these to get original behaviour % \newcommand{\setlistclass}[1] @@ -565,8 +565,7 @@ %}}} \newcommand{\@doaddtoc}[3] {%\stepcounter{tocanchor}% -\@auxdowrite{\@print{\@@addtocsec{htoc}}\{\@getprintnostyle{\@sec@id@attr}\}\{#1\}\{\@checkdepth{#1}{\@print{\@print}\{#2\}\@print{\quad{}}}\begin{@norefs}\@subst@expn{#3}\end{@norefs}\}\@print{ -}}} +\@auxdowrite{\@print{\@@addtocsec{htoc}}\{\@getprintnostyle{\@sec@id@attr}\}\{#1\}\{\@checkdepth{#1}{\@print{\@print}\{#2\}\@print{\quad{}}}\begin{@norefs}\@subst@expn{#3}\end{@norefs}\}\@print@endline{}}} %%section identifiers \newcounter{@sec} \newcommand{\@fmt@sec}{sec\arabic{@sec}} @@ -688,8 +687,7 @@ \@iffileexists{\jobname.#1}{\input{\jobname.#1}}{}} \newcommand{\tableofcontents}{\@readtoc{htoc}{\contentsname}} \newcommand{\addcontentsline}[3] -{\@auxdowrite{{\@nostyle\@print{\@addcontentsline}{\{h#1\}\{\csname @#2@level\endcsname\}}\{\@subst{#3}\}\@print{ -}}}} +{\@auxdowrite{{\@nostyle\@print{\@addcontentsline}{\{h#1\}\{\csname @#2@level\endcsname\}}\{\@subst{#3}\}\@print@endline{}}}} %%%%%%%%% Minipage %Manage footnotes in minipage, as latex does % 1. Use counter mpfootnote diff --git a/latexscan.mll b/latexscan.mll index 44914729..3698bbe7 100644 --- a/latexscan.mll +++ b/latexscan.mll @@ -2382,6 +2382,13 @@ def_code "\\@print" Dest.put arg) ;; +def_code "\\@print@endline" + (fun lexbuf -> + let {arg=arg} = save_arg lexbuf in + Dest.put arg; + Dest.put_char '\n') +;; + let put_unicode_default uc = try let txt = OutUnicode.get_default uc in diff --git a/lexstyle.mll b/lexstyle.mll index 000f206d..3a1db645 100644 --- a/lexstyle.mll +++ b/lexstyle.mll @@ -70,8 +70,7 @@ and skip_comment = parse | "" { error "comment" lexbuf } and dump m out = parse -| "' '\n'? - as lxm +| "