0

I have a rather lengthy post on Math SE at the following link.

https://math.stackexchange.com/questions/2308162/how-is-the-matrix-of-a-linear-operator-affected-by-a-change-of-bases

Now I'd like to be able to compile the code I've written for this post into a PDF math document for my pupils, most of whom don't have access to the Internet and so are in need of this material in a PDF file to be shared with them through a USB data traveler.

I'm running WinEdit + MikeTex on a Windows 8.1 (64 bit) platform.

However, when I copy the code from the above post into a WinEdit file based on the AMS Article template and try to compile, there are plenty of errors, which necessitate a lot of modification.

Is there a way out with my current software?

Here is what the preamble of my template reads.

% ----------------------------------------------------------------
% Article Class (This is a LaTeX2e document)  ********************
% ----------------------------------------------------------------
\documentclass[12pt]{article}
\usepackage[english]{babel}
\usepackage{amsmath,amsthm}
\usepackage{amsfonts}
% THEOREMS -------------------------------------------------------
\newtheorem{thm}{Theorem}[section]
\newtheorem{cor}[thm]{Corollary}
\newtheorem{lem}[thm]{Lemma}
\newtheorem{prop}[thm]{Proposition}
\theoremstyle{definition}
\newtheorem{defn}[thm]{Definition}
\theoremstyle{remark}
\newtheorem{rem}[thm]{Remark}
\numberwithin{equation}{section}
% ----------------------------------------------------------------
4

1 Answer 1

4

MathJax promotes bad LaTeX practice. This is a fact, not an opinion.

MathJax side

  1. You should never use \matrix{...}, but \begin{matrix}...\end{matrix}. Better, instead of

    \left[\matrix{...}\right]
    

    use

    \begin{bmatrix}...\end{bmatrix}
    
  2. Never use $$\begin{align}...\end{align}$$; MathJax accepts it without $$ fore and aft.

  3. Never use \\ inside a $$...$$ construction, but \begin{gather}...\end{gather}

  4. \tag belongs in align.

Conversion to LaTeX

When you want to convert the code to a LaTeX document,

  1. change $$...$$ into \begin{equation*}...\end{equation*}

  2. change {align} into {align*}

  3. change {gather} into {gather*}

  4. convert Markdown markup into LaTeX; for instance _words_ into \emph{words}

LaTeX style

You abuse \left and \right; for instance,

\left[x \right]_E

should simply by [x]_E. Also B' is much simpler than B^\prime. So

$E^\prime = \left( e_1^\prime, \ldots, e_n^\prime \right)$

is much better input as

$E' = ( e_1', \dots, e_n' )$

Note \dots and not \ldots.

5
  • 1
    Great advice but I think OP will not appreciate it. Most users want it to Just Work ™. Jun 15, 2017 at 23:05
  • 1
    @HenriMenke My MathJax essentially does that. ;-)
    – egreg
    Jun 15, 2017 at 23:08
  • @egreg thanks. But from your answer, I gather that there is no solution other than editing my Mathjax source to make a lot of modifications. Jun 15, 2017 at 23:43
  • @egreg isn't there any software for compiling Mathjax directly into a PDF document? Jun 15, 2017 at 23:44
  • @SaaqibMahmuud Use Google Chrome and press Ctrl+P to display Print Preview. Select Save as PDF. MathJax is a web technology so you need to use web browser unless you are prepared to do the full conversion manually. Dec 14, 2017 at 19:20

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .