LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   pdflatex foo.mps (mpost?? Xfig??) (https://www.linuxquestions.org/questions/linux-software-2/pdflatex-foo-mps-mpost-xfig-332334/)

kaz2100 06-10-2005 07:39 PM

pdflatex foo.mps (mpost?? Xfig??)
 
Dear Experts

I got confused. Any comment is welcome.

I want to import image by Xfig into tex document (pdflatex is used) to make pdf.

pdflatex demo uses matrixb1e.mps and matrixb2e.mps to include graphicss. These two files look like plain "postscript file." Text says that Xfig document was converted via metapost. I also see metapost files.

Question:
Is file foo.mps normal "postscript file"?
Why is metapost involved? Xfig can export directry to ps.


Thanks in advance
:Pengy: :study:

sasho 06-10-2005 08:15 PM

From Xfig, export to pstex format. You will end up with 2 files: one wih pstex extension, the other with pstex_t extension. Then make a .tex file that includes the code below, where you replace "example.pstex_t" with your pstex_t file name. Finally, compile that to an encapsulated postscript, I forget the exact command at the moment.

Code:

\documentclass{article}
\usepackage{epsfig}
\usepackage{graphicx}
\usepackage{color}
\pagestyle{empty}
\begin{document}
\input{ example.pstex_t }
\end{document}


Simon Bridge 06-10-2005 08:48 PM

I always preconvert xfig documents into other formats for pdfLatex.

Here's the template I use to construct pdf documents that support pictures.
Code:

%Pdf-LaTeX Article-class

\documentclass[pdftex, 10pt, a4paper, twoside]{article}
%\pagestyle{plain}

\usepackage[T1]{fontenc}
%\usepackage{pxfonts}
\usepackage{aeguill}

%%% CAUTION: the HYPERREF package MUST be LAST %%%%%
\usepackage[pdftex]{graphicx, color} %looks for .png .pdf .jpg .mps .tif but not .eps
\usepackage[pdftex,
                        pdftitle        ={00-pdfTeX template},       
                        pdfauthor        ={Simon Bridge},
                        colorlinks        =true,
                        urlcolor        =blue,
                        ]{hyperref}


\begin{document}

\title{\huge Template File\\ \large for pdf\LaTeX}
\author{\bf \large Simon Bridge}
%\date{\today} % not really needed unless date = not \today
%\thanks{footnote to the title} %makes a footnote to the title - but starts the article on p2?!

\twocolumn[
        \begin{@twocolumnfalse}
                \maketitle
                \begin{abstract}
                This is pretty abstract\ldots
                \end{abstract}
        \end{@twocolumnfalse}
] %%% 2 column articles restrict graphics to \columnwidth thanx


%\section{Introduction}
{\bf An Introduction} without a section number or a title! Uncomment to get the number up. Or write \verb+\section*{Introduction}+ to get the section title without a number.

\section{Thrust Starts}
Stick the main stuff here.

\subsection{Supporting Graphics}
\begin{figure}
\centerline{
  \includegraphics[height=5cm, width=5.11cm]{topleft.jpg}
  \hspace*{1.2cm}
  \includegraphics[height=5cm, width=6.76cm]{topright.jpg}
  }
\vspace*{0.2cm}
\centerline{
  \includegraphics[height=5cm, width=9.95cm]{bottom.jpg}
  }
  \caption{This Just Goes to Show}
  \label{fig:jpgfigs}
\end{figure}

\section{Conclusion}
Summarise and conclude. Usually involves repeating the abstract.


\end{document}

mps is supported automatically.

There are many bogus LaTeX tutorials around - usually someone in authority at an institution has gat a bee in a bonnet about something or just hasn't bothered to find out what you are expected to do. I get my tutorials and advice offa www.ctan.org

kaz2100 06-11-2005 07:04 AM

Thanks,

Simmon is right. Too many documents floating around. I think it is a nature of always developing field.

Simon Bridge 06-12-2005 05:16 AM

It's more a case of an oft misunderstood system. I've seen scientific journals insisting researchers use their LaTeX headers for reasons that don't actually apply because their concerns are already adressed.

Though sometimes, people just want to use more of the page that TeX likes you to use.

Very often folk just don't read the manual properly. You know - men.

Here is an excellent LaTeX manual and primer. It covers quite advanced stuff - (hypertext and pdf-screen too!) There are many short cuts and hints in there and references to more information.
http://www.ctan.org/tex-archive/info...ish/lshort.pdf

kaz2100 06-13-2005 07:58 PM

Yes, I agree.

I very often read half of tehm and do stupid thing. Also, sometimes, I think that it is very hard to read them properly until we know what is written.

I only read several pages out of 147pages, and so far together with other source, I solved current problem.

I will promise that I will not ask question here next time, unless I read all of them.

Simon Bridge 06-14-2005 03:16 AM

Heyyy - don't get me wrong. It's OK to post questions if you are fed up with the manuals. It's actually useful if you tell us what documentation you have - someone who has read the bit you need can then point it out to you. It's easy to miss something in all those pages.

Anyway - did the posted code help any?

kaz2100 06-16-2005 09:54 PM

Yes, it was helpful. There are so many different styles (not style file) in LaTeX. Now, I am using your style also. Thanks.

But, still I have not fully understood what mps file is.

Simon Bridge 06-19-2005 04:52 AM

master postscript file.


All times are GMT -5. The time now is 12:30 PM.