我决定对 tikztimingtable 进行一点尝试,但我不确定我是否“喜欢”信号标签中使用的字体
[font=\rmfamily]
所以我尝试通过在第一个标签前面添加 来更改它。然而这导致信号被移位(见下图)
如您所见,信号不再达到 t_10。代码如下。是否可以将字体更改为罗马字体?
\begin{tikztimingtable}
handshake\_out\_RPi & [thin] 3L 6H 6L 9H 6L\\
data\_out\_RPi & [thin] 3Z[black] 6D 6Z[black] 9D 6Z[black]\\
handshake\_out\_UR5 & [thin] 6L 6H 9L 6H 3L\\
\extracode
\begin{pgfonlayer}{background}
\vertlines[help lines, dotted]{0,3,...,30}
\foreach \i [count=\col from 0] in {0,3,...,30}
\node[font=\scriptsize] at (\i,3) {$t_{\col}$};
\end{pgfonlayer}
\end{tikztimingtable}%
并采用罗马系列字体:
\begin{tikztimingtable}
[font = \rmfamily] handshake\_out\_RPi & [thin] 3L 6H 6L 9H 6L\\
data\_out\_RPi & [thin] 3Z[black] 6D 6Z[black] 9D 6Z[black]\\
handshake\_out\_UR5 & [thin] 6L 6H 9L 6H 3L\\
\extracode
\begin{pgfonlayer}{background}
\vertlines[help lines, dotted]{0,3,...,30}
\foreach \i [count=\col from 0] in {0,3,...,30}
\node[font=\scriptsize] at (\i,3) {$t_{\col}$};
\end{pgfonlayer}
\end{tikztimingtable}%
答案1
正如 Sigur 所建议的,这是我的问题的答案:
\begin{tikztimingtable}[yscale=1.5]
\texttt{Handshake out RPi} & [thin] 4L 8H 8L 12H 8L\\
\texttt{Data out RPi} & [thin] 4Z[black] 8D 8Z[black] 12D 8Z[black]\\
\texttt{Handshake out UR5} & [thin] 8L 8H 12L 8H 4L\\
%\textsf{•}
\extracode
\begin{pgfonlayer}{background}
\vertlines[help lines, dotted]{0,4,...,40}
\foreach \i [count=\col from 0] in {0,4,...,40}
\node[font=\scriptsize] at (\i,2) {$t_{\col}$};
\end{pgfonlayer}
\end{tikztimingtable}%
其中 yscale 选项会增加信号的高度。所以现在看起来很漂亮: