maranget / hevea

Hevea is a fast latex to html translator
http://hevea.inria.fr
Other
97 stars 12 forks source link

Introduce a novel type of block to implement \marginpar. #20

Closed cspiel closed 4 years ago

cspiel commented 4 years ago

Introduce a novel type of block: span@inline@block. Its semantics are tailor made to meet the processing expectations of \marginpar; implement Hevea's \marginpar with the help of span@inline@block.

Slightly adjust the style of marginpars:

Here is a small example that can be used to visualize the changes:

\documentclass{article}
\usepackage{hevea}
\begin{document}
aaaaaaaa bbbbbbbb
cccccccc dddddddd
eeeeeeee ffffffff
gggggggg hhhhhhhh
iiii\marginpar{IIII}iiii jjjj\marginpar{JJJJ}jjjj
kkkk\marginpar{KKKK}kkkk llll\marginpar{LLLL}llll
mmmmmmmm nnnnnnnn
oooooooo pppppppp
qqqqqqqq rrrrrrrr
ssssssss tttttttt
\end{document}

The old implementation rips the eight-groups of i, j, k, and l apart. With this P/R they stay intact as they should.

As the block type is highly specialized I have not added it to the documentation.

maranget commented 4 years ago

Thanks for the contribution. Merged.