Closed Mikachu2333 closed 3 months ago
Apologies for the delay I'm hoping to get to this soon
starting with
\documentclass{ctexrep}%Chinese report
\usepackage{tabularray}%tabular
\begin{document}
\begin{tblr}[long,
label= {market_fuyanshan}
]{
cells = {c,m},
hline{1-2,5}= {-}{1pt},
hline{3-4} = {-}{},
vlines,
row{1} = {cmd=\bfseries},
}
XXX & YYY & ZZZ \\
AAA & DDD & GGG \\
BBB & EEE & HHH \\
CCC & FFF & III
\end{tblr}
\end{document}
and using
fineTuning:
keyEqualsValuesBracesBrackets:
name: |-
(?x)
[a-zA-Z@\*0-9_\/.:\#-]+
(?:
[a-zA-Z@\*0-9_\/.\h:\#-]
\{
[a-zA-Z@\*0-9_\/.\h:\#-,]+?
\}
)*?
gives the following
\documentclass{ctexrep}%Chinese report
\usepackage{tabularray}%tabular
\begin{document}
\begin{tblr}[long,
label= {market_fuyanshan}
]{
cells = {c,m},
hline{1-2,5}= {-}{1pt},
hline{3-4} = {-}{},
vlines,
row{1} = {cmd=\bfseries},
}
XXX & YYY & ZZZ \\
AAA & DDD & GGG \\
BBB & EEE & HHH \\
CCC & FFF & III
\end{tblr}
\end{document}
\begin{tblr}[long, label= {market_fuyanshan} ]
Sry for bother, I'd like to know if it is possible to format the content inside the first square brackets ([
and ]
, e.g. text \begin{tblr}[long,
) as well, as shown below.
(As a roob in regex, I could hardly understand the docs for too few examples... ☹)
\begin{tblr}[
long,
label= {market_fuyanshan}
]{
cells = {c,m},
hline{1-2,5}= {-}{1pt},
hline{3-4} = {-}{},
vlines,
row{1} = {cmd=\bfseries},
}
XXX & YYY & ZZZ \\
AAA & DDD & GGG \\
BBB & EEE & HHH \\
CCC & FFF & III
\end{tblr}
Besides, maybe the ]{
should also be standardized in one of the situation as follows.
Sometimes,
]
{
sometimes ]{
Try the following
modifyLineBreaks:
optionalArguments:
tblr:
OptArgBodyStartsOnOwnLine: 1 # -1,0,1,2,3,4
fineTuning:
keyEqualsValuesBracesBrackets:
name: |-
(?x)
[a-zA-Z@\*0-9_\/.:\#-]+
(?:
[a-zA-Z@\*0-9_\/.\h:\#-]
\{
[a-zA-Z@\*0-9_\/.\h:\#-,]+?
\}
)*?
which gives
\documentclass{ctexrep}%Chinese report
\usepackage{tabularray}%tabular
\begin{document}
\begin{tblr}[
long,
label= {market_fuyanshan}
]{
cells = {c,m},
hline{1-2,5}= {-}{1pt},
hline{3-4} = {-}{},
vlines,
row{1} = {cmd=\bfseries},
}
XXX & YYY & ZZZ \\
AAA & DDD & GGG \\
BBB & EEE & HHH \\
CCC & FFF & III
\end{tblr}
\end{document}
Try the following
Sorry for bother, I met some problems when useing it.
\documentclass{ctexrep}%Chinese report
\usepackage{tabularray,xcolor,ulem}%tabular,color,underline
\usepackage[final=true, colorlinks, hidelinks, bookmarks, bookmarksnumbered=true]{hyperref}%href
\begin{document}
\begin{tblr}[
long,
]{
cells={c,m},
row{1,3,5,7} = {5ex},
row{9} = {7ex},
}
{%
\uline{\href{https://affinity.serif.com/zh-cn/designer}{Affinity® Designer}}、%
\uline{\href{https://www.gimp.org/}{GIMP}}、%
\uline{\href{https://krita.org/zh-cn}{Krita}}、%
\uline{\href{https://www.adobe.com/cn/creativecloud/roc/business.html}{Adobe® Photoshop}} \\
\uline{\href{https://survivesjtu.github.io/SJTU-Application}{上海交通大学飞跃手册}} \\
\uline{\href{https://gitee.com/hanyaner/witjij}{武工大计院新生入学建议}}%
} \\
{%
\large\textbf{格式与疑难问题}%
} \\
{%
{\uline{\href{https://github.com/CTeX-org/forum/issues}{GitHub CTeX Forum}}、%
\uline{\href{https://tex.stackexchange.com}{TeX StackExchange}}、%
\uline{\href{https://www.latexstudio.net}{LaTeX工作室}}} \\
\uline{\href{https://github.com/lvjr/tabularray}{tabularray}}%
} \\
{%
\large\textbf{\textcolor{red}{其他所有为本指南、地图提供建议与改进意见的同学、教师等}}%
}
\end{tblr}
\end{document}
\documentclass{ctexrep}%Chinese report
\usepackage{tabularray,xcolor,ulem}%tabular,color,underline
\usepackage[final=true, colorlinks, hidelinks, bookmarks, bookmarksnumbered=true]{hyperref}%href
\begin{document}
\begin{tblr}[
long,
]{
cells={c,m},
row{1,3,5,7} = {5ex},
row{9} = {7ex},
}
{%
\uline{\href{https://affinity.serif.com/zh-cn/designer}{Affinity® Designer}}、%
\uline{\href{https://www.gimp.org/}{GIMP}}、%
\uline{\href{https://krita.org/zh-cn}{Krita}}、%
\uline{\href{https://www.adobe.com/cn/creativecloud/roc/business.html}{Adobe® Photoshop}} \\
\uline{\href{https://survivesjtu.github.io/SJTU-Application}{上海交通大学飞跃手册}} \\
\uline{\href{https://gitee.com/hanyaner/witjij}{武工大计院新生入学建议}}%
} \\
{%
\large\textbf{格式与疑难问题}%
} \\
{%
{\uline{\href{https://github.com/CTeX-org/forum/issues}{GitHub CTeX Forum}}、%
\uline{\href{https://tex.stackexchange.com}{TeX StackExchange}}、%
\uline{\href{https://www.latexstudio.net}{LaTeX工作室}}} \\
\uline{\href{https://github.com/lvjr/tabularray}{tabularray}}%
} \\
{%
\large\textbf{\textcolor{red}{其他所有为本指南、地图提供建议与改进意见的同学、教师等}}%
}
\end{tblr}
\end{document}
\\
{%
\uline{\href{https://xxx}{xxx}}、%
\uline{\href{https://xxx}{xxx}}\\
\uline{\href{https://xxx}{xxx}}
}\\
Original / Formatted
Here is a pic for this after compile
When using the tabularray package, latexindent always incorrectly indents the configuration section of the tabularray, as shown in the following example.
MWE (After formatted)
VSCode Latex Workshop settings
After testing, this bug is not related to parameters such as
--GCString
and--yaml=...
Output
Success
desired or expected output
Lines from 9 to 11 should not be indneted with 2*defaultIndent as the following shows.