« first day (527 days earlier)      last day (4399 days later) » 

12:50 AM
6
Q: Lua function to see if a macro is defined or not

UiyI need to determine if a TeX macro is already defined or not via a Lua function. Any ideas? function IsTeXMacroDefined(macroname) if defined(macroname) then return true end return false end

I guess it's easier with TeX than Lua. :(
 
1:05 AM
Friends, I'm going to São Paulo today. You guys behave. :)
 
 
1 hour later…
2:24 AM
Is it ok to add an answer to a several year old question, with 2 30+ upvoted answers, one accepted, that work, if I feel they are incomplete?
0
A: Remove ugly borders around clickable crossreferences and hyperlinks

CanageekWell, I see there are a lot of answers already, and they work, however I thought I'd give more detail: As above, you can use \usepackage[hidelinks=true]{hyperref} or \hypersetup{hidelinks=true} However, if your problem is with the ugly green boarder there are very nice ways to remove tha...

 
 
1 hour later…
3:45 AM
@Canageek Obviously, yes. If someone asks the same question now, they will be referred to that old one, so the answers should be as current and complete as possible. There are a couple of badges to honor exactly this sort of thing.
 
3:58 AM
@StephanLehmke Ok, good. Normally I wouldn't think twice about it, but given that there are multiple 30+ upvote questions.
I'd like someone to go over over the other new answer though; Something about that strikes me as very wrong, but I don't want to downvote it without being sure it is not ok
 
4:40 AM
@Canageek See? Bringing the question "up" again can event trigger additional new, useful, current answers.
 
@StephanLehmke Good point
 
4:58 AM
@Canageek you mean the one by Ben Lerner? Could you explain what strikes you as wrong about it?
 
 
2 hours later…
6:30 AM
@DavidCarlisle I hereby invoke l'esprit d'escalier. My response to the fact that Tesco's can't spell doughnut consistently (let alone correctly): That's more reasons to shop at Morrisons.
 
 
2 hours later…
8:18 AM
@egreg actually it looks like the family will be out on Wednesday so I can be online anytime from around 6 (17:00GMT) til late if 1800GMT is not a good time?
@PauloCereda since you are out f or the day (pinging you on the reply to egreg above:-)
 
user19161
8:51 AM
@AlanMunn Removing or reversing the direction of a vote is limited to 5 min. After the post is edited, one can also remove or reverse his vote. For completeness.
 
user19161
@AndrewStacey What, this is new to me!
 
@JasperLoy Sadly, my paper: "An investigation into the genus of popular foods" got rejected by the arXiv. Maybe I shouldn't have uploaded it on Palm Sunday.
 
9:14 AM
@DavidCarlisle Don't change your plans for me.
 
I don't have a plan:-) Anyway I'll be around from 6 (here) til late, but since you said you are planning to ask awkward questions, I hope your train is late and you miss the interview:-)
 
 
2 hours later…
11:14 AM
0
Q: Call mathjax in xsl

swaroop nayakHow to call a mathjax in XSL, I have XML file and stylesheet(XSL). The xml file contains TEX equations, how to view the tex equations in IE through XSL. Please guide.

Just made my very first vote to close... I should probably have left a comment on the off-topicness, but I feel unsure what to say...
 
11:30 AM
@StephanLehmke It's clearly off-topic.
 
11:47 AM
@StephanLehmke Definitely off-topic (I've just cast the final vote). We have a list of "text building blocks" on meta for occasions where you can't think what to say. They aren't meant to be used as "You must use these" but rather in this situation where you can't think what is right. It's better to use one of those than to not say anything.
47
Q: Text building blocks

CaramdirThere are some replies that are used quite often. For example, the first reply to many questions is a demand for a minimal example. These replies should typically include a link with additional information. So I thought that it might be useful to collect some standard replies for quick copy&p...

 
@AndrewStacey This is great! I could have used the MWE comment several times before, but just try to search for "MWE" on the main site hoping to find a nice comment to copy from :-)
 
