目前,我的第一页上有文档标题,左上角有徽标。我怎样才能在第一页插入标题和大徽标,然后在后续页面的页眉中插入小徽标?我尝试了几种解决方案,但都与当前的序言相冲突。
\documentclass[a4paper,11pt]{article}
\usepackage[a4paper, left=10mm, right=15mm, top=20mm, bottom=20mm]{geometry}
\usepackage[parfill]{parskip}
\usepackage{amssymb,amsmath}% http://ctan.org/pkg/{amssymb,amsmath}
\usepackage{braket}% http://ctan.org/pkg/braket
\usepackage{datetime}
\usepackage[normalem]{ulem}
\usepackage[colorlinks = true, linkcolor = blue, urlcolor = blue, citecolor = blue, anchorcolor = blue]{hyperref}
\newdateformat{mydate}{\twodigit{\THEDAY}{ }\shortmonthname[\THEMONTH] \THEYEAR}
\newcommand{\forceindent}{\leavevmode{\parindent=1em\indent}}
\usepackage{enumitem}
\usepackage{graphicx}% http://ctan.org/pkg/graphicx
\usepackage{eurosym}
\usepackage{titling}
\pretitle{%
\begin{flushleft}
\includegraphics[width=4cm]{image.png}\end{flushleft}\vspace{2\baselineskip}
\begin{center}\LARGE\bfseries}
\posttitle{\end{center}}
\date{\today}
\title{Financial Markets}
\begin{document}
\maketitle
\end{document}
答案1
你想要这样的东西吗?
\documentclass[a4paper,11pt,titlepage]{article}
\usepackage[headheight=50pt, left=10mm, right=15mm, top=30mm, bottom=20mm]{geometry}
\usepackage[parfill]{parskip}
\usepackage{amssymb,amsmath}% http://ctan.org/pkg/{amssymb,amsmath}
\usepackage{braket}% http://ctan.org/pkg/braket
\usepackage{datetime}
\usepackage[normalem]{ulem}
\newdateformat{mydate}{\twodigit{\THEDAY}{ }\shortmonthname[\THEMONTH] \THEYEAR}
\newcommand{\forceindent}{\leavevmode{\parindent=1em\indent}}
\usepackage{enumitem}
\usepackage{graphicx}% http://ctan.org/pkg/graphicx
\usepackage{eurosym}
\usepackage{titling}
\usepackage{fancyhdr}
% hyperref NEEDS to be loaded LATE (load cleveref later, if you use it, otherwise hyperref loads last.)
\usepackage[colorlinks = true, linkcolor = blue, urlcolor = blue, citecolor = blue, anchorcolor = blue]{hyperref}
\pretitle{%
\begin{flushleft}
\end{flushleft}\includegraphics[width=4cm]{tiger}\vspace{2\baselineskip}
\begin{center}\LARGE\bfseries}
\posttitle{\end{center}}
\title{Financial Markets}
\fancyhf{}
\fancyhf[lh]{\includegraphics[height=1.5cm]{tiger}}
\fancyhf[cf]{\thepage}
\renewcommand\headrulewidth{0pt}
\pagestyle{fancy}
\begin{document}
\maketitle
Some text.
\end{document}
请注意,您需要进行调整headheight
以适应徽标的小版本。为此,请将其设置为 10pt,然后编译并阅读消息,fancyhdr
告诉您需要多大。此信息将作为警告打印到控制台和日志文件中。然后将其设置为至少那么大。
如果使用height=1.5cm
,当然50pt
会足够大。但是如果您将图形设置为不同的高度(直接或间接),则可能需要进行调整。