Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
cmhughes committed Jul 14, 2024
2 parents 18e2949 + 0dee1f4 commit fed474e
Show file tree
Hide file tree
Showing 27 changed files with 79 additions and 78 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release-docker-ghcr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
password: ${{ secrets.GITHUB_TOKEN }}
- name: get latexindent tag
run: echo "TAG=${GITHUB_REF##*/}" >> $GITHUB_ENV
- uses: docker/build-push-action@v5
- uses: docker/build-push-action@v6
with:
context: .
push: true
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM perl:5.38.2-slim-threaded-buster
FROM perl:5.40.0-slim-threaded-buster
#
# Docker necessary file
#
Expand All @@ -17,7 +17,7 @@ FROM perl:5.38.2-slim-threaded-buster
#

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

RUN apt-get update \
&& apt-get install \
Expand Down
3 changes: 3 additions & 0 deletions LatexIndent/GetYamlSettings.pm
Original file line number Diff line number Diff line change
Expand Up @@ -749,6 +749,9 @@ sub yaml_read_settings {
my $parent = $keysValues[0];
my $child = $keysValues[1];
my $grandchild = $keysValues[2];

delete $mainSettings{$parent}{$child} if (defined $mainSettings{$parent}{$child} and ref $mainSettings{$parent}{$child} ne "HASH" );

$logger->info("Updating mainSettings with $parent: $child: $grandchild: $value");
$mainSettings{$parent}{$child}{$grandchild} = $value;
}
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.2';
our $versionDate = '2024-06-15';
our $versionNumber = '3.24.3';
our $versionDate = '2024-07-14';
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.2, 2024-06-15
# latexindent.pl, version 3.24.3, 2024-07-14
#
# defaultSettings.yaml, the default settings for latexindent.pl
#
Expand Down
11 changes: 0 additions & 11 deletions documentation/bashtips.txt

This file was deleted.

5 changes: 4 additions & 1 deletion documentation/changelog.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
<!-- announcement: encoding bug fix-->
<!-- announcement: -y switch bug fix for lookForAlignDelims-->

