Text FormattingHow input unicode character by it number code?

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
rodrigozanatta
Posts: 3
Joined: Fri Jan 28, 2011 12:11 am

How input unicode character by it number code?

Post by rodrigozanatta »

Hi. I am using a .cls extension. This have a function to made the title of the paper. The problem is that this don't accept the "ç" character.

I already try the \c{c}, but didn't work. And I can use same accents,. This is the command :

Code: Select all

\title{Utilizando SSIM para medir a deteriorizac\~ao em interpoc\~oes LAEP}
This correct show the ã and õ. But don't the ç. I can normally use accent in all the text, only in this comand didn't work.

How can I put the direct unicode code (or ASCII code) to show this character. The code number is U+00E7.

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

frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am

How input unicode character by it number code?

Post by frabjous »

The code:

Code: Select all

\documentclass{article}
\title{Utilizando SSIM para medir a deterioriza\c{c}\~ao em interpo\c{c}\~oes LAEP}
\begin{document}
\maketitle
\end{document}
Works just fine for me. If it doesn't for you, post a minimal working example showing the misbehavior.

If your editor is Unicode-compliant, you can also do this (be sure to load the inputenc package):

Code: Select all

\documentclass{article}
\usepackage[utf8]{inputenc}
\title{Utilizando SSIM para medir a deteriorização em interpoções LAEP}
\begin{document}
\maketitle
\end{document}
Regular pdftex doesn't really support Unicode directly. XeLaTeX provides better support. With XeLaTeX, I suppose you could insert a Unicode symbol using its code like this:

Code: Select all

\char"00E7
But there is no reason to do that rather than use ç directly. If compiled with XeLaTeX, then simply this:

Code: Select all

\documentclass{article}
\title{Utilizando SSIM para medir a deteriorização em interpoções LAEP}
\begin{document}
\maketitle
\end{document}
should work.

Now, I gather that there are some other problems for you, but without a minimal working example of the problems (including access to whatever this .cls extension is you mention), it is impossible to give advice.
rodrigozanatta
Posts: 3
Joined: Fri Jan 28, 2011 12:11 am

How input unicode character by it number code?

Post by rodrigozanatta »

Hi, I like your help. This is a Minimal working latex. The .cls can be downloaded here: http://www.cic.unb.br/~ralha/cursos/cla ... nb-cic.cls

Code: Select all

\documentclass[bacharelado]{unb-cic}
\usepackage[english,brazil]{babel}
\usepackage[utf8x]{inputenc}
\usepackage{ucs} 
\usepackage{natbib,color,url}
\usepackage{amsmath,amsfonts,amssymb,textcomp}
\usepackage{subfigure}
\usepackage{verbatim}
\usepackage[margin=10pt,font=small,labelfont=bf,labelsep=endash]{caption}

\title{Utilizando SSIM para medir a deteriorizac\~ao em interpoc\~oes LAEP - Trying write ç }
\subtitle{Uma abordagem atrav\'es de imagens forenses}

\orientador{\prof \dr D\'ibio Leandro Borges}{CIC/UnB}
\coordenador{\prof \dr Marcus Vinicius Lamar}{CIC/UnB}
\diamesano{2}{fevereiro}{2011}
\membrobanca{\prof \dr A ser definido}{CIC/UnB}
\membrobanca{\prof \dr A ser definido}{CIC/UnB}
\autor{Rodrigo Zanatta}{Silva}
\CDU{004.4}
\palavraschave{Processamento de Imagem, Interpolacao, SSIM, Imagem Forense}
\keywords{Image Processing, Interpolation, SSIM, Forensic Image}

\begin{document}
\maketitle
\textual
\postextual
\end{document}
When you run it, the "ç" that i tried to write, will show [Pleaseinsert "PrerenderUnicode-"intopreamble]. If this was only a small error, i don't will do nothing, but because this is the "title" of the paper, it's very important.
User avatar
frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am

How input unicode character by it number code?

Post by frabjous »

Well, that's not exactly a minimal working example, since to use the document class you seem some logo files (contorno_preto and positivo_cor), without which you can't process the file, but I was able to do some testing using some faked logos.

This definitely looks like a problem with the way the document class defines its \title and \subtitle commands. If this document class is distributed by your University for thesis-writers, I think it might be worth contacting them and see if they know anything.

In the meantime, at least in my tests, it seems to be a workaround just to eliminate the lines:

Code: Select all

\title{Utilizando SSIM para medir a deteriorizac\~ao em interpoc\~oes LAEP - Trying write ç }
\subtitle{Uma abordagem atrav\'es de imagens forenses}
And replace them with these:

Code: Select all

\newcommand{\mytitle}{Utilizando SSIM para medir a deteriorizac\~ao em interpoc\~oes LAEP - Trying write ç}
\newcommand{\mysubtitle}{Uma abordagem atrav\'es de imagens forenses}
\makeatletter
\def\@subtitle{\mysubtitle}
\def\@maintitle{\mytitle}
\def\@title{\mytitle: \mysubtitle}
\makeatother
That seems to do pretty much the same thing but without generating errors. But really, I think the document class needs to be fixed by whoever maintains it instead.
rodrigozanatta
Posts: 3
Joined: Fri Jan 28, 2011 12:11 am

Works!!!

Post by rodrigozanatta »

Lol, i really test that minimal code before send to you. But i forget the images. Was my mistake don't send it.

You are my angel. Your code really works. I have no time to have problem with latex :P I don't know why the teacher who made that .cls don't fix it. But I thought it is only put a unicode number. Because this I write here.

I will send your fix to the teacher, or say to student use in that way.

People who know write latex, really know write latex :P

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

How input unicode character by it number code?

Post by localghost »

rodrigozanatta wrote:[…] Your code really works. […]
If so, please mark the topic accordingly as written in Section 3 of the Board Rules (to be read before posting).


Best regards and welcome to the board
Thorsten
Post Reply