왼쪽 여백에 따옴표와 함께 구두점이 있습니까?

왼쪽 여백에 따옴표와 함께 구두점이 있습니까?

Plain TeX에는 일부 텍스트의 바로 왼쪽에 있는 구두점/문자가 여백에 효과적으로 배치되는 내어쓰기 구두점을 만드는 방법이 있습니다.

인용문 본문을 양쪽으로 들여쓰되 여는 따옴표가 여는 문자의 왼쪽에 오도록 따옴표를 사용하여 이 작업을 수행하고 싶습니다. 이것이 내가 원하는 효과입니다.

``Lord Bacon, in 'the true marshalling of the sovereign degrees of
  honor,' assigns the first place to 'the Conditores Imperiorum, 
  founders of States and Commonwealths'; and, truly, to build up from 
  the discordant elements of our nature the passions, the interests, 
  and the opinions of the individual man, the rivalries of family, clan, 
  and tribe, the influences of climate and geographical position, the
  accidents of peace and war accumulated for ages,– to build up from these 
  oftentimes warring elements a well-compacted, prosperous, and powerful 
  State, if it were to be accomplished by one effort or in one generation
  would require a more than mortal skill.''

다음을 사용하여 이 작업을 수행할 수 있습니다 quote.

\begin{quote}
{}\hspace{-5pt}{``}Lord Bacon, in 'the true marshalling

would require a more than mortal skill.''   
\end{quote}

하지만 그건 서투른 것 같아요. 더 좋은 방법이 있나요?

답변1

귀하의 방법은 {}\hspace{-5pt}{``}선행 따옴표의 실제 너비를 추측해야 하는 한 서투릅니다 ``. 이러한 계산을 피하는 방법은 \makebox[0pt][r]{``}너비가 0인 오른쪽 정렬 상자를 배치하여 텍스트를 왼쪽으로 효과적으로 배치하는 매크로를 사용하는 것입니다. 그러나 보시다시피 입력 시간이 많이 절약되지는 않습니다.

따라서 이를 처리하는 한 가지 방법은 해당 매크로를 자체에 넣고 \def호출 하여 내 MWE의 첫 번째 예에서와 같이 인용문의 첫 번째 항목으로 \andIquote호출하는 것입니다 .\andIquote

아마도 두 번째 인용문에서 했던 것처럼 더 나은 방법은 quoted환경의 시작과 끝 부분에 자동으로 인용문을 배치하는 새로운 환경을 만드는 것입니다.

\documentclass{article}
\def\andIquote{\makebox[0pt][r]{``}}
\newenvironment{quoted}
{\quote\andIquote\ignorespaces}{\unskip''\endquote}
\begin{document}

\begin{quote}
\andIquote Lord Bacon, in 'the true marshalling

would require a more than mortal skill.''   
\end{quote}

\begin{quoted}
Lord Bacon, in 'the true marshalling

would require a more than mortal skill.   
\end{quoted}
\end{document}

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

답변2

내가 정확하게 기억한다면, 이것은 Knuth의 정의에 대한 이론적 근거 중 하나입니다 \llap. 이것은 라텍스로 옮겨졌습니다. 실제로는 가로 모드에서만 사용해야 하므로 \noindent인용된 단락의 시작 부분에 다음을 사용하여 확인해야 합니다.

\begin{quote}
\noindent\llap{``}Lord Bacon, in 'the true marshalling ...

답변3

Steven Segletes의 답변 외에도 (인터페이스 측면에서)인용문인용문을 표시하기 위한 자동 환경을 생성하기 위한 다양한 후크를 제공하는 패키지입니다. 이 방법의 잠재적인 이점은 인용 시작 부분에 추가할 필요가 없다는 점입니다 \andIquote. 모든 인용문의 스타일을 이 방식으로 지정하면 자동으로 추가됩니다.

"사용자" 구문은 다음과 같습니다.

\begin{displayquote}[cite][closing-punctuation] 
...
\end{displayquote}

에서 제공하는 "후크"를 사용 \mkbegispquote하면 \mkenddispquote표시된 각 인용문 주위에 여는 따옴표와 닫는 따옴표가 자동으로 배치되도록 배열할 수 있습니다. (나는 여백에 따옴표를 넣는 Steven의 방법에 대한 대안도 제시했지만 그의 방법도 똑같이 잘 작동할 것입니다.)

\documentclass{article}
\usepackage{csquotes}

\renewcommand{\mkbegdispquote}[2]{\strut\llap{``}}
% #1 is closing punctuation, #2 is citation. 
% We don't use them in this instance, but they
% need to be "catered for"
\renewcommand{\mkenddispquote}[2]{#1''\ifblank{#2}{}{#2}}
% #1 is closing punctuation, #2 is citation.
% again, we provide for them if needed

\begin{document}
\begin{displayquote}
Here is a displayed quotation, which should be long enough to go over a number
of lines. In this case I have not specified any closing punctuation or citation
for the quotation.
\end{displayquote}

\begin{displayquote}[][\ldots]
Here is another displayed quotation. In this case there is some specified
punctuation which goes at the end of the quotation before the closing mark.
\end{displayquote}

\begin{displayquote}[cite]
Here is yet another displayed quotation, this time with a citation to be included
in the mix, which will be printed at the end of the quotation, after the quotes 
are closed.
\end{displayquote}

\end{document}

세 가지 인용 예

관련 정보