« first day (582 days earlier)      last day (4353 days later) » 

user19161
12:02 AM
@PauloCereda I only see the Queen on my chessboard. :-)
 
@ClarkKent :)
 
 
4 hours later…
4:09 AM
I found a question for Bruno or David: tex.stackexchange.com/questions/58455/…
 
 
1 hour later…
5:21 AM
@PauloCereda I hope you won a lot of money ;-)
@PauloCereda Good to know
@PauloCereda: I made a screenshot of this: stackexchange.com/leagues/29/month/tex/2012-06-01/5239#5239 -- First Time
@egreg won the first golden mathmode badge tex.stackexchange.com/badges/181/mathmode?userid=4427 -- Congratulations
 
 
3 hours later…
8:03 AM
@MarcoDaniel Third place? OMG! :)
@MarcoDaniel Thanks! This is something very special for me: first to get two gold tag badges!
 
 
1 hour later…
9:19 AM
@Canageek answer is simple: don't do it:-)
 
@DavidCarlisle Did you follow the LaTeX3 thread where we did try this?
 
@egreg maybe we should have a race: first to get a silver tikz badge (you have a head start but that's OK:-)
@JosephWright probably not, but there were some earlier pre-latex2e threads....
 
@DavidCarlisle Ah right
 
@JosephWright also I made the first cut at etex.sty moving the etex support code to latex.
 
@DavidCarlisle In DocScape, I'm frequently running out of registers in large or complicated documents, so I'm developing more and more schemes for reusing them. Most of the time, it is enough to avoid blatant wasting (i.e. there is some simple remedy like "don't allocate a new box for every page but reuse these boxes when pages are destroyed and created again"), but in the long run I'll certainly have some sort of allocation table with use count, garbage collection and all ;-)
 
9:34 AM
@StephanLehmke but etex gives you 2^something registers how can you run ouit?
@StephanLehmke that's what latex does for float boxes of course, recycles the same lists, but that was pre-etex
 
@DavidCarlisle Well for instance in DocScape you can have any number of pages "open" (i.e. created, but not shipped out) at the same time, so there is a basic need for having several boxes and other registers allocated for every page, existing in parallel. (ctd..)
The "naive" approach is to just use \box@<pageno> for every page, currently limiting the page count to at most about 16.000. As I said, this is one case of blatant wasting, but OTOH a reusing scheme would then limit the number of simultaneously open pages...
@DavidCarlisle Yea, that's the way to got, but it requires more thought ;-)
 
@StephanLehmke We reached the conclusion that allocating globally was fine provided you assign locally, although I guess trying to deal with >16k pages at the same time might be an issue :-)
 
@JosephWright This is not as absurd as it might sound. With DocScape we're talking data based publishing. Often the first couple of document generations basically show what's in the data base, and what design means need to be taken to "compress" it sufficiently for getting a catalogue down to 1000 pages or so. So the first documents can be quite large...
@JosephWright But mind, I'm not asking for any means to be taken especially to cater for such needs. That's my (paid) job after all ;-)
If at all, I'm moving away from LaTeX towards implementing everything with primitives (or, at some point in time, in Lua).
 
@StephanLehmke Local allocation would not help in any case, would it, if you need all of the pages available at the same time
 
9:50 AM
@JosephWright Yea that's right. But that was only one example where registers are (and could) be used. For instance, in DocScape all procedures and functions are implicitly grouped, you have local variables, parameters, return values, recursion and everything without having to care too much for side effects. This currently works because for instance arithmetic is done very primitive, storing everything in macros.
Trying to do register arithmetic will open a can of worms...
I was thinking about adding types to variables and basic operators, to allow for better runtime error reporting and maybe faster execution, but if that's involve registers things might get hairy..
 
@MartinScharrer When copied from the documentation of standalone, the code has spurious whitespace around the words including commands e.g. \ documentclass { beamer }. Just to let you know :)
 
@StephanLehmke We came to the conclusion that as a 'local' register in TeX is grouped for assignment as well as for allocation, doing global allocation but local assignment made the most sense. There did not seem to be a gain to using local allocation when we looked at this, as it's not the same as local allocation for a functional language.
 
