I have used the package \usepackage{lmodern} to increase the font size of the my chapter title. Due to that, I am getting strange characters in my text.

Before using the package the text looked like this:

enter image description here

Now it looks like this:

enter image description here

My code in part is as under:





Any ideas how to rectify that?

  • How are you typesetting the document? What file encoding are you using? Are you using a 2018 TeX Distribution? Sep 1, 2018 at 20:36
  • Sorry, I am new to this. can you plz tell me where to fetch this information. I am using overleaf btw.
    – Tasie
    Sep 1, 2018 at 20:40
  • that is unrelated to the font choice, it looks like you have saved the file in UTF-8 encoding but declared to TeX that it is in latin1 Sep 1, 2018 at 21:13

1 Answer 1


You have an endash at this places and your document is utf8 encoded. For pdflatex this means it sees the bytes "E2 "80 "93 You are using an older latex which doesn't declare utf8 by default. As your document is neither using inputenc nor fontenc the default font cmr, which has empty slots at this positions simply shows nothing. lmodern has glyphs there and shows them.

Solution: Declare your encoding as utf8 or use a newer latex. You should also load fontenc.

\documentclass[a4paper, english]{article}

some text – with endash


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .