~ninjin/Unicode2LaTeX.jl

89f7ef5aeaffc90ebf5f4b4e1c55c97dacc111cd — Pontus Stenetorp 2 years ago 570c458
Moved to repository sourcehut
4 files changed, 29 insertions(+), 50 deletions(-)

A .build.yml
D .gitlab-ci.yml
M Makefile
M README.md
A .build.yml => .build.yml +23 -0
@@ 0,0 1,23 @@
# vim: set ts=8 sw=2 sts=2 et:

image: debian/stable
packages:
  - git
  - make
  - texlive-fonts-extra
  - texlive-lang-cyrillic
  - texlive-latex-base
  - wget
tasks:
  - test: |
      wget 'https://julialang-s3.julialang.org/bin/linux/x64/1.0/julia-1.0.5-linux-x86_64.tar.gz' \
        -O /tmp/julia.tar.gz
      mkdir -p ~/.local/bin
      tar -x -f /tmp/julia.tar.gz -C ~/.local --strip-components 1
      rm /tmp/julia.tar.gz
      export PATH="${PATH}:${HOME}/.local/bin"

      cd ~/Unicode2LaTeX.jl
      make instantiate
      make test
      make coverage

D .gitlab-ci.yml => .gitlab-ci.yml +0 -46
@@ 1,46 0,0 @@
# vim: set ts=8 sw=2 sts=2 et:

stages:
  - test
  - coverage

before_script:
  - export DEBIAN_FRONTEND=noninteractive
  - apt-get update
  - apt-get install -y
    git
    make
    texlive-fonts-extra
    texlive-lang-cyrillic
    texlive-latex-base
  - make instantiate

.test_template: &test_definition
  script:
    - make test

image: julia:1.4

test:
  <<: *test_definition

test:lts:
  image: julia:1.0
  <<: *test_definition

test:latest:
  image:          julia:latest
  allow_failure:  true
  <<: *test_definition

coverage:
  stage:  coverage
  script: |
    make coverage
    julia << EOF
      using Pkg
      Pkg.add("Coverage")
      using Coverage
      # Verbose by default and exposes the access token, suppress.
      Codecov.submit_local(process_folder(), "."; verbose=false)
    EOF

M Makefile => Makefile +2 -0
@@ 11,6 11,8 @@ test:
.PHONY: coverage
coverage: coverage=true
coverage: test
	julia -e 'using Pkg; Pkg.add("Coverage")'
	julia -e 'using Coverage; println("Coverage: ", round(100*reduce(/, get_summary(process_folder())), digits=2), "%")'

.PHONY: instantiate
instantiate:

M README.md => README.md +4 -4
@@ 14,7 14,7 @@ by a TeX engine not under your control.
Simply use the Julia package manager:

```julia
    add Unicode2LaTeX
add Unicode2LaTeX
```

# Usage


@@ 23,10 23,10 @@ Unicode2LaTeX exports a single function that maps strings and characters to
their corresponding LaTeX-internal form:

```julia
    using Unicode2LaTeX
using Unicode2LaTeX

    unicode2latex('ö') # => "\\\"o"
    unicode2latex("Kurt Gödel") # => "Kurt G\\\"odel"
unicode2latex('ö') # => "\\\"o"
unicode2latex("Kurt Gödel") # => "Kurt G\\\"odel"
```

Do note that ASCII characters are left in place, as TeX already knows how to