diff options
10 files changed, 412 insertions, 1 deletions
diff --git a/Master/texmf-dist/doc/latex/pgfplotsthemebeamer/DEPENDS.txt b/Master/texmf-dist/doc/latex/pgfplotsthemebeamer/DEPENDS.txt new file mode 100644 index 00000000000..4708d6bbef4 --- /dev/null +++ b/Master/texmf-dist/doc/latex/pgfplotsthemebeamer/DEPENDS.txt @@ -0,0 +1,4 @@ +hard beamer +hard tools +hard pgfplots +hard pgfopts
\ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/pgfplotsthemebeamer/README.md b/Master/texmf-dist/doc/latex/pgfplotsthemebeamer/README.md new file mode 100644 index 00000000000..9840fce95fb --- /dev/null +++ b/Master/texmf-dist/doc/latex/pgfplotsthemebeamer/README.md @@ -0,0 +1,39 @@ +# pgfplotsthemebeamer + +[![GitHub](https://img.shields.io/github/license/samcarter/pgfplotsthemebeamer.svg?color=blue)](http://www.latex-project.org/lppl.txt) +[![GitHub tag (latest SemVer)](https://img.shields.io/github/tag/samcarter/pgfplotsthemebeamer.svg?label=current%20version)](https://github.com/samcarter/pgfplotsthemebeamer/releases/latest) +[![CTAN](https://img.shields.io/ctan/v/pgfplotsthemebeamer.svg)](https://ctan.org/pkg/pgfplotsthemebeamer) + +A package for using colours from the current beamer theme in pgfplots diagrams. + +This project is licensed under the LaTeX Project Public License v1.3c or later, see http://www.latex-project.org/lppl.txt . + +The project repository, including a bug tracker, can be found at https://github.com/samcarter/pgfplotsthemebeamer/issues . + +### Usage + +```latex +\documentclass{beamer} + +\usetheme{moloch}% just as an example for a colour theme +\usepackage{pgfplotsthemebeamer} + +\begin{document} + +\begin{frame}[plain] +\centering +\begin{tikzpicture} + \begin{axis}[ + beamercolors + ] + \addplot {x}; \addplot {x-1}; \addplot {x-2}; + \addplot {x-3}; \addplot {x-4}; \addplot {x-5}; + \addplot {x-6}; \addplot {x-7}; \addplot {x-8}; + \end{axis} +\end{tikzpicture} +\end{frame} + +\end{document} +``` + +For more details, please consult the [package documentation](https://github.com/samcarter/pgfplotsthemebeamer/blob/main/DOCUMENTATION.pdf). diff --git a/Master/texmf-dist/doc/latex/pgfplotsthemebeamer/pgfplotsthemebeamer-doc-settings.sty b/Master/texmf-dist/doc/latex/pgfplotsthemebeamer/pgfplotsthemebeamer-doc-settings.sty new file mode 100644 index 00000000000..608482f49e8 --- /dev/null +++ b/Master/texmf-dist/doc/latex/pgfplotsthemebeamer/pgfplotsthemebeamer-doc-settings.sty @@ -0,0 +1,200 @@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% +% Personal helper theme for package documentations +% Copyright samcarter +% +% This file may be distributed and/or modified +% under the LaTeX Project Public License 1.3c or later +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +% Usage: +% ln ~/Life/latex/beamertheme-sam/themesam.sty package-doc-settings.sty +% \usepackage[ +% themecolor=samdblue +% ]{\jobname-settings} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% +% Colours +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\RequirePackage{xcolor} +\definecolor{samyellow}{RGB}{246,193,65} +\definecolor{samorange}{RGB}{241,147,45} +\definecolor{samred}{RGB}{191,26,46}% TikZbricks +\definecolor{sammagenta}{RGB}{170,42,104}% TikZmarmots +\definecolor{samviolet}{RGB}{136,46,114}% TikZlings +\definecolor{samlila}{RGB}{101,67,159}% Rainbow beamer theme +\definecolor{samdblue}{RGB}{0,51,134}% beamer theme +\definecolor{samlblue}{RGB}{22,89,155}% TikZducks +\definecolor{samteal}{RGB}{25,143,157}% Tcolorbox beamer theme +\definecolor{samlgreen}{RGB}{68,170,153}% Jigsaw +\definecolor{samdgreen}{RGB}{78,178,125} +\definecolor{samlgray}{RGB}{160,160,185} +\definecolor{samdgray}{RGB}{60,60,85} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% +% Package options +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\RequirePackage{xkeyval} +\DeclareOptionX{themecolor}[samdblue]{\colorlet{themecolor}{#1}} +\DeclareOptionX{listingcolor}[samlblue]{\colorlet{listingcolor}{#1}} +\ExecuteOptionsX{themecolor,listingcolor} +\ProcessOptionsX + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% +% Packages +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\@ifclassloaded{beamer}{}{% + \RequirePackage[english]{babel} + \RequirePackage[paper=a4paper,margin=2.9cm]{geometry} + \RequirePackage{scrlayer-scrpage} + \let\hrulefillx\hrulefill + \RequirePackage[bitstream-charter]{mathdesign} + \let\hrulefill\hrulefillx + \RequirePackage[hang,flushmargin,bottom]{footmisc} + \RequirePackage{footnotehyper} + \makesavenoteenv{tcolorbox} + \RequirePackage[all]{nowidow} + \RequirePackage[colorlinks=true,breaklinks=true,allcolors=themecolor,hyperfootnotes=false]{hyperref} +} +\RequirePackage[T1]{fontenc} +\RequirePackage{xspace} +\RequirePackage{inconsolata}% mono font with bold, but italic is missing +% \RequirePackage[scale=0.85]{cascadia-code} +% \AddToHook{cmd/ttfamily/before}{\fontseries{sl}} +\RequirePackage{iexec} +\usepackage{synthslant}% to fake slented comments in inconsolata + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% +% Listings +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\RequirePackage[ + cachedir=$TMPDIR/minted/ +]{minted} + +% smuggling custom pygmentize style in cache folder +% (a real pygmentise style would need installtion in some python folder) +\begin{filecontents*}[noheader,overwrite]{./sam.pygstyle} +\makeatletter +\def\PYG@reset{\let\PYG@it=\relax \let\PYG@bf=\relax% + \let\PYG@ul=\relax \let\PYG@tc=\relax% + \let\PYG@bc=\relax \let\PYG@ff=\relax} +\def\PYG@tok#1{\csname PYG@tok@#1\endcsname} +\def\PYG@toks#1+{\ifx\relax#1\empty\else% + \PYG@tok{#1}\expandafter\PYG@toks\fi} +\def\PYG@do#1{\PYG@bc{\PYG@tc{\PYG@ul{% + \PYG@it{\PYG@bf{\PYG@ff{#1}}}}}}} +\def\PYG#1#2{\PYG@reset\PYG@toks#1+\relax+\PYG@do{#2}} + +% optional arguments +\expandafter\def\csname PYG@tok@na\endcsname{\def\PYG@tc##1{\textcolor{black}{##1}}} + +% macros +\expandafter\def\csname PYG@tok@k\endcsname{\def\PYG@tc##1{\textcolor{listingcolor}{\bfseries ##1}}} +% curly brakets +\expandafter\def\csname PYG@tok@nb\endcsname{\def\PYG@tc##1{\textcolor{listingcolor}{\bfseries ##1}}} + +% comments (italics won't work with the inconsolata font) +\expandafter\def\csname PYG@tok@c\endcsname{\def\PYG@tc##1{\textcolor{gray}{\textsynthslant{##1}}}} + +\def\PYGZbs{\char`\\} +\def\PYGZus{\char`\_} +\def\PYGZob{\char`\{} +\def\PYGZcb{\char`\}} +\def\PYGZca{\char`\^} +\def\PYGZam{\char`\&} +\def\PYGZlt{\char`\<} +\def\PYGZgt{\char`\>} +\def\PYGZsh{\char`\#} +\def\PYGZpc{\char`\%} +\def\PYGZdl{\char`\$} +\def\PYGZhy{\char`\-} +\def\PYGZsq{\char`\'} +\def\PYGZdq{\char`\"} +\def\PYGZti{\char`\~} +% for compatibility with earlier versions +\def\PYGZat{@} +\def\PYGZlb{[} +\def\PYGZrb{]} +\makeatother +\end{filecontents*} + +\iexec{mkdir -p $TMPDIR/minted && mv sam.pygstyle $TMPDIR/minted/.} + +\usemintedstyle{sam} +\setminted{ + breaksymbolleft={}, + tabsize=2, + breaklines=true, +} +\newminted[samcode]{latex}{} +\newmintinline[saminline]{latex}{} + +% use non-bold and all coloured for inline code in articles +\ifdefined\insertaspectratio\else + \patchcmd{\minted@inputpyg@inline}{\minted@input}{\color{listingcolor}\renewcommand\textcolor[3][]{##3}\renewcommand\bfseries{}\minted@input}{}{} +\fi + +\RequirePackage[most]{tcolorbox} +\tcbuselibrary{minted} +\tcbset{% + colframe=themecolor, + fonttitle=\bfseries, + sidebyside, + center lower, + righthand width=5.7cm, + bottom=2pt, + top=2pt, + left=3pt, + right=3pt, + sidebyside gap=10pt, + lower separated=false, + listing engine=minted, + minted language=latex, + colback=themecolor!10, + sharp corners, + boxrule=0pt, + before title={\strut} +} + +% avoid page breaks right in front of the tcolorbox +\@ifclassloaded{beamer}{}{ + \tcbuselibrary{hooks} + \tcbset{before pre={\nopagebreak[4]}} +} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% +% document settings +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\@ifclassloaded{scrartcl}{% + \KOMAoptions{parskip=half} + \addtokomafont{sectioning}{\color{themecolor}} + \addtokomafont{date}{\normalsize} + \addtokomafont{author}{\normalsize} + \setlength{\footnotemargin}{0.7em} +}{} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% +% Custom macros +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\providecommand*{\CTAN}{\textsc{CTAN}\xspace} +\providecommand*{\TikZ}{Ti\emph{k}Z\xspace} +\providecommand*{\miktex}{MiK\TeX\xspace} +\providecommand*{\texlive}{\TeX{}Live\xspace} +\providecommand*{\tikzbrick}{Ti\emph{k}Zbrick\xspace} +\providecommand*{\tikzducks}{Ti\emph{k}Zducks\xspace} +\providecommand*{\tikzlings}{Ti\emph{k}Zlings\xspace} +\providecommand*{\tikzmarmots}{Ti\emph{k}Zmarmots\xspace} +\providecommand*{\ConTeXt}{C\kern-.0333emon\-\kern-.0667em\TeX\kern-.0333emt}
\ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/pgfplotsthemebeamer/pgfplotsthemebeamer-doc.pdf b/Master/texmf-dist/doc/latex/pgfplotsthemebeamer/pgfplotsthemebeamer-doc.pdf Binary files differnew file mode 100644 index 00000000000..460c0a43f27 --- /dev/null +++ b/Master/texmf-dist/doc/latex/pgfplotsthemebeamer/pgfplotsthemebeamer-doc.pdf diff --git a/Master/texmf-dist/doc/latex/pgfplotsthemebeamer/pgfplotsthemebeamer-doc.tex b/Master/texmf-dist/doc/latex/pgfplotsthemebeamer/pgfplotsthemebeamer-doc.tex new file mode 100644 index 00000000000..4adfb3679c9 --- /dev/null +++ b/Master/texmf-dist/doc/latex/pgfplotsthemebeamer/pgfplotsthemebeamer-doc.tex @@ -0,0 +1,117 @@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% +% Documentation for the pgfplotsthemebeamer package +% Using colours from the current beamer theme in pgfplots +% Maintained by samcarter +% +% Project repository and bug tracker: +% https://github.com/samcarter/pgfplotstheme-beamer +% +% Released under the LaTeX Project Public License v1.3c or later +% See http://www.latex-project.org/lppl.txt +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% !TeX program = txs:///arara +% arara: latexmk: { +% arara: --> engine: pdflatex, +% arara: --> options: [ +% arara: --> '-shell-escape', +% arara: --> '-synctex=1', +% arara: --> '-interaction=nonstopmode', +% arara: --> ] +% arara: --> } +\documentclass{scrartcl} + +% meta %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\title{The pgfplotsthemebeamer package} +\subtitle{Using colours from the current beamer theme in pgfplots} +\author{% + \texorpdfstring{ + \texttt{samcarter}\\ + \url{https://github.com/samcarter/beamertheme-rainbow}\\ + \url{https://www.ctan.org/pkg/beamertheme-rainbow} + }{samcarter}} +\date{Version v0.1 \textendash{} 2024/07/26} + +\usepackage[ + themecolor=samorange +]{\jobname-settings} + +% customisation %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\newcommand{\prefix}{./include} +\tcbset{ + compilable listing/.style={listing file={\prefix/\jobname-listing-\thetcblistingcount.tex}}, + run pdflatex/.style={run@system@command={cd\space \prefix;\space pdflatex}{\jobname-listing-\thetcblistingcount.tex}},% +} + +\begin{document} +\maketitle + +\section{Introduction} +\label{intro} + +Beamer themes often use carefully composed colour schemes. The \saminline|pgfplotsthemebeamer| package allows to reuse these colours in diagrams created with \saminline|pfgplots|. This ensures a consistent colour scheme throughout the presentation and avoids unsightly colour clashes. + +%The package is included in \TeX{}Live and MiK\TeX\ and available from \textsc{CTAN} (\url{https://www.ctan.org/pkg/pgfplotsthemebeamer}). +The development version of this package is located at \url{https://github.com/samcarter/pgfplotsthemebeamer}. If you have any problems, ideas or other feedback, please make constructive use of the issue tracker. + +Copyright \raisebox{0.2em}{\tiny\fontfamily{cmr}\selectfont\textcopyright} \texttt{samcarter}. Permission is granted to copy, distribute and\slash or modify this software under the terms of the LaTeX project public licence, version 1.3c or later \url{http://www.latex-project.org/lppl.txt}. + +\section{Usage} + +The basic usage is fairly simple. After loading the \saminline|pgfplotsthemebeamer| package, plots can use the \saminline|beamercolor| option to use the colours from the current beamer theme in the diagram: +\begin{tcolorbox}[title={Usage}] +\begin{samcode} +\usepackage{pgfplotsthemebeamer} + +\begin{axis}[ + beamercolors +] +... +\end{axis} +\end{samcode} +\end{tcolorbox} +The graphs will be coloured in the beamer colours \saminline|structure|, \saminline|alerted text| and \saminline|example text|. In most beamer themes, these three colours form an easily distinguishable set of colours. + +Users who would like to use the \saminline|beamercolors| scheme for all \saminline|pgfplots| diagrams in the presentation, can load the package with the \saminline|all| option, which will make this colour scheme the default. +\begin{tcolorbox}[title={Usage}] +\begin{samcode} +\usepackage[all]{pgfplotsthemebeamer} +\end{samcode} +\end{tcolorbox} + +\section{Full example} +\begin{tcblisting}{ + listing only, + freeze pdf, + compilable listing, + run pdflatex, + title={Basic example}, + righthand width=0pt +} +\documentclass{beamer} + +\usetheme{moloch}% just as an example for a colour theme +\usepackage{pgfplotsthemebeamer} + +\begin{document} + +\begin{frame}[plain] +\centering +\begin{tikzpicture} + \begin{axis}[ + beamercolors + ] + \addplot {x}; \addplot {x-1}; \addplot {x-2}; \addplot {x-3}; \addplot {x-4}; \addplot {x-5}; \addplot {x-6}; \addplot {x-7}; \addplot {x-8}; + \end{axis} +\end{tikzpicture} +\end{frame} + +\end{document} +\end{tcblisting} +\vfill +\centering +\setlength{\fboxsep}{0pt}% +\fbox{\includegraphics[width=.75\textwidth]{pgfplotsthemebeamer-doc-listing-1.pdf}}% + +\end{document}
\ No newline at end of file diff --git a/Master/texmf-dist/tex/latex/pgfplotsthemebeamer/pgfplotsthemebeamer.sty b/Master/texmf-dist/tex/latex/pgfplotsthemebeamer/pgfplotsthemebeamer.sty new file mode 100644 index 00000000000..a47e1f5e97e --- /dev/null +++ b/Master/texmf-dist/tex/latex/pgfplotsthemebeamer/pgfplotsthemebeamer.sty @@ -0,0 +1,45 @@ +% !TeX root = ./testing/test.tex +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% +% The pgfplotsthemebeamer package +% Using colours from the current beamer theme in pgfplots +% Maintained by samcarter +% +% Project repository and bug tracker: +% https://github.com/samcarter/pgfplotstheme-beamer +% +% Released under the LaTeX Project Public License v1.3c or later +% See http://www.latex-project.org/lppl.txt +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\ProvidesPackage{pgfplotsthemebeamer}[2024/07/25 version v0.1 PGFplots colours based the colours of the current beamer theme] + +% error if used with a class other than beamer +\IfClassLoadedF{beamer}{% + \PackageError{pgfplotsthemebeamer}{This pgfplots theme needs to be used in conjunction with the beamer class}{} +} + +% process package options +\RequirePackage{pgfopts} +\newif\ifpgfplotsthemebeamer@all +\pgfkeys{ + pgfplotsthemebeamer/.cd , + all/.code = \pgfplotsthemebeamer@alltrue, +} +\ProcessPgfOptions{/pgfplotsthemebeamer} + +% setting up colours +\RequirePackage{pgfplots} +\pgfplotsset{ + beamercolors/.style={ + cycle multi list={ + mark=*\\mark=x\\mark=square*\\mark=o\\mark=+\\mark=square\\\nextlist + structure.fg\\alerted text.fg\\example text.fg\\ + } + } +} + +% making beamercolors default if package is loaded with `all` option +\ifpgfplotsthemebeamer@all + \pgfplotsset{beamercolors} +\fi diff --git a/Master/tlpkg/bin/tlpkg-ctan-check b/Master/tlpkg/bin/tlpkg-ctan-check index e9463fe6730..94a9f8eaab8 100755 --- a/Master/tlpkg/bin/tlpkg-ctan-check +++ b/Master/tlpkg/bin/tlpkg-ctan-check @@ -660,7 +660,7 @@ my @TLP_working = qw( pgf pgf-blur pgf-interference pgf-periodictable pgf-pie pgf-soroban pgf-spectra pgf-umlcd pgf-umlsd pgfgantt pgfkeysearch pgfkeyx pgfmath-xfp pgfmolbio pgfmorepages - pgfopts pgfornament pgfornament-han pgfplots + pgfopts pgfornament pgfornament-han pgfplots pgfplotsthemebeamer phaistos phfcc phfextendedabstract phffullpagefigure phfnote phfparen phfqit phfquotetext phfsvnwatermark phfthm diff --git a/Master/tlpkg/libexec/ctan2tds b/Master/tlpkg/libexec/ctan2tds index b0d1486496c..09ac3d82375 100755 --- a/Master/tlpkg/libexec/ctan2tds +++ b/Master/tlpkg/libexec/ctan2tds @@ -2439,6 +2439,7 @@ $standardtex 'pgf-spectra', 'pgf-spectra.*(library|data).*tex|' . $standardtex, 'pgfmolbio', 'pgfmolbio\..*\.|' . $standardtex, # .lua+.tex submodules 'pgfornament-han', 'han$|' . $standardtex, + 'pgfplotsthemebeamer', 'pgfplotsthemebeamer.sty', # not doc-settings 'phonenumbers','[A-Z][A-Z]_.*|Landes.*tex|' . $standardtex, 'pictex', '\.sty|\.tex', 'pictexsum', 'NULL', # doc pkg diff --git a/Master/tlpkg/tlpsrc/collection-pictures.tlpsrc b/Master/tlpkg/tlpsrc/collection-pictures.tlpsrc index 08d321efed9..de5bfa9fea4 100644 --- a/Master/tlpkg/tlpsrc/collection-pictures.tlpsrc +++ b/Master/tlpkg/tlpsrc/collection-pictures.tlpsrc @@ -127,6 +127,7 @@ depend pgfmorepages depend pgfopts depend pgfornament depend pgfplots +depend pgfplotsthemebeamer depend picinpar depend pict2e depend pictex diff --git a/Master/tlpkg/tlpsrc/pgfplotsthemebeamer.tlpsrc b/Master/tlpkg/tlpsrc/pgfplotsthemebeamer.tlpsrc new file mode 100644 index 00000000000..b32f7161aaa --- /dev/null +++ b/Master/tlpkg/tlpsrc/pgfplotsthemebeamer.tlpsrc @@ -0,0 +1,4 @@ +depend beamer +depend tools +depend pgfplots +depend pgfopts |