Re: dvipdfmx - hyperref で図上部をリンクしたい

名前: .
日時: 2005-06-29 12:01:08
IPアドレス: 220.214.19.*

>>36652 次のようなことをなさりたいのでしょうか? # 下記の例では,“図の本体”を \figurebody マクロの引数にするという # 点のみ,本文部分の変更が必要となります. \documentclass{article} \usepackage[dvipdfm]{graphicx,hyperref} \makeatletter \newcounter{@captionid} \long\def\@caption#1[#2]#3{% \hyper@makecurrent{\@captype}% \par\addcontentsline{\csname ext@#1\endcsname}{#1}{% \protect\numberline{\csname the#1\endcsname}{\ignorespaces #2}% }% \ifx\@captype\@captype@figure \begingroup \protected@write\@auxout{}% {\string\captionid{\the\c@@captionid}{\@currentHref}}% \endgroup \fi \begingroup \@parboxrestore \if@minipage \@setminipage \fi \normalsize \@makecaption{\csname fnum@#1\endcsname}{% \ignorespaces \ifx\@captype\@captype@figure #3% \else \ifHy@nesting \hyper@@anchor{\@currentHref}{#3}% \else \Hy@raisedlink{\hyper@@anchor{\@currentHref}{\relax}}#3% \fi \fi }% \par \endgroup } \def\@captype@figure{figure}% \def\captionid#1#2{\expandafter\xdef\csname @capid@#1\endcsname{#2}} \def\@captionid#1#2{% \def\@tempa{#2}% \expandafter\ifx\csname @capid@#1\endcsname\@tempa\else \@tempswatrue \fi} \AtEndDocument{\let\captionid\@captionid} \long\def\figurebody#1{% \stepcounter{@captionid}% \@ifundefined{@capid@\the\c@@captionid}% {\edef\@tempx{\the\c@@captionid}}% {\edef\@tempx{\csname @capid@\the\c@@captionid\endcsname}}% \ifHy@nesting \hyper@@anchor{\@tempx}{#1}% \else \Hy@raisedlink{\hyper@@anchor{\@tempx}{\relax}}#1% \fi} \makeatother \begin{document} \listoffigures \newpage \begin{figure}\centering \parbox[b]{.45\hsize}{\centering \figurebody{\includegraphics{fig1.eps}} \caption{Sample figure}}% \quad \parbox[b]{.45\hsize}{\centering \figurebody{\includegraphics{fig2.eps}} \caption{Sample figure}} \end{figure} \end{document}

この書き込みへの返事:

お名前
題名 
メッセージ(タグは <a href="...">...</a> だけ使えます)