@egreg (since you're here) is there an easy way to iterate over words in a sentence? In truth, I'm iterating over letters using a parser-type macro that repeatedly calls itself until it reaches a STOP macro, but it ignores spaces as they get eaten up by the space-eater. Is there a "standard" way to do this? \@ifnextchar ignores spaces, I think.
 
I've made a bookmark to the meta post and will make frequent use of it :-)
 
@StephanLehmke Good! It's certainly helped me on many occasions, and sometimes just knowing that it is there spurs me to write a comment where I wouldn't have done so otherwise. If you have any improvements, or new suggestions, either edit them in (if you think they're uncontroversial) or mention them for discussion.
(Mind you, it's just occurred to me that a nasty piece of work could subtly alter those blocks to change the tone of this site and maybe no-one would notice for quite some time!)
 
Great idea for an april fools. Just wait till next year ;-)
 
12:00 PM
@AndrewStacey: You could just use a delimited macro for the sentence parsing?
\def\sentenceparse#1{\sentparse#1 \relax\STOP}\def\sentparse#1 #2\STOP{\ifx#2\relax#1\else #1 and #2\sentparse#2\STOP}
 
@AndrewStacey Yes, it ignore spaces. I'd iterate with \seq_set_split:Nnn, splitting at spaces; then one can reinsert them. When you then use \seq_map_inline you can do whatever you want to each word.
 
I missed a \fi by the way
 
\NewDocumentCommand{\sentparse}{m}
 {\seq_set_split:Nnn \l_andrew_sentence_seq {~}{#1}
  \seq_map_inline:Nn \l_andrew_sentence_seq { \andrew_do:n {##1} }
 }
Then one needs to know what \andred_do:n is supposed to do.
 
@egreg Most likely, eat a doughnut for each word ...
 
@AndrewStacey \cs_new:Npn \andrew_do:n #1 {Eat doughnut #1~}
 
12:13 PM
Yay! Thanks, both of you. Have a virtual do[ugh]nut.
 
I need to look into LaTeX3 one of these days, looks cool :)
 
@RoelofSpijker I'm slowly converging on it, but it's a slow process.
 
I wonder what all this looks like while tracing... Usually with LaTeX you're so lost in syntactic sugar you can't find the real execution.
 
Oh, bother. That's too small to read.
 
@AndrewStacey You can admire it in all its beauty by clicking on it :-)
 
12:22 PM
user image
5
There we go, a bit of line-breaking never hurt anyone.
 
@AndrewStacey The text says all. :)
 
12:40 PM
@AndrewStacey: Did you forget a space between "even" and "with" or does that just randomly look extra-horrible?
 
@RoelofSpijker Randomly extra-horrible. It's probably a feature of the second letter being w together with the inherent random offsets and rotations that are already there. Let me try regenerating it and see if I get better spacing ...
(need a better random number generator: if I run it twice too close together then nothing changes) Looks like the n and w just want to be together. Maybe they are strange attractors.
 
I was wondering because it looks exceptionally bad in the one as well as the two line version
which RNG are you using? Just the TikZ one, I imagine?
 
you can set the seed
by default it's \time*\year
and \time is minutes since midnight, so it's not very strange that it yields the same results if you run it twice quickly in succession.
 
1:14 PM
@AndrewStacey That looks a lot like my famous thread; Were you one of the people who wrote an answer for it?
 
1:25 PM
@Canageek No I didn't. I was mildly tempted to go and write an answer for it based on what I used to produce the above, but I don't know any suitable spells.
 
@AndrewStacey Just use some lipsum text, or I've linked to a sample of what I'm using it for on my blog, you can use that text.
 
@Canageek No, no! I can't use a lipsum. It has to be right.
 
1:41 PM
@RoelofSpijker Turns out I wasn't computing the width of the space correctly. It was doing something very silly. I need to fix my character generation script to take that into account.
 
user19161
2:09 PM
@AndrewStacey At first I thought that was limsup.
 
user19161
@AndrewStacey This looks suspiciously like beamer and pgf.
 
2
Q: List of useful lua libraries and techniques

michal.h21With luatex, it is possible to use many libraries and functions that can simplify various aspects of lua programming. As lua as language is quite new for majority of TeX users, I think it would be good if we can share experiences in searching for useful libraries and techniques that appeared to u...

Off Topic imo
 
@PatrickGundlach Migrate it and let someone else deal with it?
 
Yes, stackoverflow should be ok
 
2:27 PM
@Canageek, hi. I see you were disturbed by my answer, above -- what's wrong with it? (I'd be happy to improve and/or delete it, was just trying to be helpful.)
 
@BenLerner It just seems unlikely to work across all document classes, and isn't well documented on how it works.
 
@Canageek I haven't noticed any problems with the three or so document classes I've tried; I suspect it /is/ unstable, though, against packages that manipulate hyperref at all.
 
@BenLerner Yeah, you should not that, along with which ones you've tested it with. For example, does it work with KOMA-script, Memoir, etc?
 
That said, the macros I redefined in hyperref are only called when the ocgcolorlinks option is used, so the user has already "opted in" to an experimental feature
 
@BenLerner Which again, should be noted in the answer.
 
2:32 PM
It actually seems more stable than trying to typeset your text twice, which is the original implementation of ocgcolorlinks (it saves off your text in a box, which may change whether you're in restricted horizontal mode or not...)
(BTW, which answer, the one I just posted or the older one it links to? :-p I think I explain some of this stuff, though not all, in the older one)
 
@BenLerner looks Not your answer, actually. There was another one that is gone now. It worked on \documentclass[hidelinks]{report} or something like that.
It was what put the question at the top of the RSS feed, which was why I noticed it.
 
Ah. That explains why we might have been talking past each other, then :)
 
@BenLerner Yeah, I should have looked earlier. It suddenly seemed odd, since you were mentioning details I KNEW were not in the question, since it was a one line answer, sourced to the MiKeTeX documentation.
 
No worries -- actually, I'd raised my old answer in this forum, hoping to attract the attention of some PDF internals experts to double-check my PDF trickery, so it didn't surprise me that someone might find it odd/objectionable
 
Looking at this post tex.stackexchange.com/questions/29638/… and I have pretty much the same problem.The OP asked if there was a way to change the header to lowercase in book class. I don't know if there is an answer there. If yes, what am I missing? My header are still all caps
 
2:41 PM
I just checked my MWE with memoir and scrartcl; they work fine (though the paper sizes are slightly different; odd, but not relevant to my code), along with my daily-used classes sigplanconf and llncs.
ok, I gotta run for now. thanks for clarifying!
 
@BenLerner No worries; Also as I am assuming you are the guy who wrote Hyperref: Thanks. Good work.
 
No, I didn't write hyperref! Heiko Oberdiek, I think, is the author. I know nowhere near enough about PDFs to have written that. I just dove into his code to fix a feature I thought ought to be feasible :)
 
@PatrickGundlach Unless it becomes "Lua techniques for LuaTeX"
 
@PatrickGundlach I am interested in examples useful for typesetting in LuaTeX or for scripts used with TeX, so I think this should be on-topic
 
@michalh21 That's what I though. Please, change the question's title and, maybe, try being more precise in the question.
 
2:52 PM
@egreg I tried to be as precise as my byd english allowed me, if anyone have some thoughts how to make it more precise, I will appreciate it
 
@Canageek Sebastian Rahtz wrote hyperref originally Heiko took over from Sebastian after some years
 
@egreg, the fancyhdr \nouppercase does not work for book.cls
maybe I need to redefine some default that is overriding the fancyhdr option...
 
@Ariel It works:
\documentclass{book}
\usepackage{kantlipsum}
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhf{}
\fancyhead[L]{\nouppercase{\leftmark}}
\begin{document}
\mainmatter
\chapter{This will not be uppercased in the header}

\kant

\end{document}
 
3:09 PM
@egreg I have to be doing something wrong:
\fancyhf{}                % clear all header and footer fields
\pagestyle{fancy}           %define page style
\pagenumbering{roman}       %page numbering style: before main text
\fancyhead[L]{\nouppercase \bfseries{\rightmark}}
\fancyhead[R]{\thepage}
\renewcommand{\headrulewidth}{0.5pt}
\renewcommand{\footrulewidth}{0pt}
\addtolength{\headheight}{0.5pt} % make space for the rule
\fancypagestyle{plain}{%
\fancyhead{} % get rid of headers on plain pages
\fancyhead[R]{\thepage}
\renewcommand{\headrulewidth}{0pt} % and the line
 
@Ariel You're forgetting the braces; but it's better \bfseries\nouppercase{\rightmark}}
With that code you're applying \nouppercase to \bfseries which does nothing.
 
@egreg V.cool - it works!!
 
@Ariel Of course! :)
 
