Hi,
please find attached an enhanced version of my "tex2lyx_import_test.tex"
file, which demonstrates the "tex2lyx import problems" (as compared to
the version of Dec 14th, more characters are added together with more
equivalent ways to write them in LaTeX).
Hope it helps,
Best regards,
Jacek.
\documentclass[twocolumn]{article}

\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}
\usepackage{eurosym}
\usepackage[czech]{babel}

\begin{document}

\title{tex2lyx import test}
\author{Jacek M. Holeczek}

\maketitle

\section*{Introduction}

This small tex file contains European characters that are expected to be
recognized by tex2lyx. Note that usually there are at least several
equivalent ways to write them in LaTeX (I've seen all of them used in
different LaTeX files).
There are three general problems (compare the dvi/ps output from
native LaTeX for this file, with the one that you get from LyX after
tex2lyx):
(a) tex2lyx does not recognize it as a valid character and marks it as
an ERT, sometimes even two or three ERTs;
(b) tex2lyx recognizes it as a valid character, but it preserves the
follwing "space character", which should be deleted;
(c) tex2lyx recognizes it as a valid character, but the following
"\{\}" pair is marked as an ERT.
(Note that, there are cases where you can see problems (b) + (c)
together or (a) + "preserves space characters" + "following \{\} pairs
marked as ERTs" together.)
(Note also that tex2lyx will say "Ignoring options 'czech' of package
babel.", so you need to add "usepackage[czech]\{babel\}" or
"usepackage[slovak]\{babel\}" to the
Document->LaTeX\_Preamble... manually in LyX.
If you don't do it you will get the error saying "Package babel Error:
You haven't defined the language czech yet." followed by some
"Undefined control sequence.".
It also says "Ignoring options 'T1' of package fontenc.", but you
don't need to worry as LyX automatically uses the required
"usepackage[T1]\{fontenc\}" and "usepackage[latin1]\{inputenc\}".)

\section*{Some selected characters}

Note: multiple equivalent ways to write them are shown.

\# Polish characters

cedilla a : "\k{a}", "\k {a}", "\k a", "\k a{}"

cedilla A : "\k{A}", "\k {A}", "\k A", "\k A{}"

acute c : "\'{c}", "\' {c}", "\'c", "\'c{}", "\' c", "\' c{}"

acute C : "\'{C}", "\' {C}", "\'C", "\'C{}", "\' C", "\' C{}"

cedilla e : "\k{e}", "\k {e}", "\k e", "\k e{}"

cedilla E : "\k{E}", "\k {E}", "\k E", "\k E{}"

hugarian\_umlaut l : "\l{}", "\l {}", "\l "

hugarian\_umlaut L : "\L{}", "\L {}", "\L "

acute n : "\'{n}", "\' {n}", "\'n", "\'n{}", "\' n", "\' n{}"

acute N : "\'{N}", "\' {N}", "\'N", "\'N{}", "\' N", "\' N{}"

acute o : "\'{o}", "\' {o}", "\'o", "\'o{}", "\' o", "\' o{}"

acute O : "\'{O}", "\' {O}", "\'O", "\'O{}", "\' O", "\' O{}"

acute s : "\'{s}", "\' {s}", "\'s", "\'s{}", "\' s", "\' s{}"

acute S : "\'{S}", "\' {S}", "\'S", "\'S{}", "\' S", "\' S{}"

dot z : "\.{z}", "\. {z}", "\.z", "\.z{}", "\. z", "\. z{}"

dot Z : "\.{Z}", "\. {Z}", "\.Z", "\.Z{}", "\. Z", "\. Z{}"

acute z : "\'{z}", "\' {z}", "\'z", "\'z{}", "\' z", "\' z{}"

acute Z : "\'{Z}", "\' {Z}", "\'Z", "\'Z{}", "\' Z", "\' Z{}"

\# German characters

umlaut a : "\"a{}", "\"a", "\" a", "\" a{}", "\"{a}", "\" {a}"

umlaut A : "\"A{}", "\"A", "\" A", "\" A{}", "\"{A}", "\" {A}"

umlaut o : "\"o{}", "\"o", "\" o", "\" o{}", "\"{o}", "\" {o}"

umlaut O : "\"O{}", "\"O", "\" O", "\" O{}", "\"{O}", "\" {O}"

umlaut u : "\"u{}", "\"u", "\" u", "\" u{}", "\"{u}", "\" {u}"

umlaut U : "\"U{}", "\"U", "\" U", "\" U{}", "\"{U}", "\" {U}"

umlaut s : "\ss{}", "\ss {}", "\ss "

umlaut S : "\SS{}", "\SS {}", "\SS "

\# Czech and Slovak characters.

Note: the four characters below (t, l, L, d) use the special caron
"q". In order to use these characters, you have to add
"usepackage[czech]\{babel\}" or "usepackage[slovak]\{babel\}"
to the LaTeX preamble.
However, this is not really needed, as the LaTeX, by default,
recognizes there characters with the standard caron "v" and treats
them properly, automatically applying the special caron form.
(see the next section.)

caron t : "\q{t}", "\q {t}", "\q t", "\q t{}"

caron l : "\q{l}", "\q {l}", "\q l", "\q l{}"

caron L : "\q{L}", "\q {L}", "\q L", "\q L{}"

caron d : "\q{d}", "\q {d}", "\q d", "\q d{}"

\# Croatian and Serbian characters.

underdot j : "\dj{}", "\dj {}", "\dj "

underdot J : "\DJ{}", "\DJ {}", "\DJ "

\# Sami/Saami characters.

underdot n : "\ng{}", "\ng {}", "\ng "

underdot N : "\NG{}", "\NG {}", "\NG "

\# Turkish characters.

underdot i : "\i{}", "\i {}", "\i "

\# special ISO 8859-1 characters

umlaut \$ : "\pounds{}", "\pounds {}", "\pounds "

(depreciated) umlaut \# : "\S{}", "\S {}", "\S "

underdot \# : "\S{}", "\S {}", "\S "

(depreciated) umlaut \~{} : "\textdegree{}" , "\textdegree {}" , "\textdegree "

underdot \~{} : "\textdegree{}", "\textdegree {}", "\textdegree "

underdot 0 : "\textdegree{}", "\textdegree {}", "\textdegree "

underdot a : "\ae{}", "\ae {}", "\ae "

underdot A : "\AE{}", "\AE {}", "\AE "

underdot d : "\dh{}", "\dh {}", "\dh "

underdot D : "\DH{}", "\DH {}", "\DH "

underdot o : "\o{}", "\o {}", "\o "

underdot O : "\O{}", "\O {}", "\O "

underdot t : "\th{}", "\th {}", "\th "

underdot T : "\TH{}", "\TH {}", "\TH "

underdot x : "$\times{}$", "$\times {}$", "$\times $"

underdot X : "$\div{}$", "$\div {}$", "$\div $"

underdot ! : "\textexclamdown{}", "\textexclamdown {}", "\textexclamdown "

umlaut ! : "\textquestiondown{}", "\textquestiondown {}", "\textquestiondown "

\# special ISO 8859-15 characters

Note: in order to use the Euro sign, you have to "usepackage\{eurosym\}"
or "usepackage\{eurofont\}" in the LaTeX preamble.

underdot \$ : "\euro{}", "\euro {}", "\euro "

underdot e : "\oe{}", "\oe {}", "\oe "

underdot E : "\OE{}", "\OE {}", "\OE "

\section*{All other characters}

Note: always only a single way to write them is shown below. Multiple
equivalent versions are possible, see the previous section for examples.

acute : "\'{A}", "\'{E}", "\'{I}", "\'{U}", "\'{Y}", "\'{a}", "\'{e}",
"\'{\i}", "\'{u}", "\'{y}", "\'{R}", "\'{L}", "\'{r}", "\'{l}",
"\'{J}", "\'{\j}", "\'{H}", "\'{h}", "\'{V}", "\'{v}"

grave : "\`{a}", "\`{e}", "\`{\i}", "\`{o}", "\`{u}", "\`{A}",
"\`{E}", "\`{I}", "\`{O}", "\`{U}", "\`{C}", "\`{c}", "\`{J}",
"\`{\j}", "\`{L}", "\`{l}", "\`{N}", "\`{n}", "\`{R}", "\`{r}",
"\`{S}", "\`{s}", "\`{Y}", "\`{y}", "\`{Z}", "\`{z}"

macron :  "\={E}",  "\={e}",  "\={A}",  "\={I}",  "\={O}",  "\={U}",
"\={a}", "\={\i}",  "\={o}",  "\={u}"

tilde :  "\~{A}",  "\~{N}",  "\~{O}",  "\~{a}",  "\~{n}",  "\~{o}",
"\~{I}",  "\~{\i}",  "\~{U}",  "\~{u}"

cedilla : "\c{C}", "\c{c}", "\c{S}", "\c{s}", "\c{T}", "\c{t}",
"\c{R}", "\c{L}", "\c{G}", "\c{r}", "\c{l}", "\c{g}", "\c{N}",
"\c{K}", "\c{n}", "\c{k}"

circumflex : "\^{A}", "\^{E}", "\^{I}", "\^{O}", "\^{U}", "\^{a}",
"\^{e}", "\^{\i}", "\^{o}", "\^{u}", "\^{H}", "\^{J}", "\^{h}",
"\^{\j}", "\^{C}", "\^{G}", "\^{S}", "\^{c}", "\^{g}", "\^{s}",
"\^{N}", "\^{n}", "\^{R}", "\^{r}", "\^{Y}", "\^{y}", "\^{Z}", "\^{z}"

circle : "\r{A}", "\r{a}", "\r{U}", "\r{u}" (Note also "\AA ",
"\AA{}", "\AA {}", "\aa ", "\aa{}", "\aa {}")

breve : "\u{A}", "\u{a}", "\u{G}", "\u{g}", "\u{U}", "\u{u}"

Note also that LyX improperly displays L, l, t, d with the standard
caron "v" in its own window as compared to LaTeX.

caron : "\v{L}", "\v{S}", "\v{T}", "\v{Z}", "\v{l}", "\v{s}", "\v{t}",
"\v{z}", "\v{C}", "\v{E}", "\v{D}", "\v{N}", "\v{R}", "\v{c}",
"\v{e}", "\v{d}",  "\v{n}",  "\v{r}"

hugarian\_umlaut : "\H{O}", "\H{U}", "\H{o}", "\H{u}"

umlaut : "\"{E}", "\"{I}", "\"{e}", "\"{\i}", "\"{y}", "\"{J}",
"\"{\j}", "\"{Y}"

dot : "\.{I}", "\.{C}", "\.{G}", "\.{\i}", "\.{c}", "\.{g}", "\.{E}",
"\.{e}"

\end{document}

Reply via email to