Thursday, December 22, 2011

ams and enumerate (2nd. time round)

The enumeration problem has been nagging on me overnight and thus investigated further. The solution is simple: the enumerate package is plain incompatible with AMS (probably with anything other than standard latex).

As you can see ams changes a lot of widths including parsep, parindent and leftmargin. The enumerate package also changes leftmargin, unfortunately not relative to the one set but absolute, probably calculated from the standard. So don't use enumerate and AMS! I will define my own list environment from now on which looks better.

Amsthm, lists and enumerate.

Problem:
Amsthm has three theorem styles normal, remark and definition, of which only the normal style is set in italics normally. If you use a list within such a theorem (questionable according to some, necessary to me) then the item labels for these lists are italicized as well which doesn't look good.

The advice to correct this was to manually \textup the label in each item. This of course works normally, but i also employ enumerate. In this case i got a warning "The counter will not be printed.", which is due to the fact, that enumerate will not detect counters that are inside braces.
Solution:
\begin{enumerate}[\upshape i)]
\item...
\end{enumerate}

This finally looks good

Disjoint Unions

I had countless revelations about math and LaTeX over the last week. I don't know why this happened but i made a major step forward. Most of them are little but they add up and it shows. One of the things that I fudged together years ago was an ugly construction for disjoint unions, something along the lines suggested in a4symbol.pdf. The correct solution however is to \usepackage{MnSymbol} and use \cupdot/\bigcupdot!

Tuesday, December 20, 2011

Latex macro reference for authors

I just found this handy reference for package authors, that I didn't know so far. Try it here.

Monday, November 14, 2011

I just realized my squid was down. The /var/log/squid/squid.out was unhelpful as were all the other logs in that dir. The only thing that pointed me to right solution was
Nov 13 10:00:28 emma (squid): The basicauthenticator helpers are crashing too rapidly, need help!
Nov 13 10:00:28 emma squid[9292]: Squid Parent: child process 9359 exited with status 1
It turns out the problem was that i added a comment after the last word of the first line, documenting what i did:
auth_param basic program /usr/lib64/squid/ncsa_auth /etc/squid/squid_passwd #use apache style pwd file instead of pam
Remember: Squid is idiotic and doesn't strip comments before parsing the line.

Suicide in the morning

This morning i woke up, started my day with a bit of blog reading and five links into the day i reached this. I especially liked the 5 +1. I guess this is the paradigmatic example for the dislike/-1 debate.

Sunday, October 2, 2011

youtube proxy script/pac file

function FindProxyForURL(url, host)
{
  if (shExpMatch(url, "http://*.ytimg.com*")) { return "PROXY <server>:<port>"; }
  if (shExpMatch(url, "http://*youtube.com*")) { return "PROXY <server>:<port>"; }
  return "DIRECT";
}
I really love this one, finally GEMA can go **** themselves for not providing distribution rights!
Of course you have to actually replace the variables like tehsuck.de:8079