Project

General

Profile

Support #15978

.tex files?

Added by Marilyn Weber 2 months ago. Updated 5 days ago.

Status:
Resolved
Priority name:
Normal
Assignee:
Category name:
WordPress - Media
Target version:
Start date:
2022-04-25
Due date:
% Done:

0%

Estimated time:

Description

Elvis from the GC library asks:

One of our Open Knowledge Fellows was hoping to upload a .tex file , but it did not allow for upload...he tried to upload a .zip file as well. Is there a reason these formats are not permitted? Thank you for considering! - Elvis

B0B70DB6F80840C495F1504E739ADBC3.png (4.58 KB) B0B70DB6F80840C495F1504E739ADBC3.png Marilyn Weber, 2022-04-28 04:38 PM

History

#1 Updated by Boone Gorges 2 months ago

  • Status changed from New to Staged for Production Release
  • Target version set to 1.19.8

I've added it to the list of allowed types in https://github.com/cuny-academic-commons/cac/commit/a246955f946fdb874dd663f5b4d96a911d90bd67. The change will be part of today's release.

#2 Updated by Boone Gorges 2 months ago

  • Status changed from Staged for Production Release to Resolved

#3 Updated by Marilyn Weber 2 months ago

Sorry to reopen. Please read from the bottom up:

Hurson, Laurie
Today ‪11:09 am‬

Hi Marilyn,

Not sure where Boone is going to stand on this but my understanding is that we do not allow code files to be uploaded on the Commons (such as the cls an sty files that they are asking about). But I could be wrong about these particular files types.

It looks like this person is possibly wanting to use Latex on the Commons? If it turns out they are not allowed to upload these files types there is a plugin on the Commons "WP LaTeX" that facilitates integration of some Latex capabilities.

Susanszky, Peter
Today ‪08:35 am‬

Hi,

I tried clearing everything, and also tried various browsers on various computers. All popped the same error.

My vote on the second is "yes".

Thank you,
Peter

Marilyn Weber
Yesterday ‪06:39 pm‬
(assign)
Peter - Try clearing your cache or using a different browser.

Both - Do you want all three of these:

  • *.bib for the bibliography;
  • *.cls for class files;
  • *.sty for style files.

Susanszky, Peter
Yesterday ‪05:20 pm‬

Hi,

I am still getting the following error message:

Best regards,

Peter

B0B70DB6F80840C495F1504E739ADBC3.png
B0B70DB6F80840C495F1504E739ADBC3
PNG

Bakaitis, Elvis
Yesterday ‪04:17 pm‬

Hello Commons Team,

Thank you for adding .tex files - we were also wondering if the following might be considered.

Thank you;

Sincerely,

Elvis

From Peter Susanszky (cc:ed):

"LaTeX also uses:

  • *.tex for the body;
  • *.bib for the bibliography;
  • *.cls for class files;
  • *.sty for style files.

My OER book does not have a .bib file, but it does come with a .sty file because I had to use a bunch of packages, and I also defined my own commands and environments."

Elvis Bakaitis

#4 Updated by Marilyn Weber 2 months ago

Please add Laurie as a watcher. If Elvis on on Redmine, add them as well. Thanks!

#5 Updated by Boone Gorges 2 months ago

  • Status changed from Resolved to Assigned
  • Assignee set to Raymond Hoh
  • Target version changed from 1.19.8 to 1.19.9

I added the MIME type for .tex files but I'm still unable to upload. https://github.com/cuny-academic-commons/cac/commit/64273c08e4a889f0b5bdabb961219ff7a9007f4c (shipped as a hotfix) Ray, do you have a chance to take a look to see what I've done wrong?

I don't think that the .bib, .cls, and .sty files are any more dangerous than regular text files. Ray, perhaps you could research this and add them once you've figured out my error?

It looks like this person is possibly wanting to use Latex on the Commons? If it turns out they are not allowed to upload these files types there is a plugin on the Commons "WP LaTeX" that facilitates integration of some Latex capabilities.

Perhaps, though in this case I'm guessing that LaTeX is the subject of a course/lesson, and the upload is required to share student or sample work. The WP tools are for authoring content using LaTeX syntax, but having it display in a web browser. So I'm guessing it's not a viable substitute.

#6 Updated by Raymond Hoh 2 months ago

Would it be possible for Elvis to get the user to share the .tex file and all related files needing to be uploaded?

#7 Updated by Raymond Hoh 2 months ago

Nevermind, I was able to grab a sample .tex file online. The mime type is actually text/x-tex. However, .tex can also support application/x-tex.

I've added support for .cls, .ltx, .sty and .tex files, as well as .bib, which has the mime type of text/x-bibtex in https://github.com/cuny-academic-commons/cac/commit/5e7455754c288b347328ba793a26b62c7e4c1c5d. This is deployed on production as well.

If we want to support the application/x-tex mime type for .tex files as well, we would have to do something like the following: https://wordpress.stackexchange.com/a/323757.

#8 Updated by Marilyn Weber 2 months ago

So the user should be good to go with .cls, .ltx, .sty and .tex files?

#9 Updated by Raymond Hoh 2 months ago

  • Category name set to WordPress - Media
  • Status changed from Assigned to Reporter Feedback

Hi Marilyn,

Yes, ask the user to try to upload the Latex files in question. If the files fail to upload, let me know.

#10 Updated by Boone Gorges about 2 months ago

  • Target version changed from 1.19.9 to 1.19.10

#11 Updated by Boone Gorges about 1 month ago

  • Target version changed from 1.19.10 to 2.0.1

#12 Updated by Boone Gorges 20 days ago

  • Target version changed from 2.0.1 to 2.0.2

#13 Updated by Raymond Hoh 5 days ago

  • Status changed from Reporter Feedback to Resolved

I'm going to close this one as no news is good news!

If there is still a problem with uploading .tex files, please feel free to re-open the ticket.

Also available in: Atom PDF