Search my site

Blog Posts

Entries in OSX (2)


Fix Command Line Mistakes With Carat (^) Symbol Substitution

Open the Tip Jar Creative Commons License photo credit: usnationalarchives

Its time to open the tip jar again. The command line is incredibly powerful but requires perfect typing of commands and paths. I did not know how to fix a command until I read the lifehacker article. It seems every time I consider myself an expert I see a simple tip that *quashes* my ego back to novice status.

The Carat (^) symbol in many terminal or command shell environments is a simple text substitution command. It follows an idea of '^stringtorelpace^replacementstring'. This is great for fixing errors or substituting commands.

Fix a typo

mb2:~ mark$ la -lh /usr/local/nagios/etc/nagios.cfg
-bash: la: command not found
mb2:~ mark$ ^la^ls

This corrects the mistyped 'ls' command.

Change a command

Another interesting use is to change the command used. For example you may want to first list 'ls' the file to see if it exists, and if not, create it with 'nano'.

mb2:~ mark$ ls /usr/local/nagios/etc/nagios.cfg
ls: /usr/local/nagios/etc/nagios.cfg: No such file or directory
mb2:~ mark$ ^ls^nano

There are many time saving tricks that can be used with this simple command. Check out the source articles for more information.


LaTeX Resources for OSX

LaTeX - A Document Preparation System

I started using LaTeX for its ease of writing mathematical equations and expression. Anyone who has tried fooling with Microsoft Word's equation editor realizes that it is time consuming, looks terrible, and will agree that there must be an easier way. That way is LaTeX.

LaTeX is a typesetting tool that excels with many types of documents such as academic journals, books, and complex mathematical formulas. One thing that it is great with is keeping track of references and bibliographies.

One thing to understand is that LaTeX is not for everyone. It will be confusing and complex to most users. There are tools that make it easier, but at its base you will be writing in a type of markdown language that is part of the barrier to entry.

Broken Creative Commons License photo credit: basheertome

What is LaTeX?

LaTeX is a high-quality typesetting system; it includes features designed for the production of technical and scientific documentation. LaTeX is the de facto standard for the communication and publication of scientific documents. LaTeX is available as free software. -

LaTeX Features

  • Typesetting journal articles, technical reports, books, and slide presentations.
  • Control over large documents containing sectioning, cross-references, tables and figures.
  • Typesetting of complex mathematical formulas.
  • Advanced typesetting of mathematics with AMS-LaTeX.
  • Automatic generation of bibliographies and indexes.
  • Multi-lingual typesetting.
  • Inclusion of artwork, and process or spot colour.
  • Using PostScript or Metafont fonts.

-- LaTeX Project

What I Use

I work with LaTeX on both Mac OSX and Linux systems. Most Linux distributions make it simple to install LaTeX either being included or simply from package managers. Mac OSX is a bit different.

To make my life easier I use the MacTeX LaTeX Distribution with Macromates TextMate OSX text editor. By installing the MacTeX distribution you will be given all the command line tools, fonts, and converters you will need. TextMate will give you syntax highlighting and access to other tools that will make you life easier. But all you really need is a text editor and the command line.

Good luck with your journey into the LaTeX world.

LaTeX Resources

Here is a list of resources so both you and I can remember them in the future! :) Enjoy!