From 41d1be12f4963b0f5bf9903116883f1458b58960 Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Sat, 24 Sep 2022 03:04:02 +0000 Subject: CTAN sync 202209240304 --- macros/latex/contrib/colorframed/README.md | 17 +- .../latex/contrib/colorframed/colorframed-doc.pdf | Bin 17300 -> 18830 bytes .../latex/contrib/colorframed/colorframed-doc.tex | 192 +++++++----- macros/latex/contrib/colorframed/colorframed.sty | 18 +- macros/latex/contrib/graphics-def/README.md | 2 +- macros/latex/contrib/graphics-def/dvipdfmx.def | 33 +- macros/latex/contrib/graphics-def/dvips.def | 35 ++- macros/latex/contrib/graphics-def/dvisvgm.def | 5 +- macros/latex/contrib/graphics-def/luatex.def | 26 +- macros/latex/contrib/graphics-def/pdftex.def | 38 ++- macros/latex/contrib/graphics-def/xetex.def | 44 +-- macros/latex/contrib/media4svg/ChangeLog | 4 + macros/latex/contrib/media4svg/README.md | 11 +- .../contrib/media4svg/example/beamer-example-1.svg | 107 +++---- .../contrib/media4svg/example/beamer-example-2.svg | 343 +++++++++++++++++++-- .../contrib/media4svg/example/beamer-example-3.svg | 74 ++--- .../contrib/media4svg/example/beamer-example-4.svg | 216 +++++++------ .../contrib/media4svg/example/beamer-example.tex | 111 +++---- macros/latex/contrib/media4svg/example/random.mp4 | Bin 0 -> 20206 bytes macros/latex/contrib/media4svg/media4svg.sty | 65 ++-- macros/latex/contrib/tkz/tkz-euclide/README.md | 4 +- .../tkz-euclide/doc/latex/TKZdoc-euclide-main.tex | 4 +- .../contrib/tkz/tkz-euclide/doc/tkz-euclide.pdf | Bin 1109591 -> 1109639 bytes .../contrib/tkz/tkz-euclide/latex/tkz-euclide.cfg | 6 +- .../contrib/tkz/tkz-euclide/latex/tkz-euclide.sty | 9 +- .../tkz/tkz-euclide/latex/tkz-lib-eu-marks.tex | 6 +- .../tkz/tkz-euclide/latex/tkz-lib-eu-shape.tex | 6 +- .../tkz/tkz-euclide/latex/tkz-obj-eu-axesmin.tex | 6 +- .../tkz-euclide/latex/tkz-obj-eu-circles-by.tex | 6 +- .../tkz/tkz-euclide/latex/tkz-obj-eu-circles.tex | 6 +- .../tkz/tkz-euclide/latex/tkz-obj-eu-compass.tex | 6 +- .../tkz-euclide/latex/tkz-obj-eu-draw-angles.tex | 6 +- .../tkz-euclide/latex/tkz-obj-eu-draw-circles.tex | 6 +- .../tkz-euclide/latex/tkz-obj-eu-draw-lines.tex | 6 +- .../tkz-euclide/latex/tkz-obj-eu-draw-points.tex | 6 +- .../tkz-euclide/latex/tkz-obj-eu-draw-polygons.tex | 6 +- .../tkz/tkz-euclide/latex/tkz-obj-eu-grids.tex | 6 +- .../tkz/tkz-euclide/latex/tkz-obj-eu-lines.tex | 6 +- .../tkz/tkz-euclide/latex/tkz-obj-eu-points-by.tex | 6 +- .../tkz-euclide/latex/tkz-obj-eu-points-rnd.tex | 6 +- .../tkz-euclide/latex/tkz-obj-eu-points-spc.tex | 6 +- .../tkz-euclide/latex/tkz-obj-eu-points-with.tex | 6 +- .../tkz/tkz-euclide/latex/tkz-obj-eu-points.tex | 6 +- .../tkz/tkz-euclide/latex/tkz-obj-eu-polygons.tex | 6 +- .../tkz-euclide/latex/tkz-obj-eu-protractor.tex | 6 +- .../tkz/tkz-euclide/latex/tkz-obj-eu-sectors.tex | 6 +- .../tkz/tkz-euclide/latex/tkz-obj-eu-show.tex | 6 +- .../tkz/tkz-euclide/latex/tkz-obj-eu-triangles.tex | 6 +- .../tkz/tkz-euclide/latex/tkz-tools-eu-BB.tex | 6 +- .../tkz/tkz-euclide/latex/tkz-tools-eu-angles.tex | 6 +- .../tkz/tkz-euclide/latex/tkz-tools-eu-base.tex | 6 +- .../tkz/tkz-euclide/latex/tkz-tools-eu-colors.tex | 6 +- .../latex/tkz-tools-eu-intersections.tex | 6 +- .../tkz/tkz-euclide/latex/tkz-tools-eu-math.tex | 6 +- .../tkz/tkz-euclide/latex/tkz-tools-eu-modules.tex | 6 +- .../tkz/tkz-euclide/latex/tkz-tools-eu-text.tex | 6 +- .../tkz-euclide/latex/tkz-tools-eu-utilities.tex | 6 +- 57 files changed, 964 insertions(+), 592 deletions(-) create mode 100644 macros/latex/contrib/media4svg/example/random.mp4 (limited to 'macros/latex') diff --git a/macros/latex/contrib/colorframed/README.md b/macros/latex/contrib/colorframed/README.md index 59bc8c094b..1d5084a71a 100644 --- a/macros/latex/contrib/colorframed/README.md +++ b/macros/latex/contrib/colorframed/README.md @@ -1,6 +1,6 @@ -% colorframed 0.9 +% colorframed 0.9a % Jean-François Burnol -% 2022/09/22 +% 2022/09/23 ## Usage @@ -11,8 +11,8 @@ For reporting issues, use the ## Purpose -The initial release `0.9` of `2022/09/22` fixes colour leak issues -which one encounters with the environments provided by the +The initial release fixes colour leak issues which one encounters +with the environments provided by the [framed](https://ctan.org/pkg/framed) package. It is planned to extend `colorframed` with one more environment, @@ -43,13 +43,6 @@ This Work has the LPPL maintenance status author-maintained. The Author of this Work is Jean-François Burnol -This Work consists of the package files `colorframed.sty`, the +This Work consists of the package file `colorframed.sty`, the documentation source `colorframed-doc.tex` and its conversion `colorframed-doc.pdf`, as well as this `README.md`. - - diff --git a/macros/latex/contrib/colorframed/colorframed-doc.pdf b/macros/latex/contrib/colorframed/colorframed-doc.pdf index 16ee21cf33..640c47d683 100644 Binary files a/macros/latex/contrib/colorframed/colorframed-doc.pdf and b/macros/latex/contrib/colorframed/colorframed-doc.pdf differ diff --git a/macros/latex/contrib/colorframed/colorframed-doc.tex b/macros/latex/contrib/colorframed/colorframed-doc.tex index cc2b6fca39..3f00ea2706 100644 --- a/macros/latex/contrib/colorframed/colorframed-doc.tex +++ b/macros/latex/contrib/colorframed/colorframed-doc.tex @@ -1,4 +1,5 @@ -\documentclass[a4paper,dvipdfmx,11pt]{article} +\documentclass[a4paper,dvipdfmx,11pt,english]{article} +\usepackage{babel} \usepackage[T1]{fontenc} \usepackage{geometry} \usepackage[straightquotes,ttzdefault]{newtxtt} @@ -9,19 +10,21 @@ % course % titled-frame \colorlet{TFFrameColor}{teal!20} -\colorlet{TFTitleColor}{orange} -\def\colorframedTFconlabcolorcommand{\color{red}} +\colorlet{TFTitleColor}{purple} +\def\colorframedTFconlabcolorcommand{\color{purple}} % shaded -\colorlet{shadecolor}{orange!20} +\colorlet{shadecolor}{orange!10} % framed \FrameRule5pt\relax -\FrameSep9pt\relax +\FrameSep9pt\relax % this is framed.sty default anyhow, 3\fboxsep +% attention that \FrameSep influences framed but also shaded, shaded* and +% oframed, which is not so clear from reading only framed documentation \def\colorframedbordercolorcommand{\color{red!20}} \title{The \colorframed package% \vadjust{\vtop to 0pt{\hbox - to\linewidth{\strut\footnotesize Release 0.9 of - 2022/09/22\hss report issues at \url{https://github.com/jfbu/colorframed}}\vss}}% + to\linewidth{\strut\footnotesize Release 0.9a of + 2022/09/23\hss report issues at \url{https://github.com/jfbu/colorframed}}\vss}}% } \author{Jean-François Burnol} \date{} @@ -54,22 +57,20 @@ This package fixes various colour leaks one encounters with the environments from Donald Arseneau's package \ctanpackage{framed}. Typically, colour leaks occur if using -|\color| inside the environments, or more subtly also when +|\color| (at top level) inside the environments, or more subtly also when using |\textcolor| with an argument ending up being split at a page break. This latter type of colour leak (or colour disappearance) is the more challenging one as the fix requires modifications or replacements not only of some of the \ctanpackage{framed}.sty -macros (such as its |\CustomFBox|) but also to some \LaTeX2e -internals, as some environments of \ctanpackage{framed}.sty -rely on usage of |\fbox| or |\colorbox|. - -However, rather than overwriting such internal \LaTeX2e macros -as |\@frameb@x| or |\color@b@x|, the \ctanpackage{framed}.sty -environments are modified by \colorframed to make use of -custom replacements to |\fbox|, |\colorbox|, and -|\CustomFBox|. +macros (such as its |\CustomFBox|, which \colorframed overwrites) +but also to some \LaTeX2e internals, as some environments of +\ctanpackage{framed}.sty rely on usage of |\fbox| or |\colorbox|. +Rather than overwriting internal \LaTeX2e macros such as +|\@frameb@x| or |\color@b@x|, \colorframed simply replaces |\fbox| +and |\colorbox| in the \ctanpackage{framed}.sty environments by +appropriate substitutes. I am aware \ctanpackage{tcolorbox} package documentation explains at least one colour issue which looks similar to those fixed @@ -80,42 +81,31 @@ currently. The problems are solved here without involving an extra colour stack, hence the fixes work also with xelatex. -% The analysis and original workarounds for using framed.sty -% with colours were developed by me in some contributions I made -% to the Sphinx project (\url{https://github.com/sphinx-doc/sphinx}) -% and I am transferring here the general idea. - -% The key thing is that the boxes handled by framed.sty may -% contain isolated colour push or colour pop. We must make -% sure an isolated colour push, if followed by colour changes, -% is always followed by paired ones, and never by a colour pop -% from a colour command originated "prior". - -% TODO: transfer also the breakable box environment based on pict2e -% and allowing rounded corners and shadows developped overthere. - \section{The environments from \ctanpackage{framed}} \begin{titled-frame}{A list of the environments from package \ctanpackage{framed}} - This indicates the boxing macros they are - based upon originally, and what this package does as replacement: - \begin{description} - \item[framed] (|\fbox|) The \colorframed variant uses own |\CustomFBox| rather. - - \item[oframed] (|\CustomFBox|) \colorframed replaces it with own version. - - \item[titled-frame] (|\CustomFbox|) Replaced by own version. - - \item[shaded] (|\colorbox|) Replaced by |\colorframedcolorbox|. - - \item[shaded*] (|\colorbox|) Idem. - - \item[snugshade] (|\colorbox|) Idem. - - \item[snugshade*] (|\colorbox|) Idem. - - \item[leftbar] This one does not use any boxing macro. - \end{description} + This list indicates which boxing macros are + used in the original, and their replacement. +% (investigate later why something such as shortverb |#| in +% preamble does not work) +\halign{\bfseries#\hfil&(#\unskip)~\hfil&#\hfil\cr +% + framed & |\fbox| & Replaced by specialization of own \rlap{\string\CustomFBox.}\cr +% + oframed & |\CustomFBox| & \colorframed uses a redefined |\CustomFBox|.\cr +% + titled-frame & |\CustomFBox| & \emph{id.}\cr +% + shaded & |\colorbox| & Replaced by |\colorframedcolorbox|.\cr +% + shaded* & |\colorbox| & \emph{id.}\cr +% + snugshade & |\colorbox| & \emph{id.}\cr +% + snugshade* & |\colorbox| & \emph{id.}\cr +% + leftbar & none & This one does not use any boxing macro.\cr +} \end{titled-frame} \begin{shaded*} @@ -132,7 +122,8 @@ colour stack, hence the fixes work also with xelatex. further one will need to renew the environment definition, which is left untouched by \colorframed (which modifies rather |\TitleBarFrame| and |\CustomFBox|). Here is - how this environment is defined: + how this environment is defined inside \ctanpackage{framed}.sty: (code and comments by Donald Arseneau)\par +\begin{footnotesize} \begin{verbatim} % A particular type of titled frame with continuation marks. % Parameter #1 is the title, repeated on each page. @@ -151,10 +142,14 @@ colour stack, hence the fixes work also with xelatex. {\endMakeFramed} \end{verbatim} % pas de \footnote dans les environnements de framed... -\begin{footnotesize}\normalcolor -As a side note, this `titled-frame' environment was partly +\normalcolor +Side note: this `titled-frame' environment was in effect broken in recent \LaTeX\ which has modified how |\smash| -behaves; \colorframed fixes it in passing.\par +behaves; \colorframed fixes this infelicity in passing.\par + +\emph{(the current box is an example of \emph{`shaded*'} environment, next one is with +\emph{`snugshade*'}, both use a \emph{shadecolor} which must be defined by user)} +\par \end{footnotesize} \end{shaded*} % jeudi 22 septembre 2022 à 14:37:08 @@ -167,31 +162,32 @@ behaves; \colorframed fixes it in passing.\par % Ce n'est pas induit par colorframed j'ai vérifié sans lui. %\begin{enumerate} %\item\relax% {\footnotesize Now testing the `snugshade*' environment.} -\begin{snugshade*}\textcolor{ForestGreen}{% using textcolor to - % avoid extra vspace from \color +\begin{snugshade*} +\leavevmode\color{OliveGreen} One does not need to dive into the details of the macros used above to understand intuitively how they are supposed to influence the final output. To modify this output, simply redefine this environment with suitable changes. - Notice in particular that \expandafter|\string\blacktriangleright| requires to - the best of my knowledge loading of \ctanpackage{amssymb} or - other math symbols package and it is up to user to do it, if - its usage is kept.} -%\end{snugshade*} -%\item\relax% {\footnotesize It appears to have a bug of not being -% usable directly after |\item|.\par} -%\begin{snugshade*} - -The original environment gives to the continuation label at -bottom right of the first part of a broken box the same colour -as the frame. The \colorframed variant adds the possibility -to customize this colour via suitably defining a macro, in the -example above we did: + + Notice in particular that |$\blacktriangleright$| + (which produces $\blacktriangleright$ and acquires thus a colour + despite its name) requires to + the best of my knowledge loading \ctanpackage{amssymb} or + some other math symbols package and it is up to user to do it, if + its usage is kept. +% + The original environment gives to this continuation label the + same colour as the frame. \colorframed adds the + possibility to customize this colour via suitably defining a + macro, like this for example:% le % pour éviter un bug lorsqu'un caractère + % espace est à la fin d'une ligne quasi-pleine, + % je soupçonne bug de TeX que j'ai déjà + % rencontré plusieurs fois, ou peut-être ici un + % problème du \trivlist de verbatim \begin{verbatim} -\renewcommand\colorframedTFconlabcolorcommand{\color{red}} +\renewcommand\colorframedTFconlabcolorcommand{\color{purple}} \end{verbatim} \end{snugshade*} -%\end{enumerate} \begin{framed} This is an example of usage of the environment `framed'. @@ -203,6 +199,8 @@ example above we did: matter of redefining the |\colorframedbordercolorcommand| macro, which defaults to |\normalcolor|. +\footnotesize (|\color{blue}| in source) +\normalsize \color{blue} So the current frame was configured using: \begin{verbatim} @@ -210,29 +208,55 @@ example above we did: \setlength{\FrameSep}{9pt} \renewcommand\colorframedbordercolorcommand{\color{red!20}} \end{verbatim} +\begin{footnotesize}\normalcolor + The length |\FrameSep| influences also `oframed', `shaded', and `shaded*', + but `snugshade' and `snugshade*' employ |\fboxsep| rather. + + As per |\FrameRule|, it influences `framed' and `oframed' but not + `titled-frame' which simply uses |\fboxrule| for its border width.\par +\end{footnotesize} The text colour induced from a |\color{blue}| will not leak out to the frame or to the text following this environment, even in case of a pagebreak. \end{framed} -As indicated the aim of \colorframed is not to modify the -existing environments of \ctanpackage{framed}.sty into -acquiring more capabilities and customizability, and we have -indicated already the two sole customization additions. The aim -was strictly to fix the colour leak issues. +The aim of \colorframed regarding \ctanpackage{framed} existing +code base is strictly limited to fixing the colour leak issues, +there is not intent to extend the existing environments of +\ctanpackage{framed} with additional capabilities and +customizability: we have mentioned already the two sole +customization additions. \section{TODO} -The author has developed based upon usage of -\ctanpackage{pict2e} breakable boxes with round corners, -background colour, optional shadow, and other goodies and is -planning on incorporating this environment into the package. - +The author has developed based upon usage of \ctanpackage{pict2e} +breakable boxes with round corners, background colour, optional +shadow (possibly inset), and other goodies and is planning on +incorporating this environment into the package. +% Of course, it will remain limited in comparison to the fully customizable boxes provided by package \ctanpackage{tcolorbox} but our testing showed significant speed-up in build time, which may matter for long documents. -Hopefully this addition will be done when time will permit. - +% Hopefully this addition will be done when time will permit. + +\thispagestyle{empty} +\enlargethispage{2\baselineskip} + +\colorlet{shadecolor}{lightgray!50} +\footnotesize +\begin{snugshade} + After initial release made it to CTAN on + 2022/09/22 I became aware of \ctanpackage{longfbox} which + provides already such \ctanpackage{pict2e} breakable boxes with + rounded corners (even elliptical arcs), and furthermore with a + CSS-like interface which is exactly what I had done on my side + too... I need to check more \ctanpackage{longfbox} before a + decision is made here! Perhaps it will be better to keep + \colorframed as it is currently and produce another package for + extras such as \ctanpackage{pict2e}-based boxes or a key-value + interface to `inline' or `display' box macros and environments. +\end{snugshade} +\centerline{\hrulefill documentation ends here\hrulefill} \end{document} \ No newline at end of file diff --git a/macros/latex/contrib/colorframed/colorframed.sty b/macros/latex/contrib/colorframed/colorframed.sty index db6a5d5e2f..677cdef8a2 100644 --- a/macros/latex/contrib/colorframed/colorframed.sty +++ b/macros/latex/contrib/colorframed/colorframed.sty @@ -1,9 +1,23 @@ -% colorframed.sty v0.9 2022/09/22 +% colorframed.sty v0.9a 2022/09/23 % Copyright (c) 2022 Jean-François Burnol % Distributed under the terms of the LPPL 1.3c, see README.md \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{colorframed} - [2022/09/22 v0.9 fix `framed' breakable boxes colour leaks (JFB)] + [2022/09/23 v0.9a fix `framed' breakable boxes colour leaks (JFB)] +% This is actually same as 0.9 release of 2022/09/22 apart from these +% comments: +% +% The analysis and original workarounds for using framed.sty +% with colours were developed by me in some contributions I made +% to the Sphinx project (\url{https://github.com/sphinx-doc/sphinx}) +% and I am transferring here the general idea. +% +% The key thing is that the boxes handled by framed.sty may +% contain isolated colour push or colour pop. We must make +% sure an isolated colour push, if followed by colour changes, +% is always followed by paired ones, and never by a colour pop +% from a colour command originated "prior". +% \RequirePackage{framed} \RequirePackage{color} % First we must make \MakeFramed/\endMakeFramed colour safe. diff --git a/macros/latex/contrib/graphics-def/README.md b/macros/latex/contrib/graphics-def/README.md index 5ab6b8adee..c159d2e89b 100644 --- a/macros/latex/contrib/graphics-def/README.md +++ b/macros/latex/contrib/graphics-def/README.md @@ -1,7 +1,7 @@ LaTeX support for color and graphics ==================================== -Release 2022-04-16 +Release 2022-09-22 This bundle contains the 'engine-dependent' part of support for color and graphics in LaTeX2e (the code here will also function diff --git a/macros/latex/contrib/graphics-def/dvipdfmx.def b/macros/latex/contrib/graphics-def/dvipdfmx.def index 1d82661b11..ce1f10c3b6 100644 --- a/macros/latex/contrib/graphics-def/dvipdfmx.def +++ b/macros/latex/contrib/graphics-def/dvipdfmx.def @@ -17,7 +17,7 @@ %% https://github.com/latex3/graphics-def/issues %% \ProvidesFile{dvipdfmx.def} - [2022/04/16 v5.0l Graphics/color driver for dvipdfmx] + [2022/09/22 v5.0m Graphics/color driver for dvipdfmx] \def\GPT@space{ } \def\c@lor@arg#1{% \dimen@#1\p@ @@ -306,6 +306,8 @@ {\expandafter\let\csname ifGin@setpagesize\expandafter\endcsname \csname iftrue\endcsname} {} +\@ifundefined{stockwidth}{\newdimen\stockwidth}{} +\@ifundefined{stockheight}{\newdimen\stockheight}{} \ifGin@setpagesize \ifx\paperwidth\@undefined\else \AtBeginDocument{% @@ -314,16 +316,25 @@ \ifnum\mag=\@m \AtBeginDvi{% \begingroup - \@ifundefined{stockwidth}{} - {% - \paperwidth\stockwidth - \paperheight\stockheight - }% -\ifdim\paperwidth>\z@ -\ifdim\paperheight>\z@ -\special{pdf:pagesize width \the\paperwidth\GPT@space height \the\paperheight}% -\fi -\fi + \ifdim\stockwidth>\z@ + \ifdim\stockheight>\z@ + \special{papersize=\the\stockwidth,\the\stockheight}% + \else + \ifdim\paperwidth>\z@ + \ifdim\paperheight>\z@ + \special{papersize=\the\paperwidth,\the\paperheight}% + \fi + \fi + \fi + \else + \ifdim\stockwidth=\z@ + \ifdim\paperwidth>\z@ + \ifdim\paperheight>\z@ + \special{papersize=\the\paperwidth,\the\paperheight}% + \fi + \fi + \fi + \fi \endgroup}% \fi } diff --git a/macros/latex/contrib/graphics-def/dvips.def b/macros/latex/contrib/graphics-def/dvips.def index 204ec64293..f5ba5bfc46 100644 --- a/macros/latex/contrib/graphics-def/dvips.def +++ b/macros/latex/contrib/graphics-def/dvips.def @@ -1,6 +1,6 @@ %% dvips.def Copyright (C) 1994 David Carlisle Sebastian Rahtz %% Copyright (C) 1995-1999 David Carlisle -%% Copyright (C) 2000-2017 David Carlisle, LaTeX3 Project +%% Copyright (C) 2000-2022 David Carlisle, LaTeX3 Project %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3c @@ -17,7 +17,7 @@ %% https://github.com/latex3/graphics-def/issues %% \ProvidesFile{dvips.def} - [2017/06/20 v3.1d Graphics/color driver for dvips] + [2022/09/22 v3.1e Graphics/color driver for dvips] \def\GPT@space{ } \def\c@lor@arg#1{% \dimen@#1\p@ @@ -146,24 +146,35 @@ {\expandafter\let\csname ifGin@setpagesize\expandafter\endcsname \csname iftrue\endcsname} {} +\@ifundefined{stockwidth}{\newdimen\stockwidth}{} +\@ifundefined{stockheight}{\newdimen\stockheight}{} \ifGin@setpagesize \ifx\paperwidth\@undefined\else \AtBeginDocument{% % If a package has changed \mag, assume it knows what it is doing % and leave page size alone -\ifnum\mag=\@m + \ifnum\mag=\@m \AtBeginDvi{% \begingroup - \@ifundefined{stockwidth}{} - {% - \paperwidth\stockwidth - \paperheight\stockheight - }% - \ifdim\paperwidth>\z@ - \ifdim\paperheight>\z@ - \special{papersize=\the\paperwidth,\the\paperheight}% + \ifdim\stockwidth>\z@ + \ifdim\stockheight>\z@ + \special{papersize=\the\stockwidth,\the\stockheight}% + \else + \ifdim\paperwidth>\z@ + \ifdim\paperheight>\z@ + \special{papersize=\the\paperwidth,\the\paperheight}% + \fi + \fi + \fi + \else + \ifdim\stockwidth=\z@ + \ifdim\paperwidth>\z@ + \ifdim\paperheight>\z@ + \special{papersize=\the\paperwidth,\the\paperheight}% + \fi + \fi + \fi \fi - \fi \endgroup}% \fi } diff --git a/macros/latex/contrib/graphics-def/dvisvgm.def b/macros/latex/contrib/graphics-def/dvisvgm.def index 8390ee29b9..c298c4b38f 100644 --- a/macros/latex/contrib/graphics-def/dvisvgm.def +++ b/macros/latex/contrib/graphics-def/dvisvgm.def @@ -16,7 +16,7 @@ %% %% https://github.com/latex3/graphics-def/issues % -\ProvidesFile{dvisvgm.def}[2022/02/19 v1.5 dvisvgm graphics driver for latex] +\ProvidesFile{dvisvgm.def}[2022/09/22 v1.6 dvisvgm graphics driver for latex] % The following is copied from dvips.def: \def\GPT@space{ } \def\c@lor@arg#1{% @@ -78,7 +78,7 @@ \def\current@color{ Black} \def\set@color{\special{color push \current@color}\aftergroup\reset@color} \def\reset@color{\special{color pop}} -\def\set@page@color{\special{bgcolor \current@color}} +\def\set@page@color{\special{background \current@color}} \def\define@color@named#1#2{\expandafter\let\csname col@#1\endcsname\@nnil} \def\Grot@start{% \special{ps: gsave currentpoint currentpoint translate \Grot@angle\GPT@space neg rotate neg exch neg exch translate}% @@ -254,4 +254,3 @@ \endinput %% %% End of file `dvisvgm.def'. - diff --git a/macros/latex/contrib/graphics-def/luatex.def b/macros/latex/contrib/graphics-def/luatex.def index 102e8974c6..b32506d055 100644 --- a/macros/latex/contrib/graphics-def/luatex.def +++ b/macros/latex/contrib/graphics-def/luatex.def @@ -3,7 +3,7 @@ %% Hans Hagen, Heiko Oberdiek and %% Martin Schr\"oder %% Copyright (C) 2016-2018 LaTeX3 project and Heiko Oberdiek -%% Copyright (C) 2018-2020 LaTeX3 project +%% Copyright (C) 2018-2022 LaTeX3 project %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3c @@ -20,7 +20,7 @@ %% https://github.com/latex3/graphics-def/issues %% \ProvidesFile{luatex.def} - [2021/06/01 v1.2c Graphics/color driver for luatex] + [2022/09/22 v1.2d Graphics/color driver for luatex] \def\GPT@space{ } \def\c@lor@arg#1{% \dimen@#1\p@ @@ -563,10 +563,26 @@ }{% \ifdim\stockwidth>0pt\relax \ifdim\stockheight>0pt\relax - \pagewidth=\stockwidth - \pageheight=\stockheight + \setlength{\pagewidth}{\stockwidth}% + \setlength{\pageheight}{\stockheight}% + \else + \ifdim\paperwidth>0pt\relax + \ifdim\paperheight>0pt\relax + \setlength{\pagewidth}{\paperwidth}% + \setlength{\pageheight}{\paperheight}% + \fi + \fi \fi - \fi + \else + \ifdim\stockwidth=0pt\relax + \ifdim\paperwidth>0pt\relax + \ifdim\paperheight>0pt\relax + \setlength{\pagewidth}{\paperwidth}% + \setlength{\pageheight}{\paperheight}% + \fi + \fi + \fi + \fi }% \fi } diff --git a/macros/latex/contrib/graphics-def/pdftex.def b/macros/latex/contrib/graphics-def/pdftex.def index e9fd01833b..35eb376cfd 100644 --- a/macros/latex/contrib/graphics-def/pdftex.def +++ b/macros/latex/contrib/graphics-def/pdftex.def @@ -3,7 +3,7 @@ %% Hans Hagen, Heiko Oberdiek and %% Martin Schr\"oder %% Copyright (C) 2016-2018 LaTeX3 project and Heiko Oberdiek -%% Copyright (C) 2018-2020 LaTeX3 project +%% Copyright (C) 2018-2022 LaTeX3 project %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3c @@ -20,7 +20,7 @@ %% https://github.com/latex3/graphics-def/issues %% \ProvidesFile{pdftex.def} - [2020/10/05 v1.2a Graphics/color driver for pdftex] + [2022/09/22 v1.2b Graphics/color driver for pdftex] \def\GPT@space{ } \def\c@lor@arg#1{% \dimen@#1\p@ @@ -555,30 +555,36 @@ E \else {\expandafter\let\csname ifGin@setpagesize\expandafter\endcsname \csname iftrue\endcsname} {} +\@ifundefined{stockwidth}{\newdimen\stockwidth}{} +\@ifundefined{stockheight}{\newdimen\stockheight}{} \ifGin@setpagesize \ifx\paperwidth\@undefined\else \AtBeginDocument{% % If a package has changed \mag, assume it knows what it is doing % and leave page size alone \ifnum\mag=\@m - \@ifundefined{stockwidth}{% - \@ifundefined{paperwidth}{% - }{% - \ifdim\paperwidth>0pt\relax - \ifdim\paperheight>0pt\relax - \pdfpagewidth=\paperwidth - \pdfpageheight=\paperheight - \fi - \fi - }% -}{% \ifdim\stockwidth>0pt\relax \ifdim\stockheight>0pt\relax - \pdfpagewidth=\stockwidth - \pdfpageheight=\stockheight + \setlength{\pdfpagewidth}{\stockwidth}% + \setlength{\pdfpageheight}{\stockheight}% + \else + \ifdim\paperwidth>0pt\relax + \ifdim\paperheight>0pt\relax + \setlength{\pdfpagewidth}{\paperwidth}% + \setlength{\pdfpageheight}{\paperheight}% + \fi + \fi + \fi + \else + \ifdim\stockwidth=0pt\relax + \ifdim\paperwidth>0pt\relax + \ifdim\paperheight>0pt\relax + \setlength{\pdfpagewidth}{\paperwidth}% + \setlength{\pdfpageheight}{\paperheight}% + \fi + \fi \fi \fi -}% \fi } \fi diff --git a/macros/latex/contrib/graphics-def/xetex.def b/macros/latex/contrib/graphics-def/xetex.def index 7293379311..6f9e00a594 100644 --- a/macros/latex/contrib/graphics-def/xetex.def +++ b/macros/latex/contrib/graphics-def/xetex.def @@ -17,7 +17,7 @@ %% https://github.com/latex3/graphics-def/issues %% \ProvidesFile{xetex.def} - [2022/04/16 v5.0m Graphics/color driver for xetex] + [2022/09/22 v5.0n Graphics/color driver for xetex] \def\GPT@space{ } \def\c@lor@arg#1{% \dimen@#1\p@ @@ -400,30 +400,36 @@ {\expandafter\let\csname ifGin@setpagesize\expandafter\endcsname \csname iftrue\endcsname} {} +\@ifundefined{stockwidth}{\newdimen\stockwidth}{} +\@ifundefined{stockheight}{\newdimen\stockheight}{} \ifGin@setpagesize \ifx\paperwidth\@undefined\else \AtBeginDocument{% % If a package has changed \mag, assume it knows what it is doing % and leave page size alone \ifnum\mag=\@m -\@ifundefined{stockwidth}{% -\@ifundefined{paperwidth}{% -}{% -\ifdim\paperwidth>0pt\relax -\ifdim\paperheight>0pt\relax -\pdfpagewidth=\paperwidth -\pdfpageheight=\paperheight -\fi -\fi -}% -}{% -\ifdim\stockwidth>0pt\relax -\ifdim\stockheight>0pt\relax -\pdfpagewidth=\stockwidth -\pdfpageheight=\stockheight -\fi -\fi -}% + \ifdim\stockwidth>0pt\relax + \ifdim\stockheight>0pt\relax + \setlength{\pdfpagewidth}{\stockwidth}% + \setlength{\pdfpageheight}{\stockheight}% + \else + \ifdim\paperwidth>0pt\relax + \ifdim\paperheight>0pt\relax + \setlength{\pdfpagewidth}{\paperwidth}% + \setlength{\pdfpageheight}{\paperheight}% + \fi + \fi + \fi + \else + \ifdim\stockwidth=0pt\relax + \ifdim\paperwidth>0pt\relax + \ifdim\paperheight>0pt\relax + \setlength{\pdfpagewidth}{\paperwidth}% + \setlength{\pdfpageheight}{\paperheight}% + \fi + \fi + \fi + \fi \fi } \fi diff --git a/macros/latex/contrib/media4svg/ChangeLog b/macros/latex/contrib/media4svg/ChangeLog index bd283d4094..b7ce2c25a5 100644 --- a/macros/latex/contrib/media4svg/ChangeLog +++ b/macros/latex/contrib/media4svg/ChangeLog @@ -1,3 +1,7 @@ +2022-09-23 + * v0.11 + * improvement: scaling of video player controls + 2022-09-12 * v0.10 * new: youtube support diff --git a/macros/latex/contrib/media4svg/README.md b/macros/latex/contrib/media4svg/README.md index ffd660a6b1..4b280442d2 100644 --- a/macros/latex/contrib/media4svg/README.md +++ b/macros/latex/contrib/media4svg/README.md @@ -1,6 +1,6 @@ # The `media4svg` LaTeX Package -Version 0.10, 2022/09/12 +Version 0.11, 2022/09/23 © 2020--today, Alexander Grahn @@ -87,8 +87,8 @@ The package itself is loaded with Package options are: `draft`, `final`, `autoplay`, `loop`, `controls`, `mimetype`, `width`, `height`, `totalheight`, `keepaspectratio`, `scale`, -`url`, `embed`. They have the same meaning as the command options explained -below, but are applied globally. +`url`, `youtube`, `embed`. They have the same meaning as the command options +explained below, but are applied globally. Note that `media4svg` is incompatible with package `media9`. @@ -148,6 +148,11 @@ be embedded in the SVG file. ````latex youtube ```` +The last argument of `\includemedia' is taken as a comma-separated list of +YouTube video IDs. +````latex +youtube +```` This embeds a YouTube player. The last argument of `\includemedia` is a single or a comma-separated list of YouTube video IDs. ````latex diff --git a/macros/latex/contrib/media4svg/example/beamer-example-1.svg b/macros/latex/contrib/media4svg/example/beamer-example-1.svg index 535c57cccd..4b47032022 100644 --- a/macros/latex/contrib/media4svg/example/beamer-example-1.svg +++ b/macros/latex/contrib/media4svg/example/beamer-example-1.svg @@ -3,68 +3,41 @@ -Presentationexamplewithembeddedvideo -UseaWebbrowserandpress - - - - - - - - - - - - - - - -F11 - - - - - - - - - - -AlexG12thSeptember2022 - -ToggleFull-Screenwith - +Presentationexamplewithembeddedvideo +—The +media4svg +package—AlexG23rdSeptember2022 + +PuttheWebbrowsertofullscreenwith + @@ -75,11 +48,11 @@ text.f10 {font-family:nf8;font-size:10.909088px} - + -F11 +F11 @@ -90,23 +63,23 @@ text.f10 {font-family:nf8;font-size:10.909088px} -,navigatewith - +,navigatewith + - + - - + + -PageUp +PageDn @@ -117,23 +90,23 @@ text.f10 {font-family:nf8;font-size:10.909088px} -& - +& + - + - - + + -PageDn +PageUp @@ -144,11 +117,11 @@ text.f10 {font-family:nf8;font-size:10.909088px} -,mouseclickormousewheel.Tobuildthispresentationfromthesource,run: -dvilualatexbeamer-exampledvilualatexbeamer-exampledvisvgm--bbox=papersize--font-format=woff2--zoom=-1--page=---linkmark=none\beamer-example - +,left&rightmouseclickormousewheel.Tobuildthispresentationfromthesource,run: +dvilualatexbeamer-exampledvilualatexbeamer-exampledvisvgm--bbox=papersize--font-format=woff2--zoom=-1--page=---linkmark=none\beamer-example + - + \ No newline at end of file diff --git a/macros/latex/contrib/media4svg/example/beamer-example-2.svg b/macros/latex/contrib/media4svg/example/beamer-example-2.svg index 6220dd1899..1b4b4acd48 100644 --- a/macros/latex/contrib/media4svg/example/beamer-example-2.svg +++ b/macros/latex/contrib/media4svg/example/beamer-example-2.svg @@ -3,42 +3,44 @@ -Videofile -embeddedlocalvideofilefrompackage -mwe -\includemedia[width=24em,height=13.5em]{}{example-movie.mp4} - +Videofile +Examplesofembeddedlocalvideofiles.Recommendedfileformatsare +mp4/h264 +, +webm +and +ogg +.SomeWebbrowsersrequirethevideotobeexplicitlymutedinordertoautoplay. +\includemedia[width=26em,height=14.625em]{}{example-movie.mp4}\includemedia[width=19.5em,height=14.625em,loop,autoplay,muted]{}{random.mp4} + - - -