2:32 AM
how to indent a single line?

@baxx What are you trying to do? Paragraphs are indented by default in the standard classes.

2:49 AM
@AlanMunn all good I used \-\hspace{1cm}
i just wanted some space on a particular line

@baxx ok, but if you're needing to do this a lot in a document you probably need to rethink things.

yeah it's a hack
but it works and it's not needed much :')

6 hours later…
8:32 AM
@baxx \- ????
@baxx \- is a discretionary hyphen, if you need the space then just use \hspace*{1cm} (preferably hidden behind some more reasonable document structure markup)

9:33 AM
@JosephWright it is rather a question of whether the box is inserted directly into the page or passend to \pdfxform

@AlexG About your AR-bug widget: under which condition should it be inserted? And how often? One per page, per layer, per document, per link? With the newest expl3 code I get lots of them and I think one should reduce this a bit with some booleans (@JosephWright).

"How to use LaTeX with a VR headset"

9:53 AM
@UlrikeFischer I'lll try tomorrow.

10:08 AM
@AlexG I'd seen that: trying to build up a bit at a time

10:32 AM
@JosephWright I just got at \pdfpagesattr. Do you think this looks more or less sensible: github.com/latex3/pdfresources/blob/testlinkstuff/experiments/…? (not sure about the names ...).

@UlrikeFischer Looks OK; do we want something that says all (\pdfpagesattr) and next (\pdfpagesttr)?
@UlrikeFischer MediaBox needs some special handling I think ... or at least a warning about pdfTeX default behaviour

@JosephWright well while the difference between pagesattr and pageattr is not large I think on the driver level it should be enough (and follows the pdftex/luatex naming). Should there be (or is there) an expl3 variant for \pdfpagesattr?.
@JosephWright I think safety code (also e.g. when a key is overwritten) can be added later.

@UlrikeFischer I meant only that we need parallel 'all pages' and 'one page' names
@UlrikeFischer What variant do you mean?

@JosephWright the luatex branch uses \tex_variable:D pagesattr but the pdf is \pdfpagesattr.

@UlrikeFischer Oh, it's just \tex_pdfpagesattr:D, unless I missed it ...

10:45 AM
@JosephWright you mean for the prop name? Yes perhaps it would be clearer.

@UlrikeFischer Seems I missed it: will fix

@JosephWright ? you didn't miss it, I did:\tex_pdfpagesattr:D=\pdfpagesattr

@UlrikeFischer I mean I missed adding it to l3names last time I tried to get all of the primitives sorted
@UlrikeFischer Frustrating we have those two but not \pdfpagesresources/\pdfpageresources split
@UlrikeFischer That code looks pretty trivial to add: I don't think it's at all controversial
@UlrikeFischer I guess other backends more tricky

@JosephWright ;-).

11:02 AM
@UlrikeFischer dvipdfmx is OK:
\special{pdf: put @pages <</Rotate 90>>}
\special{pdf: put @thispage <</Rotate 0>>}

@JosephWright when we need page resources we will have to use numbers, so I would suggest _pages_ and _page_1_ (and we need an absolute page counter ...).

@UlrikeFischer Huh? That's not the same exactly as 'all' and 'next', though: the latter is just 'whatever gets shipped out next'

@JosephWright ah, yes a this_page is perhaps needed too.
@JosephWright It would be useful to have this in pdftex/luatex too. It would make it much less complicated to rotated a sidewaystable.

@UlrikeFischer That's just \pdfpagesattr, isn't it?
Or not quite ...
@UlrikeFischer Need something like
\pdfpagesattr{/Rotate 90}
\pdfpageattr{/Rotate 0}
\usepackage{atbegshi}
\AtBeginShipoutNext{\pdfpageattr{}}
as the toks isn't cleared

@JosephWright ah yes, mixed it up. One shouldn't cook and chat at the same time.

11:22 AM
@UlrikeFischer ooh

1 hour later…
12:49 PM
Is there an easy way to take a string and return the same string, but with commas after every letter?

@FaheemMitha Define easy.

I guess I was asking the wrong question. What I really want to know is how to loop over characters in a string. Reading some questions.