3:38 PM
Hello everybody :-).
Very quick question: if use the command \hspace, how can I add up to dimensions in the argument? e.g. 1in+2em?
Ist that possible?
 
@IngoGerth \hspace{\dimexpr 1in+2em\relax}
 
Fantastic! That works just fine. Thanks
 
4:10 PM
@N.N.: Thanks to your answer, I'm having a great time with emacs, but still not into AUCTeX, doing some useful work in org-mode. Problems, though, with utf-8, as in this question:
0
Q: How to make emacs accept UTF-8 from the keyboard

Brent.LongboroughMy friends have persuaded me to "try again" (about the 5th time in about 12 years) with emacs. I'm currently suffering a little, and need help with emacs + utf-8. I'm running the 23.3.1 emacs gui on Windows 7 with my own custom keyboard layout (built with MS Keyboard Layout Creator). The layout ...

 
4:22 PM
@AndrewStacey Just seen this. I think you've got "ugh" on the wrong side of the equation.
 
4:51 PM
@BrentLongborough Great to hear. Such problems that block you from doing actual work can be very irritating. I mean, it is one thing to not know how to write macros and another to not be able to use your keyboard properly. I hope you can solve the problem. Afraid I am unfamiliar with keyboard setups in Emacs.
@BrentLongborough I added the emacs tag to your question. Not only because it fits that tag, it has 318 followers.
 
