Sunday, August 12, 2012
Mutter wollte Website
Mutter bekam Website. Hat mich viel zu viel Zeit gekostet, aber ich bin sehr stolz darauf. Jetzt weiß ich auch wieder, warum ich Webseitengefrickel nicht mag. Design ist echt nicht meine Stärke. Ich wünschte LaTeX könnte auch schöne Homepages erzeugen. Glad to be done with it.
Sunday, July 8, 2012
Skype 4 for Linux and the tab switch (again)
I've been using Version 4 for several weeks. I am more than glad to finally have a tabbed interface, which i sorely missed from the mac. This makes them en par to me finally.
Since i switched from cwm to notion i am even keener to avoid using the mouse, so today i got fed up and pressed all buttons till I finally found Ctrl+tab to switch the tabs.
Saturday, July 7, 2012
Multiple \label error
Package amsmath Error: Multiple \label's: label 'important' will be lost
It took me over an hour because there were a couple of valid causes to this problem and i had a few hunches that were all completely off. This error was caused by an incredible amount of tiredness on my part and the fact that I, in my stupidity, added a label to a ...
tada... align* environment. If you ever have this problem, think about if your environment actually has a tag you can reference!
It took me over an hour because there were a couple of valid causes to this problem and i had a few hunches that were all completely off. This error was caused by an incredible amount of tiredness on my part and the fact that I, in my stupidity, added a label to a ...
tada... align* environment. If you ever have this problem, think about if your environment actually has a tag you can reference!
Rotating a single page in latex output
If you want to rotate a page (not just the content, i.e. you also change the geometry of that page!) the following is one possible solution:
\documentclass{article}
\begin{document}
text
\pagebreak[4]
\global\pdfpageattr\expandafter{\the\pdfpageattr/Rotate 90}
text\end{document}
Thursday, June 28, 2012
Getting the total number of pages into a counter
This is the only way i know of, to get the total number of pages for anything other than mere display. Took me two hours to get just right and requires two packages. There is a surprising lot of packages that do similar things but in the end all just print. Weird. Enjoy
\documentclass{article}
\newcounter{c@LastPage}
\usepackage{lipsum}
\usepackage{atveryend}
\begin{document}
a %\lipsum
%\lipsum
\makeatletter
\AfterLastShipout{\immediate\write\@auxout{\string\setcounter{\string c@LastPage} {\thepage}}}
\ifnum\value{c@LastPage}>2 foo \fi
\makeatother
\end{document}
"The save failed due to out of memory or disk space".
I had a friend come over with her new Mac because when writing a thesis Word (2007?) claimed "The save failed due to out of memory or disk space". Given that the disk had more space left over than mine ever had (>200Gb), something else had to be wrong. Different Volumes didn't do the trick, permissions were ok, the folder wasn't dangling.
Turns out she used a feature from the equation editor that was incompatible with the .doc format and would have needed to save as .docx. Way to go Microsoft - I hereby proclaim you most useless and moronic error message producer of this month.
Turns out she used a feature from the equation editor that was incompatible with the .doc format and would have needed to save as .docx. Way to go Microsoft - I hereby proclaim you most useless and moronic error message producer of this month.
Saturday, June 9, 2012
Wrap list around a figure
I often had a need for a way to wrap a list around a figure in the past and hadn't quite found out. Wrapfig and floatflt aren't compatible with lists and break the layout in very bad ways.
Approaches with 2 minipages or tabulars are just wrong, period. There is a new package called cutwin, that you can combine with parshape (or use it without) to coerce your text to do something similar to what ultimately wrapfig should do. I didn't get it to work properly with my ams doc, which is kind of sad. I get the feeling their way of building lists is incompatible with the rest of the latex world :/.
Then i found a solution in some mean way to use minipage. It was still wrong because the type area is so different with ams but after a bit of fiddling with my stuff this works:
\begin{wrapfigure}{r}{.3\textwidth}
\centering
\includegraphics[width=.29\textwidth]{pic}
\end{wrapfigure}
\item[ad d)]
\end{minipage}
\end{enumerate}
Looks really wrong, but does the right thing. Hope this helps someone. I sure would have liked to find this.
Approaches with 2 minipages or tabulars are just wrong, period. There is a new package called cutwin, that you can combine with parshape (or use it without) to coerce your text to do something similar to what ultimately wrapfig should do. I didn't get it to work properly with my ams doc, which is kind of sad. I get the feeling their way of building lists is incompatible with the rest of the latex world :/.
Then i found a solution in some mean way to use minipage. It was still wrong because the type area is so different with ams but after a bit of fiddling with my stuff this works:
\begin{enumerate}
\item some text
% Rest of old \item
\par
% New \item starts here!
\noindent\begin{minipage}{.88\textwidth}\begin{wrapfigure}{r}{.3\textwidth}
\centering
\includegraphics[width=.29\textwidth]{pic}
\end{wrapfigure}
\item[ad d)]
\end{minipage}
\end{enumerate}
Looks really wrong, but does the right thing. Hope this helps someone. I sure would have liked to find this.
Subscribe to:
Posts (Atom)