我有一个来自终端的 SQL 表,我希望能够在 LaTeX 报告中“按原样”复制它。这将帮助读者看得更清楚,也更容易复制粘贴。表格看起来像这样:
+-----------+----------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-----------+----------+------+-----+---------+-------+
| Name | char(16) | NO | | NULL | |
| RA | float | NO | | NULL | |
| DE | float | NO | | NULL | |
+-----------+----------+------+-----+---------+-------+
\documentclass{article}
\begin{document}
\begin{verbatim}
+-----------+----------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-----------+----------+------+-----+---------+-------+
| Name | char(16) | NO | | NULL | |
| RA | float | NO | | NULL | |
| DE | float | NO | | NULL | |
+-----------+----------+------+-----+---------+-------+
\end{verbatim}
\end{document}