texlive[68470] Master/texmf-dist: tikz-osci (7oct23)

commits+karl at tug.org commits+karl at tug.org
Sat Oct 7 22:14:30 CEST 2023


Revision: 68470
          https://tug.org/svn/texlive?view=revision&revision=68470
Author:   karl
Date:     2023-10-07 22:14:30 +0200 (Sat, 07 Oct 2023)
Log Message:
-----------
tikz-osci (7oct23)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/tikz-osci/README.md
    trunk/Master/texmf-dist/tex/latex/tikz-osci/tikz-osci.sty

Added Paths:
-----------
    trunk/Master/texmf-dist/doc/latex/tikz-osci/tikz-osci-doc.pdf
    trunk/Master/texmf-dist/doc/latex/tikz-osci/tikz-osci-doc.tex
    trunk/Master/texmf-dist/doc/latex/tikz-osci/tikz-osci-example.pdf
    trunk/Master/texmf-dist/doc/latex/tikz-osci/tikz-osci-example.tex

Removed Paths:
-------------
    trunk/Master/texmf-dist/doc/latex/tikz-osci/doc.pdf
    trunk/Master/texmf-dist/doc/latex/tikz-osci/doc.tex
    trunk/Master/texmf-dist/doc/latex/tikz-osci/example.tex

Modified: trunk/Master/texmf-dist/doc/latex/tikz-osci/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/tikz-osci/README.md	2023-10-07 20:14:03 UTC (rev 68469)
+++ trunk/Master/texmf-dist/doc/latex/tikz-osci/README.md	2023-10-07 20:14:30 UTC (rev 68470)
@@ -1,5 +1,7 @@
-tikz-osci is a package which provides some macros to draw oscilloscope screen captures from math functions provided by the user.
+tikz-osci enables you to produce oscilloscope “screen shots”.
 -----------------------------------------------------------
 Author  : Thibault Giauffret
-email   : contact at ensciences dot fr
+
+Email   : contact at ensciences dot fr
+
 Licence : Released under the LaTeX Project Public License v1.3c or later, see http://www.latex-project.org/lppl.txt

Deleted: trunk/Master/texmf-dist/doc/latex/tikz-osci/doc.pdf
===================================================================
(Binary files differ)

