
У меня возникла проблема с горизонтальным выравниванием текста в среде мини-страницы.
Ниже представлен мой код.
\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}
Моя проблема в том, что я хотел бы, чтобы текст в красном поле был горизонтально отцентрирован. Есть ли шанс, что я смогу это сделать? Спасибо заранее
ПРИЛОЖЕНИЕ
После предложения Дэвида, вот что у меня получилось. Я не уверен, кажется ли текст ближе к логотипу справа из-за оптического эффекта или он на самом деле ближе. Картинка результата ниже:
ВТОРОЕ ПРИЛОЖЕНИЕ
После предложений Дэвида я изменил свой код следующим образом:
\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}