summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2016-05-11 21:28:32 +0000
committerKarl Berry <karl@freefriends.org>2016-05-11 21:28:32 +0000
commitbde5af3bfbebbad7a5387d12a0951c1da8340ee3 (patch)
tree27a2b5b80d2e402dd89ea923a2a55fe48f1fd13e /Master/texmf-dist/doc/latex
parent96e8875648e0f38a4d7cd50b93a6c62a8ea9a32b (diff)
coloring (11may16)
git-svn-id: svn://tug.org/texlive/trunk@41042 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex')
-rw-r--r--Master/texmf-dist/doc/latex/coloring/README11
-rw-r--r--Master/texmf-dist/doc/latex/coloring/coloring-doc.pdfbin0 -> 26014 bytes
-rw-r--r--Master/texmf-dist/doc/latex/coloring/coloring-doc.tex99
3 files changed, 110 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/coloring/README b/Master/texmf-dist/doc/latex/coloring/README
new file mode 100644
index 00000000000..ddae9575059
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/coloring/README
@@ -0,0 +1,11 @@
+Package coloring: define missing colors by their names
+Copyright (C) 2016 Zou Hu <zohooo@yeah.net>
+
+Please report bugs, problems, and suggestions via
+ https://github.com/zohooo/coloring
+
+The package may be distributed and/or modified under the conditions
+of the LaTeX Project Public License, either version 1.3 of this
+license or (at your option) any later version. The latest version
+of this license is in
+ http://www.latex-project.org/lppl.txt
diff --git a/Master/texmf-dist/doc/latex/coloring/coloring-doc.pdf b/Master/texmf-dist/doc/latex/coloring/coloring-doc.pdf
new file mode 100644
index 00000000000..6a31590dfe8
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/coloring/coloring-doc.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/coloring/coloring-doc.tex b/Master/texmf-dist/doc/latex/coloring/coloring-doc.tex
new file mode 100644
index 00000000000..35672abc19f
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/coloring/coloring-doc.tex
@@ -0,0 +1,99 @@
+% -*- coding: utf-8 -*-
+% !TEX program = xelatex
+
+\documentclass[14pt]{beamer}
+
+\usepackage{coloring}
+\usetheme[color=green]{epyt} % https://www.ctan.org/pkg/epyt
+
+\usepackage{arev} % use arev sans font
+
+\hypersetup{
+ pdfpagemode={FullScreen},
+}
+
+\usepackage{listings}
+\lstset{basicstyle=\ttfamily\color{rgbx55}}
+
+\usepackage{tabu}
+
+\AtBeginDocument{
+ \setlength{\parskip}{5pt plus 1pt minus 1pt}
+ \setlength{\baselineskip}{19pt plus 1pt minus 1pt}
+ \setlength{\lineskiplimit}{4pt}
+ \setlength{\lineskip}{4pt}
+}
+
+\begin{document}
+
+\title{LaTeX Package Coloring}
+\author{zohooo@yeah.net}
+%\institute{https://github.com/zohooo/coloring}
+
+\begin{frame}%[plain]
+\transboxout
+\titlepage
+\end{frame}
+
+\begin{frame}[fragile]{Introduction}
+The \verb|coloring| package makes it possible to define colors automatically by their names.
+\begin{itemize}
+ \item It's useful in drawing a \verb|tikz| picture.
+ \item It's useful in designing a \verb|beamer| theme.
+\end{itemize}
+Using the package, you \alert{don't} need to write \verb|\definecolor| before using a color.
+\end{frame}
+
+\begin{frame}[fragile]{Example One: Gray Colors}
+When you write
+\begin{lstlisting}
+\textcolor{gray2}{Text}
+\end{lstlisting}
+The package will automatically define the following \alert{gray} color for you
+\begin{lstlisting}
+\definecolor{gray2}{gray}{0.2}
+\end{lstlisting}
+\end{frame}
+
+\begin{frame}[fragile]{Example Two: RGB Colors}
+When you write
+\begin{lstlisting}
+\colorbox{rgb37x}{Text}
+\end{lstlisting}
+The package will automatically define the following \alert{rgb} color for you
+\begin{lstlisting}
+\definecolor{rgb37x}{rgb}{0.3,0.7,1.0}
+\end{lstlisting}
+\end{frame}
+
+\begin{frame}[fragile]{Example Three: HSB Colors}
+When you write
+\begin{lstlisting}
+\colorlet{mycolor}{blue59}
+\end{lstlisting}
+The package will automatically define the following \alert{hsb} color for you
+\begin{lstlisting}
+\definecolor{blue59}{Hsb}{240,0.5,0.9}
+\end{lstlisting}
+You may add the following line to the preamble when using hsb colors
+\begin{lstlisting}
+\substitutecolormodel{hsb}{rgb}
+\end{lstlisting}
+\end{frame}
+
+\def\mycolor#1{\noindent\color{black}\fcolorbox{gray}{#199}{\strut#1}}
+\begin{frame}{HSB Colors}
+\begin{center}
+\begin{tabu}{|r|X||r|X|}\hline
+ Hue & Name & Hue & Name \\\hline
+ 0 & \mycolor{red} & 180 & \mycolor{cyan} \\\hline
+ 30 & \mycolor{brown} & 210 & \mycolor{azure} \\\hline
+ 60 & \mycolor{yellow} & 240 & \mycolor{blue} \\\hline
+ 90 & \mycolor{olive} & 270 & \mycolor{violet} \\\hline
+ 120 & \mycolor{green} & 300 & \mycolor{magenta} \\\hline
+ 150 & \mycolor{teal} & 330 & \mycolor{purple} \\\hline
+\end{tabu}
+\end{center}
+\end{frame}
+
+\end{document}