blob: cbe75498f126edf3228d17821bb7ddb535673614 (
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
|
% \subsubsection{Google Sheet}
% \DescribeMacro{\googleSheet}{googleSheet command. Requires id,
% width, and height as arguments. optional arguments are gid for
% sheet ID and range for cell range. command definition}
% \begin{macrocode}
%<*classXimera>
% Google Spreadsheet link (read only)
\newcommand{\googleSheet}[5]{%
Google Spreadsheet link: \url{https://docs.google.com/spreadsheets/d/#1}%
}
%</classXimera>
% \end{macrocode}
% \begin{macrocode}
%<*htXimera>
\renewcommand{\googleSheet}[5]{%
\ifthenelse{\equal{#4}{}}%
{\HCode{<iframe width="#2px" height="#3px" src="https://docs.google.com/spreadsheets/d/#1/htmlembed?widget=true">This browser does not support embedded elements.</iframe>}}%
{\ifthenelse{\equal{#5}{}}%
{\HCode{<iframe width="#2px" height="#3px" src="https://docs.google.com/spreadsheets/d/#1/htmlembed?single=true&gid=#4&widget=false">This browser does not support embedded elements.</iframe>}}%
{\HCode{<iframe width="#2px" height="#3px" src="https://docs.google.com/spreadsheets/d/#1/htmlembed?single=true&gid=#4&range=#5&widget=false">This browser does not support embedded elements.</iframe>}}%
}%
}%
%</htXimera>
% \end{macrocode}
|