« first day (503 days earlier)      last day (4423 days later) » 
00:00 - 19:0019:00 - 00:00

12:00 AM
@GonzaloMedina Baskerville
@PauloCereda Nice!
 
@egreg Thanks. I will also try it.
 
@egreg Thanks. :) Now I need to work hard for the 10k. :)
I had to go to a nearby city today and get some papers. I decided to walk, but when I was coming back, the rain started. I walked one hour in the rain. I stopped in a bar and bought a Coca-Cola can. They could call me for an ad, like walking in the heavy rain and drinking Coca-Cola. :P
 
@PauloCereda Congrats! Now you are closer to having your credit card number.
 
@GonzaloMedina Thanks! :) Now I need to learn TeX. :P
 
12:18 AM
@PauloCereda No problem ;-) texdoc.net/show?pkg=texbytopic
 
@StefanKottwitz Wow!
 
@PauloCereda what is PHPLiveX.php for?
 
@Stefan: AWESOME!
@StefanKottwitz It's the library used for the Ajax query. :)
 
is there ajax? just noticed the color change when hovering over with the mouse
 
It wraps the PHP function call to a Ajax call. :)
@StefanKottwitz That's just CSS. :)
 
12:21 AM
hm :-)
 
The Ajax part happens when the "loading" icon appears. :)
 
@StefanKottwitz When I press "Continue" the list appears, but nothing happens if I click on an entry
 
now hyperlinks for the table items would be great ;)
 
@StefanKottwitz I'll rewrite the script. :)
 
12:28 AM
@PauloCereda I wondered if it would be an easy apache rewrite for just calling texdoc.net/packagename which rewrites to show?pkg=packagename to make access easier
@PauloCereda yet I made endless recursion or no clever match
 
@StefanKottwitz Apache always made me upset with these confs. :(
@StefanKottwitz Uh-oh!
 
such as in .htaccess - RedirectMatch permanent ^/(.*)$ /show.php?pkg=$1 but without endless recursion
 
@StefanKottwitz Cool! :)
 
it's already nice. I made a button and bbcode for easy documentation link, [doc]packagename[/doc] becoming <a class="postlink" href="http://texdoc.net/show?pkg={SIMPLETEXT}"><img src="/texdoc/icon.png">{SIMPLETEXT}</a>
 
@StefanKottwitz Awesome!
I'll rewrite the online search, I'm not satisfied with the algorithm. There's room for improvement.
 
12:34 AM
so the frequent easy answers referring to package link and documentation can be half automatic and very convenient using [ctan] and [doc] buttons :-)
 
@StefanKottwitz :D
 
@PauloCereda I guess texdoc.net also deserves a start page for browsing by topic (such as the texdoc GUI) and a freetext field for your script
though the main purpose was the helper call for forums, blog etc.
 
@StefanKottwitz You are getting me into trouble. :P
 
@PauloCereda I'm already satisfied with the script :-) perhaps hyperlinked ;) don't worry, I'll built a small portal myself
@PauloCereda no trouble for you
 
@StefanKottwitz hehe don't worry, I'm always here to help a friend. :) My only problem is time. :)
@StefanKottwitz: Wait for texdoc V2. :)
I'm bad at presentation layers. :)
 
12:42 AM
ok I do! :-D
 
@StefanKottwitz I'll work on it tomorrow, I promise. :)
 
@PauloCereda @StefanKottwitz What are you guys cooking? It smells nice:)
 
@PauloCereda Great! I look forward to seeing it
@YiannisLazarides A TeX documentation server
 
@StefanKottwitz That is great!
 
one purpose is easy linking to package documentation by remotely calling texdoc
 
12:54 AM
@StefanKottwitz Might be slow?
 
@YiannisLazarides I guess there would not be a heavy load such as by many concurrent users
 
@StefanKottwitz Sure, but then you must cache the links, otherwise why generate the pdf document every time?
 
actually it's not generating a pdf but it's querying texdoc and returning the link to the pdf
 
@StefanKottwitz Clever!
 
 
7 hours later…
8:19 AM
Should rounding be done as round(123.456,-2), or round(123.456,1e-2), the second standing for "round to the closest multiple of 1e-2? The second would be much more general, and seems "cleaner", but means that I need to implement rounding to a multiple of any number. In a sense, this would be a sibling of mod.
About Uiy's strange input syntax, I suspect he might be taking some input from a program that is hard/impossible to configure. Of course, the best would be to have an intermediate pass through Perl, or something.
 
