Not signed in (Sign In)

Vanilla 1.1.9 is a product of Lussumo. More Information: Documentation, Community Support.

    •  
      CommentAuthoroelauge
    • CommentTimeFeb 5th 2012
     
    Hi, I'm new to work with Ulysses.
    In general i had a round tript to explore the functionalities and i was very surprised to find the functionality to work with own templates for exports.

    For me it is intesting, because i use for technical description the docbook format. And i have a vision to use Ulysses as writer tool, but i need as final export a valid XML-file.

    The template functionality is the right one for me to create nearly an XSLT, to transform my text to an docbook xml file. But i have the first stones on my way.

    It is important to nestle content like that:

    <sec1 xml:id="id_test1>

    <title>Section 1</title>
    <para>Blindtext.</para>

    </sec1>

    My first try is to create chapters with Ulysses like that:

    #Section 1
    Blindtext.

    Blindtext.

    #Section 2
    Again a Blindtext.

    My export result is:

    <sec1 xml:id="id_try>
    <title>Section1</title>
    </sec1>
    <para>Blindtext.</para>

    <para>Blindtext.</para>

    <sec1 xml:id="id_versuch>
    <title>Section 2</title>
    </sec1>
    <para>Again a Blindtext.</para>

    So, how work Ulysses to identify a grouped text? And how can i create the actions for this logic?

    Thank you and

    regards

    oelauge
    •  
      CommentAuthorfbrault
    • CommentTimeFeb 6th 2012
     
    Hi oelauge,

    Look at the Web Export template. This has the best chance of being able to be adapted to suit your purpose. I have used it to create nested tags required by XML by using a structure similar to the unordered list that is found in the XHTML Snippet option. I create well-formed XML that can be read directly by Adobe InDesign for Technical manuals. The template now ships with the current version of Ulysses. The help file has a chapter at the with detailed instructions on how to customize the template.

    If you need more information, please continue this thread. The Soulmen have helped me extensively with their quick responses.

    hth,

    Frank Brault
    •  
      CommentAuthorgoetz
    • CommentTimeFeb 6th 2012 edited
     

    Exporting to DocBook with Ulysses can be achieved using the WebExport. This exporter includes a few templates, which are mostly HTML and Markdown templates. However, you can create custom templates, either be starting one from scratch or by duplicating an existing Template. In your case, it would make sense to start a new one. The WebExport documentation provides extensive coverage of how to create and edit templates.

    The main problem I see with creating a DocBook template are the end tags of the sections. Usually, the WebExport puts start and end tags before and after a paragraph (such as in the title tag or the para tag -- you can realize these without problems). If the start and end tags should span multiple paragraphs, you would need to set the paragraph style before every paragraph it should span (this is intended for lists, which are enclosed by <ul>...</ul> and each line has a <li>...</li> tag). But this doesn't really help you for the DocBook sections. What you could do instead is to create a Paragraph Style for the start of a section (which you then assign to a WebExport Style action containing the start tag <sec1 ...>) and a Paragraph Style for the end of a section (which you assign to a different WebExport Style action containing just the end tag </sec1>) and put the first Style at the beginning of a section and the second at the end of a paragraph.
    You can create these actions in the Template Editor (which is described in detail in the WebExport documentation). If you want, you can also duplicate an existing template and then click on "Edit template…" in the popup menu to see how they are structured. If you need any further help with creating Templates, you can contact us here in the forums or directly at support@the-soulmen.com.

    Götz

    •  
      CommentAuthoroelauge
    • CommentTimeFeb 6th 2012
     
    Thank you at fbrault and goetz,

    And yes i have problems with the end tags. Sadly i have not found a solution for that. This is the reason that i have my first result like that:

    <sec1 xml:id="id_try>
    <title>Section1</title>
    </sec1>
    <para>Blindtext.</para>

    The para-tags should be inside the sec1-tags and i tried some steps, but without success.

    From my point of view, to use paragraph styles makes no sense, because then i can use an standard XML-Editor. My hope is to use Ulysses as simple writing tool. To define my own styles like a markdown syntax and additional keywords for the Docbook elements, but i need a logic like loops that Ulysses identify automatically the content structure, like in this simple example:

    #Section 1
    Blindtext1.

    Blindtext2.

    #Section 2
    Again a Blindtext3.

    The result should be:

    <sec1 xml:id="id_try>
    <title>Section1</title>
    <para>Blindtext1.</para>

    <para>Blindtext2.</para>
    </sec1>

    <sec1 xml:id="id_try>
    <title>Section2</title>
    <para>Blindtext3.</para>
    </sec1>

    Any ideas?

    Oelauge
    •  
      CommentAuthorgoetz
    • CommentTimeFeb 7th 2012 edited
     

    I've just tried it with a small set of Paragraph Styles and it seems to work nicely. First, I created two Paragraph Styles in the Ulysses Preferences (Cmd-,): one for the start of a section and one for the end of a section (the tags are "## ", "#--", respectively, but that shouldn't matter). Then I went to the Exporters, created a new WebExport Template, set up a template file (in the second tab) to include the text of a document ({{document.text}}) and added two Paragraph Style Actions (I called them "Section start" and "Section end") in the Actions tab. I set the result text field of the first one to
    <sec1 xml:id="id_try"> <title>{{}}</title (you can insert line breaks by pressing Alt+Return). Then I set the result text field of the second one to
    </sec1>
    Finally, I changed the result text field of the Default Paragraph Style to <para>{{}}</para> so that all lines which don't have a Paragraph Style assigned to them are enclosed by the para tag. Close the Template Editor sheet and set the Paragraph Style of the start of a section to "Section start" and do the same for the end of a section.

    If you now type in Ulysses

    ## Section 1   
    Blindtext.   
    
    Blindtext.   
    ##-   
    
    ## Section 2   
    Blindtext.   
    
    ##-    
    

    the text should be converted accordingly.

    I hope that helps,
    Götz

    •  
      CommentAuthoroelauge
    • CommentTimeFeb 8th 2012
     
    Now it's running, thank you. But it is not really what i want, because i must be careful to don't forget to set the end tag. And now i have more an editor, and not a writing tool. Perhaps in the next releases of Ulysses it is possible to expand the logic behind this great feature, because it is very powerful to create your own transformation, like with XSLT but more in an easy way.
    And by the way, perhaps it is better to find a different name than "Web Export", because not everything is a Web Export.

    The next steps with Ulysses brings the next questions, sorry.

    In LaTeX you can define labels, or with Docbook IDs to tag very individual the titles of sections as base for cross-referencing. It is easy to use as label/id the name of the section name, but very often you want to use more a short description than a long title with spaces.

    How can i create my own labels with a relation ship logic, that this label belongs only to this section title? And how can i control the output with my own export (Web Export)?
    •  
      CommentAuthorgoetz
    • CommentTimeFeb 12th 2012 edited
     

    Hello oelauge,

    sorry for taking so long for answering your request. I thought about how to include labels in the section and haven't really come up with a solution that could fit your needs. What you would need is something like the Formatted Inline Style Actions, where you can give your text inside Inline Style tags a certain formatting (e.g., for links linkName-URL). However, we haven't added these capabilities for Paragraph Style actions yet. I'm afraid we've hit a wall here where the WebExport can't really help you in this matter.

    Götz

    •  
      CommentAuthoroelauge
    • CommentTimeFeb 13th 2012
     
    No problem goetz.

    So i will still waiting for the next releases with the hope to find a solution for me and the rest of problem childs ;-)

    oelauge