Skip to content

Commit

Permalink
tex-fmt 0.4.5 (new formula)
Browse files Browse the repository at this point in the history
  • Loading branch information
ivaquero committed Oct 20, 2024
1 parent 9d1dcca commit 6d1f4a1
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions Formula/t/tex-fmt.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
class TexFmt < Formula
desc "Extremely fast LaTeX formatter written in Rust"
homepage "https://github.com/WGUNDERWOOD/tex-fmt"
url "https://github.com/WGUNDERWOOD/tex-fmt/archive/refs/tags/v0.4.5.tar.gz"
sha256 "3dde1f19e9228a2a284d73c63b193fdf775cb993945fb328cd01e3a6cc834bf1"
license "MIT"
head "https://github.com/WGUNDERWOOD/tex-fmt.git", branch: "main"

depends_on "rust" => :build

def install
system "cargo", "install", *std_cargo_args
end

test do
(testpath/"test.tex").write <<~EOS
\\documentclass{article}
\\title{tex-fmt Homebrew Test}
\\begin{document}
\\maketitle
\\begin{itemize}
\\item Hello
\\item World
\\end{itemize}
\\end{document}
EOS
assert_match <<~EOS, shell_output("#{bin}/tex-fmt #{testpath}/test.tex")
\\documentclass{article}
\\title{tex-fmt Homebrew Test}
\\begin{document}
\\maketitle
\\begin{itemize}
\\item Hello
\\item World
\\end{itemize}
\\end{document}
EOS
end
end

0 comments on commit 6d1f4a1

Please sign in to comment.