@BrunoLeFloch Uiy's strange syntax comes from a quest to mark music code, it lacks though a proper sense of computer science (there are no proper delimiters) and would get into a big jam if there are errors and he uses regex.
@BrunoLeFloch He also needs to work on his patience and tact:)
@BrunoLeFloch On the rounding I would keep to conventions round(2.675, 2), I would also have a trim function to remove trailing zeros.
 
8:44 AM
@YiannisLazarides I'd agree: usually people think in 'decimal places', with negative values representing rounding before the radix (if accepted at all): see I think numprint.
@YiannisLazarides I'd agree: I'd parse his input on a tokenwise basis, as I do for numbers in siunitx
 
@JosephWright Ok. That's easier for the rounding itself, but a bit messier for the parsing (the second argument will first be parsed as a floating point, then turned into an integer).
 
@BrunoLeFloch I suspect that he might be best of with LuaTeX (as he seems to know a reasonable amount of other programming)
 
@YiannisLazarides Trimming zeros does not make sense on the floating point itself, only when outputting them. Internally, floating point numbers are simply real (well, rational) numbers, so "trailing zeros" or "leading zeros" have no meaning.
@JosephWright Yes, I mentioned LPeg somewhere :).
So I guess I should code the functions round(x,n), floor(x,n), ceil(x,n) within expressions, and \fp_to_scientific:n, \fp_to_decimal:n, \fp_to_decimal_trim_zeros:n for output?
 
9:28 AM
@StefanKottwitz: I've sent you an epic new bunch of scripts. Hope you like them. :)
Hey guys! :)
 
@DavidCarlisle Good morning
 
My first Guru badge. Something is is definitely wrong in the main site! :)
 
@PauloCereda It's correct ;-)
 
@MarcoDaniel :P
 
@PauloCereda Got it, thanks!
 
9:36 AM
@StefanKottwitz I'm sorry, the previous code was just beta. This one is more well-written, I guess. :)
 
@PauloCereda A new guru - great! I must see this answer.
 
CS dev rule: if your code has some errors or bugs, release it and call it version 1.0 :P
@StefanKottwitz There should have an audit in the main site. What comes next, a rep cap for me? Spooky. :)
After all, it's me! :P
 
@JosephWright That is true and is common in a lot of libraries unless one goes wth some syntax like printf.
 
@PauloCereda Being curious, I turned your guru badge around. On the back I can read a small print: This answer could become a great post on our blog.
 
@StefanKottwitz Sure, I can expand it. :)
 
9:43 AM
@BrunoLeFloch Best IMHO to see what other languages like python are providing docs.python.org/library/decimal.html most newcomers to LaTeX now probably have a bit of knowledge of python, so it would be nice to have a one for one macros.,
 
@PauloCereda Sounds great! You could add some of the further good suggestions by other fellow contributors, making a nice overview or small digest about efficiently writing papers or small documents (books may better be differently handled)
 
@PauloCereda I might get a weirdo badge today:) tex.stackexchange.com/questions/48295/…
 
@YiannisLazarides Wow! :) That's black magic. :P
 
@YiannisLazarides It could become a gold badge - Reversal
 
@StefanKottwitz I just don't like flame wars:) and love it when sour things turn sweet.
 
9:49 AM
@YiannisLazarides Now you get ;-)
 
@MarcoDaniel Thanks:) It is one egreg doesn't have...he!he!
@MarcoDaniel The OP was spoiling for a fight, so I thought I was going to spoil his fun!
 
@YiannisLazarides It's the first time I see a question with -5.
@YiannisLazarides Your answer is really self explanatory ;-)
 
@MarcoDaniel Normally they get closed or sense prevails and the OP deletes. I was tempted to make it -6.
 
@YiannisLazarides I voted for -3 ;-)
 
@YiannisLazarides I think there are two aspects: rounding a floating point number in the middle of a computation (or to store the rounded value), and formatting the floating point number. The first task would be the round(123.456,1)=123.4. For the second one, I was indeed thinking of python, at the moment \fp_format:nn { 123.456 } { 3.1e }. Many of the python bells and whistles don't make sense before we get to strings, since padding with spaces when typesetting is wrong.
 
