页面中间的垂直线

页面中间的垂直线

如何在页面中间添加一条垂直线?并且我还想在垂直条的右侧和左侧写相同的文字(如本例所示):

我试过了,\rule但我不知道如何在右边或左边写相同的文字。

例子

答案1

此类规则内置于输出例程中,格式如下:

在此处输入图片描述

\documentclass[twocolumn]{article}
\setlength\columnseprule{1pt}
\raggedright
\begin{document}

\begin{flushright}
\vspace*{\fill}

\textbf{Informations}

\vspace*{\fill}
\end{flushright}

\pagebreak

\textbf{Author:}

Name
\bigskip

\textbf{Subject:}
Title
\end{document}

答案2

感谢@daleif 的帮助,这是我为了得到我想要的东西而写的:

\documentclass[a4paper]{report}

\begin{document}

    \begin{minipage}{0.3\textwidth}
        \Large{\textbf{Information}}
    \end{minipage}
    \rule[-400pt]{1.5pt}{600pt}
    \hspace*{0.05\textwidth} % Whitespace between the vertical line and title page text
    \begin{minipage}{0.5\textwidth}
        \textbf{Author :} \\
        Name \\
        [3cm]
        \textbf{Subject :} \\
        Title of the subject
    \end{minipage}

   \pagestyle{empty} % Removes page numbers

\end{document}

答案3

正如您所注意到的,对齐可能很棘手,特别是当您想使用整个页面时。

\documentclass{article}

\begin{document}
\pagestyle{empty}
\noindent\parbox[t]{0.3\textwidth}%
{\vspace{.4\textheight}\textbf{\Large Informations}}\hfill
\rule[\dimexpr \topskip-\textheight]{1pt}{\textheight}\hfill
\begin{minipage}[t]{0.6\textwidth}
\parskip=\baselineskip
\hangindent=.5em
\textbf{Author:}\\Name

\hangindent=.5em
\textbf{Subjects:}\\Title of Subject 1
\end{minipage}
\end{document}

完整页面

答案4

另一个选择是以下background包:

\documentclass[a4paper,oneside, 11pt]{scrartcl}
\usepackage[hidelinks, pdfstartview=FitH, pdfpagelayout=OneColumn, pdftex]{hyperref}
\usepackage[left=1.5cm, right=2.5cm, top=2.5cm, bottom=2cm,a4paper]{geometry}

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[ngerman]{babel}

\usepackage{amsmath,amssymb,amsfonts,amstext}

\usepackage[natural, table, fixpdftex, hyperref]{xcolor}

\makeatletter
\let\old@rule\@rule
\def\@rule[#1]#2#3{\textcolor{black}{\old@rule[#1]{#2}{#3}}}
\makeatother

\usepackage[pdftex]{graphicx}
\usepackage{background}
\SetBgScale{1}
\SetBgAngle{0}
\SetBgContents{\rule{.75pt}{\textheight}}
\SetBgHshift{-2.1cm}

\begin{document}
\pagestyle{empty}
\newcolumntype{L}{>{\raggedleft}p{5.5cm}}
\newcolumntype{R}{p{9.5cm}}
\setlength{\tabcolsep}{0.5cm}
\begin{tabular}{LR}
{\huge\bfseries Curriculum Vit\ae}&\\[1.5\baselineskip]
Lots of & Information\\
More&Information\\[1.5\baselineskip]
{\Large Education}&\\[\baselineskip]
Lots of & Information\\
More&Information\\
More & Information\\
More&Information\\[1.5\baselineskip]
\end{tabular}
\end{document}

输出结果如下: 在此处输入图片描述

相关内容