[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Indenting the code written in square brackets as optional parameters
From: |
Ikumi Keita |
Subject: |
Re: Indenting the code written in square brackets as optional parameters |
Date: |
Fri, 04 Mar 2022 17:47:21 +0900 |
Hi, may I call you निरंजन?
>>>>> निरंजन <hi.niranjan@protonmail.com> writes:
> I am having a code like the following in my mind:
> -----------------------
> \documentclass{article}
> \usepackage[%
> Scale=1.5,%
> Renderer=Harfbuzz%
> ]{fontspec}
> -----------------------
> Why not to support indentation of the code inside the square
> brackets? Currently it doesn't get indented. This support
> can be very useful for packages which have complicated
> optional parameters, like say, package `hyperref'. Or even
> better would be an example from package `forest'. See the
> following code which has nested square brackets:
> -----------------------
> \begin{forest}
> [a
> [b
> [c]
> ]
> ]
> \end{forest}
> -----------------------
> Please let me know if this is possible. Feel free to point
> out the challenges or problem cases with this approach.
Thanks for your suggestion, I think it is useful. It seems that the
attached patch achieves what you want. Unless someone finds difficulties
with it, I can polish it and commit into the git repo.
Maybe I should modify `TeX-brace-count-line' instead of introducing a
new function `LaTeX-brace-count-line'. Currently I'm not sure which is
better.
Regards,
Ikumi Keita
patch
Description: rough sketch of the idea
- Indenting the code written in square brackets as optional parameters, निरंजन, 2022/03/02
- Re: Indenting the code written in square brackets as optional parameters,
Ikumi Keita <=
- Re: Indenting the code written in square brackets as optional parameters, Denis Bitouzé, 2022/03/04
- Re: Indenting the code written in square brackets as optional parameters, निरंजन, 2022/03/04
- Re: Indenting the code written in square brackets as optional parameters, Ikumi Keita, 2022/03/04
- Re: Indenting the code written in square brackets as optional parameters, निरंजन, 2022/03/05
- Re: Indenting the code written in square brackets as optional parameters, Ikumi Keita, 2022/03/06
- Re: Indenting the code written in square brackets as optional parameters, Arash Esbati, 2022/03/08