Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to disable align of \\ in align environment? #26

Closed
vanabel opened this issue May 5, 2015 · 4 comments
Closed

How to disable align of \\ in align environment? #26

vanabel opened this issue May 5, 2015 · 4 comments
Labels
enhancement enhancement which might be to an existing feature or the development of a new feature feature-request user-centred feature request for an enhancement to an existing feature, or for a new feature implemented implemented tag means that either an enhancement or feature request has been implemented, or bugfix

Comments

@vanabel
Copy link

vanabel commented May 5, 2015

I have some code as

\begin{align*}
a&=b+c\\
c&=d\\
\end{align*}

it will be indent to:

\begin{align*}
    a & =b+c \\
    c & =d   \\
\end{align*}

how to delte the space before \\, since when my formula is long, this will take a lot of space, and make my formula looks ugly. So is there a switch such that it looks like

\begin{align*}
    a & =b+c\\
    c & =d\\
\end{align*}
@cmhughes
Copy link
Owner

cmhughes commented May 5, 2015

Thanks for the suggestion! This should be ok to implement as a switch; I'll label this as an enhancement and get back to you in the future :) Development is kind of slow at the moment as I have a number of other projects.

@cmhughes cmhughes added the enhancement enhancement which might be to an existing feature or the development of a new feature label May 5, 2015
@mischmiko
Copy link

Hello there, thanks for developing! I just want to add to this. It looks especially strange if you have something like

\begin{align*}
    CCI_n          & = \frac{p_n-SMA(p_n)}{0.015 \cdot \sigma(p_n)}                                                                            \\
    \textrm{wobei} & n = \textrm{Perioden, i.\,d.\,R. 20};\p_n = \textrm{Typischer Preis/Kurs};\ SMA(p_n) = \textrm{SMA der typischen Preise}; \\
                   & \sigma(p_n) = \textrm{Standardabweichung}                                                                                 \\
\end{align*}

and use soft line breaks.

@cmhughes
Copy link
Owner

@schmimae thanks, noted! :)

@cmhughes
Copy link
Owner

Thanks again for suggesting this feature.

I have implemented it at 057e8f1. Full details are in the documentation, but it roughly looks like this:

lookForAlignDelims:
   tabular: 
      delims: 1
      alignDoubleBackSlash: 1
      spacesBeforeDoubleBackSlash: 2
   tabularx:
      delims: 1
   longtable: 1

You can now specify a 'basic' and an 'advanced' version of any field in lookForAlignDelims. Specifying alignDoubleBlackSlash: 0 turns off alignment of \\. You can also, optionally, choose to add spaces before \\ using spacesBeforeDoubleBackSlash.

I hope this is similar to what you had in mind, let me know if there are any tweaks :)

@cmhughes cmhughes added the feature-request user-centred feature request for an enhancement to an existing feature, or for a new feature label Aug 19, 2017
@cmhughes cmhughes added the implemented implemented tag means that either an enhancement or feature request has been implemented, or bugfix label Jun 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement enhancement which might be to an existing feature or the development of a new feature feature-request user-centred feature request for an enhancement to an existing feature, or for a new feature implemented implemented tag means that either an enhancement or feature request has been implemented, or bugfix
Projects
None yet
Development

No branches or pull requests

3 participants