« first day (586 days earlier)      last day (4340 days later) » 
03:00 - 21:0021:00 - 23:00

3:14 AM
@DavidCarlisle Well it's not only useful for applications apart from TeX which want to read those files (simple made-up example: sort foo.aux) but also for TeX itself. \newlabel is not expecting to find typesettable stuff but a character sequence, which some text in UTF8 undeniably is.
@egreg But with the way inputenc currently works, you only have the choice between the original UTF8 (or latin-1 or whatever) encoding or the typesettable macro representation. I'd rather have some robust unicode-based macro representation which could be defined to different things based on whether stuff is being written to a file, used inside \csname or whatever.
@DavidCarlisle This is great! I was concentrating a bit too much on the fact that the UTF8 characters are defined directly to their typesettable representation. But for UTF8, of course, there is also a "parsing" stage when the character is read where things can be shuffled around. So the solution really is easy to implement.
 
 
2 hours later…
5:46 AM
@Jake: Sorry, did not see your comment before posting answer: tex.stackexchange.com/questions/59006/…
 
6:08 AM
@PeterGrill That's alright. It's good that you answered.
 
6:41 AM
@percusse: I totally bought the idea that there was a \usepackage{tikzemoticon}. I guess I should have noticed that it was not \usetikzlibrary{tikzemoticon}. Re: Something between \frownie and \smiley
 
7:16 AM
@PeterGrill It's my fault. I was too excited to comment on it without constructing the sentence properly :) Sorry again.
 
7:37 AM
Oh no, I have to teach some tikz today - 6 hours time to learn it.
 
@PatrickGundlach Just like I felt back in university before giving the next lecture ("Aha, so graphical interfaces in PROLOG are constructed with tcl/tk. WTF???")
 
@StephanLehmke I've learned a lot this week: biblatex/biber, amsmath, ... and now tikz
 
@PatrickGundlach Thumbs up!
 
7:52 AM
Maybe one day I can answer other questions than those related to LuaTeX.
 
Soon you'll find yourself prefering clean TeX macros to nasty Lua!
3
 
@StephanLehmke :)
 
8:53 AM
@PauloCereda: texdoc.net/pkg/siunitx points to an old version of the siunitx documentation (2.4j, while CTAN has 2.5c). Is that fixable?
 
9:07 AM
@Jake: We need the text building block "How do I read the documentation"
 
@MarcoDaniel The title should be "Read The Fantastic Manual"; maybe with an acronym. ;-)
 
@egreg Indeed
 
mhp
@egreg Thanks, I’ll install the regexpatch package in my TEXMFHOME.
 
@mhp You should really try \regexpatchcmd: it's more complicated to use (you need regexes), but it lifts away many limitations from \patchcmd.
 
@StephanLehmke I believe it's not exactly coincidental that that stage looks a bit like xmltex processing:-)
 
mhp
9:21 AM
@egreg I’ll do so. But I think I have to look into the l3regex documentation first. Regular expressions in LaTeX, that sounds like a new era :-)
 
@mhp They are similar to the POSIX ones, but of course the category codes increase the fun.
 
mhp
@egreg I have just another question: With \xshowcmd of the xpatch package, you can do something like \xshowcmd{\OT1-cmd} or \xshowcmd{\OT1\string\textendash}. With the regexpatch version of \xshowcmd you have to resort to \expandafter\xshowcmd\expandafter{\csname OT1-cmd\endcsname}. Is this by design?
 
@MarcoDaniel Hehe, yeah, that would be useful. Although it's quite rare to get three questions in a row requiring that building block...
 
9:41 AM
@mhp It's the first time I see that \xshowcmd{\OT1-cmd} works with xpatch: I'd call this a feature. :) But I'll try to add it also to regexpatch.
Maybe \xshowcmdname
 
mhp
10:02 AM
@egreg I’d find one command that is directly able to show (nearly) all control sequences extremely useful :-)
@egreg Probably, you know this: The etoolbox package implements something similar to \xshowcmdname: \csshow.
 
@mhp Actually I'd classify \xshowcmd{\OT1-cmd} more like a bug than a feature. What do you say about \xshowcs?
Or \xshowcsname
 
