LyXErrors on Ps2pdf

Information and discussion about LyX, a WYSIWYM editor, available for Linux, Windows and Mac OS X systems.
Post Reply
diazdeus
Posts: 32
Joined: Fri Sep 28, 2018 9:34 pm

Errors on Ps2pdf

Post by diazdeus »

I have this error when I try to do ps2pdf on an scientific paper:

! Undefined control sequence.
\sin ->\sen
\nolimits
l.751 ... \textbf{momento} es$\:$ $mlH_{1}=mlH\sin
\alphaup$
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.

I attach the TeX archive.

This is the preamble:

\setcounter{chapter}{33}
\usepackage[pagestyles]{titlesec}
\usepackage{ifthen}
\usepackage{array}
\usepackage{graphicx}
\graphicspath{{G:/LyX/Moreu_Tomo_II/Figuras/}}
\usepackage{rotating}
\usepackage{longtable}
\usepackage{fnpos}
\usepackage{booktabs}
\usepackage{dcolumn}
\usepackage{slashbox}
\usepackage{pict2e}
\usepackage{multirow}
\usepackage{float}
\floatplacement{table}{tp}
\usepackage{morefloats}
\usepackage{flafter}
\usepackage{floatflt}
\usepackage{colortbl}
\usepackage{wrapfig}
\usepackage{enumitem}
\usepackage{nccparskip}
\usepackage{eso-pic,everyshi,calc}
\usepackage{dashrule}
\usepackage{marvosym}
\usepackage{amsbsy}
\usepackage{yhmath}
\usepackage{txfonts}
\usepackage{upgreek}
\usepackage{igo}
\usepackage{textcomp}
\usepackage{mathcomp}
\usepackage{gensymb}
\usepackage[e]{esvect}
\usepackage[spanish,es-nodecimaldot,es-tabla]{babel}
\usepackage{ccaption}
\usepackage[labelsep=endash,font={small,it},labelformat=simple,labelfont=bf,figurewithin=none,justification=centering]{caption}
\usepackage{nowidow}
\usepackage{subcaption}
\usepackage{pifont}




\renewcommand{\thechapter}{\Roman{chapter}}
\renewcommand{\thesection}{\ifnum\value{section}<10 \arabic{chapter}0\arabic{section}\else\arabic{chapter}\arabic{section}\fi}
\renewcommand{\sin}{\sen \nolimits}
\renewcommand{\cos}{\cos \nolimits}
\renewcommand{\arcsin}{\arcsen \nolimits}
\renewcommand{\sinh}{\senh \nolimits}
\renewcommand{\tan}{\tg \nolimits}
\renewcommand{\arctan}{\arctg \nolimits}
\renewcommand{\tanh}{\tgh \nolimits}
\renewcommand{\csc}{\cosec \nolimits}
\renewcommand{\cot}{\cotg \nolimits}
\renewcommand{\lg}{\log \nolimits}
\renewcommand{\theequation}{\arabic{chapter}.\arabic{equation}}
\renewcommand{\thetable}{\arabic{table}}

\addto\captionsspanish{\renewcommand{\figurename}{Fig.}}
\addto\captionsspanish{\renewcommand{\tablename}{Tabla}}

