From 51cb189341f942c521df0a0f50ff14fcc47259c9 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sun, 17 Feb 2019 22:59:34 +0000 Subject: ftc-notebook (17feb19) git-svn-id: svn://tug.org/texlive/trunk@50043 c570f23f-e606-0410-a88d-b1316a301751 --- .../tex/latex/ftc-notebook/ftc-notebook.sty | 165 +++++++++++++++------ 1 file changed, 118 insertions(+), 47 deletions(-) (limited to 'Master/texmf-dist/tex/latex/ftc-notebook/ftc-notebook.sty') diff --git a/Master/texmf-dist/tex/latex/ftc-notebook/ftc-notebook.sty b/Master/texmf-dist/tex/latex/ftc-notebook/ftc-notebook.sty index 18f881a135d..eeff04e1449 100644 --- a/Master/texmf-dist/tex/latex/ftc-notebook/ftc-notebook.sty +++ b/Master/texmf-dist/tex/latex/ftc-notebook/ftc-notebook.sty @@ -1,28 +1,17 @@ -%% -%% This is file `ftc-notebook.sty', -%% generated with the docstrip utility. -%% -%% The original source files were: -%% -%% ftc-notebook.dtx (with options: `package') %% ---------------------------------------------------------------- %% ftc-notebook --- format for an FIRST Tech Challenge (FTC) engineering %% notebook with daily entries, team story, bio, %% and list of fig/table/tasks -%% Version: Released 2019/02, Version 1.0 +%% Version: Released 2019/02/16, Version 1.1 %% Authors: FTC 9773, Team Robocracy %% E-mail: ftcrobocracy@gmail.com %% ---------------------------------------------------------------- %% \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{ftc9773}[2019/02/03 FIRST Tech Challenge (FTC) % +\ProvidesPackage{ftc9773}[2019/02/16 FIRST Tech Challenge (FTC) % package for engineering notebook by Robocracy] - - - - %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% Package Options @@ -42,6 +31,9 @@ \DeclareStringOption [Software] {KindFive} [Software] \DeclareStringOption [Team] {KindSix} [Team] \DeclareBoolOption {Grid} +\DeclareBoolOption {Green} +\DeclareBoolOption {Orange} +\DeclareBoolOption {Blue} \ProcessKeyvalOptions* @@ -105,6 +97,7 @@ %% for arrays of variables \RequirePackage{arrayjobx} +\RequirePackage{multido} %% conditional \RequirePackage{ifthen} @@ -180,6 +173,12 @@ %% end of inlined callout %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\RequirePackage{hyperref} +\hypersetup{ + colorlinks=true, + linkcolor=black, +} + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% customizations arrays @@ -196,6 +195,8 @@ \renewcommand{\theTaskSection}{\arabic{TaskSection}} \renewcommand{\theTaskSubSection}{\arabic{TaskSection}.{\arabic{TaskSubSection}}} +\newcounter{SigneeCounter} + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% new month \NewDocumentCommand{\Month}{m m} @@ -212,11 +213,12 @@ & \textbf{\Large \color{TitleColor} \capitalisewords{#1}} \\ & \\ \cline{2-2} \\ \end{tabu} - \vspace{10mm} \\ + \vspace{10mm} \\ \end{flushleft} {\centering \includegraphics[width=0.85\textwidth]{#2} \\} } + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \NewDocumentEnvironment{Meeting}{O{Meeting} m m m m m} %% 1: Type Meeting/Pre-Season @@ -229,6 +231,9 @@ %% arrays init \newarray\TaskTitle \newarray\TaskLabel + \newarray\SigneeName + \setcounter{SigneeCounter}{0} + %% print first table with logo, meeting type, date, Title \clearpage \newpage @@ -248,8 +253,8 @@ \vspace{5mm} %% print task box \rowcolors{1}{MainTableCellColor}{MainTableCellColor} - \begin{tabu}{|>{\raggedright\arraybackslash}p{1cm}|>{\raggedright\arraybackslash}p{6cm}|>% - {\raggedright\arraybackslash}p{10cm}|} + \begin{tabu}{|>{\raggedright\arraybackslash}p{1cm}|>{\raggedright\arraybackslash}p{5.5cm}|>% + {\raggedright\arraybackslash}p{9.7cm}|} \arrayrulecolor{TitleColor} \hline \cellcolor{MainTableHeaderColor} & \cellcolor{MainTableHeaderColor} \textbf{Task:} & @@ -263,9 +268,9 @@ \begin{flushleft} \rowcolors{1}{MainTableCellColor}{MainTableCellColor} \tabulinesep=1.2mm - \begin{tabu}{|>{\raggedright\arraybackslash}p{13.5cm}>{\raggedright\arraybackslash}p{4cm}|} + \begin{tabu}{|>{\raggedright\arraybackslash}p{12.5cm}>{\raggedright\arraybackslash}p{4cm}|} \arrayrulecolor{TitleColor} \hline - \cellcolor{MainTableHeaderColor} \textbf{Signed by:} &% + \cellcolor{MainTableHeaderColor} \textbf{Signed by: } \ListSignee &% \cellcolor{MainTableHeaderColor} \textbf{Date:} \\ \hline & \\ & #3 \\ \hline @@ -274,11 +279,27 @@ %% delete array \delarray\TaskTitle \delarray\TaskLabel + \delarray\SigneeName \ifnum\value{TaskCounter}=\value{TaskSection} \else \PackageError{Robocracy text}{More Task defined than described}{add text} \fi } +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% People signing the entry are given in a \Signee{name} command +\NewDocumentCommand{\Signee}{m} +%% 1: name of person signing +{\stepcounter{SigneeCounter}% +\SigneeName(\theSigneeCounter)={#1}% +#1% +} + +\NewDocumentCommand{\ListSignee}{} +{ % + \ifnum\theSigneeCounter=0 \else % + \multido{\i=1+1}{\theSigneeCounter}{ \SigneeName(\i)}. % + \fi % +} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% Task Info \newcommand{\TaskInfo}[3] % @@ -297,10 +318,10 @@ {% \ifthenelse% {\equal{#1}{#2}}% - {\cellcolor{black}\textcolor{NormalTableCellColor}{#4}}% + {\cellcolor{black}\textcolor{NormalTableCellColor}{\textbf{#4}}}% {\ifthenelse% {\equal{#1}{#3}}% - {\cellcolor{black}\textcolor{NormalTableCellColor}{#4}}% + {\cellcolor{black}\textcolor{NormalTableCellColor}{\textbf{#4}}}% {#4}% }% }% @@ -332,12 +353,12 @@ \label{\cachedata} \rowcolors{1}{NormalTableCellColor}{NormalTableCellColor} \tabulinesep=3mm - \begin{tabu}{|>{\centering\arraybackslash}p{2.6cm}|>{\centering\arraybackslash}p{2.6cm}|>% - {\centering\arraybackslash}p{2.6cm}|>{\centering\arraybackslash}p{2.6cm}|>% - {\centering\arraybackslash}p{2.6cm}|>{\centering\arraybackslash}p{2.6cm}|} + \begin{tabu}{|>{\centering\arraybackslash}p{2.5cm}|>{\centering\arraybackslash}p{2.5cm}|>% + {\centering\arraybackslash}p{2.5cm}|>{\centering\arraybackslash}p{2.5cm}|>% + {\centering\arraybackslash}p{2.5cm}|>{\centering\arraybackslash}p{2.5cm}|} \arrayrulecolor{TitleColor} \hline \multicolumn{6}{|l|}{\cellcolor{NormalTableHeaderColor} % - \textbf{\large Task \theTaskSection: \TaskTitle(\theTaskSection).}} \\ + \capitalisewords{\textbf{\large Task \theTaskSection: \TaskTitle(\theTaskSection).}}} \\ \IfNoValueOrEmptyTF{#1}{}{\multicolumn{6}{|l|}{\cellcolor{NormalTableHeaderColor} % \small Continuing from:#1} \\} \hline \@TypeColor{1}{#2}{#3}{\FTC@KindOne} & @@ -399,6 +420,19 @@ } } + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% Task Subsection +\NewDocumentCommand{\Highlight}{m} +{ + %\needspace{3cm} % + \begin{flushleft} % + { \color{TitleColor} \textbf{#1}} + \vspace{-2mm}\\ + \end{flushleft} % +} + + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% Enumerate with Title \NewDocumentEnvironment{EnumerateWithTitle}{m} % @@ -587,19 +621,33 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% decision +\NewDocumentEnvironment{RawDecisionTable}{m m m m} % +%% 1: column format +%% 2: column titles +%% 3: caption +%% 4: label +{ \begin{MyTable}{NormalTableCellColor}{#1}{#2}{#3}{#4} } +{ \end{MyTable} } + \NewDocumentEnvironment{DecisionTable}{O{Option} O{Pro} O{Cons} m m} % %% 1,2,3: column names (optional: all or none please) %% 4: caption %% 5: label -{ - \begin{MyTable}{NormalTableCellColor}{|p{4cm}|p{6.5cm}|p{6.5cm}|} - {\textbf{#1:} & \textbf{#2:} & \textbf{#3:}} - {#4}{#5} +{ \begin{RawDecisionTable}{|p{4cm}|p{6.5cm}|p{6.5cm}|}% + {\textbf{#1:} & \textbf{#2:} & \textbf{#3:}}{#4}{#5} } -{ \end{MyTable} } +{ \end{RawDecisionTable} } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% description Table +\NewDocumentEnvironment{RawDescriptionTable}{m m m m} % +%% 1: column format +%% 2: column titeles +%% 3: caption +%% 4: label +{ \begin{MyTable}{White}{#1}{#2}{#3}{#4} } +{ \end{MyTable} } + %% no star: small + large sized columns %% with star: 2 medium sized columns \NewDocumentEnvironment{DescriptionTable}{m m m m} % @@ -608,11 +656,10 @@ %% 3: caption %% 4: label { - \begin{MyTable}{White}{|p{5cm}|p{12cm}|} - {\textbf{#1} & \textbf{#2}} - {#3}{#4} + \begin{RawDescriptionTable}{|p{5cm}|p{12cm}|}% + {\textbf{#1} & \textbf{#2}}{#3}{#4} } -{ \end{MyTable} } +{ \end{RawDescriptionTable} } \NewDocumentEnvironment{DescriptionTable*}{m m m m} % %% 1: first col title @@ -620,11 +667,10 @@ %% 3: caption %% 4: label { - \begin{MyTable}{White}{|p{8.5cm}|p{8.5cm}|} - {\textbf{#1} & \textbf{#2}} - {#3}{#4} + \begin{RawDescriptionTable}{|p{8.5cm}|p{8.5cm}|}% + {\textbf{#1} & \textbf{#2}}{#3}{#4} } -{ \end{MyTable} } +{ \end{RawDescriptionTable} } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% table entries @@ -765,7 +811,7 @@ & \textbf{ \color{TitleColor} \textit{\fontsize{40}{50}\selectfont #1}} \\ & \textbf{\LARGE ``#2''} \\ \cline{2-2} \\ \end{tabu} - \vspace{10mm} \\ + \vspace{10mm} \\ \end{flushleft} \begin{Large} }{ @@ -904,15 +950,40 @@ %% defaults %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% title and array rules -\definecolor{TitleColor}{rgb}{0.65, 0.73, 0.29} -%% main table backgrounds -\definecolor{MainTableHeaderColor}{rgb}{0.84, 0.96, 0.29} -\definecolor{MainTableCellColor}{rgb}{0.70, 0.82, 0.32} -%% normal table backgrounds -\definecolor{NormalTableHeaderColor}{rgb}{0.84, 0.96, 0.29} -\definecolor{NormalTableCellColor}{rgb}{0.94, 0.99, 0.78} -\definecolor{NormalTableCellWhite}{rgb}{1.0, 1.0, 1.0} +\ifFTC@Blue + %% title and array rules + \definecolor{TitleColor}{rgb}{0.04, 0.32, 0.74} + %% main table backgrounds + \definecolor{MainTableHeaderColor}{rgb}{0.56, 0.69, 0.99} + \definecolor{MainTableCellColor}{rgb}{0.26, 0.47, 0.79} + %% normal table backgrounds + \definecolor{NormalTableHeaderColor}{rgb}{0.38, 0.60, 0.79} + \definecolor{NormalTableCellColor}{rgb}{0.68, 0.87, 0.99} + \definecolor{NormalTableCellWhite}{rgb}{1.0, 1.0, 1.0} +\else +\ifFTC@Orange + %% title and array rules + \definecolor{TitleColor}{rgb}{0.71, 0.45, 0.01} + %% main table backgrounds + \definecolor{MainTableHeaderColor}{rgb}{0.96, 0.80, 0.51} + \definecolor{MainTableCellColor}{rgb}{0.99, 0.69, 0.20} + %% normal table backgrounds + \definecolor{NormalTableHeaderColor}{rgb}{0.98, 0.69, 0.18} + \definecolor{NormalTableCellColor}{rgb}{0.99, 0.89, 0.68} + \definecolor{NormalTableCellWhite}{rgb}{1.0, 1.0, 1.0} +\else + % default: green + %% title and array rules + \definecolor{TitleColor}{rgb}{0.65, 0.73, 0.29} + %% main table backgrounds + \definecolor{MainTableHeaderColor}{rgb}{0.84, 0.96, 0.29} + \definecolor{MainTableCellColor}{rgb}{0.70, 0.82, 0.32} + %% normal table backgrounds + \definecolor{NormalTableHeaderColor}{rgb}{0.84, 0.96, 0.29} + \definecolor{NormalTableCellColor}{rgb}{0.94, 0.99, 0.78} + \definecolor{NormalTableCellWhite}{rgb}{1.0, 1.0, 1.0} +\fi +\fi %% %% Copyright (c) 2019 FTC 9773, Team Robocracy -- cgit v1.2.3