Skip to main content

python cli program to convert latex input to CNF (conjunctive normal form).

Project description

██╗      █████╗ ████████╗███████╗██╗  ██╗████████╗ ██████╗  ██████╗███╗   ██╗███████╗
██║     ██╔══██╗╚══██╔══╝██╔════╝╚██╗██╔╝╚══██╔══╝██╔═══██╗██╔════╝████╗  ██║██╔════╝
██║     ███████║   ██║   █████╗   ╚███╔╝    ██║   ██║   ██║██║     ██╔██╗ ██║█████╗  
██║     ██╔══██║   ██║   ██╔══╝   ██╔██╗    ██║   ██║   ██║██║     ██║╚██╗██║██╔══╝  
███████╗██║  ██║   ██║   ███████╗██╔╝ ██╗   ██║   ╚██████╔╝╚██████╗██║ ╚████║██║     
╚══════╝╚═╝  ╚═╝   ╚═╝   ╚══════╝╚═╝  ╚═╝   ╚═╝    ╚═════╝  ╚═════╝╚═╝  ╚═══╝╚═╝     

python cli to convert latex input to CNF(Conjunctive Normal Form).

PyPI License: MIT

Installation

pip install this repo.

pip3 install LatexToCNF

Usage example

To get help with commandline arguments

LatexToCNF --help

Using Command-line Arguments

LatexToCNF -f "/path/to/folder/myinput.tex"
(or)
LatexToCNF -f "/path/to/folder/myinput.txt"

(or)

LatexToCNf --filepath "/path/to/folder/myinput.tex"
(or)
LatexToCNF --filepath "/path/to/folder/myinput.txt"

Sample input file

myinput.tex

\neg \neg p
\neg p \wedge q \rightarrow p \wedge (r \rightarrow q)
r \rightarrow (s \rightarrow (t \wedge s \rightarrow r))

myinput.text

\neg \neg p
\neg p \wedge q \rightarrow p \wedge (r \rightarrow q)
r \rightarrow (s \rightarrow (t \wedge s \rightarrow r))

output

line-1: p
line-2: (((p \vee (\neg q)) \vee p) \wedge ((p \vee (\neg q)) \vee ((\neg r) \vee q)))
line-3: ((\neg r) \vee ((\neg s) \vee (((\neg t) \vee (\neg s)) \vee r)))

Meta

Azgmohammadd – azgmohammadd@gmail.com

Distributed under the MIT license. See LICENSE for more information.

https://github.com/azgmohammadd

Contributing

  1. Fork it (https://github.com/azgmohammadd/azgmohammadd/fork)
  2. Create your feature branch (git checkout -b feature/fooBar)
  3. Commit your changes (git commit -am 'Add some fooBar')
  4. Push to the branch (git push origin feature/fooBar)
  5. Create a new Pull Request

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

LatexToCNF-0.1.4.tar.gz (6.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

LatexToCNF-0.1.4-py3-none-any.whl (7.9 kB view details)

Uploaded Python 3

File details

Details for the file LatexToCNF-0.1.4.tar.gz.

File metadata

  • Download URL: LatexToCNF-0.1.4.tar.gz
  • Upload date:
  • Size: 6.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.12

File hashes

Hashes for LatexToCNF-0.1.4.tar.gz
Algorithm Hash digest
SHA256 a93c2a4ac6ec67c5b5355271229bd491f3cbcb64482e04c22775727afc4e40ac
MD5 2c4a943c51e5252c82bb1ffbceb7eaf2
BLAKE2b-256 eb5fb9a3ded8ad38e2fb2cc3918e35849492901f660a9d903b503313309908cb

See more details on using hashes here.

File details

Details for the file LatexToCNF-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: LatexToCNF-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 7.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.12

File hashes

Hashes for LatexToCNF-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 46dc4072e00afb4484dc4a298c45bf1f8b895636de232a9b254664cb32b36e20
MD5 5c51de423f5eeb0dbc74eeb296f5899f
BLAKE2b-256 b318f2bed3fe304d6cf139570ccac815055e2a61983089d7c4a5f851e8bccd28

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page