diff options
author | Karl Berry <karl@freefriends.org> | 2020-08-25 20:51:26 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2020-08-25 20:51:26 +0000 |
commit | f217ec8d36763f661eea4259a721a51aa71c5f28 (patch) | |
tree | 25e4309b37c6cbfa66e92c0102b2bf114544bbc0 | |
parent | be11f74324d6c2fa6dd44a0fc310796032ac18c7 (diff) |
beamerthemenord (25aug20)
git-svn-id: svn://tug.org/texlive/trunk@56180 c570f23f-e606-0410-a88d-b1316a301751
17 files changed, 193 insertions, 38 deletions
diff --git a/Master/texmf-dist/doc/latex/beamerthemenord/README.md b/Master/texmf-dist/doc/latex/beamerthemenord/README.md index e22c28ec14f..0387bc4765c 100644 --- a/Master/texmf-dist/doc/latex/beamerthemenord/README.md +++ b/Master/texmf-dist/doc/latex/beamerthemenord/README.md @@ -1,11 +1,53 @@ -# beamerthemeNord +# The Nord Beamer Theme -A simple beamer theme using [Nord](https://www.nordtheme.com/) color theme. +A beamer theme using [Nord](https://www.nordtheme.com/) color scheme. + +Pull requests and issues are welcome. + +## News + +- This theme is now available both at see [CTAN](https://ctan.org/pkg/beamerthemenord) (see [CTAN announcement](https://ctan.org/ctan-ann/id/mailman.2913.1593882783.3866.ctan-ann@ctan.org)) and [Overleaf](https://www.overleaf.com/latex/templates/beamerthemenord/xyjjhcsyyjbr). + +- Added light/dark style option + +## Installation + +### Tex Live / MacTeX + +[Tex Live](https://www.tug.org/texlive/) and [MacTeX](https://www.tug.org/mactex/) users can install/update **beamerthemeNord** by using +```sh +tlmgr update --self beamerthemenord +``` + +### Manual + +If you want to customize this theme, you can also clone this repository and copy all `*.sty` files into the directory where you main `tex` source file is. ## Usage See [beamerthemeNord.pdf](./beamerthemeNord.pdf) or [beamerthemeNord.tex](./beamerthemeNord.tex) +**Note**: This theme currently only supports XeLaTeX, which is convinent to use system-wide fonts and to write in non-ASCII characters. +You are weclome to contribute on compatability for other TeX distributions. + +## Screenshots + +Light Style | Dark Style +----------------------------------------|--------------------------------------- +![](./screenshots/light-titlepage.png) | ![](./screenshots/dark-titlepage.png) +![](./screenshots/light-usage.png) | ![](./screenshots/dark-usage.png) +![](./screenshots/light-colors.png) | ![](./screenshots/dark-colors.png) +![](./screenshots/light-fonts.png) | ![](./screenshots/dark-fonts.png) +![](./screenshots/light-blocks.png) | ![](./screenshots/dark-blocks.png) +![](./screenshots/light-toc.png) | ![](./screenshots/dark-toc.png) + + +## Usecases + +Please send a pull request to add your usecase + +- [Ph.D. defense of Junwei Wang](https://junwei-wang.github.io/pdfs/slides/2020-phd-defense-handout.pdf) + ## Maintainer Junwei Wang (i.junwei.wang@gmail.com) diff --git a/Master/texmf-dist/doc/latex/beamerthemenord/beamerthemeNord.pdf b/Master/texmf-dist/doc/latex/beamerthemenord/beamerthemeNord.pdf Binary files differindex ac957024929..aadc8b8c1a3 100644 --- a/Master/texmf-dist/doc/latex/beamerthemenord/beamerthemeNord.pdf +++ b/Master/texmf-dist/doc/latex/beamerthemenord/beamerthemeNord.pdf diff --git a/Master/texmf-dist/doc/latex/beamerthemenord/beamerthemeNord.tex b/Master/texmf-dist/doc/latex/beamerthemenord/beamerthemeNord.tex index 7159333a36d..7c095785739 100644 --- a/Master/texmf-dist/doc/latex/beamerthemenord/beamerthemeNord.tex +++ b/Master/texmf-dist/doc/latex/beamerthemenord/beamerthemeNord.tex @@ -15,6 +15,8 @@ \usepackage{tikz} \usetheme{Nord} +% \usetheme[style=light]{Nord} + \setmainfont{Yanone Kaffeesatz} \setsansfont{Andika New Basic} \setmonofont{DejaVu Sans Mono} @@ -48,6 +50,27 @@ \section{Appearance} + +\begin{frame}[fragile] + \frametitle{Usage} + Simply include the following code in your preamble: + + \begin{lstlisting}[basicstyle = \ttfamily\small] +\usetheme{Nord} + \end{lstlisting} + + \bigskip + + By default, the appearance is in dark theme, however you can actively choose a either a light or a + dark theme. + + \begin{lstlisting}[basicstyle = \ttfamily\small] +\usetheme[style=light]{Nord} +\usetheme[style=dark]{Nord} + \end{lstlisting} + +\end{frame} + \subsection{Colors} \begin{frame}{Defined Colors}{This is a subtitle} @@ -56,7 +79,8 @@ \textcolor{NordDarkBlack}{NordDarkBlack} \quad \textcolor{NordBlack}{NordBlack}\\ \textcolor{NordMediumBlack}{NordMediumBlack} \quad \textcolor{NordBrightBlack}{NordBrightBlack} \item[Snow Storm] - \textcolor{NordWhite}{NordWhite} \quad \textcolor{NordBrightWhite}{NordBrightWhite} + \textcolor{NordWhite}{NordWhite} \quad \textcolor{NordBrighterWhite}{NordBrightestWhite}\\ + \textcolor{NordBrightestWhite}{NordBrightestWhite} \item[Forest] \textcolor{NordCyan}{NordCyan} \quad \textcolor{NordBrightCyan}{NordBrightCyan}\\ \textcolor{NordBlue}{NordBlue} \quad \textcolor{NordBrightBlue}{NordBrightBlue} @@ -89,39 +113,57 @@ \begin{frame} \frametitle{Blocks} - \begin{block}{This is an Ordinary Block} + \begin{block}{This is a Block} \[ a^2 + b^2 = c^2 \] \end{block} \begin{exampleblock}{This is an Example Block} \[ - 3^2+4^2 = 5^2 + E = m \cdot c^{2} \] \end{exampleblock} \begin{alertblock}{This is an Alert Block} \[ - 3^2+4^2 \neq 5^2 + e^{i\pi} + 1 = 0 \] \end{alertblock} \centering \begin{minipage}{1.0\linewidth} - \begin{block}{This is an Horizontally-Aligned Ordinary Block} + \begin{block}{Horizontally-Aligned Block} \[ - a^2 + b^2 = c^2 + \log xy = \log x + \log y \] \end{block} \end{minipage} \end{frame} +\subsection{Items} + +\begin{frame}{Items} + Itemize + \begin{itemize} + \item item 1 + \item item 2 + \end{itemize} + + \bigskip + + Enumerate + \begin{enumerate} + \item item 1 + \item item 2 + \end{enumerate} +\end{frame} + \subsection{Figures} \begin{frame}{Figures} \begin{figure} \centering \begin{tikzpicture} - \draw [help lines,NordMagenta] (0,0) grid (5,4); + \draw [help lines,NordMagenta,very thick] (0,0) grid (5,4); \end{tikzpicture} \caption{Credits to Ti\textit{k}Z} \end{figure} @@ -132,4 +174,5 @@ %%% Local Variables: %%% mode: latex %%% TeX-master: t +%%% TeX-engine: xetex %%% End: diff --git a/Master/texmf-dist/doc/latex/beamerthemenord/screenshots/dark-blocks.png b/Master/texmf-dist/doc/latex/beamerthemenord/screenshots/dark-blocks.png Binary files differnew file mode 100644 index 00000000000..ab9000e2dec --- /dev/null +++ b/Master/texmf-dist/doc/latex/beamerthemenord/screenshots/dark-blocks.png diff --git a/Master/texmf-dist/doc/latex/beamerthemenord/screenshots/dark-colors.png b/Master/texmf-dist/doc/latex/beamerthemenord/screenshots/dark-colors.png Binary files differnew file mode 100644 index 00000000000..302f4f1091b --- /dev/null +++ b/Master/texmf-dist/doc/latex/beamerthemenord/screenshots/dark-colors.png diff --git a/Master/texmf-dist/doc/latex/beamerthemenord/screenshots/dark-fonts.png b/Master/texmf-dist/doc/latex/beamerthemenord/screenshots/dark-fonts.png Binary files differnew file mode 100644 index 00000000000..09017e8cc55 --- /dev/null +++ b/Master/texmf-dist/doc/latex/beamerthemenord/screenshots/dark-fonts.png diff --git a/Master/texmf-dist/doc/latex/beamerthemenord/screenshots/dark-titlepage.png b/Master/texmf-dist/doc/latex/beamerthemenord/screenshots/dark-titlepage.png Binary files differnew file mode 100644 index 00000000000..0223ee9e269 --- /dev/null +++ b/Master/texmf-dist/doc/latex/beamerthemenord/screenshots/dark-titlepage.png diff --git a/Master/texmf-dist/doc/latex/beamerthemenord/screenshots/dark-toc.png b/Master/texmf-dist/doc/latex/beamerthemenord/screenshots/dark-toc.png Binary files differnew file mode 100644 index 00000000000..202a8710ba0 --- /dev/null +++ b/Master/texmf-dist/doc/latex/beamerthemenord/screenshots/dark-toc.png diff --git a/Master/texmf-dist/doc/latex/beamerthemenord/screenshots/dark-usage.png b/Master/texmf-dist/doc/latex/beamerthemenord/screenshots/dark-usage.png Binary files differnew file mode 100644 index 00000000000..a4054d08a75 --- /dev/null +++ b/Master/texmf-dist/doc/latex/beamerthemenord/screenshots/dark-usage.png diff --git a/Master/texmf-dist/doc/latex/beamerthemenord/screenshots/light-blocks.png b/Master/texmf-dist/doc/latex/beamerthemenord/screenshots/light-blocks.png Binary files differnew file mode 100644 index 00000000000..573c072afa3 --- /dev/null +++ b/Master/texmf-dist/doc/latex/beamerthemenord/screenshots/light-blocks.png diff --git a/Master/texmf-dist/doc/latex/beamerthemenord/screenshots/light-colors.png b/Master/texmf-dist/doc/latex/beamerthemenord/screenshots/light-colors.png Binary files differnew file mode 100644 index 00000000000..9fa03a29f88 --- /dev/null +++ b/Master/texmf-dist/doc/latex/beamerthemenord/screenshots/light-colors.png diff --git a/Master/texmf-dist/doc/latex/beamerthemenord/screenshots/light-fonts.png b/Master/texmf-dist/doc/latex/beamerthemenord/screenshots/light-fonts.png Binary files differnew file mode 100644 index 00000000000..2b8347b74fd --- /dev/null +++ b/Master/texmf-dist/doc/latex/beamerthemenord/screenshots/light-fonts.png diff --git a/Master/texmf-dist/doc/latex/beamerthemenord/screenshots/light-titlepage.png b/Master/texmf-dist/doc/latex/beamerthemenord/screenshots/light-titlepage.png Binary files differnew file mode 100644 index 00000000000..23b803060c9 --- /dev/null +++ b/Master/texmf-dist/doc/latex/beamerthemenord/screenshots/light-titlepage.png diff --git a/Master/texmf-dist/doc/latex/beamerthemenord/screenshots/light-toc.png b/Master/texmf-dist/doc/latex/beamerthemenord/screenshots/light-toc.png Binary files differnew file mode 100644 index 00000000000..daf81fae73a --- /dev/null +++ b/Master/texmf-dist/doc/latex/beamerthemenord/screenshots/light-toc.png diff --git a/Master/texmf-dist/doc/latex/beamerthemenord/screenshots/light-usage.png b/Master/texmf-dist/doc/latex/beamerthemenord/screenshots/light-usage.png Binary files differnew file mode 100644 index 00000000000..303a58e6c59 --- /dev/null +++ b/Master/texmf-dist/doc/latex/beamerthemenord/screenshots/light-usage.png diff --git a/Master/texmf-dist/tex/latex/beamerthemenord/beamercolorthemeNord.sty b/Master/texmf-dist/tex/latex/beamerthemenord/beamercolorthemeNord.sty index 3faf457f729..8cdaed54e9b 100644 --- a/Master/texmf-dist/tex/latex/beamerthemenord/beamercolorthemeNord.sty +++ b/Master/texmf-dist/tex/latex/beamerthemenord/beamercolorthemeNord.sty @@ -17,8 +17,9 @@ \definecolor{NordMediumBlack}{HTML}{434C5e} % nord2 \definecolor{NordBrightBlack}{HTML}{4C566A} % nord3 % Snow Storm -\definecolor{NordWhite}{HTML}{E5E9F0} % nord5 -\definecolor{NordBrightWhite}{HTML}{ECEFF4} % nord6 +\definecolor{NordWhite}{HTML}{D8DEE9} % nord4 +\definecolor{NordBrighterWhite}{HTML}{E5E9F0} % nord5 +\definecolor{NordBrightestWhite}{HTML}{ECEFF4} % nord6 % Frost \definecolor{NordCyan}{HTML}{8FBCBB} % nord7 \definecolor{NordBrightCyan}{HTML}{88C0D0} % nord8 @@ -31,31 +32,95 @@ \definecolor{NordGreen}{HTML}{A3BE8C} % nord14 \definecolor{NordMagenta}{HTML}{B48EAD} % nord15 -\setbeamercolor*{background canvas}{bg=NordBlack} -\setbeamercolor*{normal text}{fg=NordWhite} -\setbeamercolor*{alerted text}{fg=NordRed} -\setbeamercolor*{example text}{fg=NordBrightCyan} -\setbeamercolor*{structure}{fg=NordCyan} - -\setbeamercolor*{title}{fg=NordGreen} -\setbeamercolor*{subtitle}{fg=NordBlue} -\setbeamercolor*{frametitle}{fg=NordGreen} -\setbeamercolor*{framesubtitle}{fg=NordBlue} -\setbeamercolor*{section in toc}{fg=NordGreen} -\setbeamercolor*{subsection in toc}{fg=NordBlue} -\setbeamercolor*{subsection in toc shaded}{fg=NordCyan!20!NordBrightBlack} - -\setbeamercolor*{itemize item}{fg=NordGreen} -\setbeamercolor*{enumerate item}{fg=NordGreen} - -\setbeamercolor*{section in head/foot}{bg=NordBlack, fg=NordCyan} - -\setbeamercolor{block title}{bg=NordBlack!80,fg=NordGreen} -\setbeamercolor{block title example}{bg=NordBlack!80,parent={example text}} -\setbeamercolor{block title alerted}{bg=NordBlack!80,parent={alerted text}} -\setbeamercolor{block body}{bg=NordGreen!50!NordBlack,fg=NordCyan} -\setbeamercolor{block body example}{bg=NordBrightCyan!50!NordBlack,fg=NordWhite} -\setbeamercolor{block body alerted}{bg=NordRed!50!NordBlack,fg=NordWhite} + +%%%%% create alias for colors according to usage +\DeclareOptionBeamer{style}{\def\beamer@nordtheme@style{#1}} +\ExecuteOptionsBeamer{style=dark} % `dark` will be default if nothing is given +\ProcessOptionsBeamer + +\def\beamer@nordtheme@styledark{dark}% +\def\beamer@nordtheme@stylelight{light}% + + +\colorlet{ColorAlertedText}{NordRed} +\colorlet{ColorSubtitle}{NordBlue} +\colorlet{ColorSubsectionInToc}{ColorSubtitle} + +\ifx\beamer@nordtheme@style\beamer@nordtheme@styledark% + \colorlet{ColorBackground}{NordBlack} + \colorlet{ColorText}{NordWhite} + \colorlet{ColorExampleText}{NordBrightCyan} + \colorlet{ColorStructure}{NordCyan} + \colorlet{ColorTitle}{NordGreen} + \colorlet{ColorSubsectionInTocShaded}{NordCyan!20!NordBrightBlack} + \colorlet{ColorItemizeItem}{NordGreen} + \colorlet{ColorBlockTitleBg}{NordBlack!80} + \colorlet{ColorExampleBlockTitleBg}{ColorBlockTitleBg} + \colorlet{ColorAlertedBlockTitleBg}{ColorBlockTitleBg} + \colorlet{ColorBlockBodyBg}{NordGreen!50!NordBlack} + \colorlet{ColorExampleBlockBodyBg}{NordBrightCyan!50!NordBlack} + \colorlet{ColorAlertedBlockBodyBg}{NordRed!50!NordBlack} + \colorlet{ColorBlockBodyFg}{NordCyan} + \colorlet{ColorExampleBlockBodyFg}{NordWhite} + \colorlet{ColorAlertedBlockBodyFg}{NordWhite} +\else% + \ifx\beamer@nordtheme@style\beamer@nordtheme@stylelight% + \colorlet{ColorBackground}{NordBrightestWhite} + \colorlet{ColorText}{NordBrightBlack} + \colorlet{ColorExampleText}{NordCyan} + \colorlet{ColorStructure}{NordBrightCyan} + \colorlet{ColorTitle}{NordBrightBlue} + \colorlet{ColorSubtitle}{NordBlue} + \colorlet{ColorSubsectionInTocShaded}{ColorSubsectionInToc!50!ColorBackground} + \colorlet{ColorItemizeItem}{ColorStructure} + \colorlet{ColorBlockTitleBg}{NordGreen!50} + \colorlet{ColorExampleBlockTitleBg}{ColorExampleText!50} + \colorlet{ColorAlertedBlockTitleBg}{ColorAlertedText!50} + \colorlet{ColorBlockBodyBg}{NordGreen!20} + \colorlet{ColorExampleBlockBodyBg}{ColorExampleText!20} + \colorlet{ColorAlertedBlockBodyBg}{ColorAlertedText!20} + \colorlet{ColorBlockBodyFg}{ColorText} + \colorlet{ColorExampleBlockBodyFg}{ColorText} + \colorlet{ColorAlertedBlockBodyFg}{ColorText} + \else% + \PackageError{beamercolorthemeNord}{Unknow style option `\beamer@nordtheme@style`}{extra help} + \fi% +\fi% + + +\colorlet{ColorNormalText}{ColorText} +\colorlet{ColorFrameTitle}{ColorTitle} +\colorlet{ColorFrameSubtitle}{ColorSubtitle} +\colorlet{ColorSectionInToc}{ColorTitle} +\colorlet{ColorEnumerateColor}{ColorItemizeItem} +\colorlet{ColorSectionInHeadFoot}{ColorStructure} + +%%%%% set beamer color +\setbeamercolor*{background canvas}{bg=ColorBackground} +\setbeamercolor*{normal text}{fg=ColorNormalText} +\setbeamercolor*{alerted text}{fg=ColorAlertedText} +\setbeamercolor*{example text}{fg=ColorExampleText} +\setbeamercolor*{structure}{fg=ColorStructure} + +\setbeamercolor*{title}{fg=ColorTitle} +\setbeamercolor*{subtitle}{fg=ColorSubtitle} +\setbeamercolor*{frametitle}{fg=ColorFrameTitle} +\setbeamercolor*{framesubtitle}{fg=ColorFrameSubtitle} +\setbeamercolor*{section in toc}{fg=ColorSectionInToc} +\setbeamercolor*{subsection in toc}{fg=ColorSubsectionInToc} +\setbeamercolor*{subsection in toc shaded}{fg=ColorSubsectionInTocShaded} + +\setbeamercolor*{itemize item}{fg=ColorItemizeItem} +\setbeamercolor*{enumerate item}{fg=ColorEnumerateColor} + +\setbeamercolor*{section in head/foot}{bg=ColorBackground, fg=ColorSectionInHeadFoot} + +\setbeamercolor{block title}{bg=ColorBlockTitleBg,fg=NordGreen} +\setbeamercolor{block title example}{bg=ColorExampleBlockTitleBg,parent={example text}} +\setbeamercolor{block title alerted}{bg=ColorAlertedBlockTitleBg,parent={alerted text}} +\setbeamercolor{block body}{bg=ColorBlockBodyBg,fg=ColorBlockBodyFg} +\setbeamercolor{block body example}{bg=ColorExampleBlockBodyBg,fg=ColorExampleBlockBodyFg} +\setbeamercolor{block body alerted}{bg=ColorAlertedBlockBodyBg,fg=ColorAlertedBlockBodyFg} \setbeamercolor{caption}{fg=NordBrightBlue} diff --git a/Master/texmf-dist/tex/latex/beamerthemenord/beamerthemeNord.sty b/Master/texmf-dist/tex/latex/beamerthemenord/beamerthemeNord.sty index 40067d2fb8b..55633e34805 100644 --- a/Master/texmf-dist/tex/latex/beamerthemenord/beamerthemeNord.sty +++ b/Master/texmf-dist/tex/latex/beamerthemenord/beamerthemeNord.sty @@ -6,10 +6,15 @@ % The latest version of this license is in % http://www.latex-project.org/lppl.txt -\ProvidesPackage{beamerthemeNord}[2020/07/03 v0.1.0 A simple beamer theme using Nord color scheme] +\ProvidesPackage{beamerthemeNord}[2020/08/24 v0.2.0 A simple beamer theme using Nord color scheme] \mode<presentation> +\DeclareOptionBeamer{style}{ + \PassOptionsToPackage{style=#1}{beamercolorthemeNord} +} +\ProcessOptionsBeamer + \RequirePackage{ifthen} \usecolortheme{Nord} @@ -17,7 +22,7 @@ \setbeamertemplate{navigation symbols}{} -\setbeamersize{text margin left=6mm,text margin right=6mm} +\setbeamersize{text margin left=10mm,text margin right=10mm} \setbeamertemplate{caption}{\insertcaption} |