« first day (1108 days earlier)      last day (3826 days later) » 

12:00 AM
@egreg Oh my!
@cmhughes: Chris, things are getting serious! See the TeX gods in action. :)
 
@PauloCereda Also yours builds a loooong list of nested \int_eval:n calls
 
@PauloCereda I've got my popcorn ready :)
 
@egreg Hey I'm a humble TCS guy. :)
I have no idea of what I did, apart from the syntactic nesting. :)
 
@egreg yes I wondered about that but the non tail recursive version allows expressions as wide as the page, and the code looks (and is) shorter.
 
@PauloCereda Here's a version which is free from the defect:
\documentclass{article}
\usepackage{xparse}

\ExplSyntaxOn

\cs_new:Npn \paulo_epicrecursion:nn #1 #2
  {
   #1^{
     \int_compare:nTF { #2 > 1 }
      { \paulo_epicrecursion:nx { #1 } { \int_eval:n { #2 - 1 } } }
      { #1 }
   }
 }

\NewDocumentCommand{ \powertower } { m m }
 {
  \paulo_epicrecursion:nn { #1 } { #2 }
 }
\cs_generate_variant:Nn \paulo_epicrecursion:nn { nx }

\ExplSyntaxOff

\begin{document}

$\powertower{x}{10}$

\end{document}
 
12:04 AM
@egreg Would you like to post an answer? I don't feel comfortable in adding your code to my answer. :)
 
@PauloCereda If you add \tl_show:n { #2 } just before #1^ in the body of the definition, you can see what's passed as #2
 
@egreg Oh. Why one line has :nn and the other has :nx?
 
The trick is to fully expand the second argument.
 
@PauloCereda "London bridge " not "The London bridge " (just because), you'd have to get our resident linguists to explain why it's London Bridge with no "the" named after "The Tower of London" which has "The".
 
@PauloCereda Notice the generated variant. The first call doesn't need the full expansion, but the recursive ones do.
 
12:07 AM
@egreg Ah I see. Will you post an answer or should I update mine? :)
@DavidCarlisle oopsie, my bad. :)
 
@DavidCarlisle The same as "Oxford University" and "the University of Oxford", I guess.
@PauloCereda It's just optimization.
 
@egreg yes but I don't understand English:-)
 
@PauloCereda Actually the inversion of arguments would be better (fully expanded arguments should come first, according to the guidelines).
 
@egreg Oh.
 
@PauloCereda I had my solution. ;-)
 
12:22 AM
@egreg Very nice! :) I was quite curious how to deal with the group thingy. :)
@egreg: in other news, beware of David, apparently he's practicing his Italian: tex.stackexchange.com/questions/144446/…
 
@PauloCereda ^\bgroup x\egroup is legal.
 
@egreg I had no idea. :)
 
@PauloCereda You never studied how ' for ^{\prime} and '' for ^{\prime\prime} works. :P
 
@egreg Nope. :P
@egreg: by the way, tomorrow I'll be in São Paulo. :) I'll miss you guys. :)
 
@PauloCereda I added a picture of \powertower{x}{254} which is the maximum without changing the internal parameters.
 
12:35 AM
@egreg OH MY.
 
@PauloCereda Actually it's 253, but don't tell anybody.
 
@egreg :)
 
@PauloCereda With lualatex it's possible to do \powertower{x}{499}; at 500 the semantic nest size is overflown.
 
@egreg With the same code?
 
@PauloCereda Yes.
 
12:41 AM
@egreg Wow.
 
@PauloCereda Have a nice Pokémon tomorrow.
 
@egreg It's the only time I have to play. :) Not during classes though. :)
I'll try to go online for some minutes tomorrow. :)
 
@egreg, Not all solutions have the same limitation as your feeble attempt, picture mode strikes again:
\documentclass{article}


\begin{document}


\tiny
\hspace*{-2in}\begin{picture}(0,500)
\put(0,0){$x$}
\multiput(4,5)(4,3){500}{$\scriptscriptstyle x$}
\end{picture}
\end{document}
 
@DavidCarlisle :)
 
@egreg power tower wars. :)
 
12:49 AM
@PauloCereda The elegance of the \prg_replicate:nn solution is undisputable.
 
@egreg It's very clever. :) One for opening the sequence, the other for closing it. :)
 
 
7 hours later…
7:27 AM
How to make the following code work?
\documentclass[preview,border=12pt]{standalone}
\usepackage{pgffor}
\begin{document}
$\foreach \x in {1,...,3}{x^\{}x\foreach \x in {1,...,3}{\}}$
\end{document}
 
@Marienplatz The code works. What do you want to achieve?
 
@MarcoDaniel The math must be rendered as $x^{x^{x^{x}}}$
 
