Skip to content

Commit

Permalink
Disable LaTeX in AppImage builds, and update the download web page.
Browse files Browse the repository at this point in the history
  • Loading branch information
Kasper Peeters committed Apr 13, 2024
1 parent 5ca5519 commit 4649b59
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 29 deletions.
5 changes: 5 additions & 0 deletions client_server/DocumentThread.cc
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,11 @@ DocumentThread::Prefs::Prefs(bool use_defaults)
tab_completion = data.value("tab_completion", true);
microtex = data.value("microtex", false);

// Force microtex when this is an AppImage.
const char *appdir = getenv("APPDIR");
if(appdir)
microtex=true;

if(git_path=="")
git_path="/usr/bin/git";

Expand Down
39 changes: 22 additions & 17 deletions frontend/gtkmm/NotebookWindow.cc
Original file line number Diff line number Diff line change
Expand Up @@ -386,23 +386,28 @@ NotebookWindow::NotebookWindow(Cadabra *c, bool ro)
" <attribute name='action'>cdb.HighlightChoose</attribute>"
" </item>"
" </section>"
" </submenu>"
" <submenu>"
" <attribute name='label'>Maths rendering</attribute>"
" <section>"
" <item>"
" <attribute name='label'>LaTeX (external)</attribute>"
" <attribute name='action'>cdb.MicroTeX</attribute>"
" <attribute name='target' type='i'>0</attribute>"
" </item>"
" <item>"
" <attribute name='label'>MicroTeX (internal)</attribute>"
" <attribute name='action'>cdb.MicroTeX</attribute>"
" <attribute name='target' type='i'>1</attribute>"
" </item>"
" </section>"
" </submenu>"
" <item>"
" </submenu>";
const char *appdir = getenv("APPDIR");
if(!appdir) {
ui_info+=
" <submenu>"
" <attribute name='label'>Maths rendering</attribute>"
" <section>"
" <item>"
" <attribute name='label'>LaTeX (external)</attribute>"
" <attribute name='action'>cdb.MicroTeX</attribute>"
" <attribute name='target' type='i'>0</attribute>"
" </item>"
" <item>"
" <attribute name='label'>MicroTeX (internal)</attribute>"
" <attribute name='action'>cdb.MicroTeX</attribute>"
" <attribute name='target' type='i'>1</attribute>"
" </item>"
" </section>"
" </submenu>";
}
ui_info +=
" <item>"
" <attribute name='label'>Use default settings</attribute>"
" <attribute name='action'>cdb.ViewUseDefaultSettings</attribute>"
" </item>"
Expand Down
43 changes: 31 additions & 12 deletions web2/cadabra2/source/download.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,22 @@ <h2>Binary packages</h2>
</p>

<div class="packages">
<div class="distrotype">
<img src="static/images/ubuntulogo.png"/>
<div class="distronum"><a href="https://cadabra.science/packages/appimage-x86_64">Cadabra AppImage (for x86_64)</a></div>
<div class="distronum"><a href="https://cadabra.science/packages/appimage-aarch64">Cadabra AppImage (for aarch64)</a></div>
<div class="distrotxt">
The AppImage version of Cadabra is experimental and there are
some small issues remaining with the notebook interface. If your
distribution is listed below, you are better off downloading a
distribution-specific package. However, the AppImage has the
advantage that it can be installed on any reasonably modern
Linux distribution and that it is completely
self-contained. Just download and make the file executable
with <tt>chmod u+x *.AppImage</tt>.
</div>
</div>

<div class="distrotype">
<img src="static/images/ubuntulogo.png"/>
<div class="distronum"><a href="https://cadabra.science/packages/ubuntu1804">Ubuntu Bionic Beaver 18.04</a></div>
Expand Down Expand Up @@ -158,20 +174,23 @@ <h2>Binary packages</h2>
<div class="distrotype">
<img src="static/images/conda.png"/>
<div class="distrotxt">
On Linux and macOS, you can install Cadabra, its native notebook
interface, and the Jupyter kernel via Conda or Anaconda, thanks
to the work of Isuru Fernando. Activate the <tt>conda-forge</tt>
channel if you have not done that already, with
<code>conda config --add channels conda-forge</code>
<code>conda config --set channel_priority strict</code>
and then install these packages by using one of the following
lines:
<code>conda install cadabra2</code>
<code>conda install cadabra2-gtk</code>
<code>conda install cadabra2-jupyter-kernel</code>
<b>The Conda packages are currently outdated and no longer recommended</b>
</div>
<div class="distrotxt">
On Linux and macOS, you can install Cadabra, its native notebook
interface, and the Jupyter kernel via Conda or Anaconda, thanks
to the work of Isuru Fernando. Activate the <tt>conda-forge</tt>
channel if you have not done that already, with
<code>conda config --add channels conda-forge</code>
<code>conda config --set channel_priority strict</code>
and then install these packages by using one of the following
lines:
<code>conda install cadabra2</code>
<code>conda install cadabra2-gtk</code>
<code>conda install cadabra2-jupyter-kernel</code>
</div>
</div>

</div>

<p>
Expand Down

0 comments on commit 4649b59

Please sign in to comment.