楼主: oliyiyi
1151 1

Adding a column separator line and extra space between columns in LaTeX [推广有奖]

版主

泰斗

0%

还不是VIP/贵宾

-

TA的文库  其他...

计量文库

威望
7
论坛币
271951 个
通用积分
31269.3519
学术水平
1435 点
热心指数
1554 点
信用等级
1345 点
经验
383775 点
帖子
9598
精华
66
在线时间
5468 小时
注册时间
2007-5-21
最后登录
2024-4-18

初级学术勋章 初级热心勋章 初级信用勋章 中级信用勋章 中级学术勋章 中级热心勋章 高级热心勋章 高级学术勋章 高级信用勋章 特级热心勋章 特级学术勋章 特级信用勋章

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

求职就业群
赵安豆老师微信:zhaoandou666

经管之家联合CDA

送您一个全额奖学金名额~ !

感谢您参与论坛问题回答

经管之家送您两个论坛币!

+2 论坛币

Documents with two columns are very popular, especially in academic publishing. In other scenarios, it may be desirable to have three or even more columns. In this brief post, I show how to add a separator line between columns as well as how to adapt the space between columns, for a better visual separation of the content.


Adding a separator line between columns

By default, there is no separator line between columns, neither with the twocolumnoption nor with the multicol package. In practise, this is because the width of the separator line is set to zero by default (0pt).

Therefore, to add a separator line it suffices to change the width of the column separator rule using the \setlength macro. Its width would usually be a small number in points, for example: 0.4pt or 1pt. The following figures illustrate this for two columns with the twocolumn option and for three columns with the multicol package. A minimal example is given below each figure.



Code



  1. 123456\documentclass[11pt,twocolumn]{article}\usepackage{blindtext}\setlength{\columnseprule}{0.4pt}\begin{document}\blinddocument\end{document}
复制代码




Code



  1. 12345678\documentclass[11pt]{article}\usepackage{blindtext, multicol}\setlength{\columnseprule}{1pt}\begin{document}\begin{multicols}{3}\blindtext\end{multicols}\end{document}
复制代码



Changing space between columns

The space between columns is defined by the length of \columnsep. To modify it, we use the \setlength macro again. Similarly to the previous examples, this works for two columns with the twocolumn option set and for two or more columns with the multicol package.



Code

[size=1em]

[size=1em]1


[size=1em]2


[color=white !important][size=1em]3


[size=1em]4


[size=1em]5


[size=1em]6


[size=1em]7


[size=1em][size=1em]\documentclass[11pt,twocolumn]{article}
[size=1em]\usepackage{blindtext}
[size=1em]\setlength{\columnseprule}{0.4pt}
[size=1em]\setlength{\columnsep}{3em}
[size=1em]\begin{document}
[size=1em]\blinddocument
[size=1em]\end{document}




二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

关键词:Between columns column Adding colum between

缺少币币的网友请访问有奖回帖集合
https://bbs.pinggu.org/thread-3990750-1-1.html
沙发
kyle2014 发表于 2016-7-7 09:57:25 |只看作者 |坛友微信交流群
thanks

使用道具

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加好友,备注jltj
拉您入交流群

京ICP备16021002-2号 京B2-20170662号 京公网安备 11010802022788号 论坛法律顾问:王进律师 知识产权保护声明   免责及隐私声明

GMT+8, 2024-4-26 05:17