View Single Post
Posts: 65 | Thanked: 113 times | Joined on Mar 2011 @ Austria
#4
Example of TeX on N900 maemo: "Weekly Timetable"

To simply create a weekly schedule, this template is useful. I found it at https://github.com/pklaus/timetable.


Timetable Tex sample code
timetabletemplate.tex
Code:
\documentclass[a4paper,10pt]{report}

% Definitions
\usepackage{lscape}
\usepackage[left=40mm,right=20mm,top=15mm,bottom=15mm]{geometry}
\usepackage{timetable}

\begin{document}
\thispagestyle{empty}
\begin{landscape}
\noindent\printheading{Timetable Schedule / ``see https://github.com/pklaus/timetable`` {\tiny (Version 2014-09-02)}}

% Define the layout of your time tables
\setslotsize{3.5cm}{0.22cm}
\setslotcount {5} {56}
\settopheight{3}
\settextframe{0.8mm}

% Retro
%\setframetype[t]{1}
%\seteventcornerradius{0pt}

% Print timestamps into event blocks
\setprinttimestamps{2}

% Define event types
\defineevent{type1}{0.0} {0.28}{1.0} {1.0}{1.0}{1.0}
\defineevent{type2}{1.0} {0.4} {0.2} {1.0}{1.0}{1.0}
\defineevent{type3} {0.8} {0.8} {0.2} {0.2}{0.2}{0.8}
\defineevent{type4}   {0.6} {0.8} {1.0} {1.0}{1.0}{1.0}
\defineevent{type5}       {0.21}{0.5} {0.16}{1.0}{1.0}{1.0}

% Start the time table
\begin{timetable}
  \hours{6}{15}{1}
%  \germandays{1}
  \englishdays{1}
  \event 1 {0800} {1200} {Morning Meeting}                  {maemo}        {N900 site}     {type1}
  \event 2 {1200} {1400} {Lunch}                  {The Tripple}        {Vienna}     {type2}
  \event 4 {1520} {1700} {Special Issues}                  {All}        {fremantle}     {type3}
  \event 5 {1320} {1400} {Event}                  {Person}        {Room}     {type4}
\end{timetable}
\end{landscape}
\end{document}

Code to convert tex document to pdf:
Code:
pdflatex timetabletemplate.tex
The result will be a PDF document (similar to the image below)

First, you need to install the timetable.sty to your tex path *:

Manual installation of TeX style file
Code:
mkdir /home/opt/maemo/usr/share/texmf-texlive/tex/latex/timetable
cp timetable.sty /home/opt/maemo/usr/share/texmf-texlive/tex/latex/timetable
ln -s /home/opt/maemo/usr/share/texmf-texlive/tex/latex/timetable  /usr/share/texmf-texlive/tex/latex/timetable
texhash                 #       to let the tex installation know where timetable.sty can be found.
*Note: You might be able to skip manual installation,
by simply putting the timetable.sty in the same directory
where your timetabletemplate.tex file resides.
Attached Images
 
 

The Following 4 Users Say Thank You to scy For This Useful Post: