From 8321808ed1278e2b4fc5e6d58fcb1acecc4155c0 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sat, 13 Jan 2018 22:26:56 +0000 Subject: latexindent (13jan18) git-svn-id: svn://tug.org/texlive/trunk@46303 c570f23f-e606-0410-a88d-b1316a301751 --- .../source/texk/texlive/linked_scripts/latexindent/latexindent.pl | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'Build/source/texk/texlive/linked_scripts/latexindent/latexindent.pl') diff --git a/Build/source/texk/texlive/linked_scripts/latexindent/latexindent.pl b/Build/source/texk/texlive/linked_scripts/latexindent/latexindent.pl index b2d9da3a032..3b943817ec2 100755 --- a/Build/source/texk/texlive/linked_scripts/latexindent/latexindent.pl +++ b/Build/source/texk/texlive/linked_scripts/latexindent/latexindent.pl @@ -1,5 +1,5 @@ #!/usr/bin/env perl -# latexindent.pl, version 3.3, 2017-08-21 +# latexindent.pl, version 3.4, 2018-01-13 # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -43,6 +43,7 @@ GetOptions ( "logfile|g=s"=>\$switches{logFileName}, "help|h"=>\$switches{showhelp}, "cruft|c=s"=>\$switches{cruftDirectory}, + "screenlog|sl"=>\$switches{screenlog}, ); # check local settings doesn't interfer with reading the file; @@ -69,6 +70,9 @@ if(defined($switches{readLocalSettings}) and ($switches{readLocalSettings} eq '' $switches{readLocalSettings} = 'localSettings.yaml'; } -my $document = LatexIndent::Document->new(name=>"masterDocument",fileName=>$ARGV[0],switches=>\%switches); +# allow STDIN as input, if a filename is not present +unshift( @ARGV, '-' ) unless @ARGV; + +my $document = bless ({name=>"masterDocument",fileName=>$ARGV[0],switches=>\%switches},"LatexIndent::Document"); $document->latexindent; exit(0); -- cgit v1.2.3