I have a very long document. If I add this code

Si chiama spazio misurabile ogni coppia $(\Omega ,\mathcal{A})$, dove $\Omega\neq\emptyset$ e $\mathcal{A}$ è una $\sigma$-algebra in $\Omega$­.
Gli insiemi $\mathcal{M}\in\mathcal{A}$ vengono detti insiemi misurabili.

It give the following error:

Package inputenc Error: Unicode char \u8:­ not set up for use with LaTeX

The funny thing is that if I put the code above into a MWE (for definition) it work. I cannot understand what's up.

\documentclass{article} %WORKING!!!!

\begin{document}%then same text than above
Si chiama spazio misurabile ogni coppia $(\Omega ,\mathcal{A})$, dove $\Omega\neq\emptyset$ e $\mathcal{A}$ è una $\sigma$-algebra in $\Omega$­.
  • 7
    We cannot understand it either, if you only show us working code, and no errors. Make an MWE by starting with your non-working document, then remove piece by piece until you're left with the smallest example possible that reproduces the problem. – Torbjørn T. May 9 '16 at 20:57
  • 1
    The log entry showing what the error is might also help. Doing what @TorbjørnT. suggests often results in finding the error yourself. – A Feldman May 9 '16 at 21:02
  • 1
    And what was the error message? – Herb Schulz May 9 '16 at 21:07
  • 4
    "does not compile" gives no information at all, do you get an error or does the program loop forever or ... – David Carlisle May 9 '16 at 21:38
  • 5
    Even my usually trustful crystal ball gives no clue. – egreg May 9 '16 at 23:21

Both versions of your input appear to contain a non-printing character, "­". (No, it's not visible in this posting! However, it's visible in my editor, and it looks like a very short - (dash) character.) The mystery character is located between $\sigma$-algebra in $\Omega$ and the sentence-ending . ("period", "full stop").

I suggest you remove this character, especially as it doesn't appear to be doing anything useful.

Just for completeness, here's an MWE that does compile without a problem. Loading the inputenc package with the option utf8 is the key to this "success". Unfortunately, the mystery character still isn't visible, and hence I'm not bothering to post a screenshot.


Si chiama spazio misurabile ogni coppia $(\Omega ,\mathcal{A})$, dove 
$\Omega\neq\emptyset$ e $\mathcal{A}$ è una $\sigma$-algebra in $\Omega$­.
  • In fact, almost surely that's the problem. But then, can you explain why my MWE above gives no error? Maybe proper because I haven't loaded any package at all? – Francesco May 10 '16 at 13:26
  • 2
    @Francesco — correct; you need to load inputenc with the utf8 option for it to recognise that character as a utf8 char it doesn't know what to do with. – Will Robertson May 10 '16 at 13:34
  • According to w3c.github.io/xml-entities/unicode-names.html it is a U+00ad SOFT HYPHEN ­ \- – Rmano May 10 '16 at 17:30
  • @Rmano - Thanks for this additional piece of information. You're quite the sleuth! The fact that my editor displays the character as a "very short dash" turns out to quite appropriate, then. :-) – Mico May 10 '16 at 19:23
  • 2
    ..and it's not showing up because it's ­... (/me ducks). – Rmano May 10 '16 at 19:52

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