Oh no! Some styles failed to load. 😵 Please try reloading this page
Menu â–¾ â–´

a trouble with -o option

Help
Kašpi
2009-09-21
2013-05-30
  • KaÅ¡pi

    Kašpi - 2009-09-21

    Hello,

    I'm experiencing a problem with -o option. Look for instance here (the idea is to keep pdf products separate from the asy sources):

      asy -f pdf -tex pdftex -o ../pdf/ bpms.asy

    which runs into troubles while TeX processing

      l.34 \includegraphics{../pdf/bpms_0.pdf}

    It looks to me as a bug… The bpms.asy can be found here

      http://jkaspar.web.cern.ch/jkaspar/share/bpms.asy

    Many thanks, Kašpi.

     
  • John Bowman

    John Bowman - 2009-09-21

    This is a bug in graphicx.tex, not in Asymptote. Here is a simpler TeX example, which produces the error
    `Unknown graphics extension: ../pdf/bpms_0.pdf`. One workaround is to use a symbolic link. Or use pdflatex. Perhaps you would like to report this bug to the maintainer of graphicx:

        \input graphicx
        \input picture
        \includegraphics{../pdf/bpms_0.pdf}%
        \bye

     
  • phi

    phi - 2009-09-21

    To be more precisely, the problem lies within the filename parser in miniltx, which doesn't parse paths. Try using the original filename parser from LaTeX:

            \def\filename@parse#1{%
          \let\filename@area\@empty
          \expandafter\filename@path#1/\\}
        \def\filename@path#1/#2\\{%
          \ifx\\#2\\%
             \def\reserved@a{\filename@simple#1.\\}%
          \else
             \edef\filename@area{\filename@area#1/}%
             \def\reserved@a{\filename@path#2\\}%
          \fi
          \reserved@a}

     
  • KaÅ¡pi

    Kašpi - 2009-09-21

    Many thanks for your help, I've already sent an email to a tex-live mail list about it.

    I've got one more problem. Take this simplistic script:

        unitsize(1cm);
        draw((0, 0)-(1, 1));
        label("ahoj", (0, 0));
        shipout("test");

    When run by
    <pre>asy -tex tex -o ../ bla.asy</pre>

    it creates the following error:
    <pre>
    dvips: DVI file can't be opened: test_.dvi: No such file or directory
    /usr/local/asymptote/base/plain_xasy.asy: 93.7: runtime: shipout failed
    </pre>

    It looks to me that some of temporary reside in ../ directory but some in the current one…

    The problem disappears when the -o option is removed or the shipout command is not present.

    Many thanks, Kašpi.

     
  • KaÅ¡pi

    Kašpi - 2009-09-22

    Thank you very much.

    An alternative solution might be to modify <pre>texfile::beginlayer</pre>
    not to exploit \includegraphics for  plainTeX (which is a bit awkward anyway). It could directly use \epsfbox for tex engine and image handling primitives for pdftex. What do you think? I believe I could provide such a patch if you wished…

    Cheers, Kašpi.

     
  • John Bowman

    John Bowman - 2009-09-22

    For modularity, I feell that the tex-engine dependence of includegraphics should be kept within that package and not moved into Asymptote. It's already unfortunate that we must have a special case for conTeXt; let's not allow the code to proliferate further every time some new TeX engine becomes popular.

    Morover, includegraphics also appears in plain_strings.asy, so you would have to duplicate whatever code you develop there as well.

     
  • Will Robertson

    Will Robertson - 2009-09-23

    TeX Live isn't an appropriate place to report bugs in graphicx.tex. David Carlisle lists contact details in doc/plain/plgraph/00readme.txt regarding support for this file, and miniltx.tex itself says:

    > "Under no circumstances should any problems relating to this file be sent to the LaTeX bugs address, or any other LaTeX related support address. Problems can be sent to me directly  (but I don't promise to fix them)."

    But I'd say you'd be lucky to receive much response. (The readme also contains a note requesting maintainers for the package.)

    Also, John, if you're planning on distributing that graphics.tex file, under the LPPL you should put \typeout messages telling the user that it's a derived version of the original.

    Best regards, 
    Will

     
  • John Bowman

    John Bowman - 2009-09-23

    Ok, due to licensing issues, I've removed the patched graphicx.tex from svn and merged the patch directly into Asymptote (texfile.h).

     
  • Will Robertson

    Will Robertson - 2009-09-23

    Hi John,

    Thanks for that; sorry to be a pain about it.
    I figure if we're going to have this slightly-restrictive LPPL then we should at least ensure that it's being followed in spirit (even though in this case the outcome was probably harmless).

    Many thanks,
    Will

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign Up No, Thank you