« first day (1330 days earlier)      last day (3610 days later) » 

12:10 AM
@egreg: this weekend's gospel: timere multis passeribus pluris estis :)
 
ah as always, as soon as you ask you figure it out yourself xD
 
 
7 hours later…
7:10 AM
@PauloCereda Here :)
 
 
3 hours later…
9:40 AM
@PauloCereda He could have mentioned ducks instead of sparrows.
 
@tohecz It's a cricketeer duck. :)
@egreg It would be awesome. :)
 
 
2 hours later…
11:35 AM
@JosephWright This question has been closed too fast, and furthermore, the chosen duplicate has an incorrect answer with more votes than the correct answer. If it is to be closed as a duplicate it should be to the question I linked to in my comment, but given that the OP has the Script specified in his preamble, there may be something else going on here.
 
@AlanMunn Have reopened
 
 
1 hour later…
1:03 PM
@JosephWright Thanks. I think the problem is actually some incompatibility that now exists between polyglossia and bidi. bidi expects \if@Latin to be set to true for latin scripts, but polyglossia does something else.
 
@Alan: Portugal or US? :)
 
@PauloCereda Too simple ;-)
 
@MarcoDaniel :)
 
1:19 PM
@PauloCereda That's a tough one.
Expansion woes (I think):
\documentclass{article}
\usepackage{amsmath}
\usepackage{polyglossia}
\setmainlanguage{english}
\setotherlanguage{farsi}
\newfontfamily\farsifont[Script=Arabic]{Scheherazade}
\makeatletter
% why doesn't this work?
%\def\maketag@@@#1{\hbox{\m@th\normalfont\iftoggle{\languagename@latin}{}{\beginR}#1\iftoggle{\languagename@latin}{}{\endR}}}
\makeatother

\begin{document}
\begin{farsi}
\iftoggle{\languagename@latin}{Yes}{No}
\end{farsi}

\begin{english}
\iftoggle{\languagename@latin}{Yes}{No}
\begin{equation}
Why does the \iftoggle macro work fine in the main document, but not if I try to use it in the redefinition of the \maketag@@@ macro?
 
1:41 PM
@AlanMunn \languagename@latin has no definition.
 
@egreg You mean when the \def is executed?
@egreg It is defined in the two \iftoggle commands in the main document.
 
@AlanMunn You should use \iftoggle{\languagename @latin}, note the space
@AlanMunn In the definition, @ is a letter, so \languagename@latin is interpreted as one token, in the body of the document it is seven tokens: \languagename•@•l•a•t•i•n
 
@egreg Ah, ok. I thought about that, and then forgot to try it. Thanks!
@egreg So now how to convince Vafa that he should use this version in all his bidi stuff. (Even you can't answer that, I bet. ;-) )
 
@AlanMunn No, I can't. :(
 
1:57 PM
@egreg But the problem is trickier than just this it seems, because polyglossia defines the direction/script associated with a language, but the text in the equation number is not in the RTL language (but it could be.) So my fix works if the main language is English, but not if the equation is embedded within a Farsi environment.
 
@AlanMunn That should indeed be bidi's job.
 
2:10 PM
3
Q: How do i implement a string buffer in TeX?

FK82I've recently learned how to create a macro to iterate over a token sequence using \afterassignment and \let in TeX. Currently, I'm trying to apply this to a tokenization macro (where "tokenization" means splitting a character sequence around a delimiting character/ character-sequence); i.e. an...

@egreg I was worried you'd get in before me :-)
 
@JosephWright I love the part you say there is no string. :)
 
@PauloCereda Well it's true
 
@JosephWright I saw your comment.
 
@PauloCereda The nearest we get is from something like \meaning or \detokenize
@egreg Ah
 
@JosephWright I know. :) That's why I think it's great; people coming from other background tries to bring stuff to a common denominator (usually wrong). :)
 
2:12 PM
@PauloCereda Normally I let these things go but I have a feeling in this question the OP is going to get into real trouble not understanding what 'tokenization' means in a TeX context
 
@JosephWright My thoughts exactly.
@JosephWright: tex.stackexchange.com/questions/186013/… There you go again. :)
 
@PauloCereda Commented on
 
@JosephWright Great comment. :)
 
3:09 PM
@egreg This polyglossia / bidi problem is really strange: the problem doesn't arise if the main language is set to the RTL language and the other language is set to English. But if the main language is set to English and the other language set to the RTL language, the problem recurs.
 
