小型页面中的文本水平居中

小型页面中的文本水平居中

我在小页面环境中文本的水平对齐方面遇到了问题。

下面是我的代码。

\documentclass[12pt,paper=a4,answers, addpoints]{exam}
\usepackage{graphicx,lastpage}
\usepackage{upgreek}
\usepackage{censor}
\usepackage{amsmath}
\usepackage{eurosym}
\censorruledepth=-.2ex
\censorruleheight=.1ex
\hyphenpenalty 10000
\usepackage[paperheight=10.5in,paperwidth=8.27in,bindingoffset=0in,left=0.8in,right=1in,
top=1in,bottom=1in,headsep=1.5\baselineskip]{geometry}
\flushbottom
\usepackage[normalem]{ulem}
\usepackage[utf8]{inputenc}
\renewcommand\ULthickness{2pt} %%---> For changing thickness of underline
\setlength\ULdepth{1.5ex}%\maxdimen ---> For changing depth of underline
\renewcommand{\baselinestretch}{1}
\pagestyle{empty}

\pagestyle{headandfoot}
\headrule
\newcommand{\continuedmessage}{%
\ifcontinuation{\footnotesize Question \ContinuedQuestion\ continues\ldots}{}%
}
\runningheader{\footnotesize Dipartimento di Economia}
{\footnotesize Analisi delle Politiche Pubbliche -- LM56}
{\footnotesize Pagina \thepage\ di \numpages}
\footrule
\footer{\footnotesize}
{}
{\ifincomplete{\footnotesize Question \IncompleteQuestion\ Continua nella pagina successiva}{\iflastpage{\footnotesize \textit{\bfseries Fine domande di esame}}{\footnotesize \textit{\bfseries Continua nella pagina successiva}}}}

\usepackage{cleveref}
\crefname{figure}{figure}{figures}
\crefname{question}{question}{questions}
\renewcommand\thequestion{\arabic{question}}
\renewcommand{\questionlabel}{\thequestion)}
\renewcommand{\questionshook}{%
\setlength{\leftmargin}{0pt}%
\setlength{\labelwidth}{-\labelsep}%
}

\nopointsinmargin 
\pointpoints{Mark}{Marks}

\marginpointname{\points}
\pointformat{\boldmath\themarginpoints}
\bracketedpoints

\begin{document}

\thispagestyle{empty}

\noindent
\begin{minipage}{.20\textwidth}
\includegraphics[width=2.5cm]{logo} 
\end{minipage}
\begin{minipage}[c]{.65\textwidth}
{\bfseries Ph.D. in Economics, Management and Statistics}\par
\medskip
{\bfseries University of Catania \& University of Messina}\par
\medskip
\end{minipage}
\medskip
\begin{minipage}{.2\textwidth}
\includegraphics[width=2.5cm]{logo-unict} 
\end{minipage}
\par
\vspace{-3ex}
\begin{center}
\textit{\bfseries \LARGE{Microeconomics}}\par
\end{center}
\vspace{-3ex}
\begin{minipage}{\textwidth}
{\bfseries Lecturers:}
\begin{tabular}[t]{@{}l@{}}
  Dr. X\\
  Dr. Y\\
  Dr. Z\\
\bigskip
\end{tabular}
\end{minipage}
\begin{minipage}{\textwidth}
\textit{\textbf{Name:}}{\hrulefill}\par
\bigskip
\textit{\textbf{Signature:}} {\hrulefill}\par
\bigskip 
\end{minipage}
\begin{center}
\rule{\textwidth}{1pt}
\end{center}
\end{document}

我的问题是我想让红框中的文本水平居中。我有可能实现这个吗?提前谢谢

在此处输入图片描述

附录

根据 David 的建议,我得到了以下结果。我不确定文本是否由于光学效果而看起来更接近右侧的徽标,或者实际上更接近。结果图片如下:

在此处输入图片描述

第二附录

在David的建议下,我修改了我的代码如下:

