Mobile app version of vmapp.org
Login or Join
Rivera951

: Why doesn't my HTML markup have any indentation when I export it to .epub from InDesign? I am using Indesign CC to create a book on HTML programming. I have used TextFrames to add blocks

@Rivera951

Posted in: #AdobeIndesign #Book #Epub

I am using Indesign CC to create a book on HTML programming. I have used TextFrames to add blocks of code and markup. When I generate an ePub out of it, the code blocks and markup are generated without indentation. Everything is left aligned.

However when I export the textframe as an image, the markup comes with indentation but the file size is way too big and the code is obviously not selectable.

What options do I have here? Here's an example of the kind of code I am dealing with:

<body>
<table border="1">
<thead>
<tr>
<th class="c1">ABC</th>
<th class="c2">PQR</th>
<th class="c3">XYZ</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>Book</td>
<td>Top</td>
</tr>

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Rivera951

1 Comments

Sorted by latest first Latest Oldest Best

 

@Smith574

You need to apply a paragraph style in InDesign. They are not in Window but the panel is located in Type. Shortcut cmd+F11:



Create the paragraph style, double click, go to Indents and Spacing:



Add your desired indent in the First Line Indent:







Taking it a little further. You could unpack the ePub and navigate to your CSS and build a class and apply text-indent. If you do go this route be careful because the output of InDesign will produce multiple CSS classes so you will need to verify that your indention was applied correctly.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme