Wandering Trader Spawning?
You can check data types by listing them with system_profiler -listDataTypes
and then use them to get specific info. For example to get info about chipset & RAM run system_profiler SPHardwareDataType
.
I don't entirely understand what you are trying to achieve, and whatever I'm guessing, I don't think I would do it the same way, but, in any case, here's a change that makes that document compile.
\cs_new_protected_nopar:Nn \pre_key_tl_save:Nn
{
\tl_if_empty:cF {l_cfr_#2_tl}
{
\tl_gput_right:No #1 { #2 = }
\tl_gput_right:NV #1 \c_left_brace_str
\tl_gput_right:Nv #1 { l_pre_#2_tl }
\tl_gput_right:NV #1 \c_right_brace_str
\tl_gput_right:Nn #1 { , }
}
}
This seems wrong, even if I don't understand that clearly, that's, for one, overcomplicating the issue with many different parts, and also, the fact that you cannot actually do that (adding \c_left_brace_str
is not adding an opening group catcode 1 {
but an catcode “other”, similar to \string{
). It's simpler with a plain x
argument, with the correct \exp_not:*
.
\cs_new_protected_nopar:Nn \pre_key_tl_save:Nn
{
\tl_if_empty:cF {l_cfr_#2_tl}
{
\tl_gput_right:Nx #1 { #2 = { \exp_not:v { l_pre_#2_tl } } , }
}
}
With this change it at least compiles, but I don't know if this solves all.
You want to add a string, and the value of a macro to another macro. The easiest way to do that is to do all at once with an x
argument. It's literally doing what you wanted to do, but correct. \tl_put_right:Nx
expands the second argument in an \edef
, that is, it expands everything, so you only need to stop at the precise moment that you want. After substituting arguments you end with
\tl_gput_right:Nx \g_pre_img_options_tl { graphics = { \exp_not:v { l_pre_grahpics_tl } } , }
If you saw \edef\foo{graphics={foo}}
you understand what the content of \foo
would be: nothing expands, nor the letters, nor the “others” (“=”), nor the braces {
and }
. So the magic is inside \exp_not:v { l_pre_grahpics_tl }
. Thanks to expl3 arguments that is exactly the same as \exp_not:V \l_pre_grahpics_tl
which in turn is the same as \exp_not:n { width=\textwidth }
which just stops the expansion there (\exp_not:n
is \unexpanded
).
That way, the line above, after the x
expansion, ends up being exactly
\tl_gput_right:Nn \g_pre_img_options_tl { graphics = { width = \textwidth } , }
if it wasn't for the \unexpanded{width=\textwidth}
TeX might have tried to expand \textwidth
as with any other macro, which (not sure right now) might have been expanded to \dimen <number>
and, in general, we don't want that expansion to happen.
Sorry, but anyone is free to edit this answer, which is anything but perfect.