\DeclareMathOperator{\gs}{\textrm{\!\textdegree}}
\DeclareCaptionLabelFormat{tabla}{#2}

\titleformat{\chapter}[display]
{\Large\bfseries\fillast\vspace{-25pt}}
{\normalfont\bfseries\chaptername\hspace{5pt}\thechapter}
{.5ex minus .1ex}
{\large}[\vspace{-15pt}]

\titleformat{\section}[runin]
{\normalfont\bfseries}
{\thesection.}{.5em}{}[.---\:]

\titlespacing{\section}
{\parindent}{1.5ex plus .1ex minus .2ex}{0pt}

\makeatletter
\def\cleardoublepage{\clearpage\if@twoside \ifodd\c@page\else
\vspace*{\fill}
\thispagestyle{empty}
\newpage
\if@twocolumn\hbox{}\newpage\fi\fi\fi}

\def\dotfill#1{\cleaders\hbox to #1{.}\hfill}
\newcommand\dotline[2][.5em]{\leavevmode\hbox to #2{\dotfill{#1}\hfil}}
\makeatother

\setlist{noitemsep}
\setenumerate{labelindent=\parindent,leftmargin=*,labelsep=1em}
\setitemize{labelindent=\parindent,leftmargin=*,labelsep=1em}

\usepackage[bookmarks=true,bookmarksopen=true,bookmarksopenlevel=2,bookmarksnumbered=true,breaklinks=true]{hyperref}

\renewcommand{\frac}[2]{\genfrac{}{}{0.1pt}{}{#1}{#2}}
\renewcommand{\dfrac}[2]{\genfrac{}{}{0.1pt}{}{#1}{#2}}
\renewcommand{\cfrac}[2]{\genfrac{}{}{0.1pt}{}{#1}{#2}}

\renewcommand{\tfrac}[2]{\genfrac{}{}{0.1pt}{}{#1}{#2}}
\setlength\fboxrule{.1pt}
Attachments
archivo nuevo1.tex
(56.09 KiB) Downloaded 167 times

Recommended reading 2024:

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

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

Bartman
Posts: 369
Joined: Fri Jan 03, 2020 2:39 pm

Errors on Ps2pdf

Post by Bartman »

That looks like several typing errors, e.g. \sen instead of \sin.
diazdeus
Posts: 32
Joined: Fri Sep 28, 2018 9:34 pm

Errors on Ps2pdf

Post by diazdeus »

Thanks for your help and your time. In the .tex archive attached, you can see that it's not thrue. I wrote \sin, not \sen. And in the preamble, as you can see, exists these declarations:

\renewcommand{\sin}{\sen \nolimits}
\renewcommand{\cos}{\cos \nolimits}
\renewcommand{\tan}{\tg \nolimits}
User avatar
Ijon Tichy
Posts: 640
Joined: Mon Dec 24, 2018 10:12 am

Errors on Ps2pdf

Post by Ijon Tichy »

diazdeus wrote:Thanks for your help and your time. In the .tex archive attached, you can see that it's not thrue. I wrote \sin, not \sen. And in the preamble, as you can see, exists these declarations:

\renewcommand{\sin}{\sen \nolimits}
\renewcommand{\cos}{\cos \nolimits}
\renewcommand{\tan}{\tg \nolimits}
These definitions are wrong.
  • If \sen is not defined, every usage of \sin will result in an error, because it needs \sen.
  • You cannot define \cos using \cos, because every usage = expansion of \cos now will need to expand \cos, which needs to expand \cos, which needs to … so you get an infinite expansion loops. You could, e.g., define a new command \COS using the existing \cos.
  • Is \tg defined?
BTW: Please try to mark you code blocks in your posts. You can do so very easy using the Code button in the toolbar or the code tag as explained on the linked page.
Sorry, but I can no longer participate here as the administrator is trampling on my wishes on one of his other platforms. :cry:
diazdeus
Posts: 32
Joined: Fri Sep 28, 2018 9:34 pm

Errors on Ps2pdf

Post by diazdeus »

Thanks for your help, but I have another document with the same preamble and I don't have any problem to obtain the final pdf. In these equations I have the errors «Undefined control sequence» and «Limits control must follow a math operator»:

F=\sqrt{H^{2}+Z^{2}}\qquad H=F\cdot\cos\thetaup\qquad Z=F\cdot\sin\thetaup=H\cdot\tan\thetaup

Thanks.
User avatar
Ijon Tichy
Posts: 640
Joined: Mon Dec 24, 2018 10:12 am

Errors on Ps2pdf

Post by Ijon Tichy »

If you don't believe me, I cannot help you. Sorry.
Sorry, but I can no longer participate here as the administrator is trampling on my wishes on one of his other platforms. :cry:
rais
Posts: 419
Joined: Sun Nov 16, 2014 8:51 pm

Errors on Ps2pdf

Post by rais »

diazdeus wrote: ! Undefined control sequence.
\sin ->\sen
\nolimits
l.751 ... \textbf{momento} es$\:$ $mlH_{1}=mlH\sin
\alphaup$
\sen is defined by babel's Spanish language definition file (spanish.ldf), so you're either using a different language (where \sen is void), something went wrong with loading spanish.ldf, or spanish.ldf has changed (mine's v5.0p from March 2016, using TL'20).
diazdeus wrote: In these equations I have the errors «Undefined control sequence» and «Limits control must follow a math operator»:

F=\sqrt{H^{2}+Z^{2}}\qquad H=F\cdot\cos\thetaup\qquad Z=F\cdot\sin\thetaup=H\cdot\tan\thetaup
I'd rather expect

Code: Select all

! TeX capacity exceeded, sorry [input stack size=5000].
\cos ->\cos 
            \nolimits 
l.16 F=\sqrt{H^{2}+Z^{2}}\qquad H=F\cdot\cos
                                            \thetaup\qquad Z=F\cdot\sin\thet...

!  ==> Fatal error occurred, no output PDF file produced!
because of your infinite redefinition of \cos...
try this:

Code: Select all

\documentclass[spanish]{extbook}
\usepackage[T1]{fontenc}
\usepackage{amsmath}
\usepackage{txfonts}
\usepackage[spanish,es-nodecimaldot,es-tabla]{babel}

\renewcommand{\sin}{\sen \nolimits}
%\renewcommand{\cos}{\cos \nolimits}

\begin{document}
\[
\sin\betaup=\frac{R}{mlH}
\]

\[
F=\sqrt{H^{2}+Z^{2}}\qquad H=F\cdot\cos\thetaup\qquad Z=F\cdot\sin\thetaup=H\cdot\tan\thetaup
\]
\end{document}
And please have a look what a Infominimal working example is (and why you should provide one).

KR

Rainer
diazdeus
Posts: 32
Joined: Fri Sep 28, 2018 9:34 pm

Errors on Ps2pdf

Post by diazdeus »

OK., thank you. Your code works in my LyX, but not in my preamble. I attach ALL the book.
moreu_Tomo II_Borrador_14112020.tex
(387.96 KiB) Downloaded 246 times
Post Reply