« first day (3126 days earlier)      last day (62 days later) » 

1:01 AM
Hi, is there a way to create a figure made of figures?
I already have a tikzpicture and want to show the changes of this picture (or the process of the change) using \rightarrow in between figures.
But i don't want to make one tikzpicture, because i'll be reusing the first figure (with some changes)
 
1:38 AM
@l3people: Given that 5mm equals 14.22636pt why does \fp_to_dim:n{300pt/14.22636pt} evaluates to 21.087pt while \fp_to_dim:n{300pt/5mm} evaluates to 170.716pt?
Okay, I need parentheses around the denominator to get the result right. Is this by design?
The manual says “We now present the various operations allowed in floating point expressions, from the lowest precedence to the highest”, and division (/) is listed much earlier than mm, so from what I understand 5mm should be evaluated before /. What did I get wrong?
 
 
1 hour later…
3:14 AM
@HenriMenke Sorry, I do not think we should start such requests on the chat. If we were to do that for every unfair vote, the chat will overflow.
 
 
4 hours later…
6:48 AM
@PhelypeOleinik The units are implemented as constants which are multiplicated and so you simply have ((300*pt)/5)*mm. But I agree that the documentation could be clearer here.
 
7:09 AM
@JosephWright units in fp expressions flavour of the week:-)
@PhelypeOleinik mm is multiplication by the value of 1mm expressed in pt so 300pt/5mm is 300*pt / 5 * mm which is defined but not quite what you expect, hence you need the brackets
@PhelypeOleinik with no brackets around the denominator you get the wrong numeric answer, with no brackets around the numerator you do the division and multiplications in a different order and so get different rounding effects
@UlrikeFischer actually better would be if Bruno could make the units multiplication bind tighter here.
 
@santimirandarp you could do something like \fbox{\rule{4cm}{0pt}\rule{0pt}{4cm}}
 
@DavidCarlisle yes, but the question is if it is possible. And what should then happen if an explicit sign is used: is then \fp_eval:n{30*mm/5*mm} different to \fp_eval:n{30mm/5mm} ?
 
7:26 AM
@UlrikeFischer It's doable, I'm pretty sure
 
8:00 AM
 
@DavidCarlisle One should then decide how 3/2pi should be interpreted.
@CarLaTeX I think I know the town! ;-)
 
@PauloCereda Today's photo of the day of my company's intranet! ^^^
@egreg I'm sure you do :):):)
 
@CarLaTeX I'm seeing the bell tower just now; not the bridge, it's behind a curve of the river
 
@egreg Very beautiful place :)
 
@CarLaTeX Yeah, looks so beautiful that it must be in Italy!
 
8:13 AM
@egreg 21/44 ?
 
@AlexG Verona
 
@CarLaTeX The place where Romeo and Juliet once lived. I was there a couple of years ago, during summer holidays.
 
@AlexG Yes, that one!
 
9:00 AM
@CarLaTeX @AlexG This is how it appeared after WWII. It was rebuilt using as much of the old stones as possible.
 
@egreg Ooooh
 
@DavidCarlisle I see Bruno has fixed the issue :)
 
@CarLaTeX @AlexG That part of the town was mostly spared by the air bombings; the bridge had been mined and it was destroyed during the German retreat.
 
@JosephWright yep
 
@egreg Horrible years. I live in a town which was badly struck too.
 
9:10 AM
@egreg With the latest checkin, as 3/(2pi): I guess it's tricky otherwise to have 300pt/5cm = (300pt)/(5cm) ... the parsing would otherwise have to 'back up' to deal with what the keyword 'means'. I know that pgf does something like that ... it's non-trivial
 
@JosephWright which value do you expect from \fp_eval:n{30*mm/5*mm}? with the newest changes.
 
@UlrikeFischer I think the result as-is, i.e. 48.57355911711824: / and * bind equally-tightly
@UlrikeFischer Change doesn't alter this outcome
 
@JosephWright I expected it too, and imho that's okay with the explicit *. That's also a nice way to handle the pi problem: 3/2*pi
 
10:17 AM
@UlrikeFischer @DavidCarlisle Oh, that does clarify stuff. And this also explains the difference in the picture in my answer.
@JosephWright Wow, Bruno is fast :-)
 
10:43 AM
However the result of \fp_to_dim:n{(300pt)/(5mm)} is still slightly different from \fp_to_dim:n{(300pt)/(14.22636pt)}, at the fourth decimal place...
 
