표 및 해당 메모 내부 정렬 문제

표 및 해당 메모 내부 정렬 문제

내 문제를 설명하려면 다음 표를 참조하십시오.

여기에 이미지 설명을 입력하세요

1) 빨간색 부분을 중앙에 더 가깝게 가져와 세 개의 열이 더 중앙에 위치하도록 하고 싶습니다.

2) 파란색 부분을 수직선 하나로 정렬하고 싶습니다. 를 사용하려고 했는데 {flalign*}, 이렇게 하면 "수익성 계산"이 아닌 상단 열에 방정식이 정렬됩니다.

이것은 내가 사용하는 코드입니다:

\documentclass[12pt]{article}
\usepackage{setspace,amsmath,graphicx,float}
\usepackage[english]{babel}
\usepackage{boldline}
\usepackage{array}
\usepackage[left=3cm,top=3.5cm,right=2.5cm,bottom=2.5cm]{geometry}
\usepackage{times}
\usepackage{threeparttable}
\usepackage[margin=1cm]{caption}
\usepackage{amssymb}
\usepackage{tabularx}

\begin{document}
\begin{table}[H]
\centering
\small
\caption[xxx]{Example calculation for a two-product SSNIP test \citep{QuantTech}.}
\begin{threeparttable}
\begin{tabularx}{\textwidth}{p{20em} >{\centering\arraybackslash}p{8em}  >{\centering\arraybackslash}p{7em}}    
\hlineB{3}
  & Product 1 & Product 2  \\ \hline
Margin & 10\% & 20\% \\
Diversion ratio & 0.29 & 0.5 \\ 
Own-price elasticity of demand & 2 & 4 \\ 
Ratio of prices $p_2 / p_1$ & 1 & 1 \\                       
\hlineB{3}
\end{tabularx}
\begin{tablenotes}
\setlength{\belowdisplayskip}{0pt} \setlength{\belowdisplayshortskip}{0pt}
\setlength{\abovedisplayskip}{0pt} \setlength{\abovedisplayshortskip}{0pt}
\item Profitability calculation:\\
\begin{align*}
\frac{p_1 - c_1}{p_1} \overset{?}{\leqslant} \frac{1}{\eta_{11}(p_1,p_2.\ldots,p_J)} + \frac{p_2 - c_2}{p_2} \frac{p_2}{p_1} DR_{12}, \qquad 0.1 \leqslant \frac{1}{2} + 0.2 \times 1 \times 0.29 = 0.56
 \end{align*}

\begin{align*}
\frac{p_2 - c_2}{p_1} \overset{?}{\leqslant} \frac{1}{\eta_{22}(p_1,p_2.\ldots,p_J)} + \frac{p_1 - c_1}{p_1} \frac{p_1}{p_2} DR_{21}, \qquad 0.2 \leqslant \frac{1}{4} + 0.1 \times 1 \times 0.5 = 0.30
\end{align*}

\end{tablenotes}
\end{threeparttable}
\label{ExampleSSNIP}   
\end{table}
\end{document}

어떤 도움이라도 주셔서 감사합니다. 감사합니다!

답변1

표가 텍스트 너비를 채우도록 하려면(두 열 조판을 수행하지 않는 한 그렇게 해서는 안 됩니다) 최소한 \small.

threeparttable이 경우에는 필요하지 않습니다 . 그냥 사용하세요 \raggedright.

나는 newtxtextnewtxmath. 사용할 수 있습니다 mathptmx(그러나 결과는 더 나쁩니다). times문서에 수학이 있으면 절대 사용하지 마십시오 .

\documentclass[12pt]{article}
\usepackage[left=3cm,top=3.5cm,right=2.5cm,bottom=2.5cm]{geometry}
\usepackage{amsmath}
\usepackage{newtxtext,newtxmath}
\usepackage{booktabs}
\usepackage{natbib}
\usepackage[margin=1cm]{caption}

\begin{document}
\begin{table}

