public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* Cannot make EPUB with left aligned text.
@ 2019-05-29 18:17 CR
       [not found] ` <5d3c272e-5839-4a7a-a677-2e709d93707c-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 10+ messages in thread
From: CR @ 2019-05-29 18:17 UTC (permalink / raw)
  To: pandoc-discuss


[-- Attachment #1.1: Type: text/plain, Size: 2676 bytes --]

Pandoc 2.7.2 on Windows 7. I recently updated Pandoc and this didn't used 
to happen in an older version of Pandoc.

I used to be able to create EPUB files from Markdown and used my CSS to 
make the text left-aligned using CSS "text-align: left;". Now Pandoc 
doesn't seem to work, all my EPUB files are justified on both sides of the 
paragraph even when I have CSS that says otherwise. 

Here's my CSS in a file called style02.css: 

/* HTML tags */
body {
    text-align: left !important;
}
div, li, p, span {
    text-align: left !important;
}

h1 {text-align:left;
   font-size:140%;
}
h2 {text-decoration:underline;
text-align:left;
font-size:125%;
font-style:italic;
}
h3 {text-align:left;
font-size:115%;
font-weight:bold;}

h4 {
text-align:left;
font-weight:normal;
font-style:italic;
font-size:100%;
}

blockquote > p {border-left:2px solid black;
background-color:#e0e0e0 !important; /* Grayish color */
margin:3pt 5pt 5pt 6pt; /* TOP RIGHT BOTTOM LEFT */
padding-left:8pt;
padding-top:none;
padding-bottom:none;
}

.caption {text-align:left;
}

code {background-color:#e0e0e0; /* Grayish color */
/*border:1px black solid;*/
text-decoration:none;
}

pre {background-color:#e0e0e0; /* Grayish color */
border:1px black solid;
text-decoration:none;
}

/* .Classes, usage: <p class="myclass"> */


I have attached all files you will need to create the EPUB. Rename the 
`mkepub.bat.txt` to just `mkepub.bat`.

The only difference I see is in the body tag, using the Firefox Inspector, 
the body tag has text-align of "text-align: justify !important". If this is 
a default that Pandoc puts in, it should not use the "!important" clause. 
My CSS file is supposed to override any formatting.

Also in the body tag of the XHTML files in the epub is this attribute: 
`<body epub:type="bodymatter">`

I wonder if the "epub:type" is causing everything to be justified. Is there 
a way to turn off the "epub:type" attribute when making an EPUB? 

I want to use left align text because some of the bibliographies I use have 
URLs, and the URLs tend to mess up the formatting in justified mode.

Thanks.

-- 
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/5d3c272e-5839-4a7a-a677-2e709d93707c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[-- Attachment #1.2: Type: text/html, Size: 17427 bytes --]

[-- Attachment #2: superscript.md --]
[-- Type: text/markdown, Size: 1279 bytes --]

---
title: Title Superscript poss causing problems
author: John Author
date: 2019-05-20
identifier:
- scheme: DOI
  text: doi:10.234234.234/33
- scheme: ISBN-10
  text: 1234567988
- scheme: ISBN-13
  text: 978-1112223334
---

# Chapter 1

This is a normal chapter.

<div style="display:none;">
This should be hidden in ch 1.
</div>

This is after ch1 hidden text.

<p style="display:none;">
This is the  hidden paragraph.
</p>

This is after the hidden p. Lorem ipsum dorem. Checking for paragraph alignement.
Lorem ipsum dorem. Checking for paragraph alignement.
Lorem ipsum dorem. Checking for paragraph alignement.
Lorem ipsum dorem. Checking for paragraph alignement.
Lorem ipsum dorem. Checking for paragraph alignement.
Lorem ipsum dorem. Checking for paragraph alignement.
Lorem ipsum dorem. Checking for paragraph alignement.

# Chapter 2

This is subscript: H~2~O

This is superscript: 10^5^

## I. Chapter

Now we add a footnote after the superscript.[^footnote]

This is superscript after calling out the footnote: 10^5^

## A Look At Human Memory



The human brain is estimated to be able to store  
information in the quantity between 1x10^11^ (one hundred
trillion) and 2.8 x 10^20^ (280 quintillion) bits of
information.

[^footnote]: this is the footnote here.


[-- Attachment #3: style02.css --]
[-- Type: text/css, Size: 1579 bytes --]

/*
File: style02.css
background-color:COLOR
border:WIDTH TYPE COLOR; where TYPE=(none|hidden|dotted|dashed|solid|double|groove|ridge|inset|outset|inherit)
COLOR: see http://www.quackit.com/html/html_color_codes.cfm
text-decoration: (none|underline|line-through|overline|blink)
color:COLOR
font-family:font1,'font with spaces',serif,sans
font-size:12pt;
font-style:(normal|italic|oblique)
font-weight:(normal|bold|bolder|lighter|100|200|300|400|500|600|700|800|900)

margin:TOP BOTTOM; or
margin:ALL; or
margin:TOP RIGHT BOTTOM LEFT;

Some named colors: maroon, red, orange, yellow, olive, green purple, fuchsia,
See: http://www.quackit.com/css/properties/css_border-style.cfm
Test CSS: http://www.cssdesk.com/


*/

/* HTML tags */
body {
	text-align: left !important;
}
div, li, p, span {
	text-align: left !important;
}

h1 {text-align:left;
   font-size:140%;
}
h2 {text-decoration:underline;
text-align:left;
font-size:125%;
font-style:italic;
}
h3 {text-align:left;
font-size:115%;
font-weight:bold;}

h4 {
text-align:left;
font-weight:normal;
font-style:italic;
font-size:100%;
}

blockquote > p {border-left:2px solid black;
background-color:#e0e0e0 !important; /* Grayish color */
margin:3pt 5pt 5pt 6pt; /* TOP RIGHT BOTTOM LEFT */
padding-left:8pt;
padding-top:none;
padding-bottom:none;
}

.caption {text-align:left;
}

code {background-color:#e0e0e0; /* Grayish color */
/*border:1px black solid;*/
text-decoration:none;
}

pre {background-color:#e0e0e0; /* Grayish color */
border:1px black solid;
text-decoration:none;
}

/* .Classes, usage: <p class="myclass"> */

[-- Attachment #4: mkepub.bat.txt --]
[-- Type: text/plain, Size: 358 bytes --]

@echo off
rem Make EPUB with Pandoc and Markdown files.
set outfile=herbal-culpepper-1653-test.epub
c:\chuck\ebook\pandoc\pandoc --from=markdown_mmd+backtick_code_blocks+yaml_metadata_block+line_blocks+auto_identifiers --epub-cover-image=images\cover.jpg --css=\pandocbooks\style01.css --to=epub -o %outfile% herbal-culpepper01.md

echo Done. See %outfile%.

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2019-06-19 14:17 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-29 18:17 Cannot make EPUB with left aligned text CR
     [not found] ` <5d3c272e-5839-4a7a-a677-2e709d93707c-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2019-05-29 18:30   ` CR
     [not found]     ` <510e9cbb-dc00-4b2c-9b7e-79762d860eb1-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2019-05-29 19:44       ` John MacFarlane
     [not found]         ` <yh480ktvddhwqf.fsf-pgq/RBwaQ+zq8tPRBa0AtqxOck334EZe@public.gmane.org>
2019-05-30 13:31           ` CR
2019-05-30 13:41   ` CR
     [not found]     ` <5f74908b-9500-43b5-84c2-b7452a0326e9-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2019-06-02 13:54       ` mb21
2019-06-03 16:53       ` John MacFarlane
     [not found]         ` <yh480k36kq4nl0.fsf-pgq/RBwaQ+zq8tPRBa0AtqxOck334EZe@public.gmane.org>
2019-06-03 20:49           ` CR
     [not found]             ` <843ed1be-d8f5-4633-80fa-78e17e34fba2-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2019-06-03 21:58               ` John MacFarlane
     [not found]                 ` <yh480kpnnu2uwc.fsf-pgq/RBwaQ+zq8tPRBa0AtqxOck334EZe@public.gmane.org>
2019-06-19 14:17                   ` CR

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).