라텍스 테이블이 압축되어 너무 작습니다.

라텍스 테이블이 압축되어 너무 작습니다.

죄송합니다. 저는 라텍스를 처음 사용합니다. 테이블을 생성하려고 하는데 압축된 상태로 표시됩니다. 전체 테이블의 높이는 약 3Cm입니다. A4 시트의 세로 레이아웃에 있는 테이블을 읽기 좋게 만들고 싶습니다. 도와주세요.

\begin{table}[h!]
\caption{MRMC Requested Benchmarking Tests}
\label{BT2}
\resizebox{\textwidth}{!}{%
\begin{tabular}{*{14}{|c}|}%{|l|l|l|l|l|}\hline

\multicolumn{1}{|c|}{\textbf{S No.}} & \multicolumn{1}{c|}{\textbf{Test Description}}                      & \multicolumn{1}{c|}{\textbf{High Level Steps}}                                                                                                                   & \multicolumn{1}{c|}{\textbf{Expected Output}}                                                                                                   & \multicolumn{1}{c|}{\textbf{PQA Status}}                                                                                                              \\ \hline
1                                    & Comparison of complete IHC portfolio aggregated TCM with 10-Day VaR & a)Take the available complete IHC portfolio.b)Obtain the same COB production 10 Day VaRc)Ensure trade population and notional match betweenTCM data and VaR data & 10 Day VaR should be lower and account for the gap risk in CVA Closeout                                                                         & This test was deemed unfit as variance between VaR and CVA Closeout can be because of various reasons like difference in choice of risk factors, etc. \\ \hline
2                                    & Same trade Stressed CVA vs CVA Closeout                             & a)Choose a swap with one year maturity. b)Apply both methodologies on the swap. c)Plot the exposure profile on a graph                                           & For Swap the profile should be forward declining slope and in case of CVA closeout there should be a spike post the 1 year mark.                & The same result can be implied from already run test cases.                                                                                           \\ \hline
3                                    & Same trade Stressed CVA vs CVA Closeout                             & a)Choose an option with one year maturity. b)Apply both methodologies on the swap. c)Plot the exposure profile on a graph                                        & For option it should be a straight line for both Stressed CVA and CVA Closeout. Just that for CVA closeout there should be a spike post expiry. & The same result can be implied from already run test cases.                                                                                           \\ \hline
4                                    & Swap with IM and without IM                                         & a)Take one year swap and run it with IM.b)Take the same swap and run it without IM. Note: Please use CVA closeout model in both cases.                           & With IM graph should start higher, converging into without IM towards expiry.                                                                   & The same result can be implied from already run test cases.                                                                                           \\ \hline
\end{tabular}%
}
\end{table}

감사와 감사의 바룬

답변1

나는 당신의 테이블을 다시 디자인할 것입니다 :

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

\documentclass{article}
\usepackage{geometry}
\usepackage{ragged2e}
\usepackage{booktabs, makecell, tabularx}
\renewcommand\theadfont{\bfseries}
\renewcommand\theadgape{}
\newcolumntype{L}{>{\RaggedRight}X}

\begin{document}
    \begin{table}[htb]
\caption{MRMC Requested Benchmarking Tests}
\label{BT2}
    \footnotesize
    \setlength\tabcolsep{3pt}
\begin{tabularx}{\linewidth}{@{} l
              >{\hsize=0.8\hsize}L
              >{\hsize=1.2\hsize}L
                            *{2}{L}
                @{}}
    \toprule
\thead[b]{S\\ No.}
    &   \thead{Test Description}
        &   \thead{High Level Steps}
            &   \thead{Expected Output}
                &   \thead{PQA Status}             \\
    \midrule
1  & Comparison of complete IHC portfolio aggregated TCM with 10-Day VaR
        & a) Take the available complete IHC portfolio.\quad
          b) Obtain the same COB production 10 Day VaRc). Ensure trade population and notional match between TCM data and VaR data
            & 10 Day VaR should be lower and account for the gap risk in CVA Closeout
                & This test was deemed unfit as variance between VaR and CVA Closeout can be because of various reasons like difference in choice of risk factors, etc. \\
    \addlinespace