\caption[xxx]{Example calculation for a two-product SSNIP test \citep{QuantTech}.}
\label{ExampleSSNIP}   

\centering

\begin{tabular*}{\textwidth}{
  @{\hspace{.1\textwidth}\extracolsep{\fill}}
  l c c
  @{\hspace{.1\textwidth}}
}
\toprule
                               & Product 1 & Product 2 \\
\midrule
Margin                         & 10\%      & 20\%      \\
Diversion ratio                & 0.29      & 0.5       \\
Own-price elasticity of demand & 2         & 4         \\
Ratio of prices $p_2 / p_1$    & 1         & 1         \\
\bottomrule
\end{tabular*}

\medskip

\raggedright
Profitability calculation:\\[\medskipamount]
$\begin{alignedat}{2}
\frac{p_1 - c_1}{p_1} &\overset{?}{\leqslant} 
  \frac{1}{\eta_{11}(p_1,p_2.\dots,p_J)} + \frac{p_2 - c_2}{p_2} \frac{p_2}{p_1} DR_{12},
  &\qquad& 0.1 \leqslant \frac{1}{2} + 0.2 \times 1 \times 0.29 = 0.56
\\
\frac{p_2 - c_2}{p_1} &\overset{?}{\leqslant} 
  \frac{1}{\eta_{22}(p_1,p_2.\dots,p_J)} + \frac{p_1 - c_1}{p_1} \frac{p_1}{p_2} DR_{21},
  &\qquad& 0.2 \leqslant \frac{1}{4} + 0.1 \times 1 \times 0.5 = 0.30
\end{alignedat}$

\end{table}

\end{document}

대신 boldrulebooktabs. 첫 번째 열 앞과 마지막 열 뒤의 간격을 조정합니다. 하지만 내 조언은~ 아니다특히 테이블에 그렇게 적은 양의 열이 포함되어 있는 경우 테이블을 인위적으로 확장합니다.

이어야 \ldots합니다 \dots.

여기에 이미지 설명을 입력하세요

답변2