9:58 AM
@Stephan Oops! Need 20 for that. Only one issued to @AlanMunn.
@BrunoLeFloch Sure if you thing typesetting many of these don't apply. Whatever you come up with is a gift to the community.
 
@YiannisLazarides I am honored.
And going out for second breakfeast. See you guys later! :)
 
@BrunoLeFloch See ya, Bruno! :)
 
10:17 AM
@YiannisLazarides Yes, hard to get! But the score can grow in some time. The harder part is to have a question with such a low score. If this question would ever drop further, I might get one ;) tex.stackexchange.com/questions/35892/…
 
@StefanKottwitz -1:) missed this one.
@BrunoLeFloch While you had your second breakfast I remembered if you need to pad maybe use a font dummy-space.pfb
 
@Stefan: did you check the new code? :P
 
10:40 AM
@PauloCereda I'm doing it right now
 
@StefanKottwitz Yay new code! :)
 
@PauloCereda Very nice! Why not making the file name the hyperlink?
clicking the name is natural, and it saves a table column
even if the link symbol is nice ;)
it's online btw
 
@StefanKottwitz Ah, I thought it would be nice for the user to check where the doc is located in the TeX distro. :)
Try with, say, "siunitx adjustbox blablabla".
 
@PauloCereda wow, great
yes it's good to see the location
just another hyperlink at the location would be good (let's keep the view symbol)
 
@StefanKottwitz Sure, let me update it for you. :)
 
10:47 AM
could you let RETURN activate the Continue button?
 
@StefanKottwitz Oh I need to check JS, I fail at those calls. :)
@StefanKottwitz: Instructions to add hyperlinks sent by email. :)
 
11:04 AM
works, thanks
 
@StefanKottwitz cool! :)
@StefanKottwitz Interesting, two links now appear. Did you duplicate the texmf dir? :)
For example, try "texdoc". :)
 
strange, setspace gives just one
and at the command prompt texdoc -l texdoc gives 3 unique results
@PauloCereda some are starting with ./
it seems to be just for docs below texmf, not texmf-dist
 
11:37 AM
@StefanKottwitz I'll take a look.
@StefanKottwitz: with the original script, the one I sent you, I can't reproduce it. :(
It only displays the 3 unique results.
 
I'll check again
 
@StefanKottwitz: I sent you a new line. :)
My guess is that two trees are being indexed by texdoc. :P
 
funny that I cannot reproduce at the command prompt
but it seems to be the same tree, just both relative ./ and absolute paths
 
11:53 AM
:(
 
I already replaced that line by $location = str_replace("/usr/local/texlive/2011","", $location);
 
Ah! :D
 
but this one cannot double results
 
Indeed, the script is only parsing the output of texdoc.
You can't blame the script. :P
 
sure? ;-)
 
11:55 AM
what if you try to run texdoc with the apache user?
 
the pre alpha version works
 
@StefanKottwitz Indeed. Maybe since both the script and documentation are in the same level, texdoc is searching the local place too?
Try deploying the new script in another folder, and see if still works.
 
I'm looking at kpsewhich -var-value=TEXDOCS ...
 
Ah. :)
 
hmmmm... {/root/.texlive2011/texmf-config,/root/.texlive2011/texmf-var,/root/texmf,!!/usr/local/texlive/2011/texmf-config,!!/usr/local/texlive/2011/texmf-var,!!/usr/local/texlive/2011/texmf,!!/usr/local/texlive/2011/../texmf-local,!!/usr/local/texlive/2011/texmf-dist}/doc//
 
12:02 PM
I'm really sorry, but I can't reproduce the error. "It works on my machine." - cliché detected. :P
oh!
 
still I don't see why texmf-dist and texmf are differently treated
 
I don't know. :(
can you run texdoc with the user apache uses to run the command?
 
I'll find it out, don't worry
 
@StefanKottwitz <3
 
also 3 results
 
12:09 PM
@StefanKottwitz Now I'm getting mad. :P
 
I still guess it's the search path, the one of the www user is a bit different and includes /var/www/texmf as its TEXMFHOME
 
