{"id":4620,"date":"2015-07-03T23:33:25","date_gmt":"2015-07-03T15:33:25","guid":{"rendered":"http:\/\/lttt.blog.ustc.edu.cn\/?p=4620"},"modified":"2015-07-03T23:33:25","modified_gmt":"2015-07-03T15:33:25","slug":"%e6%89%8b%e5%8a%a8%e6%b7%bb%e5%8a%a0djvu%e7%94%b5%e5%ad%90%e6%96%87%e6%a1%a3%e7%9a%84%e4%b9%a6%e7%ad%be","status":"publish","type":"post","link":"https:\/\/lttt.vanabel.cn\/?p=4620","title":{"rendered":"\u624b\u52a8\u6dfb\u52a0djvu\u7535\u5b50\u6587\u6863\u7684\u4e66\u7b7e"},"content":{"rendered":"<p>\u8fd9\u91cc\u5c06\u4ecb\u7ecd\u5982\u4f55\u5feb\u901f\u7684\u624b\u52a8\u6dfb\u52a0djvu\u7535\u5b50\u4e66\u7684\u4e66\u7b7e.<\/p>\n<ul>\n<li>\u51c6\u5907\u4e66\u7b7e\u6570\u636e\uff1a\u5229\u7528djvulibre\u53ef\u4ee5\u5f88\u65b9\u4fbf\u7684\u5bfc\u51fa\u76ee\u5f55\u9875\u4e3apdf\uff0c \u5229\u7528Acobat Adobe\u6587\u5b57\u8bc6\u522b\u53ef\u4ee5\u5f88\u65b9\u4fbf\u7684\u5f97\u5230\u76ee\u5f55\uff0c \u4f46\u662f\u683c\u5f0f\u4e0d\u592a\u6807\u51c6. \u6211\u4eec\u53ef\u4ee5\u5229\u7528mma\u7684\u66ff\u6362\u529f\u80fd\u6807\u51c6\u5316\u76ee\u5f55\uff0c \u5176\u4ee3\u7801\u5982\u4e0b\uff1a\n<pre class=\"lang:default decode:true\">(*\u975e\u76ee\u5f55\u9879*)\n$precontent=\"Geometric Measure Theory ---- An Introduction.....1\nSeries Preface.......3\nIntroduction.......5\nAcknowledgements.......9\nContents.......11\";\n$firstpagenumber=13;\n(*pdf\u5bfc\u51fa\u7684\u76ee\u5f55*)\n$contentsall=\"\u4ecepdf\u6587\u4ef6\u628a\u76ee\u5f55\u5185\u5bb9\u590d\u5236\u7c98\u8d34\u8fdb\u6765\";\n(*\u5904\u7406\u975e\u6807\u51c6\u76ee\u5f55\uff0c \u6211\u5b9a\u4e49\u4e86\u4e00\u4e9b\u89c4\u5219\uff0c \u4f60\u53ef\u4ee5\u81ea\u5df1\u6dfb\u52a0*)\nsametostop[ini_?StringQ,beg_?StringQ,end_?StringQ]:=Module[{i=1,tini=ini,tbeg=beg,tend=end,temp},\nWhile[\ntbeg!=tend&amp;&amp; i&lt;= 100,\ntemp=StringReplace[tbeg,RegularExpression[\"[\\\"\\[Bullet]]\"]-&gt;\".\"];\ntemp=StringReplace[temp,RegularExpression[\"[\\r\\n]\\\\.\\\\s*\\\\.\"]-&gt;\".\"];\ntemp=StringReplace[temp,RegularExpression[\"[a-zA-Z]+\\\\s*[\\r\\n][a-zA-Z]+\"]-&gt;\".\"];\ntemp=StringReplace[temp,\"\\[CenterDot]\"-&gt;\".\"];\ntemp=StringReplace[temp,\"..\"-&gt; \". . \"];\ntemp=StringReplace[temp,RegularExpression[\"(\\\\d\\\\.)\\\\s+(\\\\d)\"]-&gt;\"$1\"~~\"$2\"];\ni++;\ntend=tbeg;\ntbeg=temp;\n]\ntend]\n(*\u8f93\u51fa\u4e3a\u6807\u51c6\u7684djvu\u80fd\u591f\u8bc6\u522b\u7684\u683c\u5f0f*)\nreformart[sec_?StringQ, con_?StringQ, pgnum_?StringQ] := \n Module[{len = Length[StringCases[sec, \".\"]], pref = \"(\", suff = \")\", \n   midd = \" \\\"\" ~~ sec ~~ \" \" ~~ con ~~ \"\\\" \\\"#\" ~~ pgnum ~~ \"\\\"\"},\n  Switch[len,\n   0, pref ~~ midd ~~ suff,\n   1, pref ~~ midd ~~ suff,\n   2, pref ~~ midd ~~ suff,\n   3, pref ~~ midd ~~ suff\n   ]\n  ]\n(*\u6700\u7ec8\u7684\u76ee\u5f55\u6570\u636e\uff0c \u53ef\u4ee5\u76f4\u63a5\u88abdjvused\u5904\u7406*)\n$sectionprecontent=StringCases[$precontent,RegularExpression[\"([a-zA-Z]+)\\\\.+(\\\\d+)\"]:&gt;  reformart[\"\",\"$1\",ToString[ToExpression[\"$2\"]]]]\/\/ColumnForm\n$contentsall=sametostop[$contentsall,$contentsall,\"\"]\/\/ToString;\n$sectionlist=StringCases[\n$contentsall,RegularExpression[\"(.*?)((\\\\.\\\\s*){2,})(\\\\d+)[\\\\r\\\\n]*?\"]:&gt;  reformart[\"\",\"$1\",ToString[ToExpression[\"$4\"]+$firstpagenumber-1]]];\nList[\"(bookmarks\",$sectionprecontent,$sectionlist,\")\"]\/\/Flatten\/\/ColumnForm<\/pre>\n<\/li>\n<li>\u6dfb\u52a0djvused\u7684\u8def\u5f84\u5230\u7cfb\u7edf\uff0c \u9996\u5148\u641c\u7d22djvulibre\u5b89\u88c5\u8def\u5f84\u4e0bdjvuused\u7684\u8def\u5f84\uff0c \u7136\u540e\u91c7\u7528\u7c7b\u4f3c\u547d\u4ee4\u6dfb\u52a0\u5230\u7cfb\u7edf\u8def\u5f84\uff1a<code>path C:\\Program Files (x86)\\DjVuLibre;%path%<\/code><\/li>\n<li>\u5229\u7528djvused\u5199\u5165\u6570\u636e\u5230\u6587\u4ef6\uff1a<code>djvused linyang.djvu -v -e \"set-outline linyang.dsed\" -s<\/code><br \/>\n\u8fd9\u91cc\uff0c linyang.djvu\u662fdjvu\u6587\u4ef6\uff0c \u800c\u4e0a\u9762\u901a\u8fc7mma\u5f97\u5230\u7684\u6570\u636e\u4fdd\u5b58\u5728linyang.dsed\u6587\u672c\u6587\u6863\u4e2d\uff0c \u6211\u91c7\u7528\u7684\u662futf8\u683c\u5f0f.<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>\u8fd9\u91cc\u5c06\u4ecb\u7ecd\u5982\u4f55\u5feb\u901f\u7684\u624b\u52a8\u6dfb\u52a0djvu\u7535\u5b50\u4e66\u7684\u4e66\u7b7e. \u51c6\u5907\u4e66\u7b7e\u6570\u636e\uff1a\u5229\u7528djvul &hellip;<\/p>\n<p class=\"read-more\"> <a class=\"more-link\" href=\"https:\/\/lttt.vanabel.cn\/?p=4620\"> <span class=\"screen-reader-text\">\u624b\u52a8\u6dfb\u52a0djvu\u7535\u5b50\u6587\u6863\u7684\u4e66\u7b7e<\/span> \u9605\u8bfb\u66f4\u591a &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[359,360,144],"class_list":["post-4620","post","type-post","status-publish","format-standard","hentry","category-net","tag-djvu","tag-djvused","tag-144"],"_links":{"self":[{"href":"https:\/\/lttt.vanabel.cn\/index.php?rest_route=\/wp\/v2\/posts\/4620","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lttt.vanabel.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lttt.vanabel.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lttt.vanabel.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lttt.vanabel.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4620"}],"version-history":[{"count":0,"href":"https:\/\/lttt.vanabel.cn\/index.php?rest_route=\/wp\/v2\/posts\/4620\/revisions"}],"wp:attachment":[{"href":"https:\/\/lttt.vanabel.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4620"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lttt.vanabel.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4620"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lttt.vanabel.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4620"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}