Graphics, Figures & TablesSomething wrong with my minipage (I think)

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
User avatar
svend_tveskaeg
Posts: 478
Joined: Sun Jul 12, 2009 5:31 am

Something wrong with my minipage (I think)

Post by svend_tveskaeg »

Hi all.

Consider the following (not minimal, sorry) example:

Code: Select all

\documentclass[12pt,a4paper,danish]{article}

\usepackage{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[hmargin=2.4cm,vmargin=3cm]{geometry}
\usepackage{auto-pst-pdf,pstricks-add}

\begin{document}

\begin{figure}[htbp]
 \centering
  \begin{minipage}[c]{0.3\textwidth}
  \centering
   \psset{unit=1.5cm}
   \pspicture(0,-1.2)(2.81,3.7)
     \psline(1.405,0)(0,2.4335)(2.81,2.4335)(1.405,0)
     \rput(0.35,2.65){\footnotesize{kognition}}
     \rput(2.25,2.65){\footnotesize{psykodynamik}}
     \rput(1.405,-0.31){\makebox(2,2){%
       \parbox{0.268\textwidth}{\footnotesize{samspil,\\ samfund}}%
     }}
     \psline{<->}(0.305,2)(2.510,2)
     \rput(1.405,2.217){\small{\textit{tilegnelsesproces}}}
     \psline{<->}(1.405,0.2)(1.405,1.9)
     \rput(1.55,1.2){\rotatebox{270}{\footnotesize{\textit{samspilsproces}}}}
   \endpspicture
   \caption{Læringens dimensioner og processor.}
   \label{fig:1}
  \end{minipage}%
 \hfill
  \begin{minipage}[c]{0.3\textwidth}
  \centering
   \psset{unit=1.5cm}
   \pspicture(0,-1.2)(2.81,3.7)
     \psline(1.405,0)(0,2.4335)(2.81,2.4335)(1.405,0)
     \rput(0.55,3.1){\makebox(2,2){%
       \parbox{0.423\textwidth}{\footnotesize{viden,\\ færdigheder,\\ forståelse,\\ mening}}%
     }}
     \rput(2.28,3.1){\makebox(2,2){%
       \parbox{0.423\textwidth}{\footnotesize{personlighed,\\ identitet,\\ reflektion,\\ biograficitet}}%
     }}
     \rput(1.405,-0.65){\makebox(2,2){%
       \parbox{0.682\textwidth}{\footnotesize{socialitet,\\ samarbejdsevne,\\ kommunikationsevne,\\ engagement, m.m.}}%
     }}
     \rput(0.65,2.27){{\scriptsize{\textit{kognition}}}}
     \rput(2.1,2.18){\makebox(2,2){%
       \parbox{0.23\textwidth}{\scriptsize{\textit{psyko-\\ dynamik}}}%
     }}
     \rput(1.405,0.9){\makebox(2,2){%
       \parbox{0.229\textwidth}{\scriptsize{\textit{samspil,\\ samfund}}}%
     }}
   \endpspicture
   \caption{Dimensioner i læringens sigte.}
   \label{fig:2}
  \end{minipage}%
 \hfill
  \begin{minipage}[c]{0.3\textwidth}
  \centering
   \psset{unit=1.5cm}
   \pspicture(0,-1.2)(2.81,3.7)
     \psline(1.405,0)(0,2.4335)(2.81,2.4335)(1.405,0)
     \rput(0.58,3.1){\makebox(2,2){%
       \parbox{0.449\textwidth}{\footnotesize{faglighed,\\ overblik,\\ sammenhæng,\\ struktur}}%
     }}
     \rput(2.31,3.06){\makebox(2,2){%
       \parbox{0.522\textwidth}{\footnotesize{personlig stil,\\ støtte,\\ respekt,\\ sparringspartner}}%
     }}
     \rput(1.405,-0.31){\makebox(2,2){%
       \parbox{0.493\textwidth}{\footnotesize{samspilsformer,\\ skolestruktur}}%
     }}
     \rput(0.65,2.27){\scriptsize{\textit{kognition}}}
     \rput(2.1,2.18){\makebox(2,2){%
       \parbox{0.230\textwidth}{\scriptsize{\textit{psyko-\\ dynamik}}}%
     }}
     \rput(1.405,0.9){\makebox(2,2){%
       \parbox{0.229\textwidth}{\scriptsize{\textit{samspil,\\ samfund}}}%
     }}
   \endpspicture
   \caption{Dimensioner i lærerrollen.}
   \label{fig:3}
  \end{minipage}
\end{figure}

\end{document}
Why will the above code not compile with

Code: Select all

pdflatex -shell-escape psyk.tex
since it compiles just fine when I use

Code: Select all

latex psyk.tex
dvipdf psyk.tex
?

A Google search on the error occurring has not given me anything useful.

P.S. I am not sure if it is relevant, but I use Fedora 17 with an up-to-date TeX Live distribution.
Last edited by svend_tveskaeg on Thu Sep 20, 2012 1:06 pm, edited 2 times in total.
``In the game of chess, you can never let your adversary see your pieces.''
-- Zapp Brannigan, Futurama (season 1, episode 4)

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

User avatar
Stefan Kottwitz
Site Admin
Posts: 10350
Joined: Mon Mar 10, 2008 9:44 pm

Something wrong with my minipage (I think)

Post by Stefan Kottwitz »

It works if you change

Code: Select all

\pspicture ...
  ...
\endpspicture
to

Code: Select all

\begin{pspicture} ...
  ...
\end{pspicture}
I think auto-pst-pdf supports the LaTeX environment syntax, but not the way writing it as control sequences.

Stefan
LaTeX.org admin
User avatar
svend_tveskaeg
Posts: 478
Joined: Sun Jul 12, 2009 5:31 am

Something wrong with my minipage (I think)

Post by svend_tveskaeg »

I actually know this. Embarrassing that I did not see it at first. :oops:

Now there is another problem --- this time with the figures themselves; when I use [color=#800000]pdflatex[/color] (with the option [color=#800000]-shell-escape[/color]) instead of [color=#800000]latex[/color] + [color=#800000]dvipdf[/color], the triangles are no longer vertically aligned, as they are if the first compile method is used.

What is wrong and how do I fix this?

Thank you in advance!

Update:
vertically --> horizontically ;)
``In the game of chess, you can never let your adversary see your pieces.''
-- Zapp Brannigan, Futurama (season 1, episode 4)
Post Reply