
이 질문은 예전에 제기되었던 질문의 연장선입니다.DIY 편지지의 이미지에 글자 추가하기
MWE를 고려해보세요
\documentclass{book}
\usepackage{lettrine}
\usepackage{xcolor}
\definecolor{imperialred}{RGB}{239, 38, 50}
\definecolor{deepskyblue}{RGB}{34, 154, 202}
\usepackage{scalerel,stackengine}
\setlength{\textwidth}{5.25in}
\fboxsep=2.25pt
\newcommand\my[2][7ex]{\scaleto{\colorbox{deepskyblue}{%
\textcolor{imperialred}{\abovebaseline[0pt]{#2}}}}{#1}\,}
\begin{document}
\thispagestyle{empty}
\LARGE
\lettrine[nindent=.4em]{\bfseries\my I}{} would like add a frame (or perhaps, some other kind of a decorative border) around this this box.
\lettrine[nindent=.4em]{\my T}{he} commands of tcolorbox do not seem to be applicable here.
\end{document}
출력과 함께
질문: 파란색 "DIY" 렛트린 주위에 조절 가능한 두께의 컬러 프레임(또는 다른 종류의 장식 테두리)을 어떻게 추가할 수 있습니까?
감사합니다.
답변1
이 프레임의 두께를 설정하려면 컬러 프레임과 \fboxrule`을 추가하는 \fcolorbox
대신 사용할 수 있습니다 .\colorbox
당연히 or \lettrine
의 사용을 피하도록 명령을 설정했습니다 . 원하는 형식과 일치하는지 확실하지 않지만 미세 조정에 대한 아이디어를 얻을 수 있기를 바랍니다. 또한 예제를 더 간단하게 만들고 더 많은 더미 텍스트를 추가하여 드롭 자본이 원활하게 맞는지 확인하기 위해 매크로를 피했습니다.\scaleto
\abovebaseline
\documentclass{book}
\usepackage{lettrine, lipsum}
\usepackage{xcolor}
\definecolor{imperialred}{RGB}{239, 38, 50}
\definecolor{deepskyblue}{RGB}{34, 154, 202}
\begin{document}
\LARGE
\lettrine[lines=3,loversize=.6,lraise=.1,nindent=.5em]{\fboxsep5pt\fboxrule5pt\fcolorbox{imperialred}{deepskyblue}{\color{imperialred}I}}{} would add a frame (or perhaps, some other kind of a decorative border around this this box. \lipsum[1][1-4]
\lettrine[lines=3,loversize=.6,lraise=.1,nindent=.5em]{\fboxsep5pt\fboxrule5pt\fcolorbox{imperialred}{deepskyblue}{\color{imperialred}T}}{he} commands of tcolorbox do not seem to be applicable here.
\lipsum[1][1-4]
\end{document}