slatex / sTeX

A semantic Extension of TeX/LaTeX
49 stars 9 forks source link

integrate attribution functionality into \mhgraphics #403

Open kohlhase opened 10 months ago

kohlhase commented 10 months ago

We are already beefing up \mhgraphics; and I am using the following in MiKoMH/meta-inf/lib/preamble.tex:

\define@key{cca}{name}{\def\cca@name{#1}}
\define@key{cca}{url}{\def\cca@url{#1}}
\define@key{cca}{license}{\def\cca@license{#1}}
\define@key{cca}{width}{\def\cca@width{#1}}
\newcommand\ccattribute[2][]{\setkeys{cca}{#1}
  \begin{center}
    \begin{minipage}{\cca@width}#2
      \raggedleft\tiny{\cca@license: \cca@name @ \url{\cca@url}}
    \end{minipage}
  \end{center}
}

It would be nice if the first three keys could be added to \mhgraphics as ccname, ccurl, and cclicense (then things would be much neater in the source code (and I would have have to specify the width twice).