3

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.

6

The tikz-timing package.

The \texttiming{} macro does the trick! Documentation in above PDF

I used \texttiming{[-,timing/slope=0]HL} specifically.

enter image description here

  • a better answer for this exact problem, +1 – masu Dec 10 '13 at 8:42
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.

enter image description here

\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}
  • 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 8:35
  • @JohannesO is it a matter of taste or there are diffences in the output? – masu Dec 10 '13 at 8:41
  • 1
    A 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 9:13
  • 1
    Essential 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
  • 1
    All % but the one after { are not necessary, by the way. Instead of guessing a proper scale value you can directly use font-units em and ex to draw something that should scale with the text. – Qrrbrbirlbel Dec 10 '13 at 10:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.