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

Exclude table and tabular from indentation #534

Closed
reneas opened this issue Apr 2, 2024 · 3 comments
Closed

Exclude table and tabular from indentation #534

reneas opened this issue Apr 2, 2024 · 3 comments
Labels
answered question has been answered question user-centred question about behaviour of latexindent.pl

Comments

@reneas
Copy link

reneas commented Apr 2, 2024

original .tex code

\begin{table}[]
\centering
\caption{Stoffeigenschaften TiAl6V4}
\label{tab:stoffeigenschaften_TiAl6V4}
\begin{tabular}{@{}lrrrr@{}}
\toprule
Eigenschaft                 & TiAl6V4    & Inconel 718 & Aluminium 7075 & Einheit           \\ \midrule
Härte                       & 300-400    & -           & -              & HV                \\
E-Modul                     & 110 - 140  & 205         & 72             & GPa               \\
Zugfestigkeit $R_m$         & 900 - 1200 & 1230        & 360 – 540      & MPa               \\
Dehngrenze $R_p_{0,2}$      & 800 - 1100 & 1030        & 220 – 470      & MPa               \\
Bruchdehnung                & 13-16      & 12          & 1-6            & \%                \\
Dichte                      & 4,42       & 8,2         & 2,8            & $\frac{kg}{dm^3}$ \\
Schmelztemperatur           & 1648       & 1260-1336   & 477-638        & °C                \\
Wärmeleitfähigkeit bei 20°C & 6,7        & 11,5        & 130-160        & $\frac{W}{m*K}$   \\ \bottomrule
\end{tabular}
\end{table}

yaml settings

default settings + the ones from issue #523

actual/given output

\begin{table}[]
	\centering
	\caption{Stoffeigenschaften TiAl6V4}
	\label{tab:stoffeigenschaften_TiAl6V4}
	\begin{tabular}{@{}lrrrr@{}}
		\toprule
		Eigenschaft                 & TiAl6V4    & Inconel 718 & Aluminium 7075 & Einheit           \\ \midrule
		Härte                       & 300-400    & -           & -              & HV                \\
		E-Modul                     & 110 - 140  & 205         & 72             & GPa               \\
		Zugfestigkeit $R_m$         & 900 - 1200 & 1230        & 360 – 540      & MPa               \\
		Dehngrenze $R_p_{0,2}$      & 800 - 1100 & 1030        & 220 – 470      & MPa               \\
		Bruchdehnung                & 13-16      & 12          & 1-6            & \%                \\
		Dichte                      & 4,42       & 8,2         & 2,8            & $\frac{kg}{dm^3}$ \\
		Schmelztemperatur           & 1648       & 1260-1336   & 477-638        & °C                \\
		Wärmeleitfähigkeit bei 20°C & 6,7        & 11,5        & 130-160        & $\frac{W}{m*K}$   \\ \bottomrule
	\end{tabular}
\end{table}

it does what it's supposed to do, but in my vscode it looks like this because of the linebreaks:
image

desired output

Same as original TeX code. I don't want them to be indented, because i have linebreaks at a specific line and it destroys the formatting. the tables become unreadable in my editor.

anything else

maybe there is another way of solving this but the easiest way for me would be to disable indentation of table and tabular

@cmhughes
Copy link
Owner

cmhughes commented Apr 2, 2024

Can you try

noAdditionalIndent:
    table: 1
    tabular: 1

@cmhughes cmhughes added question user-centred question about behaviour of latexindent.pl answered question has been answered labels Apr 2, 2024
@reneas
Copy link
Author

reneas commented Apr 3, 2024

That worked thanks for the quick reply :)
I'm sorry if I'm asking these super simple questions but the program structure is a bit too complicated for me...

@reneas reneas closed this as completed Apr 3, 2024
@cmhughes
Copy link
Owner

cmhughes commented Apr 3, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
answered question has been answered question user-centred question about behaviour of latexindent.pl
Projects
None yet
Development

No branches or pull requests

2 participants