Let's suppose your language is not English but another European language with Latin alphabet that uses special characters like á, ç, ñ, etc. Now, let's suppose you want to prepare some documents, examples and exercises for a LaTeX course. You want that all your documents could be used in any editor+operation systems used by your students. What do you do?

Probably the best solution would be to prepare everything with \'a, \~n, ... But as soon as your students see something like this they'll run away. If it's already difficult that they write with accents having to press only two keys, imagine the result when they have to press three or more keys to get correct symbols.

If you decide to use some encoding (latin1, utf8, ...), how do you ensure that this will be valid for your students system? Do you have to explain iconv? Should we force to use a particular editor? ...

Could you explain me your strategies against this problem?

  • 16
    Just use utf8, every operating system can handle it these days, and every modern TeX-editor can as well. Just make sure they are aware of the encoding issue and how they can ensure a specific encoding. – Johannes_B Oct 8 '15 at 9:24
  • We are teaching Lua latex with utf-8 – MaxNoe Oct 8 '15 at 10:27
  • 1
    I teach workshops in a computer lab. Since none of the computers have TeX installed or a TeX-specific editor, I used OverLeaf. So at least I'm guaranteed a given encoding etc. I've had one follow-up email which turned out to be an encoding issue. It doesn't really matter whether the primary language is English, even, since students very probably need references with authors whose names will not all be ASCII. How do you get accents with only two keys? – cfr Oct 8 '15 at 10:32
  • 2
    Sadly, I don't think they make Welsh keyboards.... – cfr Oct 8 '15 at 11:18
  • 5
    \usepackage[utf8]{inputenc} and set the editor to use UTF-8 – egreg Oct 8 '15 at 11:50

I usually start out using pdflatex and make sure the students have \usepackage[utf8]{inputenc} in their preamble to begin with, which so far has proven to work on all systems. After a bit of introduction I then compare this to XeLaTeX - in part because of the ease of using utf-8. Since this also work on all platforms I and my students use, it works here. Once the students have gotten a bit used to the idea of using pdflatex/xelatex I tell them about \usepackage{iftex} and how to prepare the document for both xelatex and pdflatex.

As for editor, I usually turn to any one that is available for the three platforms we use mostly (windows, mac, linux), at the moment they get to use TeXstudio. Using the same editor makes it (in my opinion) easier for students to help each other and compare the code, but if a student is already comfortable using another editor, I don't see that as a big deal. The code will remain the same, regardless of the editor I use.

Only after they are really used to how a tex-system works, is when I introduce them to the non-utf-8 approach you describe, \'a, \~n. This way, since they mainly write in Swedish which has a few characters that are most easily dealt with in utf-8, they get different ways of solving the issue.

(This is my first answer and as such I hope I have followed the guidelines for the forum. If not, please let me know. )

  • 2
    What a nice first answer! A-okay. – percusse Oct 12 '15 at 21:07
  • 1
    During my courses for LaTeX beginners, I also advise TeXstudio and \usepackage[utf8]{inputenc}. I mention there are other encodings, mainly to not let them into troubles if they see e.g. \usepackage[latin1]{inputenc} in LaTeX codes on Internet. I warn them to check the encoding they specify in their code should match the actual encoding of their file: that's the most cryptic part of my course but, hopefully, TeXstudio specifies the latter in the footer and even lets the user change it. There are some rare case where everything gets wrong (mainly after copy-paste from word processors). – Denis Bitouzé Oct 14 '15 at 5:56
  • @DenisBitouzé : I do the same as you, but I wait until they are familiar with the (La)TeX way of thinking and introduce other encodings around the same time I introduce non-utf8 methods. By then they are used to different options for packages and they'll more easily accept the different encoding options. My whole introduction to LaTeX is usually about 6 hours, this gets introduced after approximately 4. Good point about "copy paste". – Fredrik Johansson Oct 14 '15 at 7:31
  • @FredrikJohansson You're right: maybe I should wait a bit for those cryptic things. But I'm reluctant to introduce non-utf8 methods: some students already regard LaTeX as too verbose, too difficult :) – Denis Bitouzé Oct 14 '15 at 13:51

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.