[tex-eplain] Landscape illustrations and captions

Oleg Katsitadze olegkat at gmail.com
Mon Oct 5 06:33:38 CEST 2009


Hi Adam,

On Tue, Sep 22, 2009 at 09:50:00AM +0100, Adam Fenn wrote:
> How can I modify the hyperlinks example (8.1) in the eplain  
> documentation so that the caption appears on the right side of the  
> illustration and is also centred on the illustration?

You can try something like this:

------------------------------>%------------------------------
\input eplain

\beginpackages
  \usepackage{url}[2005/06/27]
  \usepackage{color}
  \usepackage{graphicx}
\endpackages

\enablehyperlinks

\hlopts{bwidth=0}
\hlopts[url]{colormodel=named,color=BlueViolet}

\nopagenumbers

\def\figureword{fig.}

\newcount\fignumber
\newbox\imgbox

\def\fig#1#2#3#4{%
  \medskip
  \global\advance\fignumber by 1
  \vbox{%
    \setbox\imgbox = \hbox{\includegraphics[angle=90,width=#4]{#2}}%
    \hldesttype[definexref]{fitr}%
    \hldestopts[definexref]{width=\wd\imgbox,height=0pt,depth=\ht\imgbox}%
    \definexref{#1}{\the\fignumber}{figure}%
    \hbox{%
      \raise -.5\ht\imgbox \box\imgbox
      \rotatebox[origin=c]{90}{\strut F{\sc IGURE}~\the\fignumber.  #3}%
    }%
  }%
  \medskip
}

\fig{CTANlion}{ctan_lion_350x350}{Lion in the archives}{200pt}

\bye
------------------------------%<------------------------------

HTH,
Oleg


More information about the tex-eplain mailing list