[Corpora-List] LaTeX for alignment visualization

Nitin Madnani nmadnani at gmail.com
Wed Sep 29 19:34:44 UTC 2010


Agreed! Another thumbs up for TikZ which I played with for my
dissertation. It's really powerful and creates very good looking
graphics. I would recommend the comprehensive TeX Live distribution
(http://tug.org/texlive/) which contains almost everything you need to
work with TikZ.

Nitin

On Wed, Sep 29, 2010 at 9:46 AM, Adam Lopez <alopez at inf.ed.ac.uk> wrote:
> Stuff like this is really easy to do in PGF/TikZ, which is a powerful
> LaTeX package for producing figures.  Here's the code for a crossing
> alignment:
>
> % begin LaTeX code =================
> \documentclass{article}
> \usepackage{tikz}
> \usetikzlibrary{matrix}
> \begin{document}
> \begin{tikzpicture}
>        \matrix(m)[matrix of nodes,row sep=1cm]{
>        a & b & c & d\\
>        B & D & A & C\\
>        };
>        \draw (m-1-1) -- (m-2-3);
>        \draw (m-1-2) -- (m-2-1);
>        \draw (m-1-3) -- (m-2-4);
>        \draw (m-1-4) -- (m-2-2);
> \end{tikzpicture}
> \end{document}
> % end LaTeX code ===================
>
> Drawing the alignment links between the words is as simple as
> enumerating their indexes in the source and target sentence.  It would
> be straightforward to turn this into a LaTeX macro, or write a simple
> script to generate this code from data.  PGF is standard in many newer
> LaTeX distributions, is platform-independent, and, IMO, generates much
> more attractive graphics than external drawing packages (which use
> different fonts and often aren't good at sub/ superscripts, Greek
> letters, etc.)
>

_______________________________________________
Corpora mailing list
Corpora at uib.no
http://mailman.uib.no/listinfo/corpora



More information about the Corpora mailing list