@StefanKottwitz Let's find out. :) Could you run the script I sent you now? :)
If it returns something different than 3, it's the texdoc path.
Otherwise, I'll jump from a bridge. :)
Hey @Joseph has a new photo! :)
 
@PauloCereda I fixed it :-))
 
@PauloCereda Yes, I was due a change and at the conference I was at someone took lots of photos!
 
@StefanKottwitz YaaaaaaaaaaaaaaaaaY!
Tell me moar! :P
 
12:17 PM
Has anyone asked
0
Q: LaTeX command with optional arguments

Adam RyczkowskiWhile writing lecture notes from statistical physics I found out, that I am often writing very similar long LaTeX sequences like \frac{\partial }{\partial <foo>} \frac{\partial <bar>}{\partial <foo>} and \left( \frac{\partial <bar>}{\partial <foo>} \right)_{<...

before? The answer is clearly xparse :-)
 
@Stefan: Germans, they can do anything! :)
 
@PauloCereda actually it was the TEXDOCS variable which included the user's home TEXMF which is /var/www/texmf for the apache user but was changed to the document root and so it became the main texmf
@PauloCereda we found it straightforward - noticing that it's only the texmf sub tree, and that it could be an apache user issue as you guessed, then investigating TeX vars, good troubleshooting
 
@StefanKottwitz Ah great discovery, hats off to you! :)
@JosephWright I hate when people take photos of me. :P Usually my photogenic side is none. :P
@StefanKottwitz Still, Germans. <3
 
@PauloCereda Same here, but what can you do :-)
 
@JosephWright I once tried 'GIMME THAT CAMERA OR ELSE!' but the reception was not good. :P
@StefanKottwitz: don't forget to update the ref script for the str_replace line, so it works too. :)
I think replacing "/usr/local/texlive/2011/texmf-dist" by "/usr/local/texlive/2011" is enough.
TONIGHT: Keep up with Retina Displays! Our experts will present basic talking points for smugly arguing that low resolutions are superior.
You know you are too much involved into this "internet" thing when you write "badger" instead of "badge". :P
Speaking of which:
I stopped when the score was England: 193 Other team: 0.
 
12:53 PM
2
Q: Which latex editor is able to access all documentation of all packages?

Robert KeyI am looking for an editor or documentation browser that can look up all commands from all packages, for eg I want to for 'whiledo' then I want a window or pane to pop up with the required reference information. Also one forgets the command so it would be helpful to type in 'loop commands' and a ...

Maybe I should implement something. :P
 
@PauloCereda I vote for TeXworks for your implementation
 
@StefanKottwitz I read a blog post by Joseph about TeXworks dev and it seems very interesting. I just need to (re)learn C++ all over again, but it sounds like a good plan to me. :)
 
@PauloCereda Are you on the TeXworks mailing list?
 
@JosephWright No, not yet. :) Maybe I should consider joining it. :)
 
The editor is a good choice because it is good and cross-platform and is included in distributions. Perhaps the TUG may support developing.
 
1:00 PM
@StefanKottwitz They do (as has UK-TUG in the past) - the idea came up at a TUG meeting
We (UK-TUG) paid for a laptop for Jonathan Kew for the initial development: he needed a Mac for the cross-platform element.
 
@PauloCereda If you need an online compiler for your Ajax TeX editor version, let me know ;-)
 
@StefanKottwitz Now I'm getting scared. :P
My TODO list has also "- join UK-TUG" and "- go to a TUG conference". :)
 
@PauloCereda I've got another idea for a small script ;-)
 
@StefanKottwitz Sure! :)
 
turning the csv content of /usr/local/texlive/2011/texmf/texdoctk/texdoctk.dat into HTML
quick shot :-) sed 's/\([^;]\+\);\([^;]\+\);\([^;]\+\);.*$/<a href="\/show.php?pkg=\3">\2<\/a>/' texdoctk.dat >topics.html
that's the TeXdoc GUI, sorted in topic categories
turning content to links, making name # anchors for the categories and generating a small ToC, so we've got a nice documentation per topic web page
automatic, getting updated via tlmgr, following the distribution status
(would be a motivation to support maintaining that texdoctk database in return)
 
1:15 PM
Could it be an external script that generates the html file?
 
any script, even bash and sed or awk - there's no need to do it on the fly
converting by manually calling the script or better I would make a cron job
 
