Does anyone know how to create an edge-trigger symbol in LaTeX? I need to to show that some thing activates on the negative clock edge of a signal, but in a paragraph, not in a timing table.
Asked
Active
Viewed 1,882 times
3
-
Welcome to TeX.SX! You don't have to sign with your name since it automatically appears in the lower right corner of your post. It'll be helpful to post an image (or a link thereto, since you haven't had image posting privilege yet) of the edge-trigger symbol you referred to. – Herr K. Dec 10 '13 at 00:01
-
I actually just figured it out, but I can't post the answer yet... – EthanSpitz Dec 10 '13 at 00:12
2 Answers
7
The tikz-timing package.
The \texttiming{} macro does the trick! Documentation in above PDF
I used \texttiming{[-,timing/slope=0]HL} specifically.

Mico
- 506,678
EthanSpitz
- 193
2
I didn't find a symbol like that, but this can get you started. This solution adapts to the actual line height (\baselineskip). So doesn't really matter if you change the font size.

\documentclass{article}
\usepackage{tikz}
\newcommand\net{%
\begin{tikzpicture}[scale=0.3\baselineskip/18pt]
\draw (0,1) -- (1,1) -- (1,0) -- (2,0);
\end{tikzpicture}%
}
\newcommand\netp{%
\begin{tikzpicture}[scale=0.3\baselineskip/18pt]
\draw (0,1) -- (1,1) -- (1,0) -- (2,0) -- (2,1) -- (3,1);
\end{tikzpicture}%
}
\begin{document}
Some text. Some text. Some text. Some text. Some text. Some text. Some text. Some text. Some text. Some text. Some text. Some text. Some text. Some text. Some text. Some text. Some text. Some text. Some text. Negative edge trigger here \net\ and \netp\ and some text after. Some text. Some text. Some text. Some text. Some text. Some text. Some text. Some text. Some text. Some text. Some text. Some text. Some text. Some text. Some text. Some text. Some text. Some text. Some text. Some text. Some text. Some text. Some text.
\end{document}
masu
- 6,571
-
Just as a small comment. The cleaner way to end a command like this is to use a backslash instead of the tilde. 'Negative edge trigger here \net\ and \netp' and if you don't want a space after it use {} – Ulle Dec 10 '13 at 08:35
-
-
1A tilde gives you a non breakable space (tie two words together) and should be used in cases when things shouldn't be broken for example Dr.~Mustermann or a Figure~\ref{} that the number of the figure won't end up in the next line. So it is a misuse if you take the tilde to end the command to force a space. Also the space generated by the tilde is not stretchable and a tilde followed by a space would generate two spaces. – Ulle Dec 10 '13 at 09:13
-
@JohannesO thanks for the heads up. This happens when someone learns LaTeX from codes written by non-experienced users... – masu Dec 10 '13 at 09:45
-
1Essential guide to Latex2e usage this is a small document with helpful advices for a clean usage of commands and packages. Maybe it is interesting for you. Also avaiable in other languages. – Ulle Dec 10 '13 at 10:01
-
1All
%but the one after{are not necessary, by the way. Instead of guessing a properscalevalue you can directly use font-unitsemandexto draw something that should scale with the text. – Qrrbrbirlbel Dec 10 '13 at 10:19 -
@Qrrbrbirlbel And which one should I use?
emis a width, andexis a height of a lowercase letter... – masu Dec 10 '13 at 10:38 -
@Qrrbrbirlbel I think
\baselineskipis exactly the length I should use there. I could've put the0.3/18ptin the coordinate fields, but it's better this way. – masu Dec 10 '13 at 14:51