: Convert paragraphs to specific style based on content? I really like plain text writers, such as Ulysses and the recently found Bear (both Mac). I'm currently writing my thesis and I enjoy styling.
I really like plain text writers, such as Ulysses and the recently found Bear (both Mac). I'm currently writing my thesis and I enjoy styling. However, something that really annoys me is the gap between a plain text writer and InDesign. I can't easily copy over text from a simple writer to InDesign. So I'm looking for a way to minimise that gap.
I noticed that Bear, for example, uses Markdown as an output. If you copy header-1 (i.e. "This is a header") text to InDesign that paragraph will be output like "# This is a header". When you have a header-2 it adds 2 '#' in front and quotes obtain a '>' in front of the paragraph.
With that discovery I was thinking of automatically convert each paragraph to a specific style based on a ruleset, depending on the first character of a sentence.
if rule starts with "#" then apply paragraph style "header-1".
Additionally, that hashtag should be removed, but that could be done with a find & replace (find "# " and replace with "").
But uh.. Is it possible to apply paragraph styles based on certain rules? Preferably automating this thing?
More posts by @Merenda852
3 Comments
Sorted by latest first Latest Oldest Best
You can also use pandoc to generate an ICML file (the native file format of Adobe InCopy), which you can "place" in InDesign (File > Place).
pandoc input.md -s -o output.icml
Use Edit > InCopy > Check Out to edit the imported text in InDesign (see managed files).
Just want to expand on @Mario Breskic's response a bit. The scripts that are mentioned on the page that he linked to are based on InDesign's GREP and Nested Styles features. Although I am not very good with GREP in general, and so haven't used the GREP styles very often, I highly recommend learning how to use both Nested Styles and GREP styles in InDesign, because they are like magic when it comes to automating paragraph styling. My favorite resource for InDesign support is InDesign Secrets: GREP Styles and Nested Styles.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.