colorlettrine은 몇 개의 문자만 지원합니다.

colorlettrine은 몇 개의 문자만 지원합니다.

colorlettrine 패키지를 사용하려고합니다. EB Garamond 패키지를 설치했는데 곧 몇 글자만 지원된다는 사실을 알게 되었습니다. 예를 들어 S를 시도하면 빈 상자로 나타납니다.

비슷한 효과를 얻기 위해 시도할 수 있는 몇 가지 대안이 있습니까?

더 많은 캐릭터를 추가하기 위해 어떤 작업을 할 수 있는지 아는 사람이 있나요?

답변1

TeX.SE에 오신 것을 환영합니다. coloredlettrine각 글리프는 앞면(문자)과 뒷면(장식)의 두 부분으로 구성되어 있기 때문에 구별됩니다. 이는 장식과 구별되는 방식으로 문자를 채색할 수 있는 기회를 만듭니다. 그러나 아시다시피 A, F, G, L, N, O, Q 및 T의 몇 가지 문자만 사용할 수 있습니다.

레트린을 제작하는 데 사용할 수 있는 장식적인 이니셜이 있는 글꼴이 꽤 많이 있습니다. 참조TUG 글꼴 카탈로그. GoudyInGoudy Initialen 글꼴에 액세스하기 위해 패키지를 사용했습니다 .

패키지 lettrine는 그래픽을 레트린으로 사용하는 옵션도 제공합니다. 저는 웹 어딘가에서 가져온 장식용 글자에 이 방법을 사용합니다. 출처를 표기하지 않은게 아쉽네요.

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

% Compile with xelatex or lualatex
% The two EB Garamond Initials fonts must be installed to use \coloredlettrine.
% Graphics with the file names m.jpg, n.jpg and o.jpg, or any 
% other graphic file format must be available to use \lettrine[image...
\documentclass[10pt,a4paper]{article}
\usepackage[margin=2.5cm]{geometry}
\usepackage{graphicx}
\usepackage{fontspec}
%https://github.com/raphink/coloredlettrine; also on CTAN
\usepackage{coloredlettrine} %loads [svgnames]{xcolor} and {lettrine}
% Requires 2 fonts:
% EB Garamond Initials Fill1 Regular
% EB Garamond Initials Fill2 Regular
\setmainfont[RawFeature={+ss02,+cv01,+ss05,+dlig},
             ItalicFeatures={RawFeature=+cv04}]{EB Garamond}
\renewcommand{\EBLettrineBackColor}{NavyBlue}
\renewcommand{\EBLettrineFrontColor}{Maroon}

\usepackage{lettrine} 
\usepackage{GoudyIn}
\usepackage[svgnames]{xcolor}

\renewcommand\LettrineFontHook{\color{Maroon}\GoudyInfamily{}}%
\renewcommand{\LettrineTextFont}{}
\newcommand*{\mylettrine}[1]{\lettrine[lines=1,realheight=false,findent=3pt,nindent=0pt]{#1}{}}

\begin{document}

\coloredlettrine[lines=1,realheight=false,findent=3pt,nindent=0pt]{A}{apt}\linebreak
\coloredlettrine[lines=1,realheight=false,findent=3pt,nindent=0pt]{G}{apt}\linebreak
\coloredlettrine[lines=1,realheight=false,findent=3pt,nindent=0pt]{T}{apt}\linebreak

\renewcommand\LettrineFontHook{\color{Maroon}\GoudyInfamily{}}%
\renewcommand{\LettrineTextFont}{}

\mylettrine{A}{apt}
\mylettrine{B}{apt}
\mylettrine{C}{apt}

\lettrine[image,lines=1,realheight=false,findent=3pt,nindent=0pt]{M}{apt}
\lettrine[image,lines=1,realheight=false,findent=3pt,nindent=0pt]{N}{apt}
\lettrine[image,lines=1,realheight=false,findent=3pt,nindent=0pt]{O}{apt}
 
\end{document}

관련 정보