10:09 AM
@JosephWright I'm not criticizing the decisions made by the LaTeX3 team. OTOH, the scoping rules of TeX are probably one of the most difficult things to grok for programmers, so it might make sense to provide a programmer's interface where block structure agrees with group structure.
 
10:20 AM
@percusse This should be caused by listings. A recent change in the settings should have fixed it. I just tried the code example in the current version and it works fine. Which version do you have?
 
@MartinScharrer Ah, I have the latest version on the computer but I was using the texdoc version. Indeed it is fixed, sorry. :)
 
@StephanLehmke Well, as I'm used to TeX and other languages where there is no scoping of variables based on functions, so to me it's quite straight-forward :-)
 
@MartinScharrer I have just updated to v1.1a. It keeps getting better and better!
 
@percusse Thanks. The spaces come from the standard setting of listings.
 
10:52 AM
Hold on until I port TeX to my toaster, then you'll see how I'd easily run out of registers. Two registers are already allocated for bread. :)
3
 
Even worse all the temp variables would be converted to °C.
 
11:05 AM
LOL
 
 
2 hours later…
12:45 PM
Cough syrup = \expand\cough? :)
 
@PauloCereda I would say rather \@gobble\cough ...
 
@tohecz Ah! :)
 
@StephanLehmke there are cases where one is missing them, but providing something that goes so much against the nature of TeX means you would need to keep state to an extend that you really don't want (and only for a few cases where it comes in really handy).
 
@FrankMittelbach @StephanLehmke I have to agree with Frank here. I'm really really happy with the fact that the only "active" white-space is <newline><newline>^+
 
1:15 PM
@tohecz I think there's a misunderstanding here. In programming "block structure" means the nesting of procedure definitions. In particular, as a general rule if I define a variable outside of all procedures, it will be (defined and assigned) global while if I define a variable inside a procedure, it will be (defined and assigned) local. This is also called static scoping while TeX (like a lot of script languages) uses dynamic scoping.
 
@StephanLehmke oh ok, sorry for misunderstanding...
 
@StephanLehmke I think dynamic scope is very suitable for DSL's and some markup languages. :)
 
... and introcude command like \static\def\x.... ? That would change the meaning of \x only inside the now-defined macro?
... on the other hand, it would be very fragile considering TeX's way to use macros, e.g. you often have \def\macroA#1#2{some_action_on_arguments_1,2\macroB}, then \def\macroB#1{some_action_on_argument_3} instead of \def\macro#1#2#3{...}. This makes even the definition of "locality" very problematic...
 
1:42 PM
@tohecz I'm sure this wouldn't work for the usual way of programming TeX macros. But then again, most macro packages are write-only. I've observed a remarkable reluctance of even seasoned TeX programmers to read and build upon the code of others. But in particular with LaTeX, the way of writing "commands" is different. Look at the ifthen package, for instance. I doubt the majority of LaTeX users who can write a "command" would understand the macro scheme you're citing.
 
2:01 PM
@StephanLehmke Well, wouldn't \def\macro{\begingroup...\endgroup} be sufficient to most cases then?
Damn, \begin{relax} says "Environment relax undefined."
Ah ok, \begin{@empty} works good.
 
@tohecz Yes: \@ifundefined{relax} returns true. Every token whose meaning is equivalent to \relax is considered "undefined" for this test (also really undefined ones, because the token is built with \csname).
 
(if you asked for a reason, I would call it "named" grouping...)
 
@tohecz That's the basic idea. But in addition to that it would be nice to have return values (which are transported out of the group) plus local variables. And that's the beginning of the discussion: Local macros are easy, local registers are hard.
 
@egreg I know the reasons, it was sorta LaTeX prank
 
@tohecz Relaxing is just so hard with a work beast like LaTeX, it doesn't even know what that is :-)
 
2:10 PM
@Stephan: \def\let@return{\let\return\@return} and then in the "procedure" something like \xdef\@return{#1.#2.#}\aftergroup\let@return could help I think
 
@egreg: A friend of mine linked me to this photo: twitpic.com/9qm3ci The first two from left to right: IMHO the best Brazilian players of all time. :)
 