2  & Same trade Stressed CVA vs CVA Closeout
        & a) Choose a swap with one year maturity. \quad
          b) Apply both methodologies on the swap. \quad
          c) Plot the exposure profile on a graph.
            & For Swap the profile should be forward declining slope and in case of CVA closeout there should be a spike post the 1 year mark.
                & The same result can be implied from already run test cases.               \\
    \addlinespace
3   & Same trade Stressed CVA vs CVA Closeout
        & a) Choose an option with one year maturity. \quad
          b) Apply both methodologies on the swap. \quad
          c) Plot the exposure profile on a graph
            & For option it should be a straight line for both Stressed CVA and CVA Closeout. Just that for CVA closeout there should be a spike post expiry.
                & The same result can be implied from already run test cases.               \\
    \addlinespace
4   & Swap with IM and without IM
        & a)Take one year swap and run it with IM. \quad
          b) Take the same swap and run it without IM.
          Note: Please use CVA closeout model in both cases.
            & With IM graph should start higher, converging into without IM towards expiry.
                & The same result can be implied from already run test cases.               \\
    \bottomrule
\end{tabularx}%
    \end{table}
\end{document}

편집하다:주어진 제안을 고려린드리스하지만 개선된 코드를 사용하면 테이블은 다음과 같을 수 있습니다.

\documentclass{article}
\usepackage{geometry}
\usepackage{ragged2e}
\usepackage{booktabs, makecell, tabularx}
\renewcommand\theadfont{\bfseries}
\renewcommand\theadgape{}
\newcolumntype{L}{>{\RaggedRight}X}

\usepackage{enumitem}
\usepackage{etoolbox}
\AtBeginEnvironment{table}{%
\setlist[enumerate]{nosep, % <-- list setup used in all tables
                     topsep = 0pt,
                     partopsep = 0pt,
                     wide,
                     label=\alph*),
                     before = \vspace{-0.6\baselineskip},
                     }
                        }
\begin{document}
    \begin{table}[htb]
\caption{MRMC Requested Benchmarking Tests}
\label{BT2}
    \footnotesize
    \setlength\tabcolsep{3pt}
\begin{tabularx}{\linewidth}{@{} l
              >{\hsize=0.8\hsize}L
              >{\hsize=1.2\hsize}L
                            *{2}{L}
                @{}}
    \toprule
\thead[b]{S\\ No.}
    &   \thead{Test Description}
        &   \thead{High Level Steps}
            &   \thead{Expected Output}
                &   \thead{PQA Status}             \\
    \midrule
1  & Comparison of complete IHC portfolio aggregated TCM with 10-Day VaR
        & \begin{enumerate} 
            \item   Take the available complete IHC portfolio.
            \item   Obtain the same COB production 10 Day VaRc). 
          \end{enumerate}
          Ensure trade population and notional match between TCM data and VaR data
            & 10 Day VaR should be lower and account for the gap risk in CVA Closeout
                & This test was deemed unfit as variance between VaR and CVA Closeout can be because of various reasons like difference in choice of risk factors, etc. \\
    \addlinespace
2  & Same trade Stressed CVA vs CVA Closeout
        & \begin{enumerate}
            \item   Choose a swap with one year maturity. 
            \item   Apply both methodologies on the swap. 
            \item   Plot the exposure profile on a graph.
          \end{enumerate}  
            & For Swap the profile should be forward declining slope and in case of CVA closeout there should be a spike post the 1 year mark.
                & The same result can be implied from already run test cases.               \\
    \addlinespace
3   & Same trade Stressed CVA vs CVA Closeout
        & \begin{enumerate}
            \item   Choose an option with one year maturity.
            \item   Apply both methodologies on the swap. 
            \item   Plot the exposure profile on a graph
          \end{enumerate}  
            & For option it should be a straight line for both Stressed CVA and CVA Closeout. Just that for CVA closeout there should be a spike post expiry.
                & The same result can be implied from already run test cases.               \\
    \addlinespace
