vrijdag 23 december 2016

How to select files in a directory with the boolean operator AND

I want to select (find/grep/ls) certain files in a directory starting with certain words and ending with a certain extension. Example:
  • bluebelt_hans_hoff.jpg
  • bluebelt_hans_hoff.JPEG
  • bluebelt_peter_gort.jpg
  • bluebelt_peter_gort.JPEG
I only want the files starting with "bluebelt" AND ending with only the ".jpg" extension (and not the JPEG extension). How to do this on the commandline?

Answer:  ls bluebelt* | grep .jpg

donderdag 22 december 2016

Index in LaTeX: dit spreekt voor zichzelf.

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{imakeidx}
\makeindex[columns=3, title=Alphabetical Index, intoc]
 
\begin{document}
 
\tableofcontents
 
\section{Introduction}
In this example several keywords\index{keywords} will be 
used which are important and deserve to appear in the 
Index\index{Index}.
 
Terms like generate\index{generate} and some\index{others} 
will also show up. Terms in the index can also be 
nested \index{Index!nested}
 
\clearpage
 
\section{Second section}
This second section\index{section} may include some special 
word, and expand the ones already used\index{keywords!used}.
 
\printindex
\end{document}

dinsdag 6 december 2016

How to delete empty lines in LibreOffice

There is a way to delete empty lines in LibreOffice with regex. 
It is this command: ^$
But sometimes this doesn't work. Because the above mentioned command actually deletes a paragraph and not a line.
What to do in a case like this one:

Marco Borsato
Wat is mijn hart

De Dijk

Niemand in de stad

The above mentioned command doesn't work and doesn't erase the line between the two texts.

What you need to do, is to clear formatting.
Also make sure that after clearing lines, there are no spaces left at the beginning of the lines.

Enlarging Libreoffice window completely with command

 You can open the LibreOffice window completely by pressing the CTRL+Shift+J keys together.