itemize 환경에서 텍스트 정렬

itemize 환경에서 텍스트 정렬

"Aims"(1,2,3...etc) 목록을 레이블로 생성하고 \item, 목표에 대한 텍스트는 인접해 있습니다( \hspace{Xmm}). 줄 너비를 초과하는 항목의 경우 두 번째 줄 정렬은 바람직하지 않습니다. 나는 그것이 플러시되기를 바랍니다.

지금까지 내가 가진 것은 다음과 같습니다.

\documentclass{article}
\usepackage{enumitem}
\usepackage[top=1in, bottom=1.5in, left=1in, right=1in]{geometry}
\begin{document}
\begin{itemize}[leftmargin=*,align=left]
\item[Aim 1] \hspace{10mm} This aim fits nicely on to a single line.
\item[Aim 2] \hspace{10mm} Unfortunately, the details of this aim are such that they will not fit on to a single line. Instead, the text aligns strangely beneath the "Aim 2" item label :(
\end{itemize}
\end{document}

tabbing나는 이전에 원하는 출력에 매우 가까운 으로 이것을 시도했지만 두 번째 목표는 페이지 너비에 맞게 줄 바꿈되지 않았습니다.

\documentclass{article}
\usepackage{enumitem}
\usepackage[top=1in, bottom=1.5in, left=1in, right=1in]{geometry}
\begin{document}
\begin{tabbing}
\= \hspace{20mm} \= \\
\> {\bf Aim 1:} \> This aim fits nicely on to a single line.\\[10pt]
\> {\bf Aim 2:} \> Unfortunately, the details of this aim are such that they willnot fit on to a single line. Instead, the text aligns strangely beneath the "Aim 2" item label :(
\end{tabbing}
\end{document}

어떤 도움이나 조언이라도 미리 감사드립니다.

답변1

또 다른 옵션은 다음을 사용하는 것입니다.enumitem원하는 레이아웃을 갖는 새 목록을 정의하는 패키지( showframe에 대한 옵션은 geometry시각적 지침으로만 사용됨):

\documentclass{article}
\usepackage{enumitem}
\usepackage[showframe]{geometry}

\newlist{aims}{enumerate}{1}
\setlist[aims,1]{
  label={Aim~\arabic*},
  leftmargin=*,
  align=left,
  labelsep=10mm,
  itemindent=\dimexpr\labelsep+\labelwidth+7pt\relax
}

\begin{document}

\begin{aims}
\item This aim fits nicely on to a single line.
\item The details of this aim are such that they will not fit on to a single line. Now the text aligns with the margin.
\item This aim fits nicely on to a single line.
\item The details of this aim are such that they will not fit on to a single line. Now the text aligns with the margin.
\end{aims}

\end{document}

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

원하는 정렬이 확실하지 않으므로 여기에 또 다른 가능성이 있습니다.

\documentclass{article}
\usepackage{enumitem}
\usepackage[showframe]{geometry}

\newlist{aims}{enumerate}{1}
\setlist[aims,1]{
  label={Aim~\arabic*},
  leftmargin=*,
  align=left,
  labelsep=10mm,
}

\begin{document}

\begin{aims}
\item This aim fits nicely on to a single line.
\item The details of this aim are such that they will not fit on to a single line. Now the text aligns with the margin.
\item This aim fits nicely on to a single line.
\item The details of this aim are such that they will not fit on to a single line. Now the text aligns with the margin.
\end{aims}

\end{document}

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

답변2

정확히 무엇을 원하는지 잘 모르겠지만 시도는 다음과 같습니다.

\documentclass{article}

\newcounter{myenumi}
\renewcommand{\themyenumi}{(\roman{myenumi})}
\newenvironment{myenumerate}{%
% stuff for beginning of environment goes here
\setlength{\parindent}{0pt}% don't indent paragraphs
\setcounter{myenumi}{0}% restart numbering
\bigskip% skip a line
\renewcommand{\item}{% new definition of item
\par% start a new line
\refstepcounter{myenumi}% advance counter
\makebox[2.5em][l]{\themyenumi}% print counter to width of 3em, aligned to left
}% end of definition of item
}{% at end of environment
\par% start new paragraph
\bigskip% skip a line
\noindent% don't indent new paragraph
\ignorespacesafterend% ignore spaces after environment
}

\pagestyle{empty}

\begin{document}

\noindent Here is some regular text, and I'm going to go on a bit just to see where it wraps and all that.
\begin{myenumerate}
\item Here is the first item which goes on a bit so we can see how it wraps, and it still needs to be longer.
\item Here is another item.
\item Here is yet another item.
\item And this item is going to be much much longer so we can see another example of one that wraps.
\end{myenumerate}
Here is some more regular text, and let's go on a bit here too, just in case it's important how that looks too.

\end{document}

산출

추신: 이 코드를 원래 어디서 얻었는지 기억이 나지 않지만 제 코드는 아닙니다. (이 글을 본인이 쓴 글로 인식할 수 있거나 누가 쓴 것인지 알려주시면 답변을 삭제하고 게시하도록 하겠습니다.)

관련 정보