2

I install from source Texlive into this directory /opt/texlive

1

version 2021. 2

It is a Linux OS.

I want to upgrade Circuitikz package manually, without using tlmgr because I have no internet in this OS. I ask this using another OS with internet.

This is the source for Circuitikz that I just downloaded and want to extract / make install manually.

https://github.com/circuitikz/circuitikz/releases/tag/v1.6.3

The question is how? Where are all Tex packages usually located? e.g. Python is usually at /usr/lib/python3.9/site-packages.

Do I just need to type make after extracting that Circuitikz at just any directory?

2 Answers2

4

As per any package in CTAN style, the best option is to download the .tds zip, and unzip it under your local texmf directory, see method 3 here.

For circuitikz, you can also use the ...git hack following the instructions here.

A recent circuitikz should work with the 2001 distribution, but notice that this is not always a safe thing to do. The LaTeX kernel is evolving rapidly, and although I try to maintain backward compatibility, forward compatibility is not always guaranteed. Notice that if you had internet, updating circuitikz with a TeXLive 2021 will give you version 1.4.2 --- you can check it on overleaf easily with the following code:

\documentclass[border=5pt]{standalone}
\usepackage[siunitx, RPvoltages]{circuitikz}
\usepackage{pgfplots}
\pgfplotsset{compat=newest}
\begin{document}

\today{}: \begin{tabular}{lll} \LaTeX & \fmtversion \ %pdftex & \pdftextversion \ Tikz:& \pgfversion & \pgfversiondate\ Pgfplots:& \pgfplotsversion & \pgfplotsversiondate \ Circuitikz:& \pgfcircversion & \pgfcircversiondate\ siunitx: & \csname ver@siunitx.sty\endcsname \end{tabular} \end{document}

which with TeXLive 2021 gives:

enter image description here

Rmano
  • 40,848
  • 3
  • 64
  • 125
  • 1
    Thanks I will try it and report it if it is working. – Freya the Goddess Sep 13 '23 at 09:48
  • It works, I just need to know where is the current Circuitikz tex and doc in this OS located then by replacing it is done. – Freya the Goddess Sep 13 '23 at 13:43
  • @FreyatheGoddess As I commented below, the recommended way is to use the LOCALTEXMF directory (do not change the distribution ones!). In this case, it works because there are no new files or files that change names; otherwise, it will break... unless you rebuild the databases. – Rmano Sep 14 '23 at 11:04
0

I have found a way to upgrade Circuitikz package in Linux OS without using tlmgr or internet at all (provided that TexLive has been installed and working).

I use TexStudio and check with package help at the menu, I obtain the location for the doc and latex for the package Circuitikz:

1

See that the version is still 1.3.2 (I get the code from @Rmano above)

then I downloaded from CTAN the newest Circuitikz package in zip and extract / unzip it there will be 2 folders doc and tex, now replace the whole doc and latex folder in this path (the path to circuitikz in my Linux OS):

/opt/texlive/2021/texmf-dist/doc/latex/circuitikz (replace with the downloaded files inside the doc folder)

/opt/texlive/2021/texmf-dist/tex/latex/circuitikz (replace with the downloaded files inside the tex folder)

Now, by using the code to check version, I run and compile again.. et voila.. the version is 1.6.3. Thanks a lot.

3

  • Putting them in the texmf-dist is not a good idea. An update/restore of the package will overwrite it. You should put it in texmf-local (I linked the relevant post in my answer), which has precedence anyway. – Rmano Sep 13 '23 at 18:52
  • I tried to put it in texmf-local, but it works by putting them in texmf-dist – Freya the Goddess Sep 19 '23 at 14:13