[LON-CAPA-admin] bug report? latex style file is missing?

Raeburn, Stuart raeburn at msu.edu
Tue Feb 12 17:43:50 EST 2019


Nathan,

If a LaTeX error is reported when generating a printout for a resource containing an image file (e.g., a .jpg), one cause could be the ImageMagick convert routine failing to create an .eps file from the jpg file.

In that case an option is to create an eps format version of the file outside of LON-CAPA, and then upload that .eps file to the same directory in Authoring Space as the .jpg file, with the same filename, except replacing the .jpg extension with .eps. followed by publication of the .eps file with the same distribution rights as the .jpg file.

>From then on, whenever the resource is printed in LON-CAPA, the published .eps file will be used instead of one being created on the fly by ImageMagick from the .jpg, .

See: loncapa.winona.edu/adm/help/Authoring_Pictures_EPS.hlp#Authoring_Pictures_EPS

Other domains running Ubuntu 16LTS have recently reported issues with conversion of jpg files to eps.
The 8:6.8.9.9-7ubuntu5.13 version of imagemagick released for Ubuntu 16LTS on 9/28/2018 included a change which modified: /etc/ImageMagick-6/policy.xml .  

This line was added (amongst other changes):
<policy domain="coder" rights="none" pattern="EPS" />

If you change that line to:
<policy domain="coder" rights="write" pattern="EPS" />

some types of image conversion failures will be resolved on Ubuntu 16LTS.


Stuart Raeburn
LON-CAPA Academic Consortium

________________________________________
From: LON-CAPA-admin <lon-capa-admin-bounces at mail.lon-capa.org> on behalf of Moore, Nathan T <nmoore at winona.edu>
Sent: Wednesday, February 6, 2019 11:58 AM
To: list about administration and system updating
Subject: Re: [LON-CAPA-admin] bug report? latex style file is missing?

Thanks Stuart.  That worked.

The latex process did refuse to render one .jpg file.   (There was an latex error about no eps version of /res/winona/NMoore/openstax-university-physics-2/photovoltaics/national_photovoltaic_2012-01.jpg being available.) Is png the optimal image format to include with loncapa problems?

--- --- --- ---
Nathan Moore, PhD
Physics, Winona State University

-----Original Message-----
From: LON-CAPA-admin <lon-capa-admin-bounces at mail.lon-capa.org> On Behalf Of Raeburn, Stuart
Sent: Tuesday, February 5, 2019 5:56 PM
To: list about administration and system updating <lon-capa-admin at mail.lon-capa.org>
Subject: Re: [LON-CAPA-admin] bug report? latex style file is missing?

Nathan,

>
>  Is there an extra latex package I should install?
>

No.

However, on Ubuntu 16 you will need to run the following command:

sudo /usr/bin/mktexlsr

Although LON-CAPA's ./UPDATE command installs picins.sty for Linux distros which do not have it, and then runs texconfig rehash (which in turn runs mktexlsr), on Ubuntu 16 (and 18 LTS) texconfig is absent, so mktexlsr needs to be called directly instead.

The version of picins_check.piml included in the LON-CAPA 2.11.3 release includes the appropriate call to texconfig or mktexlsr (depending on Linux distro/version), but the version shipped with the LON-CAPA 2.11.2 release expected to find texconfig on Ubuntu 16.

See: source.loncapa.org/cgi-bin/cvsweb.cgi/doc/loncapafiles/picins_check.piml.diff?r1=1.35;r2=1.36

Stuart Raeburn
LON-CAPA Academic Consortium
________________________________________
From: LON-CAPA-admin <lon-capa-admin-bounces at mail.lon-capa.org> on behalf of Moore, Nathan T <nmoore at winona.edu>
Sent: Tuesday, February 5, 2019 12:51 PM
To: list about administration and system updating
Subject: [LON-CAPA-admin] bug report? latex style file is missing?

I'm trying to use the "print out the problem as pdf with latex" option (the "print" button when you're looking at a homework problem).

Latex fails, particularly when the problems include image files.  The error message often looks like,

! LaTeX Error: File `picins.sty' not found.
 Type X to quit or  to proceed,
or enter new name. (Default extension: sty)  Enter file name:
 ! Emergency stop.



More information about the LON-CAPA-admin mailing list