Giter Site home page Giter Site logo

Comments (3)

cmhughes avatar cmhughes commented on May 28, 2024

As of 8329629 this feature is on the way to being full implemented for environments.

Currently, the yaml looks like this:

modifyLineBreaks:
    everyBeginStartsOnOwnLine: 1
    everyBodyStartsOnOwnLine: 1
    everyEndStartsOnOwnLine: 1
    everyEndFinishesWithLineBreak: 1
    equation*:
        BeginStartsOnOwnLine: 1
        BodyStartsOnOwnLine: 1
        EndStartsOnOwnLine: 1
        EndFinishesWithLineBreak: 1

I think I'd prefer it to be:

modifyLineBreaks:
    environments:
        everyBeginStartsOnOwnLine: 1
        everyBodyStartsOnOwnLine: 1
        everyEndStartsOnOwnLine: 1
        everyEndFinishesWithLineBreak: 1
        equation*:
           BeginStartsOnOwnLine: 1
           BodyStartsOnOwnLine: 1
           EndStartsOnOwnLine: 1
           EndFinishesWithLineBreak: 1
     ifElseFi:
        everyBeginStartsOnOwnLine: 1
        everyBodyStartsOnOwnLine: 1
        everyEndStartsOnOwnLine: 1
        everyEndFinishesWithLineBreak: 1
        ifnum:
           BeginStartsOnOwnLine: 1
           BodyStartsOnOwnLine: 1
           EndStartsOnOwnLine: 1
           EndFinishesWithLineBreak: 1
   etc.....

This would allow the user to specify linebreak choices globally on a per-object basis (as well as a per-named object).

from latexindent.pl.

cmhughes avatar cmhughes commented on May 28, 2024

I'd also like to see:

-1: leave alone, don't change linebreaks (translates to `undef` in the perl code)
0: e.g `BodyStartsOnOwnLine: 0` means body does *not* start on own line, so remove line break if necessary
1: e.g `BodyStartsOnOwnLine: 1` means body *does* start on own line, so add line break if necessary (this is the only one of the three currently implemented, as of https://github.com/cmhughes/latexindent.pl/commit/8329629b9300d5dd906381bfb2a72475e3b9ba00) 

from latexindent.pl.

cmhughes avatar cmhughes commented on May 28, 2024

As of f29e867 this is now fully implemented. See test-cases/mand-args/mand-arg-test-cases.sh for samples.

The YAML interface is slightly different from that detailed above, as there is no need for 'every'.

Furthermore, each poly-switch can take the value of 2, which will add a comment symbol before adding a line break (if one is not already present) as appropriate.

from latexindent.pl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.