Skip to content

Commit

Permalink
V3.24.2
Browse files Browse the repository at this point in the history
  • Loading branch information
cmhughes committed Jun 15, 2024
1 parent c357c9a commit 8ca5bfc
Show file tree
Hide file tree
Showing 27 changed files with 98 additions and 84 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ FROM perl:5.38.2-slim-threaded-buster
#

ARG LATEXINDENT_VERSION
ENV LATEXINDENT_VERSION ${LATEXINDENT_VERSION:-V3.24.1}
ENV LATEXINDENT_VERSION ${LATEXINDENT_VERSION:-V3.24.2}

RUN apt-get update \
&& apt-get install \
Expand Down
4 changes: 2 additions & 2 deletions LatexIndent/Version.pm
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ use warnings;
use Exporter qw/import/;
our @EXPORT_OK = qw/$versionNumber $versionDate/;

our $versionNumber = '3.24.1';
our $versionDate = '2024-05-12';
our $versionNumber = '3.24.2';
our $versionDate = '2024-06-15';
1
2 changes: 1 addition & 1 deletion defaultSettings.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# latexindent.pl, version 3.24.1, 2024-05-12
# latexindent.pl, version 3.24.2, 2024-06-15
#
# defaultSettings.yaml, the default settings for latexindent.pl
#
Expand Down
5 changes: 4 additions & 1 deletion documentation/changelog.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
<!-- announcement: oneSentencePerLine par issue bug fix-->
<!-- announcement: encoding bug fix-->

