I'm working on my thesis dissertations, and I'd like to convert the first word of each section to dropcaps automatically.
I know how to do this manually using the lettrine package. But I would like to automate this. Every section starts with a normal word no quotes or fancy stuff before the text.
\section{What is Lorem Ipsum?}
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam vehicula purus ac ligula consectetur porta. Mauris eget condimentum magna. Vivamus tempus lacus dolor, nec pharetra massa porttitor in. Nunc fermentum tellus at orci lobortis gravida. Sed eget quam vel ante scelerisque venenatis. Interdum et malesuada fames ac ante ipsum primis in faucibus. Vivamus a quam mauris. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut quam est, molestie eget leo eu, aliquam tincidunt urna. Nulla facilisi.
I've tried to apply this solution Automatic dropcaps for the first letter of a chapter With no success.
Note: I use pdflatex.
This is the macro I tried with no success:
\usepackage{lettrine}
\usepackage{xstring}
\makeatletter
\let\ltx@@section@section
\def@section[#1]#2 #3 {\ltx@@section[#1]{#2}\lettrine[nindent=0em]{@tempa}{@gobble#3}\ }
\makeatother
`

MWEas in executable format, at least mention which class file you are using? – MadyYuvi Oct 06 '21 at 13:56\sectionis defined in a rather a different way to\chapter, so it is rather hard to patch in a way like this. – Andrew Swann Oct 06 '21 at 14:16\sectionwe would need to know how\sectionis defined. It is not defined by latex, but by the document class (and possibly redefined by packages) that you are using and have given no information. – David Carlisle Oct 06 '21 at 18:06