texlive[60551] Master/texmf-dist: tiscreen (19sep21)

commits+karl at tug.org commits+karl at tug.org
Sun Sep 19 22:46:04 CEST 2021


Revision: 60551
          http://tug.org/svn/texlive?view=revision&revision=60551
Author:   karl
Date:     2021-09-19 22:46:03 +0200 (Sun, 19 Sep 2021)
Log Message:
-----------
tiscreen (19sep21)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/tiscreen/README
    trunk/Master/texmf-dist/doc/latex/tiscreen/tiscreen-doc.pdf
    trunk/Master/texmf-dist/doc/latex/tiscreen/tiscreen-doc.tex
    trunk/Master/texmf-dist/tex/latex/tiscreen/tiscreen.sty

Modified: trunk/Master/texmf-dist/doc/latex/tiscreen/README
===================================================================
--- trunk/Master/texmf-dist/doc/latex/tiscreen/README	2021-09-19 20:45:48 UTC (rev 60550)
+++ trunk/Master/texmf-dist/doc/latex/tiscreen/README	2021-09-19 20:46:03 UTC (rev 60551)
@@ -1,9 +1,10 @@
 tiscreen (TI calculator screen)
 
-This package mimics the screen of older Texas instruments dot matrix display
-calculators, specifically the TI-82 STATS.
+This package mimics the screen and buttons of older Texas instruments dot
+matrix display calculators, specifically the TI-82 STATS.
 
 Changes:
+- 2021/09/18 Added buttons
 - 2021/07/22 Added bracket symbols
 - 2021/06/10 Simplified example code in documentation
 - 2021/06/07 Simplified characters table in documentation

Modified: trunk/Master/texmf-dist/doc/latex/tiscreen/tiscreen-doc.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/tiscreen/tiscreen-doc.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/tiscreen/tiscreen-doc.tex	2021-09-19 20:45:48 UTC (rev 60550)
+++ trunk/Master/texmf-dist/doc/latex/tiscreen/tiscreen-doc.tex	2021-09-19 20:46:03 UTC (rev 60551)
@@ -1,3 +1,5 @@
+% TODO: make funciton for printing \LCDcmd
+
 \documentclass[a4paper,12pt]{article}
 \usepackage[iso,english]{isodate}
 \usepackage[margin=1in]{geometry}
@@ -17,9 +19,9 @@
 }
 
 \newcommand{\LCDsymb}[1]{\large \textLCD{1}|{#1}~|}
-\newcommand{\LCDcmd}{\texttt{\textbackslash LCD}}
+\newcommand{\printcmd}[1]{\texttt{\textbackslash #1}}
 
-\title{TI calculator display\\{\small(TI-82 STATS)}}
+\title{TI calculator screen (and buttons)\\{\small TI-82 STATS}}
 \author{Mustafa Ibrahim}
 
 \begin{document}
@@ -36,6 +38,8 @@
 |        62.11246|
 |{fcur}               |
 |                |
+
+\tibtnmatrixextra
 \end{center}
 
 \tableofcontents\newpage
@@ -42,7 +46,7 @@
 
 \section{Quickstart}
 
-\begin{SideBySideExample}[xrightmargin=6cm]
+\begin{SideBySideExample}[xrightmargin=5.5cm]
 %\usepackage[color]{tiscreen}
 
 \tiscreen
@@ -54,15 +58,23 @@
 |                |
 |                |
 |                |
+
+\tibtnmatrixextra
+
+Lorem
+\tibtn[white]{tibtngray}{MATH}
+ipsum
+
+\tibtnextra{\tibtn[white]{tibtngray}{MATH}}{TEST}{A}
 \end{SideBySideExample}
 
 \section{Package option(s)}
 \subsection{Color}
 
-Using the \texttt{color} option will change the colors used by the \LCDcmd{}
-command. The colors are defined as \texttt{tiscreenfg} (foreground. i.e. font
-color) and \texttt{tiscreenbg} (background). These colors can be redefined like
-this:
+Using the \texttt{color} option will change the colors used by the
+\printcmd{LCD} command for printing the screen using \printcmd{tiscreen}. The
+colors are defined as \texttt{tiscreenfg} (foreground, i.e. font color) and
+\texttt{tiscreenbg} (background) and redefined like this:
 
 \begin{Verbatim}
 % Add this to your preamble
@@ -70,11 +82,12 @@
 \definecolor{tiscreenfg}{HTML}{FFFFFF}
 \end{Verbatim}
 
+\part{Screen}
 \section{LCD size}
 
 The default LCD size is $8 \times 16$ (the size of the TI-82 STATS). It can be
 changed by redefining the variables used to determine the size of the display
-or by using the original \LCDcmd{} command.
+or by using the original \printcmd{LCD} command.
 
 \begin{Verbatim}
 % First method (For entire document)
@@ -95,7 +108,7 @@
 	\begin{tabular}{|l|l|>{\ttfamily}l|}
 		\multicolumn{3}{c}{\textbf{Added characters}} \\
 		\hline
-		Name       & Symbol          &\textnormal{\LCDcmd{} Code} \\
+		Name       & Symbol          &\textnormal{\printcmd{LCD} Code} \\
 		\hline
 		E          & \LCDsymb{sciE}  & \{sciE\} \\
 		$\sigma$   & \LCDsymb{sigma} & \{sigma\} \\
@@ -127,4 +140,31 @@
 	\end{tabular}
 \end{center}
 
+\part{Buttons}
+\section{Usage}
+
+Use the \printcmd{tibtn} command only prints the button and is usefull when
+needing the buttons to be displayed inline. The \printcmd{tibtnextra} takes
+extra arguments to show extra options for the button (accesed by the
+\tibtnsecond{} and \tibtnalpha{} buttons).
+
+\begin{SideBySideExample}[xrightmargin=5.5cm]
+\tibtnextra{\tibtn[white]{tibtngray}{MATH}}{TEST}{A}
+
+Lorem
+\tibtn[white]{tibtngray}{MATH}
+ipsum
+\end{SideBySideExample}
+
+\section{Defined buttons}
+
+\begin{center}
+	\begin{tabular}{|>{\ttfamily}l|l|}
+		\multicolumn{2}{c}{\textbf{Defined buttons}}      \\ \hline
+		\textnormal{Command}        & Output              \\ \hline
+		\printcmd{tibtnmatrix}      & \tibtnmatrix{}      \\ \hline
+		\printcmd{tibtnmatrixextra} & \tibtnmatrixextra{} \\ \hline
+	\end{tabular}
+\end{center}
+
 \end{document}

Modified: trunk/Master/texmf-dist/tex/latex/tiscreen/tiscreen.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/tiscreen/tiscreen.sty	2021-09-19 20:45:48 UTC (rev 60550)
+++ trunk/Master/texmf-dist/tex/latex/tiscreen/tiscreen.sty	2021-09-19 20:46:03 UTC (rev 60551)
@@ -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]
+\ProvidesPackage{tiscreen}[2021/09/18 Ti calculator screen]
 
-% TODO: Scaling option
-
 \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}}



More information about the tex-live-commits mailing list.