You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

LaTeX制作学位论文证书页信头的对齐与双线颜色问题求助

修正后的完整可运行代码

\documentclass[12pt,a4paper]{article}
\usepackage[top=1cm,left=1in,right=1in,bottom=1in]{geometry}
\usepackage{times}
\usepackage{graphicx}
\usepackage{marvosym}
\usepackage[onehalfspacing]{setspace}
\usepackage{tikz}
\usetikzlibrary{calc}
\usepackage{fancyhdr}
\usepackage{xcolor}
\usepackage{array}
\usepackage{multirow}
\pagestyle{fancy}
\fancyhf{}

% 补全红色双线命令定义
\newcommand{\doublerule}[1][1pt]{%
  \noindent
  \color{red}
  \makebox[0pt][l]{\rule[.7ex]{\linewidth}{#1}}%
  \rule[.3ex]{\linewidth}{#1}
  \color{black}
}

\begin{document}
\pagestyle{empty}
\vspace{12mm}
% 调整表格列格式:固定宽度+对应对齐规则
\begin{tabular}{
  >{\raggedleft\arraybackslash}p{0.38\linewidth}
  >{\centering\arraybackslash}p{0.24\linewidth}
  >{\raggedright\arraybackslash}p{0.38\linewidth}
}
\Large Bangalore & \multirow{7}{*}{\includegraphics[width=0.8\linewidth]{BUB_Emblem}} & \Large University \\
\large Dr Vijaykumar H Doddamani & & Department of Physics \\
M.Sc., M. Phil., PhD & & Ph. Off: 080-22961471/84 \\
& & Fax: 080-23219295 \\
\textbf{\large Professor} & & Mobile : 9481300346 \\
Email: drvkd@gmail.com & Jnanabharathi Campus & Mobile : 9448673274 \\
profvijaykumarhd@bub.ernet.in & Bengaluru - 560 056 & WhatsApp :9741716744 \\
\end{tabular}
\vspace{4mm}
\doublerule[1pt]

\end{document}

问题修复说明

  • 表格对齐问题:原表格使用自适应宽度的居中列格式,列宽随内容长度变化导致左右区域对齐错位。修改为三列固定宽度配置,左侧列设为右对齐、中间列设为居中对齐放置校徽、右侧列设为左对齐,同时将校徽设为跨7行显示,保证首行校名和校徽垂直对齐,各列内容不会出现偏移。
  • 红色双线问题:原代码缺失\doublerule命令的完整定义,补全定义时加入\color{red}设置线条颜色,绘制完成后切回黑色避免影响后续内容颜色,调用后即可生成指定线宽的红色双线。

内容的提问来源于stack exchange,提问作者Ryan

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.10.14 14:06:11