8:19 AM
@Marienplatz The following can be simplified but it shows the concept.
\documentclass[preview,border=12pt,varwidth]{standalone}
\usepackage{pgffor}
\usepackage{xparse}
\newcommand\XOR{\mathbin{\char`\^}}
\begin{document}
$\foreach \x in {1,...,3}{x\XOR\{}x\foreach \x in {1,...,3}{{\}}}$

\ExplSyntaxOn
\tl_set:Nn \g_tmpa_tl {}

\foreach \x in {1,...,3}
 {
   \tl_gput_right:Nn \g_tmpa_tl { x ^\bgroup }
 }
   \tl_gput_right:Nn \g_tmpa_tl { x }
\foreach \x in {1,...,3}
 {
   \tl_gput_right:Nn \g_tmpa_tl { \egroup }
 }
$\tl_use:N \g_tmpa_tl $
\ExplSyntaxOff
\end{document}
 
@MarcoDaniel OK. Thank you for the nice code!
 
@MarcoDaniel still suffers from the same problem a egreg's version unlike my picture mode version above:-)
 
@DavidCarlisle There is a similar issue?
 
@MarcoDaniel When doing $x^{x^{x^{x^x}}}$, before TeX sees the first { it has opened four groups (one for the math formula); there's a limit of 255 group depth.
 
8:38 AM
@egreg Indeed.
But who needs 255 groups ;-)
@JosephWright: The video of Arthur Reutenauer has no slides :-( vimeo.com/79040764
 
9:05 AM
@MarcoDaniel No, there were none to add
@MarcoDaniel He did a live demo and I can't really reproduce those
 
@JosephWright Well, this is really difficult.
Thanks
 
@MarcoDaniel I have a similar issue with Simon Dales talk, but he had a load of 'ready to go' TeX files I'll use as slides
@MarcoDaniel I'll look another year to get a splitter for the video feed, then I'll be able to grab there. More complex for the recording, though.
 
@JosephWright You need an award for your effort.
 
@MarcoDaniel :-)
@MarcoDaniel I hope the recordings are useful
I'm about halfway through the fifth recording, which does have slides but lots of them!
 
@JosephWright Yeah next video ;-)
 
9:28 AM
@MarcoDaniel my picture mode version can do 1000 or more :-)
@JosephWright a live demo in vim :(
@PauloCereda ^^^^
 
 
2 hours later…
11:26 AM
@egreg: Do you have the same issue?
1
Q: TexLive installation unable to find system fonts in OSX Mavericks

Peter SalazarIt seems my TeX system on OSX Mavericks is no longer able to find my system fonts. My tex documents no longer compile, and when I do: $ xetex opentype-info.tex I get: This is XeTeX, Version 3.1415926-2.5-0.9999.3 (TeX Live 2013) restricted \write18 enabled. entering extended mode (/usr/loca...

 
Anyone prepared a showcase "question no. 50,000"? @egreg? ;-)
4
 
12:16 PM
@MarcoDaniel Yes, if the font is not installed in the system fonts. See my comment.
 
 
1 hour later…
1:19 PM
most well deserved badge ever?
@lockstep no
 
 
4 hours later…
5:53 PM
Huh, no one has answered my silly, spur of the moment question
8
Q: How do I put a die roll at the top of each page?

CanageekI was thinking about a trick I heard of in old RPG books and wondered how you would do it in LaTeX. So it used to be hard to find RPG dice in stores (That is, dice with 4, 6, 8, 10, 12 and 20 sides. Note that all of these but the d10 are platonic solids), so that one book put a series of dice at...

Also! Whoohooo! It only took a massive bribe, but I finally got an answer to my question on Boardgames.SX
7
Q: What edition of Empire Builder do I have?

CanageekMy family has an old edition of Empire Builder by Mayfair games, and the box I have isn't listed on Boardgame Geek's edition list. I found an image of the box on that site. It is pre-fourth edition, as it doesn't have Mexico in it, and very little of Canada. The rulebook lists a copyright of 19...

 
6:25 PM
>50,000… crazy
 
 
2 hours later…
8:42 PM
@egreg's trying to steal my tick before I've even got it now:-)
 
@DavidCarlisle I'm surprised you didn't propose a simple \ialign.
But, of course, U+0301 is better.
 
8:59 PM
I wonder if tex.stackexchange.com/questions/144647/… (or very similar) has been asked before, does anyone know of a duplicate?
 
@egreg well I was trying just to correct the coding starting from where it was:-)
 
Does anyone have suggestions for a serif font other than CM that goes well with the default sans-serif font?
 
9:18 PM
@DavidCarlisle That code was hopeless.
 
Fifth video being uploaded to Vimeo, and I've got a post on the UK-TUG website including video links and photos: uk.tug.org/2013/11/12/…
 
9:32 PM
@egreg ah so cruel
 
hhh
$$f(x_1,\cdots, x_j,\cdots,x_n)_{x_j=h}=\{ h \alpha_{J^{-k}} \prod x_j | J\in\mathcal J, j\in J, j\neq h \ | J\in\mathcal J, j\not \in J, h=1\}$$
How would you rewrite this nicely?
 
9:49 PM
\[
  f(x_1,\cdots, x_j,\cdots,x_n)_{x_j=h}=
  \bigl\{{\textstyle h \alpha_{J^{-k}} \prod x_j \bigm| J\in\mathcal J, j\in J, j\neq h \bigm| J\in\mathcal J, j\not \in J, h=1 \bigr\}
\]
@hhh just I'm not sure what are two vertical bars supposed to mean in a set declaration
 
hhh
This better?
I think it is.
@tohecz I meant the above thing with the vertical bars.
$$f(x_1,\cdots, h,\cdots,x_n)=
\begin{cases}
h \alpha_{J^{-k}} \prod x_j & J\in\mathcal J, \; j\in J, \; j\neq h \\
\alpha_{J} \prod x_j & J\in\mathcal J, \; j\not \in J
\end{cases}$$
I think this is now enough readable, better than the first one with a long long line...
 
@hhh oh you mean it this way, then the first one is completely non-sense.
 
10:36 PM
@hhh Don't use $$ in LaTeX. Never ever.
 
hhh
10:49 PM
?
What is the symbol for set union without the set-intersection?
 
11:00 PM
@egreg do you know a canonical answer for [ in array/tabular? search failed me for once:-)
 
@DavidCarlisle There should be one. ;-)
13
Q: "[" as first character in table row

Mq_Whenever I try to compile a table that has a "[" as first character in a row it gives me the error: Missing number, treated as zero. Illegal unit of measure Example: \begin{table}[htb] \centering \begin{tabular}{r|r} [some text ] & ... \\ [some more text ] & ... \e...

 
@egreg thanks
 
@DavidCarlisle However the answers there are bad
 
@egreg ah:-)
@egreg how did you find that I couldn't search for [ I think?
 
@DavidCarlisle bracket array eqnarray
 
11:06 PM
@egreg oh words!
@egreg oh it'll do it is clearly a duplicate question, we could always answer the old question if need be
 
@DavidCarlisle Done.
 
@egreg voted (I suppose you'll get a necromancer shortly:-)
 
@DavidCarlisle Using braces works in most cases, but can have adverse effects in array; on the other hand, \relax has no problem whatsoever. Or can you think of one?
 
@egreg short of cheating with redefinitions of \relax seems about right
 
hhh
11:29 PM
@egreg Can you explain in one sentence in layman words, why not $$x_1$$? I haven't yet understood "why not" hence using all time and my document gets compiled nicely with them...
 
169
Q: Why is \[ ... \] preferable to $$ ... $$?

Ben AlpertI've heard that you should use \[ ... \] for displayed equations instead of $$ ... $$, but why is that? I'd assumed that it's so that you can more easily tell which are starting and which are ending delimiters, but if I always use a syntax-highlighting text editor, I can see that easily based o...

 
hhh
...too long to read, in one sentence?
 
@hhh add [fleqn] and nothing happens, and something would happen if you used supported syntax
 
hhh
?
What is [fleqn]?
 
@hhh try reading the linked answers, why ask us to type them in again?
 
hhh
11:32 PM
Because I tried to read it once once once but never got it.
 
@hhh \documentclass[fleqn]{article} compare $$a=b$$ and \[a=b\]
 
hhh
@DavidCarlisle So what? https://www.writelatex.com/501552dtzczd

$$a=b$$ makes things nicely to the center.
[a=b] not doing it.
 
@hhh perhaps you don't use fleqn but the underlying issue is that unlike any command name which latex can redefine as required $$ is fairly unique in TeX as there is basically no way to avoid using that sequence, there is no primitive control sequence that starts display math. So $$ is not supported in latex because it can't be redefined to fit optionally specified behaviour, but conversely it sort of half works, simply because it can not be undefined
@hhh incorrectly to the center as you have specified flush left equations
 
hhh
Still, I cannot understand the demoralizing the use of $$..$$. I have used for a long time due to its simplicity.
 
@hhh Do as you like. But if two LaTeX users with 25+ year experience tell you not to, probably they have a reason.
 
11:39 PM
@hhh It's wrong. It is not mentioned anywhere in any official latex documentation.
 
hhh
If I need one day change my behaviour, it is just a simple SED command looping over the files. Now I adhere to one syntax until I understand "why not" -- I haven't yet understood the reason -- perhaps one day I understand why to use [fleqn], why to use it anyway?
If $$..$$ was really bad, why it is not banned in the distribution, why does it get compiled? I cannot understand...
Good night!
 
@hhh Latex is designed so that teh same document markup can be restyled without) having to run an editor over the source, a journal style may require flush left rather than centred equations, if the document is correctly marked up then just specifying the class makes things work, if there is incorrect document markup the latex style mechanism breaks.
@hhh as I said above it only works because it is virtually impossible to stop it doing what it does, you can undefine a command with \let\foo\undefined but you can not redefine $$
@hhh It's not bad it just isn't LaTeX.
 

« first day (1108 days earlier)      last day (3826 days later) »