\documentclass[12pt,paper=a4,answers, addpoints]{exam}
\usepackage{graphicx,lastpage}
\usepackage{upgreek}
\usepackage{censor}
\usepackage{amsmath}
\usepackage{eurosym}
\censorruledepth=-.2ex
\censorruleheight=.1ex
\hyphenpenalty 10000
\usepackage[paperheight=10.5in,paperwidth=8.27in,bindingoffset=0in,left=0.8in,right=1in,
top=1in,bottom=1in,headsep=1.5\baselineskip]{geometry}
\flushbottom
\usepackage[normalem]{ulem}
\usepackage[utf8]{inputenc}
\renewcommand\ULthickness{2pt} %%---> For changing thickness of underline
\setlength\ULdepth{1.5ex}%\maxdimen ---> For changing depth of underline
\renewcommand{\baselinestretch}{1}
\pagestyle{empty}

\pagestyle{headandfoot}
\headrule
\newcommand{\continuedmessage}{%
\ifcontinuation{\footnotesize Question \ContinuedQuestion\ continues\ldots}{}%
}
\runningheader{\footnotesize Dipartimento di Economia}
{\footnotesize Analisi delle Politiche Pubbliche -- LM56}
{\footnotesize Pagina \thepage\ di \numpages}
\footrule
\footer{\footnotesize}
{}
{\ifincomplete{\footnotesize Question \IncompleteQuestion\ Continua nella pagina successiva}{\iflastpage{\footnotesize \textit{\bfseries Fine domande di esame}}{\footnotesize \textit{\bfseries Continua nella pagina successiva}}}}

\usepackage{cleveref}
\crefname{figure}{figure}{figures}
\crefname{question}{question}{questions}
\renewcommand\thequestion{\arabic{question}}
\renewcommand{\questionlabel}{\thequestion)}
\renewcommand{\questionshook}{%
\setlength{\leftmargin}{0pt}%
\setlength{\labelwidth}{-\labelsep}%
}

\nopointsinmargin 
\pointpoints{Mark}{Marks}

\marginpointname{\points}
\pointformat{\boldmath\themarginpoints}
\bracketedpoints

\begin{document}

\thispagestyle{empty}

\noindent
\begin{minipage}{.17\textwidth}
\begin{flushleft}
\includegraphics[width=2.5cm]{logo}
\end{flushleft} 
\end{minipage}
\begin{minipage}[c]{.66\textwidth}\centering
{\bfseries Ph.D. in Economics, Management and Statistics}\par
\medskip
{\bfseries University of Catania \& University of Messina}\par
\medskip
\end{minipage}
\medskip
\begin{minipage}{.17\textwidth}
\begin{flushright}
\includegraphics[width=2.5cm]{logo-unict}
\end{flushright} 
\end{minipage}
\par
\vspace{-3ex}
\begin{center}
\textit{\bfseries \LARGE{Microeconomics}}\par
\end{center}
\vspace{-3ex}
\begin{minipage}{\textwidth}
{\bfseries Lecturers:}
\begin{tabular}[t]{@{}l@{}}
  Dr. X\\
  Dr. Y\\
  Dr. Z\\
\bigskip
\end{tabular}
\end{minipage}
\begin{minipage}{\textwidth}
\textit{\textbf{Name:}}{\hrulefill}\par
\bigskip
\textit{\textbf{Signature:}} {\hrulefill}\par
\bigskip 
\end{minipage}
\begin{center}
\rule{\textwidth}{1pt}
\end{center}
\end{document}

现在一切正常。结果如下:

在此处输入图片描述

答案1

您不必猜测尺寸,将计算留给 TeX。

\documentclass{article}
\usepackage[
  paperheight=10.5in,
  paperwidth=8.27in,
  bindingoffset=0in,
  left=0.8in,
  right=1in,
  top=1in,
  bottom=1in,
  headsep=1.5\baselineskip,
  showframe,% just for the example
]{geometry}

\usepackage{graphicx,varwidth}

\begin{document}

\begin{center}
\begin{tabular}{@{}c@{}}
\includegraphics[width=2.5cm]{example-image-1x1}
\end{tabular}%
\hfill
\begin{varwidth}{\textwidth}
\centering\bfseries
Ph.D. in Economics, Management and Statistics\\
University of Catania \& University of Messina
\end{varwidth}%
\hfill
\begin{tabular}{@{}c@{}}
\includegraphics[width=2.5cm]{example-image-1x1}
\end{tabular}%
\end{center}

\end{document}

在此处输入图片描述

相关内容