摘要:
目的 解决Indesign XML排版时单双栏混排文档中图像的自动排版问题。方法 编写JavaScript脚本,通过顺序读取标签、提取标签内容、应用样式的方法实现Indesign XML自动排版。结果 在Indesign XML排版中应用自编的JavaScript脚本可以实现单双栏混排文档中单栏图的自动排版。结论 自编的JavaScript程序能够在Indesign中实现以文字和单栏图为主的单双栏混排文档的自动排版与PDF文件导出,优化了排版流程。
关键词:
XML,
InDesign,
JavaScript,
结构化排版
Abstract:
[Purpose] To realize automatic typesetting of images in documentsw ithm ixed grid layout in Indesign.[Methodology] Codes for tags sequential reading,contentextracting and styles applying werew ritten in JavaScript.[Findings] Applying JavaScript codes in this study,single-column images in documents w ith m ixed grid layout could be automatic typesetted in Indesign.[Conclusions] Javascript codes in this study can be used to realize automatic typesetting and PDF file exporting of documents consist of texts and single-column images w ith m ixed grid layout in Indesign,so as to optim ize document typesetting process.
Key words:
XML,
Indesign,
JavaScript,
Structured typesetting
李金城,余方,方婷云. 利用JavaScript编程在Indesign中实现基于XML结构化文档的自动排版[J]. 中国科技期刊研究, 2015, 26(2): 172-175.
LI Jincheng,YU Fang,FANG Tingyun. Automatic typesetting based on XM L structured document w ith JavaScript and Indesign[J]. Chinese Journal of Scientific and Technical Periodicals, 2015, 26(2): 172-175.