Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Is it possible to write functions in latex for figure positioning?

  1. Dec 17, 2009 #1

    I was wondering if it is possible to write functions in Latex to place figures in a constant way during the whole document. What I had in mind is to do it in 'a matlab way', for example:

    In the document itself, you could call the function and specify the figures and the caption like this:


    and below the whole document, or maybe in another file, the function:

    function placefigures{figure1,figure2,caption}

    In this way it would be possible to change only one number if you would change your figure positioning during the whole document.

    Is something like possible?


  2. jcsd
  3. Dec 17, 2009 #2
    Look into LaTeX macros. They should work with figures.
  4. Dec 18, 2009 #3
    Thanks for the answer, but I'm quite a newbe in Latex so I'm affraid I need more help. Is it possible to define a value to a command, so that you can later use it to scale all the pictures in the same way? I mean something like this:


    and then later, in the figure enviroment

Share this great discussion with others via Reddit, Google+, Twitter, or Facebook