top of page
Rechercher
  • Photo du rédacteurJonas

WYSIWYM editor on top of ConTeXt / Lout

Dernière mise à jour : 11 sept. 2020

I believe there would be a whole bunch of Word / OpenOffice users that would be ready to switch to a WYSIWYM editor if there was a enough user-friendly one available. The idea of WYSIWYM, is to help you to focus on your content when you are writting your content, so that you are not distracted by the formatting details. Word / OpenOffice are fine for a 3-4 pages document, but for a 60 pages documents, it is a pain to use, especially for detail oriented people, as they can spend a lot of time making the document to look good with page breaks and images positioning, only to have all this formatting work broken when they need to make a change at the beginning of the document that shifts everything.


I have also used LyX during a while, which is fine for content editing, but once you want to customize the appearance of your document a bit more than the limited choices that you have, you need to insert some LaTeX code and here begins the troubles, because of how TeX was designed (as a macro language), and also because the philosophy behind LaTeX is that users should not worry much about formatting as LaTeX should take care of that, so it was not designed to make things easy to customize. On the other hand, the philosophy of ConTeXt, another layer on top of TeX, is to allow as much as possible customizations by users, so I believe there would be a lot less frustrations if LyX was based on ConTeXt instead.


My idea of a WYSIWYM editor would be an editor with:

  • A content edition mode that is similar to writting text in LyX

  • A template edition mode where the user can graphically edit paragraph and section settings such as fonts or spacing.

  • Both modes display the same document but not in the same way, and they have different possibilities and restrictions.

A document will consist of one file for the content and another file for the template (unless it uses a standard template), so that it will be easy to use the same template accross several documents.


In the content edition mode, it will be possible to insert sections, paragraphs, images, tables, put some words in italic / bold / red / … or change their fonts, just a user can expect. It will be also possible to customize a table or an image, but every customization is only made on a local item, as global customizations are made in the template mode. Experience will be similar than content editing with LyX, with also no pages and no margins, and also the possibility to insert an ERT of the document backend language, although ERT will only be needed for advanced use cases (e.g. drawing programatically a figure, inserting a variable for mail merge) and not for what is expected by a Word user to be simple to do graphically (e.g. setting headers and footers).


In the template edition mode, user will see the content in read-only mode and can set the margins, the styles of sections, paragraphs, lists, tables, …, the background color or image of the document, the headers and footers, etc. Advantage of displaying the content is that if, while writting content, the user notices that e.g. formatting is wrong somewhere, then he can switch to the template edition mode and have a visual way for fixing the issue he saw, without needing to do several trials and exports before e.g. finding the correct spacing.


As visible in the draft I made below, having a template edition mode gives more possibilities for improving user-friendliness than having only one mode where all can be done (e.g. the rectangles that display and allow to change before/after block spacings)


Here is a slighty simplified version of how it will look like:

  1. Switch between content and template mode

  2. In template mode, contents are read-only (e.g. insertion of list is impossible)

  3. The section/image/paragraph/… that has the cursor will be highlighted and spacing can be visually adjusted with the mouse, or settings can be edited in a contextual menu. When the cursor is inside a word, the contextual menu also allows to configure settings related to words (e.g. hyphenation)

  4. All similar item will also be highligted, as any change on the item that has the cursor impacts the other similar items as well

  5. On paragraphs, styles, spacing and settings like window/orphan control can be defined

  6. Default settings can be applied on images (positioning, size), which can be overriden for any individual image in the content mode. Same behaviour for bullet lists, paragraphs, tables, etc.

  7. Show/hide frame. Frame contains margins, header, footer, footnotes, which enables the user to configure these items. Frame doesn't enable pagination as text will be scrolled as usually but with the frame around it. Footnotes of the currently displayed text will be shown.

That way it will be easy to find where to configure what. No need to struggle to find what is needed in a menu with 100 options.


What do you think about that? I believe such an editor could help the adoption of alternatives of TeX / LaTeX that don’t have the popularity they deserve.

166 vues0 commentaire
bottom of page