{"id":20996164,"url":"https://github.com/stefan-kolb/texcop","last_synced_at":"2026-04-24T15:33:18.410Z","repository":{"id":69278881,"uuid":"130031375","full_name":"stefan-kolb/texcop","owner":"stefan-kolb","description":"CLI and static code analyzer for TeX and BibTeX files.","archived":false,"fork":false,"pushed_at":"2018-08-08T07:40:17.000Z","size":421,"stargazers_count":4,"open_issues_count":12,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-12-31T01:57:41.470Z","etag":null,"topics":["academia","best-practices","bibtex","latex","linter","static-code-analysis","style-checker","style-guide","tex","thesis"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stefan-kolb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-04-18T08:38:50.000Z","updated_at":"2022-07-28T10:33:52.000Z","dependencies_parsed_at":"2023-02-22T16:15:24.433Z","dependency_job_id":null,"html_url":"https://github.com/stefan-kolb/texcop","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/stefan-kolb/texcop","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stefan-kolb%2Ftexcop","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stefan-kolb%2Ftexcop/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stefan-kolb%2Ftexcop/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stefan-kolb%2Ftexcop/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stefan-kolb","download_url":"https://codeload.github.com/stefan-kolb/texcop/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stefan-kolb%2Ftexcop/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32228990,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-24T13:21:15.438Z","status":"ssl_error","status_checked_at":"2026-04-24T13:21:15.005Z","response_time":64,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["academia","best-practices","bibtex","latex","linter","static-code-analysis","style-checker","style-guide","tex","thesis"],"created_at":"2024-11-19T07:28:20.339Z","updated_at":"2026-04-24T15:33:18.386Z","avatar_url":"https://github.com/stefan-kolb.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TexCop [![Build Status](https://travis-ci.org/stefan-kolb/texcop.svg?branch=master)](https://travis-ci.org/stefan-kolb/texcop) \n\nCLI and static code analyzer for TeX files.\n\nTexCop provides CLI commands for the most commonly used tasks when working with [LaTeX](http://www.latex-project.org/),\ne.g., generating a `.gitignore` file, creating the final pdf and validating the `.tex` and `.bib` files.\n\n**Only** works for UTF-8 encoded `.tex` and `.bib` files.\n\n## Works best when\n\n- the citation style is numeric/alphanumeric.\n- each sentence is in its own line.\n- your texts are written in English\n- labels in tables/figures should be put right after the caption\n- does not work that well if you define a lot of custom macros for abbreviating latex commands\n- all files are in UTF-8 and use .tex file ending\n\n## Installation\n\nRequires JDK 8 with JAVA_HOME set to the JDK path!\n\n    $ git clone https://github.com/stefan-kolb/texcop.git\n    $ cd texcop\n    $ ./gradlew installDist\n    # add texcop/build/install/texcop/bin to PATH\n\n## Usage\n\n    # in your latex directory\n    $ texcop pdf # create the pdf with pdflatex and bibtex using main.tex as the starting file\n    $ texcop validate # validates all .tex and .bib files\n    $ texcop clean # remove all generated files like .div, .pdf, .log, ...\n\n## Commands\n\n\ttexcop [command]\n\t\n\t cites                        Print used cites\n\t clean                        Removes all generated files during a tex build\n\t create-gitignore             creates a latex project specific .gitignore file\n\t help                         prints usage information\n\t minify-bibtex-authors        replace three or more authors with et al. in bibtex entries\n\t minify-bibtex-optionals      removes optional keys in bibtex entries\n\t pdf                          creates pdf with pdflatex, including bibtex; logs to texcop-pdf.log\n\t pdfclean                     executes pdf and clean commands in sequence\n\t texlipse                     generates texlipse project files\n\t texniccenter                 generates the texniccenter project files\n\t validate                     executes validate-latex and validate-bibtex commands in sequence\n\t validate-acronym             detects unmarked acronyms in text\n\t validate-bibtex              validates all .bib files for the existence of certain fields\n\t validate-labels              detects unused labels\n\t validate-latex               validates .tex files\n\t validate-links               detects malformed and unreachable urls\n\t version                      prints the current version\n\n## Configuration\n\nVia `.texcop.yml`.\n\n```yaml\nCopname:\n  Enabled: false\n```\n\nVia inline comments.\n\n```\n% texcop:disable Style/AmericanEnglish, Style/KeyboardWarrior\nLorem ipsum dolor sit amet.\n% texcop:enable Style/AmericanEnglish, Style/KeyboardWarrior\n```\n\n### Automatically Generated Configuration\n\nFor the first run of texcop it is a good idea to use `texcop validate --auto-gen-config` to generate the `.texcop.yml` file including all found offenses. \nThe generated file includes configuration that disables all cops that currently detect an offense in the code. \nAfter that, you can start removing the disabled cops from the generated file one by one to work through them independently and not get overwhelmed by the amount of initial offenses.\n\n### Usage with CI\n\nRunning texcop will return a system status code different from zero if any offenses were found.\nTherefore, you can use it with a CI server like Travis or CircleCI.\nYou may use the following `build.gradle` file for now.\nThe build will fail, if there are any style violations detected.\n\n```gradle\napply plugin: 'java'\n\nbuildscript {\n    repositories {\n        jcenter()\n        maven { url 'https://jitpack.io' }\n    }\n\n    dependencies {\n        classpath 'com.github.stefan-kolb:texcop:master-SNAPSHOT'\n    }\n}\n\ntask texCop(type: JavaExec) {\n    classpath = buildscript.configurations.classpath\n    main = \"texcop.Main\"\n    args 'validate-latex'\n}\ntest.dependsOn texCop\n``` \n\n## Add your own custom cops\n    \nThe easiest way to add your own cops is to add a new RegEx cop to any YAML file, e.g., `style.yml`.\nJust add your checks for typical typos or custom validations.\n\n```yaml\nStyle/StefanKolb:\n  Message: \"Stefan Kolb's style set\"\n  Match:\n    - \"amongst\" # use among instead\n    - \"independently from\" # independently of\n    - \"faster time\" # shorter time\n    - \"(on-premise |on premise )\" # on premises\n    - \"\\\\b[aA]ll of the\\\\b\" # all the\n    - \"period of time\" # period\n    - \"\\\\bat al\\\\b\" # et al\n``` \n\n## Credits\n\nInspired by [Rubocop](https://github.com/bbatsov/rubocop). Based on [Textools](https://github.com/simonharrer/textools).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstefan-kolb%2Ftexcop","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstefan-kolb%2Ftexcop","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstefan-kolb%2Ftexcop/lists"}