4

Running latexindent I get the following error message:

YAML::Tiny found a duplicate key 'pmatrix' in line '1' at    /usr/local/texlive/2014/bin/x86_64-linux/latexindent line 171.

The bug resists:

  • Reinstallation (working on Ubuntu 14.10)
  • Removal of all configuration files
  • Logging in from another user account.

Any ideas for a workaround?


Edit: the problem persists even after upgrade to latexindent version 2.0R, with the date of the latexindent.pl being Dec 7th, 2014:

enter image description here

Yossi Gil
  • 15,951
  • Which version do you have (you should see details in indent.log)? Have you updated your distribution? I fixed this issue in v2.0r which was released in December 2014 – cmhughes Jan 05 '15 at 07:59
  • It latexindent.pl version 1.11R; strangely enough, I never had this problem before. – Yossi Gil Jan 05 '15 at 12:33
  • Try updating your distribution, and then running it again. The problem was that defaultSettings.yaml did indeed contain a duplicated entry, pmatrix. In older versions of YAML::Tiny this wasn't an issue, but presumably you have a newer version. Let me know if this fixes the issue or not once you see version 2.0R in indent.log – cmhughes Jan 05 '15 at 13:06
  • Did you update defaultSettings.yaml as well? – cmhughes Jan 05 '15 at 17:00
  • Yes, I did. But my ~/.latexinde.yaml had a copy of the old defaultSettings.yaml. Fixing this solved the problem. Thanks! – Yossi Gil Jan 06 '15 at 18:52
  • 4
    I'm voting to close this question as off-topic because it has been solved by updating the software. – LaRiFaRi Jul 18 '15 at 12:55
  • Not so fast. The problem was with the update process, in which some of the old config files intervene with the new update. It may occur again in any system in which you update an existing version of TeXLive, or keeping up two, as may be common in Ubuntu. – Yossi Gil Jul 21 '15 at 19:50

1 Answers1

2

This can be fixed by updating your version of latexindent.pl to V2.0R by updating your distribution, as detailed in How do I update my TeX distribution?. If you download latexindent.pl manually, be sure to get defaultSettings.yaml at the same time.


This issue was actually fixed in a previous commit in June 2014. The issue was that defaultSettings.yaml contained the following:

# environments that have tab delimiters, add more 
# as needed
lookForAlignDelims:
   ...
   pmatrix: 1
   ...
   pmatrix: 1
   ...

This didn't cause problems in older versions of the YAML::Tiny Perl Module, but does give the warning you report in newer versions.

cmhughes
  • 100,947