1

I would like to include a special character in my LaTex document : Ꝃ

(it is used in breton for an abbreviation for "kêr", which means "place" or "house", and used in the naming of locations)

Here are its technical specifications, quoted from the ubuntu 14.04 documentation (in french) :

U+A742 LATIN CAPITAL LETTER K WITH DIAGONAL STROKE

Propriétés générales du caractère

Présent dans Unicode depuis : 5.1 Catégorie Unicode : Lettre, majuscule

Diverses représentations utiles

UTF-8 : 0xEA 0x9D 0x82 UTF-16 : 0xA742

UTF-8 en C octal échappé : \352\235\202 Entité décimale XML : Ꝃ

If I copy / paste the character directly, I get an error message (! Package inputenc Error: Unicode char \u8:ê‚ not set up for use with LaTeX.). I guess there is something to do, or some special code to write, to be able to insert it. I only need to insert it ONCE, in a very long and already complex document, so I am looking for a simple solution with as few new packages or heavy changes as possible. I am wondering why I should convert the document to XeLatex or LuaLatex, for this single character, and which kind of changes it would make to my document if I'm doing that.

In the doc of inputenc (v1.1d 2008/03/30, p.3), I found the command :

\DeclareUnicodeCharacter{code}{def}

So I guess I could make something like :

\DeclareUnicodeCharacter{A742}{…}

but I don't know what goes in the "def" place. I have made a few tries without success.

Or then, change something in my preamble to get a wider pre-loaded list of characters, including the one I need ?

Here is a M(not)WE, taken from the very begining of my preamble :

\documentclass[12pt,a4paper,titlepage,oneside]{book} % il faudra ajouter [final] à la fin

\usepackage[utf8]{inputenc}
\usepackage[ibycus,frenchb]{babel}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
%\DeclareUnicodeCharacter{A742}{???}
\usepackage{cjhebrew}

\begin{document}
k

Ꝃ
\end{document}

Comments : The error message is on line 13. On line 7 I have commented the command because it is not complete. I'm using ibycus & cjhebrew because the authors I'm studying sometimes make comparisons with some words in ancient greek or hebrew.

I have also tried a few things with ucs package, but it didn't work properly.

I've read a few questions (here, here, here), but the solutions I tried from them didn't fit.

Thank you,

Malo

  • As far as I can see, there are just a few fonts supporting the glyph. It's not even in STIX. The simplest approach is to build the glyph yourself from two pieces. – egreg May 23 '16 at 16:53
1

You can experiment with different bars (this one is from the slashed L \L)

enter image description here

\documentclass[12pt,a4paper,titlepage,oneside]{book} % il faudra ajouter [final] à la fin

\usepackage[utf8]{inputenc}
\usepackage[ibycus,frenchb]{babel}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\makeatletter
\DeclareTextCommandDefault{\KK}
   {K\lower.1em\llap{\fontencoding{OT1}\bfseries\@xxxii\kern.1em}}

\DeclareUnicodeCharacter{A742}{\KK}
\usepackage{cjhebrew}

\begin{document}
k

Ꝃ
\end{document}
  • Thank you @David . It's near to what I'm looking for, and works if I remove DeclareUnicodeCharacter and get only \makeatletter \DeclareTextCommandDefault{\KK} {K\lower.1em\llap{\fontencoding{OT1}\bfseries\@xxxii\kern.1em}}. The only thing is I would like the line to be a bit different. Something like !this. I've tried to understand the commands you've used, I've vaguely understood for some of them, but not at all for \@xxiii, that's why I'm not able to change the line's orientation by my own. – Malo May 25 '16 at 15:21
  • @Malo you need DeclareUnicodeCharacter if you want to enter it as a character rather than as the command \KK, as for the line that one is not changable it is the line that is in the font for the slashed L, \L (which happens to be character 23, hence the xxiii) you could instead draw a line of any angle using tikz or picture mode \line etc, but then it gets a lot more complicated as you have to take account of the current font size and draw a suitable line, this way it just naturally follows the font size. someone may post a tikz answer though if you wait a bit.... – David Carlisle May 25 '16 at 15:29
0

Here is what I've finally done, based on @David 's suggestion (thanks to him), and some modifications :

\newcommand{\kbarre}{K\lower.85em\llap{{\LARGE \'{}}\kern-.1em}}

The result is not perfect, but sufficient for my use.

A few observations :

  1. I didn't need to have it recognised as a Unicode character, and \DeclareUnicodeCharacter was making some error messages, so having it as a command was enough for me.

  2. The size I'm writing in is "normal". If someone wanted to use this character in other sizes, it would be necessary to replace \LARGE by some command from the relsize package, I guess.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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