标题页上的图片

标题页上的图片

我想将图片添加到标题页,但图片显示在自己的页面上。有人能帮忙吗?

 \documentclass[a4paper,12pt]{scrartcl}

 \title{Report}
 \author{blah}
 \date{\today}
 \publishers{blah}
 \nocite{*}
 \addbibresource{bib.bib}
 \begin{document}

 \begin{titlepage}
 \includegraphics{images/image.png}
 \maketitle

 \end{titlepage}
 \end{document}

答案1

\maketitle创建特定的标题页布局。您不能将其与其他元素组合。但您可以使用它\titlehead来插入图形:

\documentclass[a4paper,12pt,titlepage]{scrartcl}
\usepackage{graphicx}
\titlehead{\centering\includegraphics[width=6cm]{tiger}}
\title{Report}
\author{blah}
\date{\today}
\publishers{blah}
\begin{document}  
\maketitle
\end{document}

答案2

您也可以使用titling包。有了它,您可以访问标题页中的\title \author和变量。这对我来说很有效:\date

\documentclass[a4paper,oneside,11pt]{book}
\usepackage{graphicx}
\usepackage{titling}
\title{The Lord of the Rings}
\author{John Tolkien}
\date{\today}
\begin{document}
\begin{titlingpage} %This starts the title page
\begin{center}
\includegraphics[height=2cm]{example-image}\\ %Put the logo you want here
\begin{large}
My University \\ %The name your university
My Department\\
\end{large}
\vspace{4cm} %You can control the vertical distance
\begin{large} 
\textbf{\thetitle} \\
\end{large}
\theauthor\\
\vspace{7cm} %Put the distance you need.
\thedate
\end{center}
\end{titlingpage}
\end{document}

*我编辑了Large我所放置的环境。

答案3

只需在标题中放一张图片即可。很简单 :)

您可以添加 \texttt 来格式化文本。

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{graphicx}
\graphicspath{./images/ }

\title{
\includegraphics[scale=0.5]{logo.png} Here is my Title
}
\author{Saurabh Adhikary}
.
.
.
\begin{document}
\maketitle

相关内容