开发者

InDesign Paragraph Return Character from CSV file?

开发者 https://www.devze.com 2023-03-02 03:07 出处:网络
I am currently using the Data Merge functions of ID CS4 to import some data I have exported from a MySQL database. Although I can set ID to remove blank lines, this doesn\'t always work for my purpose

I am currently using the Data Merge functions of ID CS4 to import some data I have exported from a MySQL database. Although I can set ID to remove blank lines, this doesn't always work for my purpose because later lines contain data. As a result, there still appears whitespace in the outputted data.

Since I am using PHP to produce the CSV file, my question is this: is it possible for me to indicate an InDesign Paragraph Return character within the CSV file, so that the data can then in turn be imported and displayed as I wish.

For example, I have the tried the following examples, but 开发者_如何学Cnothing seems to work:

"code","description"
"12345", "Hardware\nTools"

"code","description"
"12345","Hardware \Z  Tools"

Any help would be gratefully appreciated!


Not sure why the first answer was accepted, as it is wrong.

Google still brings this thread in third position for "data merge indesign line break", so I thought I had to give a real anwser.

There is no magical character you can put in your CSV file to automatically generate line breaks in InDesign.

The Adobe Help for InDesign specifies :

You cannot insert a line break within a field in the data source file. If it’s necessary to split a field across different lines, create two different fields, such as <<Address1>> and <<Address2>>.

If your number of lines is variable or if you don't want to create extra columns just for some line breaks, there is only one solution :

  • Replace, in your CSV file, the line breaks by some specific character (¤ for example) that would act as a line separator.
  • Then, after the merge in InDesign, use the Find/Replace tool in the Edit Menu, in order to find your "line separator" and replace it back to a line break, that InDesign will understand.

I hope this will really help those who struggled like me with these line breaks in InDesign.


According to this PDF, in IDML you can specify a "forced line break" by using &#x2028, or you can force a "Paragraph break" by using <br/>.

I'm not sure if this is exactly what you're looking for but you may be able to give it a try.

Hope this helps!

0

精彩评论

暂无评论...
验证码 换一张
取 消