[kepler-dev] Including PDF in Vergil
Chad Berkley
berkley at nceas.ucsb.edu
Tue Jul 14 11:07:29 PDT 2009
I added functionality yesterday for the build to look through the
ptolemy/ptolemy dir for jar files and add those to both the compile and
runtime classpath. I think it would be better for there to be some
structure delineating source from jars and libs, but since ptolemy has
traditionally not done it this way, I think the kepler build system
should be flexible enough to handle it. I don't think we should just
add whatever jars we need to ptolemy-lib. Adding duplicate jars will
just cause problems down the road.
chad
David Welker wrote:
> Hi Christopher,
>
> The build system expects all jar files to be in a folder called
> <module-name>/lib or in a subfolder of that. To fix this for now, I am
> going to make a copy of PDFRenderer.jar and put it in the ptolemy-lib
> module.
>
> David
>> Hi David,
>> Kepler fails to build for me after I moved PDFRenderer.jar from
>> ptII/lib to
>> ptII/ptolemy/vergil/pdfrenderer. To reproduce this:
>>
>> cd build-area
>> ant update
>> ant update-ptolemy -Drev=head
>> ant run
>>
>> The error message is:
>>
>> compile:
>> [compile] Compiling ptolemy...
>> [compile] Compiling 3277 source files to
>> /Users/cxh/src/kepler/ptolemy/target/classes
>> [compile]
>> /Users/cxh/src/kepler/ptolemy/ptolemy/vergil/pdfrenderer/PDFAttribute.java:46:
>> package com.sun.pdfview does not exist
>> [compile] import com.sun.pdfview.PDFFile;
>> [compile] ^
>>
>> I updated (but did not check in) build-area/settings/ptolemy-includes
>> to include:
>> ptolemy/vergil/pdfrenderer/PDFRenderer.jar
>>
>> But running "ant run" has no effect.
>>
>> The jar file is present:
>>
>> bash-3.2$ ls -l ../ptolemy/ptolemy/vergil/pdfrenderer/PDFRenderer.jar
>> -rw-r--r-- 1 cxh staff 2087109 Jul 13 11:31
>> ../ptolemy/ptolemy/vergil/pdfrenderer/PDFRenderer.jar
>>
>>
>> https://kepler-project.org/developers/teams/build/documentation/build-system-instructions#modifying-ptolemy-includes-and
>>
>> just says to edit ptolemy-includes, it does not say what, if any,
>> other commands should be run.
>>
>> What else needs to be done when ptolemy-includes is updated?
>> Is there anyway that this file can have comments in it that indicate
>> what commands need to be run
>> and also a link to the docs?
>>
>>
>> Also, at this point the PDFAttribute does not appear in Kepler. I'm
>> not sure how to add it, though
>> I have not looked hard at the docs yet.
>>
>> _Christopher
>>
>>
>> Edward A. Lee wrote:
>>>
>>> I've added a PDFAttribute to the Utilities->Decorative library in Vergil
>>> that allows you to include PDF in a Vergil diagram.
>>>
>>> The reason I wanted this was mainly so I could include Latex-formatted
>>> equations in Vergil diagrams, and get full print resolution when
>>> printing to PDF for use in papers, books, etc. For example, see
>>> attached.
>>>
>>> Using requires a new external library, PDFRenderer.jar, which I've
>>> put in $PTII/lib. This is a LGPL'd open source product from Sun.
>>>
>>> To use it, I use LatexIt (see
>>> http://www.apple.com/downloads/macosx/math_science/latexit.html
>>> for the Mac version... I think there are Windows and Linux versions).
>>> From LatexIt, I can create a PDF file with an equation.
>>>
>>> Then I drag into my Vergil diagram a PDFAttribute, or select
>>> Edit Custom Icon and drag in a PDFIcon. Double click on that to
>>> select the PDF file.
>>>
>>> To use this, you need to do a CVS update and
>>> either re-run configure or do
>>>
>>> cd $PTII/bin
>>> make
>>>
>>>
>>> This will put the jar file in the path for vergil.
>>>
>>> Edward
>>>
>>>
>>> ------------------------------------------------------------------------
>>>
>>>
>>> ------------------------------------------------------------------------
>>>
>>> _______________________________________________
>>> Kepler-dev mailing list
>>> Kepler-dev at kepler-project.org
>>> http://mercury.nceas.ucsb.edu/kepler/mailman/listinfo/kepler-dev
>>
>
> _______________________________________________
> Kepler-dev mailing list
> Kepler-dev at kepler-project.org
> http://mercury.nceas.ucsb.edu/kepler/mailman/listinfo/kepler-dev
More information about the Kepler-dev
mailing list