10:22 AM
@Jake Yes. :) Maybe it's a caching issue. Since the website runs texdoc under the hood, it's just a matter of updating the underlying TeX Live in the server. :)
@StephanLehmke A professor of mine (an expert in compilers) always said that "a good Prolog interpreter is written in Lisp". :)
 
mhp
I’d say \xshowcmd and \xshowcs would form a good couple. It’s easy to replace one by the other then.
 
@mhp Yes, that's what I decided to do. :)
@mhp And, in the present form, it allows \xshowcs{OT1\textendash} so one doesn't need to escape.
 
Guys, a quick advice. I'm creating an additional index (index party yay!) for authors, and I thought of the form "Lastname, Firstname". It happens that I also have some people with "titles", e.g, "Sister Míria Kolling". I already have all "parts" of the name correctly split, should I include the titles in the index?
- Kolling, Míria
- Kolling, Sister Míria
- Kolling, Míria (Sister)
- Kolling, (Sister) Míria
 
10:39 AM
@PauloCereda Third form, I'd say.
 
@egreg Thanks! I was thinking of the third one too, but I wasn't sure if it was a good practice. :)
 
mhp
@egreg Impressive! And this also works with active characters in the control sequence name, e.g. \usepackage[english]{babel}\makeatletter\xshowcs{active@char~}\makeatother?
 
@mhp \xshowcs{active@char~} gives
> \active@char~=macro:
->\if@safe@actives \bbl@afterelse \csname normal@char\string ~\endcsname \else
\bbl@afterfi \csname user@active\string ~\endcsname \fi .
The name is grabbed "verbatim".
 
@PauloCereda on handling personal names: blog.jclark.com/2007/12/thai-personal-names.html
 
10:56 AM
@DavidCarlisle Ouch my brain hurts! :P
Best part "[...] While the given and family name are conventionally written separated by a space, there is no separator between the honorific and the given name."
@percusse: new smiley coming up: \umadbro. :P
 
@PauloCereda That's for Thai, of course. Curiously, most Italian family names with "Di" or "De" have been changed in the US: "De Lillo" becomes "DeLillo" with a peculiar capitalization (similar to Mc or Mac).
 
mhp
@egreg OK, then \csshow from the etoolbox package is still handy in situations where we need full expansion, e.g. \usepackage{suffix}\WithSuffix\def\test*{test}\csshow{\SuffixName\test*}.
 
Of course, Mac is quite strange: one can find "Mc Xyz", "Mac Xyx", "McXyz", "MacXyz" and even "Macxyz".
 
@egreg Ouch. :) How do you index the family name in this case? We also have similar names with "da/de/das" in lower case. "Luiz Inácio da Silva" (former president) is indexed as "Silva, Luiz Inácio da" or (awkwardly) "Silva, Luiz Inácio".
 
@mhp That's a challenge! Of course the two situations are very different.
 
11:10 AM
@egreg Now that you mentioned, when they broadcasted the Champions League final, Di Matteo's name appeared on screen as DiMatteo. :)
 
@PauloCereda It depends on national traditions.
@PauloCereda Probably they want to underline the fact that it's a single surname. Nobody in Italy would join it.
 
@egreg Indeed. :)
Just like Alfredo Di Stéfano. :)
 
@PauloCereda Whose family gained an accent going to Argentina. :)
 
@egreg True! :D
@egreg: My mom's name got an accent too. :) From Lucia (which could be mapped to Luzia) to Lúcia. :)
 
@PauloCereda Haha! Sweet. I'm really waiting something spectacular from you in the end as a package.
 
11:20 AM
@percusse The package would be easily blacklisted from CTAN. :P
 
@PauloCereda But it would exit with a bang!
 
@percusse :D
 
mhp
@egreg One more comment: \xshowcmd{\par} doesn’t work, but one never knows what \par has to conceal ;-)
 
12:10 PM
@mhp I'll make the command \long. In some situations it may be useful to see what actually TeX is thinking about \par. Even if it's redefined, it's disallowed in non \long commands
 
12:35 PM
@mhp \xshowcsexpanded?
However, one who can use \SuffixName\test* should have no problem in saying \expandafter\xshowcmd\csname\SuffixName\test*\endcsname
 
