Text Formattingyfonts | Initial Letter and Position of surrounding Text

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
latex_newbie
Posts: 7
Joined: Tue Jul 03, 2012 3:09 pm

yfonts | Initial Letter and Position of surrounding Text

Post by latex_newbie »

I've got a problem with the yfonts package and its \yinipar command. The code looks like this:

Code: Select all

\chapter*{Prolog}
{\frakfamily\fraklines
   \yinipar{S}
   \par
  }
pacerował tak już z kilkadziesiąt minut, tracąc, z każdą chwilą coraz bardziej, rachubę czasu, tkwiąc w jakiejś nieokiełznanej myśli, która powoli stawała się natręctwem. (...)
I want to make an initial letter with \yinipar and then switch back to my normal Computer Modern font for the rest of the paragraph. In a sense, I have already achieved it.
However, the other part of the paragraph, instead of neatly surrounding the initial letter, simply gets behind it (the initial letter graphic and the text of the rest of the paragraph overlap - vide: the attachment).

I don't know how to get rid of this overlapping. If I don't use only \yinipar like this:

Code: Select all

\chapter*{Prolog}

\yinipar{S}pacerował tak już z kilkadziesiąt minut, tracąc, z każdą chwilą coraz bardziej, rachubę czasu, tkwiąc w jakiejś nieokiełznanej myśli (...)
then the result is even worse as the graphic of the initial letter goes more in the middle of the page, instead of actually initiating the paragraph.

Any suggestions on how this could be fixed?
Attachments
initial.jpg
initial.jpg (42.92 KiB) Viewed 3219 times

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

wpr
Posts: 1
Joined: Mon Oct 29, 2012 9:17 pm

yfonts | Initial Letter and Position of surrounding Text

Post by wpr »

This requires that the braces contain at least four lines of text since the height of the initial is just four lines. Otherwise, it is necessary to add enough vertical space to avoid overlapping.

A complete sample has been given below:

Code: Select all

\documentclass{book}

\usepackage{yfonts}
\usepackage[cp1250]{inputenc}
\usepackage[T1]{fontenc}

\begin{document}

\chapter*{Prolog}

{\yinipar{S}pacerował tak już z kilkadziesiąt minut, tracąc, z każdą chwilą
 coraz bardziej, rachubę czasu, tkwiąc w jakiejś nieokiełznanej myśli, która
 powoli stawała się   natręctwem. (...)\\
 \indent
 Spacerował tak już z kilkadziesiąt minut, tracąc, z każdą chwilą
 coraz bardziej, rachubę czasu, tkwiąc w jakiejś nieokiełznanej myśli, która
 powoli stawała się   natręctwem. (...)
\par}

\indent
Spacerował tak już z kilkadziesiąt minut, tracąc, z każdą chwilą
coraz bardziej, rachubę czasu, tkwiąc w jakiejś nieokiełznanej myśli, która
powoli stawała się   natręctwem. (...)

{\yinipar{S}pacerował tak już z kilkadziesiąt minut, tracąc, z każdą chwilą
 coraz bardziej, rachubę czasu, tkwiąc w jakiejś nieokiełznanej myśli, która
 powoli stawała się   natręctwem. (...)
\par}

\vspace{1em}
\indent
Spacerował tak już z kilkadziesiąt minut, tracąc, z każdą chwilą
coraz bardziej, rachubę czasu, tkwiąc w jakiejś nieokiełznanej myśli, która
powoli stawała się   natręctwem. (...)

\end{document}
The result produced by the given code.
The result produced by the given code.
sample.png (96.91 KiB) Viewed 3124 times
Post Reply