4   & Swap with IM and without IM
        & \begin{enumerate}
            \item   Take one year swap and run it with IM.
            \item   Take the same swap and run it without IM.
          \end{enumerate}  
          Note: Please use CVA closeout model in both cases.
            & With IM graph should start higher, converging into without IM towards expiry.
                & The same result can be implied from already run test cases.               \\
    \bottomrule
\end{tabularx}
    \end{table}
\end{document}

이는 다음을 제공합니다:

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

답변2

몇 가지 작은 변화를 주었습니다.

  • 나는 당신이 가지고 있던 14개의 열을 제거했습니다. 4개만 사용하고 계십니다.

  • 첫 번째 열의 너비를 다음과 같이 수정했습니다.1cm

  • 셀 크기를 (\textwidth-1cm)/4.

  • 를 제거하고 를 \resizebox사용하여 글꼴 크기를 수동으로 변경했습니다 \footnotesize. 이것을 마음대로 바꾸세요.

  • \multicolumns실제로 사용하지 않았기 때문에 제거했습니다 .

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

\documentclass{article}

\usepackage{graphicx}

\begin{document}
\begin{table}[h!]
\caption{MRMC Requested Benchmarking Tests}
\label{BT2}
\footnotesize
% \resizebox{\textwidth}{!}{%
\begin{tabular}{|p{1cm}*{4}{|p{\dimexpr(\textwidth-1cm)/4\relax}}|}%{|l|l|l|l|l|}
\hline

\textbf{S No.} & \textbf{Test Description}                      & \textbf{High Level Steps}                                                                                                                   & \textbf{Expected Output}                                                                                                   & \textbf{PQA Status}                                                                                                              \\ \hline
1                                    & Comparison of complete IHC portfolio aggregated TCM with 10-Day VaR & a)Take the available complete IHC portfolio.b)Obtain the same COB production 10 Day VaRc)Ensure trade population and notional match betweenTCM data and VaR data & 10 Day VaR should be lower and account for the gap risk in CVA Closeout                                                                         & This test was deemed unfit as variance between VaR and CVA Closeout can be because of various reasons like difference in choice of risk factors, etc. \\ \hline
2                                    & Same trade Stressed CVA vs CVA Closeout                             & a)Choose a swap with one year maturity. b)Apply both methodologies on the swap. c)Plot the exposure profile on a graph                                           & For Swap the profile should be forward declining slope and in case of CVA closeout there should be a spike post the 1 year mark.                & The same result can be implied from already run test cases.                                                                                           \\ \hline
3                                    & Same trade Stressed CVA vs CVA Closeout                             & a)Choose an option with one year maturity. b)Apply both methodologies on the swap. c)Plot the exposure profile on a graph                                        & For option it should be a straight line for both Stressed CVA and CVA Closeout. Just that for CVA closeout there should be a spike post expiry. & The same result can be implied from already run test cases.                                                                                           \\ \hline
4                                    & Swap with IM and without IM                                         & a)Take one year swap and run it with IM.b)Take the same swap and run it without IM. Note: Please use CVA closeout model in both cases.                           & With IM graph should start higher, converging into without IM towards expiry.                                                                   & The same result can be implied from already run test cases.                                                                                           \\ \hline
\end{tabular}%
% }
\end{table}
\end{document}

답변3

tabularx사용 및 환경에 대한 다른 접근 방식 enumerate:

\documentclass{article}
\usepackage{tabularx}
\usepackage{graphicx}
\usepackage{booktabs}
\usepackage{array}
\usepackage{enumerate}
\newcolumntype{Y}{>{\raggedright\arraybackslash}X}

\begin{document}

\begin{table}[h!]
\caption{MRMC Requested Benchmarking Tests}
\label{BT2}
\begin{tabularx}{\textwidth}{cYYYY}

