1

I am new here. Before I decided to ask this question I spent a few hours looking for an answer on my own.

I'm trying to include the "tikz-lad­der" ( https://ctan.org/pkg/tikz-ladder ) library to my document using:

 \usepackage{tikz}
 \usetikzlibrary{circuits}
 \usetikzlibrary{circuits.plc.ladder}

Tex says that it can't find the library. I'm trying to install it through TexLive but I can't the "tikz-ladder" package.

I'm using TeXStudio under Fedora 27. By "TexLive" I mean typing "dnf install texlive-" into terminal. I've already installed "texlive-full" and "texlive-tikz*" through "my TexLive".

Thanks in advance.

  • As a workaround, you could manually install it either in your current directory or your texmf folder from https://ctan.org/tex-archive/graphics/pgf/contrib/tikz-ladder (see also https://tex.stackexchange.com/questions/73016/how-do-i-install-an-individual-package-on-a-linux-system) – samcarter_is_at_topanswers.xyz Apr 21 '18 at 15:07
  • Do you have updated your package manager? have you tried with the following command tlmgr update --self and then tlmgr install pkgname. if wou need some automated and friendly graphicaly option, you could change to Miktex, its only a suggestion, it could not mean that one is better than other. – J Leon V. Apr 21 '18 at 16:23

1 Answers1

1

Download pgfmanual-en-macros.tex from CTAN and put it in your working directory.

Go to tikz-ladder on CTAN and the file tikzlibrarycircuits.plc.ladder.code is at tex folder of tikz-ladder. Copy it and put it in your working directory. In my case, this was the solution:

Use the following before your code. These need not be in preamble.

\input{pgfmanual-en-macros}    
\input{tikzlibrarycircuits.plc.ladder.code}

Sample Codes

\input{pgfmanual-en-macros}
\input {tikzlibrarycircuits.plc.ladder.code}

\begin{tikzpicture}[circuit plc ladder,thick,ladderrungsep=0.8] \draw(0,0) to [contact NO={info={$A$},name=ca}] ++(3,0) to [coil={info={$Q$}}] ++(3,0) coordinate(laddertopright); ill[red!20] (laddertopright |- ca.south) rectangle +(-2,-1em); \draw(0,-1) to [contact NO={info={$B$},name=cb}] ++(3,0) -- +(0,1); ill[red!20] (laddertopright |- cb.south) rectangle +(-2,-1em) coordinate (pb); ill[blue!20] (pb) rectangle ++(2,-0.8); \ladderrungend{2} \draw(0,0) to [contact NO={info={$C$},name=cc}] ++(3,0) to [coil={info={$R$}}] ++(3,0); ill[red!20] (laddertopright |- cc.south) rectangle +(-2,-1em) coordinate (pc); ill[blue!20] (pc) rectangle ++(2,-0.8); \ladderrungend{1} \draw(0,0) to [contact NO={info={$D$}}] ++(3,0) to [coil={info={$S$}}] ++(3,0); \ladderrungend{1} \ladderpowerrails \end{tikzpicture}

JamesT
  • 3,169