cmhughes / latexindent.pl

Perl script to add indentation (leading horizontal space) to LaTeX files. It can modify line breaks before, during and after code blocks; it can perform text wrapping and paragraph line break removal. It can also perform string-based and regex-based substitutions/replacements. The script is customisable through its YAML interface.
GNU General Public License v3.0
884 stars 84 forks source link

no indentation before headings #318

Closed EngCat closed 2 years ago

EngCat commented 2 years ago

Please provide the following when posting an issue:

original .tex code

%%%%%%%%%%%
\chapter{Introduction}
1st line
2nd line

yaml settings

Default

actual/given output

    %%%%%%%%%%%
    \chapter{Introduction}
    1st line
2nd line

desired or expected output

%%%%%%%%%%%
\chapter{Introduction}
    1st line
2nd line

anything else

Hi, I'm using the Version 3.13.3 of the script. I need a bit of help.

Can I remove the indentation only before headings (\part, \chapter, \section....)?

Thanks in advance.

cmhughes commented 2 years ago

Thanks for using the issue template :)

I don't see any difference between the before and after....

Can you clarify?

EngCat commented 2 years ago

Thanks for your time. I've updated the first post. I need no indentation before headings, because TeXShop - my favourite editor - does not recognize heading tags that are useful for code navigation.

cmhughes commented 2 years ago

When I run latexindent.pl on your snippet I don't receive your actual output; I get

%%%%%%%%%%%
\chapter{Introduction}
1st line
2nd line

Please check your log file indent.log for any settings that you have loaded.

EngCat commented 2 years ago

With the default settings all is TAB shifted and biutified... If I change from "\t" to "" nothing is biutified at all

cmhughes commented 2 years ago

I don't get your actual /given output

    %%%%%%%%%%%
    \chapter{Introduction}
    1st line
2nd line
cmhughes commented 2 years ago

Any update on this? Let me know :)