summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/ximera/src/interactives/google.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/ximera/src/interactives/google.dtx')
-rw-r--r--macros/latex/contrib/ximera/src/interactives/google.dtx26
1 files changed, 26 insertions, 0 deletions
diff --git a/macros/latex/contrib/ximera/src/interactives/google.dtx b/macros/latex/contrib/ximera/src/interactives/google.dtx
new file mode 100644
index 0000000000..cbe75498f1
--- /dev/null
+++ b/macros/latex/contrib/ximera/src/interactives/google.dtx
@@ -0,0 +1,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&amp;gid=#4&amp;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&amp;gid=#4&amp;range=#5&amp;widget=false">This browser does not support embedded elements.</iframe>}}%
+ }%
+ }%
+%</htXimera>
+% \end{macrocode}
+