1:10 PM
Guys, I'm currently looking at describing the actions possible with the box/glue model of TeX and wonder if I have covered all major cases. Am I missing something important?
 
@FrankMittelbach You mention vrules but not hrules; and there are no leaders. :)
 
@egreg thanks ... wanted to change that part but forgot. those rules can only be used in either h or v mode but not both, so it is wrong
@egreg leaders is an extra complication that i anted to keep out, it is not really adding anyhting in addition other than being a fancy form of glue (sort of)
 
@FrankMittelbach "TeX treats leaders as a special case of glue; no, wait, it's the other way around: TeX treats glue as a special case of leaders." :)
I agree that they are not so relevant here.
 
@FrankMittelbach doesn't really fit in your diagram but you might want to note math lists -> hlists somewhere (as otherwise people may miss math mode in hmode/vmode legend) especially "all modes" bit
 
1:25 PM
@egreg so the quote from the TeX book. But for my purpose I think they provide anything in addition. I wonder if i should throw out the hrule and vrule too. If i add them they are nothin other than another set of objects sitting aside to horizontal glue and vertical glues as input to the building actions
@DavidCarlisle hmm, how? as mathlists -> "build horizontal sequence of ..." ?
 
@FrankMittelbach perhaps just by changing "all modes" to say "h and v mode" (and ignore math here)?
@FrankMittelbach also I'm not sure exactly which operations you are targeting you have remove last box but not \unpenalty and friends.
 
Potential follow-up question to tex.stackexchange.com/questions/55995/…: how do I produce the transpose of a matrix without any extra work?
 
@FrankMittelbach You could use "rules" (and leave to the technical details the distinction)
 
@AndrewStacey put ^T at the end?
 
@AndrewStacey I believe to have already seen that one.
 
1:31 PM
what I'm trying to get to is that the whole model is largely a oneway street with a few execeptions. That is once you are in the read block you stay there and the only way out is to get at the last box (and obtain an hbox if it is one)
 
@FrankMittelbach well yes I know, you've been saying that since before TeX3 I believe:-)
 
@DavidCarlisle yes and it hasn't changed unfortunately as I didn't managed to convince Don to put in \reconsider paragraph or somehting
But now I have nice visual tools to show it in a graphic
anybody with LuaTeX experience on? @Patrick? My claim would be that LuaTeX is not offering anything to overcome this, or does it?
 
@FrankMittelbach I didn't follow the discussion, need to read the last few entries ... (give me a second)
 
I think it depends on what words introduce the graphic in its final context but if I just saw that cold (as I am doing more or less) I'd worry about it showing \lastbox but not \un-everything else as you show lists being built up but not deconstructed with glue and kern. But I wouldn't make the document more complicated, just choose words carefully to describe what it does show
@FrankMittelbach oh I'd rather hoped without looking that luatex would let you save the horizontal list of a paragraph and re-set it in various ways??
 
@DavidCarlisle I think unpenalty and \unskip \unkern have to go in somehow will think about it
 
1:39 PM
@FrankMittelbach I can't help thinking that there's a potential board game in there. "Throw a six to get out of hbox free".
3
@DavidCarlisle Sadly, sometimes you actually need to show an example of what ^T actually does.
Any Brits (or residents of Britland) got any strong opinions on internet service providers?
 
@AndrewStacey \let\halign\valign ? (never actually tried that, what could go wrong????)
 
@DavidCarlisle do you? ... that would be great but ... I seriously doubt it as that would mean changing the inner TeX concepts
 
@DavidCarlisle That's crazy enough that it might just work ...
 
@FrankMittelbach you are referring to the "oneway street"? I am not sure what you are really aiming at (my little TeX experience), but you can always switch to "the lua side" and construct/deconstruct/analyze any box there
 
@FrankMittelbach I've spent longer chatting about your picture than I have spent looking at luatex, so I could be wrong.
 
1:41 PM
Is there a way to write several lines to one file using \write (for tex.stackexchange.com/a/58961/2552)?
 
@Jake yes just use ^^J (in latex) to denote line break or whatever character is the newline char locallt
 