3:52 PM
Yay! I can generate a 5.5MB valid HTML file with DocScape now :-)
 
@StephanLehmke Yay!
@Stephan: just don't say it too loudly, @David might want the royalties now. :)
 
It's only the basic document structure and content for now, with the vague goal of preserving the look of the PDF. The real work can begin now :-)
 
@StephanLehmke Let the trainée suffer now. :)
@StephanLehmke ooh das ist sehr gut!
Impressive!
 
@PauloCereda We don't have have a trainée who can code TeX ;-)
Also, the real work probably involves bending the intent of HTML a bit, so it's better left to the professionals ;-)
 
@StephanLehmke :)
You know, this could become an interesting blog post. /wink wink
@StephanLehmke: OpenSuSE? :)
 
4:02 PM
@PauloCereda Unfortunately, I've got someone on my heels who likes to pass off my ideas as his own, so I've become reluctant to tell too much.
@PauloCereda I don't get the reference...
 
@StephanLehmke Ah indeed, no worries. :)
 
@StephanLehmke Oh no
 
@StephanLehmke I noted you use Linux, I thought it was OpenSuSE (I sense KDE).
 
@PauloCereda Have a lot of fun
 
@PauloCereda No, XUbuntu. But I'm no enthusiast either way. In fact, I think I liked Ubuntu as it was around 2008 most.
 
4:04 PM
@JosephWright LOL I see what you did there. :)
@StephanLehmke :)
I think @cgnieder uses OpenSuSE. :)
 
@StephanLehmke I am surrounded by guys who are thinking LaTeX is something to wear.
 
@MarcoDaniel Probably they tried to find out about it using google :-)
 
@MarcoDaniel You naughty boy.
Tell them you use LaTeX everyday. It's quite of a pain in the beginning, but you get used to it.
3
:)
 
4:22 PM
@PauloCereda Yeah berate me ;-)
 
@PauloCereda I need a south American tax haven to channel the funds through, can you set something up?
 
@DavidCarlisle It's quite complicated in Brazil. :)
 
@PauloCereda That's the idea I believe make the trail hard to follow.
2
Now I've got to write some XSLT to parse Will's TeX :(
 
@DavidCarlisle o.O
 
@PauloCereda yes, I'm stuck since suse 9.3 I think...
 
4:31 PM
@cgnieder Wow. :) Well, I'm stuck with Fedora since Red Hat 8. :P
 
@PauloCereda :)
 
 
3 hours later…
7:17 PM
@PauloCereda My favorite concert for sledgehammer and orchestra is being played.
The problem is that they have to buy a new piano after each performance.
 
@JosephWright UEA on TV :-)
 
@egreg :)
 
7:39 PM
@PauloCereda And the performer was Ivo Pogorelić, a well known sledgehammerist.
 
Hello from Prague.
 
@tohecz You're a fast runner! ;-)
 
@egreg more importantly, I'm happy to be back at home ;)
 
8:26 PM
Hi folks, is there a macro that is already defined to encapsulate \hphantom{{}-{}} out of the box?
 
@FifaEarthCup2014 not as far as I know (the {} {} aren't needed by the way
 
@DavidCarlisle Lets consider the following code first.
$\!
\begin{aligned}[t]
p(x) - q(x)
&= (3x^2 +4x -1) - (x^2 +3x +7)\\
&= \!
\begin{alignedat}[t]{3}
	&\hphantom{{}-{}}3x^2 &&+4x &&-1 \\
	&-x^2 &&-3x &&-7
\end{alignedat}\\
&= 2x^2 +x -8
\end{aligned}
$
 
@FifaEarthCup2014 and? \phantom{-} would be the same wouldn't it?
 
@DavidCarlisle I will check it now.
 
@DavidCarlisle ?
 
8:32 PM
@FifaEarthCup2014 don't check: have faith:-)
 
@DavidCarlisle They are different.
 
@JosephWright antiques road show was just starting from Norwich, your stomping ground?
 
@DavidCarlisle Ah
 
@FifaEarthCup2014 i suppose you want me to actually try rather than work from first principles? (I was never that keen on experimental science:-)
 
@DavidCarlisle :-) I am learning to be a best practitioner. :-)
 
8:41 PM
@DavidCarlisle That makes two of us. :)
 
@FifaEarthCup2014 well never believe what you hear on the internet I was talking nonsense, for some reason I thought you were adding the {} to stop it being a mathbin, but you were (correctly:-) doing the opposite:-)
 
@DavidCarlisle &-x makes - a binary op so I need {}-{} to get a binary op.
 
