TechBlox » Latex http://techblox.fusun.ch/wordpress Solutions To A Computer Scientist's Daily Problems Tue, 14 Sep 2010 11:11:54 +0000 en-US hourly 1 http://wordpress.org/?v=3.4.1 Advanced Formulae in Latex http://techblox.fusun.ch/wordpress/2010/05/advanced-formulae-in-latex/ http://techblox.fusun.ch/wordpress/2010/05/advanced-formulae-in-latex/#comments Thu, 27 May 2010 17:06:39 +0000 TechBloxWriter http://techblox.fusun.ch/wordpress/?p=15 Remember when you couln’t think of the correct commands to write a certain formula in latex because it’s been a year since you did it the last time? This might help you find the light.

Vectors

Using

1
\newcommand{\ve}[1]{\mbox{\bf #1}}

in your preamble, you can easily write vectors as follows:

1
2
3
\begin{equation}
    \mathscr{L}(\ve v_i) = \ve v_i - \frac{1}{\left| N_i \right|} \sum_{j\in N_i} \ve v_j
\end{equation}

Matrices

You always need matrices. Try this code:

1
2
3
4
5
6
7
8
9
10
\begin{equation}
    \begin{pmatrix}
        A & A_k
    \end{pmatrix}
    \begin{pmatrix}
        D \\
        D_k
    \end{pmatrix}
    = 0
\end{equation}

Multi-case definition

This code comes in handy to define certain funtions or matrices:

1
2
3
4
5
6
7
8
\begin{equation}
    A_{ij} = \left\{
        \begin{array}{l l}
            1 & \quad (i,j) \in K \\
            0 & \quad \text{otherwise} \\
        \end{array}
        \right
\end{equation}
]]>
http://techblox.fusun.ch/wordpress/2010/05/advanced-formulae-in-latex/feed/ 2
Latex Fonts in Illustrator http://techblox.fusun.ch/wordpress/2010/05/adobe-illustrator-formulas-and-latex-fonts/ http://techblox.fusun.ch/wordpress/2010/05/adobe-illustrator-formulas-and-latex-fonts/#comments Thu, 27 May 2010 04:18:53 +0000 TechBloxWriter http://techblox.fusun.ch/wordpress/?p=3 I recently wanted do insert a formula into a Adobe Illustrator figure. Since I didn’t find a way to do so directly in Illustrator and copying a formula from MS Word didn’t work properly, I wanted to copy the formula from a latex generated pdf (or ps) file. This, however, didn’t work either, as some latex fonts (CMR8, ect.) were missing. There’s probably a way to include them while generating the pdf file. But the easiest way I found was to copy all type 1 font files from my latex distribution C:\Program Files (x86)\MiKTeX 2.8\fonts\type1\public\amsfonts\cm to the windows font directory C:\Windows\Fonts. That worked. Yay. ]]> http://techblox.fusun.ch/wordpress/2010/05/adobe-illustrator-formulas-and-latex-fonts/feed/ 0