@FrankMittelbach besides that, there is no enhancement in LuaTeX that I am aware of
 
@PatrickGundlach oh shame, so you can not get the horizontal list of a paragraph in lua before TeX breaks it into a vertical list of boxes and glue?
 
@PatrickGundlach ok here is the task: given some input "text" as tokens (withTeX macros included) now I want to tern that into TeX stomach material, eg hboxes/vboxes and then reuse the result to try out different paragraph settings
@PatrickGundlach in TeX this is not possible because the moment you move through the paragraph builder once, you have lost material that you can't get back ever
 
@DavidCarlisle Ah, excellent! Cheers!
 
1:46 PM
@PatrickGundlach and you can't typeset everything into an hbox either because vertical material will intervene or fail
 
@FrankMittelbach There is the pre_linebreak_filter that let's you modify the material, but at that moment one only sees the pure nodes, no \macros or braces anymore
 
@PatrickGundlach that sounds like the right sort of thing:-)
 
@DavidCarlisle With the markable difference that xmltex offers all neccessary protection mechanisms for handling UTF8 properly and even installs them in LaTeX commands like \protected@write and \protected@edef.
 
@PatrickGundlach yes that could be something in the right way, but I'm suspicious of the word "filter". What does it do? can you point me to some docs or explain?
 
@DavidCarlisle you can then call tex.linebreak() with different parameters (hsize for example) to get different results
@FrankMittelbach don't worry about the word 'filter', it is just a callback and you can decide yourself if TeX replaces the node list by what you provide (a filter) or if it take the original node list (so you can only analyze it) or you can return 'nil' from the function and it will not place anything in the output
 
1:50 PM
@AndrewStacey I don't think so: cells in a \valign are typeset in a \vbox that, of course, receives the current \hsize as soon as a paragraph is started.
 
The LuaTeX manual has a description of the pre_linebreak_filter
 
@PatrickGundlach so would that offer me to save the whole material for the paragraph simply in an \hbox rather than breaking it in lines?
 
@FrankMittelbach you can call node.hpack() to construct a hbox out of the material
But I might be unaware of things that possibly can't be put in a hbox (as I said, my TeX knowledge is very limited)
 
@PatrickGundlach and so is my luaTeX knowledge (so far) so perhaps we could complement each other.
so what would I need to do if you want a TeX command \savepar<box register> that works like \par ie ends a paragraph, but then instead of linebreaking it saves the hlist in <boxregister> --- complicated?
 
@Frank Yes, sure! (but I have to leave now - I'll be here the next days)
 
1:57 PM
@egreg minor details:-) which some redefinition of tabulars makepreamble could overcome....
 
@PatrickGundlach ok I might count on you ... unless I solved that myself by then
 
@FrankMittelbach But it should become clear there can be things on a list which can't be removed - that's the most fun part of it after all ;-)
@FrankMittelbach It has always been my greatest dream to have a primitive which would convert a box into a token list representing exactly the nodes inside the box - just like shown by \showbox. And another one which would convert that special tokenized form back (after I've made some minor corrections :-)
I can't believe it would be so hard to do as \showbox is more or less doing exactly that - only writing out text instead of tokens which could be parsed easily.
@FrankMittelbach Another strangeness is that you can find out whether the last item on a list is a box, but not for a penalty or skip. So you have to do \unskip\unskip\unskip in the hope nobody will put four skips in succession :-(
 
2:23 PM
@JosephWright, @AndrewStacey, @AlanMunn and other blog writers: I wrote a polemic (I guess) blog post and I really would like your impressions/advices. :)
It's in the draft area. :)
 
@StephanLehmke With e-TeX you can query \lastnodetype and take the appropriate action.
@StephanLehmke See, for instance, tex.stackexchange.com/a/28070/4427
 
@egreg Wow, thanks for the reminder. I know I read that something about this in the manual and thought "how cool" at the time, but I seem to have forgotten again ;-)
 
