Select Page

Research digital skills training 2021

SwiftLaTeX- Exploring web-based true WYSIWYG editing for digital publishing

Elliott Wen, PhD candidate; Dr Gerald Weber, Senior Lecturer, Department of Computer Science

Home • Projects • SwiftLaTeX- Exploring web-based true WYSIWYG editing for digital publishing

Introduction

The text processing tool LaTeX has prevailed as a standard in many fields of exact sciences; it is evident that LATEX is likely to be here to stay. From that perspective, it is important to explore what are the best possible ways to support the author in efficiently editing documents. There have been several approaches that provide graphical editing support for LaTeX. We argue that a true WYSIWYG (What You See Is What You Get) approach is a justified requirement for future systems, and we present here the first cloud-based true WYSIWYG editor. This allows the author to edit the document in its print form directly in a web-based PDF viewer. Building such a system creates unique challenges compared to existing approaches. We identify these challenges and name workable solutions. We also provide a usability evaluation of the new system. In short, our finding is that editing LaTeX directly in the PDF view is possible for a wide range of edits and valuable for many major user groups and use cases; hence it is a fair requirement for future top-of-the-line LaTeX editors.

Background

The TeX typesetting system developed by Donald Knuth ushered in an era of high quality open source electronic document publishing. Knuth embedded deep knowledge of the traditional art and craft of typesetting into TeXO˙ver the intervening decades, various TeX derivatives have established themselves. Among them, LaTeX is particularly widespread and maintained by a large community. However, the TeX family of tools exhibits a major usability limitation due to their nature as batch processing systems which results in an edit-compile-review cycle. This cycle is generally acknowledged to possess certain usability disadvantages; the user is forced to perform difficult mental mappings back and forth between the one-dimensional textual TeX source codes and the two-dimensional graphical print output, displayed on the screen only after a slow compilation process. This takes longer than the time which users are known to find acceptable in interactive systems. It renders various editing tasks fairly inefficient such as proofreading, which often involves a large share of single-character
edits.

A number of partial solutions to this problem have been developed. Some LaTeX editors (e.g., ShareLatex , now merged with Overleaf ) provide asynchronous and regular refresh of the print output, which is placed side by side with the code editor. Optionally, the editor also features formatted text input, where a fixed number of LaTeX text style commands are displayed in different colors and fonts accordingly, e.g., section headers are shown in a large and bold font.

However in these approaches there is still a large discrepancy between the edit view and the print layout view and the user has to

alternate and switch focus between them in many work cycles.

A thorough analysis of these existing solutions (Our work Section) leads us to the research hypothesis that enabling
WYSIWYG editing of LaTeX documents directly in the print (PDF) layout will bring about a significant improvement in usability for various user groups due to the removal of the notorious edit-compile-review cycle. To match this aspiration, and to keep the usability advantages gained with current cloud services, we introduce SwiftLaTeX, the first cloud-based LaTeX true WYSIWYG system for.

However, implementing a responsive WYSIWYG editor entails three challenges. First, allowing direct editing of the PDF document requires that the product of the LaTeX compilation must be combined with the new user input as quickly as possible. This is challenging since traditional recompiling is too slow for character-wise quick response. Secondly, the editor is expected to intercept the modification on the PDF document and to apply the alternation synchronously in the corresponding position of the source code. To achieve this, the editor requires the ability to infer the source code position of each element in the PDF with character-wise accuracy. This is a stretch target since the highest level of accuracy in existing open-source tools is merely line-level. Finally, for a cloud-based system with a massive number of potential users, maintaining high scalability, reliability and compatibility remains a challenging issue, particularly since as long as we rely on repeated compilations, there is an obvious trade off between computing resource consumption and responsiveness.

Our work

In this research, we present practical solutions to cope with the above challenges. Specifically, to correctly combine the product of the LaTeX compilation and the user’s editing, SwiftLaTeX proposes an asynchronous merging mechanism. To infer the source code positions, SwiftLaTeX explores an advanced text-matching algorithm and dynamically patches the LaTeX engine with a bookkeeping mechanism in pursuit of character-level accuracy. To achieve high scalability, reliability and compatibility, SwiftLaTeX embraces a distributed system back-end architecture and features a responsive front-end design.

