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

Can not use latexindent in this docker image #1

Closed
cubercsl opened this issue Nov 7, 2020 · 10 comments · Fixed by #2
Closed

Can not use latexindent in this docker image #1

cubercsl opened this issue Nov 7, 2020 · 10 comments · Fixed by #2

Comments

@cubercsl
Copy link
Contributor

cubercsl commented Nov 7, 2020

Can't locate Log/Log4perl.pm in @INC (you may need to install the Log::Log4perl module) (@INC contains: /opt/texlive/texdir/texmf-dist/scripts/latexindent /usr/local/lib/perl5/site_perl /usr/local/share/perl5/site_perl /usr/lib/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib/perl5/core_perl /usr/share/perl5/core_perl) at /opt/texlive/texdir/texmf-dist/scripts/latexindent/LatexIndent/LogFile.pm line 22.

I think you may use cpanm to install some perl modules to support this.

@xu-cheng
Copy link
Owner

xu-cheng commented Nov 7, 2020

Thanks for the reporting. A PR would be welcomed.

@drupol
Copy link

drupol commented Jan 20, 2021

Hello,

Despite this, I still have the issue when I run latexindent.

$ docker-compose run texlive latexindent -h
Creating continuouslatex_texlive_run ... done
Can't locate Log/Log4perl.pm in @INC (you may need to install the Log::Log4perl module) (@INC contains: /opt/texlive/texdir/texmf-dist/scripts/latexindent /usr/local/lib/perl5/site_perl /usr/local/share/perl5/site_perl /usr/lib/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib/perl5/core_perl /usr/share/perl5/core_perl) at /opt/texlive/texdir/texmf-dist/scripts/latexindent/LatexIndent/LogFile.pm line 22.
BEGIN failed--compilation aborted at /opt/texlive/texdir/texmf-dist/scripts/latexindent/LatexIndent/LogFile.pm line 22.
Compilation failed in require at /opt/texlive/texdir/texmf-dist/scripts/latexindent/LatexIndent/Document.pm line 25.
BEGIN failed--compilation aborted at /opt/texlive/texdir/texmf-dist/scripts/latexindent/LatexIndent/Document.pm line 25.
Compilation failed in require at /opt/texlive/texdir/bin/x86_64-linuxmusl/latexindent line 27.
BEGIN failed--compilation aborted at /opt/texlive/texdir/bin/x86_64-linuxmusl/latexindent line 27.

@cubercsl
Copy link
Contributor Author

cubercsl commented Jan 20, 2021

Hello,

Despite this, I still have the issue when I run latexindent.

$ docker-compose run texlive latexindent -h
Creating continuouslatex_texlive_run ... done
Can't locate Log/Log4perl.pm in @INC (you may need to install the Log::Log4perl module) (@INC contains: /opt/texlive/texdir/texmf-dist/scripts/latexindent /usr/local/lib/perl5/site_perl /usr/local/share/perl5/site_perl /usr/lib/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib/perl5/core_perl /usr/share/perl5/core_perl) at /opt/texlive/texdir/texmf-dist/scripts/latexindent/LatexIndent/LogFile.pm line 22.
BEGIN failed--compilation aborted at /opt/texlive/texdir/texmf-dist/scripts/latexindent/LatexIndent/LogFile.pm line 22.
Compilation failed in require at /opt/texlive/texdir/texmf-dist/scripts/latexindent/LatexIndent/Document.pm line 25.
BEGIN failed--compilation aborted at /opt/texlive/texdir/texmf-dist/scripts/latexindent/LatexIndent/Document.pm line 25.
Compilation failed in require at /opt/texlive/texdir/bin/x86_64-linuxmusl/latexindent line 27.
BEGIN failed--compilation aborted at /opt/texlive/texdir/bin/x86_64-linuxmusl/latexindent line 27.

Hi @drupol , which image do you use? BTW, I think you are using the wrong image.
Some images in this page may be deprecated. The new release is ghcr.io/xu-cheng/texlive-full.

❯ docker pull ghcr.io/xu-cheng/texlive-full
Using default tag: latest
latest: Pulling from xu-cheng/texlive-full
801bfaa63ef2: Pull complete 
9c3be02a00c4: Pull complete 
Digest: sha256:5f702d638a1ecb89c7098a6c9994f6c2653bdd668cbcb60f87a5ef096690be5c
Status: Downloaded newer image for ghcr.io/xu-cheng/texlive-full:latest
ghcr.io/xu-cheng/texlive-full:latest

