I would like to use the diagrams
package to generate some figures in a latex file. I have the package installed and working for the command line examples, but when I try to use it within a latex file I run into a problem with hidden libs/modules.
Here is a simple latex file based on the examples on the diagrams web pages.
\documentclass{article}
\usepackage[backend=pgf, extension=pgf, outputdir=diagrams, input]{diagrams-latex}
\usepackage{graphicx}
\begin{document}
\begin{diagram}[width=300,height=200]
{-# LANGUAGE FlexibleContexts #-}
import Data.List
foo = circle 1 # fc green
dia = foo ||| foo
\end{diagram}
\end{document}
And here are the messages I get when running pdflatex --enable-write18 newtest.tex
/tmp/Diagram29469-0.hs:4:1: error:
Could not load module ‘Diagrams.Prelude’
It is a member of the hidden package ‘diagrams-lib-1.4.6.2’.
You can run ‘:set -package diagrams-lib’ to expose it.
(Note: this unloads all the modules in the current scope.)
It is a member of the hidden package ‘diagrams-lib-1.4.6.2’.
You can run ‘:set -package diagrams-lib’ to expose it.
(Note: this unloads all the modules in the current scope.)
It is a member of the hidden package ‘diagrams-lib-1.4.6.2’.
You can run ‘:set -package diagrams-lib’ to expose it.
(Note: this unloads all the modules in the current scope.)
It is a member of the hidden package ‘diagrams-lib-1.4.6.2’.
You can run ‘:set -package diagrams-lib’ to expose it.
(Note: this unloads all the modules in the current scope.)
Use -v (or `:set -v` in ghci) to see a list of the files searched for.
/tmp/Diagram29469-0.hs:5:1: error:
Could not load module ‘Diagrams.Backend.PGF’
It is a member of the hidden package ‘diagrams-pgf-1.4.2.1’.
You can run ‘:set -package diagrams-pgf’ to expose it.
(Note: this unloads all the modules in the current scope.)
It is a member of the hidden package ‘diagrams-pgf-1.4.2.1’.
You can run ‘:set -package diagrams-pgf’ to expose it.
(Note: this unloads all the modules in the current scope.)
Use -v (or `:set -v` in ghci) to see a list of the files searched for.