TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need to use ģ symbol in my presentation. This symbol has 0123 utf-8 code. But when I am typing it in writeLatex it compiles with error:

Package ucs Error: Unknown Unicode character 291 = U+0123, (ucs) possibly declared in uni-1.def.

I was dealing with such problem on my workstation, and I just hard coded this symbol in uni-1.def file as \'{g}. However in writeLatex website I can't do that, and I tried to use command, \DeclareUnicodeCharacter{0123}{\'{g}} , but there was no change, still compiled with this error. For input encoding I use \usepackage[utf8x]{inputenc}. For Now I have only one solution, instead ģ I just type \'{g} which is really inconvenient. Do you have any suggestions?

share|improve this question
Did you try \newcommand{}{}? – ferahfeza Mar 27 '14 at 7:30
Hmm; are you using the utf8x option to inputenc? Don't. – egreg Mar 27 '14 at 7:53
Doesn’t \'{g} produce g with acute accent? So that would be a wrong character if you want g with cedilla. – Jukka K. Korpela Mar 27 '14 at 8:02
up vote 7 down vote accepted

It's not really an acute accent, but an inverted comma. The combelow package provides it.

So define U+0123 to \cb{g} (and U+0122 to \cb{G}).

If you don't use the utf8x option, but resort to utf8, you can exploit the newunicodechar package, for these definitions:




enter image description here

share|improve this answer
The capital letter produced does not a have a cedilla but a comma. But G with cedilla, Ģ, was not the problem here: it can be written as \unichar{"0122} or inserted as such when utf8 is enabled. – Jukka K. Korpela Mar 27 '14 at 9:12
@JukkaK.Korpela As far as I know, the Latvian tradition wants a comma, rather than a cedilla. – egreg Mar 27 '14 at 9:46
This solution works!However I have to add deffinitions for Āā Īī Ēē etc. in same fasion to avoid errors. – alevins Mar 28 '14 at 12:57

This is quick and literally dirty fix (workaround), using the dirty option:


The result is a bit ugly, but recognizable as g with cedilla.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.