On 2013-10-03, Scott Kostyshak wrote:
> Thanks for the confirmation. I started a thread on lyx-devel.
> Hopefully there's an easy way to have pdfTeX and XeTeX working. Note
> that if I remove the following lines from the preamble, export with
> XeTeX
> works fine (but pdfTeX is broken):

> \DeclareInputText{176}{\ifmmode^\circ\else\textdegree\fi}
> \DeclareInputText{183}{\ifmmode\cdot\else\textperiodcentered\fi}

There is a simple fix: move the offending lines into the

\ifpdf
\fi 

block.

However, the right way is to remove the lines as well as the
section in the guide, because it is no longer true. Since several versions,
LYXDIR/unicodesymbols contains the required definitions for text and math
mode.

(BTW: there are more problems with these lines: 

* they also fail if you change the input encoding of the latex source
  (e.g. Document>Settings>Language>Encoding>Unicode(utf8).
* the use of \ifmmode is problematic, the better alternative is \TextOrMath
  provided by the fixltx2e package.

Günter



#LyX 2.0 created this file. For more info see http://www.lyx.org/
\lyxformat 413
\begin_document
\begin_header
\textclass article
\use_default_options false
\maintain_unincluded_children false
\language german
\language_package default
\inputencoding auto
\fontencoding global
\font_roman lmodern
\font_sans lmss
\font_typewriter lmtt
\font_default_family default
\use_non_tex_fonts false
\font_sc false
\font_osf false
\font_sf_scale 100
\font_tt_scale 100

\graphics default
\default_output_format default
\output_sync 0
\bibtex_command default
\index_command default
\paperfontsize default
\spacing single
\use_hyperref true
\pdf_bookmarks true
\pdf_bookmarksnumbered false
\pdf_bookmarksopen false
\pdf_bookmarksopenlevel 1
\pdf_breaklinks false
\pdf_pdfborder true
\pdf_colorlinks true
\pdf_backref section
\pdf_pdfusetitle true
\papersize a4paper
\use_geometry false
\use_amsmath 1
\use_esint 1
\use_mhchem 1
\use_mathdots 1
\cite_engine basic
\use_bibtopic false
\use_indices false
\paperorientation portrait
\suppress_date false
\use_refstyle 0
\index Stichwortverzeichnis
\shortcut idx
\color #008000
\end_index
\secnumdepth 3
\tocdepth 3
\paragraph_separation indent
\paragraph_indentation default
\quotes_language english
\papercolumns 1
\papersides 1
\paperpagestyle default
\tracking_changes false
\output_changes false
\html_math_output 0
\html_css_as_file 0
\html_be_strict false
\end_header

\begin_body

\begin_layout Subsection

\lang ngerman
Sonstige Sonderzeichen
\begin_inset CommandInset label
LatexCommand label
name "sub:Sonstige-Sonderzeichen"

\end_inset


\begin_inset Index idx
status collapsed

\begin_layout Plain Layout

\lang ngerman
Sonderzeichen ! sonstige
\end_layout

\end_inset


\end_layout

\begin_layout Standard

\lang ngerman
Folgende Zeichen konnten früher einmal in eine Formel nur mit Befehlen eingegebe
n werden:
\end_layout

\begin_layout Standard
\align center

\lang ngerman
\begin_inset Tabular
<lyxtabular version="3" rows="4" columns="2">
<features tabularvalignment="middle">
<column alignment="center" valignment="top" width="0">
<column alignment="center" valignment="top" width="0">
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" 
leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\lang ngerman
Befehl
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" 
leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\lang ngerman
Ergebnis
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" 
usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\lang ngerman

\backslash
^
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" 
rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\lang ngerman
\begin_inset Formula $\mathcircumflex$
\end_inset


\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" 
usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\lang ngerman

\backslash
_
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" 
rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\lang ngerman
\begin_inset Formula $\_$
\end_inset


\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" 
leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\lang ngerman
^
\backslash
circ
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout

\lang ngerman

\backslash
@°
\end_layout

\end_inset


\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" 
leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\lang ngerman
\begin_inset Formula $^{\circ}$
\end_inset


\end_layout

\end_inset
</cell>
</row>
</lyxtabular>

\end_inset


\end_layout

\begin_layout Standard

\lang ngerman
Inzwischen existieren Definitionen in LYXDIR/unicodesymbols, so daß auch
\end_layout

\begin_layout Standard

\lang ngerman
\begin_inset Formula $\text{°}\textasciicircum\_$
\end_inset

 funktionieren.
\end_layout

\begin_layout Standard

\lang ngerman
Die Zeile 
\end_layout

\begin_layout Standard

\series bold
\lang ngerman

\backslash
DeclareInputText{176}{
\backslash
ifmmode^
\backslash
circ
\backslash
else
\backslash
textdegree
\backslash
fi}
\end_layout

\begin_layout Standard

\lang ngerman
im Vorspann macht das Dokument abhänging von einer speziellen Eingabekodierung
 und sollte entfernt werden.
\end_layout

\end_body
\end_document

Reply via email to