# changelog.md
## V3.24.2, June 15, 2024
encoding bug fix, see [issue 547](https://github.com/cmhughes/latexindent.pl/issues/547), thanks to @fengzyf

## V3.24.1, May 12, 2024
oneSentencePerLine par issue bug fix, see [issue 527](https://github.com/cmhughes/latexindent.pl/issues/527)

Expand Down
4 changes: 2 additions & 2 deletions documentation/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@
# built documents.
#
# The short X.Y version.
version = u'3.24.1'
version = u'3.24.2'
# The full version, including alpha/beta/rc tags.
release = u'3.24.1'
release = u'3.24.2'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
11 changes: 11 additions & 0 deletions documentation/contributors.bib
Original file line number Diff line number Diff line change
Expand Up @@ -224,3 +224,14 @@ @online{jessestricker
author = "Jesse Stricker",
urldate = {2023-07-12},
keywords = {contributor},}

%
% 2024
%
@online{fengzyf,
title = "Encoding work",
url = "https://github.com/cmhughes/latexindent.pl/pull/548",
date = {2024-06-15},
author = "fengzyf",
urldate = {2024-06-15},
keywords = {contributor},}
2 changes: 1 addition & 1 deletion documentation/demonstrations/pre-commit-config-conda.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
- repo: https://github.com/cmhughes/latexindent.pl
rev: V3.24.1
rev: V3.24.2
hooks:
- id: latexindent-conda
args: [-s]
2 changes: 1 addition & 1 deletion documentation/demonstrations/pre-commit-config-cpan.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
- repo: https://github.com/cmhughes/latexindent.pl
rev: V3.24.1
rev: V3.24.2
hooks:
- id: latexindent
args: [-s]
2 changes: 1 addition & 1 deletion documentation/demonstrations/pre-commit-config-demo.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
- repo: https://github.com/cmhughes/latexindent.pl
rev: V3.24.1
rev: V3.24.2
hooks:
- id: latexindent
args: [-l, -m, -s, -w]
2 changes: 1 addition & 1 deletion documentation/demonstrations/pre-commit-config-docker.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
- repo: https://github.com/cmhughes/latexindent.pl
rev: V3.24.1
rev: V3.24.2
hooks:
- id: latexindent-docker
args: [-s]
2 changes: 1 addition & 1 deletion documentation/latexindent-yaml-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"$schema": "http://json-schema.org/schema",
"$id": "latexindent-yaml-schema.json",
"title": "latexindent.pl YAML schema",
"description": "latexindent.pl YAML schema helper, V3.24.1 2024-05-12",
"description": "latexindent.pl YAML schema helper, V3.24.2 2024-06-15",
"type": "object",
"properties": {
"fileExtensionPreference": {
Expand Down
2 changes: 1 addition & 1 deletion documentation/readme.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
latexindent.pl, version 3.24.1, 2024-05-12
latexindent.pl, version 3.24.2, 2024-06-15

PERL script to indent code within environments, and align delimited
environments in .tex files.
Expand Down
37 changes: 18 additions & 19 deletions documentation/sec-appendices.rst
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ Linux users may be interested in exploring Perlbrew (“Perlbrew” n.d.); an ex

sudo apt-get install perlbrew
perlbrew init
perlbrew install perl-5.34.0
perlbrew switch perl-5.34.0
perlbrew install perl-5.39.1
perlbrew switch perl-5.39.1
sudo apt-get install curl
curl -L http://cpanmin.us | perl - App::cpanminus
cpanm YAML::Tiny
Expand Down Expand Up @@ -151,21 +151,19 @@ Ubuntu: users without perl
Arch-based distributions
^^^^^^^^^^^^^^^^^^^^^^^^

First install the dependencies
``latexindent`` is included in Arch-packaged TeX Live, and can be installed by:

.. code-block:: latex
:class: .commandshell

sudo pacman -S perl cpanminus
sudo pacman -S texlive-binextra perl-yaml-tiny perl-file-homedir

In addition, install ``perl-file-homedir`` from AUR, using your AUR helper of choice,
To enable optional ``–GCString`` switch, install ``perl-unicode-linebreak``:

.. code-block:: latex
:class: .commandshell

sudo paru -S perl-file-homedir

then run the latexindent-module-installer.pl file located at helper-scripts/
sudo pacman -S perl-unicode-linebreak

Alpine
^^^^^^
Expand Down Expand Up @@ -1123,29 +1121,30 @@ logFilePreferences
.. _app:encoding:
Encoding indentconfig.yaml
--------------------------
Encoding
--------
When using latexindent in different ways on different systems, the range of characters supported by its switches/flags/options (see :numref:`sec:commandline`) may vary.
In relation to :numref:`sec:indentconfig`, Windows users that encounter encoding issues with ``indentconfig.yaml``, may wish to run the following command in either ``cmd.exe`` or ``powershell.exe``:
For the Windows executable file ``latexindent.exe``, its options support UTF-8 characters.
For the Windows Perl script ``latexindent.pl``, its option switch supports the characters supported by the encoding corresponding to the system code page. You can check the system code page by running the following command in either ``cmd.exe`` or ``powershell.exe``:
.. code-block:: latex
:class: .commandshell
chcp
chcp
They may receive the following result
which may receive the following result
.. code-block:: latex
:class: .commandshell
Active code page: 936
Active code page: 936
and can then use the settings given in :numref:`lst:indentconfig-encoding1` within their ``indentconfig.yaml``, where 936 is the result of the ``chcp`` command.
and then the characters supported by the code page can be found in https://learn.microsoft.com/en-us/windows/win32/intl/code-page-identifiers. For example, the characters supported by the encoding corresponding to code page 936 are: ANSI/OEM Simplified Chinese (PRC, Singapore); Chinese Simplified (GB2312).
.. literalinclude:: demonstrations/encoding1.yaml
:class: .baseyaml
:caption: ``encoding`` demonstration for ``indentconfig.yaml``
:name: lst:indentconfig-encoding1
For Ubuntu Linux and macOS users, whether using the Perl script or the executable file, the options support UTF-8 characters.
dos2unix linebreak adjustment
-----------------------------
Expand Down
36 changes: 23 additions & 13 deletions documentation/sec-appendices.tex
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@
\begin{commandshell}
sudo apt-get install perlbrew
perlbrew init
perlbrew install perl-5.34.0
perlbrew switch perl-5.34.0
perlbrew install perl-5.39.1
perlbrew switch perl-5.39.1
sudo apt-get install curl
curl -L http://cpanmin.us | perl - App::cpanminus
cpanm YAML::Tiny
Expand Down Expand Up @@ -115,11 +115,14 @@

\paragraph{Arch-based distributions}
\texttt{latexindent} is included in Arch-packaged TeX Live, and can be installed by:

\begin{commandshell}
sudo pacman -S texlive-binextra perl-yaml-tiny perl-file-homedir
\end{commandshell}

To enable optional \texttt{--GCString} switch, install \texttt{perl-unicode-linebreak}:
To enable optional \texttt{--GCString} switch, install
\texttt{perl-unicode-linebreak}:

\begin{commandshell}
sudo pacman -S perl-unicode-linebreak
\end{commandshell}
Expand Down Expand Up @@ -923,25 +926,32 @@
\end{example}

\section{Encoding}\label{app:encoding}

When using latexindent in different ways on different systems, the range of characters supported by its switches/flags/options (see \vref{sec:commandline} ) may vary.

For the Windows executable file \texttt{latexindent.exe}, its options support UTF-8 characters.
When using latexindent in different ways on different systems, the range of characters
supported by its switches/flags/options (see \vref{sec:commandline}) may vary.

For the Windows executable file \texttt{latexindent.exe}, its options support UTF-8
characters.

For the Windows Perl script \texttt{latexindent.pl}, its option switch supports the characters supported by the encoding corresponding to the system code page. You can check the system code page by running the following command in either \texttt{cmd.exe} or \texttt{powershell.exe}:
For the Windows Perl script \texttt{latexindent.pl}, its option switch supports the
characters supported by the encoding corresponding to the system code page. You can
check the system code page by running the following command in either \texttt{cmd.exe}
or \texttt{powershell.exe}:
\begin{dosprompt}
chcp
\end{dosprompt}
which may receive the following result
\begin{dosprompt}
Active code page: 936
\end{dosprompt}
and then the characters supported by the code page can be found in \href{Microsoft's code page identifier table}{https://learn.microsoft.com/en-us/windows/win32/intl/code-page-identifiers}.
For example, the characters supported by the encoding corresponding to code page 936 are: ANSI/OEM Simplified Chinese (PRC, Singapore); Chinese Simplified (GB2312).

For Ubuntu Linux and macOS users, whether using the Perl script or the executable file, the options support UTF-8 characters.


and then the characters supported by the code page can be found in \href{Microsoft's
code page identifier
table}{https://learn.microsoft.com/en-us/windows/win32/intl/code-page-identifiers}. For
example, the characters supported by the encoding corresponding to code page 936 are:
ANSI/OEM Simplified Chinese (PRC, Singapore); Chinese Simplified (GB2312).

For Ubuntu Linux and macOS users, whether using the Perl script or the executable file,
the options support UTF-8 characters.

\section{dos2unix linebreak adjustment}

Expand Down
2 changes: 2 additions & 0 deletions documentation/sec-how-to-use.rst
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ From the command line
``latexindent.pl`` has a number of different switches/flags/options, which can be combined in any way that you like, either in short or long form as detailed below. ``latexindent.pl`` produces a ``.log`` file, ``indent.log``, every time it is run; the name of the log file can be customised, but we will refer to the log file as ``indent.log`` throughout this document. There is a base of information that is written to ``indent.log``, but other additional information will be written depending on
which of the following options are used.

When using ``latexindent.pl`` in different ways on different systems, the range of characters supported by its switches/flags/options may vary. We discuss these in Section :numref:`app:encoding`.

.. describe:: -v, –version

.. index:: switches;-v, –version definition and details
Expand Down
7 changes: 4 additions & 3 deletions documentation/sec-how-to-use.tex
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,10 @@ \subsection{From the command line}\label{sec:commandline}
written to \texttt{indent.log}, but other additional information will be written
depending on which of the following options are used.

When using \texttt{latexindent.pl} in different ways on different systems, the range of characters supported by its switches/flags/options may vary.
We discuss these in Section \cref{app:encoding}.

When using \texttt{latexindent.pl} in different ways on different systems, the range of
characters supported by its switches/flags/options may vary. We discuss these in Section
\cref{app:encoding}.

\flagbox{-v, --version}
\index{switches!-v, --version definition and details}
\announce{2017-06-25}{version}
Expand Down
19 changes: 0 additions & 19 deletions documentation/sec-indent-config-and-settings.rst
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,6 @@ You can make sure that your settings are loaded by checking ``indent.log`` for d

As of you can specify the ``paths`` field from :numref:`lst:indentconfig` within any of your ``latexindent.yaml`` and friends settings files. This can lead to creative nesting of configuration files; a demonstration is given in :numref:`sec:appendix:paths`.

If you find that ``latexindent.pl`` does not read your YAML file, then it might be as a result of the default commandline encoding not being UTF-8; normally this will only occur for Windows users. In this case, you might like to explore the ``encoding`` option for ``indentconfig.yaml`` as demonstrated in :numref:`lst:indentconfig-encoding`.

.. literalinclude:: demonstrations/encoding.yaml
:class: .baseyaml
:caption: The ``encoding`` option for ``indentconfig.yaml``
:name: lst:indentconfig-encoding

Thank you to (qiancy98 2021) for this contribution; please see :numref:`app:encoding` and details within (“Perldoc Encode::Supported” n.d.) for further information.

.. label follows
.. _sec:localsettings:
Expand Down Expand Up @@ -204,16 +195,6 @@ A visual representation of this is given in :numref:`fig:loadorder`.
Diaz, Jacobo. 2014. “Hiddenconfig.” July 21, 2014. https://github.com/cmhughes/latexindent.pl/pull/18.
.. container::
:name: ref-encoding
“Perldoc Encode::Supported.” n.d. Accessed May 6, 2021. https://perldoc.perl.org/Encode::Supported.
.. container::
:name: ref-qiancy98
qiancy98. 2021. “Locale Encoding of File System.” May 6, 2021. https://github.com/cmhughes/latexindent.pl/pull/273.
.. [1]
If you’re not sure where to put ``indentconfig.yaml``, don’t worry ``latexindent.pl`` will tell you in the log file exactly where to put it assuming it doesn’t exist already.
Expand Down
1 change: 0 additions & 1 deletion documentation/sec-indent-config-and-settings.tex
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ \subsection{indentconfig.yaml and .indentconfig.yaml}\label{subsec:indentconfig}
\texttt{latexindent.yaml} and friends settings files. This can lead to creative nesting
of configuration files; a demonstration is given in \vref{sec:appendix:paths}.


\subsection{localSettings.yaml and friends}\label{sec:localsettings}
The \texttt{-l} switch tells \texttt{latexindent.pl} to look for
\texttt{localSettings.yaml} and/or friends in the \emph{same directory} as
Expand Down
4 changes: 3 additions & 1 deletion documentation/sec-introduction.rst
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ There is certainly no malicious intent in releasing this script, and I do hope t
Quick start
-----------

When ``latexindent.pl`` reads and writes files, the files are read and written in UTF-8 format by default. That is to say, the encoding format for tex and yaml files needs to be in UTF-8 format.

If you’d like to get started with ``latexindent.pl`` then simply type

.. code-block:: latex
Expand Down Expand Up @@ -310,7 +312,7 @@ You might also like to see https://stackoverflow.com/questions/19590042/error-ca
About this documentation
------------------------

As you read through this documentation, you will see many listings; in this version of the documentation, there are a total of 631. This may seem a lot, but I deem it necessary in presenting the various different options of ``latexindent.pl`` and the associated output that they are capable of producing.
As you read through this documentation, you will see many listings; in this version of the documentation, there are a total of 629. This may seem a lot, but I deem it necessary in presenting the various different options of ``latexindent.pl`` and the associated output that they are capable of producing.

The different listings are presented using different styles:

Expand Down
3 changes: 2 additions & 1 deletion documentation/sec-introduction.tex
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ \subsection{License}
throughout this document for details}.

\subsection{Quick start}\label{sec:quickstart}
When \texttt{latexindent.pl} reading and writing files, the files are read and written in UTF-8 format by default. That is to say, the encoding format for tex and yaml files needs to be in UTF-8 format.
When \texttt{latexindent.pl} reads and writes files, the files are read and written in UTF-8 format by default.
That is to say, the encoding format for tex and yaml files needs to be in UTF-8 format.

If you'd like to get started with \texttt{latexindent.pl} then simply type

Expand Down
5 changes: 5 additions & 0 deletions documentation/sec-references.rst
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,11 @@ References

eggplants. 2022. “Add Dockerfile and Its Updater/Releaser.” June 12, 2022. https://github.com/cmhughes/latexindent.pl/pull/370.

.. container::
:name: ref-fengzyf

fengzyf. 2024. “Encoding Work.” June 15, 2024. https://github.com/cmhughes/latexindent.pl/pull/548.

.. container::
:name: ref-masteringregexp

Expand Down
4 changes: 2 additions & 2 deletions documentation/title.tex
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@
sharp corners,
enhanced,
overlay={\node[anchor=north east,outer sep=2pt] at ([xshift=3cm,yshift=4mm]frame.north east) {\includegraphics[width=3cm]{logo}}; }]
\centering\ttfamily\bfseries latexindent.pl\\[1cm] Version 3.24.1
\centering\ttfamily\bfseries latexindent.pl\\[1cm] Version 3.24.2
\end{tcolorbox}
}
\author{Chris Hughes \thanks{and contributors!
See \vref{sec:contributors}.
For
all communication, please visit \cite{latexindent-home}.}}
\date{2024-05-12}
\date{2024-06-15}
\maketitle
\begin{adjustwidth}{1cm}{1cm}
\small
Expand Down
Loading

0 comments on commit 8ca5bfc

Please sign in to comment.