Menu

Configuring Documentclass

Help
Ian Fantom
2020-06-28
2020-07-08
  • Ian Fantom

    Ian Fantom - 2020-06-28

    I've installed writer2latex on Libreoffice

    Version: 6.0.7.3
    Build ID: 1:6.0.7-0ubuntu0.18.04.10
    CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3;
    Locale: en-GB (en_GB.UTF-8); Calc: group

    in Ubuntu Studio: Ubuntu 18.04.4 LTS

    and am testing it for future use on different files.

    I successfully converted an 'article', but when I try to convert a 'book' the resulting Latex code I get:

    \documentclass[a4paper,12pt]

    I tried editing that to

    \documentclass[a4paper,12pt]

    and then rebuilding, but nothing changes.

    There are various glitches in the layout, which may or may not be resolved when this is sorted.

    Any ideas?

     
  • Filex

    Filex - 2020-07-01

    Hi,
    I'm a knew user of writer2latex and I try myself to produce a book documentclass. So far, I could get a book format by : configuration headings : level 1 writer=level 0 latex = chapter
    When exporting, I choose latex format = customized (if I chosse article, I get an... article, not a book!)

     

    Last edit: Filex 2020-07-01
    • Ian Fantom

      Ian Fantom - 2020-07-01

      Thanks. I saw that coding earlier on, but I presumed that would have
      been inbuilt and selected when I selected 'book' in the Writer
      configuration. Now I see that the Writer configuration is only for
      user-defined configurations. Having reread that entry, I presume that
      coding should go in the file
      .../.config/libreoffice/4/user/writer2latex.xml . I'll try that.

      I'm using TexStudio, and have found there is a template for books there,
      but no description of format, or commands etc available. I'm wondering
      whether to copy over into that.

      On 01/07/2020 10:09, Filex wrote:

      Hi,
      I'm a knew user of writer2latex and I try myself to produce a book
      documentclass. So far, I could not. In the documentation, there's an
      example file for book. Did you try it?
      http://writer2latex.sourceforge.net/doc1.6/user-manual12.html


      Configuring Documentclass
      https://sourceforge.net/p/writer2latex/discussion/919908/thread/ff7eb00876/?limit=25#43e4


      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/writer2latex/discussion/919908/

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/subscriptions/

       
      • Ian Fantom

        Ian Fantom - 2020-07-01

        I tried it and I still get: \documentclass[a4paper]

        I have also tried contacting the writer2latex support but received no
        reply - perhaps it's just one overloaded developer.

        Regards,

        Ian

        On 01/07/2020 11:12, Ian Fantom wrote:

        Thanks. I saw that coding earlier on, but I presumed that would have
        been inbuilt and selected when I selected 'book' in the Writer
        configuration. Now I see that the Writer configuration is only for
        user-defined configurations. Having reread that entry, I presume that
        coding should go in the file
        .../.config/libreoffice/4/user/writer2latex.xml . I'll try that.

        I'm using TexStudio, and have found there is a template for books there,
        but no description of format, or commands etc available. I'm wondering
        whether to copy over into that.

        On 01/07/2020 10:09, Filex wrote:

        Hi,
        I'm a knew user of writer2latex and I try myself to produce a book
        documentclass. So far, I could not. In the documentation, there's an
        example file for book. Did you try it?
        http://writer2latex.sourceforge.net/doc1.6/user-manual12.html
        
        ------------------------------------------------------------------------
        
        Configuring Documentclass
        https://sourceforge.net/p/writer2latex/discussion/919908/thread/ff7eb00876/?limit=25#43e4
        
        ------------------------------------------------------------------------
        
        Sent from sourceforge.net because you indicated interest in
        https://sourceforge.net/p/writer2latex/discussion/919908/
        
        To unsubscribe from further messages, please visit
        https://sourceforge.net/auth/subscriptions/
        

        Configuring Documentclass
        https://sourceforge.net/p/writer2latex/discussion/919908/thread/ff7eb00876/?limit=25#43e4/6c90


        Sent from sourceforge.net because you indicated interest in
        https://sourceforge.net/p/writer2latex/discussion/919908/

        To unsubscribe from further messages, please visit
        https://sourceforge.net/auth/subscriptions/

         
  • Filex

    Filex - 2020-07-02

    Maybe we have to add a book. xml as there is a article.xml (For Arch Linux/ Manjaro :
    usr/lib/libreoffice/share/extensions/w2lconfig/config/article.xml)
    and a template book.ott as article.ott ( usr/lib/libreoffice/share/extensions/w2lconfig/template/Writer2LaTeX/LaTeX-article.ott)

    I guess we have to create both files and use the "customized" latex-format otherwise, it will be an article formatted file).

    As I don't know if you saw my first or second post, I put here a second time what I put the second time:
    So far, I could get a book format by : configuration headings : level 1 writer=level 0 latex = chapter
    When exporting, I choose latex format = customized (if I chosse article, I get an... article, not a book!)

     
    • Ian Fantom

      Ian Fantom - 2020-07-08

      Thanks. Yes, I did see both entries, but I was figuring out the system
      at the same time!

      In the meantime I've been experimenting, and found a workaround, though
      it's a bit clumsy. In TexStudio I created a book, using their 'book'
      template. I then copied across all the package lines from the 'article'
      conversion of my text from Writer. Then I identify chapter headings and
      rewrite the tags as chapter tags. Then I correct delete 'pagenumber'
      tags and 'strikeout' tags, which are messing up my text. It's possible a
      lot of that could be automated if I were to write a Perl script.

      But then I got stuck in trying to find a conversion program to go the
      other way: Latex to Writer. My purpose in turning to Latex was to gain
      access to the indexing facilities, which don't seem very good in Writer.
      I think I could work a lot faster with Latex tags, and even speed that
      up a lot by writing a few Perl scripts to do routine work. But for that
      I'd need to convert back to the original word processing format. This is
      for small-scale publishing, where people are using whatever facilities
      they are familiar with, and need quick indexing.

      So I went back to basics, and eventually discovered the format 'Flat
      Writer XML (.fodt), which encodes the Writer document in their own
      adaptation of XML, and can later be opened by Writer, displaying in the
      original WYSIWYG form. I think I can work with that to produce my
      indexing scripts.

      I don't know whether Writer2Latex uses .fodt files as an intermediate.

      I was confused at the selection of header levels in the user-defined
      form. Another way of tackling this may be to produce a dummy record in
      Writer, using the same formatting, but standard names for headers, such
      as 'TITLE-BOOK', 'FOREWORD', 'CHAPTER', etc, then save that in .fodt . A
      utility could then identify these headings in the template (eg:
      '\chapter'), and then convert the tags in .fodt to their equivalents in
      the template, thus creating an equivalence table, which could be used on
      the file to be converted. Just an idea!

      Thanks, and best wishes,

      Ian

      On 02/07/2020 08:42, Filex wrote:

      Maybe we have to add a book. xml as there is a article.xml (For Arch
      Linux/ Manjaro :
      usr/lib/libreoffice/share/extensions/w2lconfig/config/article.xml)
      and a template book.ott as article.ott (
      usr/lib/libreoffice/share/extensions/w2lconfig/template/Writer2LaTeX/LaTeX-article.ott)

      I guess we have to create both files and use the "customized"
      latex-format otherwise, it will be an article formatted file).

      As I don't know if you saw my first or second post, I put here a
      second time what I put the second time:
      So far, I could get a book format by : configuration headings : level
      1 writer=level 0 latex = chapter
      When exporting, I choose latex format = customized (if I chosse
      article, I get an... article, not a book!)


      Configuring Documentclass
      https://sourceforge.net/p/writer2latex/discussion/919908/thread/ff7eb00876/?limit=25#024b


      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/writer2latex/discussion/919908/

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/subscriptions/

       
  • Filex

    Filex - 2020-07-08

    Did you try to use LyX ?
    www.lyx.org
    Demo:
    https://youtu.be/JiDFyIuloy4
    https://youtu.be/RW4Jkew041s

     
  • Filex

    Filex - 2020-07-08

    For LaTeX to Writer, try http://latex2rtf.sourceforge.net/

     

Log in to post a comment.