@PauloCereda One can safely say that they were pretty good players. :)
 
@egreg Indeed. :)
 
@tohecz Yep, that's the way it's done :-)
 
@StephanLehmke Lol ok, my first true experience with \after... or \every... primitives
 
2:14 PM
@tohecz One of the nicest tricks is \aftergroup}
 
@egreg what?
 
@tohecz This saves the closing brace for after a group, but as far as the brace balance counter is concerned, this is a closing brace. :)
 
is it something like \iffalse}\fi ?
 
@tohecz Yes, but they have different uses.
@tohecz It's worth studying how \lrbox is defined, for this \aftergroup}
 
@egreg kk, it is an item 516 on my "list of things to do after my final masters exams"
 
2:22 PM
@tohecz It's on page 126 of my book. If you know Italian ... :)
 
@egreg And one of the most annoying things is the way \aftergroup is used to manage colors. It sure does its job, but it makes it so easy to introduce subtle errors... :-(
 
@StephanLehmke Happily David is not online at the moment. :)
 
@egreg So you should have written @DavidCarlisle :-)
 
@StephanLehmke Shhh!
 
Speaking about colors, tell me, is \begin{document}\color{black}Hello\end{document} equivalent to \begin{document}Hello\end{document} as far as the package xcolor is loaded?
 
2:28 PM
@tohecz Nope, I believe text will have no color at all if you don't explicitly set it. So for instance, if you include a PDF generated this way later with \includegraphics, the text will come out in the current text color of the including document.
 
ok, and can one say something like \color{no} ?
 
@tohecz Furthermore, this is typical for the way \color shouldn't be used. You'll have oodles of color switching stuff on the vertical list, with unpredictable behaviour.
 
@StephanLehmke I don't think so (I did a test, indeed). File 1 (lemkecolincl.tex)
\documentclass{standalone}
\usepackage{xcolor}
\begin{document}
Hello
\end{document}
 
Consider it a MWE, I don't do that. I just ask if I can "un-colorify" something...
 
File 2 (lemkecol.tex)
\documentclass{article}
\usepackage{xcolor,graphicx}
\begin{document}
\color{red}
ABc \includegraphics{lemkecolincl} DEF
\end{document}
If I compile the first and then the second, the "Hello" is black.
Sorry for the missing "h". :)
 
2:37 PM
@egreg Yep, you're right. xcolor indeed does \color{black} at the end. I'm not completely sure I'm happy about this :-)
 
@StephanLehmke It's the same with color.
 
@tohecz So the correct answer is "both are equivalent, discounting possible complications of \aftergroup madness".
@egreg Indeed. So I was wrong and this only happens if no color package is loaded at all. Memory isn't what it used to be :-)
 
@egreg All my test files are labeled test<counter>.tex. I don't think it's intuitive when I want to find a specific file. :P
 
@PauloCereda Mine are labeled more or less at random.
 
@PauloCereda same here :-)
 
2:51 PM
@StephanLehmke :)
 
nobody uses mktemp for generating test files?
 
@egreg At least your files seem to have a more semantic name than mine. :P
 
@PauloCereda I use a name, sometimes, or something related to the problem. It rarely happens that the name leads to an old file where a similar problem was analyzed.
 
@egreg Ah. :)
 
@StephanLehmke From memory, one of the big issues we had with 'local' registers (and macros) was that you still need to keep a track of what is defined in relation to TeX groups. If we imagine doing something of the form \def\foo{\begingroup\newlocaltoks\footoks, then if we use \foo again inside \foo itself the local assignments don't 'disappear'. That's not what happens in functional languages, and so it did not really seem to help programming TeX.
 
2:58 PM
@JosephWright With etex.src approach the allocation is made in the same way as usual (starting from the end of the pool), so a new \localcount\foo will allocate a different register. Not sure if it's really useful.
 
@egreg Yes, but one of the early LaTeX3 decisions was that allocating 'new' items should check for an existing allocation: not sure what the expected behaviour would be. As I said, the big issue was that you still need to have the \begingroup, so why not just allocate globally and set locally.
 
@JosephWright As I said, I'm not criticizing the decisions made fot LaTeX3. I was just trying to argue that there could be uses for that kind of thing. Furthermore, I don't understand your example. Surely, \newlocaltoks would reset \footoks to a neutral value when called recursively? Otherwise, havoc would result if I call all my local variables \i ;-)
 
