1

I'm using @AlexG's method described here Using the animate package without Adobe to produce an animated svg (animate package and/or tikz animations library), it's really nice. I have two questions:

1- I would like to attach the .svg to a pdf file as explained in the link but I'm not sure what I should use to compile. Up to now I was using: xelatex -no-pdf svgbeamer.tex && xelatex -no-pdf svgbeamer.tex && dvisvgm --font-format=ttf --exact --zoom=-1 -p1,- svgbeamer.xdv

2- When in full screen mode (F11) my slides don't occupy the whole screen. Using tikz I draw a rectangle (width 16cm, height 9cm) and put everything I want on screen inside it but I still get white bands above, below and to the left of the rectangle. Is there a way around this?

Here is a minimal example:

\documentclass[dvisvgm,aspectratio=169]{beamer}

\usepackage{tikz} \usetikzlibrary{calc,angles,animations,arrows,backgrounds,patterns,intersections,tikzmark,decorations.pathreplacing,calligraphy}

\begin{document} \begin{frame} \begin{tikzpicture}

\huge

\draw[thick] (0,0) rectangle (16,9); % a 16 by 9 rectangle \clip (0,0) rectangle (16,9); % everything outside the rectangle is clipped

%%%%%%%% GRID \foreach \i in {1,...,20}{\draw[gray] (\i0.8,0) -- (\i0.8,9); } \foreach \i in {0,...,11}{ \draw[gray] (0,0.2+\i0.8) -- (17,0.2+\i0.8); \foreach \j in {1,...,3}{\draw[lightgray, thin] (0,0.2+\i0.8 + \j0.2) -- (17,0.2+\i0.8+ \j0.2);} } %%%%%%%%%

\draw (8,8.2) node[text width=14.4cm, align=left, anchor=base] {This is a test}; % some text

\draw[very thick] (2,6) -- (4,3) -- (1,4) -- cycle; % some drawing

\draw[very thick] (12,6) -- (18,3) -- (11,4) -- cycle; % some clipped drawing

\end{tikzpicture}

\end{frame}

\end{document}

and what it looks like after pressing F11:

enter image description here

  • For your second part, can you share a minimal working example so we can see how you position your rectangle on the slide? – samcarter_is_at_topanswers.xyz Jul 11 '22 at 11:48
  • 1
    Welcome to Tex.SE! – Mensch Jul 11 '22 at 11:48
  • I just added a minimal example – FunkiePhil Jul 11 '22 at 12:34
  • Do you want to produce the whole presentation in SVG format, as suggested in 1 of the linked answer, or a standalone animation in SVG format attached to a PDF, as in 2? In the latter case, the animation is shown in a web browser window that opens when you click on the file attachment in the PDF viewer. Also, in that case, it does not make sense to use a presentation document class (beamer) for the standalone animation. Please clarify. – AlexG Jul 12 '22 at 10:50
  • @AlexG I have already succeeded in producing the whole presentation following your method number 1. Ideally I would now like to attach the whole presentation to a PDF so I only have a single file to send for example. The idea would be to make PDF really portable. – FunkiePhil Jul 12 '22 at 12:48
  • I'd put all SVGs in a ZIP archive and send that one. – AlexG Jul 15 '22 at 08:07
  • @Alex G thank you for your answer. I have one more questions: is there a way to modify the hotkey for fullscreen? I'm asking because I'm not sure how you can get fullscreen on a mobile device (ipad...) since you can't press F11. – FunkiePhil Jul 24 '22 at 15:47

1 Answers1

1

For the second part of your question:

Normally tikzpictures are placed within the normal text area, so the space to the left is the normal text margin of a beamer slide. As a hacky solution you could cancel the margin with

\setbeamersize{text margin left=0cm}