-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement \makebox and \framebox; re-implement \fbox. #45
Conversation
Add \makebox[WIDTH][ALIGN]{TEXT} and \framebox[WIDTH][ALIGN]{TEXT} with most of their LaTeX functionality. Base new definition of \fbox on \framebox. Alignment type `s' is unimplemented.
As chapter C.12.3 "Boxes" of the LaTeX Reference Manual is open \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 |
@maranget: LOL! I was so busy implementing WRT the examples, you can go ahead and include them. As a reminder for the future when we shall have dimensions |
@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 |
@maranget: Right now, I don't know of a good example either! You could mention that it is impossible to implement Otherwise just introduce the example with something like |
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.