« first day (808 days earlier)      last day (4123 days later) » 
00:00 - 21:0021:00 - 00:00

9:04 PM
One of the strengths of a parser combinator is that it can handle things like this more readily than generated parsers. In regex you have the regex string, which is unchangeable. A parser combinator is a combination of smaller parser subunits joined seamlessly by code. Well. The good ones are. The manner in which they parse content can change if they are constructed and written in such a way.
As a trivial example, I have two parsers. One of them catches ``
 
kan
@egreg Can you please tell me what is the "80 doing in
\DeclareMathSymbol{\varsubset}{3}{matha}{"80}
 
Anyway. Basically you can maintain a changeable state during the execution of the program. One parser can influence how another parser parses.
 
kan
Hah, I meant to ping @Alan as he gave the answer here
 
Such as, one parser adds the macro to the list of defined ones, and the other searches whether the macro is defined.
Since I can attach arbitrary code to any parser subunit, a parser can execute arbitrary code based on the input.
 
@GregRos In the context of syntax highlighting in a document for editing, most of the time the awkward side cases are avoided, plus of course you want something quite fast
 
9:09 PM
@kan it's the number hex 80 (=128)
@GregRos But it can't parse TeX
 
kan
@DavidCarlisle so nothing to do with the symbol being imported?
 
@DavidCarlisle If you can write a program that parses TeX, you can write it using parser-combinators.
 
@kan Yes it's the most important bit: the position of the character in the font
 
kan
@DavidCarlisle I guessed as much, so how do I get that number? (sorry, hopefully, you'll forgive me for asking trivial questions.)
 
@GregRos You don;t want to run the full tex execution engine, including typesetting stuff just to syntax highlight in the editor
@kan You need font documentation or a font editor or something.
 
kan
9:13 PM
@DavidCarlisle Well, what I am looking for is being provided by mathabx but I want to import just that symbol...
 
@GregRos consider \setbox0=\hbox{hello}\ifdim\wd0>20pt \catcode'Z=12 \fi \ZZ That final \ZZ is either the command \ZZ (a single token) or the command \Z followed by the character Z (two tokens) depending on the width of the word hello in the current font so you can not even parse the input without typesetting
 
kan
Oh! @David Figured out! :)
 
can anyone tell me how to handle questions that were solved only by comment?
 
12
Q: What if a comment answers a question?

qbiIn „Why does the use of microtype and xfrac lead to a high compile time?“ the comment seems to provide the best answer. If seen this also in other questions. What is the best way to accept it as answer?

 
9:29 PM
@kan There is a famous question: tex.stackexchange.com/q/14386
 
Oh heh
I just remembered something
4432
A: RegEx match open tags except XHTML self-contained tags

bobinceYou can't parse [X]HTML with regex. Because HTML can't be parsed by regex. Regex is not a tool that can be used to correctly parse HTML. As I have answered in HTML-and-regex questions here so many times before, the use of regex will not allow you to consume HTML. Regular expressions are a tool th...

not directly relevant, just funny
 
kan
@egreg I was looking at that. :)
But, now I figured what Alan is doing there...
 
i found a question that is solved by comment but not useful for others. should i flag it?
 
@kan And? You need to look at the font table to see what the symbols are.
 
kan
@egreg Yeah, I looked at the dcl file that Alan is mentioning in the comments.
 
9:33 PM
Hello @StefanKottwitz
 
@JosephWright Hello!
 
@GregRos course it is relevant in that you can use regex to tokenize xhtml tags just not to parse element structure, which is exactly where we started. But xhtml has a lot more structure than Tex which can't in full generality be parsed by anything other than tex
 
@kan You can produce font tables with the fonttable package. You can simply give the combination "encoding+family+weight+shape" as stated in the relative \DeclareSymbolFont using the \xfonttable command (see the doc); the \xfonttable command was suggested by … :)
 
@JosephWright does it worry you that three people have starred a statement that you should leave?
 
@DavidCarlisle Luckily no, since one of them was me ;-)
 
kan
9:39 PM
From the docs:
The original
code for the macro was supplied by Enrico Gregorio.
 
@kan ;-)
 
kan
:)
!!/ define EG
Psmith is having some Italian delicacy.
 