Sexy! <3
@StefanKottwitz: would an overkill script be a problem?
 
since when are conjobs sexy ... hm
perhaps you mean this daily job: 0 0 * * * cat /var/local/women | xargs undress | fun >>/usr/local/video-db 2>&1
@PauloCereda overkill is no problem
 
@StefanKottwitz LMAO!
 
Again I had to wiktionary for slang ;)
 
1:31 PM
I'm writing a sample script. :)
 
1:47 PM
@StefanKottwitz: I'm testing the script. :P
 
@StefanKottwitz It's working. :P
 
want to have :-D
 
@StefanKottwitz sent! :)
 
got it!
python, nice!
 
1:57 PM
@StefanKottwitz we are eclectic! :P
At first I thought, "I'm gonna write a 18mb Java code. Or I could write a 10kb Python script." :P
3
But that dat file is incomplete. Where are the other packages? :(
 
@StefanKottwitz Cool! :)
Now you need to put show online again. :P
 
okok :)
but then you get the code ;) see
that's why I kept the extension .php
 
@StefanKottwitz Ah! :D
 
also here one could link the package name
I would have preferred to directly use the path over using show.php
but I think I remember that the path was not unique, just doc/ which could mean doc below texmf-dist but also doc below texmf
do you think we could also generate a small ToC table for the categories?
besides also linking the package name in the first column as in the other table/script ;-)
 
2:10 PM
@StefanKottwitz Hm I'll take a look. :)
@StefanKottwitz: uh-oh, show is showing the content of the script!
 
yes, because of no extension
I could make a RedirectMatch
 
2:33 PM
@StefanKottwitz Sent. :)
 
great!
Btw. I'm growing desperate with the backslash in bbcode
want to match a LaTeX command, such as by [cmd]\{SIMPLETEXT}[/cmd]
 
@lockstep: Do you know a German word for typesetting
 
@lockstep I left a comment on your answer about \scalefont
 
becomes: <a class="postlink" href=".../latex-reference-manual#g_t_005c{SIMPLETEXT}">&#92;{SIMPLETEXT}</a>
 
@StefanKottwitz Uh-oh, I have no BBCode experience. :(
 
2:38 PM
@PauloCereda ok :) just don't get the \ to match, only if the user writes &#92; too
 
2:49 PM
@StefanKottwitz Ah! :D
 
@egreg Many thanks for improving my answer!
@MarcoDaniel I'd simply say "setzen". "Schriftsetzen" is not entirely unheard of, but unusual.
 
@lockstep Thanks. Do you think I can use the word Typesetting in a German article?
setzen sounds weird ;-)
 
3:08 PM
@MarcoDaniel In my opinion, no. "(Schrift)setzen" is the correct German word. (You wouldn't replace "weich" with "soft" in a German text, would you?)
 
@lockstep :-)
In special I am looking for typesetting element layer ;-)
 
@MarcoDaniel You may use "Layer", but not "Typesetting". :-)
 
@lockstep But apparently you'd use "shitstorm" :) lexikographieblog.wordpress.com/?s=shitstorm
 
@AlanMunn I'd use "Sturm der Entrüstung". But then, I'm 40+. ;-)
 
Hmm, TeX users seem very civilized. Maybe all we need for world peace is for everyone to start using TeX.
6
 
3:18 PM
@FaheemMitha If only correlation were actually causation. :)
 
@AlanMunn : If only.
 
@StefanKottwitz: wow, texdoc is epic now! :D
 
@StefanKottwitz How are the entries ordered in the home page?
 
I think what this site needs is a "road to lisp" question. A "road to TeX". I .. do solemnly offer these my responses to The Road to TeX Survey:...
 
3:35 PM
@PauloCereda thanks to you! I merged script and topic page
@egreg it's just taken from the texdoc GUI database, as it is there
 
@StefanKottwitz I'm at your service. :)
 
@StefanKottwitz It's rather confused, IMO
 
@egreg The original purpose was markup for forums and sites. LaTeX-Community.org now has buttons for CTAN package links, for direct documentation links (texdoc.net query), for environments and for commands (accessing the LaTeX2e reference for this)
@egreg The "portal" page is a bonus, and just a start for now
@egreg I think it's pretty good for being developed in some minutes just by the way
for sure it will be improved
 
