在用latex做图片的时候发现问题没有很多,但是做表格的问题就非常多了,因此记录一下
首先导包需要
\usepackage{array} \usepackage{booktabs} \usepackage{caption} % 可有可无
讯享网
然后制作简单表格参考该处:
Latex基本表格绘制_爱摸鱼的派大星星-CSDN博客_latex表格
LaTeX 表格_yhl_leo-CSDN博客_latex如何表格
直接贴上较为复杂的表格,做了我好久-v-
讯享网\begin{table}[!] \caption{here is title.} \label{table1} \resizebox{0.5\textwidth}{!}{ %不放0.5\textwidth在我的pdf上会越界 \begin{tabular}{cp{0.8cm} cp{0.3cm} c p{0.2cm} c p{0.2cm} c p{0.4cm} cp{0.1cm} cp{0.5cm} cp{0.2cm} cp{0.3cm}} % c居中 要想设置列宽要p{} 我一开始直接{}就报错了 \toprule \textbf{a} & \textbf{b} & \textbf{C} & \textbf{D} & \textbf{E} & \textbf{S} & \textbf{F} & \textbf{G} & \textbf{H} \\ \toprule & 0 & 1024 & 256 & $1 \times 1$ & 1 & 0 & Y & Y \\ & 0 & 1024 & 256 & $1 \times 1$ & 1 & 0 & Y & Y \\ & 3 & 256 & 512 & $3 \times 3$ & 2 & 1 & Y & Y \\ & 6 & 512 & 128 & $1 \times 1$ & 1 & 0 & Y & Y \\ & 9 & 128 & 256 & $3 \times 3$ & 2 & 1 & Y & Y \\ Column & 12 & 256 & 128 & $1 \times 1$ & 1 & 0 & Y & Y \\ (aaaa) & 15 & 128 & 256 & $3 \times 3$ & 2 & 1 & Y & Y \\ & 18 & 256 & 128 & $1 \times 1$ & 1 & 0 & Y & Y \\ & 21 & 128 & 256 & $3 \times 3$ & 2 & 1 & Y & Y \\ & 24 & 256 & 128 & $1 \times 1$ & 1 & 0 & Y & Y \\ & 27 & 128 & 256 & $3 \times 3$ & 2 & 1 & Y & Y \\ & 30 & 256 & 128 & $1 \times 1$ & 1 & 0 & Y & Y \\ & 33 & 128 & 256 & $3 \times 3$ & 2 & 1 & Y & Y \\ \hline\hline % 双靠近的线 & 0 & 1024 & 256 & 2 & 1 & 0 & Y & Y \\ & 0 & 1040 & 512 & $1 \times 1$ & 1 & 0 & Y & Y \\ & 3 & 512 & 256 & $1 \times 1$ & 1 & 0 & Y & Y \\ Column & 6 & 256 & 128 & $1 \times 1$ & 1 & 0 & Y & Y \\ (bbbbb) & 9 & 128 & 64 & $1 \times 1$ & 1 & 0 & N & Y \\ & 11 & 64 & 1 & $1 \times 1$ & 1 & 0 & N & Y \\ \end{tabular}} % 注意resizebox的括号和在label和caption下面 否则报错 \end{table}
推荐一个识别图片直接出latex文本
在线LaTeX公式编辑器-编辑器
遇到的错误:
- ! Package array Error: Illegal pream-token (\hsize): `c' used. 因为没有加上p{3cm}
- latex 让一图只占一半页面
- ! You can't use `\hrule' here except with leaders.
-
resizebox的位置应该在label和\caption下面 (好像是因为这个)
-
-
Package graphics Error: Division by 0.
-

resizebox的位置应该在label和\caption下面 (好像是因为这个)
-
- ! File ended while scanning use of \@newl@bel
- 控制台用q退出 不要强制关闭

-
! Missing $ inserted. <inserted text> $ l.798 \begin{array
- 有公式没有加$ 如 \text {} \times
- 放图片出现的问题 LaTeX Error: Cannot determine size of graphic in (no B oundingBox).
- Latex编译过程中遇到的奇奇怪怪的问题及解决方案_你若盛开,清风自来-CSDN博客
以及这个错误Latex error: .bb file not found
。。。。

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容,请联系我们,一经查实,本站将立刻删除。
如需转载请保留出处:https://51itzy.com/kjqy/31596.html