Skip to content

Commit

Permalink
Merge pull request #34 from suikan4github/develop
Browse files Browse the repository at this point in the history
Merge Develop for release v1.2.3
  • Loading branch information
suikan4github authored Apr 6, 2024
2 parents 85fc954 + 94ca771 commit 8259812
Show file tree
Hide file tree
Showing 5 changed files with 122 additions and 93 deletions.
16 changes: 15 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,19 @@
### Known Issue
- [Issue #3](https://github.com/suikan4github/PaleALE/issues/3) : 索引が空の場合にLaTeXのビルドが異常終了する

## [v1.2.3] 2024-04-06
致命的な問題を修正した。また、このバージョンからTeX Liveのインストール中に質問をしなくなった。
### Added
### Changed
### Deprecated
### Removed
### Fixed
- [Issue #33](https://github.com/suikan4github/PaleALE/issues/33) : インストールしたlatexmkが見えない

### Security
### Known Issue
- [Issue #3](https://github.com/suikan4github/PaleALE/issues/3) : 索引が空の場合にLaTeXのビルドが異常終了する

## [v1.2.2] 2024-03-31
サンプル文章のデスクトップ共有をActual Multiple MOnitorsに置き換えた。
### Added
Expand Down Expand Up @@ -175,7 +188,8 @@ Windows 10環境のWSLに対応した。
## [1.0.0] - 2022-07-24
最初のリリース

[Unreleased]: https://github.com/suikan4github/PaleALE/compare/v1.2.2...develop
[Unreleased]: https://github.com/suikan4github/PaleALE/compare/v1.2.3...develop
[v1.2.3]: https://github.com/suikan4github/PaleALE/compare/v1.2.2...v1.2.3
[v1.2.2]: https://github.com/suikan4github/PaleALE/compare/v1.2.1...v1.2.2
[v1.2.1]: https://github.com/suikan4github/PaleALE/compare/v1.2.0...v1.2.1
[v1.2.0]: https://github.com/suikan4github/PaleALE/compare/v1.1.7...v1.2.0
Expand Down
14 changes: 2 additions & 12 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,7 @@ sudo ./install

また、ImageMagickについてはポリシー・ファイルを編集し、PDFデータを出力できるようにします。


インストール途中に1回ユーザーに問い合わせがあります。
````
Actions:
<I> start installation to hard disk
<P> save installation profile to 'texlive.profile' and exit
<Q> quit
Enter command:
````

ここではTeX Liveのインストールについて、どのようなアクションを取るかを聞いています。これは必ず I と答えてください。
インストールに使用した仮ファイルはすべて /tmp 下に置かれます。これらはUbuntuを再起動した際に消去されます。

## LaTeX Workshopのインストールと設定
[LaTeX Workshop](https://marketplace.visualstudio.com/items?itemName=James-Yu.latex-workshop)はVisual Studio Codeの拡張機能であり、LaTeX文書作成時にユーザーを支援してくれるモジュールです。
Expand Down Expand Up @@ -136,6 +125,7 @@ Settings.jsonを開いたら、以下のコードを追加してください。
```
## LaTeXプロジェクト構造の設定
LaTeXプロジェクトの構造は、論文や書籍ごとに設定しなければなりません。
なお、以下の作業が面倒ならば、PaleALEのsample ディレクトリをコピーして修正するとよいでしょう。

必要な作業は以下の通りです。なお、この説明において「文書ルート」とはプロジェクトの最上位ディレクトリの事です。文書ルートにはLaTeXのソース・ファイルをおさめます。すなわち、*.texファイル起き場です。
1. 文書ルートに.latexmkrcをコピーする
Expand Down
142 changes: 82 additions & 60 deletions install
Original file line number Diff line number Diff line change
Expand Up @@ -3,71 +3,93 @@
# Install script of Latex environmente. Tested on Ubuntu 22.04 LTS
# Note : We support only x86_64 and aarch64

#######################################################################
#
# Check install condtion
#
if [ `id -u` -ne 0 ] ; then
# Only root can run this.
echo "ERROR : Please run as root. ex: sudo ./install"
exit 1
fi

# Check the architecture

# The $CPU must be x86_64 or aarch64
if $(arch | grep -e x86_64 -e aarch64 > /dev/null); then
echo OK. We support the $(arch) architecture.
else
echo Sorry, but the $(arch) archicture is not supported.
exit 1
fi


# Use subshell to encapsule the effect of umask
(

# Foundemental tools installation
apt-get update && apt-get upgrade -y
apt-get install -y git ca-certificates build-essential parallel xvfb cpanminus

# Create working directory for installing.
umask 077 # Secure the temp directory.
timestamp=$(date +%Y%m%d%H%M%S)
# Make safe directory under the /tmp
tmpd=$( mktemp -dt "PaleALE.$USER.$timestamp.XXXXXX")/
cd $tmpd

# Suppress to ask use during the cpan run.
export PERL_MM_USE_DEFAULT=1
# These cpan modules are needed.
cpanm YAML::Tiny
cpanm File::HomeDir

# Draw IO(ドローイングプログラム)の取得とインストール
apt-get -y install sqlite libgtk-3-0 libgbm1 libasound2 curl
curl -s https://api.github.com/repos/jgraph/drawio-desktop/releases/latest | grep browser_download_url | grep '\.deb' | cut -d '"' -f 4 | wget -i -

if $(arch | grep x86_64 > /dev/null); then
apt -f install -y ./drawio-amd64-*.deb
elif $(arch | grep aarch64 > /dev/null); then
apt -f install -y ./drawio-arm64-*.deb
else
echo Program logic error at Draw.IO installation.
exit 1
fi

# Install ImageMagick
apt-get install -y imagemagick
# Allowing to generate the PDF.
# delete the PDF policy line from the /etc/ImageMagic*/policy.xml
find /etc/ImageMagic*/policy.xml | xargs sed -i /^.*pattern=\"PDF\".*$/d


# Install TeX Live
wget http://mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz
tar xvf install-tl-unx.tar.gz
cd install-tl-2*
./install-tl -no-gui -repository http://mirror.ctan.org/systems/texlive/tlnet/
# Adding path of TeX
/usr/local/texlive/????/bin/*/tlmgr path add

# Leave the working directory by exiting subshell
)
# The $CPU must be x86_64 or aarch64
if $(arch | grep -e x86_64 -e aarch64 > /dev/null); then
echo OK. We support the $(arch) architecture.
else
echo Sorry, but the $(arch) archicture is not supported.
exit 1
fi

#######################################################################
#
# Install the basic tools
#

# Foundemental tools installation
apt-get update && apt-get upgrade -y
apt-get install -y git ca-certificates build-essential parallel xvfb cpanminus
# These are needed for drawio
apt-get -y install sqlite libgtk-3-0 libgbm1 libasound2 curl

# Suppress to ask use during the cpan run.
export PERL_MM_USE_DEFAULT=1
# These cpan modules are needed by tex live
cpanm YAML::Tiny
cpanm File::HomeDir

# Install ImageMagick
apt-get install -y imagemagick

#######################################################################
#
# Tweeting imagemagik to alloww generating the PDF.
#

# delete the PDF policy line from the /etc/ImageMagic*/policy.xml
find /etc/ImageMagic*/policy.xml | xargs sed -i /^.*pattern=\"PDF\".*$/d


#######################################################################
#
# Create a working directory for installing drawio and TeX live
#
timestamp=$(date +%Y%m%d%H%M%S)

# Make safe directory under the /tmp
tmpd=$( mktemp -dt "PaleALE.$USER.$timestamp.XXXXXX")/
# Trap handler to delete the directory, at the end of the script.
trap "cd -; rm -rf $tmpd; exit 1" EXIT

cd $tmpd

#######################################################################
#
# Installind drawio.
#
# Note, all supported architecture files will be downloaded at first.
curl -s https://api.github.com/repos/jgraph/drawio-desktop/releases/latest | grep browser_download_url | grep '\.deb' | cut -d '"' -f 4 | wget -i -

# Install the appropriate file based on the architecture.
if $(arch | grep x86_64 > /dev/null); then
apt -f install -y ./drawio-amd64-*.deb
elif $(arch | grep aarch64 > /dev/null); then
apt -f install -y ./drawio-arm64-*.deb
else
echo Program logic error at Draw.IO installation.
exit 1
fi

#######################################################################
#
# Install TeX Live
#
wget http://mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz
tar xvf install-tl-unx.tar.gz
cd install-tl-2*
./install-tl -no-gui -no-interaction -repository http://mirror.ctan.org/systems/texlive/tlnet/
# Adding path of TeX
/usr/local/texlive/????/bin/*/tlmgr path add


43 changes: 23 additions & 20 deletions sample/image_src/displayplug_mirror.drawio
Original file line number Diff line number Diff line change
@@ -1,59 +1,62 @@
<mxfile host="65bd71144e">
<diagram id="NC1hEWJh8_QtpdpS8o8B" name="Page-1">
<mxGraphModel dx="369" dy="1139" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="850" pageHeight="1100" math="0" shadow="0">
<mxGraphModel dx="852" dy="842" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="850" pageHeight="1100" math="0" shadow="0">
<root>
<mxCell id="0"/>
<mxCell id="1" parent="0"/>
<mxCell id="21" value="" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="120" y="90" width="540" height="380" as="geometry"/>
</mxCell>
<mxCell id="12" value="Windows PC" style="rounded=0;whiteSpace=wrap;html=1;strokeWidth=2;fontSize=18;fillColor=#E6E6E6;verticalAlign=top;" parent="1" vertex="1">
<mxGeometry x="40" y="90" width="260" height="320" as="geometry"/>
<mxGeometry x="160" y="120" width="260" height="320" as="geometry"/>
</mxCell>
<mxCell id="4" value="2k" style="shape=parallelogram;html=1;strokeWidth=2;perimeter=parallelogramPerimeter;whiteSpace=wrap;rounded=1;arcSize=0;size=0.23;flipH=1;rotation=0;direction=north;fontSize=18;" parent="1" vertex="1">
<mxGeometry x="80" y="127.5" width="90" height="100" as="geometry"/>
<mxGeometry x="200" y="157.5" width="90" height="100" as="geometry"/>
</mxCell>
<mxCell id="5" value="2k" style="shape=parallelogram;html=1;strokeWidth=2;perimeter=parallelogramPerimeter;whiteSpace=wrap;rounded=1;arcSize=18;size=0.22499999999999998;flipH=1;rotation=0;direction=south;fontSize=18;" parent="1" vertex="1">
<mxGeometry x="405" y="127.5" width="90" height="100" as="geometry"/>
<mxGeometry x="525" y="157.5" width="90" height="100" as="geometry"/>
</mxCell>
<mxCell id="7" value="" style="endArrow=classic;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" parent="1" source="4" edge="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="320" y="177" as="sourcePoint"/>
<mxPoint x="400" y="177" as="targetPoint"/>
<mxPoint x="440" y="207" as="sourcePoint"/>
<mxPoint x="520" y="207" as="targetPoint"/>
</mxGeometry>
</mxCell>
<mxCell id="9" value="Display" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;strokeWidth=2;fontSize=18;" parent="1" vertex="1">
<mxGeometry x="420" y="227.5" width="60" height="30" as="geometry"/>
<mxGeometry x="540" y="257.5" width="60" height="30" as="geometry"/>
</mxCell>
<mxCell id="10" value="Frame Buffer1" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;strokeWidth=2;fontSize=18;" parent="1" vertex="1">
<mxGeometry x="95" y="227.5" width="60" height="30" as="geometry"/>
<mxGeometry x="215" y="257.5" width="60" height="30" as="geometry"/>
</mxCell>
<mxCell id="13" value="4k" style="shape=parallelogram;html=1;strokeWidth=2;perimeter=parallelogramPerimeter;whiteSpace=wrap;rounded=1;arcSize=0;size=0.23;flipH=1;rotation=0;direction=north;fontSize=18;" parent="1" vertex="1">
<mxGeometry x="80" y="270" width="90" height="100" as="geometry"/>
<mxGeometry x="200" y="300" width="90" height="100" as="geometry"/>
</mxCell>
<mxCell id="15" value="" style="endArrow=classic;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;" parent="1" source="13" edge="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="320" y="319.5" as="sourcePoint"/>
<mxPoint x="300" y="320" as="targetPoint"/>
<mxPoint x="440" y="349.5" as="sourcePoint"/>
<mxPoint x="420" y="350" as="targetPoint"/>
</mxGeometry>
</mxCell>
<mxCell id="16" value="Display Plug" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;strokeWidth=2;fontSize=18;" parent="1" vertex="1">
<mxGeometry x="380" y="310" width="110" height="30" as="geometry"/>
<mxGeometry x="500" y="340" width="110" height="30" as="geometry"/>
</mxCell>
<mxCell id="17" value="Frame Buffer2" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;strokeWidth=2;fontSize=18;" parent="1" vertex="1">
<mxGeometry x="95" y="370" width="60" height="30" as="geometry"/>
<mxGeometry x="215" y="400" width="60" height="30" as="geometry"/>
</mxCell>
<mxCell id="18" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#000000;" parent="1" vertex="1">
<mxGeometry x="300" y="300" width="50" height="40" as="geometry"/>
<mxGeometry x="420" y="330" width="50" height="40" as="geometry"/>
</mxCell>
<mxCell id="19" value="" style="curved=1;endArrow=classic;html=1;entryX=0.25;entryY=1;entryDx=0;entryDy=0;exitX=0.75;exitY=1;exitDx=0;exitDy=0;dashed=1;dashPattern=8 8;startSize=6;endSize=13;" edge="1" parent="1" source="13" target="4">
<mxCell id="19" value="" style="curved=1;endArrow=classic;html=1;entryX=0.25;entryY=1;entryDx=0;entryDy=0;exitX=0.75;exitY=1;exitDx=0;exitDy=0;dashed=1;dashPattern=8 8;startSize=6;endSize=13;" parent="1" source="13" target="4" edge="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="290" y="600" as="sourcePoint"/>
<mxPoint x="340" y="550" as="targetPoint"/>
<mxPoint x="410" y="630" as="sourcePoint"/>
<mxPoint x="460" y="580" as="targetPoint"/>
<Array as="points">
<mxPoint x="350" y="250"/>
<mxPoint x="470" y="280"/>
</Array>
</mxGeometry>
</mxCell>
<mxCell id="20" value="Mirroring" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=19;" vertex="1" parent="1">
<mxGeometry x="190" y="235" width="100" height="30" as="geometry"/>
<mxCell id="20" value="Mirroring" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=19;" parent="1" vertex="1">
<mxGeometry x="310" y="265" width="100" height="30" as="geometry"/>
</mxCell>
</root>
</mxGraphModel>
Expand Down
Binary file added sample/image_src/displayplug_mirror.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 8259812

Please sign in to comment.