
私は初心者なLaTeX
ので、ご容赦ください。これを使用してプロジェクト レポートを作成しようとしていますが、特定のセクションでは、これまでに次のようになりました。
それから、
\documentclass[a4paper,12pt]{article}
\usepackage{amsmath,graphicx,hyperref,parskip,gensymb}
% In case you are wondering what these packages are for:
% amsmath provides extra mathematical constructs and symbols
% graphicx facilitates the inclusion of graphics files
% hyperref makes links into clickable hyperlinks
% parskip leaves more space between paragraphs
\usepackage[cm]{fullpage}
% The above package makes the page margins smaller. I included it
% to save you printing costs.
% Feel free to also print two-sheets per page and double-sided
%==================
%.....
%==================
\begin{equation}\label{eq:six}
x = Vtsin(K),
\end{equation}
and
\begin{align*}
X
&= x-(l+h)sin(\phi), \\
&= Vt\sin(K)-(l+h)sin[K-2\tan ^{ - 1}\{\tan(K/2).exp((-Vt)/l)\}],
\end{align*}
一番上にはこう書かれています:
\documentclass[a4paper,12pt]{article}
\usepackage{amsmath,graphicx,hyperref,parskip,gensymb}
そして、方程式の 3 行すべてを一列に並べたいのですが、つまり x 方程式と X 方程式で、1 行目と 3 行目には番号が割り当てられています。他のすべての方程式は で\begin{equation}...\end{equation}
囲まれており、それらには参照番号が与えられています (x 方程式など)。しかし、この 2 つを一列に並べたかったので、方程式の代わりに align 式を使用し、両方を一緒に試してみましたが、うまくいきませんでした。(また、ラベル付けが機能していませんが、これは別の問題です!)
ご協力いただければ幸いです。
答え1
これはどう?
\documentclass[a4paper,12pt]{article}
\usepackage{amsmath,graphicx,hyperref,parskip,gensymb}
% In case you are wondering what these packages are for:
% amsmath provides extra mathematical constructs and symbols
% graphicx facilitates the inclusion of graphics files
% hyperref makes links into clickable hyperlinks
% parskip leaves more space between paragraphs
\usepackage[cm]{fullpage}
% The above package makes the page margins smaller. I included it
% to save you printing costs.
% Feel free to also print two-sheets per page and double-sided
%==================
%.....
%==================
\begin{document}
{%
\setlength{\belowdisplayskip}{0pt}%
\setlength{\abovedisplayskip}{0pt}%
\begin{align}\label{eq:six}
x & = Vtsin(K) \\
\intertext{and} \notag
X &= x-(l+h)sin(\phi), \notag \\
&= Vt\sin(K)-(l+h)sin[K-2\tan ^{ - 1}\{\tan(K/2).exp((-Vt)/l)\}],
\end{align}
}
\end{document}
\intertext
行の周囲に多くのスペースができますがand
、コマンドで調整しない限りsetlength
、ここ
私考えるこれで、求めていた配置と番号付けが実現しましたか?
答え2
mathtools
パッケージには が用意され\shortintertext
ています。さらに、 を使用するsplit
と 2 番目の式を番号付けできます。この場合、小さな調整が必要です (テキスト間の後に小さな垂直スペースを挿入します) 。
\documentclass[a4paper,12pt]{article}
\usepackage{amsmath,mathtools}
\usepackage{lipsum} % just for the example
\begin{document}
\lipsum*[3]
\begin{align}
x & = Vt\sin K \label{eq:six} \\
\shortintertext{and\vspace{\jot}}
\begin{split}
X &= x-(l+h)\sin\phi, \\
&= Vt\sin K-(l+h)\sin\bigl(K-2\arctan(\tan(K/2)\exp(-Vt/l)\bigr),
\end{split}
\end{align}
\lipsum[4]
\end{document}
申し訳ありませんが、私は逆正接には我慢できません\tan^{-1}
。また、括弧は可能な限り丸くする必要があります。また、\sin(K)
は冗長であり、\sin K
十分すぎるほどです(伝統的です)。ピリオドは乗算を示すために使用しないでください。何も使用しないか、中央のドットを使用します\cdot
。もちろん、これらは単なる私の意見です。