我尝试将以太坊黄皮书 EVM 字节码复制到我自己的 LaTeX 中以供参考。
简化代码后,剩下以下内容(片段):
\begin{tabular*}{\columnwidth}[h]{rlrrl}
\toprule
\multicolumn{5}{c}{\textbf{0s: Stop and Arithmetic Operations}} \\
\textbf{Value} & \textbf{Mnemonic} & $\delta$ & $\alpha$ & \textbf{Description} \vspace{5pt} \\
0x00 & {\small STOP} & 0 & 0 & Halts execution. \\
\midrule
0x01 & {\small ADD} & 2 & 1 & Addition operation. \\
\midrule
0x02 & {\small MUL} & 2 & 1 & Multiplication operation. \\
\midrule
0x03 & {\small SUB} & 2 & 1 & Subtraction operation. \\
\midrule
0x04 & {\small DIV} & 2 & 1 & Integer division operation. \\
\midrule
0x05 & {\small SDIV} & 2 & 1 & Signed integer division operation (truncated). \\
\midrule
0x06 & {\small MOD} & 2 & 1 & Modulo remainder operation. \\
\midrule
0x07 & {\small SMOD} & 2 & 1 & Signed modulo remainder operation. \\
\midrule
0x08 & {\small ADDMOD} & 3 & 1 & Modulo addition operation. \\
\midrule
0x09 & {\small MULMOD} & 3 & 1 & Modulo multiplication operation. \\
\midrule
0x0a & {\small EXP} & 2 & 1 & Exponential operation. \\
\midrule
0x0b & {\small SIGNEXTEND} & 2 & 1 & Extend length of two's complement signed integer. \\
\end{tabular*}
\begin{tabular*}{\columnwidth}[h]{rlrrl}
\toprule
\multicolumn{5}{c}{\textbf{10s: Comparison \& Bitwise Logic Operations}} \\
\textbf{Value} & \textbf{Mnemonic} & $\delta$ & $\alpha$ & \textbf{Description} \vspace{5pt} \\
0x10 & {\small LT} & 2 & 1 & Less-than comparison. \\
\midrule
0x11 & {\small GT} & 2 & 1 & Greater-than comparison. \\
\midrule
0x12 & {\small SLT} & 2 & 1 & Signed less-than comparison. \\
\midrule
0x13 & {\small SGT} & 2 & 1 & Signed greater-than comparison. \\
\midrule
0x14 & {\small EQ} & 2 & 1 & Equality comparison. \\
\midrule
0x15 & {\small ISZERO} & 1 & 1 & Simple not operator. \\
\midrule
0x16 & {\small AND} & 2 & 1 & Bitwise AND operation. \\
\midrule
0x17 & {\small OR} & 2 & 1 & Bitwise OR operation. \\
\midrule
0x18 & {\small XOR} & 2 & 1 & Bitwise XOR operation. \\
\midrule
0x19 & {\small NOT} & 1 & 1 & Bitwise NOT operation. \\
\midrule
0x1a & {\small BYTE} & 2 & 1 & Retrieve single byte from word. \\
\bottomrule
\end{tabular*}
\begin{tabular*}{\columnwidth}[h]{rlrrl}
\toprule
\multicolumn{5}{c}{\textbf{20s: SHA3}} \vspace{5pt} \\
\textbf{Value} & \textbf{Mnemonic} & $\delta$ & $\alpha$ & \textbf{Description} \vspace{5pt} \\
0x20 & {\small SHA3} & 2 & 1 & Compute Keccak-256 hash. \\
\bottomrule
\end{tabular*}
\begin{tabular*}{\columnwidth}[h]{rlrrl}
\toprule
\multicolumn{5}{c}{\textbf{30s: Environmental Information}} \vspace{5pt} \\
\textbf{Value} & \textbf{Mnemonic} & $\delta$ & $\alpha$ & \textbf{Description} \vspace{5pt} \\
0x30 & {\small ADDRESS} & 0 & 1 & Get address of currently executing account. \\
\midrule
0x31 & {\small BALANCE} & 1 & 1 & Get balance of the given account. \\
\midrule
0x32 & {\small ORIGIN} & 0 & 1 & Get execution origination address. \\
\midrule
0x33 & {\small CALLER} & 0 & 1 & Get caller address. \\
\midrule
0x34 & {\small CALLVALUE} & 0 & 1 & Get deposited value by the instruction/transaction responsible for this execution. \\
\midrule
0x35 & {\small CALLDATALOAD} & 1 & 1 & Get input data of current environment. \\
\midrule
0x36 & {\small CALLDATASIZE} & 0 & 1 & Get size of input data in current environment. \\
\midrule
0x37 & {\small CALLDATACOPY} & 3 & 0 & Copy input data in current environment to memory. \\
\midrule
0x38 & {\small CODESIZE} & 0 & 1 & Get size of code running in current environment. \\
\midrule
0x39 & {\small CODECOPY} & 3 & 0 & Copy code running in current environment to memory. \\
\midrule
0x3a & {\small GASPRICE} & 0 & 1 & Get price of gas in current environment. \\
\midrule
0x3b & {\small EXTCODESIZE} & 1 & 1 & Get size of an account's code. \\
\midrule
0x3c & {\small EXTCODECOPY} & 4 & 0 & Copy an account's code to memory. \\
\bottomrule
\end{tabular*}
编译此代码,我得到以下 PDF(片段):
表格未对齐,即行长不等且文本未居中。
我该如何解决?