Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

check_latex can't find pg.sty #2543

Closed
dlglin opened this issue Aug 28, 2024 · 5 comments
Closed

check_latex can't find pg.sty #2543

dlglin opened this issue Aug 28, 2024 · 5 comments

Comments

@dlglin
Copy link
Member

dlglin commented Aug 28, 2024

When I run check_latex I get "! LaTeX Error: File `pg.sty' not found."

A bit of digging shows that the value of $ce->{pg}{directories}{assetsTex} is "/assets/tex", which is not correct.

I believe that the problem is that $pg_dir is defined in webwork2.mojolicious.yml (or the .dist version), but when a WW CE is invoked from the command line the mojolicious config is not loaded, so $pg_dir is never set, which means that any paths that are built from that will be incorrect.

If I'm right this means that check_latex won't work for anyone in 2.19. Can someone confirm whether it works for them?

@Alex-Jordan
Copy link
Contributor

I confirm on the two 2.19 servers that I checked, that I get the same error about pg.sty.

drgrice1 added a commit to drgrice1/webwork2 that referenced this issue Aug 28, 2024
The addition of the requirement of PG files for hardcopy (namely the
`pg.sty` file), means that the `check_latex` script needs to know where
the pg directory is.  So find that the same way the webwork2 app does.

This fixes issue openwebwork#2543.
drgrice1 added a commit to drgrice1/webwork2 that referenced this issue Aug 28, 2024
The addition of the requirement of PG files for hardcopy (namely the
`pg.sty` file), means that the `check_latex` script needs to know where
the pg directory is.  So find that the same way the webwork2 app does.

This fixes issue openwebwork#2543.
@Alex-Jordan
Copy link
Contributor

When I check this on my production servers (PCC and RS) check_latex fails. But just now I was testing Glenn's PR to address this. And I found that on my devleopment server, on the develop branch, check_latex runs with success. (On the develop branch, not just with Glenn's fix.)

@drgrice1
Copy link
Sponsor Member

drgrice1 commented Sep 2, 2024

You probably have the PG_ROOT environment variable set. If you have set to the PG directory, then the script will still succeed, because it finds the PG directory that way rather than the new way of getting it from the configuration file.

@drgrice1
Copy link
Sponsor Member

drgrice1 commented Sep 2, 2024

By the way, when @dlglin first posted this issue and I tested it, I saw the same thing. Then I unset PG_ROOT and tried again. Then I saw the failure.

drgrice1 added a commit to drgrice1/webwork2 that referenced this issue Sep 2, 2024
The addition of the requirement of PG files for hardcopy (namely the
`pg.sty` file), means that the `check_latex` script needs to know where
the pg directory is.  So find that the same way the webwork2 app does.

This fixes issue openwebwork#2543.
drgrice1 added a commit to drgrice1/webwork2 that referenced this issue Sep 2, 2024
The addition of the requirement of PG files for hardcopy (namely the
`pg.sty` file), means that the `check_latex` script needs to know where
the pg directory is.  So find that the same way the webwork2 app does.

This fixes issue openwebwork#2543.
drgrice1 added a commit to drgrice1/webwork2 that referenced this issue Sep 2, 2024
The addition of the requirement of PG files for hardcopy (namely the
`pg.sty` file), means that the `check_latex` script needs to know where
the pg directory is.  So find that the same way the webwork2 app does.

This fixes issue openwebwork#2543.
drgrice1 added a commit to drgrice1/webwork2 that referenced this issue Sep 2, 2024
The addition of the requirement of PG files for hardcopy (namely the
`pg.sty` file), means that the `check_latex` script needs to know where
the pg directory is.  So find that the same way the webwork2 app does.

This fixes issue openwebwork#2543.
@somiaj
Copy link
Contributor

somiaj commented Sep 3, 2024

This was fixed by #2545 and hotfix #2546.

@somiaj somiaj closed this as completed Sep 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants