목록의 일부를 오른쪽 정렬하여 항목을 나열하려면 어떻게 해야 합니까?

목록의 일부를 오른쪽 정렬하여 항목을 나열하려면 어떻게 해야 합니까?

다양한 부록을 모두 깔끔하게 나열하고 싶은 부록 제목 페이지가 있습니다. 내가 가지고 있는 코드는 다음과 같습니다.

\documentclass[letter,12pt]{article}
\usepackage{enumitem}

\begin{document}

\vfill

\LARGE\rmfamily\bfseries\centering APPENDICES

\noindent\textcolor{complement2}{\rule{0.75\textwidth}{2mm}}\par

\Large
\begin{enumerate}
    \item Appendix A\hfill CFD Results \\
    \item Appendix B\hfill Pump and Inlet Pipe Specifications\\
    \item Appendix C\hfill Technical Drawings \\
    \item Appendix D\hfill Cost Breakdown \\
    \item Appendix E\hfill Some super other different thing\\
\end{enumerate}

\vfill

\end{document}

기본적으로 'Appendix X'와 'Title'을 \hfill. 그런데 보시다시피 텍스트가 겹쳐서 다음 줄로 넘어갑니다.여기에 이미지 설명을 입력하세요

'사양'을 오른쪽 정렬하려면 어떻게 해야 합니까?

답변1

enumerate환경 내부의 환경을 에뮬레이트할 수 있습니다 tabularx.

\documentclass[letter,12pt]{article}
\usepackage{enumitem}
\usepackage[svgnames]{xcolor}
\usepackage{tabularx}

\begin{document}

\vfill

\LARGE\rmfamily\bfseries\centering APPENDICES

\noindent\textcolor{Peru!90}{\rule{0.75\textwidth}{2mm}}\par
\vspace{\dimexpr\baselineskip + \topsep\relax}
\Large
\renewcommand\arraystretch{1.4}
\newcounter{tabenum}\setcounter{tabenum}{0}
\newcommand{\tabitem}{\stepcounter{tabenum}\,\thetabenum.\hspace{\labelsep}}
\begin{tabularx}{\linewidth}{l>{\raggedleft\arraybackslash}X@{}}
    \tabitem Appendix A & CFD Results \\
    \tabitem Appendix B & Pump and Inlet Pipe Specifications\\
    \tabitem Appendix C & Technical Drawings \\
    \tabitem Appendix D & Cost Breakdown \\
    \tabitem Appendix E & Some super other different thing
\end{tabularx}
\vfill

\end{document} 

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

추가됨:

또 다른 (의미적으로 깔끔한) 가능성은 패키지의 부분 목차 기능을 사용하는 것입니다 titletoc. 부록 시작 부분에서 다음과 같은 명령을 사용할 수 있습니다.

\appendix
\startcontents[appendices]
  \section{CFD Results}
  \section{Some  super other different thing}
\stopcontents[appendices]

다음 명령을 사용하여 원하는 곳에 인쇄하십시오.

\printcontents[appendices]{Appendix}{1}{}

관련 정보