{"id":18507664,"url":"https://github.com/mihaiconstantin/difftex","last_synced_at":"2026-04-13T20:31:40.311Z","repository":{"id":39852624,"uuid":"495902828","full_name":"mihaiconstantin/difftex","owner":"mihaiconstantin","description":"A lightweight script around `latexdiff` for comparing and generating track-changes for version-controlled LaTeX documents.","archived":false,"fork":false,"pushed_at":"2023-06-11T15:29:53.000Z","size":20,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-14T09:16:50.356Z","etag":null,"topics":["academic","diff","git","latex","latexdiff","writing"],"latest_commit_sha":null,"homepage":"https://difftex.mihaiconstantin.com","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mihaiconstantin.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","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,"zenodo":null}},"created_at":"2022-05-24T16:25:51.000Z","updated_at":"2023-07-18T09:12:59.000Z","dependencies_parsed_at":"2025-05-14T09:16:50.699Z","dependency_job_id":"e8b8619e-3d6d-4a11-bd0b-ad4b4e9c7bd9","html_url":"https://github.com/mihaiconstantin/difftex","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/mihaiconstantin/difftex","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mihaiconstantin%2Fdifftex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mihaiconstantin%2Fdifftex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mihaiconstantin%2Fdifftex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mihaiconstantin%2Fdifftex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mihaiconstantin","download_url":"https://codeload.github.com/mihaiconstantin/difftex/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mihaiconstantin%2Fdifftex/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31770718,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-13T20:17:16.280Z","status":"ssl_error","status_checked_at":"2026-04-13T20:17:08.216Z","response_time":93,"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":["academic","diff","git","latex","latexdiff","writing"],"created_at":"2024-11-06T15:11:13.418Z","updated_at":"2026-04-13T20:31:40.299Z","avatar_url":"https://github.com/mihaiconstantin.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# `difftex` - compare `LaTeX` files in `git` repositories\n\n\u003cdiv align=\"center\"\u003e\n    \u003cimg alt=\"GitHub release (latest by date)\" src=\"https://img.shields.io/github/v/release/mihaiconstantin/difftex\"\u003e\n    \u003cimg alt=\"Repository Status\" src=\"https://img.shields.io/badge/repo%20status-WIP-yellow\"\u003e\n    \u003cimg alt=\"GitHub issues\" src=\"https://img.shields.io/github/issues/mihaiconstantin/difftex\"\u003e\n    \u003cimg alt=\"GitHub Repo stars\" src=\"https://img.shields.io/github/stars/mihaiconstantin/difftex?style=social\"\u003e\n\u003c/div\u003e\n\n\u003cbr\u003e\n\n`difftex` is a shell script wrapper around\n[`latexdiff`](https://ctan.org/pkg/latexdiff?lang=en) that can be used to\ncompare changes in `.tex` files between two different `git` commits (e.g., to\ncompare the changes between `HEAD~1` and `HEAD`). It shares a similar purpose as\n[`Git Latexdiff`](https://gitlab.com/git-latexdiff/git-latexdiff) but it is\nlikely narrower in scope. `difftex` is build for `macOS` and other `Unix`-based\noperating systems.\n\n## Installation\n\n`difftex` can be installed by running:\n\n```bash\ncurl https://raw.githubusercontent.com/mihaiconstantin/difftex/main/install.sh | sudo bash\n```\n\nThe command above will perform the following steps:\n\n1. Clone the `mihaiconstantin/difftex` repository into a temporary directory.\n2. Copy `difftex.sh` to `/usr/local/bin/difftex`.\n3. Adjust permissions and make `difftex` executable.\n4. Remove the temporary directory.\n\n### Uninstalling\n\nTo uninstall `difftex` simply remove the script as:\n\n```bash\nsudo rm /usr/local/bin/difftex\n```\n\n### Updating\n\nTo update `difftex` just re-run installation command above which will replace\nthe current `/usr/local/bin/difftex` with the newest one from the GitHub\nrepository.\n\n## Usage\n\nThe script takes four arguments:\n\n- `$1` **(required)**: The name of the main `.tex` file to compare between commits.\n- `$2`: The older commit or reference to a commit. The default is `HEAD~1`.\n- `$3`: The newer commit or reference to a commit. The default is `HEAD`.\n- `$4`: The path or directory name where to produce and store the output. The default is `./tmp`\n\nExample of how to use the script:\n\n```bash\ndifftex file.tex\ndifftex file.tex HEAD~1 HEAD tmp\ndifftex file.tex branch-one branch-two tmp\ndifftex file.tex tag-one tag-two tmp\n```\n\nThe annotated `.pdf` document can be found in the output folder (i.e., `./tmp`\nor the one specified).\n\n### Custom `latexdiff` options\n\nIn more advances cases, users may want to customize what kind of markup is\ngenerated. To achieve this,\n[`latexdiff`](https://ctan.org/pkg/latexdiff?lang=en) offers a wide range of\noptions (i.e., see `latexdiff --help`). To maximize compatibility across\nprojects, `difftex` runs the `latexdiff` command with more or less the default\noptions, i.e.,:\n\n```bash\nlatexdiff \\\n    --type=UNDERLINE \\\n    --append-textcmd=\"enquote\" \\\n    --allow-spaces \\\n    --math-markup=3 \\\n    --flatten \\\n\n    # Reminder of the 'latexdiff' command.\n    ...\n```\n\nIf a specific project requires running `latexdiff` with different or more\noptions, one can edit the file `/usr/local/bin/difftex` to adjust the\n`latexdiff` command call accordingly. For example, adding the following (i.e.,\nsee below) will instruct `latexdiff` to include markup for changes in the\n*Abstract* section of a manuscript.\n\n``` bash\n--append-context2cmd=\"abstract\" \\\n```\n\nIf one is interested in ignoring changes for entire environments (e.g., the\n`figure` environment), the following trick can be used (i.e., see [this\nanswer](https://tex.stackexchange.com/a/73649/134807) for more information):\n\n```bash\n--config=\"PICTUREENV=(?:picture|DIFnomarkup|figure)[\\w\\d*@]*\" \\\n```\n\nIn the example above, the addition `|figure` instructs `latexdiff` to also\nignore the `figure` environment. This trick can be further extended to an\narbitrary number of environments (e.g., `sidewaysfigure`).\n\nFor a full overview of the capabilities of `latexdiff` make sure to check the\ndocumentation by running `latexdiff --help`.\n\n*Note.* To enable changes in `.bib` files please check [this\nanswer](https://tex.stackexchange.com/a/625721/134807).\n\n## Release Notes\n\nSee the [CHANGELOG](CHANGELOG.md) file.\n\n## Contributing\n\nAny contributions, suggestions, or bug reports are welcome and greatly\nappreciated.\n\n## License\n\n`difftex` is licensed under the [MIT license](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmihaiconstantin%2Fdifftex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmihaiconstantin%2Fdifftex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmihaiconstantin%2Fdifftex/lists"}