LyX ⇒ How do I insert a character with a different font in a table
How do I insert a character with a different font in a table
I tried wrapping the character with the following command {\fontspec{otherfontname}DIFFERENT CHARACTER} but it gives me error.
What should I do?
NEW: TikZ book now 40% off at Amazon.com for a short time.
And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p
Re: How do I insert a character with a different font in a table
Re: How do I insert a character with a different font in a table
In the Lyx file I have also included another thing that creates problems, the \linebreak command, which I would like to use since otherwise the text is no broken where I like it the most. I thought I just had to put it with no spaces before or behind and it would work but now I am not so sure since I am a complete beginner.
Cheers
- Attachments
-
- different_character_in_table.pdf
- (68.85 KiB) Downloaded 317 times
-
- different character in table.tex
- (12.05 KiB) Downloaded 366 times
Re: How do I insert a character with a different font in a table
BTW, I tried creating a table and using \fontspec method, it worked. Import the file in attachment in LyX (or any LaTeX editor) and try it.
- Attachments
-
- test.tex
- (915 Bytes) Downloaded 310 times
Re: How do I insert a character with a different font in a table
Thank you for the example. I can see it works well but somehow, when I try to do the same in my table, instead of the proper character I get a square with an X inside it. I checked the character also in OO and in gnucharmap and it should be the right one.
The example I posted was just a plain .lyx file but apart from the font change oddity, I included another thing that was giving me some problems, \linebreak that I cannot get Lyx to accept.
I read that putting this command inside a cell with no spaces before would break the line in the cell, but perhaps I got it wrong

How do I insert a character with a different font in a table
Code: Select all
...some text\par\vspace{-2pt} the rest of the text... & ...
EDIT: I've found out what is causing the problem with line break. When entering a command, you must put immediately after it a space or finish it with {} because LaTeX must know where the command ends. E.g.
Code: Select all
\linebreaksome text
Code: Select all
\linebreak{}some text or\linebreak some text
Code: Select all
Test\ldots test
Code: Select all
Test...test
Code: Select all
Test\ldots{} test
Code: Select all
Test\ldots\ test
Code: Select all
Test... test
Re: How do I insert a character with a different font in a table
Thank you very much.
Here is the font, just in case
http://rapidshare.com/files/271910829/simsun.tcc.html
I have so many other questions

One is related to the front matter.
I put after the front page a table of contents and after it some more front matter such as an introduction with some subsections using the starred typologies (no numbers, chapter and sections) but in the table of contents these do not appear. Is there a way to do it?
How do I select backmatter apart from bibliography in memoir?
I would like to add some appendices
I was also wondering if there is a way to have a list of images at the end of the work (fig.1 NAME, fig.2 NAME), after the appendices and after that the images proper. In the main body I refer to those images (as fig. 1, fig.2 etc.), it would be nice to link them as well.
The last thing is, how do I enter bibliographies. I like the Harvard style (Author date. Title, etc (City:Publisher))
How do I insert a character with a different font in a table

1. If you use frontmatter, you don't have to use starred version of sectioning command because they aren't numbered when in frontmatter. So, use normal \chapter, \section etc. Your document should have structure like in this example:
Code: Select all
\frontmatter\tableofcontent\chapter{Introduction}...some text...\mainmatter\chapter{Some chapter}...some text...\backmatter...Appendicies, Bibliography etc.
3. About all this you may learn some basics in LyX User's Guide and other literature. I'll repeat what I said before, you should consider obtaining LaTeX Companion, 2nd edition which is a must-have for serious LaTeXing. For basics, you may try with Not So Short Introduction to LaTeX or obtain "Guide to LaTeX", 4th edition. It's up to you. LaTeX is a very powerful system, arguably the most powerful typesetting system in the world, it has rules you'll have to learn and obey. That means you'll have to do a lot of reading if you want to use all its advantages. But consider it investment...
Re: How do I insert a character with a different font in a table

I am originally coming from the WYSIWYG world and now I am just at the basic Lyx level so all the direct Latex commands are still quite difficult and confusing (especially when there are many connected).
As soon as I can find the time I will start to seriously study Latex as well since I agree it is a real investment.
I have downloaded the free guide and as soon as possible I will order the Guide to Latex.
Cheers
How do I insert a character with a different font in a table

As for the font, I really can't say anything, couldn't get it working. You may try on mailing list, maybe someone who works with Japanese or other East Asian languages can help. Generally, that crossed rectangle means that character isn't available, but you say you're sure it's correct. May be font or language issue.
BTW, here is a real quick guide with examples to test, may be useful. Still, don't hesitate to ask
