There is a standard. It's a matter of opinion whether it's sensible or not, but it's been there since the release of LaTeX2e.
Font aspect changing commands have two forms: action and declaration
The same holds for abstract instruction such as "emphasize"
Size changing commands have only the declarative form.
Let me review the three points.
Font aspect changing commands
The declarative form for changing the font's aspect is formed from a prefix denoting briefly the purpose and by a suffix denoting the attribute that's changed:
\sffamily
\itshape
\bfseries
The "action form" is a command that takes an argument; all kernel defined commands of this type have a prefix text
and a suffix corresponding to the similar declaration:
\textsf{words}
\textit{words}
\textbf{words}
The fundamental difference is that a declaration's scope is up to the end of the group in which it's issued (or a countermanding declaration).
Two important commands are \textnormal
(action) and \normalfont
(declaration) that instruct LaTeX to use the font which was current at document start.
Abstract instruction
By "abstract instruction" I mean \emph
and \em
, which usually act by italicizing, but one should not rely on this, as the effect can be redefined by the document class.
The form \emph
is the action: \emph{words}
, while \em
is a declaration. The latter can be useful in defining environments.
Size changing commands
The size changing commands have only the declarative form, as very rarely one needs to set a couple of words in a smaller or larger size. Examples
\footnotesize
\small
\normalsize
\large
Their scope ends with the group where they have been issued (usually an environment). If a paragraph must be typeset in a different size it's important to remember marking explicitly the end with \par
or a blank line. Commonly it's the environment where they are issued that takes care of it.
There are a couple of problems:
There is already an action defined for ¦
, precisely \IeC{\textbrokenbar}
, which is kind of expected; thus \newcommand
will give you the error.
If you do
\expandafter\newcommand\csname u8:\detokenize{∙}\endcsname{\kern1pt}
you're not defining the macro \∙
, but a meaning for the Unicode character ∙
. Since ∙
is represented in UTF-8 by the triple E2 88 99
, TeX will see \^^e2
and the error message uses some representation of the three bytes.
With newunicodechar
you don't have to do anything special:
% -*- coding: utf-8 -*-
\documentclass[11pt,english]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{textcomp}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{babel}
\usepackage{newunicodechar}
\newunicodechar{¦}{\kern20pt} % exaggerated to show the effect
\begin{document}
A¦A
\end{document}
The output is
and the log file will report
Package newunicodechar Warning: Redefining Unicode character on input line 11.
which would be
Package newunicodechar Warning: Redefining Unicode character; it meant
(newunicodechar) *** \IeC {\textbrokenbar } ***
(newunicodechar) before your redefinition on input line 11.
if the verbose
option is used (\usepackage[verbose]{newunicodechar}
).
Here's the relevant part from the documentation of newunicodechar
.
The package provides only one command, \newunicodechar
, which must be called with two arguments:
\newunicodechar{<char>}{<code>}
where <char>
is the Unicode character to which we need to give a meaning and
<code>
is that meaning, that is the LaTeX code that will be substituted to the
character.
Best Answer
If the intention is to start a new group then you can use
or, more simply, just
To close the group, the corresponding macro is
\endgroup