A tricky alignment for doublet poems

I’ve many doublet poems which are formed in this way:

Verse 1:
Hallowed by thy name,
O my Lord

Verse 2:
Any isms I do not mind,
Atheism is my real find.

Like this and so on. My task here is to center align all the first lines of each of the verses. Then I’ve to align the second line in such a way that the two are vertically straight.

Also, All first lines are by default center aligned.

If you notice for instance the line
“Hallowed be thy name” is at a distance of 25 mm from left margin i.e H is 25 mm from left. The whole document is center aligned, so there is no necessity of formatting on the first lines of the doublet.
Consider the second line -”O my lord” The word O is 30 mm from left margin. I have to make the second line beginning at a distance of 25 mm from left. i.e O is in perfectly in line with H of first line i.e. 25 mm.

Please help me out as I am not clear regarding how to align the second line in same distance as the first line. There are 1000s of verses like these and manual working on all of them will finish all of my time. A little insight on how to achieve this would help a lot.

Greatly appreciated for your time and help.

I’ve typed some text in word as a sample on how the desired output is expected. This has to be achieved in indesign.

is there any technique to achieve this? can we make a grep(or something else) to acheive this?

Hi Chandru.R, welcome to the forums.

I not a CSS expert, but I’m sure you can get the desired look by using the needed tags and CSS.

But I’m confused with your use of mm for measuring distance. Web pages usually use px, em, % or pt
I know others can be used as well but I wanted to clarify that you are talking about web pages, correct?

Hi,

If I understand correctly (and you meant to ask a css question) then one of these methods will be suitable.


<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<title>Untitled Document</title>
<style>
.wrap { text-align:center }
.couplet {
	display:inline-block;
	text-align:left;
 *dislay:inline;/* if ie7 and under support is required*/
	zoom:1.0;	/* if ie7 and under support is required*/
}
</style>
</head>

<body>
<h1>Version 1</h1>
<div class="wrap">
		<p class="couplet">Hallowed by thy name,<br>
				O my Lord</p>
		<br>
		<p class="couplet">Any isms I do not mind,<br>
				Atheism is my real find</p>
		<br>
		<p class="couplet">This first line is a lot longer than the others<br>
				but this isn't</p>
		<br>
</div>
<h2>Version 2</h2>
<div class="wrap">
		<div class="couplet">
				<p>Hallowed by thy name,<br>
						O my Lord</p>
				<p>Any isms I do not mind,<br>
						Atheism is my real find</p>
				<p>This first line is a lot longer than the others<br>
						but this isn't</p>
		</div>
</div>
</body>
</html>

The first method will centre each couplet depending on the longest line which means that verses will not all align to the same left position.

The second version will centre the whole poem based on the longest line in the poem and keep all verse left edges aligned.

Dear Paul O’B,

Thanks a lot for your reply.

First of all, if you would kindly notice my question is centered around normal formatting options using Indesign CS3. I have never thought of it that this kind of formatting can be done using CSS in indesign. Is it possible to use CSS to achieve this in Indesign?
I hope you have understood that the task which I’m working is one of making books in which all the verses are already typed. Only the task of alignment is remaining as I had mentioned in the question. Is this possible? I’m attaching a screenshot for your further reference!

Please kindly help me!!!

Again I must ask you to please clarify

The SitePoint foruns are web development forums.

If you are asking about somethng more specifically pertaining to this Adobe product http://www.adobe.com/products/indesign.html
there may be some here that can help you, but unless your question is about this product and the web, perhaps Adobe support might be a better place to seek help?