Writing text in smallcaps in LaTeX is quite easy – just wrap your text in the \textsc{<text>} tag. For example: \textsc{This text is in small caps} Will create This text is in small caps
Archive for the ‘LaTeX’ Category
Small caps in LaTeX
Posted: 21st January 2012 by Tim in LaTeXTags: document, LaTeX, layout, small caps, smallcaps, text
Japanese characters in LaTeX documents
Posted: 8th January 2012 by Tim in Japanese, LaTeX, UbuntuTags: document, English, hiragana, Japanese, kana, kanji, katakana, language, LaTeX, Ubuntu
Japanese, like many other Asian languages, is written using a variety of symbols which are not found in the standard ASCII table. Fortunately, you can include these symbols in LaTeX documents using the CJK package. In ubuntu this can be installed via the sudo apt-get install latex-cjk-japanese command. I’m not sure about Windows, Mac or [...]
Adding music notation to LaTeX with LilyPond
Posted: 27th December 2011 by Tim in LaTeX, LilyPondTags: document, generate, include, LaTeX, layout, LilyPond, lilypond-book, music, notation, notes, score, staff
Ever wanted to add some music to a document? It’s not really a big feature for most word processors and most solutions involve creating an image using some third party software and copying that image into the document. The idea is the same in LaTeX, but it’s much easier to manage. LilyPond is a free [...]
Math case definitions in LaTeX
Posted: 12th December 2011 by Tim in LaTeXTags: amsmath, case, cases, definition, document, environment, function, LaTeX, layout, math, package
When writing a math definition of a function, for example, the function may have different results depending on the value of the inputs. These are called cases and are grouped together with a large left curly brace. If you’re trying to typeset this in LaTeX, the cases environment makes this nice and easy. It’s easiest [...]
Adding text in math mode in LaTeX
Posted: 4th December 2011 by Tim in LaTeXTags: document, equation, LaTeX, layout, math, mode, text
Occasionally you’ll want to add some text to a maths equation in LaTeX. By default, any text is written in italics, and white space is ignored. The solution is quite simple; put the text in a \text{…} block like so: $$x = \sqrt{x^2} \text{ : where $x$ is positive}$$ As you can see, you can [...]
Spanning columns in LaTeX tables
Posted: 27th November 2011 by Tim in LaTeXTags: cell, colspan, column, document, LaTeX, row, span, table
Tables are a fairly important part of LaTeX. Often you will want data to span multiple columns of the table, similar to colspan in HTML. In LaTeX it’s pretty easy too, using the \multicolumn{<cols>}{<format>}{<cell_text>} command, where <cols> is the number of columns to span and <format> is the cell format (l, c or r for [...]
Using colors in LaTeX
Posted: 21st October 2011 by Tim in LaTeXTags: color, colors, colour, colours, document, highlight, LaTeX, layout, package, usepackage
If you want to add a bit of color to your LaTeX document, you can do this quite easily with the color package. This package works with both pdflatex and latex and gives you the following color options: blue cyan green magenta red yellow To use the colors, simply include the color package and wrap [...]
Using gnuplot with LaTeX
Posted: 28th July 2011 by Tim in Gnuplot, LaTeXTags: document, function, gnuplot, graph, graphicx, include, input, LaTeX, layout, math, maths, plot
Gnuplot is a great tool for creating plots. LaTeX is a great tool for creating documents. Both are (or at least can be) created using a text editor and compiling the source. Both work with Windows, linux/unix and Mac. Wouldn’t it be great if you could include a gnuplot plot in a LaTeX document without [...]
LaTeX table and figure numbering style
Posted: 18th July 2011 by Tim in LaTeXTags: alph, arabic, document, figure, layout, number, numbering, roman, style, styles, table, tabular
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, [...]
LaTeX align right or left
Posted: 24th April 2011 by Tim in LaTeXTags: align, column, justified, justify, LaTeX, layout, left
Occasionally you may want to have text right-aligned in a LaTeX document. Other times you may want a block of left-aligned text next to a block of right-aligned text. LaTeX provides this functionality with the \hfill keyword. \hfill is a horizontal fill keyword. It tells LaTeX that you want to expand the space between the [...]
Using an organisation name as an author in BibTeX
Posted: 15th February 2011 by Tim in LaTeXTags: bibliography, BibTeX, document, field, LaTeX, layout, name, tex
BibTeX is great in that it ensures all of the entries are output in the same style. The most noticeable formatting change is the Author field; John Smith becomes Smith, J for example. Useful, unless your author is not a normal name. Let’s say that you’ve got an article written by the Reserve Bank of [...]
Splitting up LaTeX documents
Posted: 14th November 2010 by Tim in LaTeXTags: document, include, input, LaTeX, layout, master, split, sub
If you’re writing a large LaTeX document like a book or a thesis, you probably don’t want to have the whole thing in one massive file. It’s the same principle as general programming; splitting the program into smaller components makes it easier to work with, maintain and test. In Microsoft Word you can do this [...]
My third LaTeX document
Posted: 30th August 2010 by Tim in LaTeXTags: address, clickable, document, include, integral, LaTeX, layout, limit, math, package, page, programming, require, summation, tutorial, url, walkthrough, website
This tutorial is for those who have gone through the first and second LaTeX tutorials, and should give you the knowledge required to understand more specific LaTeX tips both on this site and on other websites. This tutorial will cover Packages and the basics of math mode. Packages Much like in programming, additional functionality can [...]
Drawing pictures in LaTeX
Posted: 20th August 2010 by Tim in LaTeXTags: canvas, circle, dashbox, document, draw, environment, frame, framebox, grid, LaTeX, layout, line, maxebox, oval, picture, shape, text, tutorial, vector
LaTeX has the ability to draw images out of the box. The drawing functionality is pretty basic — lines, circles, boxes and the like — but perfect for most simple diagrams. This tutorial will be split into three sections: configuring the environment, different ways of drawing shapes, and a description of the shapes themselves. Configuring [...]
Adding a two-column section to a LaTeX document
Posted: 23rd June 2010 by Tim in LaTeXTags: columns, document, LaTeX, layout, multi column, two-column
There are times when you want to have multiple columns on part of a page. You could use tables to get such a layout, but that’s a bit dirty. A nice, clean method is to use the minipage environment. Minipages are defined with a width parameter. If you have multiple minipages defined immediately after each [...]
LaTeX length units
Posted: 26th May 2010 by Tim in LaTeXTags: cm, document, em, ex, in, LaTeX, layout, length, mm, pt, size, unit
There are many configurations and commands in LaTeX which require lengths to be set. The following length units can be used: in – imperial inch pt – point (1/72 of an inch) cm – metric centimeter mm – metric millimeter em – width of a capital “M” in the current font settings ex – width [...]
Union and Intersection symbols in LaTeX
Posted: 22nd May 2010 by Tim in LaTeXTags: cap, cup, document, intersection, LaTeX, layout, math, maths, SET, sets, union
Union (∪) and Intersection (∩) symbols in LaTeX can be produced via the \cup and \cap definitions while in math mode. No extra packages are required to use these symbols. For example: Let $L_C = L_A \cap (L_B \cup L_C)$ will produce:
My second LaTeX document
Posted: 16th May 2010 by Tim in LaTeXTags: bold, document, emphasis, font, italic, LaTeX, layout, lines, new line, paragraph, section, strong, subsection, subsubsection, text, underline
This tutorial is for those who have gone through the first tutorial. Here we will cover new lines and paragraphs, comments, font decoration (bold, italic and underline) and sections. Fun. New lines and paragraphs First we will look at paragraphs. In LaTeX, having a new line in your .tex file (which we will refer to [...]
Math blackboard (double-barred) font in LaTeX
Posted: 28th April 2010 by Tim in LaTeXTags: amssymb, black board, blackboard, code, document, environment, font, forall, LaTeX, layout, math, syntax
In math, certain blackboard (double-barred) letters Z, N, R, etc. represent sets of numbers (integers, natural numbers, rational numbers, etc). These can be included in a LaTeX document using the \mathbb{[letter]} tag from within the math environment. Note that this requires the amssymb package to be included (ie: add \usepackage{amssymb} to the top of the [...]
Referencing all BibTeX entries without citing in LaTeX
Posted: 17th April 2010 by Tim in LaTeXTags: bibliography, BibTeX, cite, document, LaTeX, nocite, reference
Often times you want to add entries to the references section of a LaTeX document without actualy citing them. The \nocite{reference} may be used to add the record to the references, but writing \nocite for each reference can get tedious. Luckily, adding \nocite{*} to the document will ensure that everything is added to the references.
Underline text in LaTeX
Posted: 13th April 2010 by Tim in LaTeXTags: decoration, document, LaTeX, layout, text, underline
Underlining text in LaTeX is very easy – simply wrap the text with \underline{text}. For example, The cake was \underline{huge}. will produce: The cake was huge.