summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/tiscreen/tiscreen.sty
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2021-09-19 20:46:03 +0000
committerKarl Berry <karl@freefriends.org>2021-09-19 20:46:03 +0000
commit324ea25de5e825741d817acc1e670240421b237e (patch)
treeae8131cf79984f155b8f2f2bbb144284facd25c8 /Master/texmf-dist/tex/latex/tiscreen/tiscreen.sty
parentfdab7aaf427a37d2e7a8b77dbedeea04f34ed78b (diff)
tiscreen (19sep21)
git-svn-id: svn://tug.org/texlive/trunk@60551 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/tiscreen/tiscreen.sty')
-rw-r--r--Master/texmf-dist/tex/latex/tiscreen/tiscreen.sty46
1 files changed, 38 insertions, 8 deletions
diff --git a/Master/texmf-dist/tex/latex/tiscreen/tiscreen.sty b/Master/texmf-dist/tex/latex/tiscreen/tiscreen.sty
index 36cbdedfd43..d4219f1eb75 100644
--- a/Master/texmf-dist/tex/latex/tiscreen/tiscreen.sty
+++ b/Master/texmf-dist/tex/latex/tiscreen/tiscreen.sty
@@ -1,18 +1,20 @@
% Copyright (C) 2021 Mustafa Ibrahim
-% This work may be distributed and/or modified under the conditions of the LaTeX
-% Project Public License, either version 1.3c or higher. The latest version the
-% license is at: http://www.latex-project.org/lppl.txt
+% This work may be distributed and/or modified under the conditions of the
+% LaTeX Project Public License, either version 1.3c or higher. The latest
+% version the license is at: http://www.latex-project.org/lppl.txt
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{tiscreen}[2021/07/22 Ti calculator screen]
-
-% TODO: Scaling option
+\ProvidesPackage{tiscreen}[2021/09/18 Ti calculator screen]
\def\tiscreenX{16}
\def\tiscreenY{8}
\RequirePackage{lcd}
-% Define
+\RequirePackage{tikz}
+\RequirePackage{tcolorbox}
+\RequirePackage{array}
+
+% Define screen characters
\DefineLCDchar{barx}{11111000001000101010001000101010001}
\DefineLCDchar{bary}{11111000001000110001011110000101110}
\DefineLCDchar{ar}{00011000011100100001000010000000000}
@@ -26,7 +28,7 @@
\DefineLCDchar{sub5}{00000000000111001000011000001001100}
\DefineLCDchar{sub6}{00000000000011001000011100101001110}
\DefineLCDchar{cx}{00101000100010100000000000000000000}
-% Redefine
+% Redefine screen characters
\DefineLCDchar{sqrt}{00111001000010000100101000110000100}
\DefineLCDchar{!}{00100001000010000100000000010000100}
\DefineLCDchar{e}{00000000000111010001111101000001100}
@@ -39,11 +41,39 @@
\DefineLCDchar{rb}{11000001000010000010001000010011000}
\RequirePackage{xcolor}
+% Screen colors
\definecolor{tiscreenfg}{HTML}{000000}
\definecolor{tiscreenbg}{HTML}{5d9345}
+% Button colors
+\definecolor{tibtngray}{HTML}{494F54}
+\definecolor{tibtnyellow}{HTML}{F1E78B}
+\definecolor{tibtngreen}{HTML}{D5DE93}
+\definecolor{tibtnwhite}{HTML}{E2E2E2}
+\definecolor{tibtnblue}{HTML}{CDE2E9}
+\definecolor{tibtncaseblack}{HTML}{232A32}
\DeclareOption{color}{\LCDcolors{tiscreenfg}{tiscreenbg}}
\DeclareOption*{\PackageWarning{tiscreen}{Unknown ‘\CurrentOption’}}
\ProcessOptions\relax
+% Screen commands
\newcommand{\tiscreen}{\LCD{\tiscreenY}{\tiscreenX}}
+
+% Button commands
+\newcommand{\tibtn}[3][black]{\tikz{\bfseries\tiny\sffamily \node[fill=#2, draw, rounded corners, minimum height=2.5em, minimum width=4.5em, align=center] {\textcolor{#1}{#3}};}}
+\newcommand{\tibtnextra}[3]{%
+ \tcbox[colback=tibtncaseblack,size=small]{%
+ \begin{tabular}{l@{}r}%
+ \bfseries\tiny\sffamily \textcolor{tibtnyellow}{#2} &
+ \bfseries\tiny\sffamily \textcolor{tibtngreen}{#3} \\
+ \multicolumn{2}{c}{#1}
+ \end{tabular}%
+ }%
+}
+
+% Button definitions
+\def\tibtnsecond{\tibtn{tibtnyellow}{2nd}}
+\def\tibtnalpha{\tibtn{tibtngreen}{ALPHA}}
+
+\def\tibtnmatrix{\tibtn[white]{tibtngray}{MATRX}}
+\def\tibtnmatrixextra{\tibtnextra{\tibtnmatrix}{ANGLE}{B}}