Frequently Asked Questions |
|
"Couldn't find standard objects when looking for object-libs, exiting..."
<lrclause@cs.uiuc.edu>
. Most of the material came out
of the Dia mailing list. The following people contributed more advice:
Kerry <needles@industrialmusic.com>
,
James Henstridge <james@daa.com.au>
,
Simon Josefsson <simon@josefsson.org>
,
Jacek Pliszka <Jacek.Pliszka@fuw.edu.pl>
,
Steffen Macke <sdteffen@yahoo.com>
,
Robert Campbell <rob.campbell@visto.com>
>,
and
Hubert Figuiere <hfiguiere@teaser.fr>
.
/etc/X11/fs/config
and move the line
/usr/share/fonts/default/urw-aliases
to just below the
...:unscaled
lines (make sure the commas are in the correct
places after making the change). Then run killall -USR1 xfs
to get the font server to reread its config file. The URW fonts should be
used in place of the adobe ones they are clones of when an unscaled bitmap
version can't be found.
As of 0.91, Dia on Unix uses the FreeType library to provide better font support. The fonts for this are in turn controlled by font-config. Note that this means that remote fonts servers cannot be used.
\usepackage{pstricks}
to the preamble of your TeX
document. Then include your image as
\begin{figure} \centering \input{filename.tex} \caption{A caption} \label{figure:alabel} \end{figure}
in your document.
Note: Up to and including version 0.86, Dia doesn't deal correctly with some functions that PSTricks doesn't implement. You may have to change the start of the generated file to look like this: Then uncomment the three commands in the generated TeX file (unless you have a PSTricks with this functionality implemented), so it looks like:
% PSTricks TeX macro % Title: x500name.dia % Creator: Dia v0.86 % CreationDate: Thu Oct 5 11:25:54 2000 % For: a user % \usepackage{pstricks} \providecommand{\setlinejoinmode}[1]{} \providecommand{\setlinecaps}[1]{} \providecommand{\setfont}[2]{} ...
Note: PSTricks in the tetex-1.0.6-11 RPM (used in Red Hat Linux 6.2)
is buggy. Easiest fix is to get pstricks.tex
from CTAN and put it in
/usr/share/texmf/tex/generic/pstricks/
.
.tex
file replace \psline
by \pccoil
or \pczigzag
.
For more information on their arguments look into your
PSTricks documentation included in your PSTricks package
or at PSTricks
home page.
Careful! Lines with more then one segment have to be split
into separate segments when pccoil
and pczigzag
are used.
$\delta^{\dagger}_2$
. At the moment of writing this FAQ
it is not yet displayed correctly in dia but TeX code
produced should be fine. The bounding-box of the formula will not be
calculated correctly.
startx "/usr/bin/env DISPLAY=:1 /usr/bin/dia -e $HOME/tmp/foo.png $HOME/tmp/foo.dia" -- /usr/X11R6/bin/Xvfb :1 -once -nolisten tcpThanks to Basile Starynkevitch for this hint.
Note that this export doesn't support other encodings than Latin-1, and the text size may be somewhat off. Please don't ask us to add other encodings to this. We will not do it. It's an interim solution while we try to get embedded fonts out of Pango (maybe using PangoPDF).
In most cases, it is because you have an old version of a support library. The libraries needed to compile Dia version 0.91+ are:
Note that if you use some package system (dpkg
or RPM), you
will need to download the development packages (-dev
or
-devel
).
Some systems, notably Red Hat and derivatives, don't have
/usr/local/lib
in /etc/ld.so.conf
. GNU applications by default
install into /usr/local
when compiled. To make Dia work there,
either add /usr/local/lib
to /etc/ld.so.conf
and run
ldconfig
as root, or configure with --prefix=/usr
to
put everything in /usr
.
rpmbuild -ta dia-XXX.tar.gz
autoexec.bat
file:
set HOME=c:\homethen restart your computer and make sure
c:\home
exists. The path should not contain
any spaces and is case-sensitive (c:\Home
is not the same as c:\home
).
As of Dia 0.88.1, this problem should no longer happen.
The best way to generate these is to download the tree through anonymous CVS (from cvs.gnome.org, this is possible of course also for Windows with the "Universal Geek user interface device driver" (cygwin)).
Then, all what is necessary is to do cvs add
s (commit will of course not
be accepted), do a cvs -z3 up -PAd
to check that the patch will be as up
to date as possible, and issue the following command:
cvs -z3 diff -Nu 2>/tmp/diff.log | gzip >/tmp/some.patch.gz
Study diff.log to check that no files have been unnecessarily touched. zless the patch to check that all changes are accounted for in the ChangeLog and are justified (one patch per orthogonal set of changes is also preferred).
An alternative is to have two copies, one pristine and one work area, of the
same tree, preferably a recent CVS snapshot. Modify all files and test in
the work area; then make distclean in both trees, and in the directory which
contains both trees, do something like :
diff -uRN dia-pristine dia-workarea >/tmp/some.patch
Again, this is possible even on a (okay, recent) Macintosh.
grep "^+++" /tmp/some.patch # check that no files have been unnecessarily
# touched, added or removed.
less /tmp/some.patch # check that patch is correct
gzip /tmp/some.patch
Send patch. Don't resend the same version of the patch twice on the list (when replying to yourself with updates...). Keep large patches (> 5-40 kb) for private mails and/or in Bugzilla (URL in the mailing list is of course welcome; small patches are okay, especially if some discussion on them is sought).
"Couldn't find standard objects when looking for object-libs, exiting..."
make install
, or run with the wrapper
script app/run_dia.sh. That way, Dia will know where to find its objects.
However, Dia now also has the capability of exporting a diagram as a shape.
Each collection of shapes (called a sheet) should be kept together in a
subdirectory of ~/.dia/shapes
, e.g,
~/.dia/shapes/Engines
. To make a shape, first design it in Dia.
Then export it into your subdirectory. Two files will be generated, a
.shape file and a .png file (the icon).
From version 0.90 and up, Dia features a Sheets and Objects editor which will allow you to load the shape into a sheet. It will also update Dia's loaded objects on the fly.
If you still want to do things by hand, update the corresponding
sheet file in ~/.dia/sheets
, in this case called
Engines.sheet
. Example contents of a sheet file is:
<?xml version="1.0" encoding="iso-8859-1"?> <!-- -*- xml -*- --> <sheet xmlns="http://www.lysator.liu.se/~alla/dia/dia-sheet-ns"> <name>Engines</name> <description>Mechanical Engines</description> <contents> <object name="Engines - Gas"> <description>A gas engine</description> </object> </contents> </sheet>Each new object should be added to the sheet by adding an
object
section. Next time you restart Dia, the new objects
should show up in the list of sheets.
An easier alternative would be to make a Visio plug-in that will allow conversion. Other programs have already done this for their proprietary formats. If somebody were to make such a script, we could set up a public server to do conversions.
With Visio 2002, it has become possible to export Visio diagrams as XML. Microsoft, in their infinite generosity, has even published the Schema. With the new XSLT plug-in, it should be only a question of writing a proper XSLT document to be able to translate.
Ian Redfern is working on decoding the Visio format. If you have any interest in converting Visio files, please give him your assistance.