@FifaEarthCup2014 yes sure, I know that really when my brain is engaged:-)
 
@DavidCarlisle: More precisely only after 1, 3, 5, ... th ampersands the minus sign followed by characters becomes a binary op.
I got this theorem by inspection.
 
@FifaEarthCup2014 There is an implicit {} at the beginning of the even numbered columns.
You can neutralize it with \mathopen{}
 
8:53 PM
@egreg OK. Thanks. Nice info.
 
9:05 PM
@tohecz: Tom! :)
 
@PauloCereda hi boy duck! :) How're you? Far enough from the crowds?
 
@tohecz Hey! :) So far, I managed to stay away from crowds. :)
@tohecz: don't deny, this duck picture is epic. :) It has everything: a hat, a cricket bat and it's a duck. :)
 
@PauloCereda lol :)
 
9:21 PM
Hi folks, Is it possible to increase the gap between two consecutive items as shown in the following screenshot?
Code snippet is given as follows.
\documentclass[preview,border=12pt]{standalone}
\usepackage{mathtools}
\newcommand\hiddenplus{\hphantom{{}-{}}}


\begin{document}

Consider the following examples.
\begin{enumerate}
\item
$\!
\begin{aligned}[t]
p(x) + q(x)
&= (3x^2 +4x -1) + (x^2 +3x +7)\\
&= \!
\begin{alignedat}[t]{3}
	&\hiddenplus 3x^2 &&+4x &&-1 \\
	&+x^2 						&&+3x &&+7
\end{alignedat}\\
&= 4x^2 +7x +6
\end{aligned}
$
\medskip

\item
$\!
\begin{aligned}[t]
p(x) + q(x)
&= (4x^3 +5x^2 -7x +3) + (x^3 -2x^2 +x -6)\\
&= \!
\begin{alignedat}[t]{4}
 
@FifaEarthCup2014 see enumitem ? Without that, what you seek for is \itemsep: \setlength{\itemsep}{2ex plus 0.5ex}
 
I don't want to invoke \medskip for every item that wastes time and energy.
@tohecz OK. I will make a try now.
 
@FifaEarthCup2014 that's not the important thing; the important thing is that such approach is wrong.
 
@tohecz What is the correct approach?
 
@FifaEarthCup2014 well, to modify the default spacing; not to use \medskip
 
9:26 PM
@tohecz It is what I am looking for. :D
 
@FifaEarthCup2014 I know :)
I would recommend enumitem, it's a bit tough at the beginning, but a great tool in the end (I build all lists in my journal's article class using this package).
 
@tohecz \setlength{\itemsep}{2ex plus 0.5ex} does not work.
 
@FifaEarthCup2014 I think it would have to go after \begin{itemize}. But really, go for the package, it's out there for that.
 
@tohecz Done. Thanks.
 
@egreg 39 seconds :(
\documentclass{article}
\newcounter{myRow}
\newcounter{myCol}[myRow]
\setcounter{myRow}{1}
\setcounter{myCol}{1}
\makeatletter
\newcommand{\testcell}{%
\fbox{\themyRow, \themyCol}%
\ifnum\value{myCol}<3
\expandafter\@firstoftwo
\else
\expandafter\@secondoftwo
\fi
{&}{\refstepcounter{myRow}\tabularnewline}%
\refstepcounter{myCol}%
}

\newcommand{\testcelltwo}{%
\fbox{\themyRow, \themyCol}%
\ifnum\value{myCol}<3
% &% (This is the only difference to \testcell)
\else
\refstepcounter{myRow}%
\tabularnewline
 
9:32 PM
I had a couple of issues with the counters. ;-)
 
 
1 hour later…
10:45 PM
Go Portugal!
:)
 
11:42 PM
@egreg: Am I reinventing the wheel for the following case?
\documentclass[preview,border=12pt,varwidth]{standalone}
\usepackage{mathtools}

\newcommand\coe[3][x]{
	\left[ #1^{#2} \right]\!\!
	\left\{ #3 \right\}
}

\begin{document}
\abovedisplayskip=0pt\relax % this line will not be used in the production

$
\!
\begin{aligned}
\coe{2}{ax^2 +bx +c} &= a\\
\coe{3}{(ax^2 +bx +c)(dx^2 +ex +f)} &= ae +bd
\end{aligned}
$

\end{document}
In other words, is there such an operator defined in LaTeX out of the box?
 

« first day (1330 days earlier)      last day (3610 days later) »