Bài viết hướng dẫn bạn tạo drop cap giống như bên trong Word và trang trí nó bằng các hiệu ứng khác nhau cho đẹp.
Cách đơn giản nhất
![notion image](https://www.notion.so/image/http%3A%2F%2Fres.cloudinary.com%2Ftexmathcom%2FLaTeX-drop-cap-trong-latex-0.jpg?table=block&id=f5a8171d-d8aa-499c-bac9-e68823189619&cache=v2)
\usepackage{lettrine} % đặt trước \begin{document} \lettrine[lines=2]{B}{egin} the paragraph. %EGIN viết hoa \lettrine[lines=2]{B}egin the paragraph. %Egin
Tùy chỉnh mặc định để khi dùng đơn giản nhất
![notion image](https://www.notion.so/image/http%3A%2F%2Fres.cloudinary.com%2Ftexmathcom%2FLaTeX-drop-cap-trong-latex-1.jpg?table=block&id=ee885993-7fa0-4812-aa0f-c9cbb30c89ba&cache=v2)
% Đặt trước \begin{document} \usepackage{lettrine} \newcommand{\chudau}[1]{% \lettrine[lines=3,lhang=0.33,nindent=0em]{ \color{gray} {\textsc{#1}}}{}} % Cách dùng \chudau{B}egins a chapter.....
Trang trí chữ đầu tiên đẹp
![notion image](https://www.notion.so/image/http%3A%2F%2Fres.cloudinary.com%2Ftexmathcom%2FLaTeX-drop-cap-trong-latex-2.jpg?table=block&id=9f9a1691-0bec-428e-b89a-195965132167&cache=v2)
% Đặt trước \begin{document} \usepackage{yfonts,color} % Cách dùng \yinipar{\color{red}L}orem ipsum [...]
Nếu bạn muốn ngắn gọn khi sử dụng thì dùng đoạn code sau
% Đặt trước \begin{document} \usepackage{yfonts,color} \newcommand{\chudau}[1]{% \yinipar{\color{red}#1}} % Cách dùng \chudau{B}egins...
Kiểu chữ rừng rậm
![notion image](https://www.notion.so/image/http%3A%2F%2Fres.cloudinary.com%2Ftexmathcom%2FLaTeX-drop-cap-trong-latex-3.jpg?table=block&id=d38fe15a-3d6a-46ed-87c6-86c5c84411e7&cache=v2)
% Đặt đoạn code sau trước \begin{document} \usepackage{xcolor} \definecolor{darkgreen}{RGB}{0,80,0} \usepackage{fancyhdr} \usepackage{lettrine} \input Acorn.fd \newcommand*\initfamily{\usefont{U}{Acorn}{xl}{n}} \newcommand{\chudau}[1]{% \lettrine[lines=3]{\initfamily\textcolor{darkgreen}{#1}} } % Cách dùng \chudau{F}ont rất đẹp này...
Sẽ cập nhật thêm nhiều cách khác, ở trên bạn có thể "bắt chước" chuyển từ việc dùng thủ công sang dùng nhanh \chudau{} bằng cách thêm bớt vào dòng \newcommand, thay đổi các thuộc tính có sẵn trong đó. Math2IT sẽ có bài viết nói về việc tạo command mới này.