5:18 PM
0
Q: \power{n}{k} The power nk, but without \multiply

AndyHow to do this using macros in TEXt. power n k The power nk but without multiply. Something like this needs to be done [ k_{n+1} = n^2 + k_n^2 - k_{n-1} ]

Anyone know what the question is?
 
@JosephWright My belly sez he wants to calculate something (as he only tagged macros), but I just asked the same thing in a comment :-)
 
user19161
@JosephWright I think we can all guess the formula he is trying to typeset.
 
user19161
If so maybe he is just asking how to type that with LaTeX.
 
6:19 PM
@NN Good thinking -- thanks.
Org-mode is amazing/scary
 
6:36 PM
@BrentLongborough Indeed, I started learning Org-mode like 5 months ago and I am now doing most writing in it as described in my answer on workflow. It is such mysterious, effective and huge. The compact Org-mode Guide (PDF) is a good place to start learning.
I also keep all my notes in Org-mode after migrating from Gnote.
 
7:30 PM
@NN Amazing, isn't it? I'm sure there must be a way to map stuff onto the book/part/chapter/section... hierarchy, "... but the margin of the manual is too small to contain it ..."
 
@Canageek There you go - for what it's worth, and self-respecting madman would use the STIX fonts.
 
7:52 PM
@BrentLongborough What is it you want to do? I do not follow. Maybe I am just tired.
 
8:04 PM
@BrentLongborough Something that makes org files display much nice is to use indent mode which can be enabled for all org-files by adding
(setq org-startup-indented t); Use virtual indentation for all files
to your .emacs, see orgmode.org/manual/Clean-view.html for details.
After finding that I was much happier with the look and feel of Org-mode. Dunno why it is not enabled by default.
 
based on the discussion going on on meta, should we close this or answer and archive it(remove from the unanswered list)?
4
Q: TikZ-equivalent of bordermatrix with automatic alignment of labels

