# [XeTeX] new commands

Fr. Michael Gilmary FrMichaelGilmary at MaroniteMonks.org
Tue Apr 6 15:05:10 CEST 2010

Brian Wilson wrote:
> Thank you to the XeTeX community for the help with my last issue.
>
> Over the last week I have learned how to change the paper size, make running
> fellow newbies are reading this, the following site has been most helpful to
> me. http://en.wikibooks.org/wiki/LaTeX
>
> Currently I am working on a small document of Bible portions in the Lao
> language. There are four things that I want to do with the verse numbers.
> 1 Superscript
> 2 grayscale
> 3 specify font
> 4 add a tiny space after the verse number and before the verse.
>
> Can I do all of this with a newly created \vnum command? I have googled
> about \newcommand until I am blue in the face. Succeeded in making a command
> to do superscript and another command to do grayscale, but failed to make a
> command containing both functions and so didn't proceed to the last two.
>

Hi Brian:

Try this:

%%%%%%%%%%%%%%%%%%%%%
\documentclass{minimal}

\usepackage{xltxtra}
\usepackage{polyglossia}
\setdefaultlanguage[variant=us]{english}
\usepackage{xcolor}

\defaultfontfeatures{Mapping=tex-text}
\setmainfont{Palatino}

\newcommand\grayssnumbers[1]{\textsuperscript{\color{gray}#1}}

\newcommand\vnum[1]{{\versenumbers\grayssnumbers{#1}}\,}

\begin{document}

This is a test of the \vnum{234} command.

End of test.

\end{document}
%%%%%%%%%%%%%%%%%%%%

You can substitute fonts as desired.

HTH.

--

fr. michael gilmary, mma

Most Holy Trinity Monastery