@StephanLehmke As I've just said to @egreg, it would raise an error due to the prior existence of the csname
@StephanLehmke No, I understand. Just trying to explain the reasoning. We did try it for quite a while, but it was all about the benefits versus the additional complexity.
As we have no namespacing in TeX, the best approach seems to be to insist that all names are globally-unique
One problem seemed to be that there was a danger of people coming from other areas trying something of the type \def\foo{\newlocaltoks\footoks ... without the grouping and wondering why it did not work
Or at least 'work as expected'
 
@JosephWright But one can do \cs_set:...: functions can change meaning (and should be able to, of course).
 
@JosephWright Yes, but still one could reuse registers by letting the global names to \undefined. The basic idea of keeping the meaning of a global name can easily fall down as soon as people (like me :-) try to define register arrays with \csname.
 
3:06 PM
@egreg Yes, that is true
@StephanLehmke There are some open questions about how best to handle arrays :-) For example, property lists are currently done as a single csname 'packed' with data, which works well for small lists but less well as they grow. On the other hand, one csname per entry makes copying harder and impacts on performance generally as it fills up the hash table.
I added some code for 'data tables' (l3dt), which seems to be on the wrong side of the performance question, when compared with say datatool, which uses a hybrid approach of about half a dozen csnames per table.
 
@JosephWright I had imagined that LaTeX3 offers a higher level interface to defining macros. Then there could be one with implicit grouping. One could disable local registers everywhere else.
 
@StephanLehmke Yes, I can see that concept but then what happens if you assign a local variable which is not local to that particular macro?
One thing I've said before is that we could talk for twenty more years about the 'best' approach for LaTeX3 (concepts, syntax, ...) without delivering anything, and while I'm keen to retain 'flexibility' we also need to have some decisions made. The only way to really test these things out is to write code which is actually usable, and that requires some confidence that things will stay about in some way.
What I notice is that although etex.sty offers local register creation, LaTeX programmers have survived mainly with the assign-globally approach. It works reasonably well with TeX's flat namespace and macro expansion basis.
 
@JosephWright Way to go. And if the notation is sufficiently general it'll be easy to add things with packages :-)
 
@StephanLehmke Well yes. One can imagine reintroducing new_local variable creation if needed
What I want to do is get the 'big problems' sorted. Now, if I can just get someone to sort out the OR ...
 
3:25 PM
@JosephWright One may need those for, say, a big "one-time" computation: doing it with (local) registers and not with \int_eval:n can save much time. But it's difficult to think of an application that requires thousands of registers, connected to real typesetting and not of the "let's-do-it-all-with-TeX" kind.
 
@egreg As you say, it's a question of dealing with 'real' problems. I suspect @BrunoLeFloch would point out that the way to do that sort of thing is to use a group then access registers by number, not name, to avoid filling up the hash table :-)
@StephanLehmke's problem for 'big databases' are probably borderline for the aims of LaTeX3: they do seem to be best addressed with custom code built from the ground up
 
@JosephWright And be sure of not using any "global" register of the same kind, of course. :)
 
@JosephWright This is certainly true for systems like DocScape, FO or DocBook processors. But I believe that data based publishing, CMS, Web2print and such are on the rise. Why shouldn't LaTeX3 cater to be a backend for laypeople wanting to do this kind of thing with a free system?
 
3:43 PM
@StephanLehmke Perhaps I should have phrased that slightly differently. I meant that the first target has to be to get something which can deal with 'small' documents (a book, a report, a thesis, ...). As you say, database driven work is important, but there are specific challenges for very large databases that may need specific tools that at this stage we are not in a position to tackle. Does that sound reasonable?
@StephanLehmke I'm not ruling stuff out, but want to have some intermediate goals. The LaTeX3 idea of separate formatting from processing, for example, should fit well with data-driven input.
Also, it's a team effort, and different people bring different ideas :-)
 
@JosephWright Of course. As I said, I'm not at all demanding anything. For sure the classic manually edited LaTeX document, which will make about 99% of the use base, has to be in focus. Furthermore, writing any kind of automatic system always means one can afford to put a lot of work into the basic programming (as a lot will then be generated automatically), so writing dedicated extensions should be part of that work.
 
@StephanLehmke Yes, true. All of this is very useful input :-)
 
@DavidCarlisle 2^n doesn't go up that quickly for small n. 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4092..ok, I forget 8k as I've only used it twice.
 
@JosephWright For very large databases it's probably much more convenient to have a way of querying with an external program. TeX shouldn't be misused for doing what is better done differently. Of course "small databases" are a different cup of tea. But if one is typesetting an English dictionary, with scores of examples for each term among thousands of them, ...
I guess that Lua can have a big part in integrating external calls. But it's a different job than LaTeX3
 
4:02 PM
@egreg Well I at least wasn't talking about querying a database with TeX. Hereabouts, querying is done with SQL, then structuring, transforming and aggregating with XSL, leading to an XML representation of the document content. But still, depending on the size and complexity of the database, this XML can be quite large and deeply structured. Furthermore, if a lot of design decisions wrt. aggregation depend on the size of things, those have to be done with TeX.
 
@StephanLehmke Or using a program that makes those decisions using LuaTeX. ;-)
 
Do not despair, gentlemen. I'll work on LolTeX. :)
@StephanLehmke It's a very nice workflow. :)
 
4:40 PM
@egreg I'm not completely sure what you mean by this, but if you're thinking about generating something like a pre-formatted "content" stream, that's the FO approach which is vastly inferior to what DocScape offers.
 
5:03 PM
@StephanLehmke I'm not an expert in this field: I use to write my own documents myself, so XML is similar to Greek for me. :)
 
@egreg XML is easy! It's a human-readable format, it's just not human-comprehensible. :)
 
@PauloCereda I agree with the second part ;-)
 
5:20 PM
@PauloCereda Like politicians' talks: every word has a meaning, the whole set hasn't.
 
@egreg Pretty much the same. :)
 
@egreg :-) Basically, XML as is is only syntax, no semantics. Of course, you can assign a semantics to a certain XML syntax specification. XML formats with predefined semantics are FO, XSL, RNG, SVG etc. The semantics of the DocScape data files are just the data itself :-)
 
@StephanLehmke Out of curiosity, how do you map data to page elements? I imagine it's a template-like method to assign chunks of data to well-defined layouts. :)
 
So, who's going to write the XML parser for LaTeX3 [looks at @DavidCarlisle, but thinks it will be @BrunoLeFloch or me ;-)]
 
@JosephWright David is busy today, he's watching the Queen. :)
You should too! :P
 
5:25 PM
@PauloCereda That was yesterday :-)
 
@JosephWright Oh. :) Maybe her Highness loves boat rides. :)
 
@JosephWright But it's a four day holiday! Be grateful to old Lilibet.
 
@PauloCereda I saw about 5 minutes: the highlight for me was one of the younger royals taking a picture of the event on her smartphone :-)
@egreg Yes, that is true. Some form of pop concert tonight in London
 
@JosephWright So David will be in London, with the excuse of bringing there his son. :)
 
@PauloCereda Exactly. There's a markup language for laying down the design. It's a bit on the level of LaTeX markup, but instead of writing down the content immediately, you can access the XML data content in a structured way.
The semantics behind the "design markup" is a bit different from LaTeX however. Instead of producing content elements which are contributed to the vertical list, you "place" stuff on a design grid. Much more similar to textpos or flowfram, but with a lot of bells'n'whistles.
 
5:30 PM
@JosephWright Ah the technology. :) I say the Duchess of Cambridge with her red dress - here our TV narrators don't do their homework about the United Kingdom, so they reduce their comments to general stuff about fashion. :)
@StephanLehmke Brilliant! It seems a very clever implementation. :)
 
