@YiannisLazarides I'm not sure I understand your answer to the setting a dimension question. You seem to be saying it's good to expose, but your example would appear to be a bad case.
@AlanMunn It is good to expose an interface. I will expand a bit to make it clearer. If \setlengthPKG{7pt} is your internal command and no external, it will break your previous papers.
@AlanMunn Sorry, I see the issue (my example demonstrates a bad case) to indicate that it is better to rather expose an author command as an interface
@YiannisLazarides Your edit makes it clearer I think. Personally I don't see the real distinction as long as you (as a package writer) understand that the length in question is a user length and not an internal one, then you would also think twice about changing the name of the length just like you would think twice about changing the name of the setting macro.
@AlanMunn You right in a way that you as the package writer, should be careful. However, if it was a big project such as l3 you can expose the interface to other packages etc, even if the functions (aka macros) are still not ready, then you free to do what you like. It also brings consistency in the equation (internal commands should have an @), external should not have them.
@YiannisLazarides Oh, absolutely I agree that maintaining a distinction between internal and user commands is important. So the question boils down to whether lengths (as opposed to regular commands) should always be internal and then set by some user macro that hides the fact that they are lengths. This view is not so obviously true to me.
@AlanMunn Will have a coffee and re-read the question, although at first glance the OP seems to be asking this. Heiko's answer is quite good, recommending to rather expose a keyvalue interface.
@YiannisLazarides I was just thinking about this because someone commented on an answer I gave about fancyhdr which makes user accessible lengths macros which have to be set by \renewcommand instead of \setlength. To me this is an odd decision to have made.
@AlanMunn Actually--since I've been picking up--PGF, skills I pretty much prefer to use key-value right through. I will modify my answer later on in the day with an example to compliment Heiko's answer. Can you let me have the link for the question you mentioned?
Here's the question: tex.stackexchange.com/a/13897/2693 It's only the comment that got me thinking about the issue; the answer doesn't talk about it at all, so there's no need to refer to it I should think. I'm off now, good night!
In several editions of Dungeons and Dragons, the plane shift spell requires a forked metal rod, the design and material of which varies depending on the destination plane. Is there any cannoical list of which rod designs are required for different planes - in particular, the Prime Material?
(I'm...
@JosephWright I use the term 'memorize' to mean generic knowledge-learning: application is never an issue for me, so the only thing to do is memorize the backbone
@Gnintendo I did get 100% on a one course test (organic chemistry), but that was because the lecturer really did not want to have the test at all and gave us a 'workshop' the week before and said 'the real test will be very similar, so to get 100% you have to get every single thing right'. So I did :-)
I have the following problem with verbatim text. \@noligs will make < a fragile character which will break, for instance, on \write. Is there an established remedy? Some protection?
@Gnintendo Transition metal catalysis, currently focussed on energy applications. See uea.ac.uk/chemistry/people/faculty/jaw. My PhD is mainly in palladium catalysis (Wacker reaction) with a bit of hydrogenation too :-)
Mathematical modelling is increasingly becoming relevant to Cancer Research. But, just being Mathematician is not enough - you'll need to speak their language.
Phew. I completely shredded the code of the logalyzer package on Dec 30 because it couldn't cope with some more complicated assignment structures. Then I became ill for several days and haven't touched the ruins of the package till this weekend. Needless to say, nothing worked at all, it was all dangling ends... Now at least it works again as it did before (plus no parsing glitches). Finally I can go on developing (though slowly, as work started again).
@PauloCereda Yes it was just tonsillitis. I had to take some penicillin. Still, it killed exactly those remaining days of leave I had intended to to this. After recovering, work schedule set in immediately :-(
user19161
@PauloCereda I am back to CentOS right now. It might overtake Debian in my heart. It looks fine after I installed the msttcorefonts rpm. Previously I had to build that rpm myself to get the Microsoft fonts.
@tohecz I mean, if the corrections are minor (see last edit of his) but the message is recent, there's nothing too bad. But he tried very minor corrections of rather old messages. I rejected some not to bump them up.
@egreg TBH I was rejecting some even of the non-bumping ones, mainly because what he was correcting were not really mistakes, rather a writing style (cf. "I'm" vs "I am")
@percusse @tohecz And if you're interested in reading it painlessly, use a real news reading client and a real news server. I use eternal-september.org.
@JosephWright Yes, I just checked that it's a Universal binary; I thought it might have been running on Rosetta, but since it's not, it may well still run. It's a testament to the author (and the Mac OS) that it survives so many iterations of the OS.
You can check whether the current series is \mdseries and in that case just re-activate it:
\makeatletter
\expandafter\g@addto@macro\csname sffamily \endcsname{%
\begingroup% for \x, \y to be local
\edef\x{\f@series}% problem with \long definitions, we have to make new local macros for compa...
@egreg well, that's something I call: "manual work => unstable"
!!/texdef -t latex rmfamily
@egreg btw the tabu thing seems unfortunate ... user interface changed. It is calling for reconsideration because it seriously kills backward compatibility
@JosephWright I'm sure that's true. I used to write lab automation software for an engineering dept. and although I doubt that any of my stuff is still being used, it definitely hung around long after the machines it was running on become obsolete for other purposes.
Yesterday I was pairing the socks from the clean laundry, and figured out the way I was doing it is not very efficient. I was doing a naive search - picking one sock and "iterating" the pile in order to find its pair. This requires iterating over n/2 * n/4 = n2/8 socks on average.
As a computer ...
:) From the top answer "The best real-world partitioning I can think of is creating a rectangle of piles: one dimension is color, the other is pattern. Why a rectangle? Because we need O(1) random-access to piles. (A 3D cuboid would also work, but that is not very practical.)"
@JosephWright He's not a new user! Here's how I commented is first answer (in 2011):
Welcome to TeX.SX, your expertise will be very helpful here. You'd like to choose a better nickname than user107136, wouldn't you? — egregNov 28 '11 at 11:04
@AlanMunn Probably too informal. :) rebu is another way of referring to the word rebuliço, which means 1. Barulho, agitação, confusão, balbúrdia, bulha. 2 Tropel de gente; correria. 3 Desordem, discórdia, motim.
@tohecz For sure I've never used LyX. I tried launching it once to see what it was about. Five minutes later there was no trace of it on my machine any more.
@egreg About my experience too. A student of mine used it without realizing that it wasn't LaTeX, and so when I tried to give him some help he was totally lost.
@egreg Do you have an opinion on the "hide lengths from users" question that I was discussing earlier with Yiannis? I don't see the advantage of having a macro to set a user definable length as opposed to having the user use \setlength directly.
@AlanMunn I mostly agree with Heiko. There's no "right" or "wrong" way; above all the interface should be coherent. In some packages such as tocloft you have to know whether a parameter is a macro to set with \renewcommand or a dimension to set with \setlength and it's not easy to remember.
@egreg Right. Although the tocloft etc way is why I find the macro way far from ideal from a UI point of view. If something is a length it makes sense to use \setlength to set it (unless you go for a key value system.).
@egreg It is tricky getting this right: see for example l3galley, where I'm still not sure whether to expose variables or have 'set' functions (as not everything is a simple mapping)
@JosephWright @AlanMunn I believe that Peter Wilson was worried about exhausting the available registers. And the LaTeX kernel had to spare on control sequences.
@StephanLehmke Yes, that may well be true. That's what fancyhdr states in its code as justification for the change (it previously used dimension registers.)
@AlanMunn One advantage of a macro is that you can put something like (the token list) .75\baselineskip in it (of course assuming the receiving end can cope with that).
@StephanLehmke Timing of the setting is important when you use "relative" dimensions (em or ex based): if you use \setlength, the present value of em or ex would be used, not the one valid at use time.
I think it's easiest anyway nowadays to wrap everything in \dimexpr separately for best results. That should become the standard interface for specifying dimensions.
@Timebandit LaTeX rules are simple: if you think something is wrong, don't do it. Don't mess with \parskip, \parindent and line spacing. Be concise. Don't abuse new commands. Write clean tables. Reference everything you have; if e.g. there's a picture you don't \ref in the text, take it off. Let the document class dictates the look of your document and not the other way around, document classes are there for a purpose. :)
@PauloCereda I know most of them, the only thing I did was \parindent0em and \setlength{\linespread}{1.5} I was just thinking of something like a humorous but helpful list of rules :)
@Timebandit The beginning is easy: Take all the garbage you're putting into the preamble of every document and put it into a file myownpackage.sty. From there, refine.
@StephanLehmke Or answer a question here or on a mailing list and produce packages you will never actually use. Or get frustrated at answering all your students' LaTeX questions about dissertation formatting and write a class for them (and everyone else.) I'm starting to see a pattern here. :)
@Timebandit Unless there are lots of LaTeX users around and there's a definite need, it's probably not worth it. Here in the US, universities have crazily specific formatting requirements for theses, so having a class for that is pretty much a necessity. But if you have freer requirements, then it's probably best to let people do what they want.
@Timebandit If it's useful to you, then yes that's true. Personally I've always found that writing things that have a definite use is better for me to learn than creating projects with little or no use. But YMMV. (your mileage may vary.)