Menu

#178 TeXMaths outputs "LaTeX Error: File `article.cls' not found"

v1.0_(example)
open
nobody
None
5
2024-02-08
2024-01-23
Cbhihe
No

Hello:
I saw other tickets on this subject but none of the suggested solutions worked for me.

The host is an up to date Arch linux running kernel 6.7.0, Writer v.7.6.4.1 (X86_64) / LibreOffice Community Build ID: 60(Build:1) with the TeXMaths v0.52 extension.
Trying to insert any LaTeX object (inline or otherwise), e.g. \left( hello \right), I get the following log file error:

This is pdfTeX, Version 3.141592653-2.6-1.40.25 (TeX Live 2023/Arch Linux) (preloaded format=latex 2023.9.17) 23 JAN 2024 15:23
entering extended mode
\write18 enabled.
%&-line parsing enabled.
**tmpfile.tex
(./tmpfile.tex
LaTeX2e <2022-11-01> patch level 1
L3 programming layer <2023-02-22>

! LaTeX Error: File `article.cls not found.

Type X to quit or to proceed,
or enter new name. (Default extension: cls)

Enter file name:
! Emergency stop.
<read *>

l.2 \usepackage
{amsmath}^^M
*** (cannot \read from terminal in nonstop modes)

Here is how much of TeXs memory you used:
23 strings out of 477813
481 string characters out of 5834415
1849385 words of memory out of 5000000
20357 multiletter control sequences out of 15000+600000
512287 words of font info for 32 fonts, out of 8000000 for 9000
62 hyphenation exceptions out of 8191
19i,0n,29p,78b,17s stack positions out of 10000i,1000n,20000p,200000b,200000s
No pages of output.

I have restarted LO with a new ~/.config/libreoffice/4/user profile but the problem does not go away.
I also made sure that dvisvgm is installed and so are texlive-basic and texlive-bin.

TeXMaths v0.49 and prior worked for me in the past.
Any pointers would be very welcome. Thank you.

Discussion

  • Roland Baudin

    Roland Baudin - 2024-01-26

    Hi, this sounds like your system uses pdftex instead of latex for compiling.
    Could you try this:

    cd ~/.config/libreoffice/4/user/TexMaths/tmp
    latex tmpfile.tex

    This should compile the last entered equation and give a valid tmpfile.dvi.

     
    • Cbhihe

      Cbhihe - 2024-02-03

      Hi Roland ! Thank you for your response and sorry for my late reply. I understand your suggestion is a manual workaround to the issue I have but essentially it does not fix my issue, meaning that it does not make my LO Weriter + plugin usable.

      Would you be so kind as to suggest something so I can get my plugin to behave as expected ?
      For instance would trying to get latex to compile instead of pdftex be part of your suggestion ? If so how should I go about this ?

      In the meantime, I have gone from Archlinux 6.7.0 to 6.7.3-arch1.1
      and I now work with LibreOffice v24.2.0.3 (X86_64) / LibreOffice Community Build ID: 420(Build:3) - Locale: ga-IE (en_US.UTF-8); UI: en-US
      and with TexMaths 0.52-1.

      Thank you.

       

      Last edit: Cbhihe 2024-02-03
      • Roland Baudin

        Roland Baudin - 2024-02-04

        Sorry, I was not clear: the command I gave you was for test purpose. Did it work?
        Could you send me a screenshot of your TexMaths configuration?

         
  • Cbhihe

    Cbhihe - 2024-02-04

    Ok, thank you. Here is the result of your suggestion:

    $ cd ~/.config/libreoffice/4/user/TexMaths/tmp
    $ ls
    tmpfile.log  tmpfile.out  tmpfile.tex  tmppath.txt  tmpuname.txt
    $ latex tmpfile.tex
    This is pdfTeX, Version 3.141592653-2.6-1.40.25 (TeX Live 2023/Arch Linux) (preloaded format=latex)
     restricted \write18 enabled.
    entering extended mode
    (./tmpfile.tex
    LaTeX2e <2022-11-01> patch level 1
    L3 programming layer <2023-02-22>
    
    ! LaTeX Error: File `article.cls' not found.
    
    Type X to quit or <RETURN> to proceed,
    or enter new name. (Default extension: cls)
    
    Enter file name: [I pressed the Enter key here]
    
    ! LaTeX Error: File `amsmath.sty' not found.
    
    Type X to quit or <RETURN> to proceed,
    or enter new name. (Default extension: sty)
    
    Enter file name: _
    

    The ~/.config/libreoffice/4/user/TexMaths/tmp/tmpfile.log only contains: "Error: please check your TexMaths configuration..."
    I also looked at the tmpfile.tex produced by my input trial:

    \documentclass[10pt,dvips]{article}
    \usepackage{amsmath}
    \usepackage{amssymb}
    \usepackage[usenames]{color}
    \usepackage{ifxetex}
    \usepackage{ifluatex}
    
    % XeLaTeX compiler
    \ifxetex
    
        \usepackage{fontspec}
        \usepackage{unicode-math}
    
        % Uncomment these lines for alternative fonts
        %\setmainfont{FreeSerif}
        %\setmathfont{FreeSerif}
    
    % LuaLaTeX compiler
    \else\ifluatex
    
        \usepackage{fontspec}
        \usepackage{lualatex-math}
    
    % LaTeX compiler
    \else
    
        % Uncomment this line for sans-serif maths font
        %\everymath{\mathsf{\xdef\mysf{\mathgroup\the\mathgroup\relax}}\mysf}
    
    \fi\fi
    
    
    \pagestyle{empty}
    \begin{document}
    
    \newsavebox{\eqbox}
    \newlength{\width}
    \newlength{\height}
    \newlength{\depth}
    
    \begin{lrbox}{\eqbox}
    \begin{math}
    \displaystyle \left[ x(t)=A(t) \time cos(\omega t) \right]
    \end{math}
    \end{lrbox}
    
    \settowidth {\width}  {\usebox{\eqbox}}
    \settoheight{\height} {\usebox{\eqbox}}
    \settodepth {\depth}  {\usebox{\eqbox}}
    \newwrite\file
    \immediate\openout\file=\jobname.bsl
    \immediate\write\file{Depth = \the\depth}
    \immediate\write\file{Height = \the\height}
    \addtolength{\height} {\depth}
    \immediate\write\file{TotalHeight = \the\height}
    \immediate\write\file{Width = \the\width}
    \closeout\file
    \usebox{\eqbox}
    \end{document}
    

    Hee are the TexMaths preferences (1 screen shot).
    For its config, I have under "Paths"
    /usr/bin/latex
    /usr/bin/xelatex
    /usr/bin/dvilualatex
    /usr/bindvipng
    /usr/bin/dvisvgm
    ... all correctly installed and referenced as above.

    I have under "Options"
    Compiler: Latex
    Equation caption: Equation
    Numbering level: 1
    Caption right alignment: selected

     

    Last edit: Cbhihe 2024-02-04
  • Roland Baudin

    Roland Baudin - 2024-02-06

    Ok, thanks for these informations.

    First, the LaTeX code for your equation is not correct. The correct code is:
    \left[ x(t) = A(t) \times \cos (\omega t ) \right] ('times' instead of 'time' and '\cos' instead of 'cos').

    Then, the output of the latex command should be something like this:

    This is pdfTeX, Version 3.141592653-2.6-1.40.22 (TeX Live 2022/dev/Debian) (preloaded format=latex)
     restricted \write18 enabled.
    entering extended mode
    (./tmpfile.tex
    LaTeX2e <2021-11-15> patch level 1
    L3 programming layer <2022-01-21>
    (/usr/share/texlive/texmf-dist/tex/latex/base/article.cls
    Document Class: article 2021/10/04 v1.4n Standard LaTeX document class
    (/usr/share/texlive/texmf-dist/tex/latex/base/size10.clo))
    (/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsmath.sty
    For additional information on amsmath, use the `?' option.
    (/usr/share/texlive/texmf-dist/tex/latex/amsmath/amstext.sty
    (/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsgen.sty))
    (/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsbsy.sty)
    (/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsopn.sty))
    (/usr/share/texlive/texmf-dist/tex/latex/amsfonts/amssymb.sty
    (/usr/share/texlive/texmf-dist/tex/latex/amsfonts/amsfonts.sty))
    (/usr/share/texlive/texmf-dist/tex/latex/graphics/color.sty
    (/usr/share/texlive/texmf-dist/tex/latex/graphics-cfg/color.cfg)
    (/usr/share/texlive/texmf-dist/tex/latex/graphics-def/dvips.def)
    (/usr/share/texlive/texmf-dist/tex/latex/graphics/dvipsnam.def))
    (/usr/share/texlive/texmf-dist/tex/generic/iftex/ifxetex.sty
    (/usr/share/texlive/texmf-dist/tex/generic/iftex/iftex.sty))
    (/usr/share/texlive/texmf-dist/tex/generic/iftex/ifluatex.sty)
    (/usr/share/texlive/texmf-dist/tex/latex/l3backend/l3backend-dvips.def)
    (./tmpfile.aux) (/usr/share/texlive/texmf-dist/tex/latex/amsfonts/umsa.fd)
    (/usr/share/texlive/texmf-dist/tex/latex/amsfonts/umsb.fd) [1] (./tmpfile.aux) 
    )
    Output written on tmpfile.dvi (1 page, 536 bytes).
    Transcript written on tmpfile.log.
    

    So, you probably have some LaTeX configuration issue in your system. Note that TexMaths calls the latex command to produce a DVI file.

    I suggest your reinstall texlive on your system and check that the latex command produces a DVI file.

    Note that the screenshot I need to check the TexMaths configuration is the one from the TexMaths configuration dialog (button with the gear icon).

     
    • Cbhihe

      Cbhihe - 2024-02-06

      Roland,
      Per your suggestion I uninstalled texlive-basic and libreoffice-extension-texmaths, both from the Archlinux extra repo. Upon reinstalling them (sudo pacman -S texlive-basic libreoffice-extension-texmaths) i was given the possibility to install further texlive related packages, eg. texlive-plaingeneric, texlive-binextra, texlive-context, texlive-fontutils, texlive-latex, texlive-mathscience and a few others.

      I re-installed all of the above and now the TeXmaths extension in LO is back to normal.

      I surmise that somehow this host's LaTeX installation was tempered with. Hence the disruption I experienced.

      Thank you very much for your help!
      TICKET CLOSED.

       
      • Roland Baudin

        Roland Baudin - 2024-02-08

        Hi, nice to hear it works now!

         

Log in to post a comment.