@StefanKottwitz It was just a remark: I think you're doing a great service to the community.
 
True story:
I was so entertained writing a script that I absolutely forgot to sleep. Good job, me!
 
3:43 PM
@egreg for now, it's a quick application of texdoc query script and topic db conversion, which could be embedded into a real site later
@egreg it's fine to speak about it :-) thanks for the remark
@egreg if you see improvements, let me know, the current result is rather a quick shot from today
 
@JosephWright: Why doesn't a command \prop_get:Nn exist? I can use \prop_get:NnN.
 
@egreg: one of the challenges of this idea is that it does not depend on human intervention. The site has always the bleeding edge info, as long as the underlying TeX distro is properly updated. :)
 
Would it be appropriate to ask a general question with a title such as "How can other programming languages be used to create content for TeX documents?" in an attempt to get a of ways, e.g. answers with approaches involving LuaTeX, org-mode, make, write18 and bashful.
I do not have a specific such problem but I am interested in it.
 
@PauloCereda I got an idea for a small but useful improvement regarding the by topic list
now the link (and the anchor below View) points to the best match
there could be a second link pointing to the texdoc -l -I list, which is done by the original script
so I don't have to rely in the pdf but get all package documentation if I want
so it becomes even better than the original texdoc GUI it's based on
 
@StefanKottwitz: Hm I see. I'll adapt the code. Can I improve the HTML too?
 
3:55 PM
Gladly!
 
@StefanKottwitz The home page might contain direct links to the 20 greatest hits (if it's not too much work for the server)
 
@egreg You mean it counts queries and generates a top list?
 
@StefanKottwitz Yes.
 
Sounds useful! Needs some further programming, database access
Just stepping a counter in the database and displaying a top list should not cause much more load
especially since I would access a separate database server (who independently serves texample.net)
 
@StefanKottwitz: could you send me the / files, so I could update them accordingly? :)
 
4:11 PM
@MarcoDaniel We have some ongoing discussion about consistency in these get functions, and one question is what to do about expandable ...get:Nn functions.
 
@JosephWright Based on this argument it shouldn't be implemented in the basic layer.
 
@StefanKottwitz When did that appear?
@MarcoDaniel Well, as I said discussion is ongoing, so it will come out either as all of clist/seq/prop or none of them
 
@JosephWright We are making a lot of progress. Nobody can even blink. :P
 
@JosephWright: I have a next stupid question. I want to understand the definition of prg_case_XXX:nnn whereby XXX can be int or dim. What does the command \tex_romannumeral:D do?
\cs_new:Npn \prg_case_dim:nnn #1
{
\tex_romannumeral:D
\exp_args:Nf \prg_case_dim_aux:nnn { \dim_eval:n {#1} }
}
 
@JosephWright Just today. Got the domain yesterday, dealt then with server setup while Paulo developed the scripts
 
4:27 PM
@MarcoDaniel It's the trick that causes expansion: \romannumeral starts expansion which ends when something not part of a <number> is found; the tokens that form the <number> are converted to a roman number if it is positive, otherwise the expansion is empty. It's always used for f expansion (by ensuring that a nonpositive number is eventually found).
For example, the expansion of \exp_args:Nf is \exp_after:wN #1\exp_after:wN {\tex_romannumeral:D -`0#2} and you see the negative number -`0
 
@JosephWright An example to see how we can use it for markup in a forum: latex-community.org/forum/…
 
@egreg Thanks for the explanation. I will try to create an example to understand this ;-)
 
@egreg The key is that TeX is looking for a space, of course
 
@JosephWright An example for inline linking to corresponding page in LaTeX2e command and environment reference manual: latex-community.org/forum/… (next step: adding links to LaTeX keywords in highlighted code in code environments)
 
@StefanKottwitz: Do you use any messenger? :)
 
4:34 PM
@JosephWright Wow -- I will read the article.
 
@StefanKottwitz Very nice
 
@PauloCereda rarely (besides jabber and cupc at work) , last time google chat
@PauloCereda on the plan is installing a jabber server. And Etherpad lite, for such purpuses
 
