연속된 분수는 읽기 어렵습니다.

연속된 분수는 읽기 어렵습니다.

그래서 이런 종류의 관계는이것n=[1,2,3...20]에 대해 숫자 [1...n]에서 π를 만드는 방법에 대한 Puzzling.SE의 질문입니다. 나는 현재 다음을 사용하여 문서 작업을 하고 있습니다.L A T E X모든 n=[1,2,3...20]이 파악되면 온라인 참고 자료로 게시할 예정입니다.

나는 현재 정보에 대한 커뮤니티 위키 답변을 작업 중이며 나중에 수행할 필요가 없도록 n=17로 이동하여 해당 공식을 입력하기로 결정했습니다.

현재 n=20에 대한 연속 분수가 매우 작아 보이기 때문에 읽기 어려운 문제가 있습니다.

그러나 이것이 내가 처리해야 할 문제인 경우에는 수식이 \hlines 사이에 뭉개져도 괜찮습니다.

문제 사진:


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


암호:

\documentclass[12pt]{article}
\begin{document}

\begin{table*}
\begin{tabular}{|c|c|c|c|}
\hline
$n=$&Formula&Error&Credit\\\hline
1&1=1&2.14E0&Simd, 2012rcampion\\\hline
2&1+2=3&1.42E$-1$&Simd, 2012rcampion\\\hline
3&3=3&1.42E$-1$&Simd, 2012rcampion\\\hline
4&3+$\frac1{2\times4}=3.125$&1.66E$-2$&Simd, 2012rcampion\\\hline
5&3+$\frac1{2+5}=\frac{22}7$&1.26E$-3$&2012rcampion\\\hline
17&$\left(\frac1{10}\right)^{(4-6)/3}+8^{5-11}$&5.28E$-9$&CrSb0001\\&$-\frac7{12-2}-\frac{17-13}{14-9}$&&\\\hline
18&&&\\\hline
19&&&\\\hline
20&$3+\frac1{7+\frac{6-5}{15+\frac2{(10-8)+\frac{11-9}{(20\times14+12)+\frac{17-16}{13\times4}}}}}$&2.21E$-13$&Bubbler\\\hline
\end{tabular}
\end{table*}
\end{document}

읽기 쉽도록 연속된 분수를 더 크게 만들 수 있는 방법이 있나요? 을 사용해 보았지만 \dfrac분수가 완전히 깨졌습니다.

편집: 이것이 "분수를 완전히 깨뜨린다"는 의미입니다.

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

답변1

편집하다:
@Mico 주석을 고려하고 세 번째 열 유형(1.2e3 --> 1.2e-2) 및 siunitx 사양( print-zero-exponent에 옵션 추가 sisetup)에 대한 사양을 변경하세요.

이와 같이?

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

tabularray위 표의 경우 라이브러리가 포함된 패키지가 사용되었으며 두 번째 열은 수학 모드로 왼쪽 정렬되도록 정의되었으며 세 번째 열은 amsmath패키지 에 정의된 유형 입니다 .siunitxSsiunitxtabularray

표가 꽤 넓기 때문에 표의 \small글꼴 크기를 사용했습니다.

\documentclass[12pt]{article}
\usepackage[margin=25mm]{geometry}
\usepackage{tabularray}
\UseTblrLibrary{amsmath, siunitx}
\sisetup{print-zero-exponent,
         tight-spacing}
\usepackage{nccmath}   % for `\mfrac` (medium size fraction)

\begin{document}
    \begin{table}
\begin{tblr}{hlines, vlines,
             colspec = {Q[c]
                        X[l, mode=math]
                        Q[l, si={table-format=1.2e-2}]
                        l},
            row{1}   = {guard, c, mode=text},
            row{2-Z} = {rowsep = 5pt},
               cells = {font=\small}
             }
$n$ & Formula   & Error     & Credit                \\ 
1   & 1=1       & 2.14E 0   & Simd, 2012rcampion    \\ 
2   & 1+2=3     & 1.42E-1   & Simd, 2012rcampion    \\
3   & 3=3       & 1.42e-1   & Simd, 2012rcampion    \\ 
4   & 3+\mfrac1{2\times4}=3.125
                & 1.66e-2   & Simd, 2012rcampion    \\ 
5   & 3+\mfrac1{2+5}=\mfrac{22}7
                & 1.26E-3   &   2012rcampion        \\
17  & \Bigl(\frac1{10}\Bigr)^{(4-6)/3}+8^{5-11} - \frac7{12-2} - \frac{17-13}{14-9}
                & 5.28E-9   & CrSb0001              \\
18  &           &           &                       \\ 
19  &           &           &                       \\ 
20  & 3+\cfrac1{7+\cfrac{6-5}{15+\cfrac2{(10-8)+\cfrac{11-9}{(20\times14+12)+\cfrac{17-16}{13\times4}}}}}
                & 2.21E-13  & Bubbler               \\
\end{tblr}
    \end{table}