@PhelypeOleinik Yes, htat's to be expected
@PhelypeOleinik 5mm=14.2263779527559
 
@JosephWright I'm still not convinced that using dimensioned values as undimensioned floating point values really clarifies things.
 
@JosephWright Oh, more places. Now it makes sense. I didn't know what I expect trusting OP :-)
 
@PhelypeOleinik there is a difference to what tex reports as 5mm in pt if you use \showthe\dimexpr 5mm\relax (integer calculation based on sp units) and what l3fp gets by doing a floating point calculation of 5 * <floating point value corresponding to 1mm in pt> so even something as simple as 5mm gets different answers and as soon as you have any calculation things diverge more
 
@DavidCarlisle Hm, interesting... This whole thing is tricky :-)
 
10:57 AM
@DavidCarlisle Sure, but there is a long history in pgf of supporting dimensions in expressions. For clarity, explicit conversion using \dim_eval:n \dim_to_decimal_in_sp:n is probably better ...
 
@PhelypeOleinik in the day job, where we are looking after a library of floating point mathematical functions this is just part of life. Apart from reproducible differences as above, on modern floating point architectures you can get different results running identical code on the same machine a second later, which makes testing "interesting".
@JosephWright yes but given that it is storing decimal values as dimens for lack of a floating point in tex that was an unfortunate but understandable kludge, but having gone to the trouble of defining a set of floating point operations in l3, it's a kludge I could quite happily drop. It just leads to the confusion as in the question on site where I suspect the desired operation is 300m/5 returning a length, but it is coded as 300m/5pt and anything that you get after that is slightly weird.
 
@DavidCarlisle So you've favour we just remove those keywords entirely, and tell people to explicitly convert up-front?
 
@JosephWright this morning I do (but if that leads to years of people moaning about difficulty of converting from pgf, I may give up on the purist view.... hard to know...)
 
@DavidCarlisle Just checked the code I wrote for boxes: I've always explicitly converted using \dim_to_fp:n, etc.
 
@JosephWright what is explainable but confusing is the 5mm in a dimension expression means the tex dimen value, but the same thing in an fp expression means something different, so it looks simpler to allow it but...
 
11:08 AM
@DavidCarlisle Team list?
 
@JosephWright yes
 
@DavidCarlisle I'll hold off a release/update until we have this resolved (I was thinking of doing one ...)
 
Guys, I'm reading titlesec package and there is something I can't understand
the option hang for sections means something like this:
3.1 thesection?
name besides the number?
 
@santimirandarp and presumably the "hang indent" refers to the fact that if you make the text longer it wraps to align under the section not under 3.1 so leaving the first line sticking out at the left (hang indent).
 
 
1 hour later…
12:43 PM
@DavidCarlisle thanks...
tex.stackexchange.com/questions/164833/not-centered-title-page is the best solution to center the title page in book class?
Or asked different: Is there any way to center the title in book class? It is not..
 
1:01 PM
@santimirandarp it's centred by default, you don't need any code at all
 
It is not in this book at least, I'll paste a link @DavidCarlisle
 
1:20 PM
@santimirandarp that is centered (as in \begin{center}.... which is what book uses) did you mean vertically centred?
 
Uhmm :<
Although it is centered in the sense you say, it does not look in the center of the page, in the image @DavidCarlisle., does it?
 
@santimirandarp it is (presumably) centred in the text block that is book.cls does literally \begin{center} {\LARGE \@title \par}%
 
Yes I know but don't you think it will look bad when printed?
 
@santimirandarp is the book really going to be printed on A4 paper?
 
If the author likes it I guess it will. It also looks bad when opened from a pdf-reader...@DavidCarlisle
 
1:25 PM
@marmot you had to completely draw that, didn't you? :)
 
@santimirandarp if you don't like it put your titlepage in a minipage of width \pagewidth and use \noindent\hspace{-\dimexpr\oddsidemargin+1in}\begin{minipage}{\paperwidth}... so it centres on the physical page...
 
Normal books are set as the one I showed you? @DavidCarlisle
 
@santimirandarp or use geometry package to reset the page layout on that one page to have symmetric margins or ....
 
@DavidCarlisle fine, I will see how to reset geometry. Thanks
 
@santimirandarp quite often, I just opened the texbook and its inner title page has "The TeXBook` centred in what is the text block on following pages. (The outer cover is more like artwork and follows different rules)
 
1:32 PM
Aha...I see...
 
2:03 PM
@DavidCarlisle Same code on the same machine? What changes the result then?
 
2:14 PM
Hi
I have defined the following style
\lstdefinestyle{customc}{
breaklines=true,
language=Python,
showstringspaces=false,
basicstyle=\footnotesize\ttfamily,
keywordstyle=\bfseries\color{green!40!black},
commentstyle=\itshape\color{purple!40!black},
identifierstyle=\color{blue!50},
stringstyle=\color{orange},
numbers=left,
numberstyle=\tiny,
frame=tb,
}
However, lstinline is not breaking the lines as I wish
For example, in some cases, the result is
As you can see from the definition reported above, I have the option breaklines=true
 
Thanks to tex.stackexchange.com/q/492279/117050 I've drawn a PokeBall:
 
@PhelypeOleinik modern floating point systems pipeline multiple multiply-and-add instructions in parallel even with no explicit parallelism in the source code so if you are doing a dot product say a*A+b*B+c*C+... then unless you compile with flags for slow reproducible run time code, then the multiplications will be batched up depending on the hardware and the additions happen in variable order so end up with rounding effects, which can accumulate and produce radically different answers
 
@DavidCarlisle But shouldn't that “variable order” be the same given the same code/machine/etc?
 
@PhelypeOleinik no as with any parallelism, the accumulation stage accumulates stuff in the order it is available which depends on the timing of the various registers random things depending on what was in the registers previously that needed to be cleared, the phase of the moon or anything. take my word for it you can run a numerical program twice on the same machine without recompiling and get different results....
 
2:32 PM
@Skillmon ??? No, TikZ drew it.
 
@DavidCarlisle Oh, I believe you (mainly in the moon part :)! It's only that I always saw this type of thing as purely deterministic, so this randomness looks really interesting (yet problematic). Not that I have any actual knowledge in this; it's only from what I saw using some numerical models...
 
@Skillmon There is @PauloCereda's tool which does that for you: vimeo.com/333359376. When you use it, you only need to type marmot tikz https://tex.stackexchange.com/q/492279/117050 and it will produce the code for your.
 
3:18 PM
@marmot ooh
 
4:06 PM
Yo folks
quick question
what are the best practices when one wants to quote an equation that appeared, numbered, earlier in the text?
I generally note that it has appeared before, and give it its old equation number
is that terribly anti-kosher?
 
@EmilioPisanty That's what's usually done.
 
@egreg just the number neat? or maybe say "(from (2))" in the marking?
@egreg is there by any chance some authoritative style guide that says that this is the way to go?
I need to convince a journal typesetter to let me roll with it
 
@EmilioPisanty Any mathematical paper with numbered equations, I'd say.
 
hmmmm
yeah, this isn't quite the thing that would make it to style guides, is it
I'm not sure the conversation is at a point where I can just point to a bunch of other papers to say that this is standard practice
I was wondering whether Appeal to Authority might tide them over
but it'd probably need to be some form of typesetting guide
 
4:23 PM
@EmilioPisanty normally in a journal you are space-limited and just reference the number rather than copy and re-number (that's what the number is there for) I've only seen copying in larger textbook type cases where the original is a long way back.
 
@DavidCarlisle This is for an online-only methods, in an NPG journal. The equation is important, it's referenced multiple times within the online-only methods, and appeared previously at the start of the main text.
also, because it's online-only methods, space constraints are less pressing
 
@EmilioPisanty for online-only there are other possibilities I have for example seen a setup where every reference just appears as "in equation (2)" or whatever as in traditional print and 2 links back to the equation but in addition hovering over the (2) pops up a preview of the equation so you can see it without jumping back and losing your current place (that is, it's copied into a div that is hidden by default)
 
@DavidCarlisle that sounds rather more adventurous than I think they'll be up for trying, I reckon
also, it needs to compile readably to pdf
 
5:14 PM
@EmilioPisanty sure I just floated it to highlight that typographic conventions don't always apply if this newfangled internet thing catches on.
 
5:30 PM
@DavidCarlisle That “internet” thing is just a fad; I wouldn't worry too much about it. The one thing it has given us is an appreciation of the scroll and its advantages over books with pages.
 
5:40 PM
@DavidCarlisle ooh
 
6:17 PM
@HaraldHanche-Olsen Also, cat videos.
 
6:57 PM
@JosephWright I'm just looking at metadata writing (hyperxmp) and I think I need an "uncompressed stream" variant of \driver_pdf_object_write:nn. hyperxmp does something like this:
\immediate\pdfextension obj uncompressed stream attr {%
    /Type /Metadata
    /Subtype /XML
  }{\hyxmp@xml}%
 
@UlrikeFischer Why the uncompressed version?
 
@JosephWright imho meta data should be there in uncompressed form so that everyone can read it, pdfx writes them also with uncompressed: \immediate\pdfobj uncompressed stream
 
@UlrikeFischer Ah, right: I guess we need it then
 
@JosephWright how should we name this? "ustream"?
 
@UlrikeFischer Yes, sounds good
 
7:11 PM
@JosephWright the code for pdflatex is curious. hyperxmp sets locally \pdfcompresslevel=0 and then uses simply stream ;-). I don't know yet what is done for xetex/dvips.
 
@UlrikeFischer I'm not actually sure we can adjust that in general: for XeTeX it's down to xdvipdfmx, and for dvips all bets are off
 
@JosephWright I will try to look what hyperxmp does here, but now I have to make dinner ...
 
@UlrikeFischer Cool
@UlrikeFischer I think 'it does not'
 
7:31 PM
@UlrikeFischer I think only LuaTeX offers this facility: in all of the other cases, we'll just have to call \driver_pdf_compresslevel:n { 0 } (useless for dvips ...)
 
@JosephWright then perhaps a dedicated option ustream is not really useful.
 
@UlrikeFischer Well, it is useful in LuaTeX and if we don't have it, we loose access to that
@UlrikeFischer 'Where possible, creates an uncompressed stream without affecting other streams; if that is not possible, sets the compresslevel to 0'?
@UlrikeFischer What's the status of tagging in XeTeX?
 
7:59 PM
@JosephWright well if it works in luatex too by setting the compresslevel, then one can simply do this before writing the metadata. I don't think that it is used in another place. I will try to test it.
 
@UlrikeFischer I meant that in LuaTeX it can be done selectively. But perhaps it's so niche as not to be useful
 
@JosephWright imho if we add commands to write the bdc/emc operators, then along with all the other rest xetex will have the same status as pdftex: it will work but it won't be easy with page breaks.
@JosephWright that's what I meant.
 
@UlrikeFischer Right, got it: see email (also a mail to @DavidCarlisle)
 
@JosephWright yes that's exactly one example where luatex is clearly better than xetex.
 
@UlrikeFischer Cool
 
8:09 PM
@JosephWright did you see Khaled's article?
 
@UlrikeFischer Not yet: my TUGboat access is not working ... need to talk to Robin
 
@JosephWright if you want i can sent you my version.
 
@JosephWright it's open access anyway now isn't it?
 
@DavidCarlisle not the newest one.
 
@DavidCarlisle Latest edition is not
 
8:17 PM
@EmilioPisanty if the equation is that important, why not give it a name?
 
@JosephWright oh FF must have cached a password, I just viewed it without thinking about that:-)
 
8:53 PM
@JosephWright I think either the code or the documentation is the wrong way round for stream object:
\documentclass{article}
\usepackage{expl3}
\ExplSyntaxOn
\driver_pdf_compresslevel:n {0}
\driver_pdf_compress_objects:n {0}
\driver_pdf_object_new:nn{test}{stream}
\driver_pdf_object_write:nn{test}{{abc}{xyz}}%
\ExplSyntaxOff
\begin{document}
blbl
\end{document}
gives <<
abc
/Length 3
>>
stream
xyz
endstream
 
@UlrikeFischer The docs I think: I just took the idea from @AlexG's pdfbase, but perhaps got the exact nature of the arguments wrong
 
@JosephWright ah, yes pdfbase says "{stream attributes as PDF key-value dictionary}{content string}".
 
@UlrikeFischer Exactly: docs I have clearly wrong, but then the pdfTeX manual is a bit opaque on these
 
9:16 PM
@JosephWright Ulrike's example exactly shows the intended usage. The first token {abc} goes into the dictionary, the second {xyz} is the content to be encoded as a stream.
 
@AlexG Have changed the docs
 
9:50 PM
@AlexG I think you wrote some time ago that one can't write to the catalog in \AtEndDocument at least in beamer. Do you have an example? I can't reproduce this.
 
 
2 hours later…
11:34 PM
The PGF/TikZ repo on GitHub seems to have a spam problem: github.com/pgf-tikz/pgf/issues/685 github.com/pgf-tikz/pgf/pull/684
 
@HenriMenke At least this time it wasn't me ;-)
 

« first day (3126 days earlier)      last day (62 days later) »