0

EDIT2: This was flagged as duplicate to a question about hyphenation in multi-language-documents. It is not. My document (60 pages) has just one language, but i have eleven such documents, in different languages. I noticed the problem in the danish version. My question relates to the traceability of the hyphenation rules, i.e., how can i find out which rule is followed to what point, rather like in a debugger for a programming language.

ORIGINAL QUESTION: I inherited a very complex latex document (50+ files, class-file, ...). In this document, some expressions are written in CamelCase, and i wanted to employ \hyphenation{Camel-Case} to make sure the expression only gets cut at that one specific position. In at least one case, the expression is cut like this: Came-lCase. If i put the above command exactly in front of the line containing the offending expression, the expression is cut correctly. I checked the spelling of this instance, and made sure it's actually the very same character-encodings as any other instance. So my thinking is that somewhere along the line the hyphenation command gets countermanded. My question is twofold:

  • how can i find out where the command ist countermanded (without trial& error)
  • is there a way to make that command more countermand-proof?

EDIT: I just realized that the sentence runs: "[...] yada yada CamelCase." and that only the dot at the end makes the difference between obeying the hyphenation-command and not obeying it (but that should not impact hyphenation-rules, should it? The dot adds length, but should not make the expression different). The specific document is using\usepackage[danish]{babel} , as the main difference to other documents of the same structure (same content rendered in eleven different languages and therefore babel-packages) - apart from the content being in different languages, of course...

bukwyrm
  • 267
  • 1
    Use \babelhyphenation[danish]{Camel-Case} (or without the optional argument, if the hyphenation must hold for all enabled languages). – egreg Apr 04 '18 at 12:52
  • While this worked to partially solve my problem (Thank You!!) ("partially" because the ideal solution would be something to place before the babel package into the file common to all documents, and the \babelhyphenation{} seems to need a preceding call to \useapackage{babel} - it did not answer my question about the traceability of the status of the hyphenation-rules. – bukwyrm Apr 05 '18 at 07:19

0 Answers0