# Latex error: Option clash for package inputenc

I tried to cut all the unnecessary text and it all boils down to this: the following file does compile if I comment the \usepackage[mac]{inputenc} line.

\documentclass{frontiersSCNS}
\def\journal{Bioengineering}
\def\firstAuthorLast{Sample {et~al.}}
\usepackage[mac]{inputenc}
\begin{document}
a
\end{document}


However, with that line, the result is

Latex error: Option clash for package inputenc

\begin
{document}


It must be something trivial, but I have no idea what is happening and how to solve it. Can anyone help me?

• Your local class must be loading inputenc with a different encoding, check the class documentation to see if has options to control that – David Carlisle Aug 4 '14 at 17:30
• If I found the correct class then it loads inputenc without any option. Try \inputencoding{mac} – Ulrike Fischer Aug 4 '14 at 17:35
• Thank you both very much. I did not know how to find the class documentation. However, the \inputcoding{mac} worked perfectly. – Fernando Sampaio dos Aidos Aug 4 '14 at 17:45
• You shouldn't use the mac encoding if you want your document to be portable. Use utf8 instead. – Bernard Aug 4 '14 at 17:50
• @FernandoSampaiodosAidos you could use those characters but you would need to save your file in utf8 not the mac-specific encoding, that is better and more portable really anyway. – David Carlisle Aug 4 '14 at 20:44

## 1 Answer

I just stumbled upon the same issue with the frontiers style. You can add

\DeclareOption{utf8}{\PassOptionsToPackage{utf8}{inputenc}}


in line 25 of frontiersSCNS.cls and use

\documentclass[utf8]{frontiersSCNS}


in your document. I've submitted this suggestion also to the frontiers editorial office.

• (1) welcome, (2) problably only a good idea if you are the only user of this document. If you send it to others they version of the .cls will not have this fix and the doc will fail – daleif Sep 7 '16 at 10:50
• This is the style file for the journal frontiers. Usually it is used in a specific paper, where all co-authors have access to the .cls file. My suggestion to their editorial office was to put their style files on GitHub, so everyone can use them (and contribute fixes) easily. – Jochen Martin Eppler Sep 8 '16 at 21:25
• Probably not a super good idea, there will always be people who disagree with the in house style of a journal, you do not want to bother with those people submitting changes to the style of the template – daleif Sep 9 '16 at 4:51
• I just now got an email by the editorial office with an updated version that includes my suggestion. It will soon be uploaded to their author guideline page to replace the old one. Regarding GitHub: they consider putting it there, but of course might decide not to. And I fully agree that everyone disagrees about journal styles. I did not mean that everyone shall be able to add his or her changes directly. But a purely pull-request based workflow works quite well IMO to have an officially approved version, while still allowing people to improve things. – Jochen Martin Eppler Sep 9 '16 at 14:42
• IMHO a class shouldn't load inputenc at all. Input encodings clearly are something to set per document. – cgnieder Dec 6 '16 at 12:27