LyXLanguage issues during preview in DVI and PDF

Information and discussion about LyX, a WYSIWYM editor, available for Linux, Windows and Mac OS X systems.
Post Reply
magali
Posts: 14
Joined: Sat Dec 04, 2010 12:41 am

Language issues during preview in DVI and PDF

Post by magali »

Hello,

I am quite new to LyX and I apologize in advance if this is a very basic question.

I have been using LyX 1.6.8 to write in Brazilian Portuguese. I changed the language to Portuguese on "settings".

I have divided my text into Parts, Sections, etc. And I also have added tables and figures.

When I'm looking at the LyX document, everything looks fine and all these names ("Part I", "Table 3", "Figure 2", etc) appear in Portuguese. But when I view in DVI or PDF, some of the "Parts" appear in Portuguese, some in English. And all tables' and figures' headings appear in English.

I think it must be a bug, since it happens to some names, but not all, and the document is set to be in Portuguese.

Any clues?

Thank you.
Last edited by magali on Thu Dec 16, 2010 11:24 pm, edited 1 time in total.

Recommended reading 2024:

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

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

meho_r
Posts: 823
Joined: Tue Aug 07, 2007 5:28 pm

Re: Language issues during preview in DVI and PDF

Post by meho_r »

Please, create an example .lyx file, put it into a ZIP archive and attach it to your next post.
magali
Posts: 14
Joined: Sat Dec 04, 2010 12:41 am

Re: Language issues during preview in DVI and PDF

Post by magali »

Ok, I made an example where the thing I described happens.
"Table" and "Figure" appear in the DVI preview in English, when it should be in Portuguese.
Thanx.
Attachments
example.lyx.zip
(3.27 KiB) Downloaded 171 times
meho_r
Posts: 823
Joined: Tue Aug 07, 2007 5:28 pm

Language issues during preview in DVI and PDF

Post by meho_r »

Select all text (or at least those parts which are written in portugese), then use "ab" button (or Edit > Text Style > Customized > Language) to set the language of selected text to portugese, since it is currently set to english in the attached example. Pay attention to the text underlined by a blue line: this is a warning to the user that underlined text is set in a foreign language, not the default one.
magali
Posts: 14
Joined: Sat Dec 04, 2010 12:41 am

Re: Language issues during preview in DVI and PDF

Post by magali »

Thank you very much. That worked perfectly.

As long as we're here, I have another question regarding tables.

In the same example I attached previously, when I view the text the table captions and the actual tables are not aligned. The caption in centralized, but the table is not. Do you know how to fix this?
meho_r
Posts: 823
Joined: Tue Aug 07, 2007 5:28 pm

Re: Language issues during preview in DVI and PDF

Post by meho_r »

Place the cursor just in front or behind a table, then open "Paragraph settings" dialog (the button on the right of "ab" button, or Edit > Paragraph Settings). Set "Alignment" to "Center", and uncheck "Indent Paragraph" checkbox.

Note: You'll probably want to move the note which is located below the table in your example too. Consider creating another row and putting the note into it. You may select all cells of the newly created row and use "Set multi-column" option on "Table toolbar" (take a look at the bottom of the screen, the last icon on the right, the one with a green-colored cell).
magali
Posts: 14
Joined: Sat Dec 04, 2010 12:41 am

Re: Language issues during preview in DVI and PDF

Post by magali »

Thanks again. That worked perfectly. And thanx also for the "note" hint. The table looks much better now.

I tried to find info on changing the color of the caption of a table/figure (such as "Table 1", "Figure 2", etc), but had no success. Also I would like to change the colors of top and bottom lines on a table. Is there a straightforward way to do this?
meho_r
Posts: 823
Joined: Tue Aug 07, 2007 5:28 pm

Language issues during preview in DVI and PDF

Post by meho_r »

If the color you want to use is one of "standard" set which LyX supports out of box, you may simply select the text in a table and change the color using "ab" button. However, for figure/table captions it's definitely a better idea to use facilities provided by caption package. E.g., on page 26 of caption documentation you'll find the following example:

Code: Select all

\usepackage{caption}
\usepackage{color}
\DeclareCaptionFont{red}{\color{red}}
\DeclareCaptionFont{green}{\color{green}}
\DeclareCaptionFont{blue}{\color{blue}}
\captionsetup{labelfont={blue,bf},textfont=green}
Just adapt this example to your needs and put the code into the preamble.
magali
Posts: 14
Joined: Sat Dec 04, 2010 12:41 am

Re: Language issues during preview in DVI and PDF

Post by magali »

I successfully changed the color and format of the table/figure labels.

Also, in case someone reads this discussion looking for the same answers, I found, in the documentation of the package you recommended above, info on another package (floatrow) which allows you to align pictures to the notes that come underneath them.

Thanx again.
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Language issues during preview in DVI and PDF

Post by localghost »

Now that the problem is solved, please be so kind and mark the topic accordingly as written in Section 3 of the Board Rules (to be read before posting). Please keep that in mind for the future so that further reminders will not be necessary.


Thorsten
Post Reply