LaTeX forum ⇒ Fonts & Character SetsError when importing from latex to Lyx Topic is solved

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

Error when importing from latex to Lyx

Postby marcos » Mon Feb 04, 2013 11:03 am

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

Tags:

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

Postby cgnieder » Mon Feb 04, 2013 12:06 pm

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
Clemens
------------------------------
chemmacros · chemformula · leadsheets · xsim

marcos
Posts: 14
Joined: Mon Feb 04, 2013 10:45 am

Postby marcos » Mon Feb 04, 2013 1:43 pm

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:
  1. \newblock {Polymerâ€
  2. “filler interactions in kaolin/nylon 6,6 composites
  3. You need to provide a definition with \DeclareInputText
  4. or \DeclareInputMath before using this key.


These error seems to be related to the bibiography.

Here are my Preambule of latex:

  1. \usepackage[french]{babel}
  2. \usepackage{a4}
  3. \usepackage[cyr]{aeguill}
  4. \usepackage{epstopdf}
  5. \usepackage{amsfonts}
  6. \usepackage{url}
  7. \renewcommand{\baselinestretch}{1.5}
  8. \usepackage[center,small]{caption}
  9. \bibliographystyle{unsrt}
  10.  
  11. \title{Modification du kaolin submicronique en vue de leur incorporation dans les matrices polymères}
  12. \author{Marcos Batistella}


thank you again.
Last edited by cgnieder on Mon Feb 04, 2013 1:47 pm, edited 1 time in total.
Reason: added code markup

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

Postby cgnieder » Mon Feb 04, 2013 1:52 pm

I would think the entry that produced
  1. 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
Clemens
------------------------------
chemmacros · chemformula · leadsheets · xsim

marcos
Posts: 14
Joined: Mon Feb 04, 2013 10:45 am

Postby marcos » Mon Feb 04, 2013 8:51 pm

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: 1988
Joined: Sat Apr 16, 2011 7:27 pm

Postby cgnieder » Mon Feb 04, 2013 9:15 pm

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?
Clemens
------------------------------
chemmacros · chemformula · leadsheets · xsim

marcos
Posts: 14
Joined: Mon Feb 04, 2013 10:45 am

Postby marcos » Mon Feb 04, 2013 9:30 pm

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: 1988
Joined: Sat Apr 16, 2011 7:27 pm

Postby cgnieder » Mon Feb 04, 2013 9:36 pm

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
Clemens
------------------------------
chemmacros · chemformula · leadsheets · xsim

marcos
Posts: 14
Joined: Mon Feb 04, 2013 10:45 am

Postby marcos » Mon Feb 04, 2013 11:38 pm

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: 1988
Joined: Sat Apr 16, 2011 7:27 pm

Postby cgnieder » Mon Feb 04, 2013 11:40 pm

You're welcome :)
Clemens
------------------------------
chemmacros · chemformula · leadsheets · xsim


Return to “Fonts & Character Sets”

Who is online

Users browsing this forum: No registered users and 3 guests