LyXLanguage problem for float object

Information and discussion about LyX, a WYSIWYM editor, available for Linux, Windows and Mac OS X systems.
Post Reply
faca
Posts: 5
Joined: Mon Dec 27, 2021 9:44 am

Language problem for float object

Post by faca »

Hello, I wrote a document (book style) by lyx.
I set
Document->Setting->Language->Language in English, and for example I get "Chapter, Section", etc in English, but in the caption of float objects (both figures and tables), I get the italian word (i.e. Figura and Tabella).
I also wrote in the preable

Code: Select all

\usepackage[english]{babel}

Moreover, looking the source code, I notice

Code: Select all

\begin{center}
\begin{table}[tbph]
\begin{centering}
\begin{tabular}{cccc}
\hline 
\selectlanguage{english}%
Target material\selectlanguage{italian}%
 & Thickness $\unit{\left(mm\right)}$ & \selectlanguage{english}%
\ac{MPV}\foreignlanguage{italian}{ $\unit{\left(MeV\right)}$ first
target}\selectlanguage{italian}%
 & \selectlanguage{english}%
\ac{MPV} \foreignlanguage{italian}{$\unit{\left(MeV\right)}$ second
target}\selectlanguage{italian}%
\tabularnewline
you see...there are those switches

Code: Select all

\selectlanguage
,

Code: Select all

\foreignlanguage
...maybe this is the prolem, but I don't know how to fix it
Does anyone know how to fix it, please?

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
Ijon Tichy
Posts: 640
Joined: Mon Dec 24, 2018 10:12 am

Language problem for float object

Post by Ijon Tichy »

All these language changes in the tabular are nonsense. You should avoid them.
Sorry, but I can no longer participate here as the administrator is trampling on my wishes on one of his other platforms. :cry:
faca
Posts: 5
Joined: Mon Dec 27, 2021 9:44 am

Language problem for float object

Post by faca »

I finally solved my self!

1. Select the document
2. right button
3. Language
4. Set English
Post Reply