{"id":232,"date":"2011-11-30T20:52:17","date_gmt":"2011-12-01T01:52:17","guid":{"rendered":"http:\/\/blogs.cae.tntech.edu\/mwr\/?p=232"},"modified":"2024-10-27T14:26:19","modified_gmt":"2024-10-27T14:26:19","slug":"building-a-wiley-manuscript-with-per-chapter-bibliographies","status":"publish","type":"post","link":"https:\/\/sites.tntech.edu\/renfro\/2011\/11\/30\/building-a-wiley-manuscript-with-per-chapter-bibliographies\/","title":{"rendered":"Building a Wiley Manuscript with Per-Chapter Bibliographies"},"content":{"rendered":"<p>One of Tech&#8217;s faculty and a post-doctoral research associate are working on a book for Wiley, and they want to have a list of references after each chapter, rather than one set of references for the entire book. Wiley&#8217;s LaTeX guides don&#8217;t give particularly good information on how to do this, and I never got a response back from the Wiley documentclass author on how best to handle this. So, in the interests of anyone searching for this in the future, here&#8217;s what I came up with.<\/p>\n<p>Procedure:<\/p>\n<ol>\n<li>Pick the appopriate script for your operating system. There&#8217;s one script for Windows users, and another for Unix and OS X users.<\/li>\n<li>Edit the script to match your main filename (without the .tex extension). In my example, my main file was w-bksamp-minimal.tex, so I used w-bksamp-minimal.<\/li>\n<li>Rename your chapter content so each filename starts with &#8220;chapter-&#8221; &#8212; if you don&#8217;t like that restriction, feel free to edit the script to your liking.<\/li>\n<li>Make sure you use \\include instead of \\input to add each chapter to your main .tex file. Using \\input will put multiple chapters&#8217; citations into one .aux file, and BibTeX won&#8217;t be able to tell which bibliography entries go with each chapter.<\/li>\n<li>Adjust the latex, dvips, and ps2pdf lines to match your build process. I normally don&#8217;t use dvi at all, but I didn&#8217;t want to disrupt the Wiley procedures by default.<\/li>\n<\/ol>\n<p>Windows version (attached as <a href=\"http:\/\/blogs.cae.tntech.edu\/mwr\/files\/2011\/11\/wiley-build-windows.zip\">wiley-build-windows.zip<\/a>)<\/p>\n<pre>@echo off\nrem wiley-build.cmd -- Mike Renfro &lt;renfro@tntech.edu&gt;, 2011\/11\/06\nrem\nrem Cleaner build procedure for Wiley's wileySix and wileySeven\nrem document classes that allows for per-chapter bibliographies\nrem generated with BibTeX.\n\nrem Instructions:\nrem 1. Replace w-bksamp-minimal with the filename of the main .tex file\nset mainfile=w-bksamp-minimal\nrem 2. Rename each chapter to start with chapter- (for example:\nrem\u00a0\u00a0\u00a0 chapter-1.tex, chapter-mimo.tex, etc.)\nrem 3. Make sure to use \\include for each chapter in the main .tex file,\nrem\u00a0\u00a0\u00a0 not \\input.\n\nrem Should be no need to edit anything below this line.\nlatex %mainfile%\necho ...\nfor %%c in (chapter-*.tex) do bibtex %%~nc%\necho ...\nlatex %mainfile%\nlatex %mainfile%\ndvips %mainfile%.dvi\nps2pdf %mainfile%.ps\nrem Procedure adapted from\nrem http:\/\/tex.stackexchange.com\/questions\/17474\/multiple-bibliographies<\/pre>\n<p>Unix and OS X version (attached as <a href=\"http:\/\/blogs.cae.tntech.edu\/mwr\/files\/2011\/11\/wiley-build-unix-osx.zip\">wiley-build-unix-osx.zip<\/a>)<\/p>\n<pre>#!\/bin\/sh\n\n# wiley-build.sh -- Mike Renfro &lt;renfro@tntech.edu&gt;, 2011\/11\/06\n#\n# Cleaner build procedure for Wiley's wileySix and wileySeven\n# document classes that allows for per-chapter bibliographies\n# generated with BibTeX.\n\n# Instructions:\n# 1. Replace w-bksamp-minimal with the filename of the main .tex file\nmainfile=w-bksamp-minimal\n# 2. Rename each chapter to start with chapter- (for example:\n#\u00a0\u00a0\u00a0 chapter-1.tex, chapter-mimo.tex, etc.)\n# 3. Make sure to use \\include for each chapter in the main .tex file,\n#\u00a0\u00a0\u00a0 not \\input.\n\n# Should be no need to edit anything below this line.\nlatex ${mainfile}\necho ...\nfor c in chapter-*.tex; do\n\u00a0\u00a0\u00a0 bibtex `basename ${c}`\ndone\necho ...\nlatex ${mainfile}\nlatex ${mainfile}\ndvips ${mainfile}.dvi\nps2pdf ${mainfile}.ps\n# Procedure adapted from\n# http:\/\/tex.stackexchange.com\/questions\/17474\/multiple-bibliographies<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>One of Tech&#8217;s faculty and a post-doctoral research associate are working on a book for Wiley, and they want to have a list of references after each chapter, rather than one set of references for the entire book. Wiley&#8217;s LaTeX guides don&#8217;t give particularly good information on how to do this, and I never got &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/sites.tntech.edu\/renfro\/2011\/11\/30\/building-a-wiley-manuscript-with-per-chapter-bibliographies\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Building a Wiley Manuscript with Per-Chapter Bibliographies&#8221;<\/span><\/a><\/p>\n","protected":false},"author":87,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[],"class_list":["post-232","post","type-post","status-publish","format-standard","hentry","category-latex","entry"],"_links":{"self":[{"href":"https:\/\/sites.tntech.edu\/renfro\/wp-json\/wp\/v2\/posts\/232","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sites.tntech.edu\/renfro\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sites.tntech.edu\/renfro\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sites.tntech.edu\/renfro\/wp-json\/wp\/v2\/users\/87"}],"replies":[{"embeddable":true,"href":"https:\/\/sites.tntech.edu\/renfro\/wp-json\/wp\/v2\/comments?post=232"}],"version-history":[{"count":1,"href":"https:\/\/sites.tntech.edu\/renfro\/wp-json\/wp\/v2\/posts\/232\/revisions"}],"predecessor-version":[{"id":442,"href":"https:\/\/sites.tntech.edu\/renfro\/wp-json\/wp\/v2\/posts\/232\/revisions\/442"}],"wp:attachment":[{"href":"https:\/\/sites.tntech.edu\/renfro\/wp-json\/wp\/v2\/media?parent=232"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sites.tntech.edu\/renfro\/wp-json\/wp\/v2\/categories?post=232"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sites.tntech.edu\/renfro\/wp-json\/wp\/v2\/tags?post=232"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}