How to center multiple figures in LaTex

Hi Guys,

Below you can find  a block of code to center your  figures in Latex.

In this example, two figures are used.



subfigure[Caption for Figure 1]{
subfigure[Caption for Figure 1]{
caption{(a) Figure 1, (b) Figure 2 }



Hope this is useful.



LaTex issue: How to make the figure captions centered?

Couple days ago, I spent so many hours figuring out how to make my figure captions centered in LaTex. I use WindEdt 6 Editor and IEEE journal template for that. The problem was, the IEEE journal template will automatically make the figure captions  left justified. Several minutes later, I found a great page written by Michael Shell to solve this problem. Here’s the link :

According to the above link, basically what I need to do is to add an additional code in my tex file as follows:

[contentblock id=1 img=adsense.png]

[syntax type=”css”]
footnotesizebegin{center}{normalfontfootnotesize #1}
{normalfontfootnotesizescshape #2}end{center}%
setbox@tempboxahbox{normalfontfootnotesize {#1.}~~ #2}%
ifdim wd@tempboxa >hsize%
setbox@tempboxahbox{normalfontfootnotesize {#1.}~~ }%
parbox[t]{hsize}{normalfontfootnotesize noindentunhbox@tempboxa#2}%
hbox tohsize{normalfontfootnotesizehfilbox@tempboxahfil}fifi}

I have added the above code after my document class initialization in my tex file and it has worked perfectly for me. I really need to thank Michael Shell for his useful information regarding this matter :D. Hope this information will also help those who face the same problem.

Bibtex:GUI framework cannot be initialized

Hi guys! I guess you might face the same problem with me. I’m new to LaTex and I run my LaTex file this morning in my PC and simply got this error message : Bibtex:GUI framework cannot be initialized! Yesterday, I run a similar code using same installation procedure (I use MikTex 2.9 and WinEdt6) in my laptop and everything worked well. So, I spent my time searching in Google for a perfect solution and finally I came into this useful link :

[contentblock id=1 img=adsense.png]

So, in summary, if you face the same problem, here’s a solution:

  1. Open a command prompt window and go into the directory where you put your latex file.
  2. Run your latex file (e.g latex mylatexfile)
  3. Run BibTex (e.g bibtex mylatexfile), and then it will automatically download the missing files that I guess caused the error, so make sure you are connected with the internet!
  4. Rerun your latex file twice (this is to make your references integrated and listed in your latex files), and done! 🙂

Now, you can find the executed file in dvi format in your latex directory and the problem is solved. This works for me,  hope it solves your problem as well. 😀