Closed tdegeus closed 2 years ago
Thanks for this, I'll take a look soon and see what I can do :)
Thanks for this, and apologies for the delay.
latexindent.pl
defines a sentence as having to:
So in your code, this means that
For a slip event at interface $s$, we have $\Delta R_s > 0$ and $\Delta R_i = 0$ for $i \neq s$, inducing
\begin{equation}
\label{eq:delta_fi}
\Delta f_i = K\Delta R_s \,\, \mathrm{for} \,\, i \geq s ; \quad \Delta f_i=0 \,\, \mathrm{otherwise}.
is a sentence. So, with your code, the line breaks within this sentence will be removed.
We can employ poly-switches to undo the line break removal using
modifyLineBreaks:
oneSentencePerLine:
manipulateSentences: 1
removeSentenceLineBreaks: 1
textWrapSentences: 1
environments: # <----
BeginStartsOnOwnLine: 1 # <----
BodyStartsOnOwnLine: 1 # <---- NEW
mandatoryArguments: # <----
label: # <----
RCuBFinishesWithLineBreak: 1 # <----
which gives
For a slip event at interface $s$, we have $\Delta R_s > 0$ and $\Delta R_i = 0$ for $i \neq s$, inducing
\begin{equation}
\label{eq:delta_fi}
\Delta f_i = K\Delta R_s \,\, \mathrm{for} \,\, i \geq s ; \quad \Delta f_i=0 \,\, \mathrm{otherwise}.
\end{equation}
We can then deduce that
\begin{equation}
\label{eq:DR_DF_multi}
\Delta F = \frac{h K}{H} \Delta R_s \sum\limits_{i=s}^n i \, = \frac{h K}{H}\Delta R_s (n+s)(n-s+1) / 2.
\end{equation}
which we verify in \cref{fig:2c}.
We can tweak what a sentence is by saying that sentences should end with \begin{<something>}
modifyLineBreaks:
oneSentencePerLine:
manipulateSentences: 1
removeSentenceLineBreaks: 1
textWrapSentences: 1
sentencesEndWith: # <----
other: |- # <----
(?x) \\begin\{[a-zA-Z]+?\} # <---- NEW
environments: # <----
BeginStartsOnOwnLine: 1 # <----
and in which case we receive, again,
For a slip event at interface $s$, we have $\Delta R_s > 0$ and $\Delta R_i = 0$ for $i \neq s$, inducing
\begin{equation}
\label{eq:delta_fi}
\Delta f_i = K\Delta R_s \,\, \mathrm{for} \,\, i \geq s ; \quad \Delta f_i=0 \,\, \mathrm{otherwise}.
\end{equation}
We can then deduce that
\begin{equation}
\label{eq:DR_DF_multi}
\Delta F = \frac{h K}{H} \Delta R_s \sum\limits_{i=s}^n i \, = \frac{h K}{H}\Delta R_s (n+s)(n-s+1) / 2.
\end{equation}
which we verify in \cref{fig:2c}.
I couldn't replicate the behaviour you describe "spurious white line is introduced at the end"....
Does this help? Let me know :)
Thanks! That does indeed solve things. Concerning my issue 2: I can no longer reproduce it either with the new settings. Let me open a new issue when it occurs reproducibly.
Please provide the following when posting an issue:
original .tex code
yaml settings
actual/given output
desired or expected output