提问于:
浏览数:
3125
## 编译环境
操作系统
* [x] Windows 7/8/10
* [ ] macOS
* [ ] Linux
`若需勾选,请把[ ]改成[x]`
Tex发行版
* [x] TexLive `2018`
* [ ] MikTeX `版本号`
* [ ] CTeX
`若需勾选,请把[ ]改成[x]`
## 我的问题
请问,在paracol宏包中能不能使分栏线的长度=\textheight?
![](https://wenda.latexstudio.net/data/attach/200625/pfqjESgt.png)
源代码:
```
\documentclass{ctexart}
\usepackage{paracol}
\usepackage{zhlipsum}
\usepackage{lipsum}
\usepackage{geometry}
\usepackage{graphicx}
\usepackage{xcolor}
\usepackage{multirow}
\usepackage{calc}
\usepackage{fontawesome}
\geometry{top=1cm,bottom=1cm,right=1cm,left=1cm}
\pagestyle{empty}
\setlength{\parskip}{0.5em}
\begin{document}
\columnseprule=0.5pt
\columnratio{0.3,0.7}
\begin{paracol}{2}
\begin{figure}[h]
\centering
\includegraphics[width=0.6\columnwidth]{baizhantang}
\end{figure}
\makebox[0.6\columnwidth][c]{\huge\heiti 白展堂}
\vspace{20pt}
\noindent
基本信息\rule[0.5ex]{0.7\columnwidth}{0.6pt}
\makebox[0.85\columnwidth][l]{\large 电话:15566667777 }
\makebox[0.85\columnwidth][l]{\large 邮箱:wzt@123.com }
\makebox[0.85\columnwidth][l]{\large 政治面貌:群众 }
\makebox[0.85\columnwidth][l]{\large 籍贯:山西省西山县高老庄 }
\vspace{20pt}
%s定义进度条
\definecolor{color1}{rgb}{0.22,0.45,0.70} % light blue
\definecolor{color2}{rgb}{0.45,0.45,0.45} % dark grey
\newcommand{\progressbar}[2][2cm]{%
\textcolor{color1}{\rule{#1 * \real{#2} / 100}{1.5ex}}%
\textcolor{color2!15}{\rule{#1 - #1 * \real{#2} / 100}{1.5ex}}}
\noindent
编程语言\rule[0.5ex]{0.7\columnwidth}{0.6pt}
Office 三件套 \hfill \progressbar{70}
\LaTeX \hfill \progressbar{90}
python \hfill \progressbar{90}
r语言 \hfill \progressbar{90}
MATLAB \hfill \progressbar{90}
\vspace{20pt}
\noindent
自我评价\rule[0.5ex]{0.7\columnwidth}{0.6pt}
{
\centering
姓白名叫白展堂,\par
住在山西高老庄.\par
家有三件茅草房,\par
耕种田地度时光.\par
}
\switchcolumn
\noindent
教育背景\rule[0.5ex]{0.85\columnwidth}{0.6pt}\par\noindent
\begin{tabular*}{\columnwidth}{@{}p{0.15\columnwidth}p{0.6\columnwidth}p{0.25\columnwidth}}
2000-2014 & 本科\quad 应用统计学&家里蹲大学 \\
&\multicolumn{2}{l}{\faAngleDoubleRight\quad 毕业论文:balabala}\\
&\multicolumn{2}{l}{\faAngleDoubleRight\quad balabala}
\end{tabular*}\\
\begin{tabular*}{\columnwidth}{@{}p{0.15\columnwidth}p{0.6\columnwidth}p{0.25\columnwidth}}
2000-2014 & 硕士\quad 统计学&家里蹲大学 \\
&\multicolumn{2}{l}{\faAngleDoubleRight\quad 毕业论文:balabala}\\
&\multicolumn{2}{l}{\faAngleDoubleRight\quad balabala}
\end{tabular*}
\noindent
获奖荣誉\rule[0.5ex]{0.7\columnwidth}{0.6pt}
\noindent
获奖荣誉\rule[0.5ex]{0.7\columnwidth}{0.6pt}
\end{paracol}
\end{document}
```
2 回答
0
这个线,是不是 tikz 用 overlay 画一个更加随意一点,这样做很受限制。
0
如楼上所说,用`tikz`画是最好。这里提几点意见:
首先你的例子并不是最小示例,99%的内容都是和你的内容无关的,实际上下面这段代码就能完全复现你的问题
```tex
\documentclass{article}
\usepackage{paracol}
\begin{document}
\setlength{\columnseprule}{.5pt}
\begin{paracol}{2}
test
\end{paracol}
\end{document}
```
其余的内容与你要解决的问题并没有什么太大的关系。
其次,不要在示例中使用与字体有关的包,除非是与该字体包有关的问题,否则别人电脑没这个字体怎么办?
最后,如非必要,不要使用插入图片的代码,如果是与之相关的问题,使用`\includegraphics{example-image}`插入示例图片,而不是你自己的图片。
下面是使用`tikz`绘制的代码
```tex
\documentclass{ctexart}
\usepackage{paracol}
\usepackage{zhlipsum}
\usepackage{lipsum}
\usepackage{geometry}
\usepackage{graphicx}
\usepackage{xcolor}
\usepackage{multirow}
\usepackage{calc}
% \usepackage{fontawesome}
\geometry{top=1cm,bottom=1cm,right=1cm,left=1cm}
\pagestyle{empty}
\setlength{\parskip}{0.5em}
\newcommand\measurepage{\dimexpr\pagegoal-\pagetotal-\baselineskip\relax}
\usepackage{tikz}
\usepackage{tikzpagenodes}
\usetikzlibrary{calc}
\begin{document}
\begin{tikzpicture}[overlay, remember picture]
\coordinate (a) at (current page text area.north west);
\coordinate (b) at (current page text area.north east);
\coordinate (c) at (current page text area.south west);
\coordinate (d) at (current page text area.south east);
\coordinate (A) at ($(a)!0.3!(b) + (0.2\columnsep, 0)$);
\coordinate (B) at ($(c)!0.3!(d) + (0.2\columnsep, 0)$);
\draw[line width=.8pt, cyan] (A) -- (B);
\end{tikzpicture}
\columnratio{0.3,0.7}
\begin{paracol}{2}
\begin{figure}[h]
\centering
% \includegraphics[width=0.6\columnwidth]{baizhantang}
\includegraphics[width=0.6\columnwidth]{example-image}
\end{figure}
\makebox[0.6\columnwidth][c]{\huge\heiti 白展堂}
\vspace{20pt}
\noindent
基本信息\rule[0.5ex]{0.7\columnwidth}{0.6pt}
\makebox[0.85\columnwidth][l]{\large 电话:15566667777 }
\makebox[0.85\columnwidth][l]{\large 邮箱:wzt@123.com }
\makebox[0.85\columnwidth][l]{\large 面貌:群众 }
\makebox[0.85\columnwidth][l]{\large 籍贯:山西省西山县高老庄 }
\vspace{20pt}
%s定义进度条
\definecolor{color1}{rgb}{0.22,0.45,0.70} % light blue
\definecolor{color2}{rgb}{0.45,0.45,0.45} % dark grey
\newcommand{\progressbar}[2][2cm]{%
\textcolor{color1}{\rule{#1 * \real{#2} / 100}{1.5ex}}%
\textcolor{color2!15}{\rule{#1 - #1 * \real{#2} / 100}{1.5ex}}}
\noindent
编程语言\rule[0.5ex]{0.7\columnwidth}{0.6pt}
Office 三件套 \hfill \progressbar{70}
\LaTeX \hfill \progressbar{90}
python \hfill \progressbar{90}
r语言 \hfill \progressbar{90}
MATLAB \hfill \progressbar{90}
\vspace{20pt}
\noindent
自我评价\rule[0.5ex]{0.7\columnwidth}{0.6pt}
{
\centering
姓白名叫白展堂,\par
住在山西高老庄.\par
家有三件茅草房,\par
耕种田地度时光.\par
}
\switchcolumn
\noindent
教育背景\rule[0.5ex]{0.85\columnwidth}{0.6pt}\par\noindent
\begin{tabular*}{\columnwidth}{@{}p{0.15\columnwidth}p{0.6\columnwidth}p{0.25\columnwidth}}
2000-2014 & 本科\quad 应用统计学&家里蹲大学 \\
&\multicolumn{2}{l}{\quad 毕业论文:balabala}\\
&\multicolumn{2}{l}{\quad balabala}
\end{tabular*}\\
\begin{tabular*}{\columnwidth}{@{}p{0.15\columnwidth}p{0.6\columnwidth}p{0.25\columnwidth}}
2000-2014 & 硕士\quad 统计学&家里蹲大学 \\
&\multicolumn{2}{l}{\quad 毕业论文:balabala}\\
&\multicolumn{2}{l}{\quad balabala}
\end{tabular*}
\noindent
获奖荣誉\rule[0.5ex]{0.7\columnwidth}{0.6pt}
\noindent
获奖荣誉\rule[0.5ex]{0.7\columnwidth}{0.6pt}
\end{paracol}
\end{document}
```
![](https://wenda.latexstudio.net/data/attach/200626/Ebz8P9C0.png)
你的回答
请登录后回答
你的回答将会帮助更多人,请务必认真回答问题。