1:09 PM
@FaheemMitha Do you need to preserve spaces?

This is pretty close to what I'm trying to do:
14

You can use \@tfor. I provide also a better redefinition of the dot under according to your wish: \documentclass{article} \usepackage{graphicx} \let\d\relax \DeclareRobustCommand{\d}[1]{% \oalign{#1\cr\hidewidth\scalebox{0.5}{\textbullet}\hidewidth\cr}% } \makeatletter \newcommand{\ds}[1]{% ...

@JosephWright Yes, I think so. I want to put a box around every character in a string. And the string can certainly include blank characters.
So a blank space would require its own box.
Can anyone provide a reference for \@tfor? It appears to be part of the language.
Tex or LaTeX.

@FaheemMitha LaTeX kernel command (texdoc source2e)

@JosephWright Ok. Thank you.
Are there other newer commands that do the same thing? Say in LaTeX 3?
\@tfor NAME := LIST \do {BODY}
if, before expansion, LIST = T1 ... Tn where each Ti is a
token or {...}, then executes BODY n times, with NAME = Ti
on the i-th iteration. Works for n=0.
So, basically a loop construction.

@FaheemMitha We have an internal set up in expl3 for expandable loops with spaces, etc., but it's really not a general function (at the moment at lest)

@JosephWright Ok.
This @\tfor construction seems to ignore spaces.

1:27 PM
stringstrings

@FaheemMitha Yes, I added an explanation.

@egreg What are my options if I don't want it to?

@FaheemMitha It mostly depends on what you're trying to achieve. You can replace spaces with \space before doing \@tfor, for example.

@egreg Trying to enclose each character in a string with an equally spaced box.

@FaheemMitha I just added the explanation of \@tfor.

1:34 PM
@egreg Yes, I saw it. Thank you.
I have no idea what the first \let line does.
@egreg Yes, \space works. But it would be better not to have to use it.

\documentclass{article}
\usepackage{xparse}

\ExplSyntaxOn
\NewDocumentCommand{\spacechars}{m}
{
\tl_set:Nn \l_tmpa_tl { #1 }
\tl_replace_all:Nnn \l_tmpa_tl { ~ } { \c_space_tl }
\tl_map_function:NN \l_tmpa_tl \boxedchar
}
\ExplSyntaxOff

\NewDocumentCommand{\boxedchar}{m}{%
\framebox[2em]{\strut#1}%
}

\begin{document}

\spacechars{ab c d}

\end{document}
@FaheemMitha ^^^^^ I used \framebox to make the boxes visible.
@FaheemMitha You can use \scan_stop: (that is, \relax) instead of \c_space_tl.

\documentclass{article}

\def\zz#1{\zzz#1\relax}
\def\zzz{\afterassignment\zzzz\let\zztmp= }
\def\zzzz{%
\ifx\zztmp\relax
\else
\framebox[2em]{\strut\zztmp}%
\expandafter\zzz
\fi}

\begin{document}

\zz{abc 123 xyz}

\end{document}
@FaheemMitha ^^
@egreg prefers _ to z

@DavidCarlisle \zz{a{bc}}

@egreg I was counting down to you making that comment, took longer than I expected.

@DavidCarlisle ooh

1:46 PM
@egreg it depends how one defines "string" for the input. If you choose to allow brace groups it's easily extended, and I leave as an exercise for the reader...

2:06 PM
@DavidCarlisle since when can latex+dvips (+ps2pdf) handle png?

@UlrikeFischer oops:-)

@DavidCarlisle ;-).

@DavidCarlisle ooh

2:34 PM
@UlrikeFischer this is wrong though texfaq.org/FAQ-dvipsgraphics dvips supports several bitmap formats, pcx, bmp, msp, pict from emtex specials and pict and pntg from oztex

@JosephWright That's a pitty, indeed. Thatswhy I had to define \pbs_zap_properties: in order to "clean" page resources from unneeded entries, in pdfbase.

@AlexG My plan is a little different: use a prop and rebuild the list at shipiut of each page

@JosephWright If it works, the better. Looking forward to it!

@egreg @DavidCarlisle Thank you for the code snippets. But returning to egreg's original answer, I don't know what this is doing:
\let\d\relax
\let is an assignment operator (or whatever the TeX equivalent is).
What is being assigned here?

2:49 PM
@egreg do you know any old oztex users.... what was the pntg filetype , it is documented page 50 of repo1.macintoshgarden.org/Garden/manuals/ozuser.pdf and dvips.def still has a line \@namedef{Gin@rule@.pntg}#1{{pntg}{}{#1}} but I couldn't see any code in the dvips sources supporting this (and didn't know how to make such a file to test...) (@JosephWright)
@FaheemMitha it is just letting \d to \relax to undefine it so it can be defined later

@DavidCarlisle Sorry, never heard about it.

@DavidCarlisle Um, but if it's defined, then undefining would cause problems, surely? And if it is not already defined, then why undefine it?

@FaheemMitha it is a dot-under accent by default but in that question it was being defined to be something else, but if you do not want to use the command \d just forget about it it is not relevant to the general loop issue.

@JosephWright I think too that is the best (like my pagesattr)

@DavidCarlisle Yes, that's the four-letter file type.

3:20 PM
@DavidCarlisle I see. So in general it's not necessary?

@DavidCarlisle Wow! A blast from the past. I don't think MacPaint has been a thing since the late 80s.

Is anyone here a regular user of the Gimp?

@DavidCarlisle Are you keeping BITNET support too? :)

@AlanMunn I think many European vax users are still on bitnet so supporting it seems like a good idea.

@DavidCarlisle Really? It still exists? I had no idea. I remember having a bitnet address in grad school but never afterwards.

3:24 PM
@AlanMunn I have no idea, I just lie in chat, easier than checking facts

@DavidCarlisle lol So I guess the starred IT'S NOT MY FAULT is a lie.

@DavidCarlisle There are still VAX users?
I thought the VAX had gone the way of the Dodo.

@FaheemMitha see my last comment...

Except less violently.
@DavidCarlisle Economy of effort?

@AlanMunn given the eccentric spelling, the starred comment could mean anything

3:28 PM
What's with the Sri Lanka love?

@FaheemMitha This article from 2004 says there are about ~160,000 machines still in use in the US. I would bet that some of them are still running.

@AlanMunn Wow, that's a lot.

@FaheemMitha Unlike individual users who tend to update quite frequently, businesses are extremely conservative in using new hardware or software; the cost of porting is too large. So there is a ton of truly ancient hardware and software in the business world.
@FaheemMitha The US military is also a big user of ancient hardware.

@AlanMunn forgot to update my XONE for 3 months. Almost 500GB of updates!

@PauloCereda I'm guessing this is a gaming console.

3:37 PM
@AlanMunn it is. :)
@AlanMunn: @DavidCarlisle and I are pro gamers