RolKauI would like to create a TikZ matrix (containing pictures in the cells) and annotate rows/columns of this matrix is the same manner as \bordermatrix allows. This is (approximately) a picture of what I am after: and this is the MWE that generated it: \documentclass{article} \usepackage{tikz} \...

 
8:33 PM
Just had to share this:
user image
5
(Click to see full-sized)
 
 
1 hour later…
9:47 PM
@JosephWright That comment about bigintcalc should be an answer. I'd do differently, as I have gp on my machine: \newcommand{\printfactorial}[1]{\@@input|"echo '#1!'|gp -q" \unskip}, using shell-escape: it's much faster. :)
 
@egreg I'm not sure it really is, as I'm not actually sure what the idea is in the question. Why is the OP doing this!
 
@JosephWright Writing lecture notes and trying to avoid computations? :)
 
Yay I'm back! :)
 
10:17 PM
@PauloCereda How was the journey in the big city?
 
@egreg It was very good. :) Just a heavy traffic, as usual. :)
 
@PauloCereda Work or pleasure?
 
@egreg Work, but it was a good one. :) It was a 10-minute talk about a possible TeX-related project. :)
 
@PauloCereda Here we had some questions about doing arithmetic with TeX.
 
@egreg Awesome! With any package?
 
10:37 PM
@PauloCereda There's the awesome bigintcalc by H. Oberdiek. I've just used it to print the list of the first 100 Fibonacci numbers with a few lines of LaTeX3 code. :)
My plan for reaching 100k before the summer holidays is going well. :)
 
@egreg Wow!!!!!!
@egreg Yay, 80k! Congrats! :D
 
@egreg Beautiful Fibonacci fountain!
 
@Werner Yes, it's very nice!
 
one more vote needed to close: tex.stackexchange.com/questions/51311/…
 
@PeterGrill Done. I think your suggestion for the duplicate is perhaps more appropriate, since the OP didn't request a global replacement.
 
10:52 PM
@egreg Amazing code! :)
 
@Werner although the penalty settiings don't have to be global of course (and using mbox stops the white space in the expression being shrunk to help it fit on the line)
 
@PauloCereda I wrote a fast implementation just before going away from office; then in the bus I had some time to think how to make it expandable. Much time! Indeed we were blocked in the traffic: many people going to see Chievo-Milan. :( So I lost my train. :(
 
@egreg Oh. :(
 
11:08 PM
@egreg oh so my curse worked but was out by a day , maybe I should try again:-) chat.stackexchange.com/transcript/message/4173572#4173572
2
 
@PauloCereda The "nice" thing is that the next train, scheduled for an hour later, was announced as being 30 minutes late. :-O So I took another one, which stopped midway and there I could catch another one.
@DavidCarlisle Well, there's a problem for tomorrow! At 18:45 UTC there's Juventus-Lazio. So the interviewer is not available at that time. :)
Are you doing voodoo with a train model?
2
 
@egreg I'm always scared when going to São Paulo. :) I arrived 7:30 in the morning and both righways were already jammed. I once faced a flood, it was terrible. :(
@egreg Oh my, the game!
 
@PauloCereda It's a nightmare!
 
@egreg Indeed.
 
@PauloCereda seriously we can switch times/days if it's inconvenient, i'm around most evenings
 
11:23 PM
@DavidCarlisle No problem. :) Maybe we could schedule the interview for Thursday, so we can spare the voodoos. :)
 
@PauloCereda if you want?
 
@PauloCereda Good! More time to prepare "nice" questions. :)
 
@DavidCarlisle It would be great. :)
 
speaking of interviews I had more or less forgotten but there is tug.org/interviews/carlisle.html not sure if you should make this explicitly an "update" of that, perhaps not but it may fill in some background for any questioners
 
@egreg Indeed! Then we can bombard David with "nice" questions. :P
 
11:31 PM
thursday then
 
@DavidCarlisle Cool! I'm gonna ask lots of XML questions. :P
Disclaimer: I'm not a big fan of the format. :P
 
@PauloCereda Bed time! Have a good night!
 
@egreg Thanks egreg! Buonanotte! :)
 
@DavidCarlisle LOL! :) TBH I like the format, I've been using it a lot for serialization. :) My problem is with the claim that it's human-readable. :P Human-readable perhaps, but not human-comprehensible (I have some ugly XML mappings of objects. :)
 

« first day (527 days earlier)      last day (4399 days later) »