{"id":54,"date":"2008-12-27T18:25:55","date_gmt":"2008-12-27T18:25:55","guid":{"rendered":"https:\/\/chroot-me.in\/newblog\/2008\/12\/54\/"},"modified":"2014-01-30T02:46:52","modified_gmt":"2014-01-30T01:46:52","slug":"mac-os-x-and-latex","status":"publish","type":"post","link":"https:\/\/chroot-me.in\/blog\/2008\/12\/mac-os-x-and-latex\/","title":{"rendered":"Mac OS X and LaTeX"},"content":{"rendered":"<p>Since I use Apple Mac OS X on my Macbook laptop, I often have to deal with its weaknesses. Someone may rather say &lsquo;differences&rsquo;, but since today I lost almost one hour for eventually finding a simple workaround, I would rather stick with \u00ab\u00a0weaknesses\u00a0\u00bb&#8230;<\/p>\n<p>I used to believe that OS X fully supports UTF-8. In fact, it&rsquo;s a slightly different version from Apple, and almost invisible for an everyday use. Even for using LaTeX with french accentuated characters, since <strong>pdflatex<\/strong> can handle them. But if you usually declare <tt>\\usepackage[utf8]{inputenc}<\/tt>, which is the classic charset declaration in a LaTeX document, this will success if working with a single file, but <strong>will fail<\/strong> if using file inclusion! Thus, it is not the classic error claiming a missing <strong>latex-ucs<\/strong> package.<\/p>\n<p>Indeed, even if I had already written some documents with LaTeX on OS X, I never used the <strong>\\input<\/strong> command until today. This allows to fragment your LaTeX document in several files for a more convenient writing.<\/p>\n<p>Except that pdflatex will fail with this error message :<\/p>\n<div class=\"cmd\">\n<pre>! Package inputenc Error: Unicode char \\u8: not set up for use with LaTeX<\/pre>\n<\/div>\n<p>And the faulty line was always the first line of the .tex included, despite any correction attempt.<\/p>\n<p>After a long search, I have found that you have to explicitly use Apple&rsquo;s UTF-8 with <tt>\\usepackage[utf8<strong>x<\/strong>]{inputenc}<\/tt>.<\/p>\n<p>And <em>voil\u00e0<\/em>, pdflatex does not complain anymore&#8230;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Since I use Apple Mac OS X on my Macbook laptop, I often have to deal with its weaknesses. Someone may rather say &lsquo;differences&rsquo;, but since today I lost almost one hour for eventually finding a simple workaround, I would rather stick with \u00ab\u00a0weaknesses\u00a0\u00bb&#8230; I used to believe that OS X fully supports UTF-8. In &hellip; <a href=\"https:\/\/chroot-me.in\/blog\/2008\/12\/mac-os-x-and-latex\/\" class=\"more-link\">Continuer la lecture<span class=\"screen-reader-text\"> de &laquo;&nbsp;Mac OS X and LaTeX&nbsp;&raquo;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7,4,2],"tags":[],"class_list":["post-54","post","type-post","status-publish","format-standard","hentry","category-english","category-geek","category-hacks"],"_links":{"self":[{"href":"https:\/\/chroot-me.in\/blog\/wp-json\/wp\/v2\/posts\/54","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/chroot-me.in\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/chroot-me.in\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/chroot-me.in\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/chroot-me.in\/blog\/wp-json\/wp\/v2\/comments?post=54"}],"version-history":[{"count":0,"href":"https:\/\/chroot-me.in\/blog\/wp-json\/wp\/v2\/posts\/54\/revisions"}],"wp:attachment":[{"href":"https:\/\/chroot-me.in\/blog\/wp-json\/wp\/v2\/media?parent=54"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/chroot-me.in\/blog\/wp-json\/wp\/v2\/categories?post=54"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/chroot-me.in\/blog\/wp-json\/wp\/v2\/tags?post=54"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}