@StephanLehmke Well we still need to sort the design layer for LaTeX3, so there may well be lots of questions!
 
@JosephWright I received a request for a demo from "the LaTeX3 team" (in the person of Frank), but for reasons unknown to me, our CEO is a bit hesitant to come to a decision. Mind you, it's all in german currently...
Well DocScape has the honour of having been treated to an open source clone (by another regular here), so you can always look at that :-)
 
5:52 PM
Should we close this question as too localized. The op found a solution (see last comment). I think the linked bibliography style isn't a standard style and so doesn't related to TeX.SX
2
Q: References showing question marks

Samer AfachIn LyX, I'm using the reference style apsrev.bst, which I downloaded from here: http://www.maik.ru/pub/tex/revtex4/ This reference style is the one used in Physical Review. But now when I add references, they show up as question marks in brackets (?). Why does this happen? how can I fix it? ...

 
@StephanLehmke But it is not written in LaTeX and thus no complicated grouping/register problems ... :)
 
6:10 PM
@StephanLehmke Yes, I did see that
 
I need an upvote to reduce the unanswered list
4
Q: Remove comma after title ending with questionmark

JohuI am using a bit modified bibtex style but with quite common base. It is based on utphys 2.7 which is based on "IEEE Transactions bibliography style (29-Jan-88 version)" I'd like to remove comma after titles ending with question marks. Some automated hack will do. (Not changing the bbl) Bibtex ...

 
@StephanLehmke: I have a simple project of mine in which the dataset is mapped to page elements. But the heavy work is performed by the template engine itself, not TeX. :) Thankfully, I could incorporate several lambda functions to it. :P
 
@PatrickGundlach Right. But I thought the discussion at hand was mor about the "design markup" layer.
 
 
2 hours later…
8:00 PM
@StephanLehmke My fault. I didn't read carefully enough.
 
8:12 PM
\documentclass{standalone}

\usepackage{adjustbox}[2012/06/04]
\usepackage{xcolor}

\begin{document}

\begin{adjustbox}{background={\textcolor{green}{b\phantom{o}x\strut}},foreground={\textcolor{red}{\phantom{b}o\phantom{x}\strut}}}
    adjust\strut
\end{adjustbox}

\end{document}
 
8:37 PM
@MartinScharrer Is this the new logo?
 
9:06 PM
@egreg I'm actually just playing around.
For a logo the colors aren't right.
 
9:28 PM
@MartinScharrer Yes, the "o" should be white and the "x" red. And the green should be slightly darker. :)
 
 
1 hour later…
10:43 PM
@JosephWright: I use xkeyval and have a value which contains a comma; actually some key=values as well: \adjustbox{key={a=1,b=2,c=3},...}{...}. For some reason the commas in the values break things in a weird way.
The {a=1,...} part actually is taken as part of the adjustbox content! Looking at the log file xkeyval actually sanitizes the value and scans it for ,! No idea how it will handle it from here. Do you have any idea how to fix this? I find this features of xkeyval very strange.
 
11:19 PM
@egreg had a road to close and cake to eat. It's that kind of weekend in this part of the world....
 
@DavidCarlisle Long weekend, it seems.
 
@Canageek yes but n isn't that small, I wrote "something" as I was dashing out, but etex gives you registers up to 32767 which should be plenty if you are not @StephanLehmke
@egreg it's not finished yet, tomorrow as well-)
 
@DavidCarlisle No travel to London for the party?
 
@egreg no we had various sports in the morning (tug of war, egg and spoon etc, then we closed the high street and the entire population of the village (~200 people) sat at a long table down the centre of the road and ate tea and cake and sandwiches, then we retired to the pub for the evening. Not a drop of rain:-)
 
11:38 PM
@DavidCarlisle Wonderful! I'm glad you found the road home, after the evening at the pub. :)
 
@egreg There is only one road into the village, and then a square of four roads, so it's hard to get lost (and I only had a pint:-)
 
@DavidCarlisle It reminds me of a very similar small village where I was for some days years ago, in Dorset. It's called Marston Magna: nobody can find Marston Parva, of course. :)
 

« first day (582 days earlier)      last day (4353 days later) »