General ⇒ seeking tips for pasting into Word
-
- Posts: 16
- Joined: Tue May 25, 2010 10:38 pm
seeking tips for pasting into Word
One of the parameters I set allows me to cut&paste from the pdf file into Word to do grammar&spelling checks. It disables ligatures and hyphenations and gets rid of page numbering.
What I have right now:
\newboolean{ForGrammarCheck}
\setboolean{ForGrammarCheck}{true}
\ifthenelse{\boolean{ForGrammarCheck}}{
\DisableLigatures{encoding = *, family = * } % to disable ligatures
\usepackage[none]{hyphenat} % disable hyphenations
}{}
<then down after the begin document>
\ifthenelse{\boolean{ForGrammarCheck}}{
\pagestyle{empty} % disable page numbering
}{}
There are a couple of problems that I have. The first one is that any open quotation mark gets pasted in as two accent characters. To the eye, it's okay, but it end up confusing Word's grammar checker as it doesn't recognize it as a quotation mark.
The second problem that I have is that each line gets pasted in as its own paragraph.
Right now, I go through and do a global replace of `` to " and paragraph marks to spaces. This seems to do the trick, but ends up being extra steps that I'd rather not have to do every time I want to do a grammar check.
Does anyone know how I can better streamline this process?
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
seeking tips for pasting into Word
Why do you need Word for spell checking? Common LaTeX editors like TeXnicCenter (TXC) offer this feature for direct check of the sources. Necessary dictionaries can be downloaded within TXC.novicedude wrote:[...] One of the parameters I set allows me to cut&paste from the pdf file into Word to do grammar&spelling checks. [...]
Best regards and welcome to the board
Thorsten
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
-
- Posts: 16
- Joined: Tue May 25, 2010 10:38 pm
Re: seeking tips for pasting into Word
As a result, a TeX based spelling checker is going to spend a lot of time flagging words with embedded commands.
Those also only check spelling. My grammar and writing style are sucks. I need something that also checks it.
-
- Posts: 16
- Joined: Tue May 25, 2010 10:38 pm
Re: seeking tips for pasting into Word
\textwidth=85.0in
\paperwidth 87.75in
inside the CheckForGrammar if/then part. This makes the page width humongous so a whole paragraph fits on a single line and cutting and pasting into Word wont get all the extra paragraph markers.
But I'm kind of clueless on what to do about the quotation marks.
seeking tips for pasting into Word

About copyping the quotation marks, I'd say they would have to be properly masked first and then marked and copied. You could try a start with using the file
Code: Select all
glyphtounicode.tex
Code: Select all
\input{glyphtounicode}
(you'll find the file in the TeXLive distribution)
-
- Posts: 16
- Joined: Tue May 25, 2010 10:38 pm
seeking tips for pasting into Word
Code: Select all
\pdfglyphtounicode{quoteleft}{0027}
\pdfglyphtounicode{quotedblleft}{0022}
Thank you