LaTeX forum ⇒ LyXLanguage problem for float object

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

Language problem for float object

Postby faca » Mon Dec 27, 2021 9:54 am

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
\usepackage[english]{babel}



Moreover, looking the source code, I notice

\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
\selectlanguage
,
\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 2021:

LaTeXguide.org • LaTeX-Cookbook.net
LaTeX Beginner's Guide LaTeX Cookbook
User avatar
Ijon Tichy
Posts: 614
Joined: Mon Dec 24, 2018 10:12 am

Language problem for float object

Postby Ijon Tichy » Mon Dec 27, 2021 4:40 pm

All these language changes in the tabular are nonsense. You should avoid them.

faca
Posts: 5
Joined: Mon Dec 27, 2021 9:44 am

Language problem for float object

Postby faca » Mon Dec 27, 2021 5:39 pm

I finally solved my self!

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


Return to “LyX”

Who is online

Users browsing this forum: No registered users and 4 guests