lettrine.sty 및 구성 방법 이해

lettrine.sty 및 구성 방법 이해

다음 코드에는 lettrine이 포함된 두 개의 단락이 있습니다. 왜 포맷이 다르게 되나요? 두 번째 코드에는 원하는 코드(구성 명령 포함)가 있지만 첫 번째 코드만 원하는 출력을 생성합니다(그러나 사용할 때마다 긴 명령 문자열을 추가해야 합니다).

왜 이런 일이 발생합니까? 두 번째 단락의 구성 방법으로 원하는 출력을 얻고 싶습니다. 어떤 도움이라도 미리 감사드립니다. (저는 texlive 2014에 포함된 lettrine ver1.64를 사용하고 있습니다)

\documentclass{book} 
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}     
\usepackage{lettrine}

\LettrineOptionsFor{W}{lines=3,lhang=0.070,findent=.40em,nindent=-0.3em,slope=-0.40em}
\setcounter{DefaultLines}{3}

\begin{document}

\lettrine[lines=3,lhang=0.070,findent=.40em,nindent=-0.3em,slope=-0.40em]{W}{\rm
  hat}
are interactions? At the start of this volume, when we summarized\linebreak
hat relates the Planck units to relativity and to quantum theory,\linebreak e
pointed out that the nature of interactions at Planck scales was still in the
dark. In this chapter ...

\lettrine{W}{\rm hat} are interactions? At the start of this volume, when we
summarized\linebreak hat relates the Planck units to relativity and to quantum
theory,\linebreak e pointed out that the nature of interactions at Planck
scales was still in the dark. In this chapter ...

\end{document}

답변1

라인을 추가해야합니다

\LettrineOptionsFor{W}{lines=3,lhang=0.070,findent=.40em,nindent=-0.3em,slope=-0.40em}

구성 파일에서 ( W.cfl가령) 호출한 다음

\renewcommand{\DefaultOptionsFile}{W.cfl}

다음을 수행할 수 있습니다.

\usepackage{filecontents}
\begin{filecontents}{W.cfl}
\LettrineOptionsFor{W}{lines=3,lhang=0.070,findent=.40em,nindent=-0.3em,slope=-0.40em}
\end{filecontents}

\renewcommand{\DefaultOptionsFile}{W.cfl}

tex 파일에 있습니다. 또한 (등과 같은 두 글자 글꼴 변경 명령 ​​모두)는 더 \rm이상 사용되지 않습니다. 이 효과를 얻으려면 다음을 사용할 수 있습니다.\bf\it

\renewcommand{\LettrineTextFont}{\normalfont}

당신의 서문에.

암호:

\documentclass{book}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{lettrine}

\usepackage{filecontents}
\begin{filecontents}{W.cfl}
\LettrineOptionsFor{W}{lines=3,lhang=0.070,findent=.40em,nindent=-0.3em,slope=-0.40em}
\end{filecontents}

\renewcommand{\DefaultOptionsFile}{W.cfl}
\renewcommand{\LettrineTextFont}{\normalfont}

\begin{document}

\lettrine[lines=3,lhang=0.070,findent=.40em,nindent=-0.3em,slope=-0.40em]{W}{hat}
are interactions? At the start of this volume, when we summarized\linebreak
hat relates the Planck units to relativity and to quantum theory,\linebreak e
pointed out that the nature of interactions at Planck scales was still in the
dark. In this chapter ...

\lettrine{W}{hat} are interactions? At the start of this volume, when we
summarized\linebreak hat relates the Planck units to relativity and to quantum
theory,\linebreak e pointed out that the nature of interactions at Planck
scales was still in the dark. In this chapter ...

\end{document}

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

관련 정보