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
Condense Mail Headers

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

Print Reply
Mime-Version:
1.0 (Apple Message framework v930.3)
Sender:
Mailing list for the LaTeX3 project <[log in to unmask]>
Subject:
From:
Will Robertson <[log in to unmask]>
Date:
Thu, 26 Feb 2009 11:27:52 +1030
In-Reply-To:
Content-Type:
multipart/signed; boundary=Apple-Mail-1--395364978; micalg=sha1; protocol="application/pkcs7-signature"
Reply-To:
Mailing list for the LaTeX3 project <[log in to unmask]>
Parts/Attachments:
text/plain (1852 bytes) , smime.p7s (2446 bytes)
On 26/02/2009, at 6:31 AM, Frank Mittelbach wrote:

> so for now (see other post) I would only assign \endlinechar and  
> \scantokens
> and the names there look fine to me

After all this I now agree with Frank (that the every-toks require a  
wrapper to be useful, and expl3 isn't the place to do that), so let's  
agree to add \endlinechar directly (except we want  
\l_char_end_line_int instead of _endline_ I think) and...

> instead provide a scantokens
> interface which sets up its environment carefully (by, for example,  
> copying
> a specific toks (e.g., \l_every_rescan_end_toks to \tex_every_eof:D  
> prior to
> calling \etex_scantokens:D) rather than providing the primitive for  
> direct
> use.

... add a version of scantokens that looks approximately like this:  
(just copying Joseph's code)

\cs_set_eq:NN \l_char_end_line_int \tex_endlinechar:D
\cs_new:Npn \tlist_rescan:n #1 {
  \group_begin:
    \tex_everyeof:D {\exp_not:N}
    \int_set:Nn \l_char_end_line_int {\c_minus_one}
    \toks_set:Nx \l_tmpa_toks { \etex_scantokens {#1} }
    \exp_after:NN
  \group_end:
  \toks_use:N \l_tmpa_toks
}

(Sorry for my ignorance but what's the endlinechar part for? Maybe we  
don't need that?)

> My point is that I don't want to saction the use of the primitive by  
> giving it
> a name

I'm going to use that as an argument against \pref_ :)

Will

***

Appendix: minimal example of \tlist_rescan:n

\documentclass{article}
\usepackage{expl3}
\begin{document}
\ExplSyntaxOn
\cs_set_eq:NN \l_char_end_line_int \tex_endlinechar:D
\cs_new:Npn \tlist_rescan:n #1 {
  \group_begin:
    \etex_everyeof:D {\exp_not:N}
    \int_set:Nn \l_char_end_line_int {\c_minus_one}
    \toks_set:Nx \l_tmpa_toks { \etex_scantokens:D {#1} }
    \exp_after:NN
  \group_end:
  \toks_use:N \l_tmpa_toks
}
\def\tmp{
\char_make_other:N \$
\char_make_other:N \^
\texttt{\tlist_rescan:n { $a^1$ }} ~vs.~$a^1$
}
\tmp
\end{document}



ATOM RSS1 RSS2