Posts Tagged ‘text’

If you have a filename or list of filenames, you may want to strip the extension. There are a few ways of “detecting” which part of the filename is the extension, but may not work if your file has multiple extensions (e.g. .tar.gz), contains spaces or periods, or meets other weird criteria. If you know […]

When using kanji in a document which is non-standard or rare, it is common for hiragana or katakana characters to be printed above (or beside for vertical text) the kanji to aid pronunciation. This is also common in children’s books and other Japanese learning material. This post explains how to do that using LaTeX. This […]

Small caps in LaTeX

Posted: 21st January 2012 by Tim in LaTeX
Tags: , , , , ,

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

Adding text in math mode in LaTeX

Posted: 4th December 2011 by Tim in LaTeX
Tags: , , , , , ,

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 […]

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 […]

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 […]

Underline text in LaTeX

Posted: 13th April 2010 by Tim in LaTeX
Tags: , , , , ,

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.

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 […]