@PauloCereda M-x pong The picture mode of games.

@AlanMunn bah

@AlanMunn By the way...
@AlanMunn pinging you!

@AlanMunn Yes, I've heard that. Perhaps it's because their programs are not written in a portable language?
@AlanMunn That's reassuring.

3:53 PM
@FaheemMitha I don't think it's as simple as that. Not quite sure what a portable language is, though. All languages are portable to some degree, but I doubt any language is truly portable in reality.
@FaheemMitha Of course I guess assembly language isn't really portable.

@AlanMunn C, or anything written in C. Or C++. Java, Python, R.

@FaheemMitha Yes, I understand the concept, I'm just saying in reality, not necessarily.
@FaheemMitha See e.g. my recent message
Apr 6 at 16:12, by Alan Munn
@DavidCarlisle My main worry these days is making sure my version of PsychoPy (a Python based experiment platform) will run my experiments. Sometimes this involves successive downgrades until you find a version that works. It's all very scientific. :)

@AlanMunn Well, you have to have a C compiler, for example.
I guess they don't grow on trees.

2
I just got another palindrome
I am currently on a palindrome track, I think

@FaheemMitha Of course this is a minimum requirement. But that doesn't guarantee portability. Writing portable code at that level also requires a strict prohibition on using OS-specific functions, for example. So code can be portable, languages, not so much.

