Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi all! We have been experiencing an issue on site where threads have been missing the latest postings. The platform host Vanilla are working on this issue. A workaround that has been used by some is to navigate back from 1 to 10+ pages to re-sync the thread and this will then show the latest posts. Thanks, Mike.
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

LaTeX Thread (Useful links and tips within)

  • 12-09-2009 9:14am
    #1
    Moderators, Education Moderators, Motoring & Transport Moderators Posts: 7,395 Mod ✭✭✭✭


    I think it would be useful to have a guide to LaTeX and how to use it stickied on the Maths forum would be useful. Does such a guide exist?

    Mod Note:

    Just noticed there is now a LaTeX forum which can be found here


Comments

  • Closed Accounts Posts: 6,151 ✭✭✭Thomas_S_Hunterson


    There's a latex tutorial here: http://www.mts.jhu.edu/~ers/learn-latex/


  • Registered Users, Registered Users 2 Posts: 872 ✭✭✭gerry87




  • Closed Accounts Posts: 760 ✭✭✭ZWEI_VIER_ZWEI


    Dr. Wilkins from my Alma Mater, Trinity College, has a rather nice LaTeX tutorial that helped me with my FYP report.

    http://www.maths.tcd.ie/~dwilkins/LaTeXPrimer/


  • Posts: 4,630 ✭✭✭ [Deleted User]


    Here's a handy website that lists pretty much every symbol you can use, and their associated command.


  • Registered Users, Registered Users 2 Posts: 170 ✭✭antiselfdual


    And here's a few thousand more...


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 992 ✭✭✭fh041205


    Guys and lassies, I'm wondering can anyone help me a little with a LaTeX problem? I'm completely new to it (started last week) and am currently using tikzpicture to draw simple diagrams. It seems to work fine as the sole piece in a document but when I include the same text in another document (simply by copying it over rather than 'include' in the LaTeX sense) it doesn't produce a picture. I've a feeling i'm not including the right packages in the preamble (i've included tikz and pgf).

    Also, is there an easier way to produce simple mathematical diagrams other than tikzpicture. Bear in mind I'm a novice, thanks for any help.

    Oh, I'm using XP.


  • Registered Users, Registered Users 2 Posts: 170 ✭✭antiselfdual


    Just include tikz, and put all the tikz commands inside

    \begin{tikzpicture}

    \end{tikzpicture}

    ?

    Works for me...

    I don't know if there's an easier way to do pictures, possibly there is, but I like tikz even if it seems terrifyingly powerful compared to everything I've ever wanted to draw.


  • Registered Users, Registered Users 2 Posts: 2,481 ✭✭✭Fremen


    I never messed around with any built-in drawing software. To be honest, the path of least resistance is
    Mathematica (or wolfram alpha) -> screenshot -> jpeg -> import jpeg

    though I've forgotten the command to do the last bit :pac:

    If it's just a project or thesis, I'd go with this way. Might be worth learning the built-in stuff if you're doing something that's publication quality though.


  • Registered Users, Registered Users 2 Posts: 992 ✭✭✭fh041205


    Is \usepackage{tikz} the right way to include it?


  • Registered Users, Registered Users 2 Posts: 2,481 ✭✭✭Fremen


    Well, my preamble looks like this
    \documentclass[12pt,a4paper]{report}

    \usepackage{graphicx,epsfig}

    \usepackage{amsfonts}

    \usepackage{amsthm, amsmath}


    and the figure looks like this:
    \begin{figure}[h]
    \centering
    \includegraphics[scale = .55]{MertonVega.pdf}
    \caption{caption here}
    \label{fig:MertonVega}
    \end{figure}

    For some reason I converted the images to PDF... maybe you have to do that. I forget how or why though. Not sure how much of this is strictly necessary either. I'd just get it working with some random PDF then play with it until it breaks.


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 13,104 ✭✭✭✭djpbarry


    gerry87 wrote: »
    For some reason I converted the images to PDF... maybe you have to do that. I forget how or why though.
    You were probably compiling with PDFLatex? When compiling with Latex, graphics have to be in EPS format. If you're compiling with PDFLatex, then JPG, PNG or PDF can be used.


  • Registered Users, Registered Users 2 Posts: 2,481 ✭✭✭Fremen


    yup, I used gedit in unbuntu and compiled with PDFLatex, that would explain it.


  • Registered Users, Registered Users 2 Posts: 170 ✭✭antiselfdual


    fh041205 wrote: »
    Is \usepackage{tikz} the right way to include it?

    Yeah... as in I have a document like

    \documentclass[12pt]{article}

    \usepackage{tikz}
    \begin{document}

    \section{Section}

    Some font, some font, some font.

    \subsection{Now a TikZ diagram}

    We can draw a picture of
    a lightcone!

    \begin{center}
    \begin{tikzpicture}
    \begin{scope}[scale=1.3]
    \shade[inner color=yellow, outer color=yellow!50!white!50] (-3,-3) -- (0,0) -- (-3,3) -- (3,3) -- (0,0) -- (3,-3) -- (-3,-3);
    \draw[->] (-3.1,0) -- (3.1,0);
    \draw[->] (0,-3.1) -- (0,3.1);
    \draw[color=black,->] (-3,-3)--(3,3);
    \draw[color=black,->] (3,-3)--(-3,3);
    \draw (0.,3.3) node {$ct$};
    \draw (3.3,0) node{$x$};
    \draw[->] (0,0) -- (0.8,2);
    \draw[->] (0,0) -- (2,1);
    \draw (0.8,2.2) node{\scriptsize $v<c$};
    \draw (2.1,1.2) node{\scriptsize $v>c$};
    \draw (3.1,3.1) node{\scriptsize$v=c$};
    \draw (0.6,-1.5) node{Past};
    \draw (-0.8,1.8) node{Future};
    \end{scope}

    \end{tikzpicture}
    \end{center}

    \end{document}


    and it works fine (though I'm using linux not XP, but I've definitely used Tikz on Windows too...)

    I'm not sure I understand though, is the problem that tikz only works when there is no other text other than between the \begin{ and \end{tikzpicture} commands? Are you using any other packages in the other documents that might interfere with it? (I seem to remember there being an issue involving using the color package and tikz).


  • Registered Users, Registered Users 2 Posts: 872 ✭✭✭gerry87


    djpbarry wrote: »
    You were probably compiling with PDFLatex? When compiling with Latex, graphics have to be in EPS format. If you're compiling with PDFLatex, then JPG, PNG or PDF can be used.

    I didn't say that :confused::p


  • Registered Users, Registered Users 2 Posts: 13,031 ✭✭✭✭bnt


    One suggestion I might add is to use the \displaystyle method when posting here. It makes the formula a little larger and more legible.

    Before:
    [latex]
    \frac{d}{dx} \int_0^x{f(t)dt}=\int{\left(\frac{d}{dx}f(x)\right)dx}=f(x)
    [/latex]

    After:
    [latex]\displaystyle
    \frac{d}{dx} \int_0^x{f(t)dt}=\int{\left(\frac{d}{dx}f(x)\right)dx}=f(x)
    [/latex]
    \displaystyle 
    \frac{d}{dx} \int_0^x{f(t)dt}=\int{\left(\frac{d}{dx}f(x)\right)dx}=f(x)
    

    Death has this much to be said for it:
    You don’t have to get out of bed for it.
    Wherever you happen to be
    They bring it to you—free.

    — Kingsley Amis



  • Registered Users, Registered Users 2 Posts: 13,031 ✭✭✭✭bnt


    Something weird I've noticed when editing a post containing LaTeX: sometimes, plus (+) signs go missing after you save the edit. The workaround seems to be: select "Go Advanced" when editing, that seems to avoid the issue.

    testing: [latex]r^2=x^2+y^2[/latex]

    Death has this much to be said for it:
    You don’t have to get out of bed for it.
    Wherever you happen to be
    They bring it to you—free.

    — Kingsley Amis



  • Registered Users, Registered Users 2 Posts: 119 ✭✭wantacookie


    Just saw this thread, I found LaTeX so useful doing my final year project. Here are some notes and a sample .tex file I made for learning LaTeX when I was giving a tutorial in TCD.

    Hope they are some help to some one! I got really enthusiastic learning tricks in LaTeX during the year :D


  • Registered Users, Registered Users 2 Posts: 2,338 ✭✭✭Bit cynical





Advertisement