LaTeX - 同一列表中的两列?
我正在尝试实现以下目标,但间距没有问题。
该图像是我想要实现的,但没有间距问题:
目前它只是一个带选项卡的正常列表。
我想通过引入两列来避免制表符。这可能吗?
当前代码:
\begin{lstlisting}[caption=Elements of time in the background knowledge, label=btime]
year(Y):- hour(H):-
Y in 2000..2011. H in 0..23.
month(M):- minute(M):-
M in 1..12. M in 0..59.
day_of_month(D):- seconds(S):-
D in 1..31. minute(S).
date([D, M, Y]):- time([H,M]):-
year(Y), hour(H),
month(M), minute(M).
day_of_month(D).
\end{lstlisting}
I'm trying to achieve the following but with no problems in spacing.
The image is what I'm trying to achieve but without the spacing problems :
At the moment it's just a normal listing with tabbing.
I want to avoid tabbing by introducing two columns. Is that possible?
Current code:
\begin{lstlisting}[caption=Elements of time in the background knowledge, label=btime]
year(Y):- hour(H):-
Y in 2000..2011. H in 0..23.
month(M):- minute(M):-
M in 1..12. M in 0..59.
day_of_month(D):- seconds(S):-
D in 1..31. minute(S).
date([D, M, Y]):- time([H,M]):-
year(Y), hour(H),
month(M), minute(M).
day_of_month(D).
\end{lstlisting}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
像这样的东西(结果看起来像 THIS)?
p{Xcm}
以获得所需的列距\hspace{Xmm}
以获得所需的缩进\quad
或\qquad
,但这对您来说可能还不够Something like this (result looks like THIS)?
p{Xcm}
to get the column distance you want\hspace{Xmm}
to get the indentation you want\quad
or\qquad
, though that might not be enough for you