Closed cspiel closed 3 years ago
As chapter C.12.3 "Boxes" of the LaTeX Reference Manual is open
I'd like to add \raisebox
and \parbox
.
\documentclass{article}
\usepackage{hevea}
\newcommand*{\samplephrase}{The quick brown fox jumps over the lazy
dog. Heavy boxes per\-form quick waltzes and jigs. Sphinx of black
quartz, judge my vow!}
\begin{document}
\section{Raised and Lowered Boxes}
\begin{itemize}
\item Some \raisebox{0.25em}{raised} text
\item and also some \raisebox{-0.125em}{lowered} text.
\item Again \raisebox{1.5em}[1pt]{raised (ht)} text, but with
artificial height
\item and \raisebox{-0.25em}[2pt][0pt]{lowered (ht, dp)} text
with artificial height and depth.
\end{itemize}
\section{Parboxes}
Parbox w/o optional parameter.\quad\parbox{14em}{\samplephrase}
\noindent Bottom-aligned parbox.\quad\parbox[b]{14em}{\samplephrase}
\noindent Top-aligned parbox.\quad\parbox[t]{14em}{\samplephrase}
\noindent \parbox{10em}{\samplephrase}\quad
Some funny stuff.\quad\parbox{10em}{\samplephrase}
\end{document}
Again, the overprinting effects are intentional.
It looks good, thanks again for your work on hevea.
I merge. There is a small problem as the tutorial uses \raisebox
as an example of a non-implemented macro!
I'll correct this this evening. I'd also like to include your two examples in the example web page, with credit to you. Do you agree?
@maranget: LOL! I was so busy implementing \raisebox
that I did not notice it is documented as unimplemented.
WRT the examples, you can go ahead and include them.
As a reminder for the future when we shall have dimensions
(aka "lengths") macro \raisebox
will need some touchup.
The LaTeX original allows to set both, height and depth
separately and IMO, we ought to map that to the sum of
both in the CSS box model.
@cspiel I cannot find a simple example of a latex command that hevea does not implement. If you have some idea to change this section of the manual.
At the moment, I'll simply state that \raisebox
now is implemented, the method illustrated by the outdated examples still being worth considering.
@maranget: Right now, I don't know of a good example either!
However, I'd follow your suggestion and keep the \raisebox
example;
it is well elaborated and easy to grasp without in-depth knowledge
if LaTeX or Hevea.
You could mention that it is impossible to implement
the exact "signature" of LaTeX's \raisebox{RAISE_LEN}[HGTH][DPTH]{TEXT}
because of the non-standard positions of the optional arguments, though.
Otherwise just introduce the example with something like
"if we did not have \raisebox
, we would work around the missing macro
like this..."
Add
\makebox[WIDTH][ALIGN]{TEXT}
and\framebox[WIDTH][ALIGN]{TEXT}
with most of their LaTeX functionality. Base the new definition of\fbox
on\framebox
. Alignment types
is unimplemented.Macro
\mbox
is not touched.Here is a demo-document:
Please compare the rendering of LaTeX to the Hevea output. Overprinting effects of the demo will look ugly. This is intentional as we test whether the HTML output strictly keeps the text baselines even and obeys the ALIGN specifiers where they stack up against the default left-to-right direction.