Mittwoch, 15. Juli 2015

horizontal and vertical centering in subfigures

subfigures in a figure environment:

\begin{figure}
\end{figure}


adding centered graphics with different heights:

\begin{figure}
  \rule{3cm}{5cm}
  \begin{minipage}[b][5cm][c]{2.5cm}
    \color{red}{\rule{2.5cm}{2cm}}
    \vfill
    \color{blue}{\rule{2.5cm}{2cm}}
  \end{minipage}
\end{figure}



Change separation length in itemize latex

\setlength\itemsep{1em}

abbreviations/acronyms via the acro package in latex

The best package for acronyms in latex documents is

\usepackage{acro}

To define acronyms you use the following commands:

\DeclareAcronym{command}{short=shortform,long=longform}

You can use the acronyms in a text via

\ac{command}

changing \ac into

\Ac     -capital initial
\acp   -plural
\ac*    -without marking it as already present
\acl     - long form
\acs    - short form

for follow reading:

http://mirror.unl.edu/ctan/macros/latex/contrib/acro/acro_en.pdf

formulas in latex

For a single line of equation:

 \begin{equation}
\end{equation}

For a multiline equation, which can be aligned:

 \begin{align}
\end{align}

For a multiline equation:

 \begin{gather}
\end{gather}

Dienstag, 21. April 2015

Barrier for floats

If you want to create a barrier for floats created via the
\begin{figure}
\end{figure}
or
\begin{table}
\end{table}
environments you can use the floatbarrier function when using the placeins-package
\usepackage{placeins}
\Floatbarrier

Mittwoch, 4. März 2015

plot an image transparently with gnuplot

The standard way to plot a image in gnuplot is the following:
plot x
plot 'test.png' binary filetype=png with rgbimage 



with several filetypes, like jpg, png and so on. But if you want to have this image transparent you need to choose rgbalpha instead of rgbimage and use u 1:2:3:(alpha-value) with the alpha-value ranging between 0:255 as follows:

plot x
replot 'test.png' u 1:2:3:($4*0.5) binary filetype=png with rgbalpha 


Mittwoch, 25. Februar 2015

group of transparent objects tikz

if you have a group of overlaying objects and want them to be transparent, a standard procedure is that you set the transparency for each object.
But this may lead to a overlap of these transparent object and that you see the underlying whereas you actually just want to have the full combined object transparent.

You can simply solve that by placing the group of objects in a scope and set the group properties to transparent in the following way:

\begin{scope}[transparency group, opacity=0.5]
% group of objects
% more objects
\end{scope}