LyXUnicode characters

Information and discussion about LyX, a WYSIWYM editor, available for Linux, Windows and Mac OS X systems.
Post Reply
parad
Posts: 5
Joined: Sun Aug 14, 2011 7:07 pm

Unicode characters

Post by parad »

I want to insert some unicode characters like black square or ━ but after trying it for several hours i can't get anything more than errors.

I've tried XeTeX but I prefer keep my font (Computer Modern I guess, the LyX predefined).

Is there a workaround to insert only an unicode character, and keep the rest of the text like it is?

Thanks

Recommended reading 2024:

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

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

Stefan Kottwitz
Site Admin
Posts: 10324
Joined: Mon Mar 10, 2008 9:44 pm

Unicode characters

Post by Stefan Kottwitz »

Hi Parad,

welcome to the board!
For inserting UTF-8 characters, you could use the inputenc package. Load it by inserting this line into your LyX document preamble:

Code: Select all

\usepackage[utf8]{inputenc}
Stefan
LaTeX.org admin
parad
Posts: 5
Joined: Sun Aug 14, 2011 7:07 pm

Unicode characters

Post by parad »

Stefan_K wrote:Hi Parad,

welcome to the board!
For inserting UTF-8 characters, you could use the inputenc package. Load it by inserting this line into your LyX document preamble:

Code: Select all

\usepackage[utf8]{inputenc}
Stefan
Hi Stefan!

Thanks for your reply.

I've tried inputenc, but my problem is abouta LaTeX I guess, because I need in ERT somethig like:

Code: Select all

\textbf{\textcolor{bordo}{━━━}} 
("bordo" is bordeaux name color in spanish)

I hope someone could give me a tip ;)
parad
Posts: 5
Joined: Sun Aug 14, 2011 7:07 pm

Unicode characters

Post by parad »

Stefan_K wrote:Hi Parad,

welcome to the board!
For inserting UTF-8 characters, you could use the inputenc package. Load it by inserting this line into your LyX document preamble:

Code: Select all

\usepackage[utf8]{inputenc}
Stefan
I tried utf8 inputenc on a MWE and the character 0x2501 gives me the next error:

Code: Select all

Can not find a LaTeX command for character '━' (Code 0x2501)
(translation from spanish error)
parad
Posts: 5
Joined: Sun Aug 14, 2011 7:07 pm

Re: Unicode characters

Post by parad »

Anyone can help me?

I only want to insert some special characters in the middle of the text.
User avatar
frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am

Re: Unicode characters

Post by frabjous »

The Computer Modern fonts don't cover the complete Unicode range, and I don't think that glyph is covered at all by the inputenc package.

From what I can tell, it's just a straight line, though, right? Can't you approximate it with a \rule command, something like \rule[0.5ex]{1em}{2pt}?
parad
Posts: 5
Joined: Sun Aug 14, 2011 7:07 pm

Unicode characters

Post by parad »

frabjous wrote:The Computer Modern fonts don't cover the complete Unicode range, and I don't think that glyph is covered at all by the inputenc package.

From what I can tell, it's just a straight line, though, right? Can't you approximate it with a \rule command, something like \rule[0.5ex]{1em}{2pt}?
Wow, that's awesome :shock: . Thank you so much for this simple solution!! 8-)

It works great with textcolor command too. ;)
Post Reply