\end{document}

답변2

지시문 을 제거 \hline하거나 지시문으로 바꾸십시오 \addlinespace. 그리고 모든 수직적 규칙을 제거하세요.

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

\documentclass[12pt]{article}
\usepackage[margin=1in,letterpaper]{geometry} % set page parameters as needed
\usepackage{array} % for '\newcolumntype' macro
\newcolumntype{L}{>{$}l<{$}}
\usepackage{amsmath}  % for '\cfrac' macro
\usepackage{booktabs} % for well-spaced horizontal rules
\begin{document}

\begin{table}[ht]
\footnotesize % optional, for a 20% linear reduction in font size
\centering
$\begin{array}{@{} c >{\displaystyle}l L L @{}}
\toprule
n & \text{Formula} & Error & Credit\\
\midrule
1   & 1=1   & 2.14E0  & Simd, 2012rcampion\\ \addlinespace
2   & 1+2=3 & 1.42E-1 & Simd, 2012rcampion\\ \addlinespace
3   & 3=3   & 1.42E-1 & Simd, 2012rcampion\\ \addlinespace
4   & 3+\frac{1}{2\cdot4}=3.125 & 1.66E-2 & Simd, 2012rcampion\\ \addlinespace
5   & 3+\frac{1}{2+5}=\frac{22}{7} & 1.26E-3 & 2012rcampion\\ \addlinespace
\vdots \\ \addlinespace
17  & \Bigl(\frac{1}{10}\Bigr)^{(4-6)/3} 
      -\frac{7}{12-2}-\frac{17-13}{14-9} 
    & 5.28E-9 & CrSb0001\\ \addlinespace
18  &  \dots \\ \addlinespace
19  &  \dots \\ \addlinespace
20  & 3+\cfrac{1}{7+\cfrac{6-5}{15+\cfrac{2}{(10-8)+\cfrac{11-9}{(20\cdot14+12)+\cfrac{17-16}{13\cdot4}}}}} 
    & 2.21E-13 & Bubbler \\ \addlinespace
\bottomrule
\end{array}$
\end{table}

\end{document}

답변3

나는 좀 더 개방적인 모습을 선택합니다. siunitx세 번째 열에 도 사용하는 것이 가장 좋은 것 같습니다.

글꼴을 로 설정 \small하고 에서 이어지는 분수를 설정하면 \footnotesize표를 표준 텍스트 너비로 설정할 수 있습니다. 그러나 이러한 조정은 사용하는 텍스트 너비에 따라 달라집니다.

\documentclass[12pt]{article}
\usepackage{amsmath}
\usepackage{booktabs}
\usepackage{siunitx}

\sisetup{
  output-exponent-marker=\mathrm{E},
}

\begin{document}

\begin{table}
\centering
\small
\addtolength{\tabcolsep}{-2pt}

\begin{tabular}{@{}ccS[table-format=1.2e-1]c@{}}
\toprule
$n$ & Formula & {Error} & Credit\\
\midrule
 1 & $1=1$ & 2.14E0 & Simd, 2012rcampion\\
\addlinespace
 2 & $1+2=3$ & 1.42E-1 & Simd, 2012rcampion\\
\addlinespace
 3 & $3=3$ & 1.42E-1 & Simd, 2012rcampion\\
\addlinespace
 4 & $3+\frac1{2\times4}=3.125$ & 1.66E-2 & Simd, 2012rcampion\\
\addlinespace
 5 & $3+\frac1{2+5}=\frac{22}7$ & 1.26E-3 & 2012rcampion\\
\addlinespace
17 & $\left(\frac1{10}\right)^{(4-6)/3}+8^{5-11}-\frac7{12-2}-\frac{17-13}{14-9}$ & 
  5.28E-9 & CrSb0001\\
\addlinespace
18 & & & \\
\addlinespace
19 & & & \\
\addlinespace
20 & 
  \footnotesize
  $3+\cfrac{1}{
    7+\cfrac{6-5}{
      15+\cfrac{2}{
        (10-8)+\cfrac{11-9}{
          (20\times14+12)+\cfrac{17-16}{
            13\times4
          }
        }
      }
    }
  }$ & 2.21E-13 & Bubbler\\
\addlinespace
\bottomrule
\end{tabular}

\caption{The caption}
\end{table}

\end{document}

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

-2pt? 왜냐하면 이렇게 조정하지 않고 테이블을 설정하면 과잉 공간이 조금 줄어들고 12pt활용할 수 있는 열 사이의 공간이 6개가 되기 때문입니다.

또는 다음을 수행할 수도 있습니다.

\begin{table}
\centering
\small
\setlength{\tabcolsep}{0pt}

\begin{tabular*}{\textwidth}{
  @{\extracolsep{\fill}}
  c
  c
  S[table-format=1.2e-1]
  c
}
[identical body of the tabular]
\end{tabular*}

\caption{Table caption}

\end{table}

관련 정보