2:39 PM
@PauloCereda Nice, but I'd say too much polemic, not enough potatoes. It's a laudatory stance, and one I'd readily agree with. But for me, as a mathematician, the problem isn't the fear of people stealing your ideas but of the fear that no-one is ever going to be interested in them. Ever. I'd happily share ideas and methods, but there's not a good way of doing it (well, we're working on that - it's why I got involved with the nLab). (ctd)
I think that TeX has some marvellous features that make it an ideal base for code-sharing. One of which is that who cares if someone steals your idea? If they implement it, and you don't, you get more time for the stuff you actually get paid for.
 
@StephanLehmke There is the big limitation that only boxes (not rules), penalties, kerns and glue can be removed. You can't remove mathoff and mathon items from a horizontal list, or whatsits and so on. Of course you can do it with LuaTeX.
 
@StephanLehmke you mean in standard eTeX? yes, that is true.
 
But it's been - up to now - hard for a casual TeXer (like me) to know where to start on contributing to TeX. That's one of the great things about this site: it enables those who can do but don't know what to do, to help those that can't do but want to do.
 
@StephanLehmke you can in eTeX, but it doesn't help if it is a type that you can't remove
 
So I'd make the article more of a celebration of the code sharing capabilities of this site, highlight some of the more collaborative packages that have come out of it - not the ones where someone's gone away and written a package, but the ones where the package has evolved in response to questions and answers on this site.
 
2:42 PM
@StephanLehmke just trying to figure out if luaTeX would give us that or not
 
Hmm, that gives me an idea. This could be a follow-up post: the evolution of the tikzmark. That started as just a snippet of code in one of my style files. Now it's something {\Huge Huge}.
But it was all through code and idea sharing, as you advocate.
 
@egreg But now at least you know what it is you can't remove and can chide the user for putting something nasty like this on the list in the first place ;-)
@FrankMittelbach Or pdftex. A lot of new whatsit nodes which can clutter up lists.
 
@AndrewStacey: Thanks for the feedback, Andrew. :) I'll revisit it and add your remarks. :) I wrote it in a hurry. :) My main objective was to make use of potatoes, lotsa of them! :P
At least things here in Brazil are very bureaucratic and political (my PhD misadventure proves it). Here it seems things work in a need-to-know-basis.
 
@FrankMittelbach I'm already biting my fingernails from suspense - that would really be a great step forward!
 
@PauloCereda I completely agree with the tenor of the post and that often even OSS projects seem to be a bit "need to know". I just think that often the barrier is not "why?" but "how?".
 
2:55 PM
@AndrewStacey Good idea! I'll rewrite some parts. :)
 
3:23 PM
3
Q: Can human push earth away from the sun?

Xiè JìléiIt's said the earth is approaching the sun. Can we push it away little by little? Although we can emit rocket towards the sun, but it's too expensive to make a rocket: So I think maybe we can recycle the rocket, at first, the rocket is send out with a very fast speed, so give back a big force...

Show we add a TeX answer? :P
 
@PauloCereda \tikz\push[away]{Earth}{Sun}; Maybe one needs the usual ton of \tikzset options.
\tikzset{away/.style=...}
 
@egreg You forgot the obligatory \tikzmark{sun}\tikzmark{earth}
 
@egreg LOL
 
@PauloCereda \expandafter\sun\distanceto\earth
 
@AndrewStacey LOL "marked as accepted!" :)
 
3:49 PM
@egreg I recently came across that "Giving up on this path" error when the TikZ parser got into an infinite loop trying to expand a \let so I guess that there's something similar going on with the \ForEach construction.
@PauloCereda Though if the object is simply to keep the earth at it's current distance, it might be better simply to do \noexpand\distance{earth}{sun}, or even \protect\earth from\sun. One could also put a strut in place with \hrule\sun to \earth (probably showing my lamentable ignorance of basic TeX syntax there).
 
Then, 1em becomes the capital M in Newton's law of universal gravitation, which is the diameter of sun ?
I don't know how many physics and TeX laws I broke in one sentence.
 
@AndrewStacey :)
 
4:28 PM
@AndrewStacey I've never met with the forarray package before. It seems overly complicated and TikZ needs to find its material in a surely different way.
 
5:13 PM
@egreg: can I ask you a newbie question? I'm ashamed of posting a question in the main site. /blushes
 