@JosephWright Not really. :) A token just sitting after -`0 is expanded; this is a consequence of another fact which is independent of \romannumeral. :)
 
@StefanKottwitz: Ah ok. :) Should I propose an improvement for our code? :)
 
@egreg Looking for the optional space, surely?
 
4:39 PM
@PauloCereda gladly, or via short mail is also fine
 
@StefanKottwitz Ok. :)
 
@JosephWright The \romannumeral which Marco referred to causes the expansion of \exp_args:Nf, doesn't it?
 
@egreg Yes: I was thinking of the general case of how we use \romannumeral to pull off the f-type expansion.
 
@egreg How to you mean you see the negative number?
@JosephWright Really spaces or the first nonexpandable token?
\documentclass{article}
\begin{document}
A \romannumeral `0 A

\def\demo#1{%
  \detokenize\expandafter{\romannumeral-`0#1}%
}
\def\testa{a\testb}
\def\testb{123}
\demo{\testa}
\end{document}
 
@MarcoDaniel -`0 is a negative number! As Joseph points out, TeX looks for a space to be ignored afterwards when it's looking for a number and expands the token immediately following any constant, even alphabetic constants such as `0
A nonexpandable token of course interrupts this process.
 
4:54 PM
@MarcoDaniel The key here is that the space is optional, but TeX still looks for it even after a constant (as @egreg says)
 
5:04 PM
@StefanKottwitz: get ready for the epic update. :)
@StefanKottwitz: sent.
 