We consolidated the above techniques and implemented a prototype of SwiftLaTeX on cloud computing platforms, based on which we conducted a preliminary user study involving six LaTeX users to evaluate the usability aspects of the system. The evaluation results show that participants reacted positively to the innovative web-based editable PDF viewer and praised its efficiency for certain editing tasks such as proofreading.

To sum up, the main contributions of this research are as follows:

  • We provide a review of existing LaTeX editors and derive requirements for our system as a cloud-based WYSIWYG editor in a narrower sense.
  • We propose a high-level algorithmic standard architecture for asynchronous WYSIWYG editors working on a batch-style text processing system.
  • We implement and integrate a fine-grained source code positioning system in LaTeX system.
  • We present a working cloud-based prototype which is scalable, reliable and compatible with mainstream browsers on different kinds of devices.
  • We conduct a preliminary pilot study evaluating usability aspects of the system.

Conclusion

In this research, we presented SwiftLaTeX, the first cloud-based true WYSIWYG editor that allows the user to edit the document in its print form directly in the web-based PDF viewer. We have identified fundamental architectural challenges in providing WYSIWYG for LaTeX and identified resuable solutions. We have defined WYSIWYG in the narrower sense; the SwiftLaTeX system shows that a cloud-based WYSIWYG sytem for LaTeX is achievable. Although the batch-character of LaTeX poses challenges for such a system, we could show that these challenges can be overcome Manuscript submitted to ACM.

Acknowledgement

The authors wish to acknowledge the Centre for eResearch at the University of Auckland for their help in facilitating this research. Our cloud based WYSIWYG editor is hosted with Nectar virtual machine.

Figure 1. Workflow for the WYSIWYG view.
Figure 2. Backend architectures.
Figure 3. Two typical examples for source code position inference.
Figure 4 Timing charts in the WYSIWYG view.
Figure 5. Internal merchanism of the engine patch.
Figure 6. Three Editing States in the WYSIWYG View.
Figure 7. WYSIWYG editor of SwiftLaTeX.

See more case study projects

Data maturity project in High Value Nutrition, National Science Challenge

Data maturity project in High Value Nutrition, National Science Challenge

Haka on the move: sport circuits and cultural performance 

Haka on the move: sport circuits and cultural performance 

Proteins under a computational microscope: designing in-silico strategies to understand and develop molecular functionalities in Life Sciences and Engineering

Proteins under a computational microscope: designing in-silico strategies to understand and develop molecular functionalities in Life Sciences and Engineering

Remote temperature monitoring to reduce the spread of COVID-19

Remote temperature monitoring to reduce the spread of COVID-19

COVID-19 exponential growth visualisation

COVID-19 exponential growth visualisation

Developing virtual capabilities for the Science Payload Operations Centre

Developing virtual capabilities for the Science Payload Operations Centre

Hosting visualisation and analytics tools for COVID-19 studies

Hosting visualisation and analytics tools for COVID-19 studies

Exploring perceptions towards climate change over time on Twitter

Exploring perceptions towards climate change over time on Twitter

Coastal image classification and nalysis based on convolutional neural betworks and pattern recognition

Coastal image classification and nalysis based on convolutional neural betworks and pattern recognition

Calcium signalling in salivary gland acinar cells

Calcium signalling in salivary gland acinar cells

Anti-corruption regulations for promoting socially responsible practices

Anti-corruption regulations for promoting socially responsible practices

Determinants of translation efficiency in the evolutionarily-divergent protist Trichomonas vaginalis

Determinants of translation efficiency in the evolutionarily-divergent protist Trichomonas vaginalis

Analysing text data by time-series feature engineering

Analysing text data by time-series feature engineering

An investigation into Leap Motion device for “gesture-as-sign”

An investigation into Leap Motion device for “gesture-as-sign”

Antibiotic resistance and the “end of modern medicine ”

