在图片之间对齐标题中的文字

在图片之间对齐标题中的文字

我需要帮助来对齐我简单的自定义标题页中的文本。我希望标题文本和下面的一些附加文本在两个徽标之间水平居中。如果徽标也能垂直居中就好了。

\begin{titlepage}
\begin{center}

    % Upper part of the page. The '~' is needed because \\
    % only works if a paragraph has started.
        \includegraphics[width=0.15\textwidth]{./logo_pg}~%\\[1cm]
        \textsc{\LARGE University Name}
        \textsc{Faculty}
        \includegraphics[width=0.15\textwidth]{./logo_eti}
        \\[1.5cm]

    % Title
    \HRule \\[0.4cm]
    { \huge \bfseries Project's Name \\[0.4cm] }

    \HRule \\[1.5cm]

    \Large
    Author1 \\
    Author2

    \vfill

    % Bottom of the page
    {\large \today}

\end{center}
\end{titlepage}

哦,HRule 是在主 .tex 文件中定义的

\newcommand{\HRule}{\rule{\linewidth}{0.5mm}}

提前感谢你的帮助。

答案1

\documentclass{article}
\usepackage[final]{graphicx}
\newcommand{\HRule}{\rule{\linewidth}{0.5mm}}
\begin{document}
\begin{titlepage}

\noindent%
\begin{minipage}{.15\linewidth}
        \includegraphics[width=1\linewidth]{fig-logo}
\end{minipage}
\hfil
\begin{minipage}{.68\linewidth}\centering
\textsc{\LARGE University Name} \\
\textsc{Faculty}
\end{minipage}
\hfil
\begin{minipage}{.15\linewidth}
        \includegraphics[width=1\linewidth]{fig-logo}
\end{minipage}

\vfill

\begin{center}
    \HRule \\[0.4cm]
    { \huge \bfseries Project's Name \\[0.4cm] }

    \HRule \\[1.5cm]

    \Large
    Author1 \\
    Author2

    \vfill

    {\large \today}

\end{center}
\end{titlepage}
\end{document}

在此处输入图片描述

答案2

你需要命令raisebox

\documentclass[titlepage,demo]{article}
\usepackage{graphicx}

\newcommand{\HRule}{\rule{\linewidth}{0.5mm}}
\begin{document}
\begin{titlepage}
\begin{center}

    % Upper part of the page. The '~' is needed because \\
    % only works if a paragraph has started.
        \raisebox{-0.5\height}{\includegraphics[width=0.15\textwidth]{./logo_pg}}
        \begin{tabular}[c]{c}
           \textsc{\LARGE University Name} \\
            \textsc{Faculty}
        \end{tabular}
        \raisebox{-0.5\height}{\includegraphics[width=0.15\textwidth]{./logo_eti}}
        \\[1.5cm]

    % Title
    \HRule \\[0.4cm]
    { \huge \bfseries Project's Name \\[0.4cm] }

    \HRule \\[1.5cm]

    \Large
    Author1 \\
    Author2

    \vfill

    % Bottom of the page
    {\large \today}

\end{center}
\end{titlepage}

\end{document}

在此处输入图片描述

相关内容