{"id":726,"date":"2015-07-27T16:54:12","date_gmt":"2015-07-27T20:54:12","guid":{"rendered":"http:\/\/josephpcohen.com\/w\/?p=726"},"modified":"2022-04-10T18:27:16","modified_gmt":"2022-04-10T22:27:16","slug":"latex-diffs-latexdiff","status":"publish","type":"post","link":"https:\/\/josephpcohen.com\/w\/latex-diffs-latexdiff\/","title":{"rendered":"LaTeX Diffs (latexdiff)"},"content":{"rendered":"<p>Creating many draft papers using the LaTeX typesetting software creates difficulty when you need to send revisions of a paper for co-authors to review. Using the latexdiff command will generate a new LaTeX document with text removed as red and text additions as blue. This command has trouble with complicated figures and tikz pictures. Over the years I have used the following command to solve some issues by ignoring various parts of a LaTeX document that cause errors.<\/p>\n<p><!--more--><\/p>\n<p>Here is the command:<\/p>\n<pre>latexdiff --config=\"PICTUREENV=(?:picture|figure|DIFnomarkup|align)[\\w\\d*@]*\" old.tex new.tex &gt; diff.tex\r\n<\/pre>\n<p>Here is an example output:<\/p>\n<p><a href=\"http:\/\/josephpcohen.com\/w\/latex-diffs-latexdiff\/screen-shot-2015-07-27-at-4-55-31-pm\/\" rel=\"attachment wp-att-730\"><img decoding=\"async\" loading=\"lazy\" width=\"1024\" height=\"671\" class=\"aligncenter size-large wp-image-730\" src=\"http:\/\/josephpcohen.com\/w\/wp-content\/uploads\/Screen-Shot-2015-07-27-at-4.55.31-PM-1024x671.png\" alt=\"Screen Shot 2015-07-27 at 4.55.31 PM\" srcset=\"https:\/\/josephpcohen.com\/w\/wp-content\/uploads\/Screen-Shot-2015-07-27-at-4.55.31-PM-1024x671.png 1024w, https:\/\/josephpcohen.com\/w\/wp-content\/uploads\/Screen-Shot-2015-07-27-at-4.55.31-PM-300x197.png 300w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"mh-excerpt\"><p>Creating many draft papers using the LaTeX typesetting software creates difficulty when you need to send revisions of a paper for co-authors to review. Using <a class=\"mh-excerpt-more\" href=\"https:\/\/josephpcohen.com\/w\/latex-diffs-latexdiff\/\" title=\"LaTeX Diffs (latexdiff)\">[&#8230;]<\/a><\/p>\n<\/div>","protected":false},"author":1,"featured_media":307,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v21.1 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>LaTeX Diffs (latexdiff) - Joseph Paul Cohen PhD<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/josephpcohen.com\/w\/latex-diffs-latexdiff\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"LaTeX Diffs (latexdiff) - Joseph Paul Cohen PhD\" \/>\n<meta property=\"og:description\" content=\"Creating many draft papers using the LaTeX typesetting software creates difficulty when you need to send revisions of a paper for co-authors to review. Using [...]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/josephpcohen.com\/w\/latex-diffs-latexdiff\/\" \/>\n<meta property=\"og:site_name\" content=\"Joseph Paul Cohen PhD\" \/>\n<meta property=\"article:published_time\" content=\"2015-07-27T20:54:12+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-04-10T22:27:16+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/josephpcohen.com\/w\/wp-content\/uploads\/2014\/05\/15122013user_logo-latex-png.png\" \/>\n\t<meta property=\"og:image:width\" content=\"365\" \/>\n\t<meta property=\"og:image:height\" content=\"382\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Joseph Paul Cohen\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Joseph Paul Cohen\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/josephpcohen.com\/w\/latex-diffs-latexdiff\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/josephpcohen.com\/w\/latex-diffs-latexdiff\/\"},\"author\":{\"name\":\"Joseph Paul Cohen\",\"@id\":\"https:\/\/josephpcohen.com\/w\/#\/schema\/person\/e25d0d5746952220f35d182ca7aa8684\"},\"headline\":\"LaTeX Diffs (latexdiff)\",\"datePublished\":\"2015-07-27T20:54:12+00:00\",\"dateModified\":\"2022-04-10T22:27:16+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/josephpcohen.com\/w\/latex-diffs-latexdiff\/\"},\"wordCount\":90,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/josephpcohen.com\/w\/#\/schema\/person\/e25d0d5746952220f35d182ca7aa8684\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/josephpcohen.com\/w\/latex-diffs-latexdiff\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/josephpcohen.com\/w\/latex-diffs-latexdiff\/\",\"url\":\"https:\/\/josephpcohen.com\/w\/latex-diffs-latexdiff\/\",\"name\":\"LaTeX Diffs (latexdiff) - Joseph Paul Cohen PhD\",\"isPartOf\":{\"@id\":\"https:\/\/josephpcohen.com\/w\/#website\"},\"datePublished\":\"2015-07-27T20:54:12+00:00\",\"dateModified\":\"2022-04-10T22:27:16+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/josephpcohen.com\/w\/latex-diffs-latexdiff\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/josephpcohen.com\/w\/latex-diffs-latexdiff\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/josephpcohen.com\/w\/latex-diffs-latexdiff\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/josephpcohen.com\/w\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"LaTeX Diffs (latexdiff)\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/josephpcohen.com\/w\/#website\",\"url\":\"https:\/\/josephpcohen.com\/w\/\",\"name\":\"Joseph Paul Cohen PhD\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/josephpcohen.com\/w\/#\/schema\/person\/e25d0d5746952220f35d182ca7aa8684\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/josephpcohen.com\/w\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/josephpcohen.com\/w\/#\/schema\/person\/e25d0d5746952220f35d182ca7aa8684\",\"name\":\"Joseph Paul Cohen\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/josephpcohen.com\/w\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/a810b57939e75247f570c9094e7bd16e?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/a810b57939e75247f570c9094e7bd16e?s=96&d=mm&r=g\",\"caption\":\"Joseph Paul Cohen\"},\"logo\":{\"@id\":\"https:\/\/josephpcohen.com\/w\/#\/schema\/person\/image\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"LaTeX Diffs (latexdiff) - Joseph Paul Cohen PhD","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/josephpcohen.com\/w\/latex-diffs-latexdiff\/","og_locale":"en_US","og_type":"article","og_title":"LaTeX Diffs (latexdiff) - Joseph Paul Cohen PhD","og_description":"Creating many draft papers using the LaTeX typesetting software creates difficulty when you need to send revisions of a paper for co-authors to review. Using [...]","og_url":"https:\/\/josephpcohen.com\/w\/latex-diffs-latexdiff\/","og_site_name":"Joseph Paul Cohen PhD","article_published_time":"2015-07-27T20:54:12+00:00","article_modified_time":"2022-04-10T22:27:16+00:00","og_image":[{"width":365,"height":382,"url":"https:\/\/josephpcohen.com\/w\/wp-content\/uploads\/2014\/05\/15122013user_logo-latex-png.png","type":"image\/png"}],"author":"Joseph Paul Cohen","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Joseph Paul Cohen","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/josephpcohen.com\/w\/latex-diffs-latexdiff\/#article","isPartOf":{"@id":"https:\/\/josephpcohen.com\/w\/latex-diffs-latexdiff\/"},"author":{"name":"Joseph Paul Cohen","@id":"https:\/\/josephpcohen.com\/w\/#\/schema\/person\/e25d0d5746952220f35d182ca7aa8684"},"headline":"LaTeX Diffs (latexdiff)","datePublished":"2015-07-27T20:54:12+00:00","dateModified":"2022-04-10T22:27:16+00:00","mainEntityOfPage":{"@id":"https:\/\/josephpcohen.com\/w\/latex-diffs-latexdiff\/"},"wordCount":90,"commentCount":0,"publisher":{"@id":"https:\/\/josephpcohen.com\/w\/#\/schema\/person\/e25d0d5746952220f35d182ca7aa8684"},"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/josephpcohen.com\/w\/latex-diffs-latexdiff\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/josephpcohen.com\/w\/latex-diffs-latexdiff\/","url":"https:\/\/josephpcohen.com\/w\/latex-diffs-latexdiff\/","name":"LaTeX Diffs (latexdiff) - Joseph Paul Cohen PhD","isPartOf":{"@id":"https:\/\/josephpcohen.com\/w\/#website"},"datePublished":"2015-07-27T20:54:12+00:00","dateModified":"2022-04-10T22:27:16+00:00","breadcrumb":{"@id":"https:\/\/josephpcohen.com\/w\/latex-diffs-latexdiff\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/josephpcohen.com\/w\/latex-diffs-latexdiff\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/josephpcohen.com\/w\/latex-diffs-latexdiff\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/josephpcohen.com\/w\/"},{"@type":"ListItem","position":2,"name":"LaTeX Diffs (latexdiff)"}]},{"@type":"WebSite","@id":"https:\/\/josephpcohen.com\/w\/#website","url":"https:\/\/josephpcohen.com\/w\/","name":"Joseph Paul Cohen PhD","description":"","publisher":{"@id":"https:\/\/josephpcohen.com\/w\/#\/schema\/person\/e25d0d5746952220f35d182ca7aa8684"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/josephpcohen.com\/w\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/josephpcohen.com\/w\/#\/schema\/person\/e25d0d5746952220f35d182ca7aa8684","name":"Joseph Paul Cohen","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/josephpcohen.com\/w\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/a810b57939e75247f570c9094e7bd16e?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/a810b57939e75247f570c9094e7bd16e?s=96&d=mm&r=g","caption":"Joseph Paul Cohen"},"logo":{"@id":"https:\/\/josephpcohen.com\/w\/#\/schema\/person\/image\/"}}]}},"_links":{"self":[{"href":"https:\/\/josephpcohen.com\/w\/wp-json\/wp\/v2\/posts\/726"}],"collection":[{"href":"https:\/\/josephpcohen.com\/w\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/josephpcohen.com\/w\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/josephpcohen.com\/w\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/josephpcohen.com\/w\/wp-json\/wp\/v2\/comments?post=726"}],"version-history":[{"count":5,"href":"https:\/\/josephpcohen.com\/w\/wp-json\/wp\/v2\/posts\/726\/revisions"}],"predecessor-version":[{"id":1664,"href":"https:\/\/josephpcohen.com\/w\/wp-json\/wp\/v2\/posts\/726\/revisions\/1664"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/josephpcohen.com\/w\/wp-json\/wp\/v2\/media\/307"}],"wp:attachment":[{"href":"https:\/\/josephpcohen.com\/w\/wp-json\/wp\/v2\/media?parent=726"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/josephpcohen.com\/w\/wp-json\/wp\/v2\/categories?post=726"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/josephpcohen.com\/w\/wp-json\/wp\/v2\/tags?post=726"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}