TransWikia.com

Problems using "Kblocks" package for drawing "Block diagrams"

TeX - LaTeX Asked by ahmad alaa on June 27, 2021

My first question is:
How to move or shift the label on a given link like in the attached photo?

My second question is:
How to bend the link to become a 90 deg as shown in the picture?
I attached my code in tex.

documentclass{article}
usepackage{kblocks}

begin{document}
begin{kblock}
kStartNodec[$V_1$]{(0,-1.5)}{R1}
kScaleDistX[1.5]
kPlusMinusDown{R1}{S1}{0cm}
kLink[]{R1}{S1}
kInDown[]{S1}{um}{${V}_{4}$}{0}
kScaleDistX[1.5]
kTFRight{S1}{C1}{$0.35$}
kLink[]{S1}{C1}
kScaleDistX[3.46]
kPlusPlusUp{C1}{S2}{1cm}
kLink []{C1}{S2}
kStartNodec[]{(0,1)}{R2}
kScaleDistX[1.5]
kPlusPlusahm{R2}{S3}{0cm}
kInUp[]{S3}{um}{$V_2$}{0}
kInDown[]{S3}{um}{$V_3$}{0}
kTFRight{S3}{C2}{$frac{1}{2}$}
kLink[]{S3}{C2}
kStartNodec[$I^ast$]{(0,3)}{R5}
kScaleDistX[3]
kPlusMinusDown{R5}{S5}{0cm}
kLink[]{R5}{S5}
kLink[$I_{{calculated}}$]{C2}{S5}
kScaleDistX[1]
kTFRight{S5}{C3}{$s$}
kLink[]{S5}{C3}
kMinusPlusUp{C3}{S6}{0.2cm}
kLink[]{C3}{S6}
kInUp[]{S6}{um}{${V}_{dc}$}{0}
kTFRight{S6}{C7}{$0.2$}
kLink[]{S6}{C7}
kTFRight{C7}{C8}{$K_3$}
kLink[]{C7}{C8}
kLink[$V_{estimated.}$]{C8}{S2}
kOutRight{S2}{Y1}{$V_{out}^ast$}{0cm}
end{kblock}
end{document} 

enter image description here

One Answer

enter image description here

The kblocks pacakge has been updated. However, it might take a while for the code changes to reflect on the package arvhive. You can, however, download it from https://github.com/somefunAgba/kblocks

Here is probably the diagram that you want to realize

begin{kblock}
% ref
kJumpCS{spt}
% top blocks
kMarkNodeRight{0cm}{0cm}{$I^star$}{spt}{inI}
kPlusMinusDown{inI}{sb1}{1.cm}
kTFRight[0.2cm]{sb1}{tfb1}{$s$}
kTFBelow[0.5cm]{sb1}{tfb2}{$frac{1}{2}$}  
kPlusDownPlusUpL{tfb2}{sb2}{0cm}
kMinusPlusUp{tfb1}{sb3}{0cm}
kTFRight[0cm]{sb3}{tfb3}{$0.2$}
kTFRight[0cm]{tfb3}{tfb4}{$K_3$}
kMarkNodeAbove{0cm}{0cm}{$V_{dc}$}{inI}{inVdc}
kMarkNodeBelow{0cm}{0.3cm}{$V_2$}{inI}{inV2}
kMarkNodeBelow{0cm}{-0.4cm}{$V_3$}{inV2}{inV3}
% bottom blocks
kMarkNodeBelow{3cm}{0cm}{$V_1$}{inI}{inV1}
kPlusPlusUpB{tfb4}{sb4}{3cm}
kPlusMinusDown{inV1}{sb5}{0cm}
kTFRight[0cm]{sb5}{tfb5}{$0.35$}
kOutRight[0]{sb4}{outV}{$V_{out}^{star}$}{0}
kMarkNodeBelow{0cm}{0cm}{$V_4$}{inV1}{inV4}
% top links
kLinkHV[]{inVdc}{sb3}{0}{0}{0}
kLinkHV[]{inV2}{sb2}{0}{0}{0}
kLinkHV[]{inV3}{sb2}{0}{0}{0}
kLink[]{inI}{sb1}
kLink[]{sb1}{tfb1}
kLink[$I_{calc}$]{tfb2}{sb1}
kLink[]{tfb1}{sb3}
kLink[]{sb2}{tfb2}
kLink[]{sb3}{tfb3}
kLink[]{tfb3}{tfb4}
kLink[$V_{est}$]{tfb4}{sb4}
% bottom links
kLink[]{inV1}{sb5}
kLink[]{sb5}{tfb5}
kLink[]{tfb5}{sb4}
kLinkHV[]{inV4}{sb5}{0}{0}{0}
end{kblock}

Correct answer by Oluwasegun Somefun on June 27, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP