Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.
  1. !Partially solved! How to remove small white spaces between color blocks? (when you compile this tex there are small white spaces between the & \cellcolor{EM}\& & \cellcolor{EM}\\) white spaces I found an answer, but I think that this answer is bad: & \cellcolor{EM}\\[-1pt] & & \cellcolor{EM}\\
  2. !Solved! What is the best way to use Helvetica in the whole text? (I saw many answers for this question. And I would like to know how to use Helvetica throughout the whole text (what is the best method?)); and this question was answered by Canageek.
  3. !Solved! And, how to make \hhline bigger? I don't want to use \hhline\hhline (I want to set the thickness of \hhline).

\documentclass{article}  
\usepackage[utf8]{inputenc}  
\usepackage{multirow}  
\usepackage{rotating}  
\usepackage[english]{babel}  
\usepackage{tgheros}  
\usepackage{hhline}  
\renewcommand*\familydefault{\sfdefault}  
\usepackage{sectsty}     
\usepackage[usenames]{color}  
\usepackage{colortbl}  
\usepackage[table]{xcolor}  
\definecolor{EM}{rgb}{0.70,0.86,0.69}      
\begin{document}  
\begin{center}  
\begin{tabular}{|c|c|c|}  
\hline  
day & time & lesson \\  
\hline  
\hline  
\multirow{4}{*}{\rotatebox{90}{Mon}} & \multirow{2}{*}{$9^{00}-10^{20}$} & \cellcolor{EM}\\  
& & \cellcolor{EM}\\  
\hhline{|~|-|-|}   
\hhline{|~|-|-|}    
& \multirow{2}{*}{$10^{30}-11^{50}$} & \cellcolor{EM} \\  
& & \cellcolor{EM} \\  
\hhline{|-|-|-|}   
\hhline{|-|-|-|}   
\end{tabular}  
\end{center}   
\end{document}

share|improve this question
    
Welcome to TeX.sx! A tip: If you indent lines by 4 spaces or enclose words in backticks `, they'll be marked as code, as can be seen in my edit. You can also highlight the code and click the "code" button (with "{}" on it). –  Joseph Wright Oct 27 '12 at 18:21
1  
There seems to be more then one question here. Can you edit it to make it clearer what you are asking? –  Canageek Oct 27 '12 at 18:39
    
Now it is better, I think. –  Ptech Oct 27 '12 at 18:45
    
Increasing the rule width for all rules within the tabular is possible through \setlength{\arrayrulewidth}{<len>} where you pick <len>. –  Werner Oct 27 '12 at 20:29
    
I want to change ONLY \hhline thickness. –  Ptech Oct 27 '12 at 21:04

2 Answers 2

up vote 8 down vote accepted

I'd use 9\textsuperscript{00}--10\textsuperscript{20} rather than $9^{00}-10^{20}$ because:

  • It's not math.
  • It uses the math font rather than the text font.
  • $-$ is a minus sign with its appropriate spacing while -- is the correct en dash (“9 o'clock to 10.20” not “9 raised to the 0-th power minus 10 raised by the 20-th power”). \end{nitpick} Compare:
    math vs text

White Space

I still believe this is a PDF viewer rendering issue.

When viewing with SumatraPDF at 6400 % (!) I can see the white-ish (they are grey) lines (here at the crossing of the hhlines):
SumatraPDF 6400%

At around 1000 % you can still see them:
Sumatra 1000%

These are (anti-)aliasing artefacts.
Looking closely at the 6400 % image you can see that there's a lot going on:
6400% upscaled

With the Foxit Reader some of these white spaces are not visible at different zoom factors.
Adobe Reader doesn't show them at all (example at 6400 %):

Adobe: 6400%

Now your \\[-1pt] trick does help you in the way, that colored areas do overlap (by 1pt nonetheless) instead of just touching themselves. But don't use it; they're really just touching.
I can also resolve this non-existing issue by (virtually) printing to PDF.

You may have noticed that these thin white spaces are the same size at every zoom factor which is another indicator that this is a rendering issue.

Bigger \hhline.

Apart from setting a tabular-global \arrayrulewidth there, as far as I know, are two solutions (meaning one bad solution and one work-around):

  • \hhline{===} instead of \hhline{---}
  • New macro \hhhline that just expands to two \hhlines:

    \newcommand*\hhhline[1]{\hhline{#1}\hhline{#1}}
    

Or booktabs

The following may not apply to your specific table …

Instead of using a header which describes the columns in a very duh! way (Really? Mon, Tue, Wed, … do stand for (week)days? Oh, and 900–1020 is a time (span)?), I'd use a combination of booktabs and no colors.

Further effort has to be put in the goal of same-width columns (tabularx' X specification for example). In my own timetable I even have dropped the weekdays headings, because I am (just barely) able to count to five. ;)

See Herbert's comment: “from typographers view it makes no sense to have lines and colored cells”, and Alan Munn's answer.

Code

\documentclass{article}
\usepackage{multirow}
\usepackage{tgheros}
\usepackage{booktabs}
\renewcommand*\familydefault{\sfdefault}
\begin{document}
\centering
\begin{tabular}{r*5c}
    \toprule
                                                   &           Mon            &     Tue     &   Wed    &  Thu   & Fri \\ \midrule
     9\textsuperscript{00}--10\textsuperscript{20} & \multirow{2}{*}{English} & Mathematics & Deutsch  &  \TeX  & --- \\
    10\textsuperscript{30}--11\textsuperscript{50} &                          &   Physics   & Italiano & \LaTeX & --- \\ \bottomrule
\end{tabular}
\end{document}

Output

booktabs output

share|improve this answer
    
There will be other people who will use this sched. I wanted to make a better University sched, I'm afraid that some of them will see those white spaces, and it will be really bad. So, only [-1pt] will do the trick? –  Ptech Oct 28 '12 at 6:45
    
\hhline{===} prints two lines instead of one. –  Ptech Oct 28 '12 at 7:37
    
Speaking about \hhline I fount this solution too: \newlength{\Oldarrayrulewidth} \newcommand{\hhhline}[2]{% \noalign{\global\setlength{\Oldarrayrulewidth}{\arrayrulewidth}}% \noalign{\global\setlength{\arrayrulewidth}{#1}}\hhline{#2}% \noalign{\global\setlength{\arrayrulewidth}{\Oldarrayrulewidth}}} It's bad because it changes width not only height. –  Ptech Oct 28 '12 at 7:56
    
@Ptech As it is a viewer issue, I'm afraid that only [-1pt] will satisfy you. \hhline{===} prints a very thick hline in you MWE. And your \hhhline solution doesn't change the horizontal dimension but also the width of vertical lines which are drawn in \hhline, too. –  Qrrbrbirlbel Oct 28 '12 at 13:56

The best way to use Helvetica in your whole document is, according to The LaTeX Font Catalogue

\usepackage{tgheros}
\renewcommand*\familydefault{\sfdefault}

TeX Gyre Heros is an extended version of URW Nimbus Sans, which is what you get with the helvet package. If you want to keep using the helvet package for whatever reasons, the example loads it as

\usepackage[scaled]{helvet}
\renewcommand*\familydefault{\sfdefault}

I don't know what the differences is between helvet and Nimbus Sans (nimbus) is, but that is also an option is in tgheros:

\usepackage{nimbus}
\renewcommand*\familydefault{\sfdefault}

Sorry I can't help with the rest of your questions, you should really post one question at a time, so that you don't get a mix of answers.

share|improve this answer
    
This was really helpful, TU! –  Ptech Oct 27 '12 at 18:54

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.