I wanted to be able to navigate the manual better, so was playing with formats.
First I tried latex2html, but found that it doesn't deal well with the new macros for all the definitions (e.g., \defmacro). I wrestled with this for a while, but had no luck.
Then I tried pdflatex with the hyperref package. This lets us generate pdf with the bookmarks pane of acrobat accessible, which makes it much easier to mouse around the document.
The only problem is that you can't include ps files into pdflatex; you must translate them into pdf first.
If that doesn't bother anyone, I could provide patches. For the moment, I'll put the new pdf up on my website for people to look at.
http://rpgoldman.real-time.com/papers/mcclim-manual.pdf
Cheers, R
rpgoldman@sift.info writes:
I wanted to be able to navigate the manual better, so was playing with formats.
First I tried latex2html, but found that it doesn't deal well with the new macros for all the definitions (e.g., \defmacro). I wrestled with this for a while, but had no luck.
Then I tried pdflatex with the hyperref package. This lets us generate pdf with the bookmarks pane of acrobat accessible, which makes it much easier to mouse around the document.
The only problem is that you can't include ps files into pdflatex; you must translate them into pdf first.
If that doesn't bother anyone, I could provide patches.
Sure, thanks!
For the moment, I'll put the new pdf up on my website for people to look at.
Looks pretty good.
Notes on the changes:
1. The results might look better on more platforms if we used the roman and helvet packages. I haven't experimented yet.
2. I think if the macros for defun, etc. were rewritten into LaTeX rather than in raw TeX, latex2html might be happier.
3. I have not yet patched the makefile. I tend not to use make for latex docs, because I've never figured out how to get make to recognize when latex needs to do a second pass to get the cross-references right. Perhaps someone else does...
4. Annoyingly, the hyperref usepackage does NOT work with vanilla latex, so one can't just switch between latex and pdflatex. Probably adding some wrapper files around manual.tex for latex and pdflatex would solve this problem, or some \if fu.
Changes required:
1. Generate the following files from postscript, using ps2pdf:
inspect-object-1.pdf inspect-object-2.pdf inspect-object-3.pdf inspect-as-cells.pdf ex2.pdf native.pdf
2. Patch manual.tex by replacing postscript figures with pdf figures, and add hyperref \usepackage to get pdf bookmarks. Here's the patch:
Index: manual.tex =================================================================== RCS file: /project/mcclim/cvsroot/mcclim/Doc/manual.tex,v retrieving revision 1.26 diff -c -r1.26 manual.tex *** manual.tex 11 Mar 2005 22:34:59 -0000 1.26 --- manual.tex 6 Apr 2005 14:28:00 -0000 *************** *** 6,11 **** --- 6,12 ---- \usepackage{epsfig} \usepackage{alltt} \usepackage{moreverb} + \usepackage[pdftex]{hyperref}
\setlength{\parskip}{0.3cm} \setlength{\parindent}{0cm} *************** *** 372,378 ****
\begin{figure} \begin{center} ! \inputfig{ex2.pstex_t} \end{center} \caption{\label{figex2} View of the improved example} \end{figure} --- 373,379 ----
\begin{figure} \begin{center} ! \includegraphics{ex2.pdf} \end{center} \caption{\label{figex2} View of the improved example} \end{figure} *************** *** 643,650 **** c. Mirrors are outlined with dotted rectangles.
\begin{figure} ! \begin{center} ! \inputfig{native.pstex_t} \end{center} \caption{\label{fignative} A sheet with a nontrivial transformation} \end{figure} --- 644,652 ---- c. Mirrors are outlined with dotted rectangles.
\begin{figure} ! \begin{center} ! \input native.pstex_t ! %\inputfig{native.pstex_t} \end{center} \caption{\label{fignative} A sheet with a nontrivial transformation} \end{figure} *************** *** 1576,1582 **** The new cons cell diagram format looks like this:
\begin{center} ! \includegraphics{inspect-as-cells.eps} \end{center}
\section{Extending Clouseau} --- 1578,1584 ---- The new cons cell diagram format looks like this:
\begin{center} ! \includegraphics{inspect-as-cells.pdf} \end{center}
\section{Extending Clouseau} *************** *** 1718,1724 **** the right. This gives us some reasonably nice-looking output:
\begin{center} ! \includegraphics{inspect-object-1.eps} \end{center}
But what we really want is something more closely adapted to our --- 1720,1726 ---- the right. This gives us some reasonably nice-looking output:
\begin{center} ! \includegraphics{inspect-object-1.pdf} \end{center}
But what we really want is something more closely adapted to our *************** *** 1754,1760 **** to \cl{x=y} and we're done. It looks like this:
\begin{center} ! \includegraphics{inspect-object-2.eps} \end{center}
Finally, for our amusement and further practice, we'll try to get some --- 1756,1762 ---- to \cl{x=y} and we're done. It looks like this:
\begin{center} ! \includegraphics{inspect-object-2.pdf} \end{center}
Finally, for our amusement and further practice, we'll try to get some *************** *** 1816,1822 **** Our final version looks like this:
\begin{center} ! \includegraphics{inspect-object-3.eps} \end{center}
For more examples of how to extend the inspector, you can look at --- 1818,1824 ---- Our final version looks like this:
\begin{center} ! \includegraphics{inspect-object-3.pdf} \end{center}
For more examples of how to extend the inspector, you can look at
rpgoldman@sift.info wrote:
[...]
! \includegraphics{ex2.pdf}
If you leave off the extension, \includegraphics will (generally) automatically pick the correct file format (.eps or .pdf) depending on whether latex or pdflatex is being run.
[...]
"LM" == Lawrence Mitchell wence@gmx.li writes:
LM> rpgoldman@sift.info wrote: LM> [...]
>> ! \includegraphics{ex2.pdf}
LM> If you leave off the extension, \includegraphics will LM> (generally) automatically pick the correct file format (.eps or LM> .pdf) depending on whether latex or pdflatex is being run.
LM> [...]
Thanks! I note also that I had to mess with native.pstex_t to make this work, which feels a little unfortunate to me. This is a little tex file that mostly includes an image and decorates it with some picture commands. I'm inclined to suggest that it simply be folded into the overall tex source, although it's integrated into the Makefile...
Here's a new patch file that takes Lawrence's suggestions into account, and a modified version of native.pstex_t. Not mimulated.
---------------------------------------------------------------------- Index: manual.tex =================================================================== RCS file: /project/mcclim/cvsroot/mcclim/Doc/manual.tex,v retrieving revision 1.26 diff -c -r1.26 manual.tex *** manual.tex 11 Mar 2005 22:34:59 -0000 1.26 --- manual.tex 6 Apr 2005 19:56:40 -0000 *************** *** 7,12 **** --- 7,17 ---- \usepackage{alltt} \usepackage{moreverb}
+ \ifx\pdfoutput\undefined \csname newcount\endcsname\pdfoutput \fi + \ifcase\pdfoutput \else + \usepackage[pdftex]{hyperref} + \fi + \setlength{\parskip}{0.3cm} \setlength{\parindent}{0cm}
*************** *** 372,378 ****
\begin{figure} \begin{center} ! \inputfig{ex2.pstex_t} \end{center} \caption{\label{figex2} View of the improved example} \end{figure} --- 377,383 ----
\begin{figure} \begin{center} ! \includegraphics{ex2} \end{center} \caption{\label{figex2} View of the improved example} \end{figure} *************** *** 643,650 **** c. Mirrors are outlined with dotted rectangles.
\begin{figure} ! \begin{center} ! \inputfig{native.pstex_t} \end{center} \caption{\label{fignative} A sheet with a nontrivial transformation} \end{figure} --- 648,656 ---- c. Mirrors are outlined with dotted rectangles.
\begin{figure} ! \begin{center} ! \input native.pstex_t ! %\inputfig{native.pstex_t} \end{center} \caption{\label{fignative} A sheet with a nontrivial transformation} \end{figure} *************** *** 1576,1582 **** The new cons cell diagram format looks like this:
\begin{center} ! \includegraphics{inspect-as-cells.eps} \end{center}
\section{Extending Clouseau} --- 1582,1588 ---- The new cons cell diagram format looks like this:
\begin{center} ! \includegraphics{inspect-as-cells} \end{center}
\section{Extending Clouseau} *************** *** 1718,1724 **** the right. This gives us some reasonably nice-looking output:
\begin{center} ! \includegraphics{inspect-object-1.eps} \end{center}
But what we really want is something more closely adapted to our --- 1724,1730 ---- the right. This gives us some reasonably nice-looking output:
\begin{center} ! \includegraphics{inspect-object-1} \end{center}
But what we really want is something more closely adapted to our *************** *** 1754,1760 **** to \cl{x=y} and we're done. It looks like this:
\begin{center} ! \includegraphics{inspect-object-2.eps} \end{center}
Finally, for our amusement and further practice, we'll try to get some --- 1760,1766 ---- to \cl{x=y} and we're done. It looks like this:
\begin{center} ! \includegraphics{inspect-object-2} \end{center}
Finally, for our amusement and further practice, we'll try to get some *************** *** 1816,1822 **** Our final version looks like this:
\begin{center} ! \includegraphics{inspect-object-3.eps} \end{center}
For more examples of how to extend the inspector, you can look at --- 1822,1828 ---- Our final version looks like this:
\begin{center} ! \includegraphics{inspect-object-3} \end{center}
For more examples of how to extend the inspector, you can look at
----------------------------------------------------------------------
native.pstex_t
\begin{picture}(0,0)% \includegraphics{native}% \end{picture}% \setlength{\unitlength}{3108sp}% % \begingroup\makeatletter\ifx\SetFigFont\undefined% \gdef\SetFigFont#1#2#3#4#5{% \reset@font\fontsize{#1}{#2pt}% \fontfamily{#3}\fontseries{#4}\fontshape{#5}% \selectfont}% \fi\endgroup% \begin{picture}(4983,4407)(1,-3673) \end{picture}%
----------------------------------------------------------------------
Cheers, R
rpgoldman@real-time.com writes:
Here's a new patch file that takes Lawrence's suggestions into account, and a modified version of native.pstex_t. Not mimulated.
Patch applied. Thanks.