= command extract_latex_abstract.rb

== Summary

(UNIX-style) command to extract the section of abstract in LaTeX.

== USAGE

  % extract_latex_abstract.rb [File|< STDIN] | detex | wc
  % extract_latex_abstract.rb [File|< STDIN] | texcount -

== DESCRIPTION

Extracts the abstract part in LaTeX sandwitched by begin and end, considering

* After and before the \\begin, \\end{abstract} on the same line
* lines with an even number of 0x5c preceded like XXend{abstract} (X = 0x5c)
* the commented-out lines ignored
* Printing to the end if no \\end{abstract} is found
  
== DISCLAIMER

The variable names are pretty cryptic...

== TESTS

  % printf "%%\\\\begin{abstract}abc\n xx \\\\begin{abstract}xyz\n234\nE-N\\\\end{abstr\n" | ruby extract_latex_abstract.rb
  xyz
  234
  E-N\end{abstr
  % printf "%%\\\\begin{abstract}abc\n xx \\\\begin{abstract}xyz\n234\nE-N\\\\end{abstract}\n" | ruby extract_latex_abstract.rb
  xyz
  234
  E-N

== Image of the code (Twitter)

[https://twitter.com/WiseBabel/status/890280430246793216]

== Copyright

Author::  Masa Sakano < info a_t wisebabel dot com >
License:: MIT.
Warranty:: No warranty.
Versions:: The versions of this package follow Semantic Versioning (2.0.0) http://semver.org/

