Posts Tagged ‘style’

HTML link coloring with CSS

Posted: 12th September 2014 by Tim in CSS, HTML
Tags: , , , , , , , , ,

HTML link colors can be changed easily using CSS. The properties which can be set are: link – a link to a page which has not been visited visited – a visited link hover – a link which has the mouse hovering over it active – a link which is being clicked (mouse button held […]

LaTeX style (.sty) files

Posted: 27th June 2014 by Tim in LaTeX
Tags: , , , , , ,

When writing LaTeX documents, you may find yourself copying and pasting some common settings such as margins, fonts and paragraph indentation. This is not only tedious, it can be a real headache if you’re writing multiple documents that you want to look the same. To solve this problem, you can use a style (.sty) file. […]

Highlighting tabs in Vim

Posted: 26th April 2012 by Tim in Vim
Tags: , , , , , , , ,

Some people like to indent code with tabs, and others like to indent with spaces. There are advantages and disadvantages to both. Regardless of which you prefer, it can be useful to see which indent style has been used. In Vim, you can do this by adding the following line to you .vimrc file (which […]

In LaTeX, by default, tables are numbered Table 1, Table 2, Table 3 an so on (or Table 1.1, Table 1.2, Table 2.1, etc if you’re using chapters). Sometimes you may want to change the way these are numbered. The solution is very similar to changing list numbering styles using different keywords. Like enumeration lists, […]

If you want to include a glossary, definitions or some other descriptive list in your LaTeX document, you can make use of the description list type. This is a lot like the other list types except that \item can take an argument, the item `name’, in square brackets (ie: \item[Tim Murphy] Author of http://timmurphy.org). In […]

Namespace aliases in C++

Posted: 9th September 2010 by Tim in C++
Tags: , , , , ,

In C++, it’s good practice to explicitly specify the namespace of a class instead of using the using syntax. This makes your code more readable, more explicit and is generally just good style. Sometimes these namespaces can get unconveniently long. This is where namespace aliases come in. Imagine you have a person class in the […]

Latex allows the creation of itemized (unordered) lists up to four deep. The numbering styles for each depth can be styled to suit your needs using the \renewcommand{label}{style} command, where label is the list depth being styled and style is how you want that number to be shown. label may be any of the following: […]

Latex allows the creation of enumerated (ordered) lists up to four deep. The numbering styles for each depth can be styled to suit your needs using the \renewcommand{label}{style} command, where label is the list depth being styled and style is how you want that number to be shown. label may be any of the following: […]

Bold and Italic font in LaTeX

Posted: 16th August 2009 by Tim in LaTeX
Tags: , , , , , , , , ,

There are two ways to make text italic in LaTeX. The first and most common method is the \emph{text here} tag. This is used for emphasizing words within a block of text. For example: The cake was \emph{huge} for a cup cake If you’re looking to italicize a whole block of text, then use the […]

Math summation symbol in LaTeX

Posted: 15th August 2009 by Tim in LaTeX
Tags: , , , , , , , ,

LaTeX is great in that it can display all those strange math symbols for you.  Summation is a common symbol in math and really useful to know how to display in LaTeX. There are two ways of displaying the symbol: compressed to fit onto one line (useful when printing long equations or proofs) or in […]