I looked a bit at the plastex pdf documentation but could not find any concrete explanation of what is acceptable and what is not.
As a rhetorical exercise, here is a macro \NthElt {N}{list} which returns (expandably) the Nth element of the list (spaces gobbled), the list may be a macro expanding to some string, or some other list of braced things; the N has to be an explicit positive integer.
My constraint was not to use any \if but as it has been used in other answers I allowed myself delimited macros and \romannumeral. Use of \romannumeral could be removed entirely; delimited macros are at the heart of the method.
And this is e-TeX as \numexpr is crucially used.
\documentclass{article}
\makeatletter
\def\gobble@ {}%
\def\gobble@i #1{}%
\def\gobble@ii #1#2{}%
\def\gobble@iii #1#2#3{}%
\def\gobble@iv #1#2#3#4{}%
\def\gobble@v #1#2#3#4#5{}%
\def\gobble@vi #1#2#3#4#5#6{}%
\def\gobble@vii #1#2#3#4#5#6#7{}%
\def\gobtoundef #1\undef {}%
\def\gobtonine #19{}%
%\def\FirstOfTwo #1#2{#1}% here, LaTeX: just use \@firstoftwo
%\def\ThirdOfThree #1#2#3{#3}% here, LaTeX: just use \@thirdofthree
% EXPANDABLY RECOVERS THE #1th ITEM
% #1 MUST BE AN EXPLICIT POSITIVE INTEGER (not a count or not even a macro)
%
\def\NthElt #1#2%
{%
\romannumeral0\expandafter\NthElta\expandafter {\romannumeral-`0#2}{#1}%
}%
\def\NthElta #1#2%
{%
\NthEltb {#2}#1\undef\undef\undef\undef\undef\undef\undef\undef\UNDEF
}%
\def\NthEltb #1%
{%
\IfMoreThanEight #1\undef\@firstoftwo {\NthEltc}{\NthEltGetIt}%
{#1}%
}%
\def\IfMoreThanEight #1#2%
{%
\gobtoundef #2\PerhapsAtMostEight #1%
}%
\def\PerhapsAtMostEight #1%
{%
\gobtonine #1\gobble@ii 9\@thirdofthree
}%
\def\NthEltc #1#2#3#4#5#6#7#8#9%
{%
\gobtoundef #9\NthEltSilentEnd\undef
\expandafter\NthEltb\expandafter{\the\numexpr #1-8\relax}%
}%
\def\NthEltSilentEnd #1\UNDEF { }% space stops the \romannumeral0
\def\NthEltGetIt #1%
{%
\expandafter\expandafter\expandafter\NthEltFinish
\csname gobble@\romannumeral\numexpr#1-1\endcsname
}%
\def\NthEltFinish #1#2\UNDEF {\gobtoundef #1\expandafter\space
\gobble@iii\undef\space #1}%
% space stops the \romannumeral0
\makeatother
\begin{document}
\NthElt {1}{ABCDEFGHIJKLMNOPQRSTUVWXYZ}
\NthElt {7}{ABCDEFGHIJKLMNOPQRSTUVWXYZ}
\NthElt {26}{ABCDEFGHIJKLMNOPQRSTUVWXYZ}
+++\NthElt {27}{ABCDEFGHIJKLMNOPQRSTUVWXYZ}+++
% 0 is not legal as index, but acts as if 1.
+++\NthElt {0}{ABCDEFGHIJKLMNOPQRSTUVWXYZ}+++
\newcount\cnta
\loop
\advance\cnta 1
\expandafter\NthElt\expandafter{\the\cnta}{ABCDEFGHIJKLMNOPQRSTUVWXYZ}.%
\ifnum\cnta < 30
\repeat
\edef\z {\NthElt
{37}{ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJ{THIS IS ME!}LMNOPQRSTUVWXYZ}}
\texttt{\meaning\z}
\end{document}

\def\foo#1,{}? Does it support nested definitions such as\def\foo{\def\baz##1{}}? – Bruno Le Floch Oct 24 '13 at 16:35\def\foo{FOO}\csname foo\endcsnameand tell us if it compiles without errors and printsFOO? – Oct 26 '13 at 12:03