Antibiotic resistance and the “end of modern medicine ”

Develop short-term eruption warning systems for Whakaari and other volcanoes

Develop short-term eruption warning systems for Whakaari and other volcanoes

Evenly spaced observation fields from irregularly sampled data in the Southern Ocean

Evenly spaced observation fields from irregularly sampled data in the Southern Ocean

Measuring impact of entrepreneurship activities on students’ mindset, capabilities and entrepreneurial intentions

Measuring impact of entrepreneurship activities on students’ mindset, capabilities and entrepreneurial intentions

Using Zebra Finch data and deep learning classification to identify individual bird calls from audio recordings

Using Zebra Finch data and deep learning classification to identify individual bird calls from audio recordings

NETwork! analysis in cancer – managing genomics research data and building a repository workflow

NETwork! analysis in cancer – managing genomics research data and building a repository workflow

The Coronary Atlas – data processing workflow optimisation

The Coronary Atlas – data processing workflow optimisation

3D visualisation of indigenous burial site in Roonka

3D visualisation of indigenous burial site in Roonka

Automated measurement of intracranial cerebrospinal fluid volume and outcome after endovascular thrombectomy for ischemic stroke

Automated measurement of intracranial cerebrospinal fluid volume and outcome after endovascular thrombectomy for ischemic stroke

A new ‘stratigraphy’: interpreting object relationships with 3D point densities

A new ‘stratigraphy’: interpreting object relationships with 3D point densities

Towards the use of deep learning techniques for storm surge prediction

Towards the use of deep learning techniques for storm surge prediction

Using simple models to explore complex dynamics: A case study of macomona liliana (wedge-shell) and nutrient variations

Using simple models to explore complex dynamics: A case study of macomona liliana (wedge-shell) and nutrient variations

Development of Machine Learning methodology for genomic research

Development of Machine Learning methodology for genomic research

An Archaeological database for threatened North Island rock art in New Zealand

An Archaeological database for threatened North Island rock art in New Zealand

Presence: distributed mixed reality learning environment

Presence: distributed mixed reality learning environment

Digital video and the early learning lab

Digital video and the early learning lab

Publishing the Bay of Island Bottlenose dolphin catalogue

Publishing the Bay of Island Bottlenose dolphin catalogue

Modelling the diurnal cycle* of winds and clouds

Modelling the diurnal cycle* of winds and clouds

Presence: distributed mixed reality learning environment

Presence: distributed mixed reality learning environment

Using research virtual machines to analyse fMRI datasets

Using research virtual machines to analyse fMRI datasets

Genomic Virtual Lab (GVL) as a bioinformatics training platform

Genomic Virtual Lab (GVL) as a bioinformatics training platform

SwiftLaTeX- Exploring web-based true WYSIWYG editing for digital publishing

SwiftLaTeX- Exploring web-based true WYSIWYG editing for digital publishing

Climate change impacts on weather-related hazards

Climate change impacts on weather-related hazards

Understanding tumour evolution through augmented reality

Understanding tumour evolution through augmented reality

Myocardial motion tracking and strain calculation using Deep Learning networks

Myocardial motion tracking and strain calculation using Deep Learning networks

OnTask pilot at the Centre for Learning and Research in Higher Education

OnTask pilot at the Centre for Learning and Research in Higher Education

Visualising the University campus in 3D

Visualising the University campus in 3D

Visualising protein interaction

Visualising protein interaction

Biological heritage National Science Challenge eDNA virtual hub

Biological heritage National Science Challenge eDNA virtual hub

Interactive AR art – Project Gordon

Interactive AR art – Project Gordon

1-D numerical models of post-glacial river evolution

1-D numerical models of post-glacial river evolution

Mathematically modelling gastrointestinal electrical activity

Mathematically modelling gastrointestinal electrical activity

3D Cryo-EM reconstructions of macromolecular complexes

3D Cryo-EM reconstructions of macromolecular complexes

Engine knock in a spark-ignition engine with hydrogen supplementation

Engine knock in a spark-ignition engine with hydrogen supplementation

