|
I'm creating a presentation in Beamer and using Tikz to make some transparent overlays using the opacity option. For instance, here's a piece of code:
\begin{frame}
\frametitle{Title}
\begin{tikzpicture}
\node at (0,1) {test};
\end{tikzpicture}
\end{frame}
\begin{frame}
\frametitle{Title}
\begin{tikzpicture}
\node at (0,1) {test};
\filldraw[fill=green!20!white, draw=green!40!black,thick,opacity=0.3] (0,1) circle (1);
\end{tikzpicture}
\end{frame}The color of the Beamer template and font rendering seriously changes between slides 1 and 2. If I remove the opacity option, the rendering of slide 2 goes back to normal. This problem only occurs in Adobe Reader. Evince or Okular can view the pdf without a problem. However, I am using animations, and so need Adobe Reader for my animations. This means that I just can't do fancy transparent overlays. Apparently the rendering that Adobe uses changes based on whether there is transparent stuff present, and it just doesn't look right in this case. Add new comment
Last Updated (Friday, 17 February 2012 11:19) A while ago, when I got fed up with KDE, I started using XFCE. So far I like it's simple interface. It's clean and fast. But some extra features would be nice, like easy access to recently used documents. This and more can be obtained by through XFCE goodies: sudo apt-get install xfce4-goodies Add the places item to a panel to view recently used items. Last Updated (Thursday, 02 February 2012 01:05) I was getting this Matlab error after I put a perfectly good bit of code inside a function: Error: File: MAIN.m Line: 70 Column: 12
Functions cannot be indexed using {} or . indexing.There was a problem with the indexing in a piece of code that looked like this: A = trim(i).alpha; The fix was to initialize the "trim" variable at the start of the function like this: trim(1).alpha=[]; Problem solved. I have no idea why it happened, but don't care right now.
Last Updated (Wednesday, 01 February 2012 01:36) I have been trying to find a way to replace symbolic links with the files that they are pointed to. It turns out the solution required a little script: #!/bin/bash
echo Processing $1
dir=$(dirname "$1")
reltarget=$(readlink "$1")
if [[ $reltarget == /* ]]; then
abstarget=$reltarget
else
abstarget=$dir/$reltarget
fi
rm -fv "$1"
cp -afv "$abstarget" "$1" || {
# on failure, restore the symlink
rm -rfv "$1"
ln -sfv "$reltarget" "$1"
}Replace a link with its target by using the script like this: ReplaceSymLink.sh file1 or in combination with the find command like this: find -type l -exec ReplaceSymLink.sh {} \;(assuming that you have placed the script somewhere that is in your executable search path) Last Updated (Saturday, 28 January 2012 00:54) Unfortunately, my experience with dual-monitors in Linux has continually been filled with frustration. I have a relatively simple setup: my laptop, a monitor at work, and a monitor at home. The possible configurations are:
I have not had any luck getting reliable behavior out of Linux:
After all these problems, I discovered xrandr, a command-line tool for changing and enforcing a display configuration. The possibilities are useful: ie, running a script to change configurations. Or running a command at startup to change configurations. Typing "xrandr" will output your current display configuration. I can set the configuration all at once like this: xrandr --output LVDS1 --auto --output VGA1 --auto --righ-of LVDS1 Or do incremental changes like this: xrandr --output VGA1 --right-of LVDS1 xrandr --output VGA1 --rotate left I just installed XFCE so I will give it a few days before I make my verdict, and having xrandr will be a big help. It could probably be used in KDE too, though. There is also a gui: "grandr" Last Updated (Saturday, 14 January 2012 14:14) Adding a nomenclature section to a LaTeX document is very easy. It can be used for math nomenclature, abbreviations, or symbols. First, call the package in your preamble: \usepackage{nomencl}
\makeindexThen add the \printnomenclature statement wherever you want to nomenclature list to appear. I also changed the default title and added a line to the table of contents with yet another title: \renewcommand{\nomname}{LIST OF SYMBOLS, NOMENCLATURE, OR ABBREVIATIONS}
\printnomenclature
\addcontentsline{toc}{chapter}{LIST OF SYMBOLS}Now you can add individual nomenclature definitions in your document. They should look like this: This is found by rotating the body coordinate system around $\hat{\vect{y}}_B$ through an angle $\alpha$\nomenclature{$\alpha$}{Angle of attack}. The result is...
\begin{align}
\express{\vect{a}}{B} &= \matr{R}_1(\phi) \matr{R}_2(\theta) \matr{R}_3(\psi) \express{\vect{a}}{E} \label{eq:2:RBE1}
\end{align}
\nomenclature{$\vect{a}$}{A generic vector}
\nomenclature{$\express{\vect{a}}{B}$}{A vector expressed in $\rframe{B}$}Compiling your document changes slightly: latex filename.tex makeindex filename.nlo -s nomencl.ist -o filename.nls latex filename.tex Last Updated (Thursday, 12 January 2012 19:24) First, the Beamer user guid is the first place you should turn to for help. Like every user guide for latex packages, it is well-written and complete. Beamer has some built in themes. They are split into themes in general (dealing with slide format) and color themes. You can mix and match slide formats with color themes. A good matrix of the possibilities is here. Changing themes is as easy and changing these two lines: \usetheme{Madrid}
\usecolortheme{default}This is the combination I am currently using and seems to be very nice. There are many options you can manually set in the beamer package. For example, you can customize the bullets by adding these lines before \begin{document} \setbeamertemplate{itemize item}{\textbullet}
\setbeamertemplate{itemize subitem}{\textbullet}
\setbeamertemplate{itemize subsubitem}{\textbullet}Beamer also has the impressive ability to embed a speaker's notes into a presentation, then display the presentation on one screen (probably the projector) and the notes on a second screen (probably your laptop). This can be enabled by adding these lines to your document: \usepackage{pgfpages} % for multiple-screen presentations
\setbeameroption{second mode text on second screen}
% \setbeameroption{second mode text on second screen=left} % might not let animations workIt's easy to add a text box to beamer with colors that match the theme, a title bar, and a shadow. The syntax is: \begin{block}{Block Title}
line 1
line 2
\end{block}Last Updated (Thursday, 12 January 2012 01:35) I stumbled across this bit of code and it was too good not to write down. Do you want to know the value of "\textwidth", for example? You just have to type in \the\textwidth in your document. The problem is it will return points. So how can we convert from points to cm? The answer: by using the fp package and this bit of code: \newlength{\TOarg} \newlength{\TOunit}
{\catcode`p=12 \catcode`t=12 \gdef\TOnum#1pt{#1}}
\newcommand\TOop[2]{\setlength{\TOarg}{#2}%
\FPdiv\TOres{\expandafter\TOnum\the\TOarg}{\expandafter\TOnum\the\TOunit}%
\FPround\TOres\TOres{#1}}
\newcommand{\TOspace}{\ }
\newcommand\TOpt[2][2]{\setlength{\TOunit}{1pt}\TOop{#1}{#2}\TOres\TOspace pt}
\newcommand\TOin[2][2]{\setlength{\TOunit}{1in}\TOop{#1}{#2}\TOres\TOspace in}
\newcommand\TOcm[2][2]{\setlength{\TOunit}{1cm}\TOop{#1}{#2}\TOres\TOspace cm}
\newcommand\TOmm[2][2]{\setlength{\TOunit}{1mm}\TOop{#1}{#2}\TOres\TOspace mm}
\newcommand\TOem[2][2]{\setlength{\TOunit}{1em}\TOop{#1}{#2}\TOres\TOspace em}This provides several commands, like The width of this document is \TOpt[0]{\textwidth}, that is, \TOcm{\textwidth}, whereas the height is \TOcm[3]{\textheight}, i.e. \TOin{\textheight}. Here we have some equivalences between different units:
\begin{center}
\renewcommand{\arraystretch}{1.5}
\begin{tabular}{r*{4}{@{\ =\ }r}}
1pt & \TOpt[0]{1pt} & \TOin[3]{1pt} & \TOcm{1pt} & \TOmm{1pt} \\
1in & \TOpt{1in} & \TOin[0]{1in} & \TOcm{1in} & \TOmm[1]{1in} \\
1cm & \TOpt{1cm} & \TOin[3]{1cm} & \TOcm[0]{1cm} & \TOmm[0]{1cm} \\
1mm & \TOpt{1mm} & \TOin[3]{1mm} & \TOcm{1mm} & \TOmm[0]{1mm}
\end{tabular}
\end{center}where the optional [3] argument specifies the number of decimal places to print. Very handy! I had a tricky time adding my BibTeX bibliography in Beamer. At first, I got an error about having to do with "\newblock" It turns out that command is not defined in Beamer and must be manually added with this line near the top of your document: \def\newblock{\hskip .11em plus .33em minus .07em}Then, after citing references in the normal manner in the text, the bibliography slide can be created via: \begin{frame}
\bibliographystyle{../setup/mla-good}
\bibliography{my_ref_database}
\end{frame}
A BibTeX reference can possibly be manually added to a slide using the code snippet below, but it will generate an "Undefined control sequence - \end{frame}" error that I haven't figured out how to get around. So far I have not discovered any reliable to way insert a full bibliography (like above) AND insert individual, full references in random slides. So I ended up typing out the few references I needed to insert in the middle of my presentation, rather than continue with the error this code generated. \nobibliography*
\begin{itemize}
\item \bibentry{Collar1948}
\end{itemize}
Last Updated (Tuesday, 10 January 2012 04:49) It's useful to see what IP addresses are used up on your network sometimes. This can easily be done with fping. An example looks like: sudo fping -s -g 192.168.2.100 192.168.2.130 -r 1 Install it first, if necessary: sudo apt-get install fping Last Updated (Monday, 09 January 2012 02:26) |
Designed by i-cons, modified by Judson.