flushleft다음은 테이블노트 옵션과 환경 을 래핑하는 fleqn환경이 포함된 솔루션입니다 . 이는 | fleqn amsmath`는 방정식의 한 그룹에 대해 로컬로 실행됩니다.nccmathalign*option from

또한 더 이상 사용되지 않는 패키지를 Times 복제본(TeX Gyre Termes)을 사용하는 times로 교체했습니다 .newtx

\documentclass[12pt]{article}
\usepackage{setspace,amsmath,graphicx,float}
\usepackage[english]{babel}
\usepackage{boldline}
\usepackage{array}
\usepackage[left=3cm,top=3.5cm,right=2.5cm,bottom=2.5cm]{geometry}
\usepackage{newtxtext, newtxmath}
\usepackage{threeparttable}
\usepackage[margin=1cm]{caption}
\usepackage{amssymb}
\usepackage{tabularx}
\usepackage{nccmath}


 \begin{document}

\begin{table}[H]
  \centering
  \small
  \caption[xxx]{Example calculation for a two-product SSNIP test.}% \citep{QuantTech}
  \begin{threeparttable}
    \begin{tabularx}{\textwidth}{p{20em} >{\centering\arraybackslash}p{8em} >{\centering\arraybackslash}p{7em}}
      \hlineB{3}
                                     & Product 1 & Product 2 \\ \hline
      Margin & 10\,\% & 20\,\% \\
      Diversion ratio & 0.29 & 0.5 \\
      Own-price elasticity of demand & 2 & 4 \\
      Ratio of prices $p_2/p_1 $ & 1 & 1 \\
      \hlineB{3}
    \end{tabularx}
    \begin{tablenotes}[flushleft]
      \setlength{\belowdisplayskip}{0pt} \setlength{\belowdisplayshortskip}{0pt}
      \setlength{\abovedisplayskip}{0pt} \setlength{\abovedisplayshortskip}{0pt}
      \item Profitability calculation:
      \begin{fleqn}[\fontdimen2\font]
        \begin{align*}
          \frac{p_1 - c_1}{p_1} & \overset{?}{\leqslant} \frac{1}{\eta_{11}(p_1,p_2.\ldots,p_J)} + \frac{p_2 - c_2}{p_2} \frac{p_2}{p_1} DR_{12}, & 0.1 & \leqslant \frac{1}{2} + 0.2 × 1 × 0.29 = 0.56 \\%
          \frac{p_2 - c_2}{p_1} & \overset{?}{\leqslant} \frac{1}{\eta_{22}(p_1,p_2.\ldots,p_J)} + \frac{p_1 - c_1}{p_1} \frac{p_1}{p_2} DR_{21}, & 0.2 & \leqslant \frac{1}{4} + 0.1 × 1 × 0.5 = 0.30
        \end{align*}
      \end{fleqn}
    \end{tablenotes}
  \end{threeparttable}
  \label{ExampleSSNIP}
\end{table}

\end{document} 

여기에 이미지 설명을 입력하세요

tabulary그러나 나는 내 의견으로는 전혀 보이지 않는 를 기반으로 이 코드를 제안합니다 .

\documentclass[12pt]{article}
\usepackage{setspace,amsmath,graphicx,float}
\usepackage[english]{babel}
\usepackage{boldline}
\usepackage{array}
\usepackage[left=3cm,top=3.5cm,right=2.5cm,bottom=2.5cm]{geometry}
\usepackage{newtxtext, newtxmath}
\usepackage{threeparttable}
\usepackage[margin=1cm]{caption}
\usepackage{amssymb}
\usepackage{tabularx, tabulary}
\usepackage{nccmath}


 \begin{document}

\begin{table}[H]
  \centering
  \small\setlength\extrarowheight{2pt}
  \caption[xxx]{Example calculation for a two-product SSNIP test.}% \citep{QuantTech}
  \begin{threeparttable}
    \begin{tabulary}{\textwidth}{L>{\centering\arraybackslash}p{8em} >{\centering\arraybackslash}p{8em}@{}}%p{20em} \hlineB{3}
                                     & Product 1 & Product 2 \\ \hlineB{3}
      Margin & 10\,\% & 20\,\% \\
      Diversion ratio & 0.29 & 0.5 \\
      Own-price elasticity of demand & 2 & 4 \\
      Ratio of prices $p_2 / p_1$ & 1 & 1 \\
      \hlineB{3}
    \end{tabulary}
    \begin{tablenotes}[flushleft]\footnotesize
      \setlength{\belowdisplayskip}{0pt} \setlength{\belowdisplayshortskip}{0pt}
      \setlength{\abovedisplayskip}{0pt} \setlength{\abovedisplayshortskip}{0pt}
      \item Profitability calculation:
      \begin{fleqn}[\fontdimen2\font]
        \begin{align*}
          \frac{p_1 - c_1}{p_1} & \overset{?}{\leqslant} \frac{1}{\eta_{11}(p_1,p_2.\ldots,p_J)} + \frac{p_2 - c_2}{p_2} \frac{p_2}{p_1} DR_{12}, & 0.1 & \leqslant \frac{1}{2} + 0.2 \times 1 \times 0.29 = 0.56 \\%
          \frac{p_2 - c_2}{p_1} & \overset{?}{\leqslant} \frac{1}{\eta_{22}(p_1,p_2.\ldots,p_J)} + \frac{p_1 - c_1}{p_1} \frac{p_1}{p_2} DR_{21}, & 0.2 & \leqslant \frac{1}{4} + 0.1 \times 1 \times 0.5 = 0.30
        \end{align*}
      \end{fleqn}
    \end{tablenotes}
  \end{threeparttable}
  \label{ExampleSSNIP}
\end{table}

\end{document} 

여기에 이미지 설명을 입력하세요

관련 정보