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

tikzpicture environment shouldn't be prevented from indentation #7

Open
dbitouze opened this issue May 14, 2023 · 4 comments
Open

tikzpicture environment shouldn't be prevented from indentation #7

dbitouze opened this issue May 14, 2023 · 4 comments

Comments

@dbitouze
Copy link
Contributor

emacs-leuven leaves the tikzpicture code unfilled when doing M-q: (add-to-list 'LaTeX-indent-environment-list '("tikzpicture")).

I agree tikzpicture environment should be prevented from fill-paragraph but, IMO, it shouldn't be prevented from indentation.

@fniessen
Copy link
Owner

Hello @dbitouze . Do you mean it'd make more sense to remove the above assignment?

Will that make it?

@dbitouze
Copy link
Contributor Author

dbitouze commented May 14, 2023

Hello @fniessen.

Do you mean it'd make more sense to remove the above assignment?

I'm not sure. In order to keep some commands in the preamble of .tex files in the corresponding lines, I rely on LaTeX-paragraph-commands:

(setq LaTeX-paragraph-commands
      '("documentclass"
        "usepackage"
        "title"
        "author"
        "date"
        "maketitle"
        "newcommand"
        "renewcommand"
        "pause"
        "frametitle"
        "framesubtitle"))

and that allows indentation. For instance, TAB on:

   \usepackage{foo}
   \usepackage{bar}

will result in:

\usepackage{foo}
\usepackage{bar}

but M-q on:

\usepackage{foo}
\usepackage{bar}

won't result in:

\usepackage{foo}\usepackage{bar}

And I guess that's is wanted by most of the users working on tikzpictures. But I don't know if there is an equivalent of LaTeX-paragraph-commands for paragraphs.

@fniessen
Copy link
Owner

Could you make me a Pull Request (or a simple diff) with the settings you're comfortable with? (The ones which make you happy...)

@dbitouze
Copy link
Contributor Author

I have to first see whether there is or not an equivalent of LaTeX-paragraph-commands for paragraphs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants