« first day (5150 days earlier)      last day (50 days later) » 

04:24
@egreg -- Legs and surgery heal. How's the bike?
 
2 hours later…
06:48
@barbarabeeton the bike is good, I’m not so, but it could be worse
Two of my roommates had their hip replacement
 
2 hours later…
09:08
@egreg Sounds like a lovely trio :) Last time I spent time in a hospital my roommate had a flesh eating bacteria of unknown origin and they had to remove parts of his leg (only to find that there are still bacteria left to remove the next part after three days -- it was really horrible)
 
3 hours later…
12:34
@samcarter 20 minutes from my home. ;-) Near it, we also have The Monster of Lega-Nes: minube.com/rincon/el-monstruo-de-leganes-a515301 ( gotcha? they had a major with a nice sense of humor...)
@Rmano oh, that's a cute monster! I like the colours!
 
1 hour later…
13:44
Hi, any hyperref guru, I have a question about a code using \url that works but only with acrobrat (fails with evince and others)
\documentclass{article}
\usepackage[colorlinks=true,linkcolor=blue]{hyperref}
\DeclareUrlCommand\url{\color{blue}}
\usepackage{enumext}
\begin{document}
\begin{enumext}[save-ans=test]
\item foo
\begin{keyans}
\item*[\noexpand\url{youtube.com}] bar
\end{keyans}
\end{enumext}
\printkeyans[columns=1]{test}
\end{document}
I know it's an expansion problem, but I don't understand why it only works with Acrobat :(
Of course if I modify the code to this the link works correctly in Acrobat and Evince
@PabloGonzálezL you have no link, only some blue text, and acrobat guesses that this is a link.
\item*[\noexpand\href{youtube.com}{\noexpand\ttfamily\noexpand\color{blue} www.youtube.com}] bar
@UlrikeFischer So it's just luck?
@UlrikeFischer And what is the correct line for \url in this case?
I know if I change to \noexpand+\href it works, but I would like to be able to use \url
@PabloGonzálezL well \item*[\noexpand\url{https://www.youtube.com/}] bar works. (without your redefinition), but I don't know what expansion you are doing there.
13:59
@UlrikeFischer It works but only by chance and with Acrobat (as you mentioned above)
When using \item*[code], [code] is passed with \tl_set:Ne then stored in a seq-var which is traversed with the \printkeyans command
14:21
@PabloGonzálezL no it should work (without your Declare command)
@PabloGonzálezL well doing e expansion on random user input is normally not a good idea.
14:44
@UlrikeFischer Great, although the color will be magenta and not blue if I remove that line
@UlrikeFischer I see, I think I need to recheck that part (for some reason I chose e instead of n as a signature)
@UlrikeFischer Generally speaking, is choosing signature n the safest?
@PabloGonzálezL that's like asking if a hammer is safer than a screwdriver
@DavidCarlisle Hehe, you are right and I think it is not necessary to use e in this part...I will modify it in the future
@UlrikeFischer Hi. Do you know from the top of your head if tex.stackexchange.com/questions/578373/… works for breaking links inside a footnote?
(a link in a footnote that breaks across two pages and makes the entire main text body of the second page a link)
cfr
cfr
15:10
@PabloGonzálezL can't you use the style config to change the colour the same way you would the font or doesn't that work?
hm, i found this question to the breaking-URL-in-footnote matter: tex.stackexchange.com/questions/148411/… with the answer by @DavidCarlisle suggesting to suppress breaking footnotes. Is there another solution by now?
15:38
I've been reading/researching a bit about adjusting horizontal spacing of your document (in relation to how I could make a footer start from the edge of the page), and I've come to the conclusion that \kern and \dimexpr as demonstrated in this answer are the "correct" way of moving your footer's horizontal positioning. Is this correctly understood? I've also seen the \relax command quite a bit, but that doesn't change anything...
@PabloGonzálezL set urlcolor.
...when I remove it. What role does \relax play?
@Atex TeX will stop scanning when coming to \relax, so you can be sure not to get what is next.
@mickep So \relax doesn't change anything visually and is just removing a check of some sort?
@Atex if you have something like \@tempcnta 10\relax 0 then \@tempcnta will be 10 and not 100.
and \relax is also what \csname...\endcsname defaults to.
16:01
@Lupino Oh wow, this is some really technical stuff. I guess in order to really make clean and professional looking documents, one actually has to learn what these small keywords do/mean. So far, I've always focussed on tikz and other packages which offer "visually impressive" capabilities, but what ties it all together in a clean look is the small details, control of which is offered by these kinds of commands.
16:18
@Atex I would say that this is an overstatement. It's certainly possible to make clean and professional documents without learning any low-level TeX constructs. That doesn't mean that they're not useful to learn, but you can go a long way without them.
@Atex End users should be able to use documented LaTeX features
@Atex relax has multiple uses, but specifically it's part of the syntax of \dimexpr
@Atex End users should be able to use documented LaTeX features
@Atex No, you would not expect to use any of those commands in a document
116
A: What is the difference between \relax and {}?

David CarlisleIt's hard to answer the question as the two constructs are different in almost all respects so it's a matter of where to start. \relax is a single token, an unexpandable TeX primitive that does nothing when executed. {} is two tokens which (assuming the standard catcodes) mark a TeX group or no...

16:49
@AlanMunn Absolutely agree. So far, I've been able to create good-looking documents, fulfilling my own standards, without the usage of small commands like these. This time, I just wanted to try and make a footnote from the edge, however, but searching a bit, I found out it couldn't be made without learning \dimexpr:
@Atex No, that's not really true. Heiko (the author of that answer) is a renowned TeX programmer, and so he not surprisingly used low level TeX constructs in his answer.
Drawing inspiration from [this answer](https://tex.stackexchange.com/a/252202/318574) along with [David's](https://tex.stackexchange.com/a/200056/318574) I produced the following code for my output:
```
\fancyfoot[L]{%
\mbox{\kern\dimexpr-1.5cm \colorbox{gray!50}{\parbox[c][15pt]%
{\dimexpr\textwidth-150\fboxsep}{\centering Page \thepage{} of \pageref{LastPage}}} } }
```
oooh, does that mean my original solution (using only @DavidCarlisle's answer) was correct for constructing the code:
````
\fancyfoot[L]{%
\hspace{-1.5cm}\colorbox{gray!50}{\parbox[c][15pt]{\dimexpr\textwidth-150\fboxsep}{\centering Page \thepage{} of \pageref{LastPage}}}
}
````
I thought it was wrong to use ```\hspace``` in this case when I saw his solution stating otherwise, and so I changed my approach accordingly
@DavidCarlisle This type of thing never ceases to amaze me - Such a small command which essentially does "nothing", yet is still so complex that it requires such a response! I can tell that I definitely need to understand a lot more before I can really grasp your answer's extensiveness!
I can restart earning reputation! Thanks to everybody for the solidarity
7
@egreg Glad to hear the surgery went well. How long before you're back on the bike?
@DavidCarlisle \dimexpr can be useful in documents and then a \relax makes sense.
@Atex I don't know what the other macros there do, but I would certainly do \dimexpr\textwidth-150\fboxsep\relax.
17:10
@mickep Yeah, I guess it doesn't hurt to add since it doesn't change anything, but I don't know when I should add it and when I shouldn't, because I don't really understand the command. Does "nothing", yet it does "something" by doing nothing? Is there a good rule of thumb for how to navigate around the usage of \relax
cfr
cfr
@Atex \centering doesn't do anything unless a paragraph break occurs in its scope.
@UlrikeFischer Thanks :D
cfr
cfr
@Atex \relax gets used in different ways, but one thing it does is tell TeX not to look for more stuff when it is parsing a number or a dimension, for example.
@mickep yes
@cfr are you sure this is also how it behaves when inside a \colorbox{}{} command inside a footer? My text isn't centered when removing \centering:
17:17
@AlanMunn not yet decided by the doctors
@Atex why would it be wrong to use the latex command \hspace in a latex document, and to use tex primitives instead?
You can compare that with my previous image and see the difference
@Atex you don't need dimexpr here it's just that the etex expression form is a bit more compact than classic tex arithmetic syntax
cfr
cfr
@Atex well, I don't know what \fancyfoot does.
17:22
@DavidCarlisle Because I'm not good enough yet to distinguish between a correct and incorrect solution. Do you remember back when I told you how I dealt with creating new paragraphs, and you seemed very concerned about my approach? That made me realize there are "good" and "bad" ways to solve problems, correct and incorrect ways. Thus, if I see a solution has been provided by a user in here to something I've done myself, I'll usually adjust my approach in accordance with the answerer's methodology
cfr
cfr
is there any chance texdef will get fixed? it only needs a tiny change .... the warnings are starting to drive me mad. every time I use it it spews 5 lines of complaints.
@Atex don't get in the habit of adding things just because they probably don't hurt as you will add them when they do hurt. eg\relax is a no-op but it doesn't expand to nothing so \typeout(foo =3.5in} isn't the same as \typeout(foo =3.5in\relax} and the former is usually what you want even though \baselineskip=3.5in\relax is usually preferable to \baselineskip=3.5in so you need commands when you need commands.
@cfr Fair enough. I don't really know the technicalities of most commands I use, except if an issue arises which necessitates intricate knowledge of the command in order to fix it. Thus, my usual approach is just to use whatever command I can to get the desired output (although I'm more wary of how that solution is implemented nowadays)
cfr
cfr
@Atex if you do this, you will be forever changing things to no purpose. there are pretty much always multiple ways to achieve something in latex none of which is more correct than the others. there are also typically lots of bad ways to do things.
@Atex so as in any programming language, using the documented commands of that language rather than low level instructions injected from the underlying implementation is a good place to start. There may be cases where you need to extend latex with low level primitives but you should not be in a position when you do not know if you need that or not
4
cfr
cfr
17:27
@Atex yes, but I've never used \fancyfoot. it's not a standard command and I don't know how you're defining it.
@DavidCarlisle this is exactly what I'm scared of with regards to the \relax command. I can't imagine it's a really useful advantage to most of my needs, and thus I'd rather exclude it than guess around because I've seen others use it
@cfr it's defined by fancyhdr package, so been around longer than latex2e
cfr
cfr
@Atex you shouldn't need it with latex syntax.
@Atex you would almost never need it in a document, and as cfr says if you stick to latex syntax you never need it
@cfr I don't doubt this for a moment, but I do doubt my ability to evaluate a solution's correctness accurately, however. I should probably be a bit more trusting in myself, though, not immediatedly switching to another's solution if my own one works
cfr
cfr
17:31
@DavidCarlisle er.
Gooot it, this has proven to be a very beneficial conversation once again. I didn't even know we distinguished between TeX and LaTeX commands. Good to know. How can you tell TeX and LaTeX commands apart, though?
cfr
cfr
@Atex I'm an idiot. don't believe anything I say.
@Atex where they are documented or where they are defined. or put one in a tex document and see if you get an error.
@Atex you can't tell. The idea is that you learn latex from the latex book and that only tells you about latex commands, so you don't know the underlying commands exist at all. Of course sites like this make that idea totally false, but still we like to pretend.
2
cfr
cfr
but see my previous comment.
@cfr @Atex With respect to this statement, definitely believe the second sentence. :)
2
cfr
cfr
17:37
@DavidCarlisle but if you learn latex from a different book, it may include TeX commands.
@cfr yes (although it should tell you if it does that) but sites like this you usually don't get told (lots of my answers use \def and \expandafter and anything else that amused me at the time, so you are just supposed to know by osmosis,
@cfr A very humble, though derogatory answer, about yourself. I've come across your answers when searching here, some of which have been useful, particularly helping me understand the difference between "--", "to" and "edge" along with "--", "--+", "--++" and generally anything tikz-related. Don't forget to give yourself recognition for the efforts you do. This applies for all of you, helping noobs like me learn and understand this powerful, yet complex writing tool!
cfr
cfr
@AlanMunn belief/disbelief isn't appropriate w.r.t. that sentence b/c it can't be true or false.
@cfr Haha. True, but it seems that that sentence is a speech act.
cfr
cfr
@AlanMunn ?
17:45
@DavidCarlisle So you define some macro around \dimexpr that makes sure that no \relax is needed?
@mickep all expl3 int and dim commands do exactly that, at the latex level \setlength adds \relax although for complicated hostorical reasons it doesn't automatically add \dimexpr (the documented thing is calc package with a different incompatible infix expression syntax, which is unfortunate)
@DavidCarlisle Oh
@DavidCarlisle Did you den add some replacement of \setlength that uses \dimexpr?
cfr
cfr
@DavidCarlisle well, yes, it did. I've never read the latex book itself. (except in a bookstore, which I only suspect was lamport's.) but maintaining the pretence would be tricky when you need to drop down to tex to make most interesting changes. or even just to figure out what is going on. it isn't as if latex documents only produce latex errors.
:66746324  $ latexdef \dim_set:Nn
Duplicate specification "Find|F!" for option "find"
Duplicate specification "no-list-def|no-L" for option "no-l"
Duplicate specification "no-list-def-all|no-LL" for option "no-ll"
Duplicate specification "environment|e=s" for option "environment"
Duplicate specification "pgf-Keys|K" for option "pgf-keys"

\dim_set:Nn:
\protected\long macro:#1#2->#1=\__dim_eval:w #2\__dim_eval_end: \scan_stop:
$ latexdef \__dim_eval:w
Duplicate specification "Find|F!" for option "find"
Duplicate specification "no-list-def|no-L" for option "no-l"
Duplicate specification "no-list-def-all|no-LL" for option "no-ll"
Duplicate specification "environment|e=s" for option "environment"
Duplicate specification "pgf-Keys|K" for option "pgf-keys"

\__dim_eval:w:
\dimexpr
@mickep ^^
18:01
@cfr Although the sentence has the syntax of an imperative, and therefore has no truth value, its pragmatic use is equivalent to a proposition "cfr is not to be believed". Similar to the famous "Can you pass the salt?" example, which is syntactically an imperative, but interpreted pragmatically as a request (which is not a proposition either, but the idea is sill the same).
@mickep well as I say you could use expl3 \dim_set:Nn\foo{3in+4pt} at the latex level you can use \dimexpr inside \setlenhth and it will add the \relax but that's a bit rubbish. Picture commands (for last few years) do implicitly add \dimexpr so you can use \put(1,1) or \put(3in-5pt,4cm)
cfr
cfr
18:13
@AlanMunn surely that's syntactically interrogative rather than imperative?
@cfr Sorry yes. You're not the only idiot around here. :)
cfr
cfr
how can you colour something with a 4th dimension?
@cfr go back in time, then paint it?
cfr
cfr
@AlanMunn ;)
@DavidCarlisle it depends how you read the 'with'.
you might need 4th dimensional paint.
@cfr tricky stuff that is as it's time dependent color so you are never quite sure what it will look like
cfr
cfr
18:32
@DavidCarlisle are you sure that isn't just b&q's lighting?
19:16
@cfr and @DavidCarlisle Thanks! Is there a benefit over just using \dimexpr3in+4pt\relax? Or is it merely there to have a somewhat complete set of macros within the expl3 syntax? (I must confess I have not looked at expl3, it looks a bit... scary)
20:04
@egreg -- Well, I hope your repairs go well. I can assure you that hp replacements can work quite nicely. Mine is approaching its seventh anniversary, the result of a slip on black ice two days before Christmas.
20:59
@mickep well the point is just that any commands in expl3 that take a skip (or dimen or int) apply the appropriate ...expr and take an expression not just a literal value.
21:11
@DavidCarlisle Not sure I get it. But thanks for trying. Are users meant to use a macro like \__dim_eval:w?
(interesting, the backslash is not visible first, and show up first after a second or three... sorry if I pinged several times)
21:58
@mickep no, users (ie document authors) are not supposed to use expl3 at all, and authors of other expl3 packages are not supposed to use double underscore macros which are explicitly local to the module in which they are used
@DavidCarlisle oh, I see. So Atex should above use something different.
Unless it is development for a package or class.
cfr
cfr
22:24
@mickep well \dim_set:Nn is documented for package authors and is, in practice, fine to use for document authors, even if such behaviour is unexpected ;). but \__dim_eval:w was just there because you asked whether expl3 wrapped \dimexpr and you can't see that directly from the definition of \dim_set:Nn. but __ is the expl3 equivalent of @ i.e. internal to the package/class/kernel/whatever. but there's sort of more of an attempt to make it actually possible not to use internals.
I think we need warnings that we're going to get warnings on mobile phones, preferably quiet warnings so you aren't take completely by surprise when the incredibly loud warnings take over your phone.
red alert from 3am ....

« first day (5150 days earlier)      last day (50 days later) »