@kan seems like PSmith is sleeping today =)
 
@DavidCarlisle Look there are completely different topics here. First, can a parser-combinator type program parse TeX. Second, should one use regex to tokenize TeX or xhtml for that matter.
The first subject aside, the reason for why one shouldn't use regex to tokenize TeX is that regex is, a) impossible to maintain b) practically unreadable c) can silently fail, or produce incorrect results for unforseen inputs d) will not give you the reason for the failure or even where it occurred in the context of the document itself
 
@GregRos answer to first has to be no (well of course if you use the tex engine to split the parsing problem in to small enough units I suppose the answer might be yes, but basically it is no, you can not writ e grammar that says whether \ZZ is one token or two in TeX. Second, parsing with regex will get some answers wrong but so will parsing with anything, so as it's quick and easy in most editors then yes it makes sense for syntax highlighting, it's good enough
 
9:46 PM
@GregRos Works for me and many others highlighting syntax in TeXworks, certainly as well as the other highlighting approaches I've seen (say in WinEdt)
 
Problem solved as per OP's comment; moreover I found a good duplicate
0
Q: Suddenly I cannot compile my bibTex files anymore (Biber, TeXmaker, MacTeX)

ZwähniaI am currently working on a bunch of little assignments for university. Everything was fine until yesterday: All of a sudden when compiling the BibTeX I get an error and can therefore not create my bibliography. I thought it was a problem with some entries in my .bib file. After a lot of very d...

 
@GregRos For syntax highlighting you don't want error reports for failure, you just put up with the wrong colour here and there look at the answers in tex.stackexchange.com/questions/48229/… The command colour ends half way tthrough the command as the regex isn't expecting _
 
Yes. It works. It will highlight syntax in TeX. It's just not the best way to do it.
 
@GregRos You mentioned the f#/haskel parser but for syntax highlting it needs to be embedded in the system, so on this site in JavaScript in every TeX editor in that editor, regex is available in all those places, f# typically in none of them. got to go...
 
I mentioned a specific parser-combinator library. There are many like it. But that one is mine.
Well. It's not actually mine. I just like it.
I wish it were mine. That thing is amazing. The optimization that went into it as crazy.
 
9:54 PM
@NicolaTalbot Actually, it’s not the fault of the bug reporter: Oracle (I guess) decided, that Java should not be found on the system path. It’s the same here. But the OP is wrong in another way: The Oracle (?) developers did it worse and found, it was a good idea to put a java.exe and a javaw.exe into the Windows system folder! For this apparently admin rights upon installation are needed. At least it is here so, and I did not do this manually. (cont.)
@NicolaTalbot Your jpgfdraw and other Java programs run with a call of java(w).exe without any path specification. @PauloCereda can you confirm, what I wrote?
 
@Speravir Yes, I basically just adapted the bash script command to a Windows equivalent. I don't like the idea of writing the full path for commands like that as you'd have to edit all the scripts if you install a new version of java in a different location.
(I wasted ages today trying to locate what script on my laptop is determined that latex resides in the now non-existant /usr/local/texlive/2009 path. In the end I gave up and make a symbolic link to the 2012 path.)
I'm too cold to carry on typing, so I'm going to shutdown and curl up with a book and a hot chocolate :-) Night all.
 
10:18 PM
Evening!
 
@tohecz How's the Midi sunshine?
 
@egreg you mean the +1C and very windy in mountains?
 
@tohecz Oh, it's winter also in Marseille? How was the bouillabaisse?
 
@egreg the bouillawhat?
@egreg and it's not really winter, unless you go to the cliffs and mountains (we went on a trip to 560m and it was freezing
 
@tohecz You're in Marseille and have not yet had a bouillabaisse?
 
10:23 PM
@egreg a pity
 
@egreg I'm not in Marseille, I'm in Luminy :p
 
@bloodworks Like going to Bretagne and not eating Moules Frites.
 
Good night guys, my pillow i calling me ;)
 
@Timebandit night
 
@egreg or liguria without Farinata and rabbit
 
10:26 PM
@bloodworks Or the "focaccia al formaggio di Recco"
 
@egreg oh yes i suppose i had this in savona judged form the pictures.. i had many Focaccias
 
