# Tag Info

5

Try \language0 \hyphenation{ab-cdef} \newlanguage\newlang \language\newlang \hyphenation{abc-def} \language0 \showhyphens{abcdef} \language\newlang \showhyphens{abcdef} \bye

4

When you do \newlanguage\newlang, TeX looks at the number of the most recently allocated language, steps it and assigns this number as the meaning of \newlang. In your case, where you seem to be using Knuth TeX with the Plain format, the only allocated language is number 0, so the instruction \newlanguage\newlang prints in the .log file the information ...

4

I'm not sure why anybody would want to disable hyphenation. However, the settings \hyphenpenalty=10000 \exhyphenpenalty=10000 completely inhibit it, which is what the none option to hyphenat does: \DeclareOption{none}% {\hyphenpenalty=10000\exhyphenpenalty=10000\relax} If you want to reenable it for a single paragraph, the simplest way is to say ...

3

In addition to the major issue you've indentified, there are two further (and minor) issues that should also be fixed. The major issue is, of course, the spurious blank line above the hyphenated word "Wave-length". It arises because (a) there's a space between \hspace{0pt} and the word "Wavelength" and (b) the column is just narrow enough to permit "Wave-" ...

2

Here is rather crude solution, which just inserts a \- between a vowel and some consonants: \documentclass{article} \usepackage{luacode} \begin{luacode*} function insdisc (s) -- add more letters if necessary s = s:gsub( [[([aeiou])([bcfgklmnpqtxz])]] , '%1\\-%2' ) -- but don't leave a single char alone: s = s:gsub( '^(.)\\%-', '%1') s = ...

1

A more elegant approach would be to use babel command shorthand \babelhyphen{repeat} (section 1.5) to define a new character (or in this case two) for a repeatable hyphen. It's designed specifically for that (see this question): hard hyphen inside compound words are repeated at the beginning of the next line. Something like this: ...

Only top voted, non community-wiki answers of a minimum length are eligible