This lesson is being piloted (Beta version)

Common Problems and useful tips

Overview

Teaching: 5 min
Exercises: 0 min
Questions
  • How do I format URLs into my document?

  • How do I insert some common symbols?

  • How do I get images into the right place?

  • Is LaTeX really worth all this hassle?

  • Are there any easier to use alternatives?

  • How do I convert LaTeX to MS Word for my colleague/journal who insists we use Word?

Objectives
  • Understand some common problems encountered in LaTeX and solutions to them

  • Know about some utilities to make LaTeX easier to use

URL Formatting

LaTeX often doesn’t like URLs in the code. Use the hyperref package and the \url{} command to include them, this will also make them a clickable hyperlink in the PDF. Sometimes certain characters have to be escaped with \ character in front of them. Alternatively you can change them to an ASCII code with the code \%<code>, using a code from asciitable.com. For example http://www.mysite.com/somepage?a=1&b=2 would become either \url{http://www.mysite.com/somepage\?a=1\&b=2} or \url{http://www.mysite.com/somepage\%3Fa=1\%26b=2.

Special Characters

Images in the wrong place

Is it worth the hassle?

Useful Utilities

A screenshot of LyX

Key Points

  • Use the hyperref package and url command to handle URLs. Some characters might need escaping.

  • LaTeX has lots of commands for common special characters you might type in on the keyboard.

  • Images often appear in the wrong place, use [ht!], resize the image or move the reference to the image to a different place in the LaTeX code.

  • LaTeX can be hassle especially on smaller documents but really comes into its own on big documents.