Hello to all.
I am writing a book (two sides) on astronomy and navigation with a lot of figures, tables and equations. I don't have any problem to reference in the text to the apropiate labels of figures, tables, equations and chapters, but when I put a label in a section title I have this two errors in the errors window and obviuosly LyX don't produce the dvi output:
Error 1:
Argument of \ttl@straight@i has an extra }.
\section{Leyes de la fuerza magnética}
I've run across a `}' that doesn't seem to match anything.
For example, `\def\a#1{...}' and `\a}' would produce
this error. If you simply proceed now, the `\par' that
I've just inserted will cause me to report a runaway
argument that might be the root of the problem. But if
your `}' was spurious, just type `2' and it will go away.
Error 2:
Paragrapgh ended before \ttl@straight@i was complete.
\section{Leyes de la fuerza magnética}
I suspect you've forgotten a `}', causing me to apply this
control sequence to too much text. How can we recover?
My plan is to forget the whole thing and hope for the best.
My book begins in the Chapter LXII because is the third of a collection and the sections, figures, tables and equations are numerated acorddly. So, in my preamble I have this first command:
\setcounter{chapter}{61}
In addition, I need to enumerate the sections in the form 6601, 6602, 6603....6701, 6702,....etc.. I do that with the sentence:
\renewcommand{\thesection}{\ifnum\value{section}<10 \arabic{chapter}0\arabic{section}\else\arabic{chapter}\arabic{section}\fi}
My book is in spanish language and my complete preamble is this one:
%% LyX 1.6.4 created this file. For more info, see http://www.lyx.org/.
%% Do not edit unless you really know what you are doing.
\documentclass[spanish]{book}
\usepackage[T1]{fontenc}
\usepackage[latin9]{inputenc}
\usepackage[paperwidth=152mm,paperheight=241mm]{geometry}
\geometry{verbose,tmargin=2cm,bmargin=2cm,lmargin=2cm,rmargin=1.5cm,headheight=12pt,headsep=10pt}
\pagestyle{empty}
\setcounter{secnumdepth}{3}
\setcounter{tocdepth}{3}
\usepackage{units}
\usepackage{textcomp}
\usepackage{amsmath}
\usepackage{wasysym}
\usepackage{amssymb}
\makeatletter
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LyX specific LaTeX commands.
\newcommand{\noun}[1]{\textsc{#1}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Textclass specific LaTeX commands.
\newenvironment{lyxlist}[1]
{\begin{list}{}
{\settowidth{\labelwidth}{#1}
\setlength{\leftmargin}{\labelwidth}
\addtolength{\leftmargin}{\labelsep}
\renewcommand{\makelabel}[1]{##1\hfil}}}
{\end{list}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.
\setcounter{chapter}{61}
\usepackage[pagestyles]{titlesec}
\usepackage{ifthen}
\usepackage{graphicx}
\usepackage{booktabs}
\usepackage{float}
\usepackage{floatflt}
\usepackage{colortbl}
\usepackage{wrapfig}
\usepackage{enumitem}
\usepackage{eso-pic,everyshi,calc}
\usepackage{pst-math,pstricks-add}
\usepackage{marvosym}
\usepackage{amssymb}
\usepackage{amsbsy}
\usepackage{mathtools}
\usepackage{yhmath}
\usepackage{txfonts}
\usepackage{textcomp}
\usepackage{mathcomp}
\usepackage{gensymb}
\usepackage[e]{esvect}
\usepackage[spanish]{babel}
\usepackage{ccaption}
\usepackage[labelsep=endash,font={small,it},labelformat=simple,labelfont=bf,figurewithin=none,justification=centering]{caption}
\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{\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}}
\addto\captionsspanish{\renewcommand{\figurename}{Fig.}}
\DeclareMathOperator{\gs}{\textrm{\!\textdegree}}
\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}
\makeatother
\setlist{noitemsep}
\setenumerate{labelindent=\parindent,leftmargin=*,labelsep=1em}
\setitemize{labelindent=\parindent,leftmargin=*,labelsep=1em}
\clubpenalty=10000
\widowpenalty=10000
\usepackage[bookmarks=true,bookmarksopen=true,bookmarksopenlevel=2,bookmarksnumbered=true]{hyperref}
\makeatother
\usepackage{babel}
\addto\shorthandsspanish{\spanishdeactivate{~<>}}
Thank you very much for your help.
LyX ⇒ Problem with references
NEW: TikZ book now 40% off at Amazon.com for a short time.
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Problem with references
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Re: Problem with references
OK. Thank you very much to localghost for his reply. So, without nothing, any other time, this is the errors that I have:
Hello to all.
I am writing a book (two sides) on astronomy and navigation with a lot of figures, tables and equations. I don't have any problem to reference in the text to the apropiate labels of figures, tables, equations and chapters, but when I put a label in a section title I have this two errors in the errors window and obviuosly LyX don't produce the dvi output:
Error 1:
Argument of \ttl@straight@i has an extra }.
\section{Leyes de la fuerza magnética}
I've run across a `}' that doesn't seem to match anything.
For example, `\def\a#1{...}' and `\a}' would produce
this error. If you simply proceed now, the `\par' that
I've just inserted will cause me to report a runaway
argument that might be the root of the problem. But if
your `}' was spurious, just type `2' and it will go away.
Error 2:
Paragrapgh ended before \ttl@straight@i was complete.
\section{Leyes de la fuerza magnética}
I suspect you've forgotten a `}', causing me to apply this
control sequence to too much text. How can we recover?
My plan is to forget the whole thing and hope for the best.
My book begins in the Chapter LXII because is the third of a collection and the sections, figures, tables and equations are numerated acorddly. So, in my preamble I have this first command:
\setcounter{chapter}{61}
In addition, I need to enumerate the sections in the form 6601, 6602, 6603....6701, 6702,....etc.. I do that with the sentence:
\renewcommand{\thesection}{\ifnum\value{section}<10 \arabic{chapter}0\arabic{section}\else\arabic{chapter}\arabic{section}\fi}
My book is in spanish language.
Thank you very much, any other time, for your help and your minimal time.
Hello to all.
I am writing a book (two sides) on astronomy and navigation with a lot of figures, tables and equations. I don't have any problem to reference in the text to the apropiate labels of figures, tables, equations and chapters, but when I put a label in a section title I have this two errors in the errors window and obviuosly LyX don't produce the dvi output:
Error 1:
Argument of \ttl@straight@i has an extra }.
\section{Leyes de la fuerza magnética}
I've run across a `}' that doesn't seem to match anything.
For example, `\def\a#1{...}' and `\a}' would produce
this error. If you simply proceed now, the `\par' that
I've just inserted will cause me to report a runaway
argument that might be the root of the problem. But if
your `}' was spurious, just type `2' and it will go away.
Error 2:
Paragrapgh ended before \ttl@straight@i was complete.
\section{Leyes de la fuerza magnética}
I suspect you've forgotten a `}', causing me to apply this
control sequence to too much text. How can we recover?
My plan is to forget the whole thing and hope for the best.
My book begins in the Chapter LXII because is the third of a collection and the sections, figures, tables and equations are numerated acorddly. So, in my preamble I have this first command:
\setcounter{chapter}{61}
In addition, I need to enumerate the sections in the form 6601, 6602, 6603....6701, 6702,....etc.. I do that with the sentence:
\renewcommand{\thesection}{\ifnum\value{section}<10 \arabic{chapter}0\arabic{section}\else\arabic{chapter}\arabic{section}\fi}
My book is in spanish language.
Thank you very much, any other time, for your help and your minimal time.