To receive notifications about scheduled maintenance, please subscribe to the mailing-list gitlab-operations@sympa.ethz.ch. You can subscribe to the mailing-list at https://sympa.ethz.ch

Commit deb6451b authored by Bengt Giger's avatar Bengt Giger
Browse files

Added geogebra macro; README with link to walkthrough

parent ce477bd7
Pipeline #96950 passed with stage
in 5 minutes and 14 seconds
......@@ -51,5 +51,4 @@ The LaTeX styles add information required by the XML conversion. The resulting X
Additionally, a Pressbook template with the ability to disable the `wpautop` function in Wordpress is required. Otherwise, the rendering engine of Wordpress will eliminate vital parts of the HTML during rendering.
## Example
See ... for the result of a *Laweb* conversion.
See [the walkthrough](https://gitlab.ethz.ch/laweb/laweb/-/wikis/walkthrough/1-Example-Start) for a an example *Laweb* conversion from source to Pressbooks.
......@@ -347,8 +347,17 @@ implementation of different browsers varies).
</p>
<h3 class="sectionHead"><span class="titlemark">3.2 </span> <a
id="x1-80003.2"></a>Geogebra Applets</h3>
<!--l. 98--><p class="noindent" >To embed interactive Geogebra Applets, store them at the Geogebra site. Then
add a figure with an URL reference like &#x201C;urlhttps://ggbm.at/mc2EbNa6&#x201D;:
<!--l. 98--><p class="noindent" >To embed interactive Geogebra applets, store them at the Geogebra site. Every
applet gets a so called material_id, which is used as a mandatory parameter. The
height defaults to 500 (px), it may be overwritten with
</p>
<pre class="verbatim" id="verbatim-1">
&#x005C;geogebra[650]{mc2EbNa6}
</pre>
<!--l. 102--><p class="nopar" >
</p>
<hr class="figure" /><div class="figure"
>
......@@ -360,9 +369,7 @@ add a figure with an URL reference like &#x201C;urlhttps://ggbm.at/mc2EbNa6&#x20
<!--l. 102--><p class="noindent" ><a
href="https://ggbm.at/mc2EbNa6" class="url" ><span
class="cmtt-10x-x-109">https://ggbm.at/mc2EbNa6</span></a>
<!--l. 105--><p class="noindent" ><iframe height="650px" scrolling="no" src="https://www.geogebra.org/material/iframe/id/mc2EbNa6/width/720/height/650/border/888888/rc/false/ai/false/sdz/false/smb/false/stb/false/stbh/true/ld/false/sri/false" style="border:0px;" width="720px"></iframe>
<br /> </p><div class="caption"
><span class="id">Figure&#x00A0;3.1: </span><span
class="content">Example of Geogebra applet</span></div><!--tex4ht:label?: x1-80011 -->
......
......@@ -95,11 +95,14 @@ Mathematical expressions are converted to MathML, and MathJax is used to improve
MathJax is the preferred renderer. If JavaScript is disabled in a browser, or MathJax is not supported for any reason, the rendering will fall back to MathML. Be aware that MathML has its limitations (or: the MathML implementation of different browsers varies).
\section{Geogebra Applets}
To embed interactive Geogebra Applets, store them at the Geogebra site. Then add a figure with
an URL reference like ``url{https://ggbm.at/mc2EbNa6}'':
To embed interactive Geogebra applets, store them at the Geogebra site. Every applet gets a so called material\_id, which is used as a mandatory parameter. The height defaults to 500 (px), it may be overwritten with
\begin{verbatim}
\geogebra[650]{mc2EbNa6}
\end{verbatim}
\begin{figure}
\url{https://ggbm.at/mc2EbNa6}
\geogebra[650]{mc2EbNa6}
\caption{Example of Geogebra applet}
\end{figure}
......
......@@ -2148,7 +2148,7 @@ div.newtheorem dl dt, dl.enumerate dt {font-weight: normal; margin-top: 0px; tex
div.newtheorem dl dd {font-style: italic}
div.newtheorem dl dt {font-style: italic}
div.proof p span.ecti-1095 {font-style: italic}
</style><h3 class="sectionHead"><span class="titlemark">3.2 </span> <a id="x1-80003.2"></a>Geogebra Applets</h3> <p class="noindent">To embed interactive Geogebra Applets, store them at the Geogebra site. Then add a figure with an URL reference like “urlhttps://ggbm.at/mc2EbNa6”: </p> <hr class="figure"/><div class="figure"> <a id="x1-80011"></a> <iframe height="500px" scrolling="no" src="https://www.geogebra.org/material/iframe/id/mc2EbNa6/width/720/height/500/border/888888/rc/false/ai/false/sdz/false/smb/false/stb/false/stbh/true/ld/false/sri/false" style="border:0px;" width="720px"></iframe><p class="noindent"><a class="url" href="https://ggbm.at/mc2EbNa6"><span class="cmtt-10x-x-109">https://ggbm.at/mc2EbNa6</span></a> <br/> </p><div class="caption"><span class="id">Figure 3.1: </span><span class="content">Example of Geogebra applet</span></div> </div><hr class="endfigure"/> ]]></content:encoded>
</style><h3 class="sectionHead"><span class="titlemark">3.2 </span> <a id="x1-80003.2"></a>Geogebra Applets</h3> <p class="noindent">To embed interactive Geogebra applets, store them at the Geogebra site. Every applet gets a so called material_id, which is used as a mandatory parameter. The height defaults to 500 (px), it may be overwritten with </p> <pre class="verbatim" id="verbatim-1"> \geogebra[650]{mc2EbNa6} </pre> <p class="nopar"> </p> <hr class="figure"/><div class="figure"> <a id="x1-80011"></a> <p class="noindent"><iframe height="650px" scrolling="no" src="https://www.geogebra.org/material/iframe/id/mc2EbNa6/width/720/height/650/border/888888/rc/false/ai/false/sdz/false/smb/false/stb/false/stbh/true/ld/false/sri/false" style="border:0px;" width="720px"></iframe> <br/> </p><div class="caption"><span class="id">Figure 3.1: </span><span class="content">Example of Geogebra applet</span></div> </div><hr class="endfigure"/> ]]></content:encoded>
<wp:post_name><![CDATA[]]></wp:post_name>
<wp:post_parent>13</wp:post_parent>
<wp:menu_order>2</wp:menu_order>
......
% Based on https://www.12000.org/my_notes/faq/LATEX/htse54.htm
% Addition from https://tex.stackexchange.com/questions/574945/htlatex-ignores-value-in-brackets-in-item-statement-when-using-itemize
\Preamble{mathml}
\Configure{VERSION}{}
\Configure{DOCTYPE}{\HCode{<!DOCTYPE html>\Hnewline}}
\Configure{HTML}{\HCode{<html>\Hnewline}}{\HCode{\Hnewline</html>}}
\Configure{@HEAD}{}
\Configure{@HEAD}{\HCode{<meta charset="UTF-8" />\Hnewline}}
\Configure{@HEAD}{\HCode{<meta name="generator" content="TeX4ht
(http://www.cse.ohio-state.edu/\string~gurari/TeX4ht/)" />\Hnewline}}
\Configure{@HEAD}{\HCode{<link
rel="stylesheet" type="text/css"
href="\expandafter\csname aa:CssFile\endcsname" />\Hnewline}}
\Configure{@HEAD}{\HCode{%
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
extensions: ["tex2jax.js"],
jax: ["input/TeX", "output/HTML-CSS"],
tex2jax: {
\unexpanded{inlineMath: [ ['$','$'], ["\\(","\\)"] ],}
\unexpanded{displayMath: [ ['$$','$$'], ["\\[","\\]"] ],}
processEscapes: true
},
"HTML-CSS": { availableFonts: ["TeX"] }
});
</script>
}}
\Configure{@HEAD}{\HCode{<script type="text/javascript"
src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js?config=TeX-MML-AM_CHTML-full">
</script>}}
\Configure{@HEAD}{\HCode{<style type="text/css">
.MathJax_MathML {text-indent: 0;}
</style>}}
\Configure{@HEAD}{\HCode{<style type="text/css">
img { width: 100\% }
</style>}}
\catcode`\:=11
\ConfigureList{itemize}%
{\EndP\HCode{<div \a:LRdir
class="custom-itemize"><div class="item-head">}%
\PushMacro\end:itm \global\let\end:itm=\empty}
{\PopMacro\end:itm \global\let\end:itm \end:itm
\ifvmode \IgnorePar\fi
\EndP\HCode{</div></div>}\ShowPar}
{\end:itm \global\def\end:itm{\EndP\Tg</div>\Tg<div class="item-head">}}
{\HCode{</div><div class="item-content">}}
\Css{.item-head{float:left;width:2em;clear:left;}}
\Css{.item-content{margin-left:2em;}}
\catcode`\:=12
\begin{document}
\EndPreamble
\ProvidesPackage{laweb}[LaWeb Package]
\usepackage{tikz,graphicx,tikz-dependency}
\usetikzlibrary{external}
\tikzset{
png copy/.style={
external/system call={
pdflatex \tikzexternalcheckshellescape -halt-on-error -interaction=batchmode -jobname "\image" "\texsource";
convert -density 300 -transparent white "\image.pdf" "\image.png"
}
}
}
\tikzset{png copy}
\makeatletter
\@ifpackageloaded{tex4ht}{
\tikzexternalize[mode=only graphics]
\tikzset{png export/.style={/pgf/images/external info,/pgf/images/include external/.code={\includegraphics[width=\pgfexternalwidth,height=\pgfexternalheight]{##1.png}}}}
\tikzset{png export}
}{
\tikzexternalize
\tikzset{pdf export/.style={/pgf/images/external info,/pgf/images/include external/.code={\includegraphics[width=\pgfexternalwidth,height=\pgfexternalheight]{##1.pdf}}}}
\tikzset{pdf export}
}
\makeatother
\ifdefined\HCode
\providecommand\webonly[1]{\HCode{#1}}
\providecommand\texonly[1]{}%
\else
\providecommand\webonly[1]{}%
\providecommand\texonly[1]{#1}
\fi
......@@ -32,3 +32,9 @@
\providecommand\webonly[1]{}%
\providecommand\texonly[1]{#1}
\fi
\ifdefined\HCode
\providecommand{\geogebra}[2][500]{\HCode{<iframe height="#1px" scrolling="no" src="https://www.geogebra.org/material/iframe/id/#2/width/720/height/#1/border/888888/rc/false/ai/false/sdz/false/smb/false/stb/false/stbh/true/ld/false/sri/false" style="border:0px;" width="720px"></iframe>}}
\else
\providecommand{\geogebra}[2][500]{\url{https://www.geogebra.org/m/#2}}
\fi
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment