3

I will submit a paper in mathematic to a journal. I write it in english.

Can I delete the following code

 \usepackage[latin1]{inputenc}
 \usepackage[T1]{fontenc}

Or I should replace it by another codes?

I ask this question, because some times when I want to open my tex file, I couldn't open it and I get this message. But when I change the folder of my tex file, it will be opened without any problem.

enter image description here

Thank you!

  • 2
    you should keep T1 and use whatever input encoding you use: utf8 in preference to latin1, or if you only use ascii input then you can drop inputenc – David Carlisle Jan 1 '18 at 12:17
  • 1
    the simplest thing is to write exactly what you wrote, unless you have a specific reason to change it. – David Carlisle Jan 1 '18 at 12:24
  • Thank you: that is I use the following code? :\usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} because some times I find problems with 'inputenc' when I write in french – Student Jan 1 '18 at 12:32
  • 1
    that is a completely separate issue, using non-ascii caracters in file names, it is simplest just not to do that. There is absolutely no way anyone could have guessed that was the issue from your original question. that is why questions should always have a complete test document, and if they are about an error message have the complete error (preferably as text from the log file, not as an image) – David Carlisle Jan 1 '18 at 12:41
  • 1
    your image also shows you are using \bf don't do that! – David Carlisle Jan 1 '18 at 12:42
9

If your document really is saved in latin1 (ISO-8859-1) encoding then it is perfectly OK to leave

 \usepackage[latin1]{inputenc}
 \usepackage[T1]{fontenc}

however latin1 is mostly regarded as a "legacy" encoding, and most operating systems and editors will (or should) default to UTF-8 (Unicode) encoding these days. If using UTF-8 then the lines should be

 \usepackage[utf8]{inputenc}
 \usepackage[T1]{fontenc}

If you can guarantee that you only use ASCII input then ASCII, UTF-8 and latin1 are the same encoding in that range so it doesn't really matter, you could delete the inputenc line but it is probably better to still specify the encoding your editor is using (which most likely is UTF-8 as noted above).

You should keep the T1 fontenc line unless you have specific reason to remove it.

4

As David stated utf-8 is preferable to latin1, to get this you should write

\usepackage[utf8]{inputenc} 
\usepackage[T1]{fontenc}

Instead off

\usepackage[latin1]{inputenc} 
\usepackage[T1]{fontenc}

However, if you write only in English and don't use utf-8 symbols you could just write:

\usepackage[T1]{fontenc}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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