@PauloCereda Of course! Shoot! (By the way, I've just hit rep cap)
 
@egreg It's actually more of a curiosity. :)
3
Q: Formatting the index from the songs package

Paulo CeredaI've been using the songs package to generate songbooks. I've been tweaking the package for my needs, but one of the remaining issues is the \showindex command. Consider the following code: \documentclass[a4paper]{book} \usepackage[lyric]{songs} \usepackage[Sonny]{fncychap} \newindex{titleidx}...

lockstep's solution works like a charm. I was just wondering why the chapter title goes to the middle of the page when there are no indices. Everything works fine when there's an actual song indexed. :)
 
5:38 PM
@PauloCereda It seems that songs prepares a big box as high as the page. And I'm scared of going in depth into the package looking for the missing \vfill
 
@egreg Oh no! I'm sorry for the trouble! I just thought I was missing something important. :)
I tried to read the source, but my brain had an overflow. :)
 
Last exam tommorow! Summer vacation, time to take forth the latex gloves, gag ball and start texing =)
 
@egreg: sorry to give you so much trouble with my newbie question. :)
 
@PauloCereda Here's a patch:
\usepackage{regexpatch}
\makeatletter
\regexpatchcmd\SB@displayindex{(generated.*?)2fil}{\12fill}{}{}
\makeatother
 
@egreg Oh my! I don't know what to say! Thank you very much! :)
Would you like me to post an actual question in the site?
 
5:45 PM
@PauloCereda It's an example where etoolbox would have a hard time in patching, as 2fil is present also in other places.
@PauloCereda I don't think it's that useful. :)
 
@egreg Fantastic!
 
@PauloCereda With etoolbox it should be
\patchcmd{\SB@displayindex}
{{\hfil [Index not yet generated.]\hfil }\vskip \z@ \@plus 2fil}
{{\hfil [Index not yet generated.]\hfil }\vskip \z@ \@plus 2fill}{}{}
 
@egreg How nice! The first one is easier!
 
@PauloCereda Thanks to Bruno, of course. :) Without him there would be no \regexpatchcmd
 
@egreg I noticed the lovely regex in there. :)
 
5:50 PM
@PauloCereda I'm always surprised that it works.
 
@egreg With you, there's only a little chance of not working. :)
 
@PauloCereda It might be shorter. :)
 
@egreg With regexes, we must play safe. :)
I wrote a single regex to replace text in the \foo{ form: \\\\[a-zA-Z]+\\{
No L3 compliant, I'm afraid. :P
 
6:09 PM
\RequirePackage{expl3,l3regex}
\ExplSyntaxOn
\tl_set:Nn \l_tmpa_tl { \foo{abc} }
\regex_replace_once:nnN { \cC.\cB. (.*?) \cE. } { \1 } \l_tmpa_tl

\tl_show:N \l_tmpa_tl
@PauloCereda This will show abc
 
@egreg Cool! :)
My regex can't parse L3, it's for version 2.0. :P
 
@PauloCereda Of course this is a joke; if you want to operate on your document it's way better to use a text editor (or sed or Perl or your favorite tool).
 
@egreg Indeed. :) Since LaTeX is not a regular language, we can't expect regex to do everything. :)
0
A: automating compilation

Regis da SilvaHave you thought about using Rubber on Linux Terminal http://latexbr.blogspot.com.br/2011/11/compilando-com-rubber.html.

I'm not sure I like this answer. Regis pointed a link to his blog, but the article is in Portuguese.
 
6:34 PM
Why do people want to compile more? I want to compile less.
I often compile only a few times while writing, then I compile a few times to make everything look nice =)
 
mhp
7:07 PM
@egreg I also think that \xshowcsexpanded is rather a bonus and not a must-have.
@egreg Really interesting that \par is always treated as if its meaning were that of the original primitive.
 
@mhp Not completely correct. If TeX's scanner sees the token \par in the argument of a non \long macro, it issues an error, independently of the current meaning of the token.
@mhp \xshowcsexpanded is not difficult to implement. :) Just copy the definition of \xshowcs and change a single character. :)
 
7:24 PM
@FrankMittelbach You can write me an email (patrick at dante.de) or post a question here that shows the problem. I'll try to understand (and solve :-))
 
