{"id":40,"date":"2006-06-07T10:18:05","date_gmt":"2006-06-07T15:18:05","guid":{"rendered":"https:\/\/blogs.mathworks.com\/loren\/?p=40"},"modified":"2016-11-10T20:39:50","modified_gmt":"2016-11-11T01:39:50","slug":"publishing","status":"publish","type":"post","link":"https:\/\/blogs.mathworks.com\/loren\/2006\/06\/07\/publishing\/","title":{"rendered":"Publishing"},"content":{"rendered":"<div xmlns:mwsh=\"https:\/\/www.mathworks.com\/namespace\/mcode\/v1\/syntaxhighlight.dtd\" class=\"content\">\r\n   <introduction>\r\n      <p>I thought I'd showcase the <a href=\"https:\/\/www.mathworks.com\/help\/matlab\/ref\/publish.html\"><tt>publish<\/tt><\/a> tool in MATLAB this time around. It's how both <a href=\"https:\/\/blogs.mathworks.com\/steve\/\">Steve Eddins<\/a> and I produce our blog articles most of the time.  I find it particularly handy when I use equations.\r\n      <\/p>\r\n   <\/introduction>\r\n   <h3>Contents<\/h3>\r\n   <div>\r\n      <ul>\r\n         <li><a href=\"#1\">Titles<\/a><\/li>\r\n         <li><a href=\"#2\">Marking Up Cells<\/a><\/li>\r\n         <li><a href=\"#4\">Markup Tips<\/a><\/li>\r\n         <li><a href=\"#5\">Equations<\/a><\/li>\r\n         <li><a href=\"#6\">Getting the Code<\/a><\/li>\r\n         <li><a href=\"#7\">Links<\/a><\/li>\r\n         <li><a href=\"#8\">Do You publish Results or Documents?<\/a><\/li>\r\n      <\/ul>\r\n   <\/div>\r\n   <h3>Titles<a name=\"1\"><\/a><\/h3>\r\n   <p>For the first title to appear as the document title, be sure to have no code in the first section, a practice I generally\r\n      follow.  Doing this means that all other titled cells will be named sections in the article's Contents.\r\n   <\/p>\r\n   <h3>Marking Up Cells<a name=\"2\"><\/a><\/h3>\r\n   <p>Marking up cells was a bit tricky for me at first as I got used to the formatting options.  White space is very important\r\n      for getting published document to look just right.  I have repeatedly made the mistake of not surrounding lines containing\r\n      bulleted lists with blank comment lines. These blank lines are important for preformatted text, bulleted lists, and equations.\r\n   <\/p>\r\n   <p>Each new titled cell creates a section.  For a new paragraph without a new section, omit the cell title as I have done here.<\/p>\r\n   <h3>Markup Tips<a name=\"4\"><\/a><\/h3>\r\n   <div>\r\n      <ul>\r\n         <li>Bulleted item - on separate lines, each entry starts with <tt>% *<\/tt><\/li>\r\n         <li><b>Bold text<\/b> - begins and ends with *\r\n         <\/li>\r\n         <li><i>Italic text<\/i> - begins and ends with _\r\n         <\/li>\r\n         <li><tt>Monospace text<\/tt> - begins and ends with |\r\n         <\/li>\r\n      <\/ul>\r\n   <\/div>\r\n   <p>The MATLAB documentation contains a great table for marking up text.\r\n   <\/p>\r\n   <h3>Equations<a name=\"5\"><\/a><\/h3>\r\n   <p>Math is so important to the content of work done in MATLAB that it's worth learning how to format equations using TeX.  To embed an equation into a published document, sandwich\r\n      the TeX express between $$.  Here's one of my favorite identities:\r\n   <\/p>\r\n   <p><img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"https:\/\/blogs.mathworks.com\/images\/loren\/40\/pub_eq4904.png\"> <\/p>\r\n   <p>because it contains the most interesting numbers I know, apart from <a href=\"http:\/\/www.vinc17.org\/yp17\/index.en.html\">17<\/a>.\r\n   <\/p>\r\n   <h3>Getting the Code<a name=\"6\"><\/a><\/h3>\r\n   <p>By default when publishing to html, the M-file code that generates the document is included and available, via <a href=\"https:\/\/www.mathworks.com\/help\/matlab\/ref\/grabcode.html\">grabcode<\/a>. You won't be able to get it from this post, alas, because one of the steps in getting this to the web inserts char([13 10])\r\n      for newlines instead of just char(10).\r\n   <\/p>\r\n   <h3>Links<a name=\"7\"><\/a><\/h3>\r\n   <p>You can put in links directly.<\/p>\r\n   <div>\r\n      <ul>\r\n         <li>Here's one to my blog: <a href=\"https:\/\/blogs.mathworks.com\/loren\/\">https:\/\/blogs.mathworks.com\/loren\/<\/a><\/li>\r\n         <li>This one is for this article: <a href=\"https:\/\/blogs.mathworks.com\/loren\/?p=40\">https:\/\/blogs.mathworks.com\/loren\/?p=40<\/a><\/li>\r\n         <li>And this one is so you can respond to this post: <a href=\"https:\/\/blogs.mathworks.com\/loren\/?p=40#respond\">https:\/\/blogs.mathworks.com\/loren\/?p=40\/Respond<\/a><\/li>\r\n      <\/ul>\r\n   <\/div>\r\n   <h3>Do You publish Results or Documents?<a name=\"8\"><\/a><\/h3>\r\n   <p>Do you publish reports, results, documents?  Who is your intended audience?  What has been working well for you?  And what\r\n      else would you like to see?  <a href=\"https:\/\/blogs.mathworks.com\/loren\/2006\/06\/07\/publishing\/#Respond\">Let us know!<\/a><\/p>\r\n   <p style=\"text-align: right; font-size: xx-small; font-weight:lighter;   font-style: italic; color: gray\"><br>\r\n      Published with MATLAB&reg; 7.2<br><\/p>\r\n<\/div>\r\n<!--\r\n##### SOURCE BEGIN #####\r\n%% Publishing\r\n% I thought I'd showcase the\r\n% <https:\/\/www.mathworks.com\/help\/matlab\/ref\/publish.html |publish|>\r\n% tool in MATLAB this time around. It's how both\r\n% <https:\/\/blogs.mathworks.com\/steve\/ Steve Eddins> and I produce our blog\r\n% articles most of the time.  I find it particularly handy when I use\r\n% equations. \r\n%% Titles\r\n% For the first title to appear as the document title, be sure to have no\r\n% code in the first section, a practice I generally follow.  Doing this\r\n% means that all other titled cells will be named sections in the article's\r\n% Contents.\r\n%% Marking Up Cells\r\n% Marking up cells was a bit tricky for me at first as I got used to the\r\n% formatting options.  White space is very important for getting published\r\n% document to look just right.  I have repeatedly made the mistake of not\r\n% surrounding lines containing bulleted lists with blank comment lines.\r\n% These blank lines are important for preformatted text, bulleted lists,\r\n% and equations.\r\n%%\r\n% Each new titled cell creates a section.  For a new paragraph\r\n% without a new section, omit the cell title as I have done here.\r\n%% Markup Tips\r\n% * Bulleted item - on separate lines, each entry starts with |% *|\r\n% * *Bold text* - begins and ends with *\r\n% * _Italic text_ - begins and ends with _\r\n% * |Monospace text| - begins and ends with |\r\n%\r\n% The MATLAB documentation contains a great table for \r\n% <https:\/\/www.mathworks.com\/access\/helpdesk\/help\/techdoc\/matlab_env\/noteboo5.html marking up text>.\r\n\r\n%% Equations\r\n% Math is so important to the content of work done in MATLAB that it's\r\n% worth learning how to format equations using TeX.\r\n% <https:\/\/www.mathworks.com\/access\/helpdesk\/help\/techdoc\/ref\/text_props.html#String Here>\r\n% is a table showing the collection of available mathematical symbols.  To\r\n% embed an equation into a published document, sandwich the TeX express\r\n% between $$.  Here's one of my favorite identities:\r\n%\r\n% $$e^{i \\pi} + 1 = 0$$ \r\n%\r\n% because it contains the most interesting numbers I know, apart from \r\n% <http:\/\/www.vinc17.org\/yp17\/index.en.html 17>.\r\n\r\n%% Getting the Code\r\n% By default when publishing to html, the M-file code that generates the document is\r\n% included and available, via \r\n% <https:\/\/www.mathworks.com\/help\/matlab\/ref\/grabcode.html grabcode>.  \r\n% You won't be able to get it from this post, alas, because one of the\r\n% steps in getting this to the web inserts char([13 10]) for newlines\r\n% instead of just char(10).  \r\n%% Links\r\n% You can put in links directly. \r\n%\r\n% * Here's one to my blog: https:\/\/blogs.mathworks.com\/loren\/\r\n% * This one is for this article: https:\/\/blogs.mathworks.com\/loren\/?p=40\r\n% * And this one is so you can respond to this post: https:\/\/blogs.mathworks.com\/loren\/?p=40\/Respond\r\n%\r\n%% Do You publish Results or Documents?\r\n% Do you publish reports, results, documents?  Who is your intended\r\n% audience?  What has been working well for you?  And what else would you\r\n% like to see?  <http:?p=40\/Respond Let us know!>\r\n\r\n##### SOURCE END #####\r\n-->","protected":false},"excerpt":{"rendered":"<p>\r\n   \r\n      I thought I'd showcase the publish tool in MATLAB this time around. It's how both Steve Eddins and I produce our blog articles most of the time.  I find it particularly handy when I use... <a class=\"read-more\" href=\"https:\/\/blogs.mathworks.com\/loren\/2006\/06\/07\/publishing\/\">read more >><\/a><\/p>","protected":false},"author":39,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[6,13],"tags":[],"_links":{"self":[{"href":"https:\/\/blogs.mathworks.com\/loren\/wp-json\/wp\/v2\/posts\/40"}],"collection":[{"href":"https:\/\/blogs.mathworks.com\/loren\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.mathworks.com\/loren\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/loren\/wp-json\/wp\/v2\/users\/39"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/loren\/wp-json\/wp\/v2\/comments?post=40"}],"version-history":[{"count":2,"href":"https:\/\/blogs.mathworks.com\/loren\/wp-json\/wp\/v2\/posts\/40\/revisions"}],"predecessor-version":[{"id":2112,"href":"https:\/\/blogs.mathworks.com\/loren\/wp-json\/wp\/v2\/posts\/40\/revisions\/2112"}],"wp:attachment":[{"href":"https:\/\/blogs.mathworks.com\/loren\/wp-json\/wp\/v2\/media?parent=40"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/loren\/wp-json\/wp\/v2\/categories?post=40"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/loren\/wp-json\/wp\/v2\/tags?post=40"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}