如何将标题放在我想要的位置

如何将标题放在我想要的位置

我正在努力提高自己在乳胶方面的水平,但我也想制作一个标准文件以供审阅。

因此我尝试做一些非常紧凑但外观漂亮的东西。

我取得了相当不错的成绩,但是现在我想做一些事情,让标题偏离中心,将图像放在另一边。

我正在使用 article 作为 documentclass,但我没有找到 \maketitle 的替代品来做我想做的事情。我还尝试了 renewcommand,但效果不佳,因为不知道它在做什么。

感谢您的帮助!

一张图片胜过一千个世界

答案1

我建议你看一下这个titling软件包,它有很多用于自定义标题的工具。

以下是一个演示:

\documentclass[11pt, svgnames]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{garamondx}
\usepackage{geometry} 
\usepackage{verse}
\usepackage{titling, xcolor}
 \author{Edward Lear}
 \title{The Quangle Wangle’s Hat}
 \date{(n.\,d.)}

\pretitle{\LARGE\color{IndianRed}}
\posttitle{\hfill\raisebox{-0.4\height}{ \includegraphics[scale =0.35]{Quangle_Wangle_Hat}}\null}

\begin{document}

\maketitle

\settowidth{\versewidth}{For his Hat was a hundred and two feet wide,}
\begin{verse}[\versewidth]
\begin{altverse}
  On the top of the Crumpetty Tree\\
      The Quangle Wangle sat,\\
But his face you could not see,\\
      On account of his Beaver Hat.\\
For his Hat was a hundred and two feet wide,\\
With ribbons and bibbons on every side\\
And bells, and buttons, and loops, and lace,\\
So that nobody ever could see the face\\
            Of the Quangle Wangle Quee.
\end{altverse}
\end{verse}

\end{document} 

在此处输入图片描述

答案2

姆韦

\documentclass{article}
\usepackage{graphicx}
\usepackage[export]{adjustbox}% http://ctan.org/pkg/adjustbox
\usepackage[margin=2cm]{geometry} 
\usepackage{xcolor}
\usepackage{lipsum} % for dummy text

\makeatletter         
\def\mytitle#1{
\noindent\begin{minipage}[t]{.65\linewidth}\raggedright
{\Huge\bfseries\sffamily\color{red}\@title}\par\bigskip 
{\bfseries\@author}\par\medskip \@date
\end{minipage}\hfill%
\includegraphics[width=.25\linewidth,valign=t]{#1}
 \par\bigskip}
\makeatother

\title{My nice very long and impressive title}
\author{Arnaud Vivi}
\date{\today}

\begin{document}
\mytitle{example-image-duck}
\section{Lore ipsum}  \lipsum[1]
\end{document}

相关内容