# changelog.md
## V3.24.3, July 14, 2024
`-y` switch bug fix for `lookForAlignDelims`, see [issue 551](https://github.com/cmhughes/latexindent.pl/issues/551)

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

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.2'
version = u'3.24.3'
# The full version, including alpha/beta/rc tags.
release = u'3.24.2'
release = u'3.24.3'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
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.2
rev: V3.24.3
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.2
rev: V3.24.3
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.2
rev: V3.24.3
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.2
rev: V3.24.3
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.2 2024-06-15",
"description": "latexindent.pl YAML schema helper, V3.24.3 2024-07-14",
"type": "object",
"properties": {
"fileExtensionPreference": {
Expand Down
5 changes: 3 additions & 2 deletions documentation/latexindent.tex
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@
% bibliographies
\addbibresource{latex-indent}
\addbibresource{contributors}
\BiblatexSplitbibDefernumbersWarningOff

% http://tex.stackexchange.com/questions/122135/how-to-add-a-png-icon-on-the-right-side-of-a-tcolorbox-title
\newtcolorbox{warning}{parbox=false,
Expand Down Expand Up @@ -585,14 +586,14 @@
title={example~\thetcbcounter},
fonttitle=\bfseries\sffamily,
detach title,
before upper={\llap{\tcbtitle\hspace{5mm}}},
coltitle=black,
colback=white,
grow to left by=6mm,
%
% circles and line by the side
%
overlay unbroken={%
overlay unbroken and first={%
\node at ([xshift=-8mm,yshift=-4.5mm]interior.north west) {\bfseries example \thetcbcounter};
\path [fill=black] ([xshift=1mm,yshift=3mm]interior.south east) node{\hbox{\rule{1ex}{1ex}}};
},
overlay last={%
Expand Down
33 changes: 0 additions & 33 deletions documentation/oneSentencePerLine.yaml

This file was deleted.

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.2, 2024-06-15
latexindent.pl, version 3.24.3, 2024-07-14

PERL script to indent code within environments, and align delimited
environments in .tex files.
Expand Down
8 changes: 5 additions & 3 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.39.1
perlbrew switch perl-5.39.1
perlbrew install perl-5.40.0
perlbrew switch perl-5.40.0
sudo apt-get install curl
curl -L http://cpanmin.us | perl - App::cpanminus
cpanm YAML::Tiny
Expand Down Expand Up @@ -1142,7 +1142,9 @@ which may receive the following result
Active code page: 936
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).
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 <Microsoft's
code page identifier
table>`__. 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.
Expand Down
4 changes: 2 additions & 2 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.39.1
perlbrew switch perl-5.39.1
perlbrew install perl-5.40.0
perlbrew switch perl-5.40.0
sudo apt-get install curl
curl -L http://cpanmin.us | perl - App::cpanminus
cpanm YAML::Tiny
Expand Down
2 changes: 1 addition & 1 deletion documentation/sec-introduction.tex
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ \subsection{License}
throughout this document for details}.

\subsection{Quick start}\label{sec:quickstart}
When \texttt{latexindent.pl} reads and writes files, the files are read and written in UTF-8 format by default.
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
11 changes: 10 additions & 1 deletion documentation/test-default-settings.tex
Original file line number Diff line number Diff line change
@@ -1,8 +1,17 @@
% arara: pdflatex: { files: [latexindent]}

\subsection{test subsection}
\begin{example}
Testing example environment
Testing example environment
Testing example environment
Testing example environment
Testing example environment
Testing example environment
Testing example environment
Testing example environment
Testing example environment
Testing example environment
Testing example environment
\end{example}

% file used to check if line numbers are set correct for defaultSettings.yaml listings
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.2
\centering\ttfamily\bfseries latexindent.pl\\[1cm] Version 3.24.3
\end{tcolorbox}
}
\author{Chris Hughes \thanks{and contributors!
See \vref{sec:contributors}.
For
all communication, please visit \cite{latexindent-home}.}}
\date{2024-06-15}
\date{2024-07-14}
\maketitle
\begin{adjustwidth}{1cm}{1cm}
\small
Expand Down
8 changes: 4 additions & 4 deletions helper-scripts/update-version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@
# - <upload latexindent.zip to ctan>

minorVersion=0
oldVersion='3.24.1'
newVersion='3.24.2'
oldDate='2024-05-12'
newDate='2024-06-15'
oldVersion='3.24.2'
newVersion='3.24.3'
oldDate='2024-06-15'
newDate='2024-07-14'
updateVersion=0
gitMode=0

Expand Down
2 changes: 1 addition & 1 deletion latexindent.pl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env perl
#
# latexindent.pl, version 3.24.2, 2024-06-15
# latexindent.pl, version 3.24.3, 2024-07-14
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
Expand Down
8 changes: 5 additions & 3 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ and [pre-commit](https://latexindentpl.readthedocs.io/en/latest/sec-appendices.h

## version

latexindent.pl, version 3.24.2, 2024-06-15
latexindent.pl, version 3.24.3, 2024-07-14

## author
Chris Hughes (cmhughes)
Expand Down Expand Up @@ -157,7 +157,7 @@ framework](https://pre-commit.com) by adding this to your

```yaml
- repo: https://github.com/cmhughes/latexindent.pl.git
rev: V3.24.2
rev: V3.24.3
hooks:
- id: latexindent
```
Expand Down Expand Up @@ -234,7 +234,7 @@ I align with many of the approaches and details at [Dramatically increase your p
## perl version
I develop latexindent.pl on Ubuntu Linux, using [perlbrew](https://perlbrew.pl/); I currently develop on perl version v5.39.1
I develop latexindent.pl on Ubuntu Linux, using [perlbrew](https://perlbrew.pl/); I currently develop on perl version v5.40.0
## GitHub Actions
The standalone executables `latexindent.exe`, `latexindent-linux`, `latexindent-macos` are created and released by [GitHub Actions](https://github.com/features/actions); the
Expand Down Expand Up @@ -280,6 +280,8 @@ I find that the following quotes resonate with me with regards to my approach to
- *Perl’s primary strength is in text processing. Be it a regex-based approach or otherwise, Perl is excellent for logfile analysis, text manipulation, in-place editing of files, and scouring structured text files for specific field values*,
Girish Venkatachalam [Why Perl is still relevant in 2022](https://stackoverflow.blog/2022/07/06/why-perl-is-still-relevant-in-2022/)
- *Do the best you can until you know better. Then when you know better, do better.* Maya Angelou
- *Gwneuwch y pethau bychain, do the little things*, Dewi Sant
- *We are our mistakes. Sometimes they are the best part of us*. Harlen Coben, Think Twice
## changelog
[changelog.md](documentation/changelog.md) provides details of the history of the project.
1 change: 1 addition & 0 deletions test-cases/alignment/alignment-test-cases.sh
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,7 @@ latexindent.pl -s issue-543.tex -o=+-mod1

latexindent.pl -s -m issue-541.tex -l issue-541.yaml -o=+-mod1

latexindent.pl -y="lookForAlignDelims:tblr:alignFinalDoubleBackSlash:1" -s issue-551.tex -o=+-mod1
[[ $silentMode == 0 ]] && set -x
[[ $gitStatus == 1 ]] && git status
[[ $noisyMode == 1 ]] && makenoise
12 changes: 12 additions & 0 deletions test-cases/alignment/issue-551-mod1.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
\documentclass{standalone}

\usepackage{tabularray}

\begin{document}

\begin{tblr}{colspec={*{2}{c}},cell{1}{1}={r=2}{c}}
{1 \\2} & 3 \\
& 4 \\
\end{tblr}

\end{document}
12 changes: 12 additions & 0 deletions test-cases/alignment/issue-551.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
\documentclass{standalone}

\usepackage{tabularray}

\begin{document}

\begin{tblr}{colspec={*{2}{c}},cell{1}{1}={r=2}{c}}
{1 \\2}&3\\
& 4 \\
\end{tblr}

\end{document}

0 comments on commit fed474e

Please sign in to comment.