0

I am writing a document in Hungarian which includes the circle symbol for temperature. Later I have to convert the document to docx so I can only use a small subset of latex, for example, without the siunitx package. It is unfortunate that docx will not benefit from the features of magyar babel, but at this stage I would be happy if at least latex would produce a good output.

In an unfortunate case latex makes a bad job and hyphenation, see the minimal example below. Do I do something wrong? Are there good practices I am not following?

\UseRawInputEncoding % https://tex.stackexchange.com/q/446650/
\documentclass[oneside]{book}

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


\def\magyarOptions{defaults=hu-min} %it is fine without this line, but it is needed
\usepackage[magyar]{babel}

\begin{document}
The problem arises when latex tries to hyphen after the circle sign, $18$ C$^\circ$-ig. In this special case latex put circle two times. The \textbackslash def\textbackslash magyarOptions is required to reproduce this behavior.
\end{document}

The output is:

output

  • One may consider this as a bug report, and as such, this may be off-topic, but I saw people welcoming reported bugs and they also happy to find tricky workarounds. – DanielTuzes Dec 13 '18 at 12:36
  • 1
    If it turns out this is a bug, please report the bug via the channels mentioned in the package documentation. Few things are worse than known bugs mentioned somewhere on the internet that are not reported to the maintainer for fixes. – moewe Dec 13 '18 at 12:39
  • 1
    Since when is the circ behind the C? (And I would naturally use siunitx and \SI{18}{\celsius}-ig. – Ulrike Fischer Dec 13 '18 at 14:52
  • @Ulrike Fischer you are right that the circle is at the wrong place, but the question is still relevant. Although I made the mistake unintentionally, I am glad that I found a behaviour not expected. Using the correct order would only hide the problem. – DanielTuzes Dec 14 '18 at 14:36

Your Answer

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

Browse other questions tagged or ask your own question.