I'm trying to define a new single-character LaTeX command (to insert a 1 pt space with \kern1pt) and want to use one of the characters obtained through the AltGr key on a US International keyboard layout. I've chosen the Unicode U+00A6 '¦', aka 'Broken Bar' character. This is my preamble
\documentclass[11pt,english]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{textcomp}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{babel}
and this is my newcommand definition
\expandafter\newcommand\csname u8:\detokenize{¦}\endcsname{\kern1pt}
and the error I get:
! LaTeX Error: Command \u8:¦ already defined.
. Or name \end... illegal, see p.192 of the manual.
So, trying to understand what is going on, I replaced '¦' with '∙', the Unicode U+2219 'Bullet Operator' character. I first made sure that LaTeX complained, in insertions in normal text, as loudly with '∙' as it does with '¦', (it does) and then changed my newcommand definition thus:
\expandafter\newcommand\csname u8:\detokenize{∙}\endcsname{\kern1pt}
This time I got no errors, so I proceeded to use my new macro
a\∙b
and got this error:
! Undefined control sequence.
l.530 a\Ô
. êÖb
Trying to fix that, I added this to my preamble,
\DeclareUnicodeCharacter{2219}{\textsurd} % Recognise `∙' character in input
and got this error instead:
! LaTeX Error: Command \u8:ÔêÖ already defined.
. Or name \end... illegal, see p.192 of the manual.
Can someone please save me hours sifting through the newunicodechar package manual? (And I remind that it's a '¦', not '∙' that I need to use.)