如何将地址放在同一层级?

如何将地址放在同一层级?
\documentclass[a4paper,12pt]{article}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{ragged2e}
\begin{document}





\begin{flushleft}                           
\textbf{Riyam Sen} \\
 Department of Mathematical Sciences, Aligarh University \\
Napaam, Sonitpur, Delhi-110025, India. \\
e-mail:  [email protected] 
\end{flushleft}


\begin{flushright} 
\textbf{Pronoy Pratim Dutta} \\
 Statistics and Mathematics Unit, Indian Statistical Institute,\\ 
Bangalore, R. V. College Post, Bangalore 560059,
India. \\
e-mail:  [email protected] 
\end{flushright} 

\end{document}

在这段代码中,我试图将名称和地址放在同一级别,但一个稍微向上,一个稍微向下。

我们怎样才能把它们放在同一水平?

答案1

如果您想要一个用户友好的“编程”界面,我建议您使用该tcolorbox包执行此类任务。

下面的示例是一个很好的起点。

(也许我有太多幻想,但我想你正在寻找这样的东西)

在此处输入图片描述

\documentclass[a4paper,12pt]{article}
\usepackage{lipsum}
\usepackage{tcolorbox}

\tcbuselibrary{skins}

\setlength\parindent{0pt}

\newtcolorbox{heading}{%
    blankest, 
    sidebyside, 
    enlarge left by  = -1cm,
    enlarge right by = 2cm,
    width            = \linewidth+2cm,
    halign lower     = flush right,
    after            = \bigskip\bigskip,
    top              = 4mm,
    bottom           = 4mm,
    sidebyside align = top seam,
    borderline north = {1.8pt}{0pt}{black},
    borderline south = {1.0pt}{0pt}{black}
}

\begin{document}

\begin{heading}
    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
        \textbf{Riyam Sen} \\
        Department of Mathematical Sciences, Aligarh University \\
        Napaam, Sonitpur, Delhi-110025, India. \\
        e-mail:  [email protected] 
    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    \tcblower
    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
        \textbf{Pronoy Pratim Dutta} \\
        Statistics and Mathematics Unit\\
        Indian Statistical Institute\\ 
        Bangalore, R. V. College Post\\
        Bangalore 560059 India \\
        e-mail:  [email protected] 
    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\end{heading}

\lipsum

\end{document}

相关内容