LATEX-L Archives

Mailing list for the LaTeX3 project

LATEX-L@LISTSERV.UNI-HEIDELBERG.DE

Options: Use Forum View

Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Joseph Wright <[log in to unmask]>
Reply To:
Mailing list for the LaTeX3 project <[log in to unmask]>
Date:
Sun, 13 Dec 2009 10:54:51 +0000
Content-Type:
text/plain
Parts/Attachments:
text/plain (45 lines)
Hello all,

I've been working on some code to do peek-ahead stuff in tables. It 
looks to me as though the \peek_...:NTF functions are broken in this 
context:

\documentclass{article}
\usepackage{array,expl3}
\begin{document}
\ExplSyntaxOn
\cs_new:Npn \CollectTokens {
   \peek_meaning:NTF \ignorespaces { } { }
}
\ExplSyntaxOff

\begin{tabular}{>{\CollectTokens}cc}
   a & \\
     & \\
       \\
\end{tabular}

\ExplSyntaxOn
\cs_set:Npn \CollectTokens {
   \cs_set_eq:NN \l_peek_search_token \ignorespaces
   \tl_set:Nn \l_peek_true_tl  { }
   \tl_set:Nn \l_peek_false_tl { }
   \peek_after:NN \peek_execute_branches_meaning:
}
\ExplSyntaxOff

\begin{tabular}{>{\CollectTokens}cc}
   a & \\
     & \\
       \\
\end{tabular}

\end{document}

The second version here omits the \group_align_safe_(begin/end): 
functions which the standard \peek_meaning:NTF, etc., functions add.

Any ideas what is up? Am I getting something wrong?
--
Joseph Wright

ATOM RSS1 RSS2