[Tex/LaTex] LaTeX Class / Package / Template for programming project report

algorithmsdocument-classestemplates

I'm looking for any useful class or package or style (template) to help me write up a programming project report.

I've found many LaTeX tutorials but I found it quite hard to start from scratch.

Best Answer

listings package provides an elegant way to include an external programming source code as demonstrated below.

Assume that you have an external programming source code named project.cs:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace WpfApplication1
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();
        }
    }
}

You can import the code from within your report.

\documentclass{report}
\usepackage{xcolor}
\usepackage{listings}
\lstset
{
    basicstyle=\tt\scriptsize,
    identifierstyle=\color{blue},
    commentstyle=\color{red},
    breaklines=true,
    backgroundcolor=\color{yellow!30},
    numbers=none,
    language=[Sharp]C
}
\begin{document}
\lstinputlisting{project.cs}
\end{document}

Output:

enter image description here

For further details how to use listings package, run texdoc listings to show the listings package manual. There are too many options that I cannot show one by one.

For drawing UML, you can use PSTricks package named as pst-uml.