mhp
@egreg You could add this to the ‘Examples’ section of the regexpatch documentation ;-)
 
@mhp It's just \NewDocumentCommand{\xshowcs}{sv}{...} and \NewDocumentCommand{\xshowcs}{sm}{...}. The replacement text is exactly the same! :)
But I don't dare to tell how to patch commands defined with \NewDocumentCommand; I'm afraid of Joseph and Frank. :)
@PeterGrill Why not removing the phantom based "solution"? It's really awful. :)
 
7:44 PM
@egreg I generally use the \vphantom solution as I don't like manual sizes, but you are right, in that I should make that secondary solution...
 
@AndrewStacey you should be impressed with me: that's two accepted tikz-pgf answers today:-)
 
or is it really that bad that I should delete it?
 
@PeterGrill As you see, the result is exactly the same without having to guess. :)
 
@egreg Yes it is in this case.
 
I'd leave the outmost fences at \big size, however. And I'd try hard not to write such a formula to begin with.
Those formulas live only in high school textbooks. :)
 
mhp
7:48 PM
@egreg I’ve already wondered why the regexpatch package excludes the xparse universe that explictly :-)
 
@egreg Have reorganized the solution - hopefully I have sufficiently de-emphasized the \vphantom hack solution... Thanks for always for pointing out the better way to do things.
 
@mhp The xparse defined macros are more complicated! And the aim is to be able to do all customization without having to patch.
 
good evening :9
 
@donc_oe A warm welcome form Berlin ;-)
 
8:04 PM
hello berlin ;)
 
I have survived my last day (of 10 days) LaTeX course!!!
 
I'm about to survive my bachelor thesis ... We'll see on monday
 
mhp
@egreg That’s a noble aim!
 
@donc_oe Nice to see you here!
 
@egreg hello, nice to meet you and thanks for your commitment to this site (and some of my questions :p)
stackexchange is one of the most important websites currently for me, and probably the best invention since the wheel or whatever :p
 
8:17 PM
@donc_oe Well, I don't think there are many with 10 questions or more who haven't had an answer from me. :)
 
@egreg So true. :)
 
noticed already :P
 
@PauloCereda We have 20395 questions, I have 2396 answers. OMG!
I really have to study TikZ in order to extend my range. ;-)
 
@egreg Wow!
 
@egreg Wow!!, but of course that mans that you have almost 18000 questions that you could improve... :-) Nooooo, please don't have a look at tikz... I need to be able to get some rep!!. Plus tikz is just a fad, no one will be using it in another six months -- so no need for you to learn that... :-)
 
8:21 PM
@egreg Of course @DavidCarlisle is the new TikZ rising star. :)
 
@PauloCereda Yeah that also worries me.. :-)
 
@PeterGrill I have learned tikz today ;-)
 
tikz is awesome, i learned it two weeks ago
 
@PeterGrill I've answered a question in the Italian TeX forum adding the key "use as bounding box". So I'm improving. :)
@PauloCereda TikZ+\expandafter: the winning pair!
 
@PatrickGundlach ok, I'm trying to make linebreak_filter work for me but so far it eludes me at least in parts (doesn't really help that I don't speak lua I guess)
@PatrickGundlach question. Why does
tex.setbox(tex.count[3], node.hpack(head) )
fail with an error but
head = node.hpack(head)
tex.setbox(tex.count[3], head)
works?
 
8:34 PM
@FrankMittelbach node.hpack() returns two arguments
And tex.setbox() accepts only two.
 
@PatrickGundlach yeah but isn't tex.setbox only expecting one?
 
tex.setbox(<number> n, <node> s)
 
thought that extra args got dropped by lua? no?
or was it the other way around, missing args get nil
 
no, they are not
 
i mean what happens with the second arg in head = node.hpack(head) ?
 
8:36 PM
a,b,c = return_two_values() -> a,b get values, c = nil
that is dropped, because you only supply one return parameter
 
a son on assignment they get dropped
 
@PatrickGundlach Can I use _,b = return_two_values() to get only b?
 
@Paulo yes
 
@Patrick: You taught me about the _. <3
 
so do i therefore have to go the roundabout way or how do i use only the node return from hpack?
 
