我已经开发了以下代码,但是我需要稍微修改一下:
\documentclass{article}
\usepackage{blindtext}
\usepackage{multicol}
\usepackage{color}
\setlength{\columnseprule}{1pt}
\def\columnseprulecolor{\color{black}}
\usepackage{amsmath}
\begin{document}
\begin{multicols}{2}
\centerline{\textbf{First}}
\begin{align}
\begin{split}
\nu_1 &= y_1 \\
\nu_2 &= y_2 \\
\nu_3 &= \nu_1 \nu_2\\
\nu_4 &= \ln(\nu_1)\\
\nu_5 &= \nu_4+\nu_3
\end{split}
\end{align}
\columnbreak
\centerline{\textbf{Second}}
\begin{align}
\begin{split}
\nu_5 &= 1 \\
\nu_4 &= \frac{\partial \nu_5}{\partial \nu_4} \\
\nu_3 &= \frac{\partial \nu_5}{\partial \nu_3} \\
\nu_2 &= \frac{\partial \nu_5}{\partial \nu_2} \\
\nu_1 &= \frac{\partial \nu_5}{\partial \nu_1}\\
\end{split}
\end{align}
\end{multicols}
\end{document}
我怎样才能对齐每个单个 $\nu_i$?(例如,左边的 $\nu_1$ 与右边的 $\nu_5$ 在同一行,第二个也一样,依此类推..)
是否可以在图片末尾添加类似“图 1”的内容,而不是方程式 (1) 和 (2) 的数量?
我将附上一张我感兴趣的图片。
答案1
tabularx
带有和 的一些的解决方案\vphantom
:
\documentclass{article}
\usepackage{blindtext}
\usepackage{tabularx}
\usepackage{multicol}
\usepackage{color}
\setlength{\columnseprule}{1pt}
\def\columnseprulecolor{\color{black}}
\usepackage{amsmath}
\begin{document}
\centering
\begin{tabularx}{\textwidth}{@{}X!{\vrule width 1pt}X@{}}
\centerline{\textbf{First}}
\begin{equation}
\begin{aligned}
\nu_1 &= y_1 \\
\nu_2 &= y_2\vphantom{ \frac{\partial \nu_5}{\partial \nu_4}} \\
\nu_3 &= \nu_1 \nu_2\vphantom{ \frac{\partial \nu_5}{\partial \nu_4}} \\
\nu_4 &= \ln(\nu_1)\vphantom{ \frac{\partial \nu_5}{\partial \nu_4}} \\
\nu_5 &= \nu_4+\nu_3\vphantom{ \frac{\partial \nu_5}{\partial \nu_4}}
\end{aligned}
\end{equation} &
\centerline{\textbf{Second}}
\begin{equation}
\begin{aligned}
\nu_5 &= 1 \\
\nu_4 &= \frac{\partial \nu_5}{\partial \nu_4} \\
\nu_3 &= \frac{\partial \nu_5}{\partial \nu_3} \\
\nu_2 &= \frac{\partial \nu_5}{\partial \nu_2} \\
\nu_1 &= \frac{\partial \nu_5}{\partial \nu_1}\\
\end{aligned}
\end{equation}
\end{tabularx}
\end{document}
答案2
如果multicol
没有必要...
\documentclass{article}
\usepackage{blindtext}
\usepackage{multicol}
\usepackage{color}
\setlength{\columnseprule}{1pt}
\def\columnseprulecolor{\color{black}}
\usepackage{amsmath}
\begin{document}
\[
\begin{array}{r@{\,}l@{\hspace{1cm}}|@{\hspace{1cm}}r@{\,}l}
\multicolumn{2}{l}{\text{\textbf{First}}}
&
\multicolumn{2}{l}{\text{\textbf{Second}}}\\[12pt]
\nu_1 &= y_1 & \nu_5 &= 1 \\[6pt]
\nu_2 &= y_2 & \nu_4 &= \dfrac{\partial \nu_5}{\partial \nu_4} \\[9pt]
\nu_3 &= \nu_1 \nu_2 & \nu_3 &= \dfrac{\partial \nu_5}{\partial \nu_3} \\[9pt]
\nu_4 &= \ln(\nu_1) & \nu_2 &= \dfrac{\partial \nu_5}{\partial \nu_2} \\[9pt]
\nu_5 &= \nu_4+\nu_3 & \nu_1 &= \dfrac{\partial \nu_5}{\partial \nu_1}
\end{array}
\]
\end{document}
例如,您可以使用环境添加标签图 1 figure
。