### LaTeX users online

In total there are 9 users online :: 0 registered, 0 hidden and 9 guests (based on users active over the past 5 minutes)
Most users ever online was 1327 on Tue Nov 05, 2013 7:11 pm

Users browsing this forum: No registered users and 9 guests

### LaTeX Friends

Sponsored by DANTE e.V.: The German speaking TeX Users Group

## Thick vertical lines in tabular

### LaTeX Forum: Graphics, Figures & Tables

Add tags Information and discussion about graphics, figures & tables in LaTeX documents.
I am trying to make a table but with thicker lines for all the outer lines. All of the packages suggest that you should never, ever use vertical lines and don't support thicker vertical lines...well what if I need to?!

I've found and example of what I want but it is written in TeX...

Code: Select all  •  Open in online LaTeX editor
{\offinterlineskip\tabskip=0pt\halign{ \vrule height2.75ex depth1.25ex width 1pt #\tabskip=1em &\hfil 0.#\hfil &\vrule # & \qquad$0.#\,\pi$\hfil &\vrule # &\hfil 0.#\hfil &#\vrule width 1pt \tabskip=0pt\cr\noalign{\hrule height 1pt}& \omit$\alpha_s$ &&\omit star angle && \omit diquark size [fm] & \cr\noalign{\hrule}& 3 && 22 && 34 &\cr& 4 && 14 && 22 &\cr& 5 && 095 && 15 &\cr\noalign{\hrule height 1pt}}}

Any Help?
Last edited by cgnieder on Thu Nov 22nd, 2012, edited 1 time in total.
Reason: code marked
pooley343

Posts: 17
Joined: Mon Oct 20th, 2008

Hi,

the following example illustrates one possibility:
Code: Select all  •  Open in online LaTeX editor
\documentclass{article}\usepackage{array}\begin{document}\begin{center}  \renewcommand{\arraystretch}{1.3}  \begin{tabular}{!{\vrule width 2pt}c|c|c!{\vrule width 2pt}c|c|c%  !{\vrule width 2pt}c|c|c!{\vrule width 2pt}}    \noalign{\hrule height 2pt}    1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9\\ \hline    1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9\\ \hline    1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9\\ \noalign{\hrule height 2pt}    1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9\\ \hline    1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9\\ \hline    1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9\\ \noalign{\hrule height 2pt}    1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9\\ \hline    1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9\\ \hline    1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9\\ \noalign{\hrule height 2pt}  \end{tabular}\end{center}\end{document}

To change a vertical line's width, use
Code: Select all  •  Open in online LaTeX editor
!{\vrule width <unit>}
To change a horizontal line's width, use
Code: Select all  •  Open in online LaTeX editor
\noalign{\hrule height <unit>}
1,1,2,3,5,8,13,21,34,55,89,144,233,...

gmedina

Posts: 2313
Joined: Wed Jul 11th, 2007
Location: Colombia

Gmedina, thanks very much for this old post of yours. This morning I was looking for how to increase the line width of vertical lines in tables. I spent a lot of time searching and only found people giving advice about why there should be no vertical lines in tables, which was useless to me since normal form representations of games in Game theory often have vertical lines. Then I came across this helpful post of yours, on this ever helpful forum.
curiouslearn

Posts: 105
Joined: Fri Nov 30th, 2007

curiouslearn wrote:[...] I spent a lot of time searching and only found people giving advice about why there should be no vertical lines in tables, which was useless to me since normal form representations of games in Game theory often have vertical lines. [...]

Avoiding vertical lines is still true for tables containing normal text to improve readability. If the special purpose of a table is made clear right at the beginning, nobody will refuse to help in creating a table with vertical lines.

Best regards
Thorsten¹
LaTeX Community Moderator

¹ System: openSUSE 13.1 (Linux 3.11.10), TeX Live 2013 (vanilla), TeXworks 0.5 (r1351)
² Posting stopped indefinitely due to offenses

localghost
Site Moderator

Posts: 9218
Joined: Fri Feb 2nd, 2007
Location: Braunschweig, Germany

Thanks, Thorsten. I understand. Can someone please tell me how I can use the thickness of \cline lines, that is lines which only span a few columns. Alternatively, how can the thicker horizontal lines drawn using the method suggested by gmedina can be restricted to only a few columns.

Thanks for any help.
curiouslearn

Posts: 105
Joined: Fri Nov 30th, 2007

Code: Select all  •  Open in online LaTeX editor
\newlength{\arrayrulewidthOriginal}\newcommand{\Cline}[2]{%  \noalign{\global\setlength{\arrayrulewidthOriginal}{\arrayrulewidth}}%  \noalign{\global\setlength{\arrayrulewidth}{#1}}\cline{#2}%  \noalign{\global\setlength{\arrayrulewidth}{\arrayrulewidthOriginal}}}

Then write, for example, \Cline{2pt}{4-7} where you would use \cline{4-7}.
The CTAN lion is an artwork by Duane Bibby. Courtesy of www.ctan.org.

Juanjo

Posts: 656
Joined: Sat Jan 27th, 2007

THANKS, Juanjo, this is exactly what I have been looking for
This definitely is the easiest way to handle table line thickness. GREAT!
Da Masda

Posts: 2
Joined: Thu Nov 22nd, 2012