4:07 PM
@AlanMunn Normally there would be some sort of abstraction level, I guess. But I do not know much about the reality, as you put it.
@egreg I like this. It's looks new and modern and shiny.
It's all syntax from xparse, I take it.

@FaheemMitha define "C"... C from a vax era is probably K&R C and good luck with java or python or R, the environments and languages that were portable between machines of the 80s and 90s are not necessarily portable between machines now, and that is what matters if you are talking about upgrading old hardware
@FaheemMitha NewDocumentCommand is xparse, the \tl_... functions are from expl3

@DavidCarlisle Yes, I realise the devil is in the details.
@DavidCarlisle So not in a package, then.

@FaheemMitha yes the expl3 package.

@DavidCarlisle Yes, I see there is an expl3 package.
Automatically loaded by xparse?
So it this the wave of the future?

@FaheemMitha yes as you can see on the terminal if you try the example.
@FaheemMitha possibly

4:17 PM
@DavidCarlisle Ok.

@FaheemMitha I've been using the \foo_bar:nnn syntax off and on since 1992 so it doesn't seem too futuristic to me:-)

@DavidCarlisle 1992?

@FaheemMitha yes

I thought that was the era of 2e.

@FaheemMitha latex3 is older than 2e

4:20 PM
@FaheemMitha @DavidCarlisle is ahead of his time. picture mode is the new TikZ.

@AlanMunn you jest but by the time @JosephWright has finished with it, that may be true...

4:31 PM
@DavidCarlisle It is?

@FaheemMitha yes

Wow, you learn something new every day.

@FaheemMitha that's why 2e is called 2e, latex3 was already in test but not ready for public use, so 2-epsilon was supposed to be a small step towards latex3 from latex 2.09
3

@DavidCarlisle 25 years ago?

@FaheemMitha yes

4:42 PM
Well, if it's been around so long, it should have some documentation.
I tried texdoc expl.
I'm really hoping that's not supposed to be the documentation.

@FaheemMitha try texdoc interface3

@UlrikeFischer Ok.

@FaheemMitha also that's the documentation for expl3 which was a refactoring of (some of) the latex3 code (can't remember when, 2000-and something) to work as a package in latex2e (and be more robust and usable) documentation of the earlier latex3 work is available in various papers on the project website, but it was never released for general use.

@DavidCarlisle Been following the PDF resource mails?

@JosephWright yes

4:53 PM
@DavidCarlisle Enjoying?

@JosephWright in parts:-)

@DavidCarlisle which parts? ;-)

@UlrikeFischer see mail..

5:14 PM
Looks like \l_tmpa_tl is just a temporary variable, right? If so, what's with the wacky name? I found some discussion of temporary variable name conventions, but what's wrong with x, for example?

@FaheemMitha Well \l_tmpa_tl tells us it's local scope, a token list and is a scratch variable

@JosephWright Going from left to right?
And these are generally used conventions?
But \x would work?

@FaheemMitha Of course it would work
@FaheemMitha \<scope>_<name>_<type>
@FaheemMitha Most of the time, the name should be split up: \<scope>_<module>_<name>_<type>, but for a small number of very common cases we have shortened names

@FaheemMitha This is the variable name for a person who writes code only for themselves. :)

@FaheemMitha What \x doesn't allow is checking: we have 'sanity' code for programmers to check that they don't do e.g. \tl_set:Nn \g_tmpa_tl - local setting of a global variable

5:21 PM
@JosephWright I see.
@JosephWright So l is local scipe, tl is token list, and tmpa is scratch?

\documentclass{article}
\usepackage[check-declarations]{expl3}
\begin{document}

\ExplSyntaxOn
\tl_gset:Nn \l_tmpa_tl { foo }
\ExplSyntaxOff

\end{document}

So this to tell people what the variable is being used for?

@FaheemMitha look at common "normal" latex code, it used to be that packages would all use \@tempa as a local scratch variable and everything seemed to work until users combined different packages in interesting ways and they over-wrote each other, now most packages use \mypackage@temp or some such, the l3 module system is just a formalisation of that idea.

