@mico 的建议:OP 指定该表格应由 MathJax 生成,这与本网站的主题无关。不过,我建议重新打开这个帖子,提出如何使用 (pdf)LaTeX 生成此表格的问题。此表具有足够的格式相关方面,可能会有一个或多个解决方案引起未来读者的兴趣。
我做了下表:
您可能已经看到了,它太长了……或者太宽了,或者其他什么的。
$$\begin{array}
{|c|c|c|c|c|} \hline & \text{Equality} & eq(x,y): & \mathbb{R}\times\mathbb{R}\to\mathbb{B} & 1-|\operatorname{sgn}(x-y)| \\
\hline & \text{Digit At} & dat(x,b,i): & \mathbb{R}\times\mathbb{N}\times\mathbb{Z}\to\mathbb{N} & \left\lfloor\frac{|x|}{b^i}\right\rfloor\mod b \\
\hline & \text{Number of Digits} & nd(x,b): & \mathbb{N}\times\mathbb{N}\to\mathbb{N} & \lceil\log_b(x+1)\rceil \\
\hline & \text{Reverse} & rev(x,b): & \mathbb{N}\times\mathbb{N}\to\mathbb{N} & \sum_{i=0}^{nd(x,b)-1}dat(x,b,I)\cdot10^{nd(x,b)-i-1} \\
\hline & \text{Sum Digits} & sd(x,b): & \mathbb{N}\times\mathbb{N}\to\mathbb{N} & \sum_{i=0}^{nd(x,b)-1}dat(x,b,i)\\
\hline & \text{Look and Say Counter} & C_\lambda(x,i): & \mathbb{N}\times\mathbb{N}\to\mathbb{N} & sd(x\mod10^i,10) \\
\hline & \text{Unpadded Difference} & \delta(x): & \mathbb{N}\to\mathbb{N} & \sum_{i=0}^{nd(x,10)-2}10^i\cdot(1-eq(dat(x,10,i),dat(x,10,i+1))) \\
\hline & \text{Padded Difference} & \Delta(x): & \mathbb{N}\to\mathbb{N} & 10^{nd(x,10)}+10\cdot\delta(x)+1 \\
\hline & \text{Leftmost Index} & il(x,i): & \mathbb{N}\times\mathbb{Z}\to\mathbb{Z} & nd(x\mod10^{i+1},10)-1 \\
\hline & \text{Rightmost Index} & ir(x,i): & \mathbb{N}\times\mathbb{Z}\to\mathbb{Z} & nd(x,10)-nd\left(rev\left(\left\lfloor\frac{x}{10^{i+1}}\right\rfloor,10\right),10\right) \\
\hline & \text{Look and Say} & L(x): & \mathbb{N}\to\mathbb{N} & \sum_{i=0}^{nd(\Delta(x),10)-2}\left(dat(\Delta(x),10,i)\cdot\left(\left(ir(\Delta(x),i)-i\right)\cdot10^{1+2\cdot C_\lambda(\Delta(x),i)}+dat(x,10,i)\cdot10^{2\cdot C_\lambda(\Delta(x),i)}\right)\right)
\end{array}$$
我可以让它更合适吗?也许为每个部分设置一个最大宽度,当达到限制尺寸时,它会向下弯曲?
编辑:
我发现我们可以使用/tiny 或 /small,但这样做会降低可读性,但我仍然希望如此。
答案1
您可以让您的表格适合以下方向的边距landscape
:
\documentclass{article}
\usepackage[utf8]{inputenc}%
\usepackage[T1]{fontenc}
\usepackage[a4paper]{geometry}%
\usepackage{lscape}%
\usepackage{mathtools, amsfonts}
\DeclareMathOperator{\sgn}{eq}
\DeclareMathOperator{\eq}{eq}
\DeclareMathOperator{\dat}{dat}
\DeclareMathOperator{\nd}{nd}
\DeclareMathOperator{\rev}{rev}
\DeclareMathOperator{\sd}{sd}
\DeclareMathOperator{\il}{il}
\DeclareMathOperator{\ir}{ir}
\DeclareMathOperator{\ls}{L}
\DeclarePairedDelimiter{\floor}{\lfloor}{\rfloor}
\DeclarePairedDelimiter{\ceil}{\lceil}{\rceil}
\DeclarePairedDelimiter{\abs}{\lvert}{\rvert}
\usepackage{makecell} %
\setcellgapes{5pt}
\begin{document}
\begin{landscape}
\[ \makegapedcells\begin{array}
{|c|c|c|c|c|} \hline & \text{Equality} & \eq(x,y): & \mathbb{R}\times\mathbb{R}\to\mathbb{B} & 1-|\sgn(x-y)| \\
\hline %
& \text{Digit At} & \dat(x,b,i): & \mathbb{R}\times\mathbb{N}\times\mathbb{Z}\to\mathbb{N} & \floor*{\dfrac{\abs{x}}{b^i}}\mod b \\
\hline %
& \text{Number of Digits} & \nd(x,b): & \mathbb{N}\times\mathbb{N}\to\mathbb{N} & \ceil{\log_b(x+1)} \\
\hline%
& \text{Reverse} & \rev(x,b): & \mathbb{N}\times\mathbb{N}\to\mathbb{N} & \displaystyle \smashoperator[r]{\sum_{i=0}^{\nd(x,b)-1}}\dat(x,b,I)\cdot10^{\nd(x,b)-i-1} \\
\hline%
& \text{Sum Digits} & \sd(x,b): & \mathbb{N}\times\mathbb{N}\to\mathbb{N} & \displaystyle\smashoperator[r]{\sum_{i=0}^{\nd(x,b)-1}}\dat(x,b,i)\\
\hline%
& \text{Look and Say Counter} & C_\lambda(x,i): & \mathbb{N}\times\mathbb{N}\to\mathbb{N} & \sd(x\mod10^i,10) \\
\hline %
& \text{Unpadded Difference} & \delta(x): & \mathbb{N}\to\mathbb{N} & \displaystyle\smashoperator[r]{\sum_{i=0}^{\nd(x,10)-2}}10^i\cdot(1-\eq(\dat(x,10,i),\dat(x,10,i+1))) \\
\hline %
& \text{Padded Difference} & \Delta(x): & \mathbb{N}\to\mathbb{N} & 10^{\nd(x,10)}+10\cdot\delta(x)+1 \\
\hline%
& \text{Leftmost Index} &\il(x,i): & \mathbb{N}\times\mathbb{Z}\to\mathbb{Z} & \nd(x\mod10^{i+1},10)-1 \\
\hline %
& \text{Rightmost Index} & \ir(x,i): & \mathbb{N}\times\mathbb{Z}\to\mathbb{Z} & \nd(x,10)-\nd\left(\rev\left(\floor{\dfrac{x}{10^{i+1}}},10\right),10\right) \\
\hline%
& \text{Look and Say} & \ls(x): & \mathbb{N}\to\mathbb{N} & \begin{multlined}\smashoperator[r]{\sum_{i=0}^{\nd(\Delta(x),10)-2}}\dat(\Delta(x),10,i) \cdot\left(\left(\ir(\Delta(x),i)-i\right)\cdot10^{1+2\cdot C_\lambda(\Delta(x),i)}\right. \\[-4.5ex] \left.{}+\dat(x,10,i)\cdot10^{2\cdot C_\lambda(\Delta(x),i)}\right)
\end{multlined}\\
\hline
\end{array}
\]
\end{landscape}
\end{document}