How to Check Spelling, Grammar and Plagiarism in LaTeX Document?

Includes PGF, TikZ, PSTricks, and platforms/distributions: Kile, TeXstudio, TeXmaker, TeXnicCenter, MiKTeX, LyX
Post Reply
User avatar
Eli
Senior Expert Member
Reactions: 183
Posts: 5334
Joined: 9 years ago
Location: Tanzania
Has thanked: 75 times
Been thanked: 88 times
Contact:

#1

LaTeX is a set of macro packages built on top of TeX system. TEX, on the other hand, is an advanced typesetting system primarily developed by Donald Ervin Knuth. Donald Knuth is an American computer scientist, mathematician, and professor emeritus at Stanford University, well known for the authorship of the multi-volume work on The Art of Computer Programming, read more. LaTeX, the document preparation system, was first developed by an American computer scientist, Leslie B. Lamport, who also authored the first LaTeX manual. He is best known for his seminal work on distributed systems.

Typesetting with LaTeX requires an editor, such as TeXStudio, Kile and so on. Currently, there are millions of researchers that use LaTeX to write their papers, the number is even astonishingly large when it comes to hard sciences. LaTeX usage, especially in the scientific and technical research writing and publishing community is undoubtedly a progressive requirement. For some universities and publishing companies, LaTeX has become a de-facto standard. Hundreds of Journals use LaTeX with their own custom paper templates. LaTeX is preferred for many reasons, it produces high-quality documents in several formats, it is stable, flexible, scalable, cost-free, publisher-friendly, and more importantly, platform-independent. However, LaTeX offers unlimited customizable formatting options, and automatic updating of bibliography and references where switching between various formats can be achieved with just one command, see here!

Any writing tool, however, requires grammar checking, spell checking, and plagiarism detection applications on top of it for a seamlessly great writing style. No doubt the Grammarly.com grammar checker is gaining popularity in this area. This digital writing tool deploys artificial intelligence (machine learning and deep learning algorithms) and natural language processing to facilitate writing. Specifically, Grammarly application automatically detects potential grammar, spelling, punctuation, word choice, and style mistakes in writing, following common linguistic prescription, while flagging potential issues in the text, and suggesting context-specific corrections for grammar, spelling, wordiness, style, punctuation, and possible plagiarism. It currently works as an extension for multiple browsers, and also with email services, like Gmail, including several desktop environments, such as those with the Microsoft Office.

Unfortunately, Grammarly, even other well-known tools such as Language Tool (LanguageTool) does not friendly work with LaTeX. Apart from being a very great software for fashioning high profile documents, LaTeX has integrated packages that only offer very limited grammar checking, let alone plagiarism detection services.

Such LaTeX limitations have forced people to find indirect ways of using external editors for TeX document grammar enhancement. One way of checking grammar in a LaTeX document is to use detex (see also OpenDetex) to extract text from LaTeX, and then, employ any grammar checker integrated editor to work with the resulting document. Detex is free software that can remove TeX constructs from a TeX file. It recognizes the \input command. Detex assumes it is dealing with LaTeX input if it sees the string \begin{document} in the text. In this case, it also recognizes the \include and \includeonly commands and other more. Once TeX constructs are removed, it becomes easier for grammar checkers such as Grammarly, using a supportive editor to check grammar and spelling.

LanguageTool is another Open Source proofreading program for English, French, German, Russian, and more than 20 other languages. Language Tool is a Java application available in many repositories and platforms (see here), it integrates nicely with TeXstudio for LaTeX, see instructions for Windows operating system. This tool also interfaces well with emacs editor, and its usage is described on the respective GitHub repository. LanguageTool seems to also support vim, see https://github.com/vim-scripts/LanguageTool.

LanguageTool can be installed on Ubuntu Linux, via snap:

  1. sudo snap install languagetool


"A correction tool for LaTeX documents", teXtidote, is a free and os-independent tool, that requires Java, which has been claimed to work directly with LaTeX. It has the ability to remove markup from the TeX file and send the text to the Language Tool library. The LanguageTool then performs verification of both spelling and grammar in a number of languages, while keeping track of the relative position of words between the original and the grammar-checked text. It translates the messages from LanguageTool back to their proper original location in the LaTeX file. TeXtidote produces an HTML report by default, that shows the original sources, with the errors found by LanguageTool highlighted at the correct location, find out more from its GitHub repository.

See also plagiarism detection tools alternatives here.
0
TSSFL -- A Creative Journey Towards Infinite Possibilities!
User avatar
Eli
Senior Expert Member
Reactions: 183
Posts: 5334
Joined: 9 years ago
Location: Tanzania
Has thanked: 75 times
Been thanked: 88 times
Contact:

#2

LaTeX users have got an alternative for Grammarly, the LanguageTool which crazily works perfectly with TeXtidote. To get TeXtidote up and running under Debian OS including its derivatives, such as Ubuntu, install it using dpkg.

Firstly, download the latest .deb file from the Releases page, and if we assume the name of the .deb file downloaded is called textidote_0.8.1_all.deb, you can then move to the directory where you have downloaded it and install TeXtidote as

  1. $sudo apt-get install ./textidote_0.8.1_all.deb


The ./ is mandatory.

Test the TeXtidote with the LanguageTool by downloading this example.tex LaTeX file, save it, move to the directory containing example.tex file and run the command:

  1. $textidote --output html example.tex > report.html


You will see the message on the Terminal similar to

Found 21 warning(s)
Total analysis time: 0 second(s
)

and a file named report.html is produced. Open this Html file with any of your favorite browsers. This Html file has highlights which show error messages about the errors in the example.tex upon hovering the mouse over highlighted portions.
0
TSSFL -- A Creative Journey Towards Infinite Possibilities!
Post Reply

Return to “LaTeX and MathJax”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 3 guests