diff options
author | Karl Berry <karl@freefriends.org> | 2022-12-03 20:57:14 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2022-12-03 20:57:14 +0000 |
commit | 4e6b6563d55b107fca068e76b243e07311f4400e (patch) | |
tree | e39707ff9407a2ec919cfb9cfdacffaa37b3f37e /Master | |
parent | 04771291c93b52b88fd70176b51833fed25d97ec (diff) |
ppt-slides (3dec22)
git-svn-id: svn://tug.org/texlive/trunk@65179 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r-- | Master/texmf-dist/doc/latex/ppt-slides/DEPENDS.txt | 13 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/ppt-slides/LICENSE.txt | 21 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/ppt-slides/README.md | 9 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/ppt-slides/ppt-slides.pdf | bin | 229579 -> 885857 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/ppt-slides/ppt-slides.tex | 262 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/ppt-slides/ppt-slides.dtx | 662 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/ppt-slides/ppt-slides.ins | 55 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/ppt-slides/ppt-slides.sty | 122 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/ppt-slides/ppt-templates/ppt-9x6.tex | 1 |
9 files changed, 833 insertions, 312 deletions
diff --git a/Master/texmf-dist/doc/latex/ppt-slides/DEPENDS.txt b/Master/texmf-dist/doc/latex/ppt-slides/DEPENDS.txt index db184dd2634..74961c7a1de 100644 --- a/Master/texmf-dist/doc/latex/ppt-slides/DEPENDS.txt +++ b/Master/texmf-dist/doc/latex/ppt-slides/DEPENDS.txt @@ -1,13 +1,20 @@ hard pgfopts hard xcolor -hard ifthen hard href-ul hard pagecolor hard varwidth hard qrcode -hard tikz +hard pgf hard tikzpagenodes hard enumitem hard crumbs -hard tabularx hard seqsplit +hard hardwrap +hard ifoddpage +hard textpos +hard anyfontsize +hard fontsize +hard changepage +hard soul +hard lastpage +hard titling
\ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/ppt-slides/LICENSE.txt b/Master/texmf-dist/doc/latex/ppt-slides/LICENSE.txt new file mode 100644 index 00000000000..463e7d252d4 --- /dev/null +++ b/Master/texmf-dist/doc/latex/ppt-slides/LICENSE.txt @@ -0,0 +1,21 @@ +(The MIT License) + +Copyright (c) 2022 Yegor Bugayenko + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the 'Software'), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/Master/texmf-dist/doc/latex/ppt-slides/README.md b/Master/texmf-dist/doc/latex/ppt-slides/README.md index 9543ebc462d..46758695fc0 100644 --- a/Master/texmf-dist/doc/latex/ppt-slides/README.md +++ b/Master/texmf-dist/doc/latex/ppt-slides/README.md @@ -25,11 +25,10 @@ and then use in preamble: \end{document} ``` -The full example and all commands are available in -[`ppt-slides.tex`](https://github.com/yegor256/ppt-slides/blob/master/ppt-slides.tex) file. +Otherwise, you can download [`ppt-slides.sty`](https://raw.githubusercontent.com/yegor256/ppt-slides/gh-pages/ppt-slides/ppt-slides.sty) and add to your project. -If you want to contribute yourself, make a fork, create a branch, -then run `make` in root directory. +If you want to contribute yourself, make a fork, then create a branch, +then run `l3build ctan` in the root directory. It should compile everything without errors. If not, submit an issue and wait. -Otherwise, make your changes and then run `make` again. If the build is +Otherwise, make your changes and then run `l3build ctan` again. If the build is still clean, submit a pull request. diff --git a/Master/texmf-dist/doc/latex/ppt-slides/ppt-slides.pdf b/Master/texmf-dist/doc/latex/ppt-slides/ppt-slides.pdf Binary files differindex 3b357352bf3..c256214d9b9 100644 --- a/Master/texmf-dist/doc/latex/ppt-slides/ppt-slides.pdf +++ b/Master/texmf-dist/doc/latex/ppt-slides/ppt-slides.pdf diff --git a/Master/texmf-dist/doc/latex/ppt-slides/ppt-slides.tex b/Master/texmf-dist/doc/latex/ppt-slides/ppt-slides.tex deleted file mode 100644 index 5be0b6029f5..00000000000 --- a/Master/texmf-dist/doc/latex/ppt-slides/ppt-slides.tex +++ /dev/null @@ -1,262 +0,0 @@ -% (The MIT License) -% -% Copyright (c) 2022 Yegor Bugayenko -% -% Permission is hereby granted, free of charge, to any person obtaining a copy -% of this software and associated documentation files (the 'Software'), to deal -% in the Software without restriction, including without limitation the rights -% to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -% copies of the Software, and to permit persons to whom the Software is -% furnished to do so, subject to the following conditions: -% -% The above copyright notice and this permission notice shall be included in all -% copies or substantial portions of the Software. -% -% THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -% IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -% FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -% AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -% LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -% OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -% SOFTWARE. - -\documentclass{article} -\usepackage[increment]{crumbs} -\usepackage[static]{clicks} -\usepackage[template,scheme=dark]{ppt-slides} -\usepackage[nonumbers]{ffcode} -\usepackage{titling} -\usepackage{textcomp} -\title{\LaTeX{} Package for Slide Decks \`a la PowerPoint\texttrademark} -\author{Yegor Bugayenko} -\date{0.1.5 2022/09/19} -\pptLeft{\thetitle} -\pptRight{\href{https://github.com/yegor256}{@yegor256}} - -\begin{document} - -\plush{ - \pptMiddle{ - \pptTitle{ppt-slides}{\thetitle}\par - {\scshape Made by \href{https://www.yegor256.com}{\theauthor}}\par - \thedate - } -} - -\clearpage -This package helps you make slide decks in \LaTeX: -\begin{ffcode*}{fontsize=\small} -\documentclass{article} -\usepackage{clicks} -\usepackage[template,scheme=dark]{ppt-slides} -\begin{document} -\plick{\pptBanner{Making Slides Is Easy}} -\plick{Just use this package...} -\plush{together with 'clicks' package.} -\end{document} -\end{ffcode*} -They will look similar to what PowerPoint\texttrademark{} can make, -but with the precision of \LaTeX. We recommend to use this package -together with \href{https://github.com/yegor256/clicks}{clicks}. - -\clearpage -\pptToc[Table of Contents] - -\clearpage -\plush{\pptChapter[Layout]{Scaffolding and Layout}} - -\clearpage -\pptSection{Template} -You start with a template for your slide deck: -\begin{ffcode*}{fontsize=\scriptsize} -\documentclass{article} -\usepackage{clicks} -\usepackage[template=9x6]{ppt-slides} -\begin{document} -... -\end{document} -\end{ffcode*} -There is only one template, which is used by default: \ff{9x6}. If you don't -specify the name, it will be used. If you don't use \ff{template} option at all, -the default \ff{article} will be rendered, which is not what you want. - -\clearpage -\pptSection[Scheme]{Color Schemes} -You can choose a color scheme for your slides, using \ff{scheme} option -of the package: -\begin{ffcode*}{fontsize=\scriptsize} -\documentclass{article} -\usepackage{clicks} -\usepackage[template,scheme=light]{ppt-slides} -\begin{document} -... -\end{document} -\end{ffcode*} -There are a few out-of-the-box schemes available: \ff{light}, \ff{dark}, -\ff{light-mono}, and \ff{dark-mono}. You can design your own, using -\ff{ppt-light.text} file as an example: -{\scriptsize\begin{ffcode} -\usepackage[template,scheme=/usr/local/my-colors.tex]{ppt-slides} -\end{ffcode} -} - -\clearpage -\pptSection{Chapters} -First, split your story into Chapters: -\begin{ffcode*}{fontsize=\scriptsize} -\documentclass{article} -\usepackage{clicks} -\usepackage[template,scheme=light]{ppt-slides} -\begin{document} -\pptToc -\plush{\pptChapter{About Me}} -... -\plush{\pptChapter[Idea]{My Idea Is Novel}} -... -\plush{\pptChapter[FAQ]{Discussion \& Questions}} -... -\end{document} -\end{ffcode*} -\ff{\char`\\pptToc} will render the table of contents in an interactive ``clickable'' format. -Thanks to the use of \href{https://github.com/yegor256/crumbs}{crumbs}, there will -be a navigation at the top left corner. - -\clearpage -\pptSection{Sections} -Put Sections inside Chapters: -\begin{ffcode*}{fontsize=\scriptsize} -\begin{document} -\pptToc -\plush{\pptChapter{About Me}} -\plush{\pptSection[Student]{I'm a Student}} -... -\plush{\pptSection[Athlete]{Also, I'm an Athlete}} -... -\plush{\pptChapter[Idea]{My Idea Is Novel}} -\plush{\pptSection{Novelty}} -\plush{\pptSection{Impact}} -\end{document} -\end{ffcode*} -\ff{\char`\\pptChapter} and \ff{\char`\\pptSection} used together will render -nice two-level nagivation menu at the top left corner. - -\clearpage -\pptSection[Signatures]{Signatures at the Bottom of Each Page} -You can place the title of the presentation and your name at the bottom -of each slide, on the left and on the right respectively: -\begin{ffcode*}{fontsize=\scriptsize} -\documentclass{article} -\usepackage{clicks} -\usepackage[template,scheme=light]{ppt-slides} -\pptLeft{How Did I Spend Last Summer} -\pptRight{Yegor Bugayenko} -\begin{document} -... -\end{document} -\end{ffcode*} -If you don't use \ff{\char`\\pptLeft} or \ff{\char`\\pptRight}, nothing will -be printed at the bottom. - -\clearpage -\pptSection[Minutes]{Tracking Minutes} -By default, if you render your slide deck in non-static mode (option \ff{static} for clicks package), -there will be minutes tracking in the right top corner of each slide. You can turn this off -by using \ff{nominutes} option of the package: -\begin{ffcode*}{fontsize=\small} -\documentclass{article} -\usepackage{clicks} -\usepackage[template,scheme=light,nominutes]{ppt-slides} -\begin{document} -... -\end{document} -\end{ffcode*} - -\clearpage -\pptSection[Wide]{Wide Slides} -Sometimes you need your slide content to take all visible horizontal space: -\begin{ffcode*}{fontsize=\scriptsize} -\begin{document} -\begin{pptWideOne} -This paragraph is too long for some reasons, -that's why must take all visible horizontal space. -\end{pptWideOne} -\end{document} -\end{ffcode*} -\begin{pptWideOne} -This paragraph is too long for some reasons, that's why must take all visible horizontal space. -\end{pptWideOne} -You can also use \ff{\char`\\begin\char`\{pptWide\char`\}\char`\{X\char`\}}, -where \ff{X} is the number of columns to render. - -\clearpage -\plush{\pptChapter[Elements]{Content Elements}} - -\clearpage -\pptSection{Images} -You can add an image to the slide (the first argument is the width -of the image in relation to \ff{\char`\\textwidth}, -while the second one is the path of it): -\begin{ffcode*}{fontsize=\scriptsize} -\begin{document} -\plush{\pptPic{0.2}{socrates.jpg}} -\end{document} -\end{ffcode*} -\pptPic{0.2}{socrates.jpg} - -\clearpage -\pptSection[Snippets]{Code Snippets} -You can add a piece of code to the slide (we recommend using \href{https://github.com/yegor256/ffcode}{ffcode}): -{\scriptsize -\begin{verbatim} -\begin{document} -\clearpage -\pptHeader{This is How You Print to Console:} -\begin{ffcode} -System.out.println("Hello, world!"); -\end{ffcode} -\end{document} -\end{verbatim} -} -Don't use \ff{\char`\\plick} or \ff{\char`\\plush}, they won't work with code snippets. - -\ff{\char`\\pptHeader} prints a header similar to what \ff{\char`\\pptSection} prints, but -doesn't start a new section. - -\clearpage -\pptSection{Quotes} -\pptQuote{socrates.jpg}{The only true wisdom is in knowing you know nothing}{Socrates} -\begin{ffcode*}{fontsize=\scriptsize} -\begin{document} -\plush{\pptQuote{socrates.jpg} - {The only true wisdom is in knowing you know nothing}{Socrates}} -\end{document} -\end{ffcode*} - -\clearpage -\pptSection{Thoughts} -\plush{\pptThought{Socrates said that the only true wisdom is in knowing you know nothing. Was he a wise man?... By the way, I'm using \ff{\char`\\pptThought} in this slide.}} - -\clearpage -\pptSection[QR]{QR Codes} -Sometimes it's convenient to show a QR code to your audience instead of -a URL, since it's easier to use --- they can scan it: -\begin{ffcode*}{fontsize=\scriptsize} -\begin{document} -\plick{Check my blog post by this link:} -\plush{\pptQR{https://www.yegor256.com}} -\end{document} -\end{ffcode*} -The code will look like this, thanks to \href{https://ctan.org/pkg/qrcode}{qrcode} package that -we use behind the scene:\par -\pptQR[1in]{https://www.yegor256.com} - -\clearpage -\plush{ - \crumbection{Sources} - \pptMiddle{ - More details about this package you can find\\ - in \href{https://github.com/yegor256/ppt-slides}{yegor256/ppt-slides} GitHub repository. - } -} - -\end{document}
\ No newline at end of file diff --git a/Master/texmf-dist/source/latex/ppt-slides/ppt-slides.dtx b/Master/texmf-dist/source/latex/ppt-slides/ppt-slides.dtx new file mode 100644 index 00000000000..5f21146d16c --- /dev/null +++ b/Master/texmf-dist/source/latex/ppt-slides/ppt-slides.dtx @@ -0,0 +1,662 @@ +% \iffalse meta-comment +% (The MIT License) +% +% Copyright (c) 2021-2022 Yegor Bugayenko +% +% Permission is hereby granted, free of charge, to any person obtaining a copy +% of this software and associated documentation files (the 'Software'), to deal +% in the Software without restriction, including without limitation the rights +% to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +% copies of the Software, and to permit persons to whom the Software is +% furnished to do so, subject to the following conditions: +% +% The above copyright notice and this permission notice shall be included in all +% copies or substantial portions of the Software. +% +% THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +% IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +% FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +% AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +% LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +% OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +% SOFTWARE. +% \fi + +% \CheckSum{0} +% +% \CharacterTable +% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z +% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z +% Digits \0\1\2\3\4\5\6\7\8\9 +% Exclamation \! Double quote \" Hash (number) \# +% Dollar \$ Percent \% Ampersand \& +% Acute accent \' Left paren \( Right paren \) +% Asterisk \* Plus \+ Comma \, +% Minus \- Point \. Solidus \/ +% Colon \: Semicolon \; Less than \< +% Equals \= Greater than \> Question mark \? +% Commercial at \@ Left bracket \[ Backslash \\ +% Right bracket \] Circumflex \^ Underscore \_ +% Grave accent \` Left brace \{ Vertical bar \| +% Right brace \} Tilde \~} + +% \GetFileInfo{ppt-slies.dtx} +% \DoNotIndex{\endgroup,\begingroup,\let,\else,\s,\n,\r,\\,\1,\fi} + +% \iffalse +%<*driver> +\ProvidesFile{ppt-slides.dtx} +%</driver> +%<package>\NeedsTeXFormat{LaTeX2e} +%<package>\ProvidesPackage{ppt-slides} +%<*package> +[2022-12-03 0.2.0 Slide Decks a la Power Point] +%</package> +%<*driver> +\documentclass{ltxdoc} +\usepackage[T1]{fontenc} +\usepackage[tt=false, type1=true]{libertine} +\usepackage{microtype} +\AddToHook{env/verbatim/begin}{\microtypesetup{protrusion=false}} +\usepackage{graphicx} +\usepackage{xcolor} +\usepackage[runs=2,dtx,margin=0,small]{docshots} +\usepackage{href-ul} +\PageIndex +\EnableCrossrefs +\CodelineIndex +\RecordChanges +\begin{document} + \DocInput{ppt-slides.dtx} + \PrintChanges + \PrintIndex +\end{document} +%</driver> +% \fi + +% \title{|ppt-slides|: \LaTeX{} Package for \\ Slide Decks \`{a} la Power Point\thanks{The sources are in GitHub at \href{https://github.com/yegor256/ppt-slides}{yegor256/ppt-slides}}} +% \author{Yegor Bugayenko \\ \texttt{yegor256@gmail.com}} +% \date{\filedate, \fileversion} +% +% \maketitle +% +% \section{Introduction} +% +% This package helps you render slide decks in PowerPoint\texttrademark{} style: +% \begin{docshot} +% \documentclass{article} +% \usepackage[template,scheme=dark]{ppt-slides} +% \begin{document} +% \pptMiddle{\pptTitle{Hello, world!}{How are you?}} +% \end{document} +% \end{docshot} + +% It is recommended to use this package together with +% \href{https://github.com/yegor256/clicks}{clicks}: +% \begin{docshot} +% \documentclass{article} +% \usepackage[template,scheme=dark]{ppt-slides} +% \usepackage[static]{clicks} +% \begin{document} +% We help you make slide decks in \LaTeX: +% \plick{\pptBanner{Making Slides Is Easy}} +% \plick{Just use this package...} +% \plush{together with 'clicks' package.} +% They will look similar to what PowerPoint can +% make, but with the precision of \LaTeX. We +% recommend using us together with ``clicks.'' +% \end{document} +% \end{docshot} + +% \section{Layout} + +% \DescribeMacro{\pptToc} +% \DescribeMacro{\pptChapter} +% First, split your story into chapters: +%\iffalse +%<*verb> +%\fi +\begin{verbatim} +\documentclass{article} +\usepackage{clicks} +\usepackage[template,scheme=light]{ppt-slides} +\begin{document} +\pptToc +\plush{\pptChapter{About Me}} +... +\plush{\pptChapter[Idea]{My Idea Is Novel}} +... +\plush{\pptChapter[FAQ]{Discussion \& Questions}} +... +\end{document} +\end{verbatim} +%\iffalse +%</verb> +%\fi +% |\pptToc| will render the table of contents in an interactive ``clickable'' format. +% Thanks to the use of \href{https://github.com/yegor256/crumbs}{crumbs}, there will +% be a navigation at the top left corner. + +% \DescribeMacro{\pptSection} +% Then, put sections inside chapters: +%\iffalse +%<*verb> +%\fi +\begin{verbatim} +\begin{document} +\pptToc +\plush{\pptChapter{About Me}} +\plush{\pptSection[Student]{I'm a Student}} +... +\plush{\pptSection[Athlete]{Also, I'm an Athlete}} +... +\plush{\pptChapter[Idea]{My Idea Is Novel}} +\plush{\pptSection{Novelty}} +\plush{\pptSection{Impact}} +\end{document} +\end{verbatim} +%\iffalse +%</verb> +%\fi +% The |\pptChapter| and |\pptSection| commands used together will render +% nice two-level nagivation menu at the top left corner. + +% \DescribeMacro{\pptLeft} +% \DescribeMacro{\pptRight} +% You can place the title of the presentation and your name at the bottom +% of each slide, on the left and on the right respectively: +%\iffalse +%<*verb> +%\fi +\begin{verbatim} +\documentclass{article} +\usepackage{clicks} +\usepackage[template,scheme=light]{ppt-slides} +\pptLeft{How Did I Spend Last Summer} +\pptRight{Yegor Bugayenko} +\begin{document} +... +\end{document} +\end{verbatim} +%\iffalse +%</verb> +%\fi +% If you don't use the |\pptLeft| or |\pptRight| commands, nothing will +% be printed at the bottom. + +% \section{Commands} + +% \DescribeMacro{\pptPic} +% You can add an image to the slide (the first argument is the width +% of the image in relation to |\textwidth|, +% while the second one is the path of it): +% \begin{docshot} +% \documentclass{article} +% \usepackage[template,scheme=dark]{ppt-slides} +% \begin{document} +% \pptPic{0.2}{socrates.jpg} \\ +% This is Socrates, a Greek philosopher. +% \end{document} +% \end{docshot} + +% \DescribeMacro{\pptHeader} +% You can add a piece of code to the slide (we recommend using \href{https://github.com/yegor256/ffcode}{ffcode}): +% \begin{docshot} +% \documentclass{article} +% \usepackage[template,scheme=dark]{ppt-slides} +% \usepackage{ffcode} +% \begin{document} +% \pptHeader{This is How You Print to Console:} +% \begin{ffcode} +% void main(char** args) { +% printf("Hello, world!"); +% } +% \end{ffcode} +% \end{document} +% \end{docshot} +% Don't use |\plick| or |\plush|, they won't work with code snippets. +% The |\pptHeader| command prints a header similar to what the |\pptSection| command prints, but +% doesn't start a new section. + +% \DescribeMacro{\pptQuote} +% \DescribeMacro{\pptBanner} +% You can put a quote next to the image, by using the |\pptQuote| command: +% \begin{docshot} +% \documentclass{article} +% \usepackage[template,scheme=dark]{ppt-slides} +% \begin{document} +% \pptBanner{My Favorite Quote} +% \pptQuote{socrates.jpg}{The only true wisdom +% is in knowing you know nothing}{Socrates} +% \end{document} +% \end{docshot} + +% \DescribeMacro{\pptThought} +% For an interesting thought in the middle of the slide, use |\pptThought|: +% \begin{docshot} +% \documentclass{article} +% \usepackage[template,scheme=dark]{ppt-slides} +% \begin{document} +% \pptThought{Socrates said that the only true +% wisdom is in knowing you know nothing. Was he +% a wise man?...} +% \end{document} +% \end{docshot} + +% \DescribeMacro{\pptQR} +% Sometimes it's convenient to show a QR code to your audience instead of +% a URL, since it's easier to use --- they can scan it: +% \begin{docshot} +% \documentclass{article} +% \usepackage[template,scheme=dark]{ppt-slides} +% \begin{document} +% Check my blog post by this link: \\ +% \pptQR{https://www.yegor256.com} +% \end{document} +% \end{docshot} +% The code will look like this, thanks to \href{https://ctan.org/pkg/qrcode}{qrcode} package that +% we use behind the scene. + +% \DescribeMacro{pptWide} +% \DescribeMacro{pptWideOne} +% Sometimes you need your slide content to take all visible horizontal space: +% \begin{docshot} +% \documentclass{article} +% \usepackage[template,scheme=dark]{ppt-slides} +% \begin{document} +% \begin{pptWideOne} +% This paragraph is too long for some reasons, +% that's why must take all visible horizontal +% space, while normally the content has a wide +% margin on the left side of the page. +% \end{pptWideOne} +% \end{document} +% \end{docshot} +% You can also use |\begin{pptWide}{X}|, +% where |X| is the number of columns to render. + +% \section{Package Options} + +% \DescribeMacro{template} +% You start with a template for your slide deck: +%\iffalse +%<*verb> +%\fi +\begin{verbatim} +\documentclass{article} +\usepackage[template=9x6]{ppt-slides} +\begin{document} +... +\end{document} +\end{verbatim} +%\iffalse +%</verb> +%\fi +% There is only one template, which is used by default: |9x6|. If you don't +% specify the name, it will be used. If you don't use the |template| option at all, +% the default |article| will be rendered, which is not what you want. + +% \DescribeMacro{scheme} +% You can choose a color scheme for your slides, using the |scheme| option +% of the package: +%\iffalse +%<*verb> +%\fi +\begin{verbatim} +\usepackage[template,scheme=light]{ppt-slides} +\end{verbatim} +%\iffalse +%</verb> +%\fi +% There are a few out-of-the-box schemes available: |light|, |dark|, +% |light-mono|, and |dark-mono|. You can design your own, using +% |ppt-light.tex| file as an example: +%\iffalse +%<*verb> +%\fi +\begin{verbatim} +\usepackage[template,scheme=/usr/local/my-colors.tex]{ppt-slides} +\end{verbatim} +%\iffalse +%</verb> +%\fi + +% \DescribeMacro{directory} +% You can change the location of the templates and schemes by means of the |directory| package option: +%\iffalse +%<*verb> +%\fi +\begin{verbatim} +\usepackage[directory=/tmp,template=foo]{ppt-slides} +\end{verbatim} +%\iffalse +%</verb> +%\fi + +% \DescribeMacro{nominutes} +% By default, if you render your slide deck in non-static mode (the |static| option for the ``clicks'' package), +% there will be minutes tracking in the right top corner of each slide. You can turn this off +% by using the |nominutes| option of the package: +%\iffalse +%<*verb> +%\fi +\begin{verbatim} +\usepackage[nominutes]{ppt-slides} +\end{verbatim} +%\iffalse +%</verb> +%\fi + +% \StopEventually{} + +% \section{Implementation} +% \changes{0.0.1}{2022/09/11}{First draft.} +% \changes{0.1.4}{2022/09/15}{The \texttt{nominutes} package option added.} +% \changes{0.1.5}{2022/09/19}{The default directory fixed.} +% \changes{0.2.0}{2022/12/03}{We migrated to the \texttt{ltxdoc} format and \texttt{.dtx} file.} + +% First, we parse the package options: +% \begin{macrocode} +\RequirePackage{pgfopts} +\makeatletter +\pgfkeys{ + /ppt-slides/.is family, + /ppt-slides, + template/.estore in = \ppt@template, + template/.default = 9x6, + scheme/.estore in = \ppt@scheme, + directory/.estore in = \ppt@directory, + directory/.default = , + nominutes/.estore in = \ppt@nominutes, + directory +} +\ProcessPgfPackageOptions{/ppt-slides} +\makeatother +% \end{macrocode} + +% Then, we include the template: +% \begin{macrocode} +\makeatletter\ifdefined\ppt@template + \input{\ppt@directory ppt-templates/ppt-\ppt@template.tex} +\else + \message{^^Jppt: No template is loaded, because + the 'template' option is not specified} +\fi\makeatother +% \end{macrocode} + +% Then, we include the scheme: +% \begin{macrocode} +\makeatletter\ifdefined\ppt@scheme + \RequirePackage{xcolor} + \input{\ppt@directory ppt-schemes/ppt-\ppt@scheme.tex} +\else + \message{^^Jppt: No color scheme is loaded, because + the 'scheme' option is not specified} +\fi\makeatother +% \end{macrocode} + +% Then, we include a few packages: +% \begin{macrocode} +\RequirePackage{ifthen} % for if/then/else in LaTeX +\RequirePackage{href-ul} % for nice hyperlinks +\RequirePackage{pagecolor} % to change page color +\RequirePackage{varwidth} % for pptWide +\RequirePackage{qrcode} % to print QR codes +\RequirePackage{tikz} % for drawings in TOC + \usetikzlibrary{calc} % for positioning of pinned boxes +\RequirePackage{tikzpagenodes} % for pptPin +\RequirePackage[inline]{enumitem} % for lists in crumbs +\RequirePackage{crumbs} % for crumbs +% \end{macrocode} + +% \begin{macro}{\pptMiddle} +% Then, we define the |\pptMiddle| command: +% \begin{macrocode} +\newcommand\pptMiddle[1]{% + \vspace*{\fill}#1\vspace*{\fill}% +} +% \end{macrocode} +% \end{macro} + +% \begin{macro}{\pptBanner} +% Then, we define the |\pptBanner| command: +% \begin{macrocode} +\newcommand\pptBanner[2][green]{% + \par% + {\setlength{\fboxsep}{6pt}% + \colorbox{#1}{\color{\thepagecolor}\large #2}} + \par% +} +% \end{macrocode} +% \end{macro} + +% \begin{macro}{\pptChapter} +% Then, we define the |\pptChapter| command: +% \begin{macrocode} +\newcommand\pptChapter[2][]{% + \crumbection[#1]{#2}% + \pptMiddle{% + {\large\ttfamily Chapter \#\the\value{section}:}% + \newline% + \rotatebox{1}{\pptBanner[blue]{\LARGE#2}}% + }% +} +% \end{macrocode} +% \end{macro} + +% \begin{macro}{\pptSection} +% Then, we define the |\pptSection| command: +% \begin{macrocode} +\newcommand\pptSection[2][]{% + \subcrumbection[#1]{#2}% + \pptHeader{#2}% +} +% \end{macrocode} +% \end{macro} + +% \begin{macro}{\pptHeader} +% Then, we define the |\pptHeader| command: +% \begin{macrocode} +\newcommand\pptHeader[1]{% + \vspace*{-0.75in}\hspace*{-0.5in}% + \rotatebox{1}{\pptBanner[orange]{\Large #1}}\vspace*{0.15in}% + \par% +} +% \end{macrocode} +% \end{macro} + +% \begin{macro}{\pptTitle} +% Then, we define the |\pptTitle| command: +% \begin{macrocode} +\newcommand\pptTitle[2]{% + {\pptBanner{\Huge #1}}% + {\pptBanner{\large #2}}% +} +% \end{macrocode} +% \end{macro} + +% \begin{macro}{\pptToc} +% Then, we define the |\pptToc| command: +% \begin{macrocode} +\newcommand*\pptTOC{} +\newcommand\pptToc[1][]{% + \renewcommand*\pptTOC{}% + \print{% + \def\param{#1}% + \ifx\param\empty\else% + \pptBanner{#1}% + \fi% + \tikz{% + \node (z) {% + \begin{varwidth}{\textwidth}% + \ifx\pptTOC\empty\else% + \begin{itemize}[label={}] + \pptTOC + \end{itemize} + \fi% + \end{varwidth}% + };% + \path [draw=blue,line width=4pt] (z.north west) -- (z.south west);% + }% + }% + \begin{@empty}% + \renewcommand\crumb[2]{% + \ifx\pptTOC\empty\else\ifdefined\click\click[0]\fi\fi + \gappto\pptTOC{\item ##2} + } + \crumbs + \end{@empty}% + \ifdefined\flush\flush[1]\fi% +} +% \end{macrocode} +% \end{macro} + +% \begin{macro}{\pptQuote} +% Then, we define the |\pptQuote| command: +% \begin{macrocode} +\RequirePackage{tabularx} +\newcommand\pptQuote[3]{% + \begin{tabularx}{\columnwidth}{c>{\raggedright\arraybackslash}X}% + \raisebox{\dimexpr-\height+\ht\strutbox}{\pptPic{0.25}{#1}}% + &% + ``#2''% + \def\param{#3}% + \ifx\param\empty\else% + \newline\newline% + \small% + --- #3% + \fi% + \\% + \end{tabularx}% +} +% \end{macrocode} +% \end{macro} + +% \begin{macro}{\pptPic} +% Then, we define the |\pptPic| command: +% \begin{macrocode} +\newcommand\pptPic[2]{% + {% + \setlength{\fboxsep}{0pt}% + \setlength{\fboxrule}{1pt}% + \fcolorbox{gray}{white}{% + \includegraphics[width=#1\columnwidth]{#2}% + }% + }% +} +% \end{macrocode} +% \end{macro} + +% \begin{macro}{\pptPin} +% Then, we define the |\pptPin| command: +% \begin{macrocode} +\newcommand\pptPin[2][right]{% + \begin{tikzpicture}[remember picture,overlay]% + \ifthenelse{\equal{#1}{left}}% + {% + \node[anchor=north east] at + ($(current page text area.north west) - (24pt, 18pt)$) {% + \begin{minipage}{0.25\textwidth}% + \raggedleft #2% + \end{minipage}% + };% + }% + {% + \node[anchor=north east] at (current page text area.north east) {% + \begin{minipage}{0.25\textwidth}% + \raggedright #2% + \end{minipage}% + };% + }% + \end{tikzpicture}% +} +% \end{macrocode} +% \end{macro} + +% \begin{macro}{\pptThought} +% Then, we define the |\pptThought| command: +% \begin{macrocode} +\newcommand\pptThought[1]{% + \pptMiddle{% + \tikz{% + \node [inner sep=18pt] (z) {% + \begin{varwidth}{0.8\textwidth} + \Large + #1 + \end{varwidth} + }; + \path [draw=green,line width=8pt] (z.north west) -- (z.south west); + }% + }% +} +% \end{macrocode} +% \end{macro} + +% \begin{macro}{\pptSnippet} +% Then, we define the |\pptSnippet| command: +% \begin{macrocode} +\newcommand\pptSnippet[2][\small]{% + \begin{samepage}% + #1\verbatiminput{#2}% + \end{samepage}% +} +% \end{macrocode} +% \end{macro} + +% \begin{macro}{\pptQR} +% Then, we define the |\pptQR| command: +% \begin{macrocode} +\newcommand\pptQR[2][2in]{% + \tikz{% + \node[draw=white]{% + \href{#2}{% + \qrcode[height=#1]{#2}% + }% + }% + }% +} +% \end{macrocode} +% \end{macro} + +% \begin{macro}{\pptPinQR} +% Then, we define the |\pptPinQR| command: +% \begin{macrocode} +\RequirePackage{seqsplit} +\newcommand\pptPinQR[2][right]{% + \pptPin[#1]{% + \begin{minipage}{1.4in}% + \raggedleft% + \pptQR[1in]{#2}% + \\[3pt] + \ttfamily\fontsize{8pt}{10pt}\selectfont% + \seqsplit{#2} \href{#2}{$\rightarrow$}% + \\ + \end{minipage}% + }% +} +% \end{macrocode} +% \end{macro} + +% \begin{macro}{pptWide} +% Finally, we define the |pptWide| and |pptWideOne| environments: +% \begin{macrocode} +\newenvironment{pptWideOne} + {\begin{adjustwidth}{-2in}{-1in}} + {\end{adjustwidth}} +\newenvironment{pptWide}[1] + {\begin{pptWideOne}\begin{multicols}{#1}} + {\end{multicols}\end{pptWideOne}} +% \end{macrocode} +% \end{macro} + +\endinput + +% \Finale + +% \clearpage +% \printbibliography +% \clearpage + +% \PrintChanges +% \clearpage +% \PrintIndex diff --git a/Master/texmf-dist/source/latex/ppt-slides/ppt-slides.ins b/Master/texmf-dist/source/latex/ppt-slides/ppt-slides.ins new file mode 100644 index 00000000000..5dfdeca0b5a --- /dev/null +++ b/Master/texmf-dist/source/latex/ppt-slides/ppt-slides.ins @@ -0,0 +1,55 @@ +%% (The MIT License) +%% +%% Copyright (c) 2021-2022 Yegor Bugayenko +%% +%% Permission is hereby granted, free of charge, to any person obtaining a copy +%% of this software and associated documentation files (the 'Software'), to deal +%% in the Software without restriction, including without limitation the rights +%% to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +%% copies of the Software, and to permit persons to whom the Software is +%% furnished to do so, subject to the following conditions: +%% +%% The above copyright notice and this permission notice shall be included in all +%% copies or substantial portions of the Software. +%% +%% THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +%% IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +%% FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +%% AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +%% LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +%% OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +%% SOFTWARE. + +\input docstrip.tex +\keepsilent +\usedir{macros/latex/contrib/ppt-slides} +\preamble +(The MIT License) + +Copyright (c) 2021-2022 Yegor Bugayenko + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the 'Software'), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +\endpreamble +\generate{\file{ppt-slides.sty}{\from{ppt-slides.dtx}{package}}} +\obeyspaces +\Msg{To finish the installation you have to move the ".sty"} +\Msg{file into a directory searched by TeX. To produce the} +\Msg{documentation run the file ".dtx" through LaTeX. If any} +\Msg{questions, submit a new GitHub issue.} +\endbatchfile diff --git a/Master/texmf-dist/tex/latex/ppt-slides/ppt-slides.sty b/Master/texmf-dist/tex/latex/ppt-slides/ppt-slides.sty index beb1e866d2a..7d335432b76 100644 --- a/Master/texmf-dist/tex/latex/ppt-slides/ppt-slides.sty +++ b/Master/texmf-dist/tex/latex/ppt-slides/ppt-slides.sty @@ -1,27 +1,57 @@ -% (The MIT License) -% -% Copyright (c) 2022 Yegor Bugayenko -% -% Permission is hereby granted, free of charge, to any person obtaining a copy -% of this software and associated documentation files (the 'Software'), to deal -% in the Software without restriction, including without limitation the rights -% to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -% copies of the Software, and to permit persons to whom the Software is -% furnished to do so, subject to the following conditions: -% -% The above copyright notice and this permission notice shall be included in all -% copies or substantial portions of the Software. -% -% THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -% IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -% FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -% AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -% LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -% OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -% SOFTWARE. +%% +%% This is file `ppt-slides.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% ppt-slides.dtx (with options: `package') +%% (The MIT License) +%% +%% Copyright (c) 2021-2022 Yegor Bugayenko +%% +%% Permission is hereby granted, free of charge, to any person obtaining a copy +%% of this software and associated documentation files (the 'Software'), to deal +%% in the Software without restriction, including without limitation the rights +%% to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +%% copies of the Software, and to permit persons to whom the Software is +%% furnished to do so, subject to the following conditions: +%% +%% The above copyright notice and this permission notice shall be included in all +%% copies or substantial portions of the Software. +%% +%% THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +%% IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +%% FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +%% AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +%% LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +%% OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +%% SOFTWARE. + + \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{ppt-slides}[2022/09/19 0.1.5 Slide Decks à la Power Point] +\ProvidesPackage{ppt-slides} +[2022-12-03 0.2.0 Slide Decks a la Power Point] + + + + + + + + + + + + + + + + + + + + \RequirePackage{pgfopts} \makeatletter @@ -36,20 +66,22 @@ nominutes/.estore in = \ppt@nominutes, directory } -\ProcessPgfOptions* +\ProcessPgfPackageOptions{/ppt-slides} \makeatother \makeatletter\ifdefined\ppt@template \input{\ppt@directory ppt-templates/ppt-\ppt@template.tex} \else - \message{^^Jppt: No template is loaded, because 'template' option is not specified} + \message{^^Jppt: No template is loaded, because + the 'template' option is not specified} \fi\makeatother \makeatletter\ifdefined\ppt@scheme \RequirePackage{xcolor} \input{\ppt@directory ppt-schemes/ppt-\ppt@scheme.tex} \else - \message{^^Jppt: No color scheme is loaded, because 'scheme' option is not specified} + \message{^^Jppt: No color scheme is loaded, because + the 'scheme' option is not specified} \fi\makeatother \RequirePackage{ifthen} % for if/then/else in LaTeX @@ -58,6 +90,7 @@ \RequirePackage{varwidth} % for pptWide \RequirePackage{qrcode} % to print QR codes \RequirePackage{tikz} % for drawings in TOC + \usetikzlibrary{calc} % for positioning of pinned boxes \RequirePackage{tikzpagenodes} % for pptPin \RequirePackage[inline]{enumitem} % for lists in crumbs \RequirePackage{crumbs} % for crumbs @@ -67,9 +100,10 @@ } \newcommand\pptBanner[2][green]{% - \par - {\setlength{\fboxsep}{6pt}\colorbox{#1}{\color{\thepagecolor}\large #2}} - \par + \par% + {\setlength{\fboxsep}{6pt}% + \colorbox{#1}{\color{\thepagecolor}\large #2}} + \par% } \newcommand\pptChapter[2][]{% @@ -138,7 +172,7 @@ \ifx\param\empty\else% \newline\newline% \small% - --- #3 + --- #3% \fi% \\% \end{tabularx}% @@ -156,21 +190,22 @@ \newcommand\pptPin[2][right]{% \begin{tikzpicture}[remember picture,overlay]% - \ifthenelse{\equal{#1}{left}} - { - \node[anchor=north east] at ($(current page text area.north west) - (24pt, 18pt)$) {% + \ifthenelse{\equal{#1}{left}}% + {% + \node[anchor=north east] at + ($(current page text area.north west) - (24pt, 18pt)$) {% \begin{minipage}{0.25\textwidth}% - \raggedleft #2 + \raggedleft #2% \end{minipage}% - }; - } - { + };% + }% + {% \node[anchor=north east] at (current page text area.north east) {% \begin{minipage}{0.25\textwidth}% - \raggedright #2 + \raggedright #2% \end{minipage}% };% - } + }% \end{tikzpicture}% } @@ -184,8 +219,8 @@ \end{varwidth} }; \path [draw=green,line width=8pt] (z.north west) -- (z.south west); - } - } + }% + }% } \newcommand\pptSnippet[2][\small]{% @@ -201,7 +236,7 @@ \qrcode[height=#1]{#2}% }% }% - } + }% } \RequirePackage{seqsplit} @@ -211,7 +246,8 @@ \raggedleft% \pptQR[1in]{#2}% \\[3pt] - \ttfamily\fontsize{8pt}{10pt}\selectfont\seqsplit{#2} \href{#2}{$\rightarrow$} + \ttfamily\fontsize{8pt}{10pt}\selectfont% + \seqsplit{#2} \href{#2}{$\rightarrow$}% \\ \end{minipage}% }% @@ -225,3 +261,5 @@ {\end{multicols}\end{pptWideOne}} \endinput +%% +%% End of file `ppt-slides.sty'. diff --git a/Master/texmf-dist/tex/latex/ppt-slides/ppt-templates/ppt-9x6.tex b/Master/texmf-dist/tex/latex/ppt-slides/ppt-templates/ppt-9x6.tex index 3c7afa2bb20..10cf2a6f8dc 100644 --- a/Master/texmf-dist/tex/latex/ppt-slides/ppt-templates/ppt-9x6.tex +++ b/Master/texmf-dist/tex/latex/ppt-slides/ppt-templates/ppt-9x6.tex @@ -26,6 +26,7 @@ \TPGrid{16}{16} \RequirePackage[tt=false,type1=true]{libertine} % the font we use \RequirePackage{microtype} % just to make rendering smooth +\AddToHook{env/verbatim/begin}{\microtypesetup{protrusion=false}} \RequirePackage{anyfontsize} % to support all sizes \RequirePackage{multicol} % for pptWide environment \RequirePackage[fontsize=24pt]{fontsize} % to make fonts larger |