Dear LyXers,

when the font encoding is switched from T1 (LuX's default) to the legacy
7-bit encoding OT1 (TeX's default), default fonts look better on screen as
the real default (Computer Modern) is used instead of the bitmap
substitution EC.

However, with OT1, hyphenation is wrong in most languages and some
characters are not available.

Missing character makros are \DH, \dh, \DJ, \dj, \NG, \ng, \TH, \th
and the makro \k.

If the respective characters are used in a document with font-encoding set
to [Custom] OT1 or [None], compilation fails with errrors like:

  ! LaTeX Error: Command \k unavailable in encoding OT1.
  
  See the LaTeX manual or LaTeX Companion for explanation.
  Type  H <return>  for immediate help.
   ...                                              
                                                    
  l.105 \item [{100}] Ā ā Ă ă Ą
                                     ą Ć ć Ĉ ĉ Ċ ċ Č č Ď ď
                                     
or

  ! LaTeX Error: Command \NG unavailable in encoding OT1.
  
  See the LaTeX manual or LaTeX Companion for explanation.
  Type  H <return>  for immediate help.
   ...                                              
                                                    
  l.109 ...}]  Ł ł Ń ń \c{N} \c{n} Ň ň 'n{} Ŋ
  

This can be prevented by substitution definitions in the preamble:

\usepackage{wasysym} % provides \DH, \dh, \Thorn, \thorn
\ProvideTextCommandDefault{\TH}{\Thorn}
\ProvideTextCommandDefault{\th}{\thorn}

\DeclareTextAccentDefault{\k}{T1}
\DeclareTextSymbolDefault{\NG}{T1}
\DeclareTextSymbolDefault{\ng}{T1}


Questions:

Should LyX insert such definitions in case the characters are present and
font-encoding is OT1 or None?

Implementation idea:
* lib/unicodesymbols: give the affected characters a textpreamble "OT1hack"
* LaTeXFeatures: insert the substitution definitions, if fontenc=OT1.


Are there side-effects to be expected? When do people set font-encoding None?

Alternatively: Should font-encoding OT1 or None be treated as "power-user
options" and the user be expected to know the deficiencies and workarounds?


Günter


Reply via email to