How to include .ps files in latex and put three of them with text in one page?

1,007

Is this what you want?

\documentclass{article} %
\usepackage[showframe]{geometry}
\usepackage[demo]{graphicx} %
\usepackage{subcaption}
\usepackage{enumitem}
\begin{document}

\newpage
\begin{figure} [!htbp]
\begin{minipage}[c][0.4\textheight][c]{0.45\linewidth}
 \begin{enumerate}[wide = 0pt]
 \item name hjjk
 \item snr 1522
 \item obser time 25885
 \end{enumerate}
\end{minipage}
%%
\begin{subfigure}{0.45\textwidth}
\centering \includegraphics[width=\linewidth]{10_freq_phase.png}
\caption{}
\end{subfigure}
\vspace*{-6ex }

\begin{subfigure}[c]{0.45\textwidth}
 \centering \includegraphics[width=\linewidth]{10_pulse_profile}
\caption{}
 \end{subfigure}
 \qquad
\begin{subfigure}[c]{0.45\textwidth}
\centering \vspace{0pt}% set the real top as the top
\includegraphics[width=\linewidth]{10_sub_int}
\caption{}
\end{subfigure}
\end{figure}

\end{document} 

enter image description here

Share:
1,007
abubakr yagob
Author by

abubakr yagob

Updated on August 01, 2022

Comments

  • abubakr yagob
    abubakr yagob over 1 year

    I have .ps files, I want to prepare one pdf page, Then I want to show my files (.ps images) in the page in a way that divide the page to four section the top left section contains the text (e.g name, snr, time ... of my files) and the other three sections content my graph which is my ps file themselves. How would I be able to do that?

    Here is the code:

    \documentclass{article}
    \usepackage{graphicx}
    \usepackage{subcaption}
    
    \begin{document}
    
    \newpage
    \begin{figure}
    \begin{minipage}[c][0.4\textheight][c]{\linewidth}
      \begin{enumerate}
      \item name  hjjk
      \item snr  1522
      \item obser time  25885
      \end{enumerate}
    \end{minipage}
    
    \begin{subfigure}[!htbp]{0.6\textwidth}
    \centering
    \includegraphics[width=\linewidth]{10_freq_phase.png}
    \end{subfigure}
    
    \begin{subfigure}[t]{0.6\textwidth}
    \centering
    \includegraphics[width=\linewidth]{10_pulse_profile}
    \end{subfigure}
    
    \begin{subfigure}[]{0.6\textwidth}
    \centering
    \vspace{0pt}% set the real top as the top
    \includegraphics[width=\linewidth]{10_sub_int}
    \end{subfigure}
    \end{figure}
    
    \end{document}
    
    • Werner
      Werner about 6 years
      It seems like you have at least one PNG image. You can't mix PNG and PS, but you can mix PNG and PDF. So, convert the PS files to PDF and then you can compile with PDFLaTeX.
    • abubakr yagob
      abubakr yagob about 6 years
      @Werner I'm using png here just as a test but my desire is to use ps files to do my process.
  • abubakr yagob
    abubakr yagob about 6 years
    Thanks you very much, could you tell me how to get rid of the border in the resultant image and fill the page with the image and the text without borders?
  • Bernard
    Bernard about 6 years
    @abubakryagob: The border comes the showframe option of geometry – I used it to check the figure didn't overflow in the margin, it should be removed for the final document. I don't understand very well your second question: what do you mean exactly with ‘fill the page’ (unless you just wanted to insist on removing the border?).
  • abubakr yagob
    abubakr yagob about 6 years
    Yes I meant that (just to remove the border) and I figured it out, Thanks : ). My real concern now is how to include the ps file?
  • Bernard
    Bernard about 6 years
    Are they .ps or an .eps files?
  • abubakr yagob
    abubakr yagob about 6 years
    They are .ps files
  • Bernard
    Bernard about 6 years
    @abubakryagob: Which means they fill a full page, even if the image itself is smaller. You should first convert them to the .eps format (i.e. with a bounding box), then convert the .eps format to .pdf. The epspdf utility, on CTAN, does a very good job for that (there's a graphic interface, epspdftk. The windows version is epspdf-setup.