From e7cdbfdc6a4b3cb8a257b3aded7ea77088673315 Mon Sep 17 00:00:00 2001 From: north Date: Sat, 7 Jun 2008 03:08:50 +0000 Subject: [PATCH] Add Glen Low instructions about file associations in OSX --- doc/FAQ.html | 56 ++++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 46 insertions(+), 10 deletions(-) diff --git a/doc/FAQ.html b/doc/FAQ.html index 79bb58baa..f3119b172 100644 --- a/doc/FAQ.html +++ b/doc/FAQ.html @@ -1,9 +1,9 @@ -Graphviz FAQ 2006-07-27 +Graphviz FAQ 2008-06-06 -

Graphviz FAQ 2006-07-27

+

Graphviz FAQ 2008-06-06

The Graphviz Project

@@ -158,7 +158,11 @@ digraph G { Q. How can I generate graph layouts in PDF?

-First, create Postscript output, then use an external converter from +Recent versions of graphviz with the CairoPango based drivers +can generate PDF directly with the -Tpdf command line option. +This this first. +

+Otherwise, create Postscript output, then use an external converter from Postscript to PDF. For example,
dot -Tps | epsf2pdf -o file.pdf
@@ -321,10 +325,9 @@ Pixelglow Graphviz hasn't been updated in a long time, maybe mid 2004.) On the Linux bleeding edge, Graphviz has an optional plugin to use the cairo back end, which has antialiased, path-based graphics. If you want this, -you must install cairo, which is not part of Graphviz. Cairo can be -built from source, and binary RPMs for Fedora Core 5 (test 2) are available. -Then you need to install the optional graphviz-cairo plugin. (n.b. we tried -cairo-1.0.2-1.fc4.remi for FC4 - it has errors.) +you must install cairo, which is not part of Graphviz. Cairo is +available in recent versions of Fedora linux, or it can be built +from source.

Q9. I can only get 11x17 output. @@ -984,7 +987,7 @@ sodipodi is faster but both make sharp images - isn't that the beauty of path-based graphics?

-Q. libexpat is reported as containing a virus or as a security hole. +Q39. libexpat is reported as containing a virus or as a security hole. Is this a real problem?

@@ -994,7 +997,6 @@ See http://www.pcr

Q40. What is the coordinate transformation between the graph bb and a .png image? -

  1. The bb is expanded by 4 graph-units in all directions (pad) to allow for finite line widths. @@ -1025,6 +1027,40 @@ coordinates in graph-units, and composite transformation data consisting of: scaling, rotation, and translation. (used by svg, cairo, ps, renderers)
  2. coordinates pre-transformed into device units. -
  3. + +

    + +Q41. File associations are broken in Mac OSX. Clicking on a dot file doesn't open Graphviz. +

    +The immediate fix is to rebuild the Launch Services database like this: +

    +1. Trash all other versions of Graphviz.app on your system, except for the just installed one. You can use either of these command lines to find it: +

    +

    locate Graphviz.app
    +

    +or +

    +

    find / -name "Graphviz.app"
    +

    +2. Run the following command line: +

    +

    /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -kill -r / 
    +

    +or +

    +

    /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -kill -r /Applications
    +

    +which deletes the Launch Services database and rebuilds it from existing apps. You may need to sudo to do this. +

    +3. Verify that the Graphviz.app can now open .dot files and Microsoft Word can still open its own .dot files. +

    +One artifact of this will be that Microsoft .dot files may appear with the Graphviz document icon. Unfortunately there doesn't seem any a priori way of getting the system to determine whether an arbitrary .dot file belongs to Word or Graphviz -- you can choose which application to open with by right-clicking or control-clicking on the document icon and choosing the app. +

    +As for why the Launch Services database doesn't automatically register Graphviz, +we're not entirely sure but suspect this only happens if both conditions +hold true: +

    +A. The user had installed Microsoft Word.
    +B. There is also another version of Graphviz.app present in the system. (Possibly the previous version 1.13 released by Pixelglow Software)
    -- 2.40.0