27 August, 2015

Using Skim as preview tool with LyX/LaTeX

OS X's Preview app does not support reloading of updated PDFs and has no PDFSync support.
Here is quick guide to set up Skim, which is a better app for this purpose.

1. Installation

Simply download and setup Skim and LyX, following their instructions.

2. Setup PDFSync Support

Skim -> Prefs -> Sync
    [x] Check for file changes 
    Preset: [Lyx] 

LyX -> Prefs -> Output 
    PDF command: /Applications/ $$n $$o $$t 

LyX -> Prefs -> File Handling -> File Formats -> Format: [PDF (pdflatex)]
    Viewer: [Custom] [open -a $$i] (click Apply)

Repeat previous step for PDF (LuaTeX) and PDF (XeTeX)

3. Improve Output

The text in Skim can be blurry on some systems OS X versions. You can try messing around with the font smoothing to fix that.

defaults write -app Skim AppleFontSmoothing -integer 1

worked well for me.


Skim hidden preferences:
LyX SyncTeX help:

24 August, 2015

LaTeX/LyX positioning floating text on top of a page

To publish preprint versions of papers, you often need to add a remark on top of the first page. If you do not want to mess around with the final PDF, there is are several ways to add floating text, with absolute positioning.

Here is my current solution.

% optional box and link packages (LyX adds them automatically)

% import textpos in LaTeX preamble

% set default positioning parameters
\textblockorigin{0mm}{0mm} % start content at the top-left corner

\definecolor{shadecolor}{rgb}{1, 0.80078125, 0}

\textbf{\textcolor{blue}{Preprint version for self-archiving.}}\\
The final publication is available at [Name of Publisher] via
\textbf{\href{}{[DOI Number]}.} 

The output looks as follows.

15 August, 2015

Fun with functions on WolframAlpha

Trying to plot some functions on WolframAlpha I stumbled upon this one.

 f(x,y) = (x2 + y2) * sin( 1 / (x2 + y2) ) 

It creates some nice apparently not-fully symmetric contour plot, such as this one [1]:

Here are two different views [2,3] on the function:

Seeing such images, always inspires me to start my own algorithmic fine arts projects.

Image Sources

[1] WolframAlpha plot of f(x,y) with -0.01 < x,y < 0.01
[2] WolframAlpha plot of f(x,y) with -1 < x,y < 1
[3] WolframAlpha plot of f(x,y) with -0.5 < x,y < 0.5

PS: I will let you know, when I found the time for such procrastination.

09 August, 2015

VLDB Journal paper on visualization-driven data aggregation

Dear readers,
I like to inform you that the main paper about my research of the past 2-3 years has been published [1] in the The VLDB Journal. It is based on my award-winning paper about the M4 aggregation [2] for line charts. It generalizes and extends the M4 approach to the most common chart types, such as bar charts, scatter plots, space-filling visualizations, and also describes how to conduct visualization-driven data aggregation in chart matrices.

For more details, I suggest to have a look at the papers [1, 2].

[1VDDA: automatic visualization-driven data aggregation in relational databases
U Jugel, Z Jerzak, G Hackenbroich, V Markl
The VLDB Journal
2014, DOI 10.1007/s00778-015-0396-z

[2M4: A Visualization-Oriented Time Series Data Aggregation
U Jugel, Z Jerzak, G Hackenbroich, V Markl
Proceedings of the VLDB Endowment 7 (10), 797 - 808, 2014, (best paper award!)


05 August, 2015

Listing code in LaTeX/LyX

In the past I used external tools to provide listings for my papers. However, with 90% of my listings being SQL today, I am regularly editing and tweaking my listings for readability, which is easier when having them directly inside my LyX document. I had the fear that this would impair code highlighting. It doesn't, since the default listings package provides a ton of options [1].

Current working mode and options

  1. Use default listings package
  2. Want floated listings (in LyX)? -> (Right-Click >Settings > Placement > Float [x])
  3. Float needs caption (in LyX)? -> (Menu > Insert > Caption)
  4. Want to add/change colors? -> use colors + listing options
    \definecolor{byzantium}{rgb}{0.44, 0.16, 0.39}
  5. Want more colors? -> go to
  6. Want to add keywords? -> use listing options 
  7. Want to emphasize words? -> use listing options
LyX provides the (Document > Settings > LaTeX preamble) to add colors.
LyX also to define default listing properties in (Document  > Settings > Listings).

Here are my current defaults.

Here is some example output.


[1] Carsten Heinz, Brooks Moses, Jobst Ho mann. The Listings Package.