在表中向下移动文本以避免与行重叠

在表中向下移动文本以避免与行重叠

我想将文本“地区概况报告:英语学习者”向下移动,以使其不接触上方的水平线,同时保持徽标在两条线之间对齐(徽标将替换绿色矩形)。

\documentclass{article}
\usepackage{graphicx}
\usepackage{hyperref}
\usepackage[top=0.75in, bottom=0.75in, left=0.5in, right=0.5in]{geometry}
\usepackage{array} % for centering text in tables
\usepackage{multirow} % for having multiple rows merged in tables
\renewcommand{\familydefault}{\sfdefault}

% Create new command called Cline for thick line in tables
\newlength{\Oldarrayrulewidth}
\newcommand{\Cline}[2]{%
  \noalign{\global\setlength{\Oldarrayrulewidth}{\arrayrulewidth}}%
  \noalign{\global\setlength{\arrayrulewidth}{#1}}\cline{#2}%
  \noalign{\global\setlength{\arrayrulewidth}{\Oldarrayrulewidth}}}

\begin{document}
\SweaveOpts{concordance=TRUE}


\begin{table}[h]
\begin{tabular}{m{2.5cm} m{5.75cm} m{4.75cm} b{3.75cm}} % Creates columns of specified width
\Cline{2pt}{2-4} % Creates a horizontal line from cell two to four
\multirow{2}{*}{\includegraphics[width=2.5cm]{DPIlogo_SS}} & \multicolumn{3}{c}{\Large\textbf{District Profile Report: English Language Learners}}\\[0.6cm]
& \textbf{District: Example District} & \textbf{District Code: 0001} & \textbf{School Year: 2013-14}\\
\Cline{2pt}{2-4} % Creates a horizontal line from cell two to four
\end{tabular}
\end{table}

\end{document}

线条与文本重叠的示例

答案1

不要重新发明轮子:使用该booktabs包,您将获得更简单的代码。它允许您将规则宽度指定为可选参数,并且可以使用和长度设置水平线周围的垂直间距\aboverulesep\belowrulesep(lr) 参数指定左右两侧的(可自定义)修剪空间\cmidrule。此外,您可以使用命令\addlinespace[…]。由于我不明白为什么这应该浮动,我删除了 ` 表环境:

\documentclass{article}

\usepackage[utf8]{inputenc}
\usepackage[demo]{graphicx}
\usepackage[top=0.75in, bottom=0.75in, left=0.5in, right=0.5in]{geometry}
\usepackage{array, booktabs} % for centering text in tables
\usepackage{multirow} % for having multiple rows merged in tables
\renewcommand{\familydefault}{\sfdefault}
\setlength\aboverulesep{0.75ex}
\setlength\belowrulesep{1.25ex}

\usepackage{hyperref}

\begin{document}

\begin{tabular}{m{2.5cm} m{5.75cm} m{4.75cm} b{3.75cm}} % Creates columns of specified width
\cmidrule[2pt]{2-4} % Creates a horizontal line from cell two to four
 \multirow{2}{*}{\includegraphics[width=2.5cm]{DPIlogo_SS}} & \multicolumn{3}{c}{\Large\textbf{District Profile Report: English Language Learners}}\\[0.6cm]
& \textbf{District: Example District} & \textbf{District Code: 0001} & \textbf{School Year: 2013-14}\\
\cmidrule[2pt]{2-4} % Creates a horizontal line from cell two to four
\end{tabular}

\end{document} 

在此处输入图片描述

相关内容