0

I wrote a list and want it to display * "bok" til (imagine that * is an orange star), but instead, the output is * boktil. I think it has something to do with the [nynorsk]{babel} package or the wishlist environment? Here's the code (the problem is \item "bok" til):

\documentclass[a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[nynorsk]{babel}
\usepackage{xcolor,enumitem,amssymb,pifont}

\newenvironment{wishlist}{
    \renewcommand{\labelenumi}{\color{orange}$\bigstar$}
    \renewcommand{\labelenumii}{\roman{enumii}}
    \renewcommand{\labelenumiii}{\textendash}
    \renewcommand{\labelenumiv}{\alph{enumiv}}
    \begin{enumerate}}
    {\end{enumerate}}

\begin{document}

\begin{wishlist}
    \item "bok" til
\end{wishlist}

\end{document}

Then my question is: Is there a command that allows the symbols to be displayed in the PDF as they are written in LaTeX? Maybe a command that works for all kinds of symbols?

(I tried \" but that gave two dots over the b and two dots over the t) Also, a wierd thing is if you replace bok with h and til with h it gives * "h"h.

3
  • The character " can be typeset with \textquotedbl in LaTeX. You should, however, perhaps rather use typographically correct quotation marks (for Norwegian those should be either \guillemotleft and \guillemotright — «…» — or \quotedblbase and \textquotedblleft — „…“). Commented Nov 5, 2019 at 19:03
  • \textquotedbl causes the same problem as " does. It doesn't work.
    – Vebjorn
    Commented Nov 5, 2019 at 19:15
  • You could try \usepackage[T1]{fontenc} with \textquotedbl. But I guess, this is not the best solution … Commented Nov 5, 2019 at 19:23

1 Answer 1

2

The quotes are made an active character in norwegian. To use them, babel defines the shortcut \dq. Other than this, I took the opportunity to simplify your code, using the functionalities of enumitem:

\documentclass[a4paper, nynorsk]{article}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage{xcolor,enumitem,amssymb,pifont}
\usepackage[autostyle, norwegian=quotes]{csquotes}

\newlist{wishlist}{enumerate}{4}
    \setlist[wishlist, 1]{label=$\bigstar$, font=\color{orange}}
    \setlist[wishlist, 2]{label=\roman*}
    \setlist[wishlist, 3]{label=\textendash}
    \setlist[wishlist, 4]{label=\alph*}

\begin{document}

\begin{wishlist}
    \item \dq bok\dq til
\end{wishlist}

\end{document} 

enter image description here

3
  • Thanks! But how do you get \ in Norwegian? I tried \char`\\ and it gave (surprisingly) " .
    – Vebjorn
    Commented Nov 5, 2019 at 19:29
  • No, it is kind of a separate question, but related. If I want to write \ in the text, how to I do that? Is there a command like \backslash or?
    – Vebjorn
    Commented Nov 5, 2019 at 20:29
  • 2
    The command is \textbackslash.
    – Bernard
    Commented Nov 5, 2019 at 20:58

You must log in to answer this question.

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