@bloodworks So you know that "focaccia genovese" is different. And yummy as well.
 
@egreg is that the plain one?
 
@bloodworks Yes. Wheat flour, salt, water and olive oil.
 
@egreg whatever blows your culinary minds. I'm of those who thank for the meal before they eat, who don't feel a strong reason to have an extra enjoyable meal, and who is aware of being in the lucky ~20% of population who eat more than once a day.
 
10:31 PM
@egreg we stayed in a lovely small hotel and they served it for breakfast
 
@bloodworks That's ligurian usage.
 
@egreg i can say one thing by sure i will return!
it comes that i'm a climber so i even have a additional reason.
 
@tohecz All we're talking about is "poor cuisine": bouillabaisse is a fish soup. And the "focaccia" is just as I said above (in Recco it's different, but the only other ingredient is cheese).
 
@egreg ok, whatever
I know it has been said before and is is being solved. Dispite of this I repeat it: I hate when something is so basic question that everyone knows it has been asked milion times. Still, instead of looking for the duplicate (which took 3 minutes) they provide the answer again.
 
Anyone know a good converter from ascii equations to latex?
 
10:44 PM
@GregRos Hi! What kind of ASCII input you have in mind, any examples?
 
@tohecz like?
 
@GregRos latex is normally written in ascii?
 
4
Q: How do I associate a label with a non-section document element?

enderlandLabeling and linking in LaTeX confuses me. I have something like the following: \section{main section} \label{sec:mainsection} %lots of text \label{SomethingDescribedButNotDocumentElement} %more text I want to be able to link to the second label, but it seems those labels are associated with...

 
lol no I mean ascii math input. (1+x)/(1-x) + alpha
I'm sorry unicode included. α = β × 5
 
sed -e "s/alpha/\\alpha/g" (since you like regex:-)
 
10:46 PM
I see tons of equation editors that give me an image, but I want the latex behind it
 
@GregRos That is valid input to xetex with unicode-math package
 
Yes, but the fraction would not be.
Well, it would, it just wouldn't display as I want it to.
 
@GregRos well it might be, deoends how you want it typeset (ah as you said:-)
 
$\frac{1-x}{1+x}$ , naturally.
 
@GregRos \catcode\/\active \def/{\over} then your original markup gives th elayout you want
 
10:48 PM
@tohecz well yes... but i think this is a common appearing in any kind of Internet platforms... not sure if there is anything which could be done...
 
That.... doesn't sound like a good solution.
 
@GregRos no, it would not, simply because that is impossible. You either lose the control (how should $((1+1/x)y/3)/((1+x/2)(1-y))$ be typeset? All slashed changed to fractions? No way, that would be too ugly) or you lose the "very simple" input.
 
Are you $\frac{male}{female}$
 
@GregRos There are more complicated solutions (parsing a "natural" input syntax using TeX but they don't fit on a line of this chat forum
 
@DavidCarlisle just don't use id mid document ;) see chat.stackexchange.com/transcript/message/7668645#7668645
 
10:50 PM
www.google.$\frac{com}{search}
No, I want a converter to convert it to proper latex. I see them all over the place. They just don't give me the latex, only the image.
 
@GregRos well in that case you need a grammar to distinguish multi-letter identifier male from the product abc you could write one in ....
 
kan
@GregRos I am sure @David knows one, he posted a image some days back.
 
@DavidCarlisle I'll just use regex
 
@enderland It is not really a mistake to ask something that has been here before, as long as you don't mind getting it closed. — tohecz 2 mins ago
@tohecz not at all :-)
 
@kan Not off hand, there is asciimathml which goes from a plain text syntax to mathml, then various ways to get from mathml to tex, but probably doesn't result in the most compact natural tex coding
 
10:53 PM
why can't wolfram alpha give me latex :/
 
kan
Does someone know how to get background for lstlistings like the Mathmode document has...
@GregRos Sage can, for instance, if it is math...
 
Oh I forgot. Mathematica!
 
@GregRos Because they believed the mathematical typestting engine in mathematica was better than TeX;-0
 
Yes and probably maxima too.
 
kan
@GregRos Don't pay. Open source,
 
10:54 PM
@kan Some of us need to eat.
 
@kan there's an option for that .. i just forgot the name
@kan fillcolor maybe?
 
