Fonts & Character SetsError when importing from latex to Lyx

Information and discussion about fonts and character sets (e.g. how to use language specific characters)
Post Reply
marcos
Posts: 14
Joined: Mon Feb 04, 2013 10:45 am

Error when importing from latex to Lyx

Post by marcos »

Hello.

I'm having some trouble with importing my thesis from Latex (I used Texmaker) to Lyx. I'm changing because Lyx offers the possibility of "follow the changes" in the main document.

The problem is when I try to convert to pdf. I get a lot of errors:
"String contains an invalid utf-8 sequence"
and
"Latex error: command \nobreakspace unavaliable in encoding T1".

I have each chapter in a separete file, if I try to convert each separete file into pdf it works great. But when a try to convert my main document (which contains the index) I got these errors.

I googled about but I not found any fix for that.

Any ideas will be welcome.

PS. Sorry for my poor english

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

User avatar
cgnieder
Site Moderator
Posts: 2000
Joined: Sat Apr 16, 2011 7:27 pm

Error when importing from latex to Lyx

Post by cgnieder »

Hi marcos,

Welcome to the LaTeX community!

Have you looked at the source what the first error is and by which code it is caused?

Regards
site moderator & package author
marcos
Posts: 14
Joined: Mon Feb 04, 2013 10:45 am

Error when importing from latex to Lyx

Post by marcos »

Hello,

Not sure what happend, but I think that the problem is with the bibliography and one of my chapters. I tried to convert whithout them and it works fine.
I'll try to see what is the problem with my bibliography (which is automatically generated by mendeley). It seems that there are some characters that are not recognized by Lyx.

Here are the error:
package inputenc error: Keyboard character used is undefined
Looking to the description:

Code: Select all

 \newblock {Polymerâ€
                          “filler interactions in kaolin/nylon 6,6 composites
You need to provide a definition with \DeclareInputText 
or \DeclareInputMath before using this key.
These error seems to be related to the bibiography.

Here are my Preambule of latex:

Code: Select all

\usepackage[french]{babel}
\usepackage{a4}
\usepackage[cyr]{aeguill}
\usepackage{epstopdf}
\usepackage{amsfonts}
\usepackage{url}
\renewcommand{\baselinestretch}{1.5}
\usepackage[center,small]{caption}
\bibliographystyle{unsrt}

\title{Modification du kaolin submicronique en vue de leur incorporation dans les matrices polymères}
\author{Marcos Batistella}
thank you again.
Last edited by cgnieder on Mon Feb 04, 2013 1:47 pm, edited 1 time in total.
User avatar
cgnieder
Site Moderator
Posts: 2000
Joined: Sat Apr 16, 2011 7:27 pm

Error when importing from latex to Lyx

Post by cgnieder »

I would think the entry that produced

Code: Select all

Polymerâ€
is responsible. You probably have some none-ASCII character in the bib file there. Unfortunately bibtex is not able to read other than 7bit encoded characters. A solution might be to switch to biblatex but it's probably easier to modify the offending entry.

Regards
site moderator & package author
marcos
Posts: 14
Joined: Mon Feb 04, 2013 10:45 am

Re: Error when importing from latex to Lyx

Post by marcos »

Thank you for you answer.

That was the first thing that I thought about, but even changing the entry in bibtex does not change the error.
User avatar
cgnieder
Site Moderator
Posts: 2000
Joined: Sat Apr 16, 2011 7:27 pm

Error when importing from latex to Lyx

Post by cgnieder »

Can you make a minimal copy (a few words and the one erroneous bib entry should suffice) of the LyX file that reproduces the error and upload it here?
site moderator & package author
marcos
Posts: 14
Joined: Mon Feb 04, 2013 10:45 am

Error when importing from latex to Lyx

Post by marcos »

Not sure what is happening. I tried a new document with only the problematic entries and it works fine, even the pdf conversion.
But in my main file, the problem is that when I try to convert to pdf with the bibliography an it show this message:
Error while previewing format: pdf2Systemcall.cpp (273): Systemcall: 'pdflatex "Manuscrito_these.tex"' finished with exit code 1
I googled about this error and it seems to be related with a bug in the latex - Lyx conversion. Any idea will be welcome.
User avatar
cgnieder
Site Moderator
Posts: 2000
Joined: Sat Apr 16, 2011 7:27 pm

Error when importing from latex to Lyx

Post by cgnieder »

marcos wrote:Not sure what is happening. I tried a new document with only the problematic entries and it works fine, even the pdf conversion.
You're on the best way of creating a Infominimal working example. The standard way if you don't know where to start looking for an error is something like this: make a copy of the original file (call it »test« or whatever). Successively start removing content until the error disappears. You then know that the offending part is the last one you deleted. Undo the changes and start deleting the rest (again with testing in between). If it suddenly works again you found another crucial part. In the end you will have a minimal example that includes all necessary parts that create the error.

Regards
site moderator & package author
marcos
Posts: 14
Joined: Mon Feb 04, 2013 10:45 am

Re: Error when importing from latex to Lyx

Post by marcos »

Thank you very much for your help. I found the problems (some characters in the bibtex file) and now it works fine.

Thank you again!!
User avatar
cgnieder
Site Moderator
Posts: 2000
Joined: Sat Apr 16, 2011 7:27 pm

Re: Error when importing from latex to Lyx

Post by cgnieder »

You're welcome :)
site moderator & package author
Post Reply