@egreg and @JosephWright Thanks. I have follow up question before I start programming examples. Why does the first token be expanded and not the second one? \testc isn't a constant.
\documentclass{article}
\begin{document}
\def\demo#1{%
  \detokenize\expandafter{\romannumeral-`0#1}%
}
\def\testa{\testb\testc}
\def\testb{123}
\def\testc{123}
\demo{\testa}
\end{document}
 
@PauloCereda Great! Just finished a blog post - announcing that somebody with OS X know-how is needed for helping with technical issues so that the translation of the newest KOMA-Script manual can make progress. texblog.net/latex-archive/news/koma-script-os-x
 
@MarcoDaniel \romannumeral keeps expanding tokens until it finds the optional space or something non-expandable. In the example, it expands \testa to \testb\testc, then expands \testb to 123, then finds 1 which is non-expandable and so stops. \testc is therefore not expanded. There was a question a few days ago where I wrote a loop to expand using \romannumeral in a repeated sense to deal with this case.
@StefanKottwitz Do you know what the issues are? I have a Mac, but I'm not sure if I count as an OS X expert!
 
@StefanKottwitz Sweet! :)
@JosephWright Every Mac user is above average. :P
 
@JosephWright: You have a new picture. few seconds I was irritated
 
5:19 PM
@MarcoDaniel Sorry :-)
 
I thought it was Big Mac. :(
 
@JosephWright ;-)
 
@MarcoDaniel The other one was about 18 months old, so it was due for replacement
 
@MarcoDaniel The search for a space following the constant expands \testa finding \testb\testc; so \testb is expanded to 123 and here the search ends.
 
@PauloCereda Very good! It works fine.
 
5:26 PM
@egreg Some weeks ago we have such a session about lowercase ;-)
 
@StefanKottwitz And it's valid! validator.w3.org/…
@StefanKottwitz: oops, I forgot a small fix. Could you open the main script and replace <div id="msg"> by <div id="msg" class="message"> ? :)
Let's see if still works. :P
 
@egreg and @JosephWright Ok now I tried something new but it fails
\documentclass{article}
\usepackage{amsmath}
\usepackage{xparse}
\ExplSyntaxOn
\cs_new:Npn \prg_relation_case_dim:nnn #1
 {
  \tex_romannumeral:D
  \exp_args:Nf \prg_relation_case_dim_aux:nnn { \dim_eval:n {#1} }
 }
\cs_new:Npn \prg_relation_case_dim_aux:nnn #1 #2 #3
 { \prg_relation_case_dim_aux:nw {#1} {#2} {#1} {#3} \q_recursion_stop }


\cs_new:Npn \prg_relation_case_dim_aux:nw #1#2#3
 {
  \dim_compare:nTF { #1 #2 }
   { \prg_relation_end:nw {#3} }
   { \prg_relation_dim_aux:nw {#1} }
 }

\NewDocumentCommand \pvalue { m }
 
@PauloCereda fixed
 
@StefanKottwitz Danke!
@StefanKottwitz: I still fail at layouts. :P
 
5:43 PM
@MarcoDaniel When you do \dim_compare:nTF, #1 is correct, but #2 is the whole second argument to \prg_relation_case_dim:nnn
 
@PauloCereda well, the main thing is that you are a very good programmer :-) layouts can be taken care of after programming the back end
 
@egreg Indeed -- damn
 
@MarcoDaniel You want
\documentclass{article}
\usepackage{amsmath}
\usepackage{xparse}
\ExplSyntaxOn
\cs_new:Npn \prg_relation_case_dim:nnn #1
  {
    \tex_romannumeral:D
    \exp_args:Nf \prg_relation_case_dim_aux:nnn { \dim_eval:n {#1} }
  }
\cs_new:Npn \prg_relation_case_dim_aux:nnn #1#2#3
  { \prg_relation_case_dim_aux:nw {#1} #2 { = #1 } {#3} \q_recursion_stop }
\cs_new:Npn \prg_relation_case_dim_aux:nw #1#2#3
  {
    \dim_compare:nTF {#1#2}
      { \prg_case_end:nw {#3} }
      { \prg_relation_case_dim_aux:nw {#1} }
I think
Notice that I've altered the 'stop' case to tidy up properly
 
@StefanKottwitz Nah I'm just curious about languages. :)
Now I need to keep planing a secret build/test/deployment platform for L3. :)
I already have the most important part: the name. :P
 
6:03 PM
@JosephWright That was my aim. Do I notice correct that you only add a =?
 
@MarcoDaniel That's about right, yes :-)
 
@JosephWright Why did it be so simple?
 
@MarcoDaniel Well, in \prg_case_dim:nnn the final case is to check if the number is equal to itself, which tidies up the loop and exits with the 'other' case. There, the = is hard-coded, but in your case it is not and so a relation needs to be added in.
 
@JosephWright You also removed a couple of braces.
 
@egreg I just used the code from \prg_case_dim:nnn and modified it
 
6:06 PM
@JosephWright I did the same ;-)
 
6:17 PM
@JosephWright I believe I see the trick the second argument of prg_relation_case_dim_aux:nnn is a list of braced groups whereby two groups belong together. The first part of the group is the relation and the second on the result. That's the reason that the #2 isn't braced. But why do we need an extra quark?
 
@MarcoDaniel The braces, as you say, are missed out to unwrap the list of cases. The quark is there to allow clean-up when we find the 'correct' case.
 
@JosephWright very funny -- cs_new:Npn \prg_case_end:nw #1 #2 \q_recursion_stop { \c_zero #1 } is documented with: The \c_zero marker stops the expansion of \romannumeral. Now The wheel has come full circle. ;-)
@JosephWright: I created an example for l3prop:
\documentclass{article}
\usepackage{xparse}
\ExplSyntaxOn
\prop_new:N \g_abk_store_prog
\NewDocumentCommand \defabk { s m m }
 {
  \prop_gput:Nnn \g_abk_store_prog { #2 } { #3 }
  \IfBooleanT { #1 } { #3 }
 }

\NewDocumentCommand \abk { s m }
{
   \prop_get:NnNTF \g_abk_store_prog { #2 } \l_tmpa_tl
    { \l_tmpa_tl
       \IfBooleanT { #1 } {~(#2)}
    }
    {[{\color{red} Unknown~Abk}]}
}
\ExplSyntaxOff

\begin{document}
\defabk{4hmm}{4-Hydroxy-1-mesityl-4-methylpent-1-en-3-on}

\abk*{4hmm}

\abk{4hmm}
 
6:54 PM
@MarcoDaniel Nice example
 
@PauloCereda Are you ready for the match? By the way, England beat Sri Lanka, here's the scoreboard: espncricinfo.com/sri-lanka-v-england-2012/engine/current/match/…
 
@egreg The big cricket news is of course the Little Master's hundredth 100
 
@egreg Oh my, I almost forgot the game! Thankfully we still have 30 minutes. :)
It will be a key game for Juve. :)
 
@JosephWright 100+ runs in 100 international games? That's really something!
 
00:00 - 19:0019:00 - 00:00

« first day (503 days earlier)      last day (4423 days later) »