kan
@DavidCarlisle Well, for basic functionality such as this... no, I am not willing to pay. But, of course, if I want some solid stuff, I can pay you. :)
And, @David, apologies, if I hurt you.
 
@kan or backgroundcolor it has been some time
@kan you'll find mathematica a such stuff
 
:| mathematica lies.
 
10:58 PM
Latex my furry dingbats, it typesets $\log$ as \text{log} and fractions using /
 
@kan oh don't worry about me, You'd have to try harder than that to offend me:-)
 
@enderland ok, fine :)
 
kan
@GregRos Sage's output of latex(log(x)) is :
 
@tohecz I use other SE sites where we also fight duplicates/etc so I can definitely feel your frustration...
 
kan
\log\left(x\right)
 
11:00 PM
@GregRos $\log$ looks like $\text{log}$, but it is not. In fact, it is $\mathop{\mathrm{log}}$
@kan which is quite correct. I would suggest \mleft(...\mright) from \usepackage{mleftright}
 
kan
@tohecz the idea of Sage is to let users use this output with standard packages.
@tohecz but, we could implement... ;)
 
@tohecz It's incorrect, even if one uses \mleft and \mright. I mean, if one just wants some output slightly reminding of good typography, then OK. But a good document needs human intervention.
 
@egreg Oh you are right. :)
 
Hmm. Could there be a way to write a formula in pgfplot with a parameter, and tell it to plot for parameter values {a, b, c...}
 
@GregRos jep use pgffor (which is my favorite pgf package)
 
11:14 PM
;_;
 
@Speravir If I'm not mistaken, newer versions of Java write entries in the Windows registry, so there's a lookup there in case the tools are not explicitly added to the path. I think Nicola's scripts are safe. :)
 
@egreg yeah, I know. However, it is at least a bit better
 
So much time wasted. So much frustration. I'm just glad I'm past that now. IF only I had discovered latex sooner,
 
@kan You can add:
\AtBeginDocument{\@ifundefined{mleft}{\let\mleft\left\let\mright\right}{}}
 
@GregRos blame your teachers ;)
 
11:16 PM
@bloodworks +1 this, but well, it was my dad and hi-school mates who introduced me to LaTeX when I was ~15
 
@PauloCereda Ah, yes, they do. Actually, all versions I know, did this.
 
@tohecz lucky you
i came across latex with 20 or so
 
@bloodworks yeah, but it all was the wiseness of my dad who registered me to a math "gymnasium" when I was 11
 
@tohecz i was glad that i met a chemist who told me about
 
@tohecz You can issue the command \mleftright in the preamble so that \left and \right become equivalent to \mleft and \mright.
 
11:20 PM
without him i suppose i would still hang on silly word
 
@egreg kool! then @kan don't need to re-implement sage ;D
 
@tohecz and my thesis looks so fine now
i just should not have tired to render 300000 datapoints with pgfplots and pdflatex
 
@bloodworks I generate tiles for which I need over 1 milion of points. I know that the only solution is to rasterize it at some point.
 
@bloodworks I guess you need a very big TeX and lots of time. :)
 
@egreg oh yes! i suppose luatex does a much better job on that. The main problem was indeed the memory limit
 
11:24 PM
@bloodworks Yes, it has dynamic memory allocation.
 
@tohecz well i started to dismiss some data, cause i found out, that with respect to my printing size no one ever would see i
@egreg the soon 1. is out i will retire pdflatex but for my thesis i needed a super stable machine
 
@bloodworks solution: use lualatex on the image and \includegraphics the pdf file ;)
 
@tohecz yes next time i will do so.
;)
and i will use lua for some calculations as well... i think i'm getting to like idea behind luatex
all right then i wish you all a pleasant night i 'm going back to westeros now
 
11:40 PM
@bloodworks ok, bye
 
This is equivalent to assuming a value of pi slightly larger than 3.45
0
Q: Finding Circumference without using Pi

Daniel KIf the area of a circle is 279.46cm and it has a diameter of 18cm, is it possible to find the circumference without using or making Pi in any way at all, and if it is possible, how?

 
00:00 - 21:0021:00 - 00:00

« first day (808 days earlier)      last day (4123 days later) »