\textbf{S No.} & \textbf{Test Description} & \textbf{High Level Steps}                                                                                                           & \textbf{Expected Output}                                                                                                 & \textbf{PQA Status} \\ \midrule
1                                    
& Comparison of complete IHC portfolio aggregated TCM with 10-Day VaR 
& \begin{enumerate}[a)]\vspace*{-1.5\baselineskip}
   \item Take the available complete IHC portfolio.
   \item Obtain the same COB production 10 Day VaR
   \item Ensure trade population and notional match betweenTCM data and VaR data 
   \end{enumerate}
   & 10 Day VaR should be lower and account for the gap risk in CVA Closeout
& This test was deemed unfit as variance between VaR and CVA Closeout can be because of various reasons like difference in choice of risk factors, etc. \\  \midrule
\end{tabularx}%
\end{table}
\end{document}

답변4

또 다른 기반 솔루션은 다음과 같습니다 . 첫 번째 열에는 열 유형을 tabularx사용 하고 4개의 데이터 열에는 수정된 열을 사용합니다. 모든 수직 규칙을 없애고 소수이지만 간격이 넉넉한 수평 규칙을 사용합니다. 공백은 시각적 구분선을 만들기 위한 확실한 규칙으로서 모든 면에서 효과가 있을 수 있다는 점을 관찰하세요. 각 셀의 자료는 완전히 정렬되지 않고 오른쪽 정렬로 설정되며 하이픈을 허용합니다. 넥타이 (lX~ 두 번째 데이터 열에서 잘못된 줄 바꿈을 방지하기 위해 필요에 따라 )이 삽입됩니다. 마지막으로, 제거하는 것이 좋습니다.굵은 글씨실제로는 필요하지 않기 때문에 헤더 행에서 삭제합니다.

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

\documentclass{article}
\usepackage[english]{babel}
\usepackage[a4paper,margin=2.5cm]{geometry} % set page parameters suitably
\usepackage{tabularx,booktabs,caption,ragged2e}
\newcolumntype{Y}{>{\RaggedRight\arraybackslash}X}

\begin{document}
\begin{table}[ht!]
\setlength\tabcolsep{4pt} % default is 6pt
\captionsetup{skip=0.333\baselineskip}
\caption{MRMC Requested Benchmarking Tests} \label{BT2}
\begin{tabularx}{\textwidth}{@{} l *{4}{Y} @{}}
\toprule
S No. & Test Description & High-Level Steps & Expected Output & PQA Status\\ 
\midrule
1 & Comparison of complete IHC portfolio aggregated TCM with 10-Day VaR 
  & a) Take the available complete IHC portfolio. b)~Obtain the same COB production 10~Day VaR\@. c)~Ensure trade population and notional match between TCM data and VaR data 
  & 10~Day VaR should be lower and account for the gap risk in CVA Closeout
  & This test was deemed unfit as variance between VaR and CVA Closeout can be because of various reasons like difference in choice of risk factors, etc. \\ 
\addlinespace
2 & Same trade Stressed CVA vs CVA Closeout
  & a) Choose a swap with one year maturity. b)~Apply both methodologies on the swap. c)~Plot the exposure profile on a graph 
  & For Swap the profile should be forward declining slope and in case of CVA closeout there should be a spike post the 1 year mark. 
  & The same result can be implied from already-run test cases. \\ 
\addlinespace
3 & Same trade Stressed CVA vs CVA Closeout
  & a) Choose an option with one year maturity. b)~Apply both methodologies on the swap. c)~Plot the exposure profile on a graph 
  & For option it should be a straight line for both Stressed CVA and CVA Closeout. Just that for CVA closeout there should be a spike post expiry. 
  & The same result can be implied from already-run test cases.\\ 
\addlinespace
4 & Swap with IM and without IM 
  & a) Take one year swap and run it with~IM\@. b)~Take the same swap and run it without~IM\@. Note: Please use CVA closeout model in both cases.
  & With IM graph should start higher, converging into without IM towards expiry.
  & The same result can be implied from already-run test cases.\\ 
\bottomrule
\end{tabularx}
\end{table}
\end{document}

관련 정보