{"id":98,"date":"2014-03-13T15:40:57","date_gmt":"2014-03-13T15:40:57","guid":{"rendered":"https:\/\/openbook.ums.edu.my\/userguide\/chapter\/fix-common-formatting-problems\/"},"modified":"2024-09-19T04:19:25","modified_gmt":"2024-09-19T04:19:25","slug":"fix-common-formatting-problems","status":"publish","type":"chapter","link":"https:\/\/openbook.ums.edu.my\/userguide\/chapter\/fix-common-formatting-problems\/","title":{"raw":"Fix Common Formatting Problems","rendered":"Fix Common Formatting Problems"},"content":{"raw":"In providing support to Pressbooks users over the past several years, we've seen several formatting problems pop up repeatedly, frustring authors who just want their webbooks and export files to look \"normal\". Very often, these problems are due to \"bad\" styling markup that has crept into the editing interface, often imported from MS Word.\n<h1>Remove Unwanted Span Elements<\/h1>\nContent imported into Pressbooks from external sources (like Microsoft Word) often includes extra markup or inline styles that might have been useful in the original context but which will produces unwanted styling in Pressbooks; for instance, changing the size or even color of certain text. Often this bad markup comes in the form of <code>&lt;span&gt;<\/code> tags. If you see strange behavior in your webbook or export files, we recommend reviewing the underlying HTML with the text editor to find and remove examples that look like this:\n<div class=\"textbox\"><code>&lt;span style=\"font-size:\u00a0something; color: something else\"&gt;<\/code><\/div>\nAny unwanted span tags and inline style declarations should be deleted (along with the closing <code>&lt;\/span&gt;<\/code> tag) unless you are sure you know what it is for and want it to be displayed in your book.\n<h1>Heading Styles<\/h1>\nMake sure that any headings you want to include in chapters are tagged correctly using <code>&lt;h1&gt;<\/code> or <code>&lt;h2&gt;\u00a0<\/code>or <code>&lt;h3&gt;<\/code> tags, not <code>&lt;strong&gt;<\/code> or <code>&lt;b&gt;<\/code> tags. Headings should be nested as subsections to reflect the organization of the content of the page.\n\nGood:\n<div class=\"textbox\">\n<h3>The Background<\/h3>\nA long, <em>long<\/em> time ago, in a galaxy far, far away, there lived a fine young man <strong>unaware<\/strong> of various things about his past, including: the Force, what his father was up to, how to use a lightsaber. All that, however, was about to change. Three things were about to happen: he would discover the Force, he would learn how to use a lightsaber, and he would meet his father.\n<h3>The Update<\/h3>\nLong after this fellow lived, a famous movie was made about his life. The movie was shot in Tunisia.\n\n<\/div>\nBad:\n<div class=\"textbox\"><strong>The Background<\/strong>\nA long, <em>long<\/em> time ago, in a galaxy far, far away, there lived a fine young man <strong>unaware<\/strong> of various things about his past, including: the Force, what his father was up to, how to use a lightsaber. All that, however, was about to change. Three things were about to happen: he would discover the Force, he would learn how to use a lightsaber, and he would meet his father.\n<strong>The Update<\/strong>\nLong after this fellow lived, a famous movie was made about his life. The movie was shot in Tunisia.<\/div>\n<h1>Blockquotes \u00a0(and &lt;cite&gt;)<\/h1>\nThings like letters, poems, long quotations should be wrapped in <code>&lt;blockquote&gt;text text&lt;\/blockquote&gt;<\/code>.\n<div class=\"textbox\"><code>&lt;blockquote&gt;Visionary feminism is a wise and loving politics. It is rooted in the love of male and female being, refusing to privilege one over the other. The soul of feminist politics is the commitment to ending patriarchal domination of women and men, girls and boys. Love cannot exist in any relationship that is based on domination and coercion.&lt;\/blockquote&gt;<\/code><\/div>\nThis will give you something like:\n<div class=\"textbox\">\n<blockquote>Visionary feminism is a wise and loving politics. It is rooted in the love of male and female being, refusing to privilege one over the other. The soul of feminist politics is the commitment to ending patriarchal domination of women and men, girls and boys. Love cannot exist in any relationship that is based on domination and coercion.[footnote]From bell hooks' <em>The Will to Change: Men, Masculinity and Love<\/em>[\/footnote]<\/blockquote>\n<\/div>\n<h1>Non-indented Paragraphs<\/h1>\nPressbooks will automatically indent paragraphs correctly, and NOT indent them correctly as well (for instance, after Chapter Titles, and headings throughout a chapter). Sometimes you want to explicitly specify that certain paragraphs should not be indented, as in the example below:\n<div class=\"textbox\"><code>&lt;p class=\"no-indent\"&gt;Hamlet. But what is your affair in Elsinore? ...&lt;\/p&gt;\n&lt;p class=\"no-indent\"&gt;Horatio. My lord, I came to see your father's funeral.&lt;\/p&gt;\n&lt;p class=\"no-indent\"&gt;Hamlet. I pray thee, do not mock me, fellow-student;\nI think it was to see my mother's wedding.&lt;\/p&gt;<\/code><\/div>\nYou can do the above in the VISUAL editor by selecting the paragraphs you want not indented, then selecting <strong>No Indent <\/strong>from the 'Formats' dropdown.\n<img class=\"alignnone size-full wp-image-323\" src=\"https:\/\/pressbooks.pub\/app\/uploads\/sites\/4748\/2016\/09\/Screenshot-from-2021-10-13-17-24-06.png\" alt=\"\" width=\"222\" height=\"228\">\n<h1>Lists (Bulleted and Numbered)<\/h1>\nMake sure lists are proper lists, so ...\n<h3>Bullet\/Unordered Lists<\/h3>\n<div class=\"textbox\"><code>&lt;ul&gt;\n&lt;li&gt;item 1&lt;\/li&gt;\n&lt;li&gt;item 2&lt;\/li&gt;\n&lt;\/ul&gt;<\/code><\/div>\nWhich will give you:\n<div class=\"textbox\">\n<ul>\n \t<li>item 1<\/li>\n \t<li>item 2<\/li>\n<\/ul>\n<\/div>\n<h3>Numbered\/Ordered Lists<\/h3>\n<div class=\"textbox\"><code>&lt;ol&gt;\n&lt;li&gt;item 1&lt;\/li&gt;\n&lt;li&gt;item 2&lt;\/li&gt;\n&lt;\/ol&gt;<\/code><\/div>\nWhich will give you:\n<div class=\"textbox\">\n<ol>\n \t<li>item 1<\/li>\n \t<li>item 2<\/li>\n<\/ol>\n<\/div>","rendered":"<p>In providing support to Pressbooks users over the past several years, we&#8217;ve seen several formatting problems pop up repeatedly, frustring authors who just want their webbooks and export files to look &#8220;normal&#8221;. Very often, these problems are due to &#8220;bad&#8221; styling markup that has crept into the editing interface, often imported from MS Word.<\/p>\n<h1>Remove Unwanted Span Elements<\/h1>\n<p>Content imported into Pressbooks from external sources (like Microsoft Word) often includes extra markup or inline styles that might have been useful in the original context but which will produces unwanted styling in Pressbooks; for instance, changing the size or even color of certain text. Often this bad markup comes in the form of <code>&lt;span&gt;<\/code> tags. If you see strange behavior in your webbook or export files, we recommend reviewing the underlying HTML with the text editor to find and remove examples that look like this:<\/p>\n<div class=\"textbox\"><code>&lt;span style=\"font-size:\u00a0something; color: something else\"&gt;<\/code><\/div>\n<p>Any unwanted span tags and inline style declarations should be deleted (along with the closing <code>&lt;\/span&gt;<\/code> tag) unless you are sure you know what it is for and want it to be displayed in your book.<\/p>\n<h1>Heading Styles<\/h1>\n<p>Make sure that any headings you want to include in chapters are tagged correctly using <code>&lt;h1&gt;<\/code> or <code>&lt;h2&gt;\u00a0<\/code>or <code>&lt;h3&gt;<\/code> tags, not <code>&lt;strong&gt;<\/code> or <code>&lt;b&gt;<\/code> tags. Headings should be nested as subsections to reflect the organization of the content of the page.<\/p>\n<p>Good:<\/p>\n<div class=\"textbox\">\n<h3>The Background<\/h3>\n<p>A long, <em>long<\/em> time ago, in a galaxy far, far away, there lived a fine young man <strong>unaware<\/strong> of various things about his past, including: the Force, what his father was up to, how to use a lightsaber. All that, however, was about to change. Three things were about to happen: he would discover the Force, he would learn how to use a lightsaber, and he would meet his father.<\/p>\n<h3>The Update<\/h3>\n<p>Long after this fellow lived, a famous movie was made about his life. The movie was shot in Tunisia.<\/p>\n<\/div>\n<p>Bad:<\/p>\n<div class=\"textbox\"><strong>The Background<\/strong><br \/>\nA long, <em>long<\/em> time ago, in a galaxy far, far away, there lived a fine young man <strong>unaware<\/strong> of various things about his past, including: the Force, what his father was up to, how to use a lightsaber. All that, however, was about to change. Three things were about to happen: he would discover the Force, he would learn how to use a lightsaber, and he would meet his father.<br \/>\n<strong>The Update<\/strong><br \/>\nLong after this fellow lived, a famous movie was made about his life. The movie was shot in Tunisia.<\/div>\n<h1>Blockquotes \u00a0(and &lt;cite&gt;)<\/h1>\n<p>Things like letters, poems, long quotations should be wrapped in <code>&lt;blockquote&gt;text text&lt;\/blockquote&gt;<\/code>.<\/p>\n<div class=\"textbox\"><code>&lt;blockquote&gt;Visionary feminism is a wise and loving politics. It is rooted in the love of male and female being, refusing to privilege one over the other. The soul of feminist politics is the commitment to ending patriarchal domination of women and men, girls and boys. Love cannot exist in any relationship that is based on domination and coercion.&lt;\/blockquote&gt;<\/code><\/div>\n<p>This will give you something like:<\/p>\n<div class=\"textbox\">\n<blockquote><p>Visionary feminism is a wise and loving politics. It is rooted in the love of male and female being, refusing to privilege one over the other. The soul of feminist politics is the commitment to ending patriarchal domination of women and men, girls and boys. Love cannot exist in any relationship that is based on domination and coercion.<a class=\"footnote\" title=\"From bell hooks' The Will to Change: Men, Masculinity and Love\" id=\"return-footnote-98-1\" href=\"#footnote-98-1\" aria-label=\"Footnote 1\"><sup class=\"footnote\">[1]<\/sup><\/a><\/p><\/blockquote>\n<\/div>\n<h1>Non-indented Paragraphs<\/h1>\n<p>Pressbooks will automatically indent paragraphs correctly, and NOT indent them correctly as well (for instance, after Chapter Titles, and headings throughout a chapter). Sometimes you want to explicitly specify that certain paragraphs should not be indented, as in the example below:<\/p>\n<div class=\"textbox\"><code>&lt;p class=\"no-indent\"&gt;Hamlet. But what is your affair in Elsinore? ...&lt;\/p&gt;<br \/>\n&lt;p class=\"no-indent\"&gt;Horatio. My lord, I came to see your father's funeral.&lt;\/p&gt;<br \/>\n&lt;p class=\"no-indent\"&gt;Hamlet. I pray thee, do not mock me, fellow-student;<br \/>\nI think it was to see my mother's wedding.&lt;\/p&gt;<\/code><\/div>\n<p>You can do the above in the VISUAL editor by selecting the paragraphs you want not indented, then selecting <strong>No Indent <\/strong>from the &#8216;Formats&#8217; dropdown.<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-323\" src=\"https:\/\/pressbooks.pub\/app\/uploads\/sites\/4748\/2016\/09\/Screenshot-from-2021-10-13-17-24-06.png\" alt=\"\" width=\"222\" height=\"228\" \/><\/p>\n<h1>Lists (Bulleted and Numbered)<\/h1>\n<p>Make sure lists are proper lists, so &#8230;<\/p>\n<h3>Bullet\/Unordered Lists<\/h3>\n<div class=\"textbox\"><code>&lt;ul&gt;<br \/>\n&lt;li&gt;item 1&lt;\/li&gt;<br \/>\n&lt;li&gt;item 2&lt;\/li&gt;<br \/>\n&lt;\/ul&gt;<\/code><\/div>\n<p>Which will give you:<\/p>\n<div class=\"textbox\">\n<ul>\n<li>item 1<\/li>\n<li>item 2<\/li>\n<\/ul>\n<\/div>\n<h3>Numbered\/Ordered Lists<\/h3>\n<div class=\"textbox\"><code>&lt;ol&gt;<br \/>\n&lt;li&gt;item 1&lt;\/li&gt;<br \/>\n&lt;li&gt;item 2&lt;\/li&gt;<br \/>\n&lt;\/ol&gt;<\/code><\/div>\n<p>Which will give you:<\/p>\n<div class=\"textbox\">\n<ol>\n<li>item 1<\/li>\n<li>item 2<\/li>\n<\/ol>\n<\/div>\n<hr class=\"before-footnotes clear\" \/><div class=\"footnotes\"><ol><li id=\"footnote-98-1\">From bell hooks' <em>The Will to Change: Men, Masculinity and Love<\/em> <a href=\"#return-footnote-98-1\" class=\"return-footnote\" aria-label=\"Return to footnote 1\">&crarr;<\/a><\/li><\/ol><\/div>","protected":false},"author":1,"menu_order":23,"template":"","meta":{"pb_show_title":"","pb_short_title":"","pb_subtitle":"","pb_authors":[],"pb_section_license":""},"chapter-type":[],"contributor":[],"license":[],"class_list":["post-98","chapter","type-chapter","status-publish","hentry"],"part":53,"_links":{"self":[{"href":"https:\/\/openbook.ums.edu.my\/userguide\/wp-json\/pressbooks\/v2\/chapters\/98","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/openbook.ums.edu.my\/userguide\/wp-json\/pressbooks\/v2\/chapters"}],"about":[{"href":"https:\/\/openbook.ums.edu.my\/userguide\/wp-json\/wp\/v2\/types\/chapter"}],"author":[{"embeddable":true,"href":"https:\/\/openbook.ums.edu.my\/userguide\/wp-json\/wp\/v2\/users\/1"}],"version-history":[{"count":1,"href":"https:\/\/openbook.ums.edu.my\/userguide\/wp-json\/pressbooks\/v2\/chapters\/98\/revisions"}],"predecessor-version":[{"id":99,"href":"https:\/\/openbook.ums.edu.my\/userguide\/wp-json\/pressbooks\/v2\/chapters\/98\/revisions\/99"}],"part":[{"href":"https:\/\/openbook.ums.edu.my\/userguide\/wp-json\/pressbooks\/v2\/parts\/53"}],"metadata":[{"href":"https:\/\/openbook.ums.edu.my\/userguide\/wp-json\/pressbooks\/v2\/chapters\/98\/metadata\/"}],"wp:attachment":[{"href":"https:\/\/openbook.ums.edu.my\/userguide\/wp-json\/wp\/v2\/media?parent=98"}],"wp:term":[{"taxonomy":"chapter-type","embeddable":true,"href":"https:\/\/openbook.ums.edu.my\/userguide\/wp-json\/pressbooks\/v2\/chapter-type?post=98"},{"taxonomy":"contributor","embeddable":true,"href":"https:\/\/openbook.ums.edu.my\/userguide\/wp-json\/wp\/v2\/contributor?post=98"},{"taxonomy":"license","embeddable":true,"href":"https:\/\/openbook.ums.edu.my\/userguide\/wp-json\/wp\/v2\/license?post=98"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}