The complex unsteady flow within a fluid-filled annulus and its transition to turbulence

The complex unsteady flow within a fluid-filled annulus and its transition to turbulence

Using data mining for digital ink recognition

Using data mining for digital ink recognition

The landscape costs of brushtail possum dispersal

The landscape costs of brushtail possum dispersal

Accelerating the discovery of natural products made by orphan megasynthases

Accelerating the discovery of natural products made by orphan megasynthases

Improving the short term precipitation forecasts for New Zealand

Improving the short term precipitation forecasts for New Zealand

Finding genetic variants responsible  for human disease hiding in the universe of benign variants

Finding genetic variants responsible for human disease hiding in the universe of benign variants

Revealing key processes in enzyme efficiency through high performance computing

Revealing key processes in enzyme efficiency through high performance computing

3D Electromagnetic modeling and simulation using heterogeneous computing

3D Electromagnetic modeling and simulation using heterogeneous computing

Hemodynamics in the microcirculation

Hemodynamics in the microcirculation

Putting turbulence to work

Putting turbulence to work

Why are some molecules drugs?

Why are some molecules drugs?

Bayesian additive regression trees  vs logistic regression – estimation of propensity scores

Bayesian additive regression trees vs logistic regression – estimation of propensity scores

Fully coupled thermo-hydro-mechanical modelling of permeability enhancement by the finite element method

Fully coupled thermo-hydro-mechanical modelling of permeability enhancement by the finite element method

Modelling dispersal and ecological competition in a statistical phylogeographic framework

Modelling dispersal and ecological competition in a statistical phylogeographic framework

Studying the shape and the size of the universe

Studying the shape and the size of the universe

Planet hunting

Planet hunting

Simulating quantum mechanics on high performance computing cluster

Simulating quantum mechanics on high performance computing cluster

Multiscale modelling of saliva secretion

Multiscale modelling of saliva secretion

Modelling dual reflux pressure swing adsorption (DR-PSA) units for gas separation in natural gas processing

Modelling dual reflux pressure swing adsorption (DR-PSA) units for gas separation in natural gas processing

Improving the treatment of heart disease

Improving the treatment of heart disease

Estimating migration rates in the budding yeast Saccharomyces cerevisiae

Estimating migration rates in the budding yeast Saccharomyces cerevisiae

Number theoretic algorithms in cryptography

Number theoretic algorithms in cryptography

Molecular phylogenetics uses genetic data to reconstruct the evolutionary history of individuals, populations or species

Molecular phylogenetics uses genetic data to reconstruct the evolutionary history of individuals, populations or species

Phylogeny and phylogeography of the family kyphosidae (Perciformes: teleostei)

Phylogeny and phylogeography of the family kyphosidae (Perciformes: teleostei)

Testing what cosmic inflation really predicts

Testing what cosmic inflation really predicts

Multigene environmental DNA data analysis for New Zealand genomic observatory

Multigene environmental DNA data analysis for New Zealand genomic observatory

Finding genetic variants responsible for human disease hiding in universe of benign variants

Finding genetic variants responsible for human disease hiding in universe of benign variants

BEAST, Bayesian evolutionary analysis sampling trees

BEAST, Bayesian evolutionary analysis sampling trees

The formation of surface archaeological deposits in arid Australia

The formation of surface archaeological deposits in arid Australia

Statistical modelling of carryover effects after cessation of treatments

Statistical modelling of carryover effects after cessation of treatments

High-resolution cryo-electron microscopy of protein complexes and machines

High-resolution cryo-electron microscopy of protein complexes and machines

ARCI, archaeology eResearch collaboration initiative

ARCI, archaeology eResearch collaboration initiative

Optimisation of blades on large wind turbines with individual pitch control and trailing edge flaps

Optimisation of blades on large wind turbines with individual pitch control and trailing edge flaps

Quality of care and outcomes in children with cleft lip and/or palate

Quality of care and outcomes in children with cleft lip and/or palate

Geographic and temporal information retrieval on massive document collections

Geographic and temporal information retrieval on massive document collections

Homodynamics in the microcirculation

