Latex

From Andreida
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Links

Misc

Custom header/footer

\documentclass{...}
\usepackage{fancyhdr}
\pagestyle{fancy}
\lhead{}
\chead{}
\rhead{}
\lfoot{}
\cfoot{}
\rfoot{}

last page

\usepackage{lastpage}
Page \thepage~/~\pageref{LastPage} }

Umlaute

\usepackage[utf8]{inputenc}

pdf auto update

\usepackage{pdfsync}

Table with repeating header and wrapping rows

The wrapping occurs only at spaces (whitespaces?), so make sure you do not have words that are longer than the columns width.

Source: here

\documentclass{report}

\usepackage{longtable,tabu}

\begin{document}
	
	\begin{longtabu} to \textwidth {
			X[1,c]
			X[1,c]
			X[1,c]
			X[10,l]}
		\hline \hline
		\textbf{Time End of Step} & 
		\textbf{Step} & 
		\textbf{Event} &
		\textbf{Description} 
		\\ \hline \hline \hline \hline
		\endhead % all the lines above this will be repeated on every page
		
		12:18:52 & 1 & 1 & this is a description for the event \\
		12:18:52 & 1 & 1 & this is a description for the event \\
		12:18:52 & 1 & 1 & this is a description for the event 1234567890x1234567890x123 4567890x1234567890x123456789 0x1234567890x1234 567890x1234567890x1234567890x1234567890x \\

		12:18:52 & 1 & 1 & this is a description for the event \\
		12:18:52 & 1 & 1 & this is a description for the event \\
		12:18:52 & 1 & 1 & this is a description for the event 1234567890x1234567890x123 4567890x1234567890x123456789 0x1234567890x1234 567890x1234567890x1234567890x1234567890x \\
		
		12:18:52 & 1 & 1 & this is a description for the event \\
		12:18:52 & 1 & 1 & this is a description for the event \\
		12:18:52 & 1 & 1 & this is a description for the event 1234567890x1234567890x123 4567890x1234567890x123456789 0x1234567890x1234 567890x1234567890x1234567890x1234567890x \\
		
		12:18:52 & 1 & 1 & this is a description for the event \\
		12:18:52 & 1 & 1 & this is a description for the event \\
		12:18:52 & 1 & 1 & this is a description for the event 1234567890x1234567890x123 4567890x1234567890x123456789 0x1234567890x1234 567890x1234567890x1234567890x1234567890x \\
		
		12:18:52 & 1 & 1 & this is a description for the event \\
		12:18:52 & 1 & 1 & this is a description for the event \\
		12:18:52 & 1 & 1 & this is a description for the event 1234567890x1234567890x123 4567890x1234567890x123456789 0x1234567890x1234 567890x1234567890x1234567890x1234567890x \\
		
		12:18:52 & 1 & 1 & this is a description for the event \\
		12:18:52 & 1 & 1 & this is a description for the event \\
		12:18:52 & 1 & 1 & this is a description for the event 1234567890x1234567890x123 4567890x1234567890x123456789 0x1234567890x1234 567890x1234567890x1234567890x1234567890x \\
		
		12:18:52 & 1 & 1 & this is a description for the event \\
		12:18:52 & 1 & 1 & this is a description for the event \\
		12:18:52 & 1 & 1 & this is a description for the event 1234567890x1234567890x123 4567890x1234567890x123456789 0x1234567890x1234 567890x1234567890x1234567890x1234567890x \\
		
		12:18:52 & 1 & 1 & this is a description for the event \\
		12:18:52 & 1 & 1 & this is a description for the event \\
		12:18:52 & 1 & 1 & this is a description for the event 1234567890x1234567890x123 4567890x1234567890x123456789 0x1234567890x1234 567890x1234567890x1234567890x1234567890x \\
		
		12:18:52 & 1 & 1 & this is a description for the event \\
		12:18:52 & 1 & 1 & this is a description for the event \\
		12:18:52 & 1 & 1 & this is a description for the event 1234567890x1234567890x123 4567890x1234567890x123456789 0x1234567890x1234 567890x1234567890x1234567890x1234567890x \\
		
		12:18:52 & 1 & 1 & this is a description for the event \\
		12:18:52 & 1 & 1 & this is a description for the event \\
		12:18:52 & 1 & 1 & this is a description for the event 1234567890x1234567890x123 4567890x1234567890x123456789 0x1234567890x1234 567890x1234567890x1234567890x1234567890x \\
		
		12:18:52 & 1 & 1 & this is a description for the event \\
		12:18:52 & 1 & 1 & this is a description for the event \\
		12:18:52 & 1 & 1 & this is a description for the event 1234567890x1234567890x123 4567890x1234567890x123456789 0x1234567890x1234 567890x1234567890x1234567890x1234567890x \\
		
		12:18:52 & 1 & 1 & this is a description for the event \\
		12:18:52 & 1 & 1 & this is a description for the event \\
		12:18:52 & 1 & 1 & this is a description for the event 1234567890x1234567890x123 4567890x1234567890x123456789 0x1234567890x1234 567890x1234567890x1234567890x1234567890x \\
		
		12:18:52 & 1 & 1 & this is a description for the event \\
		12:18:52 & 1 & 1 & this is a description for the event \\
		12:18:52 & 1 & 1 & this is a description for the event 1234567890x1234567890x123 4567890x1234567890x123456789 0x1234567890x1234 567890x1234567890x1234567890x1234567890x \\
		
		12:18:52 & 1 & 1 & this is a description for the event \\
		12:18:52 & 1 & 1 & this is a description for the event \\
		12:18:52 & 1 & 1 & this is a description for the event 1234567890x1234567890x123 4567890x1234567890x123456789 0x1234567890x1234 567890x1234567890x1234567890x1234567890x \\
		
		12:18:52 & 1 & 1 & this is a description for the event \\
		12:18:52 & 1 & 1 & this is a description for the event \\
		12:18:52 & 1 & 1 & this is a description for the event 1234567890x1234567890x123 4567890x1234567890x123456789 0x1234567890x1234 567890x1234567890x1234567890x1234567890x \\
		
		12:18:52 & 1 & 1 & this is a description for the event \\
		12:18:52 & 1 & 1 & this is a description for the event \\
		12:18:52 & 1 & 1 & this is a description for the event 1234567890x1234567890x123 4567890x1234567890x123456789 0x1234567890x1234 567890x1234567890x1234567890x1234567890x \\
		
		12:18:52 & 1 & 1 & this is a description for the event \\
		12:18:52 & 1 & 1 & this is a description for the event \\
		12:18:52 & 1 & 1 & this is a description for the event 1234567890x1234567890x123 4567890x1234567890x123456789 0x1234567890x1234 567890x1234567890x1234567890x1234567890x \\
		
		12:18:52 & 1 & 1 & this is a description for the event \\
		12:18:52 & 1 & 1 & this is a description for the event \\
		12:18:52 & 1 & 1 & this is a description for the event 1234567890x1234567890x123 4567890x1234567890x123456789 0x1234567890x1234 567890x1234567890x1234567890x1234567890x \\
		
	\end{longtabu}
\end{document}

epub

Make sure to have installed:

  • tex4ht
  • miktex-tex4ht
  • tex4ebook

You will want to use the package manager for these three.

  • create the .dvi
latex book.tex
  • create the epub2
tex4ebook -f epub book
  • or create the epub3 which is not readable by many e-book readers
tex4ebook -f epub3 book