Mosaic of Love

Creating aesthetic documents in LaTeX is not limited to scientific articles or textbooks. By using creative packages like shapepar and pgfornament, we can arrange text or poetry into unique shapes, one of which is a heart shape.
This article reviews the complete LaTeX code to create a heart-shaped paragraph of lyrics titled My Heart, decorated with elegant classical ornaments above and below it.
Introduction
Heart-shaped text is perfect for greeting cards, poetry posters, or romantic gifts. In LaTeX, this can be achieved precisely using the shapepar package, which automatically adjusts line breaking algorithms to fit the text inside a heart contour perfectly.
Complete LaTeX Code
Here is the complete LaTeX code used to generate the heart-shaped poem layout with a custom header and ornaments:
\documentclass[]{standalone}
\usepackage[usenames,svgnames,dvipsnames]{xcolor}
\usepackage[bahasa]{babel}
\hyphenation{la-ngit}
\usepackage[object=vectorian]{pgfornament}
\usepackage[tikz]{bclogo}
\usepackage{pifont}
\usetikzlibrary{shapes,calc,snakes,arrows,shadows}
\usepackage{fancybox}
\usepackage[most]{tcolorbox}
\usepackage{graphicx,lmodern}
\usepackage{shapepar}
\usepackage{fancyheadings}
\usepackage[explicit]{titlesec}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\let\oldding\ding% Store old \ding in \oldding
\renewcommand{\ding}[2][1]{\scalebox{#1}{\oldding{#2}}}% Scale \oldding via optional argument
\begin{document}
%\pagestyle{empty}
\color{Maroon}
%\begin{center}
\begin{tikzpicture}[every node/.style={inner sep=0pt}]
\node[text width=14cm,align=center](Text){%
{\centering
\begin{tikzpicture}
\node [Blue,font=\large\bfseries] at (0,-0.4) {\LARGE{My Heart}};
\node [Maroon,font=\large\bfseries] at (0,-0.8) {\Large{}};
\node [anchor=south] at (0,0.5) {\pgfornament[width=3cm]{69}};
\node [anchor=north] at (0,-1.2) {\pgfornament[width=3cm,symmetry=c]{69}};
\end{tikzpicture}
\par}
\begin{center}
\bigskip
{\it\large
\fontfamily{pzc} \itshape \selectfont
\medskip
{\heartpar{\emph{ {\Large{\color{blue}
Disini kau dan aku.
Terbiasa bersama.
Menjalani kasih sayang.
Bahagia kudenganmu.
Pernahkah kau menguntai.
Hari paling indah.
Ku ukir nama kita berdua.
Di sini surga kita.
Bila kita mencintai yang lain.
Mungkinkah hati ini akan tegar.
Sebisa mungkin tak akan pernah.
Sayangku akan hilang.
If you love somebody.
Could we be this strong.
I will fight to win.
Our love will conquer all.
Wouldn't risk my love.
Even just one night.
Our love will stay in my heart.
My heart.
Pernahkah kau menguntai.
Hari paling indah.
Ku ukir nama kita berdua.
Disini surga kita.
Bila kita mencintai yg lain.
Mungkin kah hati ini akan tegar.
Sebisa mungkin tak akan pernah.
Sayangku akan hilang.
Bila kita mencintai yang lain.
Mungkinkah hati ini akan tegar.
Sebisa mungkin tak akan pernah.
Sayang ku akan hilang.
If you love somebody.
Could we be this strong.
I will fight to win.
Our love will conquer all.
Wouldn't risk my love.
Even just one night.
Our love will stay in my heart.
My heart my heart.
My heart. }}}}}}
\end{center}
} ;
\end{tikzpicture}
\thispagestyle{empty}
\end{document}The output of the code is as follows:

Detailed Code Explanation
Let’s dissect the key parts of the LaTeX code:
1. Document Class and Packages
\documentclass[]{standalone}
The standalone class generates a PDF page cropped precisely to the size of the elements drawn (the TikZ picture).\usepackage{shapepar}
This provides the core command\heartparwhich reshapes the paragraph boundary into a heart.\usepackage[object=vectorian]{pgfornament}
Loads beautiful Victorian vector ornaments to decorate the title.\usepackage[usenames,svgnames,dvipsnames]{xcolor}
Defines standard and custom named colors (e.g.MaroonandBlue).
2. Font and Color Customization
Inside the poem paragraph, we see:
\fontfamily{pzc} \itshape \selectfont- This switches the typeface to Zapf Chancery (
pzc), which is an elegant, calligraphy-style typeface. It adds a sophisticated and romantic feel to the text. - The colors are coordinated using a deep
Maroonfor the outer/top structure andBluefor the main header and heart text.
3. Formatting the Heart Paragraph (\heartpar)
The lirik or poem is wrapped in \heartpar{...}.
- Do not use manual line breaks (
\\) inside\heartpar, as this breaks the line-breaking algorithm that maps words into the heart layout. - If the paragraph is too short, the shape will look distorted. If it is too long, it might overflow. Adjust font size or text length accordingly.
4. Vector Ornaments (pgfornament)
We use ornament 69 above and below the title:
\pgfornament[width=3cm]{69}
\pgfornament[width=3cm,symmetry=c]{69}symmetry=c applies a central symmetry rotation to the bottom ornament to mirror the top ornament perfectly.
How to Compile the Document
To compile this LaTeX document:
- Copy the code above and save it as
mosaic-love.tex. - Ensure
shapeparandpgfornamentpackages are installed in your TeX distribution (or use an online platform like Overleaf where they are pre-installed). - Compile using the pdfLaTeX or XeLaTeX engine.
- The output will be a single-page PDF containing the beautiful layout.
Conclusion
Combining shapepar and pgfornament within TikZ unlocks highly artistic typesetting possibilities. You can easily replace the text with your own lyrics, quotes, or cards. Happy LaTeXing!




