[TxMt] Re: sudden latex tidy and latex compiling errors

René Schwaiger sanssecours at f-m.fm
Wed Feb 11 08:38:11 UTC 2015


Hi Anthony,

> On 11 Feb 2015, at 24:40 , Anthony V. Pulido <anthony.pulido at gmail.com> wrote:
> 
> Hello,
> 
> I was using Textmate 2.0 beta 6.8, and suddenly, I received this error when I invoked latex tidy:
> 
> Can't locate YAML/Tiny.pm in @INC (you may need to install the YAML::Tiny module) (@INC contains: /Library/Perl/5.18/darwin-thread-multi-2level /Library/Perl/5.18 /Network/Library/Perl/5.18/darwin-thread-multi-2level /Network/Library/Perl/5.18 /Library/Perl/Updates/5.18.2 /System/Library/Perl/5.18/darwin-thread-multi-2level /System/Library/Perl/5.18 /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level /System/Library/Perl/Extras/5.18 .) at /usr/texbin/latexindent line 20.
> BEGIN failed--compilation aborted at /usr/texbin/latexindent line 20.
> 
> I use tidy often, and it usually works. I am sure I used it earlier today without incident.

I recently removed the old `LaTeXTidy` script from the LaTeX Bundle [1]. The “Tidy” command now uses `latexindent` [2]. `latexindent` is installed by default, but the YAML library it needs is not. You need to install PYAML for the command to work. To install the dependency:

1. Open Terminal
2. Install the `cpanm` package manager

    sudo cpan App::cpanminus

3. Install `YAML::Tiny` with cpanm

    sudo cpanm YAML::Tiny

If you did not update MacTeX recently, then you now get the error message:

YAML::Tiny found a duplicate key 'pmatrix'…

This is the result of a duplicate key in `/usr/local/texlive/2014/texmf-dist/scripts/latexindent/defaultSettings.yaml`.

Open the file with TextMate, for example by issuing the following command inside Terminal:

    mate /usr/local/texlive/2014/texmf-dist/scripts/latexindent/defaultSettings.yaml

Now search for `pmatrix` and remove one of the two occurrences. You can also update your TeX Distribution to fix the bug, for example by using “TeX Live Utility” [3]. I would recommend against that however, since I broke my TeX distribution that way once. For more information on the `latexindent` bug you can take a look at a bug report at StackExchange [4].

[1]: https://github.com/textmate/latex.tmbundle/commit/8012f20f979d1eee65724650bb71cfac710b6c5d
[2]: http://www.ctan.org/pkg/latexindent
[3]: https://github.com/amaxwell/tlutility
[4]: http://tex.stackexchange.com/questions/220719/workaround-for-latexindent-bug

Sorry that I broke your workflow. I will try to come up with a solution that auto-installs the dependency.

> Further, I also suddenly received the error "Command returned status code 1." for Typeset and view (PDF) when I compiled a latex file. The file uses the mtpro2 fonts, which, when disabled, allowed the file to compile again, but this is the first time this has happened. I did compile the file with the fonts enabled earlier today.

A tex file with the following content:

\documentclass{article}
\usepackage[lite]{mtpro2}
\begin{document}
$1 + 1 = 2$
\end{document}

works for me. Could you please provide a (minimal) example, so that I can try to debug the problem?

> Thank you for any help.

Sorry again for breaking the bundle commands. If you have further questions please just ask. I am always happy about feedback.

> Best wishes,
> 
> Anthony Pulido

Kind regards,
  René


More information about the textmate mailing list