(OLD) (ARCHIVED) Puppy Linux Discussion Forum Forum Index (OLD) (ARCHIVED) Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info

This forum can also be accessed as http://oldforum.puppylinux.com
It is now read-only and serves only as archives.

Please register over the NEW forum
https://forum.puppylinux.com
and continue your work there. Thank you.

 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups    
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Fri 18 Sep 2020, 04:44
All times are UTC - 4
 Forum index » Taking the Puppy out for a walk » Misc
Latex, Octave and Interest in COVID-19 Science
Moderators: Flash, JohnMurga
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies. View previous topic :: View next topic
Page 1 of 1 [6 Posts]  
Author Message
s243a

Joined: 02 Sep 2014
Posts: 2626

PostPosted: Mon 15 Jun 2020, 01:23    Post subject:  Latex, Octave and Interest in COVID-19 Science
Subject description: Part 1 Setting Up Latex on Puppy
 

I've taken a bit of a break from puppy in part because I got stuck trying to figure out some ssl related stuff and also because of interest in the science of COVID-19. As I dig into things more it won't be enough just to quote relevant sections of a given paper but I will want to try to either repeat some of the math or do some of the related math of my own.

Some forums have good support for math formulas via latex but if something takes a long time to write (e.g. I'm working out the ideas) then I would rather generate the latex localy than via some forum software. I googled "latex linux" and read, "9 Best LaTeX Editors For Linux".

The first program that caught my eye was gummi. I found the split window showing the preview on the right and the latex code on the left appealing. I intially couldn't get gummi to work so also installed lyx and kile. Kile is more of an IDE and lyx is a WYSIWYG (What you see is what you get) editor. Lyx might be a good candidate to replace the word processor in a math/science oriented version of puppylinux.

I had the same issues with lyx as I did with gummi and the issue was related to missing configuration files for texlive. After failing to resolve this via installing multiple tex/tek/latex related packages from the debian repos, I discovered there was an installation script for a so-called vanilla version of texlive that one could install that was independent of the debian repos. I was able to use this vanilla version of texlive to get gummi working with only a few files borrowed from the debian repos and in general this small hack/fix to get it to work might not be typically necessary and might only be due to a random error that occured during installation. I won't know of course until I here if others have experienced the same problem and if so they will be fortunate to have my small fixes available.

Prior to installing the Vanilla version first install the following debian packages
Code:

 tex-common, texinfo, and perhaps lmodern

**As mentioned at: https://www.tug.org/texlive/debian.html

The vanilla version of tex live can be downloaded from:
http://ctan.mirror.globo.tech/systems/texlive/Source/
** other mirrors can be found at: https://ctan.org/mirrors

Download the file install-tl-unx.tar.gz

Extract the file and and in the extracted directory run:
Code:

perl install-tl

** As mentioned at: https://www.tug.org/texlive/quickinstall.html

the software will be installed to the following directory:
Code:

/usr/local/texlive/2020


prepend this path to your path variable (e.g. edit /etc/profile)

Now update the files by first
downloading the script "update-tlmgr-latest.sh"
and then running it in the following directory "/usr/local/texlive/2020" with the code:
Code:

sh update-tlmgr-latest.sh -- --upgrade

**As mentioned at https://www.tug.org/texlive/upgrade.html

Assuming that your path variable is set correctly and you are in a terminal with the working directory at "/usr/local/texlive/2020" then you can test your upgrade with the following code:
Code:

tlmgr -gui

** As mentioned here https://www.tug.org/texlive/doc/texlive-en/texlive-en.html#tlportable

If the upgrade worked then when you click the load default button the local versions shouldmatch the remote repo.

Now assuming you are running the terminal in the same directory and the PATH variable is still correct, try starting gummi. Check to see if there are any missing files. I was missing pdftexconfig.tex hyphen.tex. I identified which debian package these were located in:
Code:

$ grep -rn /var/packages -e pdftexconfig.tex
/var/packages/texlive-base_2018.20190227-2_all.files:1524:/usr/share/texlive/texmf-dist/tex/generic/tex-ini-files/pdftexconfig.tex
$ grep -rn /var/packages -e hyphen.tex
/var/packages/texlive-base_2018.20190227-2_all.files:1511:/usr/share/texlive/texmf-dist/tex/generic/hyphen/hyphen.tex

and then copied the missing files into the directories
Code:

/usr/local/texlive/2020/texmf-dist/tex/latex/latexconfig
#and
/usr/local/texlive/2020/texmf-dist/tex/generic/hyphen
#respectively.


In the latexconfig directory only one file was missing but in the hyphen directory, multiple files were missing. I copied all the missing files for the hyphen directory. I didn't attempt to do a general merge because the directories might be structured differently and there also might be compatibility issues. Coping these few missing files has appeared to make gummi work but more testing is required. To simplify this for other people I could create an sfs file.

I was also able to get octave working both on dupupbuster32 and fatdog64. For fatdog64 you must load devx for octave to work. On dpupbuster you can install the files that are part of devX in pkg using the HIDE_BUILTINS=false option. You might also need the -f option. I recommend using the latest version of pkg rather than the one that come with dpupubuster. You can also on fatdog64 install packages that are part of devX but I advise against this because depending on the package it might cause compatibility issue.

As a final note if you are installing texlive in PUPMODE=13 (i.e. pmedia=usbflash) you might run out of memory on an older laptop. One could get around this by saving during installation or creating a swap file. Alternatively one could reboot in PUPMODE=12 (i.e. pmedia=usbhd). Perhaps it was the saving during installation that caused me to miss a few files that I had to obtain from the debian repos.

More complete installation instructions can be found at:
https://www.tug.org/texlive/doc/texlive-en/texlive-en.html#installation

_________________
Find me on minds and on pearltrees.
Back to top
View user's profile Send private message Visit poster's website 
s243a

Joined: 02 Sep 2014
Posts: 2626

PostPosted: Tue 07 Jul 2020, 19:57    Post subject:  

I had some issues getting hyperlinks to work in my LaTex documents.
https://www.overleaf.com/learn/latex/hyperlinks

As discussed this might be due to an error in the installation process rather than anything that was fundamentally missing under normal installation.

Anyway, the troubleshooting stategy is to search for the missing file in either your system or at:
https://packages.debian.org/search?suite=default&section=all&arch=any&searchon=contents&keywords=rerunfilecheck.sty

For instance if I search for it on my dpup system I might type:
Code:

cd /var/packages
grep -rn . -e 'rerunfilecheck.sty'


to see where the debian version of the file is and then I coppy the missing folder contents to the vanilla installation. After doing this several times I identified the following folders that I had to copy missing contents from in order to get the hyperref package working in the vinella version of texlive:

Code:

Copy contents of :
/usr/share/texlive/texmf-dist/tex/latex/hyperref/
to
/usr/local/texlive/2020/texmf-dist/tex/latex/hyperref

/usr/share/texlive/texmf-dist/tex/generic/oberdiek/
to
/usr/local/texlive/2020/texmf-dist/tex/generic/oberdiek/

/usr/share/texlive/texmf-dist/tex/generic/ifxetex/
to (new folder)
/usr/local/texlive/2020/texmf-dist/tex/generic/ifxetex/

/usr/share/texlive/texmf-dist/tex/latex/url/
to
/usr/local/texlive/2020/texmf-dist/tex/latex/url/

/usr/share/texlive/texmf-dist/tex/latex/oberdiek/
to
/usr/local/texlive/2020/texmf-dist/tex/latex/oberdiek/


Currently I'm using gummi to write some stuff up about the Pareto distribution. This distribution is often used to model income and wealth inequality.

_________________
Find me on minds and on pearltrees.

Last edited by s243a on Tue 07 Jul 2020, 22:25; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website 
tallboy


Joined: 21 Sep 2010
Posts: 1767
Location: Drøbak, Norway

PostPosted: Tue 07 Jul 2020, 20:49    Post subject:  

emacs. I have the full texlive on my old Debian box, some 4Gb if I am not mistaken. I have not needed to make a LaTex document for a little more than a year, but I used LaTex almost daily at the uni from 2000 onwards, and I still think LaTex. From time to time, some GUI editors turned up, and were promptly dismissed. Nothing compared to emacs. It has/had a steep learning curve, requires a lot from the user's memory about how everything works, and it may be considered a little old-fashioned today. I still think it is the best tool for producing LaTex documents. They were both made in the same time period, and they both bear the marks of the influence from the major nerds of those days. But, they work.
_________________
True freedom is a live Puppy on a multisession CD/DVD.
Back to top
View user's profile Send private message 
s243a

Joined: 02 Sep 2014
Posts: 2626

PostPosted: Thu 09 Jul 2020, 03:07    Post subject:  

tallboy wrote:
emacs. I have the full texlive on my old Debian box, some 4Gb if I am not mistaken. I have not needed to make a LaTex document for a little more than a year, but I used LaTex almost daily at the uni from 2000 onwards, and I still think LaTex. From time to time, some GUI editors turned up, and were promptly dismissed. Nothing compared to emacs. It has/had a steep learning curve, requires a lot from the user's memory about how everything works, and it may be considered a little old-fashioned today. I still think it is the best tool for producing LaTex documents. They were both made in the same time period, and they both bear the marks of the influence from the major nerds of those days. But, they work.


I now again wonder about all the cool things that One might be able to do with emacs but never invested the time to learn it. Since, I'm not strong at the really powerful editors emacs and VI/VIM In the near term I will be using mostly GUI style editors but perhaps one day I will step up to a more powerful CLI based editor.

_________________
Find me on minds and on pearltrees.
Back to top
View user's profile Send private message Visit poster's website 
s243a

Joined: 02 Sep 2014
Posts: 2626

PostPosted: Thu 09 Jul 2020, 03:26    Post subject:  

I was having some issues adding figures to my latex document. As I mentioned in "another post" The solution was to specify the driver (i.e.pdftex) in the usepackage statement as follows:

Code:

\usepackage[pdftex]{graphicx}


texlive comes with a bunch of scripts, I'm not sure if they are important to how texlive runs or not but the broken symlinks were bugging me. The scripts (or symlinks to them?) are found in the package, texlive-extra-utils but I think this package is mostly symlinks from the bin director, which is for the vanilla version of texlive:
/usr/local/texlive/2020/bin/i386-linux

The actual scripts are contained in separate package. To troubleshoot, I looked to see where there broken symlinks were pointed and searched for the file name of the target. For example:
https://packages.debian.org/search?searchon=contents&keywords=pdfbook2

and then copy the missing script file from the system version of texlive to the vanilla version. I only was concerned about copying over the scrips and didn't check to see if anything else in the package was missing but could write a script to do this.

Another thing worth checking to see if ones borken verison of texlive is missing any necessary configuration files. For instance, "[url=https://packages.debian.org/search?suite=buster&section=all&arch=any&searchon=contents&keywords=pdftex.def]pdftex.def[/uirl]", which for the vanilla version of texlive is found at:
/usr/local/texlive/2020/texmf-dist/tex/latex/graphics-def/pdftex.def

If a configuration file is missing -- like this one was (i.e. pdftex.def) -- then one could copy them over from the system version of texlive. If one is using pkg then reinstalling the package might leave around the package file which can be extracted or if it is installed properly then the files should be on your system.

If you are missing a configuration file you should notice it in your error log of your latex editor (e.g. gummi). Also if an error is reported in a given tex script file (e.g. graphics.sty) you might see in the script file what it is looking for. For instance in graphics.sty. it noteced that default drives are specified in graphics.cfg. If this file is missing you might want to copy a version of it and then edit it accordingly.

_________________
Find me on minds and on pearltrees.
Back to top
View user's profile Send private message Visit poster's website 
tallboy


Joined: 21 Sep 2010
Posts: 1767
Location: Drøbak, Norway

PostPosted: Thu 09 Jul 2020, 20:13    Post subject:  

The downside to Tex, LaTex, emacs, vim, is that they are so f..ing massive, that when you at last feel that you start to master them, you have to read up on a whole lot of new info to make some small changes, and then it is very easy to get lost! Shocked
_________________
True freedom is a live Puppy on a multisession CD/DVD.
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [6 Posts]  
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies. View previous topic :: View next topic
 Forum index » Taking the Puppy out for a walk » Misc
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0957s ][ Queries: 12 (0.0424s) ][ GZIP on ]