Texmaker and TeXstudioCopy&Paste from Word Processor to LaTeX

Information and discussion about Texmaker, an integrated LaTeX environment for several platforms, and the related TeXstudio
Post Reply
Hakane
Posts: 3
Joined: Mon Jun 04, 2012 11:44 am

Copy&Paste from Word Processor to LaTeX

Post by Hakane »

Hey folks,

Im trying to copy/paste some simple text from a word document into a latex document but errors occurs. Any idea why it happens?

It's a simple memoir document with few graphs and equations.

/Hakan

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
Stefan Kottwitz
Site Admin
Posts: 10322
Joined: Mon Mar 10, 2008 9:44 pm

Copy&Paste from Word Processor to LaTeX

Post by Stefan Kottwitz »

Hi Hakan,

welcome to the board!
Hakane wrote:Im trying to copy/paste some simple text from a word document into a latex document but errors occurs. Any idea why it happens?
perhaps tell us the error messages which you got. These might lead to an idea.

Stefan
LaTeX.org admin
Hakane
Posts: 3
Joined: Mon Jun 04, 2012 11:44 am

Copy&Paste from Word Processor to LaTeX

Post by Hakane »

Sorry for not explaining the problem properly. The error is:

Code: Select all

! LaTeX Error: Command \textyen unavailable in encoding T1.
and it refers to the following line:

Code: Select all

\usepackage[T1]{fontenc} % fonte (output)
Hakane
Posts: 3
Joined: Mon Jun 04, 2012 11:44 am

Copy&Paste from Word Processor to LaTeX

Post by Hakane »

I think I've found the problem. It seems like it wont compile the file when it contains letters like "æ", "ø" or "å". The solution to this should be, according to another help forum:

Code: Select all

\usepackage[ansinew]{inputenc}
but it doesn't help :/
User avatar
Stefan Kottwitz
Site Admin
Posts: 10322
Joined: Mon Mar 10, 2008 9:44 pm

Copy&Paste from Word Processor to LaTeX

Post by Stefan Kottwitz »

Yes, you need inputenc. But specify the encoding which you actually use. Today, utf8 is very common, it's the default for TeXworks and for Linux editors. So try

Code: Select all

\usepackage[utf8]{inputenc}
or check the encoding of your editor in its configuration.

Stefan
LaTeX.org admin
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Copy&Paste from Word Processor to LaTeX

Post by localghost »

As alternative you can try a semiautomatic determination of the input encoding by selected glyphs offered by the selinput package from the oberdiek bundle. Replace the line that Stefan suggested with these.

Code: Select all

\usepackage{selinput}   % Semiautomatic choice of input encoding
\SelectInputMappings{   % by selected glyphs
  ae={æ},               % see: http://partners.adobe.com/public/developer/en/opentype/glyphlist.txt
  oslash={ø},
  Euro={€}
}
For such special characters (probably Scandinavian) this can be preferable.


Thorsten
Post Reply