
\documentclass{article}
\usepackage{enumitem,amssymb}
\usepackage{amsmath}
\usepackage{multicol}
\usepackage{hyperref}
\usepackage{multirow}
\usepackage{xcolor}
\usepackage{array}
\usepackage{makecell}
\usepackage{tabularx}
\usepackage{booktabs}
\newcolumntype{L}{>{\(} l <{\)}}
\begin{document}
\everymath{\displaystyle}
\renewcommand{\arraystretch}{2}
\begin{tabularx}{\textwidth}{|LLL|}
\hline
\sin 2x = 2 \cos x \sin x &
\parbox{101pt}{
\begin{flalign*}
\cos 2x & = \cos^2 x - \sin^2 x \\
& = 2\cos^2 x - 1 \\
& = 1 - 2\sin^2 x
\end{flalign*}
} &
\tan 2x = \frac{2\tan x}{1 - \tan^2 x} \\
\hline
\end{tabularx}
\end{document}
(簡潔にするために、ここではコードの重要な部分のみを示します。)
図に示すように、すべてのセルをtabular
上に揃えたいのですが、どうすればよいでしょうか?
注: 表示する方程式の行が多数あるため、表形式が必要だと思います。下の図を参照してください。
答え1
実際には、そのために表形式は必要ありません。環境framed
を囲む単純な環境でflalign*
十分です。
\documentclass{article}
\usepackage{enumitem,amssymb}
\usepackage{amsmath}
\usepackage{multicol}
\usepackage{hyperref}
\usepackage{multirow}
\usepackage[svgnames]{xcolor}
\usepackage{makecell}
\usepackage{tabularx}
\usepackage{booktabs}
\usepackage{framed}
\newcolumntype{L}{>{\(} l <{\)}}
\begin{document}
\setlength{\FrameRule}{0.6pt}
\renewcommand{\FrameCommand}{\setlength{\fboxrule}{0.6pt}\fcolorbox{Coral}{white}}
\begin{framed}
\begin{flalign*}
\sin 2x & = 2 \cos x \sin x & \cos 2x & = \cos^2 x - \sin^2 x & \tan 2x & = \smash{\frac{2\tan x}{1 - \tan^2 x}} \\
& & & = 2\cos^2 x - 1 \\
& & & = 1 - 2\sin^2 x
\end{flalign*}
\end{framed}
\end{document}