Deleted: trunk/Master/texmf-dist/doc/latex/tikz-osci/doc.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/tikz-osci/doc.tex	2023-10-07 20:14:03 UTC (rev 68469)
+++ trunk/Master/texmf-dist/doc/latex/tikz-osci/doc.tex	2023-10-07 20:14:30 UTC (rev 68470)
@@ -1,161 +0,0 @@
-\documentclass[11pt,a4paper,usenames,dvipsnames]{article}
-
-
-
-\usepackage{tikz-osci}
-\usepackage[left=2cm,right=2cm,top=2cm,bottom=2cm]{geometry}
-\usepackage[most]{tcolorbox}
-\usepackage{hyperref}
-\title{TikZ Oscilloscope Package}
-\author{Thibault Giauffret}
-\def\version{0.1.0}
-
-\begin{document}
-
-\begin{tcolorbox}
-    \begin{center}
-        \vspace{0.3cm}
-        {\huge \textbf{TikZ Oscilloscope Package}}\\[0.3cm]
-        {\Large Thibault Giauffret}\\[0.3cm]
-        \textit{Version \version\ of \today}
-        \vspace{0.3cm}
-    \end{center}
-\end{tcolorbox}
-
-% Remove paragraph indentation
-\setlength{\parindent}{0pt}
-
-% Listings
-\newtcblisting{listing}{
-    listing only,
-    hbox,
-    listing options={
-            basicstyle=\small\ttfamily,
-            breaklines=true,
-            columns=fullflexible
-        },
-}
-
-
-\section{Introduction}
-
-\begin{center}
-    \osci[%
-        scale=0.8
-    ]
-\end{center}
-
-
-
-This package is modest alternative to the \texttt{pst-osci} package, not maintained anymore.
-
-Some features are not implemented yet, but the package is already usable with the basic options. I'm doing this for fun and to learn how to make a \LaTeX{} package. Therefore, I'm open to any suggestion or contribution :
-
-\begin{center}
-    \texttt{
-        contact at ensciences dot fr
-    }
-\end{center}
-
-
-
-\section{Usage}
-
-The package is loaded with the command \verb|\usepackage{tikz-osci}|. It defines a single command, \verb|\osci|, which takes a list of options as argument. The options allow you to configure and customize the oscilloscope screen view :
-
-\begin{tcolorbox}[enhanced,breakable,colback=white,colframe=black,width=\textwidth]
-    \begin{tabular}{lp{7cm}p{3cm}}
-        \texttt{scale}             & Scale of the oscilloscope (with \texttt{scalebox}).                                     & Default: \texttt{1}.                                             \\
-        \texttt{second channel}    & 1 if the second channel is enabled, 0 otherwise.                                        & Default: \texttt{0}.                                             \\
-        \texttt{screen offset one} & Vertical screen offset of the first channel.                                            & Default: \texttt{0}.                                             \\
-        \texttt{screen offset two} & Vertical screen offset of the second channel.                                           & Default: \texttt{0}.                                             \\
-        \texttt{time div}          & Time division (in ms).                                                                  & Default: \texttt{20}.                                            \\
-        \texttt{voltage div one}   & Voltage division of the first channel (in V).                                           & Default: \texttt{1}.                                             \\
-        \texttt{voltage div two}   & Voltage division of the second channel (in V).                                          & Default: \texttt{1}.                                             \\
-        \texttt{sample rate}       & Sample rate (in Hz).                                                                    & Default: \texttt{200}.                                           \\
-        \texttt{xy mode}           & 1 if the oscilloscope is in XY mode, 0 otherwise. \textbf{\color{red}Not working yet !} & Default: 0.                                                      \\
-        \texttt{expr one}          & Expression of the first channel (pgf maths format).                                     & Default: \texttt{2*sin(2*180/0.020*x)}.                          \\
-        \texttt{expr two}          & Expression of the second channel (pgf maths format).                                    & Default: \texttt{1*sin(2*180/0.020*x) + 0.2*sin(2*180/0.040*x)}. \\
-        \texttt{color one}         & Color of the first channel (in hexadecimal).                                            & Default: \texttt{D62626}.                                        \\
-        \texttt{color two}         & Color of the second channel (in hexadecimal).                                           & Default: \texttt{1053AF}.                                        \\
-        \texttt{color xy}          & Color of the XY mode (in hexadecimal).                                                  & Default: \texttt{2E8B73}.                                        \\
-        \texttt{graph back color}  & Background color of the graph (in hexadecimal).                                         & Default: \texttt{FFFFFF}.                                        \\
-        \texttt{info back color}   & Background color of the information box (in hexadecimal).                               & Default: \texttt{D6D6D6}.                                        \\
-        \texttt{info text color}   & Text color of the information box (in hexadecimal).                                     & Default: \texttt{000000}.                                        \\
-        \texttt{main axis color}   & Color of the main axis (in hexadecimal).                                                & Default: \texttt{000000}.                                        \\
-        \texttt{sub axis color}    & Color of the sub axis (in hexadecimal).                                                 & Default: \texttt{CCCCCC}.                                        \\
-    \end{tabular}
-\end{tcolorbox}
-
-
-\section{Examples}
-
-\begin{tcblisting}{enhanced,breakable,colback=white,colframe=black,width=\textwidth}
-    \osci[%
-        scale=0.8,
-        second channel=1,
-        screen offset one=2,
-        screen offset two=-2,
-        time div=20,
-        voltage div one=4,
-        voltage div two=1,
-        sample rate=200,
-        xy mode=0,
-        expr one=2*sin(2*180/0.020*x),
-        expr two=1*sin(2*180/0.020*x)+0.2*sin(2*180/0.040*x),
-        color one=D62626,
-        color two=1053AF,
-        color xy=2E8B73,
-        graph back color=669966,
-        info back color=D6D6D6,
-        info text color=000000,
-        main axis color=000000,
-        sub axis color=CCCCCC
-    ]
-    \end{tcblisting}
-
-% \begin{center}
-%     \osci[%
-%         scale=0.8,
-%         second channel=1,
-%         screen offset one=2,
-%         screen offset two=-2,
-%         time div=20,
-%         voltage div one=4,
-%         voltage div two=1,
-%         sample rate=200,
-%         xy mode=0,
-%         expr one=2*sin(2*180/0.020*x),
-%         expr two=1*sin(2*180/0.020*x)+0.2*sin(2*180/0.040*x),
-%         color one=D62626,
-%         color two=1053AF,
-%         color xy=2E8B73,
-%         graph back color=669966,
-%         info back color=D6D6D6,
-%         info text color=000000,
-%         main axis color=000000,
-%         sub axis color=CCCCCC
-%     ]
-% \end{center}
-
-\section{License}
-
-This package is distributed under the terms of the \textbf{LaTeX Project Public License} (LPPL), version 1.3c or later. The latest version of this license is available at \url{http://www.latex-project.org/lppl.txt}.
-
-\section{Credits}
-
-This package requires the following packages :
-\begin{itemize}
-    \item \texttt{xcolor} maintained by the \textit{LaTeX3 Project}  (license LPPL 1.3c) ;
-    \item tikz maintained by the \textit{TikZ and PGF Project} (license LPPL 1.3c) ;
-    \item pgfkeys maintained by the \textit{Till Tantau} (license LPPL) ;
-    \item pgfplots maintained by the \textit{Christian Feuersänger} (license LPPL).
-\end{itemize}
-
-\section{Changelog}
-
-\begin{itemize}
-    \item \textbf{0.1.0} : Initial release. XY mode not implemented yet.
-\end{itemize}
-
-\end{document}

Deleted: trunk/Master/texmf-dist/doc/latex/tikz-osci/example.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/tikz-osci/example.tex	2023-10-07 20:14:03 UTC (rev 68469)
+++ trunk/Master/texmf-dist/doc/latex/tikz-osci/example.tex	2023-10-07 20:14:30 UTC (rev 68470)
@@ -1,29 +0,0 @@
-\documentclass[11pt,a4paper,usenames,dvipsnames]{article}
-
-\usepackage{tikz-osci}
-
-\begin{document}
-
-\osci[%
-    scale=0.8,
-    second channel=1,
-    screen offset one=2,
-    screen offset two=-2,
-    time div=20,
-    voltage div one=4,
-    voltage div two=1,
-    sample rate=200,
-    xy mode=0,
-    expr one=2*sin(2*180/0.020*x),
-    expr two=1*sin(2*180/0.020*x)+0.2*sin(2*180/0.040*x),
-    color one=D62626,
-    color two=1053AF,
-    color xy=2E8B73,
-    graph back color=668866,
-    info back color=D6D6D6,
-    info text color=000000,
-    main axis color=000000,
-    sub axis color=CCCCCC,
-]
-
-\end{document}
\ No newline at end of file

Added: trunk/Master/texmf-dist/doc/latex/tikz-osci/tikz-osci-doc.pdf
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/latex/tikz-osci/tikz-osci-doc.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/tikz-osci/tikz-osci-doc.pdf	2023-10-07 20:14:03 UTC (rev 68469)
+++ trunk/Master/texmf-dist/doc/latex/tikz-osci/tikz-osci-doc.pdf	2023-10-07 20:14:30 UTC (rev 68470)

Property changes on: trunk/Master/texmf-dist/doc/latex/tikz-osci/tikz-osci-doc.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/tikz-osci/tikz-osci-doc.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/tikz-osci/tikz-osci-doc.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/tikz-osci/tikz-osci-doc.tex	2023-10-07 20:14:30 UTC (rev 68470)
@@ -0,0 +1,201 @@
+\documentclass[11pt,a4paper,usenames,dvipsnames]{article}
+
+
+
+\usepackage{../tikz-osci}
+\usepackage[left=2cm,right=2cm,top=2cm,bottom=2cm]{geometry}
+\usepackage[most]{tcolorbox}
+\usepackage{hyperref}
+\title{TikZ Oscilloscope Package}
+\author{Thibault Giauffret}
+\def\version{0.2.0}
+
+% Use sans serif font
+\renewcommand{\familydefault}{\sfdefault}
+
+% Remove paragraph indentation
+\setlength{\parindent}{0pt}
+
+% Listings
+\newtcblisting{listing}{
+    listing only,
+    hbox,
+    listing options={
+            basicstyle=\small\ttfamily,
+            breaklines=true,
+            columns=fullflexible
+        },
+}
+
+\begin{document}
+
+\begin{tcolorbox}
+    \begin{center}
+        \vspace{0.3cm}
+        {\huge \textbf{TikZ Oscilloscope Package}}\\[0.3cm]
+        {\Large Thibault Giauffret}\\[0.3cm]
+        \textit{Version \version\ of \today}
+        \vspace{0.3cm}
+    \end{center}
+\end{tcolorbox}
+
+\section{Introduction}
+
+\begin{minipage}{0.5\linewidth}
+    \begin{center}
+        \osci[%
+            scale=0.7
+        ]
+    \end{center}
+\end{minipage}
+\begin{minipage}{0.5\linewidth}
+    \begin{center}
+        \osci[%
+            scale=0.7,
+            rounded corners=0,
+            second channel=1,
+            screen offset one=2,
+            screen offset two=-2,
+            time div=20,
+            voltage div one=4,
+            voltage div two=1,
+            sample rate=200,
+            xy mode=0,
+            func one=2*sin(2*180/0.020*x),
+            func two=1*sin(2*180/0.020*x)+0.2*sin(2*180/0.040*x),
+            indicators=0,
+            color one=D62626,
+            color two=1053AF,
+            color xy=2E8B73,
+            graph back color=777799,
+            info back color=333333,
+            info text color=FFFFFF,
+            main axis color=DDDDDD,
+            grid color=CCCCCC,
+        ]
+    \end{center}
+\end{minipage}
+
+\vspace*{0.5cm}
+
+
+This package is modest alternative to the \texttt{pst-osci} package (not maintained anymore). It allows you to draw oscilloscope "screen shots" with \LaTeX{}, TikZ and pgfplots.\\
+
+Some features are not implemented yet, but the package is already usable for basic representations. I'm doing this for fun and still learning how to make \LaTeX{} packages. Therefore, I'm open to any suggestion or contribution :
+
+\begin{center}
+    \texttt{
+        contact at ensciences dot fr
+    }
+\end{center}
+
+A bug tracker is available at :
+\begin{center}
+    \url{https://framagit.org/ThibGiauffret/latex_packages/-/issues}.
+\end{center}
+
+Feel free to report any bug you find or send suggestions.\\
+
+\textbf{Important note :} Please indicate the concerned package name in the title of the issue. For example, if you want to report a bug about this package, please use the following title : \texttt{[tikz-osci] My bug report title}.
+
+\section{Usage}
+
+The package is loaded with the command \verb|\usepackage{tikz-osci}|. It defines a single command, \verb|\osci|, which takes a list of options as argument. The options allow you to configure and customize the oscilloscope screen view :
+
+\begin{tcolorbox}[enhanced,breakable,colback=white,colframe=black,width=\textwidth]
+    \begin{tabular}{lp{7cm}p{3cm}}
+        \texttt{scale}             & Scale of the oscilloscope (with \texttt{scalebox}).                                     & Default: \texttt{1}.                                             \\
+        \texttt{rounded corners}   & Radius of the oscilloscope corners (in pt).                                             & Default: \texttt{10}.                                            \\
+        \texttt{second channel}    & 1 if the second channel is enabled, 0 otherwise.                                        & Default: \texttt{0}.                                             \\
+        \texttt{screen offset one} & Vertical screen offset of the first channel.                                            & Default: \texttt{0}.                                             \\
+        \texttt{screen offset two} & Vertical screen offset of the second channel.                                           & Default: \texttt{0}.                                             \\
+        \texttt{time div}          & Time division (in ms).                                                                  & Default: \texttt{20}.                                            \\
+        \texttt{voltage div one}   & Voltage division of the first channel (in V).                                           & Default: \texttt{1}.                                             \\
+        \texttt{voltage div two}   & Voltage division of the second channel (in V).                                          & Default: \texttt{1}.                                             \\
+        \texttt{sample rate}       & Sample rate.                                                                            & Default: \texttt{200}.                                           \\
+        \texttt{xy mode}           & 1 if the oscilloscope is in XY mode, 0 otherwise. \textbf{\color{red}Not working yet !} & Default: 0.                                                      \\
+        \texttt{func one}          & Expression of the first channel (pgf maths format).                                     & Default: \texttt{2*sin(2*180/0.020*x)}.                          \\
+        \texttt{func two}          & Expression of the second channel (pgf maths format).                                    & Default: \texttt{1*sin(2*180/0.020*x) + 0.2*sin(2*180/0.040*x)}. \\
+        \texttt{indicators}        & 1 if the channel indicators are enabled, 0 otherwise.                                   & Default: \texttt{1}.                                             \\
+        \texttt{color one}         & Color of the first channel (in hexadecimal).                                            & Default: \texttt{D62626}.                                        \\
+        \texttt{color text one}    & Text color of the first channel (in hexadecimal).                                       & Default: \texttt{FFFFFF}.                                        \\
+        \texttt{color two}         & Color of the second channel (in hexadecimal).                                           & Default: \texttt{1053AF}.                                        \\
+        \texttt{color text two}    & Text color of the second channel (in hexadecimal).                                      & Default: \texttt{FFFFFF}.                                        \\
+        \texttt{color xy}          & Color of the XY mode (in hexadecimal).                                                  & Default: \texttt{2E8B73}.                                        \\
+        \texttt{color text xy}     & Text color of the XY mode (in hexadecimal).                                             & Default: \texttt{FFFFFF}.                                        \\
+        \texttt{graph back color}  & Background color of the graph (in hexadecimal).                                         & Default: \texttt{FFFFFF}.                                        \\
+        \texttt{info back color}   & Background color of the information box (in hexadecimal).                               & Default: \texttt{D6D6D6}.                                        \\
+        \texttt{info text color}   & Text color of the information box (in hexadecimal).                                     & Default: \texttt{000000}.                                        \\
+        \texttt{main axis color}   & Color of the main axis (in hexadecimal).                                                & Default: \texttt{000000}.                                        \\
+        \texttt{grid color}        & Color of the grid (in hexadecimal).                                                     & Default: \texttt{CCCCCC}.                                        \\
+    \end{tabular}
+\end{tcolorbox}
+
+
+A quick documentation in french is available here :
+
+\begin{center}
+    \url{https://www.ensciences.fr/read.php?article=1220}
+\end{center}
+
+\newpage
+
+\section{Examples}
+
+For more examples, see the \texttt{tikz-osci-example.tex} file.
+
+\begin{tcblisting}{enhanced,breakable,colback=white,colframe=black,width=\textwidth}
+    \osci[%
+        scale=0.8,
+        second channel=1,
+        screen offset one=2,
+        screen offset two=-2,
+        time div=20,
+        voltage div one=4,
+        voltage div two=1,
+        sample rate=200,
+        xy mode=0,
+        func one=2*sin(2*180/0.020*x),
+        func two=1*sin(2*180/0.020*x)+0.2*sin(2*180/0.040*x),
+        color one=D62626,
+        color two=1053AF,
+        color xy=2E8B73,
+        graph back color=669966,
+        info back color=D6D6D6,
+        info text color=000000,
+        main axis color=000000,
+        grid color=CCCCCC
+    ]
+\end{tcblisting}
+
+\section{License}
+
+This package is distributed under the terms of the \textbf{LaTeX Project Public License} (LPPL), version 1.3c or later. The latest version of this license is available at \url{http://www.latex-project.org/lppl.txt}.
+
+\section{Credits}
+
+This package requires the following packages :
+\begin{itemize}
+    \item \texttt{xcolor} maintained by the \textit{LaTeX3 Project}  (license LPPL 1.3c) ;
+    \item tikz maintained by the \textit{TikZ and PGF Project} (license LPPL 1.3c) ;
+    \item pgfkeys maintained by the \textit{Till Tantau} (license LPPL) ;
+    \item pgfplots maintained by the \textit{Christian Feuersänger} (license LPPL).
+\end{itemize}
+
+\section{Changelog}
+
+\begin{itemize}
+    \item \textbf{0.2.0} :
+          \subitem Added \texttt{color text one}, \texttt{color text two} and \texttt{color text xy} options.
+          \subitem Added \texttt{indicators} option.
+          \subitem Added \texttt{rounded corners} option.
+          \subitem Fixed the main axis color not being applied.
+          \subitem Reworded the documentation and the example file.
+    \item \textbf{0.1.1} :
+          \subitem Renamed \texttt{sub axis color} to \texttt{grid color}.
+          \subitem Renamed \texttt{expr one} and \texttt{expr two} to \texttt{func one} and \texttt{func two}.
+          \subitem Updated package files names.
+    \item \textbf{0.1.0} : Initial release. XY mode not implemented yet.
+\end{itemize}
+
+\end{document}


Property changes on: trunk/Master/texmf-dist/doc/latex/tikz-osci/tikz-osci-doc.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/tikz-osci/tikz-osci-example.pdf
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/latex/tikz-osci/tikz-osci-example.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/tikz-osci/tikz-osci-example.pdf	2023-10-07 20:14:03 UTC (rev 68469)
+++ trunk/Master/texmf-dist/doc/latex/tikz-osci/tikz-osci-example.pdf	2023-10-07 20:14:30 UTC (rev 68470)

Property changes on: trunk/Master/texmf-dist/doc/latex/tikz-osci/tikz-osci-example.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/tikz-osci/tikz-osci-example.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/tikz-osci/tikz-osci-example.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/tikz-osci/tikz-osci-example.tex	2023-10-07 20:14:30 UTC (rev 68470)
@@ -0,0 +1,71 @@
+\documentclass[11pt,a4paper,usenames,dvipsnames]{article}
+
+\usepackage{../tikz-osci}
+
+% Use sans serif font
+\renewcommand{\familydefault}{\sfdefault}
+
+\begin{document}
+
+\begin{center}
+
+    \osci[%
+        scale=0.7
+    ]
+
+    \vspace*{0.3cm}
+
+    \osci[%
+        scale=0.7,
+        rounded corners=5,
+        second channel=1,
+        screen offset one=2,
+        screen offset two=-2,
+        time div=20,
+        voltage div one=4,
+        voltage div two=1,
+        sample rate=200,
+        xy mode=0,
+        func one=2*sin(2*180/0.020*x),
+        func two=1*sin(2*180/0.020*x)+0.2*sin(2*180/0.040*x),
+        indicators=0,
+        color one=D62626,
+        color two=1053AF,
+        color xy=2E8B73,
+        graph back color=777799,
+        info back color=333333,
+        info text color=FFFFFF,
+        main axis color=DDDDDD,
+        grid color=CCCCCC,
+    ]
+
+    \vspace*{0.3cm}
+
+    \osci[%
+        scale=0.7,
+        rounded corners=0,
+        second channel=1,
+        screen offset one=2,
+        screen offset two=-2,
+        time div=20,
+        voltage div one=4,
+        voltage div two=10,
+        sample rate=200,
+        xy mode=0,
+        func one=2*sin(2*180/0.020*x),
+        func two=10*sin(2*180/0.010*x)+5*sin(2*180/0.020*x),
+        indicators=1,
+        color one=F0DE25,
+        color text one=000000,
+        color two=F0DE25,
+        color text two=000000,
+        graph back color=668866,
+        info back color=D6D6D6,
+        info text color=000000,
+        main axis color=000000,
+        grid color=CCCCCC,
+    ]
+
+\end{center}
+
+\end{document}
\ No newline at end of file


Property changes on: trunk/Master/texmf-dist/doc/latex/tikz-osci/tikz-osci-example.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/tex/latex/tikz-osci/tikz-osci.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/tikz-osci/tikz-osci.sty	2023-10-07 20:14:03 UTC (rev 68469)
+++ trunk/Master/texmf-dist/tex/latex/tikz-osci/tikz-osci.sty	2023-10-07 20:14:30 UTC (rev 68470)
@@ -1,8 +1,7 @@
 % -----------------------------------------------------------
 % This is TikZ Osci package
 %
-% It provides some macros to draw oscilloscope screen captures 
-% from math functions provided by the user.
+% It allows you to produce oscilloscope "screen shots".
 %
 % It is based on TikZ and pgfplots and is a replacement can-
 % didate to the pstricks pst-osci package which is not main-
@@ -9,14 +8,14 @@
 % tained anymore.
 %
 % Author: Thibault Giauffret
-% Date: 2013/10/06
-% Version: 0.1.0
+% Date: 2013/10/07
+% Version: 0.2.0
 % Licence : Released under the LaTeX Project Public License v1.3c or later, see http://www.latex-project.org/lppl.txtf
 % Not an expert... Just doing it for fun.
 % -----------------------------------------------------------
 
 \NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{tikz-osci}[2023/09/30 0.1.0 Tikz Osci package]
+\ProvidesPackage{tikz-osci}[2023/09/30 0.2.0 Tikz Osci package]
 
 % Required packages
 \RequirePackage[dvipsnames]{xcolor}
@@ -34,6 +33,8 @@
   /osci/.cd,
   scale/.store in=\scale,
   scale=1,
+  rounded corners/.store in=\roundedCorners,
+  rounded corners=10,
   second channel/.store in=\secondChannel,
   second channel=0,
   screen offset one/.store in=\screenOffsetOne,
@@ -50,16 +51,24 @@
   sample rate=200,
   xy mode/.store in=\xyMode,
   xy mode=0,
-  expr one/.store in=\exprOne,
-  expr one=2*sin(2*180/0.020*x),
-  expr two/.store in=\exprTwo,
-  expr two=0.6*sin(2*180/0.020*x)+0.2*sin(2*180/0.040*x),
+  func one/.store in=\funcOne,
+  func one=2*sin(2*180/0.020*x),
+  func two/.store in=\funcTwo,
+  func two=0.6*sin(2*180/0.020*x)+0.2*sin(2*180/0.040*x),
+  indicators/.store in=\indicators,
+  indicators=1,
   color one/.store in=\colorOne,
   color one=D62626,
+  color text one/.store in=\colorTextOne,
+  color text one=FFFFFF,
   color two/.store in=\colorTwo,
   color two=1053AF,
+  color text two/.store in=\colorTextTwo,
+  color text two=FFFFFF,
   color xy/.store in=\colorXY,
   color xy=2E8B73,
+  color text xy/.store in=\colorTextXY,
+  color text xy=FFFFFF,
   graph back color/.store in=\graphBackColor,
   graph back color=FFFFFF,
   info back color/.store in=\infoBackColor,
@@ -68,8 +77,8 @@
   info text color=000000,
   main axis color/.store in=\mainAxisColor,
   main axis color=000000,
-  sub axis color/.store in=\subAxisColor,
-  sub axis color=AAAAAA,
+  grid color/.store in=\gridColor,
+  grid color=AAAAAA,
 }
 
 % The main command
@@ -93,12 +102,15 @@
       \definecolor{infoBackColor}{HTML}{\infoBackColor}
       \definecolor{infoTextColor}{HTML}{\infoTextColor}
       \definecolor{mainAxisColor}{HTML}{\mainAxisColor}
-      \definecolor{subAxisColor}{HTML}{\subAxisColor}
+      \definecolor{gridColor}{HTML}{\gridColor}
+      \definecolor{colorTextOne}{HTML}{\colorTextOne}
+      \definecolor{colorTextTwo}{HTML}{\colorTextTwo}
+      \definecolor{colorTextXY}{HTML}{\colorTextXY}
 
       % Draw the info box
       \draw[black,thick, fill= infoBackColor]
       (0,0) --
-      ++(10,0) {[rounded corners=10] --
+      ++(10,0) {[rounded corners=\roundedCorners] --
         ++(0,-1.5) --
         ++(-10,0)} --
       cycle
@@ -109,13 +121,13 @@
 
       % Add voltage/div label for the first channel
       \draw[firstcolor,fill=firstcolor] (0.5,-0.15) rectangle (1.5,-0.6);
-      \draw (1,-0.1) node[anchor=north, color=white] {CH1};
+      \draw (1,-0.1) node[anchor=north, color=colorTextOne] {CH1};
       \draw (1,-0.75) node[anchor=north, color= infoTextColor] {\voltageDivOne\ V/div};
 
       % Add voltage/div label for the second channel
       \ifnum\secondChannel=1
         \draw[secondcolor,fill=secondcolor] (8.5,-0.15) rectangle (9.5,-0.6);
-        \draw (9,-0.1) node[anchor=north, color=white] {CH2};
+        \draw (9,-0.1) node[anchor=north, color=colorTextTwo]{CH2};
         \draw (9,-0.75) node[anchor=north, color= infoTextColor] {\voltageDivTwo\ V/div};
       \fi
 
@@ -128,7 +140,7 @@
       % Draw the oscilloscope screen border
       \draw[black,thick, fill= graphbackcolor]
       (0,0) --
-      ++(10,0) {[rounded corners=10] --
+      ++(10,0) {[rounded corners=\roundedCorners] --
         ++(0,8) --
         ++(-10,0)} --
       cycle
@@ -143,6 +155,7 @@
         \begin{axis}[xmin=-5*(\timeDiv/1000), xmax=5*(\timeDiv/1000), ymin=-4, ymax=4, xtick distance = \timeDiv/1000,
             axis x line=middle, axis y line=middle,
             axis line style={-},
+            color=mainAxisColor,
             % Draw major grid
             grid=both,
             xticklabels={,,},
@@ -151,7 +164,7 @@
             minor tick num=4,
             % Remove minor grid
             minor grid style={line width=0pt, draw=white, draw opacity=0},
-            major grid style={thick,dashed,draw=subAxisColor},
+            major grid style={thick,dashed,draw=gridColor},
             every major tick/.append style={very thick, major tick length=6pt, color=mainAxisColor},
             every minor tick/.append style={thick, minor tick length=4pt, color=mainAxisColor},
           ]
@@ -171,12 +184,12 @@
             % Draw each channel separately
             % First channel plot
             \addplot[color=firstcolor,very thick,domain=-5*(\timeDiv/1000):5*(\timeDiv/1000),
-              smooth, samples=\sampleRate]{(\exprOne)/\voltageDivOne+\screenOffsetOne};
+              smooth, samples=\sampleRate]{(\funcOne)/\voltageDivOne+\screenOffsetOne};
 
             % If the second channel is enabled, draw it
             \ifnum\secondChannel=1
               % Draw the second channel
-              \addplot[color=secondcolor,very thick,domain=-5*(\timeDiv/1000):5*(\timeDiv/1000), smooth, samples=\sampleRate]{(\exprTwo)/\voltageDivTwo+\screenOffsetTwo};
+              \addplot[color=secondcolor,very thick,domain=-5*(\timeDiv/1000):5*(\timeDiv/1000), smooth, samples=\sampleRate]{(\funcTwo)/\voltageDivTwo+\screenOffsetTwo};
             \fi
           \fi
 
@@ -183,14 +196,17 @@
         \end{axis}
 
         \ifnum\xyMode=0
-          % Draw the first channel's screen marker
-          \draw[firstcolor,fill=firstcolor] (0.4, \screenOffsetOne+4) -- (0, \screenOffsetOne+4+0.3) -- (0, \screenOffsetOne+4-0.3) -- cycle;
-          \draw (-0.04, \screenOffsetOne+4) node[anchor=west, color=white,font=\fontsize{8}{10}\selectfont] {1};
+          \ifnum\indicators=1
+            % Draw the first channel's screen marker
+            \draw[firstcolor,fill=firstcolor] (0.4, \screenOffsetOne+4) -- (0, \screenOffsetOne+4+0.3) -- (0, \screenOffsetOne+4-0.3) -- cycle;
+            \draw (-0.04, \screenOffsetOne+4) node[anchor=west, color=colorTextOne,font=\fontsize{8}{10}\selectfont] {1};
 
-          % Draw the second channel's screen marker
-          \ifnum\secondChannel=1
-            \draw[secondcolor,fill=secondcolor] (0.4, \screenOffsetTwo+4) -- (0, \screenOffsetTwo+4+0.3) -- (0, \screenOffsetTwo+4-0.3) -- cycle;
-            \draw (-0.04, \screenOffsetTwo+4) node[anchor=west, color=white,font=\fontsize{8}{10}\selectfont] {2};
+
+            % Draw the second channel's screen marker
+            \ifnum\secondChannel=1
+              \draw[secondcolor,fill=secondcolor] (0.4, \screenOffsetTwo+4) -- (0, \screenOffsetTwo+4+0.3) -- (0, \screenOffsetTwo+4-0.3) -- cycle;
+              \draw (-0.04, \screenOffsetTwo+4) node[anchor=west, color=colorTextTwo,font=\fontsize{8}{10}\selectfont] {2};
+            \fi
           \fi
         \fi
 



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