@DavidCarlisle Hmm. So a sort of substitute for conventional scoping?
I guess actually TeX can't have a notion of scoping, but I never thought about it.

@FaheemMitha Yes: scope is l/g/c (constant), type more varied but e.g. tl (token list), int (integer), dim (dimen), fp (floating point)

5:28 PM
@FaheemMitha the module bit is a substitute for scoping and the _tl bit is a substitute for typing

@FaheemMitha You mess up the save stack if you global/local set things repeatedly: one or the other for any given csname

@DavidCarlisle I don't see a module here.

see joseph's comment above, the general form is \<scope>_<module>_<name>_<type> but some have been omitted there

As in this case?

@FaheemMitha Well like I said \l_tmpa_tl is non-standard; a more typical one might be \l_siunitx_unit_font_tl

5:34 PM
@JosephWright Oh

6:18 PM
So:
 \tl_replace_all:Nnn \l_tmpa_tl { ~ } { \c_space_tl }
replaces actual spaces with a token which "represents" a space in some fashion?
Similar to \space?
So, \def\space{ }

@FaheemMitha yes, \c_space_tl is \space and ~ is a space token, like 

6:42 PM
@DavidCarlisle Ok.
I guess the really big question is whether this gives better messages than the usual LaTeX ones. Because those are terrible/useless.

7:15 PM
@FaheemMitha not related to messages really. Messages in newer packages can be more informative as there are rather more bytes available. latex2e+amsmath only just had enough space to make a document really couldn't spare any more bytes on error reporting.
@FaheemMitha actually tex's error reporting is pretty useful, people just use it incorrectly, or use "tex editors" that do not show the full message, just a mangled summary.

7:31 PM
Hey so I have this app idea... #devhumor #devlife http://bit.ly/2KMNLYa

@PauloCereda Very appropos.

@AlanMunn :)

@PauloCereda Apropos app, did you have a chance to tackle this API thingy?

@PauloCereda oh dear, we have "functions" and "subroutines" are we behind the times?

@TeXnician I have news, actually. :) Sorry, I've been drowning with activities lately...
@DavidCarlisle and coroutines

7:36 PM
@PauloCereda too modern

@DavidCarlisle Fortran's column mode :)

@PauloCereda Ooh :) Don't hurry, I'm just pondering what step to tackle next…

Speaking of which, Fortran humour: GOD is real, unless declared integer.

@PauloCereda I suppose I have only heard that one a countable number of times

The funny part is that variables starting with G, O and D are defaulted to real.
@DavidCarlisle ooh would it be an enumerable set?
@TeXnician Gimme chocolate. :)

7:39 PM
@PauloCereda surely everybody knows that! (actually it's only true if you opt in to f77 compatibility I thnk)

@PauloCereda This is as bad as the semantics joke: What's the meaning of life? life'

@DavidCarlisle bah who needs Fortran 90
@AlanMunn ooh

@PauloCereda no one, they all need fortran 20x

@PauloCereda I'm not sure that is feasible. After easter I am glad that I have run out of chocolate today :D

@DavidCarlisle sold by NAG :)
@TeXnician ooh we could ask our resident rabbit
@Skillmon hi mr. rabbit, got any chocolates?

7:41 PM
@PauloCereda currently our compiler is 2008 nag.co.uk/nag-compiler

@PauloCereda Hmm, rabbit with chocolate, I'm not quite sure what @DavidCarlisle will make out of this ;)

@DavidCarlisle ooh
@TeXnician oh no
Cleaner code = fewer mistakes
@DavidCarlisle ^^ you wrote that line, didn't you? :)
Inspired by xii.tex

@PauloCereda I have heard that in university as well and then we have been required to write C code, so I guess it was meant as a joke :D

@TeXnician LOL
Today we will talk about pointers

@TeXnician I think that's called conejo en mole. :)

7:45 PM
@AlanMunn ooh el conejo es muy rápido

@PauloCereda El conejo en mole, no

@AlanMunn oh

@FaheemMitha Yes, a lot of effort has gone into messages