summaryrefslogtreecommitdiff
path: root/support/latexindent/documentation/sec-conclusions-know-limitations.tex
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
committerNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
commite0c6872cf40896c7be36b11dcc744620f10adf1d (patch)
tree60335e10d2f4354b0674ec22d7b53f0f8abee672 /support/latexindent/documentation/sec-conclusions-know-limitations.tex
Initial commit
Diffstat (limited to 'support/latexindent/documentation/sec-conclusions-know-limitations.tex')
-rw-r--r--support/latexindent/documentation/sec-conclusions-know-limitations.tex38
1 files changed, 38 insertions, 0 deletions
diff --git a/support/latexindent/documentation/sec-conclusions-know-limitations.tex b/support/latexindent/documentation/sec-conclusions-know-limitations.tex
new file mode 100644
index 0000000000..1e865c9c84
--- /dev/null
+++ b/support/latexindent/documentation/sec-conclusions-know-limitations.tex
@@ -0,0 +1,38 @@
+% arara: pdflatex: {shell: yes, files: [latexindent]}
+\section{Conclusions and known limitations}\label{sec:knownlimitations}
+ There are a number of known limitations of the script, and almost certainly quite a few
+ that are \emph{unknown}!
+
+ The main limitation is to do with the alignment routine discussed on
+ \cpageref{yaml:lookforaligndelims}; for example, consider the file given in \cref{lst:matrix2}.
+
+ \cmhlistingsfromfile{demonstrations/matrix2.tex}{\texttt{matrix2.tex}}{lst:matrix2}
+
+ The default output is given in \cref{lst:matrix2-default}, and it is clear that the alignment
+ routine has not worked as hoped, but it is \emph{expected}. \cmhlistingsfromfile{demonstrations/matrix2-default.tex}{\texttt{matrix2.tex} default output}{lst:matrix2-default}
+
+ The reason for the problem is that when \texttt{latexindent.pl} stores its code blocks
+ (see \vref{tab:code-blocks}) it uses replacement tokens. The alignment routine is using
+ the \emph{length of the replacement token} in its measuring -- I hope to be able to address this in the
+ future.
+
+ There are other limitations to do with the multicolumn alignment routine (see
+ \vref{lst:tabular2-mod2}); in particular, when working with code blocks in which
+ multicolumn commands overlap, the algorithm can fail.
+
+ Another limitation is to do with efficiency, particularly when the \texttt{-m}
+ switch is active, as this adds many checks and processes. The current implementation
+ relies upon finding and storing \emph{every} code block (see the discussion on
+ \cpageref{page:phases}); it is hoped that, in a future version, only
+ \emph{nested} code blocks will need to be stored in the `packing' phase, and
+ that this will improve the efficiency of the script.
+
+ You can run \texttt{latexindent} on any file;%
+ \announce*{2019-07-13}*{ability to call latexindent on any file} if you don't specify an extension, then the extensions that you
+ specify in \lstinline[breaklines=true]!fileExtensionPreference! (see \vref{lst:fileExtensionPreference}) will be consulted. If you
+ find a case in which the script struggles, please feel free to report it at
+ \cite{latexindent-home}, and in the meantime, consider using a \texttt{noIndentBlock} (see \cpageref{lst:noIndentBlockdemo}).
+
+ I hope that this script is useful to some; if you find an example where the script does
+ not behave as you think it should, the best way to contact me is to report an issue on
+ \cite{latexindent-home}; otherwise, feel free to find me on the \url{http://tex.stackexchange.com/users/6621/cmhughes}.