LyXHow do I insert a character with a different font in a table

Information and discussion about LyX, a WYSIWYM editor, available for Linux, Windows and Mac OS X systems.
clemens
Posts: 77
Joined: Fri Jun 26, 2009 11:57 am

Re: How do I insert a character with a different font in a table

Post by clemens »

You are right. I forgot to tell you about the linebreak. Now it works perfectly and thanks to you I have understood some more about Latex :) Thanks for the link as well, it seems quite useful.
As for the font, I will do as you suggest otherwise I'll try making a small image to put in the text. Do you think it is feasible?
Oh, one funny thing happened, which doesn't really bother me but is curious: sometimes longer words are not broken down or compressed and they stick out of the main text block on the right side.
Cheers,

Clemente

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

How do I insert a character with a different font in a table

Post by meho_r »

Well, the picture is really last resort. Can you try with some other font maybe?

When LaTeX didn't find the optimal way to create hyphenation point, it may stick the problematic word in margin leaving to user to solve it. The solution is:

1. to specify hyphenation points with \-, e.g.:

Code: Select all

someveryveryverylongword
so\-me\-ve\-ry\-ve\-ry\-ve\-ry\-long\-word
You don't have to use so many hyphenation points, put as many as you see fit, although it's probably good idea to specify for all places in word and leave LaTeX decide which is the best place for break. In LyX, there is "Hyphenation Point" in Insert > Formatting menu.

2. or to use \sloppy command to make LaTeX less fussy about breaking lines (default is, guess what! \fussy). If you specify \sloppy inside an environment or inside curly brackets {}, it will apply only to that environment or part of document inside curly brackets and will not affect anything outside them. But, if you specify it somewhere in your document out of environments/brackets, then it will apply to all text from that place on (and this is not such a good idea).

If you're using memoir class, there is one more command, \midsloppy, which is less fussy than \fussy, and less sloppy than \sloppy :D

3. or use \hyphenation{} to specify words that need special hyphenation pattern. E.g.:

Code: Select all

\hyphenation{la-tex ge-ne-ral ob-vi-o-us}
Put the code somewhere before \begin{document}, put hyphens on places where hyphenation should occur and separate words with a space.

The first (and third) solution is better, though it can be annoying if a large number of words need manual hyphenating.

We went really off-topic :)
clemens
Posts: 77
Joined: Fri Jun 26, 2009 11:57 am

Re: How do I insert a character with a different font in a table

Post by clemens »

Wow, hyphenation can be quite handy! Thank you very much.
I will also try with another font for the odd character.

One more thing: I have a series of short paragraphs that I would like to have with a "reversed" indentation, in the sense that the first line fills the entire space while the following lines are all indented. I tried the hanging paragraph command, but somehow it gave me error.
And another: is there a way to import into Lyx/Latex OO Writer tables written with Japanese characters?
I tried doing an export from Writer to Latex and then a Latex import into Lyx, but the Asian characters are not recognised and I get only their codes.
Cheers
Post Reply