Adding an Image Underneath the Title on a Title Page
In this article, we will discuss how to add an image underneath the title on a title page in LaTeX. We will use the titling package and provide code examples for both simple and complex scenarios.
Introduction
When creating a document using LaTeX, it’s common to want to include additional content on the title page, such as a logo or other graphical elements. In this article, we’ll explore how to add an image underneath the title on a title page.
Understanding the titling Package
The titling package is used to customize the layout of the title page in LaTeX documents. It provides various commands and options for customizing the appearance of the title page, including adding images or other graphical elements.
One of the key features of the titling package is its ability to use the subtitle environment. This environment allows you to include additional text below the title, which can be used to add an image.
Using the subtitle Environment
To use the subtitle environment, you need to modify your LaTeX document to include the following code:
\documentclass{article}
\usepackage{titling}
\pretitle{\begin{center}\LARGE}
\includegraphics[width=2cm, height=3cm]{logo.png}\\[\bigskipamount]}}
\posttitle{\end{center}}
\subtitle{\vspace{4in} \includegraphics[width=2cm, height=3cm]{unnamed.png}}
\author{\emph{Martin}\vfill University of Duisburg-Essen\vnewpage}
\date{\vspace{1in}\emph{Date}}
\begin{document}
\make titlepage
\end{document}
In this code, we define the subtitle environment to include the image using the \includegraphics command. We also add some space above and below the image using the [width=2cm, height=3cm] argument.
Customizing the Image
One of the advantages of using the subtitle environment is its flexibility in terms of customizing the image. You can use various options to resize, rotate, or position the image as needed.
For example, you can use the following code to resize the image:
\documentclass{article}
\usepackage{titling}
\pretitle{\begin{center}\LARGE}
\includegraphics[width=4cm, height=6cm]{logo.png}\\[\bigskipamount]}}
\posttitle{\end{center}}
\subtitle{\vspace{4in} \includegraphics[width=4cm, height=6cm]{unnamed.png}}
\author{\emph{Martin}\vfill University of Duisburg-Essen\vnewpage}
\date{\vspace{1in}\emph{Date}}
\begin{document}
\make titlepage
\end{document}
In this code, we use the [width=4cm, height=6cm] argument to resize the image.
Other Options
There are several other options you can use when customizing the image in the subtitle environment. These include:
- Rotation: You can rotate the image by using the
[angle=90]argument.
\documentclass{article} \usepackage{titling}
\pretitle{\begin{center}\LARGE}} \posttitle{\end{center}} \subtitle{\vspace{4in} \includegraphics[width=2cm, height=3cm][angle=90]{logo.png}} \author{\emph{Martin}\vfill University of Duisburg-Essen\vnewpage} \date{\vspace{1in}\emph{Date}}
\begin{document}
\make titlepage
\end{document}
* **Positioning**: You can position the image using the `[x=100mm, y=200mm]` argument.
```latex
\documentclass{article}
\usepackage{titling}
\pretitle{\begin{center}\LARGE}}
\posttitle{\end{center}}
\subtitle{\vspace{4in} \includegraphics[x=100mm, y=200mm]{unnamed.png}}
\author{\emph{Martin}\vfill University of Duisburg-Essen\vnewpage}
\date{\vspace{1in}\emph{Date}}
\begin{document}
\make titlepage
\end{document}
- Aligning: You can align the image using the
[h=bottom, v=middle]argument.
\documentclass{article} \usepackage{titling}
\pretitle{\begin{center}\LARGE}} \posttitle{\end{center}} \subtitle{\vspace{4in} \includegraphics[h=bottom, v=middle]{logo.png}} \author{\emph{Martin}\vfill University of Duisburg-Essen\vnewpage} \date{\vspace{1in}\emph{Date}}
\begin{document}
\make titlepage
\end{document}
**Conclusion**
In this article, we have discussed how to add an image underneath the title on a title page in LaTeX using the `titling` package and the `subtitle` environment. We have explored various options for customizing the image, including resizing, rotating, positioning, and aligning.
By following these steps and using the code examples provided, you should be able to create your own LaTeX document with an image underneath the title on a title page.
**Additional Resources**
If you need further assistance or want to learn more about the `titling` package in LaTeX, we recommend checking out the official documentation for this package. You can find it by running the command `\documentclass{article}\usepackage{titling}\begin{document}` and then searching for "titling" in your editor's help menu.
We also suggest checking out some online resources that provide tutorials and examples for using LaTeX to create documents with custom title pages. Some popular options include:
* **LaTeX Tutorial**: This is an excellent resource for learning the basics of LaTeX.
* **Stack Overflow**: Stack Overflow has a large collection of questions and answers related to LaTeX, including ones about the `titling` package.
* **Overleaf**: Overleaf is a cloud-based LaTeX editor that provides access to a wide range of templates and examples.
By using these resources, you can gain a deeper understanding of how to use LaTeX to create documents with custom title pages.
Last modified on 2024-05-04