summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2023-10-24 20:22:15 +0000
committerKarl Berry <karl@freefriends.org>2023-10-24 20:22:15 +0000
commiteef8e7b7bd0935f0ba05af04c5445281190991af (patch)
treed9767c4e3d31de2311de5361bea52c9775cdd0a3 /Master/texmf-dist/doc/latex
parent9f10d3429e784de5696a87bdbbd0e2b867956c7c (diff)
tikz-osci (24oct23)
git-svn-id: svn://tug.org/texlive/trunk@68636 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex')
-rw-r--r--Master/texmf-dist/doc/latex/tikz-osci/tikz-osci-doc.pdfbin154401 -> 178335 bytes
-rw-r--r--Master/texmf-dist/doc/latex/tikz-osci/tikz-osci-doc.tex214
-rw-r--r--Master/texmf-dist/doc/latex/tikz-osci/tikz-osci-example.pdfbin137767 -> 114395 bytes
-rw-r--r--Master/texmf-dist/doc/latex/tikz-osci/tikz-osci-example.tex30
4 files changed, 168 insertions, 76 deletions
diff --git a/Master/texmf-dist/doc/latex/tikz-osci/tikz-osci-doc.pdf b/Master/texmf-dist/doc/latex/tikz-osci/tikz-osci-doc.pdf
index 3d35f6a3534..83f2438d7f1 100644
--- a/Master/texmf-dist/doc/latex/tikz-osci/tikz-osci-doc.pdf
+++ b/Master/texmf-dist/doc/latex/tikz-osci/tikz-osci-doc.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/tikz-osci/tikz-osci-doc.tex b/Master/texmf-dist/doc/latex/tikz-osci/tikz-osci-doc.tex
index 0449e3cfd6c..35088179cf1 100644
--- a/Master/texmf-dist/doc/latex/tikz-osci/tikz-osci-doc.tex
+++ b/Master/texmf-dist/doc/latex/tikz-osci/tikz-osci-doc.tex
@@ -8,7 +8,7 @@
\usepackage{hyperref}
\title{TikZ Oscilloscope Package}
\author{Thibault Giauffret}
-\def\version{0.3.0}
+\def\version{0.4.0}
% Use sans serif font
\renewcommand{\familydefault}{\sfdefault}
@@ -34,7 +34,7 @@
\vspace{0.3cm}
{\huge \textbf{TikZ Oscilloscope Package}}\\[0.3cm]
{\Large Thibault Giauffret}\\[0.3cm]
- \textit{Version \version\ of \today}
+ \textit{Version \version\ of \today}\\[0.3cm]
\vspace{0.3cm}
\end{center}
\end{tcolorbox}
@@ -44,7 +44,11 @@
\begin{minipage}{0.5\linewidth}
\begin{center}
\osci[%
- scale=0.7
+ scale=0.7,
+ sample rate=500,
+ func one=1.78*sin(2*180/0.020*x),
+ horizontal cursor one=-1.78,
+ horizontal cursor two=1.78,
]
\end{center}
\end{minipage}
@@ -52,21 +56,22 @@
\begin{center}
\osci[%
scale=0.7,
- rounded corners=0,
second channel=1,
screen offset one=2,
screen offset two=-2,
- time div=20,
+ time div=10,
voltage div one=4,
voltage div two=1,
- sample rate=200,
+ sample rate=400,
xy mode=0,
- func one=2*sin(2*180/0.020*x),
+ func one=(sin(2*180*x/0.02)>0?6:-6),
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,
- graph back color=777799,
+ color one=FAC356,
+ color two=C18FFA,
+ color text one = 000000,
+ color text two = 000000,
+ graph back color=3C4A66,
info back color=333333,
info text color=FFFFFF,
main axis color=DDDDDD,
@@ -116,23 +121,40 @@ The package is loaded with the command \verb|\usepackage{tikz-osci}|. It defines
\texttt{voltage div one} & Voltage division of the first channel (in V). & Default: \texttt{1} \\\hline
\texttt{voltage div two} & Voltage division of the second channel (in V). & Default: \texttt{1} \\\hline
\texttt{sample rate} & Sample rate. & Default: \texttt{200} \\\hline
- \texttt{xy mode} & 1 if the oscilloscope is in XY mode (Lissajou curve), 0 otherwise. & Default : 0 \\\hline
+ \texttt{xy mode} & 1 if the oscilloscope is in XY mode (Lissajous curve), 0 otherwise. & Default : 0 \\\hline
\texttt{math mode} & 1 for addition, 2 for subtraction, 3 for multiplication, 4 for division, 0 otherwise. xy mode option must be set to 0. & Default: \texttt{0} \\\hline
\texttt{math mode hide source} & 0 to display channels CH1 and CH2 with the third channel, 1 to hide them. & Default : \texttt{0} \\\hline
\texttt{func one} & Expression of the first channel (pgf maths format). Trigonometric functions are defined in degrees. & Default: \texttt{2*sin(2*180/0.020*x)} \\\hline
\texttt{func two} & Expression of the second channel (pgf maths format). Trigonometric functions are defined in degrees. & Default: \texttt{1*sin(2*180/0.020*x) + 0.2*sin(2*180/0.040*x)} \\\hline
\texttt{indicators} & 1 if the channel indicators are enabled, 0 otherwise. & Default: \texttt{1} \\\hline
+ \texttt{horizontal cursor one} & Horizontal position of the first cursor (between -4 and 4). \texttt{false} to disable. & Default: \texttt{false} \\\hline
+ \texttt{horizontal cursor two} & Horizontal position of the second cursor (between -4 and 4). \texttt{false} to disable. & Default: \texttt{false} \\\hline
+ \texttt{vertical cursor one} & Vertical position of the first cursor (between -4 and 4). \texttt{false} to disable. & Default: \texttt{false} \\\hline
+ \texttt{vertical cursor two} & Vertical position of the second cursor (between -4 and 4). \texttt{false} to disable. & Default: \texttt{false} \\\hline
+ \texttt{cursor precision} & Number of digits after the decimal point for the cursor values. & Default: \texttt{1} \\\hline
\texttt{color one} & Color of the first channel (in hexadecimal). & Default: \texttt{D62626} \\\hline
\texttt{color text one} & Text color of the first channel (in hexadecimal). & Default: \texttt{FFFFFF} \\\hline
\texttt{color two} & Color of the second channel (in hexadecimal). & Default: \texttt{1053AF} \\\hline
\texttt{color text two} & Text color of the second channel (in hexadecimal). & Default: \texttt{FFFFFF} \\\hline
- \texttt{color three} & Color of the XY mode and the math mode (in hexadecimal). & Default: \texttt{2E8B73} \\\hline
- \texttt{color text three} & Text color of the XY mode and the math mode (in hexadecimal). & Default: \texttt{FFFFFF} \\\hline
+ \texttt{color three} & Color of the XY mode and the math mode (in hexadecimal). & Default: \texttt{2E8B73} \\\hline
+ \texttt{color text three} & Text color of the XY mode and the math mode (in hexadecimal). & Default: \texttt{FFFFFF} \\\hline
\texttt{graph back color} & Background color of the graph (in hexadecimal). & Default: \texttt{FFFFFF} \\\hline
\texttt{info back color} & Background color of the information box (in hexadecimal). & Default: \texttt{D6D6D6} \\\hline
\texttt{info text color} & Text color of the information box (in hexadecimal). & Default: \texttt{000000} \\\hline
\texttt{main axis color} & Color of the main axis (in hexadecimal). & Default: \texttt{000000} \\\hline
- \texttt{grid color} & Color of the grid (in hexadecimal). & Default: \texttt{CCCCCC} \\
+ \texttt{grid color} & Color of the grid (in hexadecimal). & Default: \texttt{CCCCCC}
+ \end{tabular}
+\end{tcolorbox}
+
+
+\begin{tcolorbox}[enhanced,breakable,colback=white,colframe=black,width=\textwidth,left=0mm,right=0mm,top=0mm,bottom=0mm,boxsep=0mm]
+ \begin{tabular}{p{0.2\textwidth}|p{0.47\textwidth}|p{0.255\textwidth}}
+
+ \texttt{horizontal cursor color} & Color of the horizontal cursor (in hexadecimal). & Default: \texttt{FFA500} \\\hline
+ \texttt{vertical cursor color} & Color of the vertical cursor (in hexadecimal). & Default: \texttt{800080}\\\hline
+ \texttt{smooth one} & 1 to smooth the first channel, 0 otherwise. & Default: \texttt{0}\\\hline
+ \texttt{smooth two} & 1 to smooth the second channel, 0 otherwise. & Default: \texttt{0}\\\hline
+ \texttt{smooth three} & 1 to smooth the third channel, 0 otherwise. & Default: \texttt{0}
\end{tabular}
\end{tcolorbox}
@@ -143,78 +165,114 @@ A quick documentation in french is available here :
\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,colback=white,colframe=black,width=\textwidth, title=\bfseries Two channels plot with custom background color, sidebyside}
- \osci[%
- scale=0.7,
- 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,
- graph back color=669966,
- info back color=D6D6D6,
- info text color=000000,
- main axis color=000000,
- grid color=CCCCCC
- ]
+\osci[%
+ scale=0.7,
+ 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,
+ graph back color=669966,
+ info back color=D6D6D6,
+ grid color=CCCCCC
+]
\end{tcblisting}
-\begin{tcblisting}{enhanced,colback=white,colframe=black,width=\textwidth, title=\bfseries Lissajou curve (XY mode) and no rounded corner, sidebyside}
- \osci[%
- scale=0.7,
- rounded corners=0,
- second channel=1,
- time div=300,
- voltage div one=1,
- voltage div two=0.5,
- sample rate=500,
- xy mode=1,
- func one=sin(7*x),
- func two=sin(2*x),
- indicators=1,
- graph back color=FFFFFF,
- info back color=D6D6D6,
- info text color=000000,
- main axis color=000000,
- grid color=CCCCCC,
- ]
+\begin{tcblisting}{enhanced,colback=white,colframe=black,width=\textwidth, title=\bfseries Lissajous curve (XY mode) and no rounded corner, sidebyside}
+\osci[%
+ scale=0.7,
+ rounded corners=0,
+ second channel=1,
+ time div=300,
+ voltage div one=1,
+ voltage div two=0.5,
+ sample rate=500,
+ xy mode=1,
+ func one=sin(7*x),
+ func two=sin(2*x),
+ indicators=1,
+ graph back color=FFFFFF,
+ info back color=D6D6D6,
+ info text color=000000,
+ main axis color=000000,
+ grid color=CCCCCC,
+]
\end{tcblisting}
\begin{tcblisting}{enhanced,colback=white,colframe=black,width=\textwidth, title=\bfseries Math mode (multiply) with hidden sources and dark mode, sidebyside}
- \osci[%
- scale=0.7,
- second channel=1,
- time div=10,
- voltage div one=2,
- voltage div two=2,
- sample rate=500,
- xy mode=0,
- math mode=3,
- math mode hide source=1,
- func one=2*sin(2*180/0.040*x),
- func two=3*sin(2*180/0.005*x),
- indicators=0,
- color three=F0DE25,
- color text three=000000,
- graph back color=777799,
- info back color=333333,
- info text color=FFFFFF,
- main axis color=DDDDDD,
- grid color=CCCCCC,
- ]
+\osci[%
+ scale=0.7,
+ second channel=1,
+ time div=10,
+ voltage div one=2,
+ voltage div two=2,
+ sample rate=500,
+ xy mode=0,
+ math mode=3,
+ math mode hide source=1,
+ func one=2*sin(2*180/0.040*x),
+ func two=3*sin(2*180/0.005*x),
+ indicators=0,
+ color three=F0DE25,
+ color text three=000000,
+ graph back color=777799,
+ info back color=333333,
+ info text color=FFFFFF,
+ main axis color=DDDDDD,
+ grid color=CCCCCC,
+]
+\end{tcblisting}
+
+\begin{tcblisting}{enhanced,colback=white,colframe=black,width=\textwidth, title=\bfseries Common periodic signals,sidebyside}
+% Square wave function
+\pgfmathdeclarefunction{square}{4}{%
+\pgfmathparse{(sin(2*180*x/#2+#4) + #3>0?#1:-#1)}%
+}
+
+% Triangle wave function
+\pgfmathdeclarefunction{triangle}{4}{%
+\pgfmathparse{#1*asin(sin(2*180/#2*x + #4))/90}%
+}
+
+\osci[%
+ scale=0.7,
+ second channel=1,
+ sample rate=1000,
+ time div=100,
+ func one={triangle(2,0.2,0,0)},
+ func two={square(2,0.2,0,0)},
+ smooth one = 1,
+ smooth two = 0,
+]
+\end{tcblisting}
+
+\begin{tcblisting}{enhanced,colback=white,colframe=black,width=\textwidth, title=\bfseries Vertical and horizontal cursors (values displayed with two digits),sidebyside}
+\osci[%
+ scale=0.7,
+ second channel=0,
+ time div=100,
+ voltage div one=1,
+ sample rate=200,
+ func one={sin(2*180*x)},
+ vertical cursor one=-2.5,
+ vertical cursor two=2.5,
+ horizontal cursor one=1,
+ horizontal cursor two=-1,
+ cursor precision=2
+]
\end{tcblisting}
\section{License}
@@ -234,8 +292,12 @@ This package requires the following packages :
\section{Changelog}
\begin{itemize}
+ \item \textbf{0.4.0} (2023/10/24) :
+ \subitem Added cursor and smooth options.
+ \subitem Added square and triangle plot examples.
+ \subitem Fixed the pgf keys declaration.
\item \textbf{0.3.0} (2023/10/08) :
- \subitem Implemented XY mode and math (add, subtract, multiply, divide) functionality.
+ \subitem Implemented XY mode and math (add, subtract, multiply, divide) functionalities.
\item \textbf{0.2.0} (2023/10/07) :
\subitem Added \texttt{color text one}, \texttt{color text two} and \texttt{color text xy} options.
\subitem Added \texttt{indicators} option.
diff --git a/Master/texmf-dist/doc/latex/tikz-osci/tikz-osci-example.pdf b/Master/texmf-dist/doc/latex/tikz-osci/tikz-osci-example.pdf
index 0d698a8bf1e..e10955a70d5 100644
--- a/Master/texmf-dist/doc/latex/tikz-osci/tikz-osci-example.pdf
+++ b/Master/texmf-dist/doc/latex/tikz-osci/tikz-osci-example.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/tikz-osci/tikz-osci-example.tex b/Master/texmf-dist/doc/latex/tikz-osci/tikz-osci-example.tex
index 182ef488ed4..c1924ae7365 100644
--- a/Master/texmf-dist/doc/latex/tikz-osci/tikz-osci-example.tex
+++ b/Master/texmf-dist/doc/latex/tikz-osci/tikz-osci-example.tex
@@ -156,6 +156,36 @@
grid color=CCCCCC,
]
+ \vspace*{0.3cm}
+
+
+ % Square wave function
+ \pgfmathdeclarefunction{square}{4}{%
+ \pgfmathparse{(sin(2*180*x/#2+#4)+#3>0?#1:-#1)}%
+ }
+
+ % Triangle wave function
+ \pgfmathdeclarefunction{triangle}{4}{%
+ \pgfmathparse{#1*asin(sin(2*180/#2*x+#4))/90}%
+ }
+
+ \osci[%
+ scale=0.7,
+ second channel=1,
+ time div=50,
+ voltage div one=1,
+ voltage div two=1,
+ sample rate=1000,
+ func one={triangle(2,0.2,0,0)},
+ func two={square(2,0.2,0,-60)},
+ smooth one = 1,
+ smooth two = 0,
+ vertical cursor one = 2,
+ vertical cursor two = 2.67,
+ cursor precision = 1
+ ]
+
+
\end{center}