LyX ⇒ No automatic line break in paragraph title
No automatic line break in paragraph title
Hi.
I've been using LyX for quite a while now, but now i faced a problem i never had before:
in paragraph titles, there is no line break, so the title goes over the margin of the mage. same think with the title in the table of contents.
can somebody help me? thanks in advance.
I've been using LyX for quite a while now, but now i faced a problem i never had before:
in paragraph titles, there is no line break, so the title goes over the margin of the mage. same think with the title in the table of contents.
can somebody help me? thanks in advance.
NEW: TikZ book now 40% off at Amazon.com for a short time.

- Johannes_B
- Site Moderator
- Posts: 4182
- Joined: Thu Nov 01, 2012 4:08 pm
No automatic line break in paragraph title
Welcome,
In case you are putting whole paragraphs of text into
If not, and i think you don't, can you show us a very minimal lyx example? Even better would be the export to LaTeX.
paragraph
was a strangely chosen word for a sectional heading and it leads to confusion. In case you are putting whole paragraphs of text into
paragraphs
, don't. If not, and i think you don't, can you show us a very minimal lyx example? Even better would be the export to LaTeX.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
No automatic line break in paragraph title
Hi.
well, i sort of HAVE to use some pretty long titles. i tried it with "normal language", and the line breaks seem to work fine. but if it's names of chemicals, for example, lyx just doesn't know where to put the break.
on some names, it gets it right, on others it doesn't.
so, here's the resulting PDF:
well, i sort of HAVE to use some pretty long titles. i tried it with "normal language", and the line breaks seem to work fine. but if it's names of chemicals, for example, lyx just doesn't know where to put the break.
on some names, it gets it right, on others it doesn't.
Code: Select all
%% LyX 2.1.4 created this file. For more info, see http://www.lyx.org/.
%% Do not edit unless you really know what you are doing.
\documentclass[12pt,ngerman]{article}
\usepackage[T1]{fontenc}
\usepackage[latin9]{inputenc}
\usepackage{geometry}
\geometry{verbose,tmargin=2.5cm,bmargin=2.5cm,lmargin=2.5cm,rmargin=2.5cm}
\setcounter{secnumdepth}{5}
\setcounter{tocdepth}{5}
\setlength{\parskip}{\smallskipamount}
\setlength{\parindent}{0pt}
\usepackage{float}
\usepackage{textcomp}
\usepackage{setspace}
\usepackage{subscript}
\onehalfspacing
\makeatletter
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.
\hyphenation{penta-methyl-cyclo-penta-dienyl}
\usepackage{caption}
\usepackage{tocloft}
\usepackage{overcite}
\usepackage{longtable}
\makeatletter
\renewcommand\@biblabel[1]{#1 }
\def\@citess#1{\textsuperscript{[#1]}}
\makeatother
\captionsetup{margin=15pt,font={small,rm},labelfont={small,sl, bf},format=plain,indention=0em,labelsep=colon,justification=centering,position=bottom}
\setcounter{page}{-4}
\addtolength{\cftparskip}{1pt}
\addtocontents{toc}{\protect\thispagestyle{empty}}
\tolerance=4000
\makeatletter
\@addtoreset{figure}{section}
\@addtoreset{figure}{subsection}
\@addtoreset{figure}{subsubsection}
\@addtoreset{figure}{paragraph}
\makeatother
%\renewcommand*{\figureformat}{\arabic{section}.\arabic{subsection}.\arabic{subsubsection}.\arabic{paragraph}.\arabic{figure}}
\renewcommand\thefigure{\thesection%
\ifnum\arabic{subsection} = 0 \relax\else .\arabic{subsection}\fi%
\ifnum\arabic{subsubsection} = 0 \relax\else .\arabic{subsubsection}\fi%
\ifnum\arabic{paragraph} = 0 \relax\else .\arabic{paragraph}\fi%
-\arabic{figure}%
}
\makeatother
\usepackage{babel}
\begin{document}
\tableofcontents{}
\section{(in,in-\{{[}RuII(trpy)(H\protect\textsubscript{2}O){]}\protect\textsubscript{2}(\textmu -bpp)\}\protect\textsuperscript{3+ }(2,2\textasciiacute :6\textasciiacute ,2\textasciiacute \textasciiacute -terpyridine,
bis(2-pyridyl)-3,5-pyrazolate))}
\subsection{(in,in-\{{[}RuII(trpy)(H\protect\textsubscript{2}O){]}\protect\textsubscript{2}(\textmu -bpp)\}\protect\textsuperscript{3+ }(2,2\textasciiacute :6\textasciiacute ,2\textasciiacute \textasciiacute -terpyridine,
bis(2-pyridyl)-3,5-pyrazolate))}
\subsubsection{(in,in-\{{[}RuII(trpy)(H\protect\textsubscript{2}O){]}\protect\textsubscript{2}(\textmu -bpp)\}\protect\textsuperscript{3+ }(2,2\textasciiacute :6\textasciiacute ,2\textasciiacute \textasciiacute -terpyridine,
bis(2-pyridyl)-3,5-pyrazolate))}
\paragraph{(in,in-\{{[}RuII(trpy)(H\protect\textsubscript{2}O){]}\protect\textsubscript{2}(\textmu -bpp)\}\protect\textsuperscript{3+ }(2,2\textasciiacute :6\textasciiacute ,2\textasciiacute \textasciiacute -terpyridine,
bis(2-pyridyl)-3,5-pyrazolate))}
$\;$
m
\end{document}
- Attachments
-
- sim0neLyxToc.png (183.72 KiB) Viewed 15271 times
- Johannes_B
- Site Moderator
- Posts: 4182
- Joined: Thu Nov 01, 2012 4:08 pm
Re: No automatic line break in paragraph title
That was recently discussed in our german sister forum. http://golatex.de/viewtopic,p,78466.html#78466
When i have more time, i add some explanation here as well.
When i have more time, i add some explanation here as well.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
Re: No automatic line break in paragraph title
thanks for the link.
i do speak german, and i see that it's quite the same problem as mine. still, i'm not THAT much into latex to understand what's going on. that's the reason why i'm using LyX
so if there is a WYSIWYG kind of solution to this problem, please let me know. if you can somehow explain it in german, i could translate it so you have less work to do putting it up here on the english forum as well.
i do speak german, and i see that it's quite the same problem as mine. still, i'm not THAT much into latex to understand what's going on. that's the reason why i'm using LyX

so if there is a WYSIWYG kind of solution to this problem, please let me know. if you can somehow explain it in german, i could translate it so you have less work to do putting it up here on the english forum as well.
No automatic line break in paragraph title
Chemical names always are a problem and there is no one fits all solution. However, there are measures you can take to make things easier. As a LyX user they would require ERT, though…
For one thing I'd use the microtype package and chemmacros in combination with chemformula. This should help in many cases already:
Adding
Regards
For one thing I'd use the microtype package and chemmacros in combination with chemformula. This should help in many cases already:
Code: Select all
\documentclass[12pt,ngerman]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[showframe]{geometry}
\geometry{
verbose,
tmargin=2.5cm,
bmargin=2.5cm,
lmargin=2.5cm,
rmargin=2.5cm
}
\setcounter{secnumdepth}{5}
\setcounter{tocdepth}{5}
\usepackage{microtype}
\usepackage{babel}
\usepackage{chemmacros}
\chemsetup{
formula = chemformula ,
greek = upgreek
}
\newcommand*\chemprime{\ensuremath{^\prime}}
\NewChemIUPACShorthand'\chemprime
\begin{document}
\tableofcontents
\section{\ch{(in,in) "-" \{[RuII(trpy)(H2O)]2( "\m-bpp" )\}^3+}
(\iupac{2,2':6',2''-ter|pyridine, bis(2-pyridyl)-3,5-pyrazolate)})}
\subsection{\ch{(in,in) "-" \{[RuII(trpy)(H2O)]2( "\m-bpp" )\}^3+}
(\iupac{2,2':6',2''-ter|pyridine, bis(2-pyridyl)-3,5-pyrazolate)})}
\subsubsection{\ch{(in,in) "-" \{[RuII(trpy)(H2O)]2( "\m-bpp" )\}^3+}
(\iupac{2,2':6',2''-ter|pyridine, bis(2-pyridyl)-3,5-pyrazolate)})}
\paragraph{\ch{(in,in) "-" \{[RuII(trpy)(H2O)]2( "\m-bpp" )\}^3+}
(\iupac{2,2':6',2''-ter|pyridine, bis(2-pyridyl)-3,5-pyrazolate)})}
Hello
\end{document}
\sloppy
at appropriate places may cure the remaining problems:Code: Select all
\documentclass[12pt,ngerman]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[showframe]{geometry}
\geometry{
verbose,
tmargin=2.5cm,
bmargin=2.5cm,
lmargin=2.5cm,
rmargin=2.5cm
}
\setcounter{secnumdepth}{5}
\setcounter{tocdepth}{5}
\usepackage{microtype}
\usepackage{babel}
\usepackage{chemmacros}
\chemsetup{
formula = chemformula ,
greek = upgreek
}
\newcommand*\chemprime{\ensuremath{^\prime}}
\NewChemIUPACShorthand'\chemprime
\begin{document}
\tableofcontents
\section{\ch{(in,in) "-" \{[RuII(trpy)(H2O)]2( "\m-bpp" )\}^3+}
(\iupac{2,2':6',2''-ter|pyridine, bis(2-pyridyl)-3,5-pyrazolate)})}
{\sloppy
\subsection{\ch{(in,in) "-" \{[RuII(trpy)(H2O)]2( "\m-bpp" )\}^3+}
(\iupac{2,2':6',2''-ter|pyridine, bis(2-pyridyl)-3,5-pyrazolate)})}
}
{\sloppy
\subsubsection{\ch{(in,in) "-" \{[RuII(trpy)(H2O)]2( "\m-bpp" )\}^3+}
(\iupac{2,2':6',2''-ter|pyridine, bis(2-pyridyl)-3,5-pyrazolate)})}
}
\paragraph{\ch{(in,in) "-" \{[RuII(trpy)(H2O)]2( "\m-bpp" )\}^3+}
(\iupac{2,2':6',2''-ter|pyridine, bis(2-pyridyl)-3,5-pyrazolate)})}
Hello
\end{document}
site moderator & package author
Re: No automatic line break in paragraph title
wow, that's very nice. thanks a lot.
but still, the headlines are too long for the page number to show up. they should be even shorter. is that possible?
but still, the headlines are too long for the page number to show up. they should be even shorter. is that possible?
No automatic line break in paragraph title
What do you mean by headlines? The header?sim0ne wrote:but still, the headlines are too long for the page number to show up. they should be even shorter. is that possible?
site moderator & package author