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.

I am trying to create a table using the tabular environment using this code snippet:

\documentclass{article}

\begin{document}
\begin{table}
    \centering
        \begin{tabular}{|l|l|}
                \hline
                \multicolumn{2}{|c|}{\textbf{Scenario}} \\ \hline
                This & 15 \\ 
                Is  & 10  \\
                Example & 100  \\ 
            Tabular  & 10 \\ \hline
        \end{tabular}
\end{table}
\end{document}

This works fine for this MWE, but in my own document the result has strange added symbols in the table. All the symbols are the same: ăăăăă.

Does anyone have a solution? I've been struggeling with this for quite some time and tried a few things myself without success. The MWE I has no issues, still I would like like to know if someone has expierenced the same issue before.

share|improve this question
3  
What packages are you using? Ideally we'd like to copy-and-paste your code and be able to compile it without problem. Those things are referred to as a minimal working example (MWE). Your code snippet requires some detail over the location of \meter, \per, \second, \squared, etc. –  Werner Nov 24 '12 at 15:52
    
I'm not getting the errors you're talking about. Could you give a minimal working example as per Werner's suggestion. –  A.Ellett Nov 24 '12 at 16:26
1  
@Martijn: This is still not a MWE. Please make it selfcontained. –  Martin Schröder Nov 24 '12 at 18:23
2  
@Martijn: By definition, you have to have the issue in the MWE, otherwise it's not a MWE. (The "working" in "minimal working example" is a little misleading, it should be something like "not working" or "buggy".) Have a look at meta.tex.stackexchange.com/questions/228/… –  doncherry Nov 24 '12 at 18:40
4  
You probably have a "NO-BREAK SPACE" character in your input; since you don't load inputenc, this character produces the glyph in position 0xA0 which, in a T1 encoded font, is precisely "ă". Try loading \usepackage[ascii]{inputenc} and you'll get error messages about it. –  egreg Nov 24 '12 at 18:44
show 6 more comments

1 Answer 1

I get the problem when the document is encoded as Latin-1 and a "NO-BREAK SPACE" character is used (as between the letters X, Y and Z)

% -*- coding: latin-1 -*-
\documentclass{article}
\usepackage[T1]{fontenc}
\begin{document}
X Y Z
\end{document}

enter image description here

If the file is UTF-8 encoded, the same input gives

enter image description here

The fact is that if inputenc is not loaded, the "NO-BREAK SPACE" character typesets the glyph in the current font that's T1 encoded (if fontenc had not been loaded nothing would have been printed) and in position 0xA0 there is precisely an "ă".

With the following modification

% -*- coding: latin-1 -*-
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[ascii]{inputenc}
\begin{document}
X Y Z
\end{document}

running LaTeX would give something like

! Package inputenc Error: Keyboard character used is undefined
(inputenc)                in inputencoding `ascii'.

See the inputenc package documentation for explanation.
Type  H <return>  for immediate help.
 ...                                              

l.6 X?
      Y?Z

which might help you in zapping the offending character.

share|improve this answer
    
Thank you for your explenation. I do however have an additional question before I can solve the issue. You are saying "zapping the offending character", does this mean I need to delete some character or put a ~ somewhere? What would be a bad character in my 'MWE'? –  Martijn Nov 24 '12 at 19:18
    
I cannot post my own answer, but removing the indents in the tabular environgment resolved the issue for my specific document class. Allthough I find this very supprising, it did the trick. –  Martijn Nov 24 '12 at 19:51
add comment

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.