Command options for local Asymptote build

23 views
Skip to first unread message

Sean Fitzpatrick

unread,
Nov 29, 2023, 11:29:50 AM11/29/23
to PreTeXt development
I'm not sure whether this is a CLI issue or a PreTeXt issue.

Right now, building Asymptote locally works great on Linux.
On Windows, it works, but there's a catch: the Asymptote developers assume that Windows users will expect a GUI, so the default behaviour when you build an .asy file to HTML is to open the file in a web browser when the build succeeds.

This is not ideal if you are building 300 Asymptote figures.

Adding the option '-noV' to the Asymptote command would ensure uniform behaviour across all platforms and build options.

Steven Clontz

unread,
Nov 29, 2023, 5:53:03 PM11/29/23
to PreTeXt development
Assuming version 2.0+ CLI project files:

Subsection 5.2.8: Executables

Maybe editing/creating executables.ptx to have   asy="asy -noV" would work.

I think it's <asy>asy -noV</asy> if you're still using 1.0 project file format.

Steven Clontz

unread,
Nov 29, 2023, 5:53:38 PM11/29/23
to PreTeXt development
Beyond that, it's a core PreTeXt feature - we just call Rob's code for this bit.

Sean Fitzpatrick

unread,
Nov 29, 2023, 6:28:51 PM11/29/23
to PreTeXt development
Ok. I know we used to pass several other options to the asy command in the pretext/pretext script. I'm not sure if that's still the case.
(On phone or I'd check.)

--
You received this message because you are subscribed to the Google Groups "PreTeXt development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pretext-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pretext-dev/4af17d78-1a08-4e1d-a0a1-7b344ccef903n%40googlegroups.com.

Rob Beezer

unread,
Nov 30, 2023, 4:37:38 PM11/30/23
to prete...@googlegroups.com
On fone as well. This could be an easy PR for you.

On November 30, 2023 8:28:39 AM GMT+09:00, Sean Fitzpatrick <dsfitz...@gmail.com> wrote:
>Ok. I know we used to pass several other options to the asy command in the
>pretext/pretext script. I'm not sure if that's still the case.
>(On phone or I'd check.)
>
>On Wed, Nov 29, 2023, 3:53 p.m. Steven Clontz <steven...@gmail.com>
>wrote:
>
>> Assuming version 2.0+ CLI project files:
>>
>> Subsection 5.2.8: Executables
>> <https://pretextbook.org/doc/guide/html/processing-CLI.html#processing-CLI-12>
>>
>> Maybe editing/creating executables.ptx to have asy="asy -noV" would
>> work.
>>
>> I think it's <asy>asy -noV</asy> if you're still using 1.0 project file
>> format.
>> On Wednesday, November 29, 2023 at 10:29:50 AM UTC-6 dsfitz...@gmail.com
>> wrote:
>>
>>> I'm not sure whether this is a CLI issue or a PreTeXt issue.
>>>
>>> Right now, building Asymptote locally works great on Linux.
>>> On Windows, it works, but there's a catch: the Asymptote developers
>>> assume that Windows users will expect a GUI, so the default behaviour when
>>> you build an .asy file to HTML is to open the file in a web browser when
>>> the build succeeds.
>>>
>>> This is not ideal if you are building 300 Asymptote figures.
>>>
>>> Adding the option '-noV' to the Asymptote command would ensure uniform
>>> behaviour across all platforms and build options.
>>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "PreTeXt development" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to pretext-dev...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/pretext-dev/4af17d78-1a08-4e1d-a0a1-7b344ccef903n%40googlegroups.com
>> <https://groups.google.com/d/msgid/pretext-dev/4af17d78-1a08-4e1d-a0a1-7b344ccef903n%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>

Sean Fitzpatrick

unread,
Nov 30, 2023, 6:06:09 PM11/30/23
to prete...@googlegroups.com
Scanning through the pretext/pretext and pretext/pretext.py files just
now suggests that there is no longer anywhere there where options passed
to the asy program are hard-coded.
(Once upon a time I believe they were.) So any PR would have to be a CLI
PR, I think.

Probably Steven's suggestion to use the executables.ptx file is the
simplest solution.

Rob Beezer

unread,
Nov 30, 2023, 8:21:58 PM11/30/23
to prete...@googlegroups.com
OK, I'd thought there were still parameters there. The CLI fix will let you move forward, but that does not sound like it should be the long-term fix for everybody. I'll look closer when I can.
Reply all
Reply to author
Forward
0 new messages