8:38 PM
@FrankMittelbach Yes, you need the indirect way
tex.setbox() has a form with three parameters, and I guess that if you have the node.hpack as the second, tex.setbox() thinks it gets three parameters
 
@PatrickGundlach ok .. that version i figured out after a bunch of trials and reading wikis
 
But I am too tired now to try out.
 
but it replies then with a very strange error message: !LuaTeX error: There should have been a lua <node> here, not an object with typ
e number!
it is as if from the two returns only the second survives
@PatrickGundlach pity ... thought you could solve my other riddle first
this is what I have now (crude but hey it does something :-)


local function hpack_paragraph (head)
tex.count[3] = tex.count[3] + 1
head = node.hpack(head)
tex.setbox(tex.count[3], head)
return node.new("hlist")
end

callback.register("linebreak_filter", hpack_paragraph)
 
@Werner, yes I'll move it to a comment, I started to code an answer, but then remembered I'd done it before and it was tea time, so I rushed it out (as it took quite a bit of searching to find the old answer, and I didn't want to lose it:-)
 
@FrankMittelbach don't register linebreak_filter, unless you know what you are doing - it is for replacement of the TeX's linebreaking algorithm
 
8:44 PM
@PatrickGundlach wrong advice
 
@DavidCarlisle No problem. I just saw @MartinScharrer move another "answer" to a comment.
Tea time is very important, I understand.
 
@PatrickGundlach This is precisly what I want to do. And although I can't speak lua, I think i know exactly what I'm trying to do
well, sort of on high level :-)
 
@FrankMittelbach OK then forget my comment:)
 
@PatrickGundlach as I said in the afternoon. what I want to get is the whole unset paragraph material in a single hbox the moment \par is reached. In other words the linebreaker should store that stuff into a box andthen return.
 
@Frank ok
 
8:48 PM
It does that with my crude implementation. and you get each paragraph in a new box register (right now it is simply using box1 box2 box3 ...)
but my issue is that if i understand that filter correctly it has to return a node to a list that contains at least one hlist.
so what I'm doing here is to simply return a new (empty) hlist
kind of works but as a result i end up with stuff like

...\hbox(0.0+0.0)x0.0, direction ???
...\glue(\parskip) 0.0 plus 1.0

on the main vertical list
 
@Frank coming back to the other problem: with three arguments, tex.setbox() expects 'global', a number and a node list, but when you supply three arguments by calling tex.setbox(number, node.hpack(...) ) you give tex.setbox(<number>,<nodelist>,<number>) which is why tex.setbox() fails.
 
not really a disaster but I would really like to make the whole thing shut up. perhaps i can get this done through also using the post_linebreak_filter
@PatrickGundlach interesting, so perhaps ('global', node.hpack(...)) would have worked ... need to try
 
@FrankMittelbach I've never used the linebreak_filter.
 
@PatrickGundlach so now I surpassed you in lua programming :-)
 
@FrankMittelbach no, because node.hpack() returns <node>, <number> whereas tex.setbox expects <number>,<node> (other way round) and even if the arguments were other way round, it would not make any sense
... because the number returned from node.hpack is the badness (IIRC)
@FrankMittelbach I'd be interested in your experience with that
 
8:55 PM
@PatrickGundlach yes, actually i expected it to be related to this but I still find the error message I get really strange.
If i do: tex.setbox('global', tex.count[3], head) the nall is fine (as expected) BUT
if i now do tex.setbox('global', tex.count[3], head, 7) then i get an error. Also fine because there is one arg too many
 
@FrankMittelbach I guess it it just the way the function is implemented in C, it probably checks for the node type first
 
BUT why do i get this error text? : !LuaTeX error: There should have been a lua <node> here, not an object with typ
e number!
but abive the node type is in the right place!
above
 
you mean from tex.setbox(<number>,node.hpack(...))?
 
@PatrickGundlach Oh, no!! Not you too!! I guess I need to build the tikzemoticon package so i can have something to answer questions on.
 
no. exactly as i wrote ...straight arguments now
tex.setbox('global', tex.count[3], head, 7)
 
03:00 - 21:0021:00 - 23:00

« first day (586 days earlier)      last day (4340 days later) »