1. The use of absolute value symbols
Today when using Latex to write formulas using absolute value symbols, a problem occurred.
The formula to be written is as follows and
the code is as follows
L_{
t v}=\frac{
1}{
W H}\left(\sum_{
i=1}^{
W}\left|\nabla_{
x} G\left(\left(I_{
i r}\right)_{
i}\right)\right|+\sum_{
j=1}^{
H}\left|\nabla_{
y} G\left(\left(I_{
i r}\right)_{
j}\right)\right|\right)
The result is
a huge error that requires the
\left| \right|
changed to
\lvert| \rvert|
(Some people say that using vert directly is also easy to use, but I haven’t tried it)
2. Solve the problem of too wide or too narrow a table
Method 1: Adaptively adjust the width
\resizebox{
\linewidth}{
!}{
#此处!表示根据根据宽高比进行自适应缩放
\begin{
tabular}...
....
....
\end{
tabular}
}
Method 2: Manually adjust the width
\resizebox{
\textwidth}{
15mm}{
%15可随机设置,调整到适合自己的大小为止
\begin{
tabular}...
....
....
\end{
tabular}
}