一個或多個方程式(不同行上的兩乘二),左側有一個枚舉,右側有另一個

一個或多個方程式(不同行上的兩乘二),左側有一個枚舉,右側有另一個

從這些MWE開始分為兩個環節

  1. 如何在一行中放置並編號 3 個短方程式?(Stefan Kottwitz 的回答)使用這個 MWE:

\documentclass[11pt,a4paper]{scrbook}
\usepackage{amsmath}
\usepackage{tabularx}
\begin{document}
\chapter{Equations}
See equations \eqref{eqn:1}, \eqref{eqn:2} and \eqref{eqn:3}.
\noindent\begin{tabularx}{\textwidth}{@{}XXX@{}}
  \begin{equation}
  x_{1} = \frac{A-A_{0}}{\frac{1}{2}
    \cdot \left( A_{\mathrm{A}} - A_{\mathrm{a}} \right)}
    \label{eqn:1}
  \end{equation} &
  \begin{equation}
  x_{2} = \frac{B-B_{0}}{\frac{1}{2}
    \cdot \left( B_{\mathrm{A}} - B_{\mathrm{a}} \right)}
    \label{eqn:2}
  \end{equation} &
  \begin{equation}
  x_{3} = \frac{C-C_{0}}{\frac{1}{2}
    \cdot \left( C_{\mathrm{A}} - C_{\mathrm{a}} \right)}
    \label{eqn:3}
  \end{equation}
\end{tabularx}
\end{document}
  1. 我之前的問題列舉一本書的方程式的優雅方面(維爾納的回答)我稍微修改了一下,

在此輸入影像描述


\documentclass{book}
\usepackage[top=2.5cm,bottom=2.2cm,
            left=3.2cm,right=1.5cm,headsep=10pt,
            a4paper]{geometry}  %%%%%%%%%%% <--------- added 
\usepackage{mathtools,amssymb}
\usepackage[svgnames, dvipsnames, table, x11names]{xcolor}
\usepackage{pifont}
\usepackage{tabularx} %%%%%%%%%%% <--------- added 
\definecolor{ocre}{RGB}{243,102,25} 
\usepackage{lipsum} %%%%%%%%%%% <--------- added 

%----------------------------------------------------------------------------------
%   Change number equations with sections
%----------------------------------------------------------------------------------
\usepackage{chngcntr}
\counterwithin{equation}{section}

\renewcommand{\theequation}{\thesection-\arabic{equation}}
\newcommand{\eqnnumsymbol}{\textcolor{ocre}{\reflectbox{\ding{228}}}}

\makeatletter
\newtagform{bbrackets}% <name>
  [\textbf]% Internal style
  {(}% Left bracket
  {\ifnum\pdfstrcmp{\@currenvir}{equation}=0
     \eqnnumsymbol%
   \else
     \ifnum\pdfstrcmp{\@currenvir}{align}=0
       \eqnnumsymbol%
     \fi
   \fi
   )}% Right bracket
\makeatother
\usetagform{bbrackets}

\begin{document}
\lipsum[3][1-7]

\begin{tabularx}{\textwidth}{@{}XXX@{}}
\begin{equation}
f(x + y) = f(x) + f(y),
\label{eqn:1}
\end{equation} &
\begin{equation}
f(ax) = af(x),\,
x,y\in V, a\in\mathbb{C}
\label{eqn:2}
\end{equation}
\end{tabularx}

\lipsum[2][1-4]


\end{document}

我們觀察到同一行中的枚舉超出了邊距。請參閱(圖中紅色箭頭所示)。但是,我想要我修改過的這種類型的東西為了清楚說明我的問題:

然而,這種可能的輸出必須在兩個或多個方程式(不同行上的兩乘二方程式)時實現。

請問,有哪些可能的解決方案?

答案1

我提出這個(基於我對你之前問題的解決方案)。請注意,您必須使用 amsmath 環境,即替換equationgather例如。

\documentclass{book}
\usepackage[top=2.5cm,bottom=2.2cm,
            left=3.2cm,right=1.5cm,headsep=10pt,
            a4paper]{geometry} %%%%%%%%%%% <--------- added
\usepackage{mathtools,amssymb}
\usepackage[svgnames, dvipsnames, table, x11names]{xcolor}
\usepackage{pifont}
\usepackage{tabularx} %%%%%%%%%%% <--------- added
\definecolor{ocre}{RGB}{243,102,25}
\usepackage{lipsum} %%%%%%%%%%% <--------- added

%----------------------------------------------------------------------------------
% Change number equations with sections
%----------------------------------------------------------------------------------
\usepackage{chngcntr}
\counterwithin{equation}{section}

\renewcommand{\theequation}{\thesection-\arabic{equation}}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Added
\makeatletter
\newcommand{\leqnomode}{\tagsleft@true\usetagform{larrowtip}}
\newcommand{\reqnomode}{\tagsleft@false}
\newcommand*{\compress}{\@minipagetrue}
\newcommand*{\depress}{\@minipagefalse}
\makeatother

\usepackage{nccmath}
\usepackage{adforn}
\newtagform{arrowtip}[\bfseries\sffamily]{\bfseries(}{\textmd{)}\,\textcolor{IndianRed3}{\Large\adforn{42}}}
\usetagform{arrowtip}
\newtagform{larrowtip}[\bfseries\sffamily]{\textcolor{IndianRed3}{\Large\adforn{43}}\,(}{)}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{document}

\lipsum[3][1-7]

{\noindent\begin{tabularx}{\textwidth}{@{}>{\compress\leqnomode}X<{\depress}>{\compress}X <{\depress}@{}}
\begin{gather}
f(x + y) = f(x) + f(y),
\label{eqn:1}
\end{gather} &
\begin{gather}
f(ax) = af(x),\,
x,y\in V, a\in\mathbb{C}
\label{eqn:2}
\end{gather}
\end{tabularx}}

\lipsum[2][1-4]

\begin{gather}
f(x + y) = f(x) + f(y),
\label{eqn:1}
\end{gather}

\leqnomode
\begin{gather}
f(ax) = af(x),\,
x,y\in V, a\in\mathbb{C}
\label{eqn:2}
\end{gather}

\end{document} 

在此輸入影像描述

相關內容