Category Archives: Free Software

Some LaTeX Tweaks…

Here are some \LaTeX tweaks I used to prepare a template for one of our lab reports recently. Most of the help was received from http://tex.stackexchange.com/.

Adding more columns to the index page than the default ‘Chapter No.- Chapter Name- Page’

\documentclass[10pt,letterpaper]{article}
\usepackage{lipsum,titletoc}

\titlecontents{section}
[0em]
{}
{}
{}
{\titlerule*[0.5em]{.}\contentspage}

\begin{document}

 \noindent\begin{minipage}[c]{0.7\textwidth}
\renewcommand{\contentsname}{\Large \centerline{CONTENTS}}
\tableofcontents

\addtocontents{toc}{\textbf{No.}\hspace{2cm}\textbf{Experiment}~\hfill\textbf{Page}\par}

\end{minipage}
%
\hspace{0.05\textwidth}
%
\begin{minipage}[c]{0.2\textwidth}
\begin{tabular}{lr}
\textbf{Date} & \textbf{Signature} \\[1em]

\end{tabular}
\vspace{3.02in}  %adjust this to align date & sign in the contents page
\end{minipage}$

Putting a Border Around Each Page

\begin{document}
\fancypage{%
\setlength{\fboxsep}{10pt}\doublebox}{}

Preventing \chapter{} from beginning on a new page

\makeatletter
 \patchcmd{\chapter}{\if@openright\cleardoublepage\else\clearpage\fi}{}{}{}
 \makeatother

\begin{document}
.......................
Advertisements
Tagged

Terminal dying out in GNS-3 (openSUSE11.4 )

I had this strange issue of router console window dying out within a split of a second after the terminal button was clicked in GNS3. The OS was openSUSE 11.4 installed from a live CD and NOT from a DVD.

The reason was that Telnet was not installed by default. 🙂 Once Telnet was installed, everything started working normal!!

Cheers!!

Tagged , ,

LaTeX trickz

Here are some ‘fine-tuning’ stuff for LaTeX that I recently learned. Was in the process of making a report for college, which required me to do the following formatting with LaTeX:

  • Center the Chapter Headings
  • Center the ‘Table of Contents ‘ caption
  • Easily adjust the basic left, right, top and bottom margins.

Here is what i did for each of my requirement (obviously, learned from the vast knowledge base of the INTERNET 🙂 )

Center the Chapter Headings

\usepackage{titlesec}

\titleformat{\chapter}[display]

{\normalfont\huge\bfseries\centering}{\chaptertitlename\ \thechapter}{20pt}{\Huge}

Center the ‘Table of Contents ‘ caption

\renewcommand{\contentsname}{\centerline{Table of contents}}

\tableofcontents

Easily adjust the basic left, right, top and bottom margins.

\usepackage{simplemargins} %simplemargins.sty has to be copied to your local LaTeX directory or working directory
\setleftmargin{4cm}
\setrightmargin{3cm}
\settopmargin{3cm}
\setbottommargin{3cm}
Tagged , , ,

SELinux: Filesystem relabel

I had an unclean shutdown of the Desktop PC yesterday night. I had to manually ‘fsck’ the filesystem today morning. This might have misplaced some of the SELinux labels. I didn’t know how to relabel  them. As always, Goooooogle to the rescue!!

Simply create a hidden file named autorelabel in /

touch /.autorelabel

Now reboot the system!

There it is! File system relabel will start soon.

Another way is to issue the autorelabel boot option in the GRUB menu prior to booting.

Tagged , , ,

Python Qt4 Tutorial links

Python and Qt are the best combination to make a GUI.Programming in python is very simple and Qt has a lot of GUI functions..Below shows some useful links to connect python to Qt

http://zetcode.com/tutorials/pyqt4/

http://www.cs.usfca.edu/~afedosov/qttut/

Tagged
%d bloggers like this: