LyXchkTeX on LyX2.1.4-MikTeX2.9-Win7

Information and discussion about LyX, a WYSIWYM editor, available for Linux, Windows and Mac OS X systems.
Post Reply
Jethro Belle
Posts: 4
Joined: Fri Feb 19, 2016 12:11 pm

chkTeX on LyX2.1.4-MikTeX2.9-Win7

Post by Jethro Belle »

Does anyone know how to make chkTeX work though LyX in windows? Any Links to the .exe and .dll files? :D
Does anyone know how to take advantage of developers from chkTeX to LyX to put the pieces in place? (I refrain from putting a feature request to LyX as they may bounce it as a MiKTeX problem ...).

Because I read |LyX|>Help>Additional_Features>Section7.1 on screen, I missed the footnote "chktex is not yet available when you are using the LaTeX distribution MiKTeX." :roll: The statement
invaluable tool when you are 'finishing up'
convinced me I needed to run it across my dissertation and show my LaTeX typsetting is better than MS-Word.

I found source: http://yildizoglu.blogspot.com.au/2009/ ... under.html that had achieved exactly what I need with earlier versions so I proceeded. Unfortunately the set-up files are no longer at the link. Miktex(on Doze) does not currently list this utility (The uncompiled files are all on CTAN). The first executable I got running (at DOS prompt) was from the TeXLive2015 ISO. The second version I got running was from http://newsgroups.derkeiler.com/Archive ... 00251.html

Following Murat Yildizoglu's instructions I have managed to get chktex to run in the cmd terminal and set up LyX to make the |Tools>Check TeX> menu item active, but when selected it up pops a message “could not run chktex successfully”. I beleive I am not getting the stdin-sdtout pipe set up through incorrect configuration or missing .dlls.

The post last week from chkTeX developer https://sourceforge.net/p/miktex/feature-requests/226/ wants MikTeX to make it part of the distribution :D . It appears MikTeX stopped caring in 2011 https://www.mail-archive.com/search?l=l ... newest&f=1 :( Given SublimeLinter-chktex https://github.com/SublimeLinter/SublimeLinter-chktex works through MikTeX is seems simply that no-one has compiled the windows binary for MikTeX (I cannot do it and have to use Windows, so I am stuck).

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

scottkosty
Site Moderator
Posts: 542
Joined: Sat Sep 01, 2012 6:38 am

Re: chkTeX on LyX2.1.4-MikTeX2.9-Win7

Post by scottkosty »

I don't know enough about Windows to help, but I just wanted to note that this works out-of-the box (if I remember correctly) on Ubuntu so there should be a way to get it working on Windows. Hope you get it figured out!
Jethro Belle
Posts: 4
Joined: Fri Feb 19, 2016 12:11 pm

Re: chkTeX on LyX2.1.4-MikTeX2.9-Win7

Post by Jethro Belle »

https://sourceforge.net/p/miktex/feature-requests/226/ indicates Christian will kindly compile the Windows executable for March :-) Thank you Christian :D I have created http://www.lyx.org/trac/ticket/9989 to ensure LyX takes advantage of this breakthrough ASAP.
scottkosty
Site Moderator
Posts: 542
Joined: Sat Sep 01, 2012 6:38 am

Re: chkTeX on LyX2.1.4-MikTeX2.9-Win7

Post by scottkosty »

Great, thanks for keeping us updated.
Jethro Belle
Posts: 4
Joined: Fri Feb 19, 2016 12:11 pm

chkTeX on LyX2.1.4-MikTeX2.9-Win7

Post by Jethro Belle »

Great news :-), but it will not work for me on my Win7-MikTeX(Latest)-Lyx V2.14.) :-( What follows is a fascimile of my posting to http://www.lyx.org/trac/ticket/9989 in case users here have input.

MiKTeX roadmap [http://miktex.org/kb/roadmap-2-9] May 2016 indicted ''Added:chktex'' so I installed (miktex-chktex-base) using Miktex Package Manager (Admin). Package name miktex-chktex-base (24234 kB) gives only file C:\Program Files (x86)\MiKTeX 2.9\chktex\chktex "This file is defines the checks done on the LaTeX" and C:\Program files (x86)\MiKTeX 2.9\tpm\packages miktex-chktex-base.tpm miktex-chktex-bin-2.9.tpm and miktex-chktex-bin-x64-2.9.tpm

To get the executable I had to install miktex-chktex-bin-2.9 that is titled "CJK font utilities" (111835kB) but the description states " This package includes the ChkTeX utility" It places the executable in C:\Program Files (x86)\MiKTeX 2.9\miktex\bin\chktex.exe

The initial install required the package 'next'!? which MikTeX installed in the background (specifically it could not find MiKTeX209-next-texmf.dll)
After |LyX|Tools>Reconfigure> the menu item |Tools>Check TeX> appeared. This seems to be caused by the reconfigure writing chktex -n1 -n3 -n6 -n9 -n22 -n25 -n30 -n38 into the |Tools>Output> [+Output-LaTeX+] CheckTeX command field.

When I exited |LyX| it did not save this command, so I saved it manually.

After several re-installs/reconfigures I always get LyX: chktex failure "Could not run chktex successfully" when trying to run it |LyX|tools>Check TeX>


The |Help>Additional features> 7.1 by asger Alstrup''' (for which access to ChkTeX on windows/MikTex makes footnote 1 redundant)''' is excellent but sheds no light on the what to do about the error message.

ChkTeX ran from the command line correctly, returning "ChkTeX v1.7.5 compiled with POSIX extended regex support" in response to the -w option.

entering chktex.exe -v -o 'Errors_out' 'filename'.tex at the CMD prompt correctly created the error file 'Errors_out'

Given I made many previous attempts to make ChkTeX work before this official MikTeX release, it could be I have altered a setting/file somewhere. Can anyone get it to work? Any ideas? Is it that LyX is not interfacing with the MiKTeX ChkTeX build?
Post Reply