~ 4m 6s
❯ docker run ghcr.io/xu-cheng/texlive-full latexindent -h
latexindent.pl version 3.8.3, 2020-11-06
usage: latexindent.pl [options] [file][.tex|.sty|.cls|.bib|...]
      -v, --version
          displays the version number and date of release
      -h, --help
          help (see the documentation for detailed instructions and examples)
      -sl, --screenlog
          log file will also be output to the screen
      -o, --outputfile=<name-of-output-file>
          output to another file; sample usage:
                latexindent.pl -o outputfile.tex myfile.tex 
                latexindent.pl -o=outputfile.tex myfile.tex 
      -w, --overwrite
          overwrite the current file; a backup will be made, but still be careful
      -s, --silent
          silent mode: no output will be given to the terminal
      -t, --trace
          tracing mode: verbose information given to the log file
      -l, --local[=myyaml.yaml]
          use localSettings.yaml (assuming it exists in the directory of your file, 
          or in the current working directory); alternatively, use myyaml.yaml, if it exists; 
          sample usage:
                latexindent.pl -l some.yaml myfile.tex 
                latexindent.pl -l=another.yaml myfile.tex 
                latexindent.pl -l=some.yaml,another.yaml myfile.tex 
      -y, --yaml=<yaml settings>
          specify YAML settings; sample usage:
                latexindent.pl -y="defaultIndent:' '" myfile.tex
                latexindent.pl -y="defaultIndent:' ',maximumIndentation:' '" myfile.tex
      -d, --onlydefault
          ONLY use defaultSettings.yaml, ignore ALL (yaml) user files
      -g, --logfile=<name of log file>
          used to specify the name of logfile (default is indent.log)
      -c, --cruft=<cruft directory> 
          used to specify the location of backup files and indent.log
      -m, --modifylinebreaks
          modify linebreaks before, during, and at the end of code blocks; 
          trailing comments and blank lines can also be added using this feature
      -r,--replacement
          replacement mode, allows you to replace strings and regular expressions
          verbatim blocks not respected
      -rv,--replacementrespectverb
          replacement mode, allows you to replace strings and regular expressions
          while respecting verbatim code blocks
      -rr,--onlyreplacement
          *only* replacement mode, no indentation
          verbatim blocks not respected

~

@drupol
Copy link

drupol commented Jan 20, 2021

Oh !

There something I don't understand.

I'm using this docker image: xucheng/texlive-full is it wrong?

$ docker image ls
REPOSITORY                 TAG                 IMAGE ID            CREATED             SIZE
xucheng/texlive-full       latest              ad49733cc90b        4 months ago        4.27GB

also, I did:

$ docker pull ghcr.io/xu-cheng/texlive-full:latest
latest: Pulling from xu-cheng/texlive-full
801bfaa63ef2: Pull complete
9c3be02a00c4: Downloading [>    ]

And it seems that there are two images then ? xu-cheng/texlive-full and xucheng/texlive-full
This is a bit confusing :-)

Which docker image am I supposed to use?

@cubercsl
Copy link
Contributor Author

cubercsl commented Jan 20, 2021

I think xucheng/texlive-full is the image from docker hub? It updated 5 month ago. But now, this image has no longer publish to docker hub, and it may only avaliable here for github action.
The release of docker hub image needs to be completed by @xu-cheng .

@drupol
Copy link

drupol commented Jan 20, 2021

Ooh... this is interesting to know.

Maybe it would be a good idea to remove it or to document that the newest image is somewhere else.

What do you think?

@xu-cheng
Copy link
Owner

xu-cheng commented Jan 20, 2021

Yes, I stop pushing the docker image to docker hub after it introduced rate limit and other restrictions for free tire accounts.

I will update the document.

@drupol
Copy link

drupol commented Jan 20, 2021

Thanks !!!

Keep up the good work with your amazing docker image!

@cmhughes
Copy link

cmhughes commented May 7, 2022

For reference Log4Perl hasn't been required since https://github.com/cmhughes/latexindent.pl/releases/tag/V3.9

All the best,
Chris (author of latexindent.pl)

@xu-cheng
Copy link
Owner

xu-cheng commented May 7, 2022

@cmhughes Thanks for the information.

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

Successfully merging a pull request may close this issue.

4 participants