【Latex常见问题总结】
1. 非数学符号如max/min将下标放到正下方,这个问题折腾了很久, 下标不在正下方会带俩两个问题,一是有时候不够美观,二是会使得数学公式过长越界,需要换行.
解决方案:将符号转换为数学符号, \mathop{符号}
\[ \mathop{min}_G \mathop{max}_D V (D,G) = E_{x\sim P_{data}}[logD(x)] + E_{x\sim p_x(z)}[log(1 - D(G(z)))] \]
效果:
\[
\mathop{min}_G \mathop{max}_D V (D,G) = E_{x\sim P_{data}}[logD(x)] + E_{x\sim p_x(z)}[log(1 - D(G(z)))]
\]
2. 公式过长,需要换行,然而换行会带来不美观的问题:符号之间加入 \!
\[ \mathop{min}_G \! \mathop{max}_D \! V\! (D,\! G) \! = \! E_{x\sim \! P_{data}}[logD(x)] \! + \! E_{x\sim p_x(z)}[log(1 \! - \!D(G(z)))] \]
效果:
\[
\mathop{min}_G \! \mathop{max}_D \! V\! (D,\! G) \! = \! E_{x\sim \! P_{data}}[logD(x)] \! + \! E_{x\sim p_x(z)}[log(1 \! - \!D(G(z)))]
\]
3. 表格线需要加粗,这个问题也弄了很久,一直没有找到较好的解决方案
自己指定表格线任意指定宽度:
\makeatletter \def\hlinew#1{% \noalign{\ifnum0=`}\fi\hrule \@height #1 \futurelet \reserved@a\@xhline} \makeatother%在正文中的用法为 \hlinewd{0.75pt} 等等 %不过上面的命令\hlinewd不能与longtable正常工作
使用示例:
\begin{table} \renewcommand\arraystretch{2} \caption{Face Description} \begin{tabular*}{9cm}{cc} \hlinew{2pt} Part & Shape \\ \hlinew{1.5pt} Face & Oval/Oblong/Round/Rectangular/Square/\\ & Triangular/Inverted/Triangle/Diamond \\ \hline Eyes & Big/Small/Medium Wide/Narrow/Normal \\ \hline Eyebrows & Dense/Sparse Thick/Thin Flat/Arched/Up/Down \\ \hline Nose & Big/Medium/Small Roman/Normal/Short \\ \hline Mouth & Thick/Thin Wide/Narrow \\ \hline Ears & Small/Normal/Big \\ \hline \end{tabular*} \end{table}
效果: