I am using the "songs package" to compile a songbook. Originally I had an issue where none of the special characters in my native language would appear in the produced pdf. #Alan Munn helped me to resolve 99% of my original issue by adding the following to my .tex file:
\usepackage[T1]{fontenc}
\usepackage{lmodern}% load a font with all the characters
However with the resolution appeared a new issue namely the used apostrophe (') is displayed as (Š) character whereas is was also omitted previously. A futher proposal was to add:
\usepackage[utf8]{inputenc}
Adding this results in error message: "package inputenc error: keyboard character used is undefined (inputenc) in inputencoding 'utf8'
However logic dictates to my ignorant brain that the resolution could be instead in the previous measures as it is now not omitting the (') but displaying it incorrectly - maybe this can be manipulated? Can anybody advise me on this?
This is what I have so far:
\documentclass[letterpaper,10pt]{article}
\usepackage[bookmarks]{hyperref}
\usepackage[lyric]{songs}
% \includeonlysongs{2}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}% load a font with all the characters
\usepackage[afrikaans]{babel}
\setlength{\oddsidemargin}{0in}
\setlength{\evensidemargin}{0in}
\setlength{\textwidth}{6.5in}
\setlength{\topmargin}{0in}
\setlength{\topskip}{0in}
\setlength{\headheight}{0in}
\setlength{\headsep}{0in}
\setlength{\textheight}{9.5in}
\settowidth{\versenumwidth}{1.\ }
\pagestyle{empty}
\newindex{titleidx}{lbtitle}
\begin{document}
\showindex{Inhoudsopgawe}{titleidx}
\songsection{Dogter van Sion Liedere}
\begin{songs}{titleidx}
\beginsong{DAAR’S ‘n LEEU}
\textnote{sing 4x; eerste stadig dan 2 vinniger en laaste weer stadig}
\beginverse
Daar’s ‘n Leeu wat brul uit die Suide -
dis die Leeu van Judah.
\endverse
\endsong
\end{songs}
\end{document}
The verse quoted above is an extract from the file songs.sdb which basically only contains songs and verses.
It produces a pdf that replaces the apostrophy (in the first line) with a (Š) character:
DaarŠs Sn Leeu wat brul uit die Suide -
dis die Leeu van Judah.
songspackage per se. See How to type special/accented letters in LaTeX?. – Alan Munn Feb 20 '16 at 19:52I added:
\usepackage{inputenc} \usepackage[T1]{fontenc} \usepackage{lmodern} % load a font with all the characters
– Gert Feb 20 '16 at 21:17{}icon it will be formatted as code. (Code is formatted with 4 spaces before each line). But your edit itself, doesn't show the problem, since it depends onsongs.sbdwhich we don't have. But we shouldn't need that whole file, just the line of it that causes the problem. – Alan Munn Feb 20 '16 at 21:48utf8and you are loadinginputencwith theutf8encoding? (i.e.\usepackage[utf8]{inputenc}) – Alan Munn Feb 20 '16 at 23:10\documentclassto\end{document}– David Carlisle Feb 21 '16 at 01:52songs.sbdmight be obtained from? – Mico Feb 21 '16 at 10:31hyperrefshould be loaded last, with few exceptions. It should not be the first package loaded. – cfr Feb 21 '16 at 19:43‘n, for example, but’s. It works for me, regardless - even withhyperrefloaded first, although that'll probably cause other problems. – cfr Feb 21 '16 at 19:53Moving the hyperref does not make any difference. The moment I add the utf8 command it bails and result in the error message mentioned in the question.
– Gert Feb 21 '16 at 20:09