LaTeX

Fancy Thesis Tables in LaTeX: An Idiots Guide

Fancy Thesis Tables in LaTeX: An Idiots Guide

In which I provide a template for generating fancy, production quality tables for theses...

LaTeX as I've mentioned previously, is a document preparation system well known for its brilliant equations and can also be utilised to make very nice looking diagrams. The tables it generates, however, while neat are a little lacklustre.  This is aimed as a very simple guide to editing tables (regular LaTeX users may find this tutorial very basic).

Proper Gradients for MetaPost Pulse Sequences

Proper Gradients for MetaPost Pulse Sequences

In which I improve upon the previous post...

In yesterday's post I talked about using MetaPost to generate Pulse Sequence Diagrams for MRI documents. I have been using this to make nice diagrams for my Thesis. There is one problem, however, with the pulse sequence file provided on Mark's website - it generates square gradients.

Pulse Sequence Diagrams Using Metapost

Pulse Sequence Diagrams Using Metapost

In which I use MetaPost to generate publication quality pulse sequence diagrams...

Pulse sequences are the series of radio-frequency pulses required to generate an MR image. If you are an MR Physicist you will see these a lot and probably wondered how can I generate nice pulse sequences for my thesis, papers etc. Well handily using MetaPost and these files you can!

Word 2010: How to Insert Numbered Equations Properly

Word 2010: How to Insert Numbered Equations Properly

In which I run through a useful tip that Microsoft managed to just miss explaining...

The Problem

If you, like me, are in the process of writing a long scientific document which requires multiple reviewers to be able to view changes you may sadly be saddled with using Microsoft Word.* Now, in defence of Microsoft, they have definitely improved the way Word works. Using track changes, Mendeley and with a little bit of tinkering you can have a passable writing experience and be able to send documents out for review by your supervisors. They've even included an equation editor that allows you to put equations in your document and save them for later use.

Sadly in formal scientific writing we often like things to look nice, pretty and numbered like this...

The Great British Tea Test 2012

The Great British Tea Test 2012

That tea review data in full...

So we set out to try all the major and supermarket brand teas and decide which was the best this year.

The Tea & The Cakes

We tried the following teas:

  • ASDA red label
  • Clipper
  • Lancashire
  • Marks & Spencer everyday
  • Morrisons red label
  • PG Tips
  • Sainsbury's red label
  • Tesco red label
  • Tetley
  • Twinings
  • Typhoo
  • Whittard
  • Yorkshire

LaTeX: Document Details

In which I perfect a macro for listing document details in LaTeX.

The Problem

I've been using $latex LaTeX$ to typeset my MRI Glossary (see previous PhD post). I really wanted an Appendix which listed system info and $latex LaTeX$ version.*

*Wordpress.com supports native $latex LaTeX$ - which is awesome

Solution

After much googling I couldn't figure out how to do this so I asked the kind folks at tex.stackexchange.com and Heiko Oberdiek & Ivan Griffin responded with two macros which I've now combined as follows†: usepackage{hologo} usepackage{ifluatex} usepackage{ifxetex} usepackage{ifvtex}

makeatletter

newcommand{ShowOsVersion}{% immediatewrite18{systeminfo | findstr /B /C:"OS Version" > OSv.tex}% input{OSv}immediatewrite18{rm OSv.tex}% }

newcommand{ShowOsName}{% immediatewrite18{systeminfo | findstr /B /C:"OS Name"> OSn.tex}% input{OSn}immediatewrite18{rm OSn.tex}% }

newcommand*{InfoLaTeX}{% hologo{fmtname} textlessfmtversiontextgreater } newcommand*{InfoTeX}{% ifxetex hologo{XeTeX}-% theXeTeXversionXeTeXrevision else ifluatex hologo{LuaTeX}-% begingroup count@=luatexversion dividecount@ by 100 % edefx{thecount@}% count@=-xrelax multiplycount@ by 100 % advancecount@ by luatexversion x.thecount@.luatexrevision endgroup else @ifundefined{pdftexversion}{% ifvtex hologo{VTeX}% @ifundefined{VTeXversion}{% }{% begingroup count@VTeXversion dividecount@ 100 % space vthecount@ multiplycount@ -100 % advancecount@VTeXversion .two@digitscount@ endgroup }% else hologo{TeX}% fi }{% hologo{pdfTeX}-% ifnumpdftexversion thepdftexversion.pdftexrevision else ifnumpdftexversion expandafter@carthepdftexversion@empty@nil.% expandafter@cdrthepdftexversion@empty@nil pdftexrevision else expandafter@carthepdftexversion@empty@nil.% expandafter@cdrthepdftexversion@empty@nil.% pdftexrevision fi fi }% fi fi }

I then call this at the end of my document with:

appendix chapter{Document Details}

Compiled by: InfoTeX hologo{LaTeX} version: InfoLaTeX ShowOsName ShowOsVersion

end{document}

This produces the following output:

Compiled by: pdf $latex TeX$-1.40.13 $latex LaTeX$ version: $latex LaTeX$2e OS Name: Microsoft Windows 7 Professional OS Version: 6.1.7601 Service Pack 1 Build 7601

†This requires you to use the -shell-escape option when compiling

Tom Out!

P.S. http://tex.stackexchange.com/questions/78334/print-system-information-in-latex-doc