Homodynamics in the microcirculation

Processing structure-from-motion photogrammetry on the cluster

Processing structure-from-motion photogrammetry on the cluster

Computational investigation of catalysis mechanisms for polyurethane synthesis

Computational investigation of catalysis mechanisms for polyurethane synthesis

Virtual childhood obesity prevention laboratory

Virtual childhood obesity prevention laboratory

Giving Pacific research greater reach

Giving Pacific research greater reach

Development of novel waveguides  in the terahertz (THz) region

Development of novel waveguides in the terahertz (THz) region

Modelling of costs of diets  by INFORMAS

Modelling of costs of diets by INFORMAS

Foodback

Foodback

Finite element method code for  modelling biological cells

Finite element method code for modelling biological cells

The future of memory: Neuroimaging memory and imagination with functional MRI

The future of memory: Neuroimaging memory and imagination with functional MRI

Modelling and visualisation of calcium waves in parotid acinar cells

Modelling and visualisation of calcium waves in parotid acinar cells

Mapping donor contributions in the Pacific

Mapping donor contributions in the Pacific

Visualising humpback whale migration

Visualising humpback whale migration

Visualising the 2010 and 2011  Canterbury earthquakes

Visualising the 2010 and 2011 Canterbury earthquakes

Data management planning for MOA*

Data management planning for MOA*

Research data publishing  and preservation at COMPASS

Research data publishing and preservation at COMPASS

Centre for eResearch machine learning service

Centre for eResearch machine learning service

Building a discrete global  grid gazetteer service

Building a discrete global grid gazetteer service

The new Wanhal catalogue

The new Wanhal catalogue

Passive acoustic modelling

Passive acoustic modelling

Using GPUs to expand our understanding of the Solar System

Using GPUs to expand our understanding of the Solar System

Shedding new light on dark matter

Shedding new light on dark matter

Aerodynamics modelling paves the way for improved yacht designs

Aerodynamics modelling paves the way for improved yacht designs

Modernising models to help diagnose or treat disease and injury

Modernising models to help diagnose or treat disease and injury

Wandering around the molecular landscape: embracing virtual reality as a research showcasing outreach and teaching tool

Wandering around the molecular landscape: embracing virtual reality as a research showcasing outreach and teaching tool

ALTER: Between human and nonhuman – a VR art exhibition

ALTER: Between human and nonhuman – a VR art exhibition

Disposition of Microsoft HoloLenses for a Pop-Up Reality Shop to demonstrate the progress of a research project

Disposition of Microsoft HoloLenses for a Pop-Up Reality Shop to demonstrate the progress of a research project

Improving diagnosis for schistosomiasis by using the ‘metabolic footprint’ of urine samples from an animal model of Schistosoma infection to identify possible biomarkers

Improving diagnosis for schistosomiasis by using the ‘metabolic footprint’ of urine samples from an animal model of Schistosoma infection to identify possible biomarkers

Making stroke recovery prediction tools freely available

Making stroke recovery prediction tools freely available

MFT-ICR mass spectrometry data management and analysis workflow

MFT-ICR mass spectrometry data management and analysis workflow

Taking a ‘Big Data’ approach to find new clinical-omic associations in cancer

Taking a ‘Big Data’ approach to find new clinical-omic associations in cancer

Growing Up in New Zealand

Growing Up in New Zealand

Improving arrival time predictions for vehicles in a public transport network

Improving arrival time predictions for vehicles in a public transport network

Distributed and cloud-based control at field-level for systems interacting with soft bodies

Distributed and cloud-based control at field-level for systems interacting with soft bodies

Mobile Click Fraud Attack (MCFA)

Mobile Click Fraud Attack (MCFA)

Skin-omics: exploring the volatile organic compounds on human skin

Skin-omics: exploring the volatile organic compounds on human skin

New analytics tools for workload planning for the 2018 New Zealand Census

New analytics tools for workload planning for the 2018 New Zealand Census

Visualising the New Zealand Index of Multiple Deprivation

Visualising the New Zealand Index of Multiple Deprivation