summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/ximera/src/logo.dtx
blob: cbe808502a6636073303f4b87584fe8b29d281fe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
% \subsection{Logos}
% \DescribeMacro{\logo}{A logo for the xourse.}
%    \begin{macrocode}
%<*classXourse>
\newcommand*{\logo}[1]{%
  \ifx\@onlypreamble\@notprerr
    \ClassError{xourse}{logo can only be used in the preamble}
      {Move your logo command to the preamble}
  \else %
    \IfFileExists{#1}%
      {\gdef\xourse@logo{#1}}%
      {\ClassError{xourse}{logo file does not exist}
        {To use logo, make sure that the referenced image file exists}}%
  \fi%
}

%</classXourse>
%    \end{macrocode}

% The xourse logo is an |og:image| in the opengraph taxonomy.
%    \begin{macrocode}
%<*htXourse>
\Configure{@HEAD}{%
  \HCode{<meta name="og:image" content="}%
\ifdefined\xourse@logo%
  \xourse@logo%
\fi%
\HCode{" />\Hnewline}}%
%</htXourse>
%    \end{macrocode}