Episode #125 of the Stack Overflow podcast is here. We talk Tilde Club and mechanical keyboards. Listen now

# Tag Info

6

The answer is in the documentation for tkz-graph: use style={thick,-} \documentclass{article} \usepackage{tkz-berge} \tikzset{LabelStyle/.style= {fill=white}} \begin{document} \begin{tikzpicture} \SetVertexMath \Vertex[x=0, y=2, L=v_1 ]{v1} \Vertex[x=3.5, y=2, L=v_3 ]{v3} \Vertex[x=6, y=2, L=v_5 ]{v5} \Vertex[x=1.5, y=0, L=v_2 ]{...

6

The first line of tkz-berge is \RequirePackage{tkz-graph,tkz-arith} so it starts off from where tkz-graph finishes, so obviously any document using tkz-graph could use tkz-berge and be using exactly the same package just indirectly loaded. then tkz-berge defines additional things not in the base packages.

3

Here is a solution. \documentclass[11pt,b5paper,openany]{book} \usepackage{tkz-berge} \begin{document} \begin{figure} \centering \begin{tikzpicture}[scale=0.7] %\begin{scope}[xshift=7cm] \GraphInit[vstyle=Classic] \tikzset{VertexStyle/.append style = {minimum size = 1pt, inner sep=0pt}} \SetUpEdge[lw = ...

2

Elements on diagonals have either odd or even sum of indexes, so you can use \ifodd; schematically: \ifodd\numexpr\Row+\Column\relax do domething for elements on diagonals with odd sum of indexes \else do domething for elements on diagonals with even sum of indexes \fi In the question it's not clear if tkz-berge is really needed so I opted for a "...

2

The node counter is used throughout the code of tkz-berge to calculate positions and to generate internal node names, so when you change the counter all kinds of things break down. However, you can renew (i.e., modify) the lower level node printing command \write@math which calls \Vertex (defined by the package tkz-graph, which is loaded by tkz-berge) with ...

1

You have almost everything in place, you just need to load the decorations.markings library and then actually use the ->- style you've defined. \documentclass[border=5mm]{standalone} \usepackage{tkz-graph} \usetikzlibrary{decorations.markings} % <-- you need this for markings \tikzset{->-/.style={ decoration={ markings, mark=at position #1 ...

1

pdfplots activates the fpu library. And as the error says Mod used by tkz-berge is not implemented there. But it seems not to be possible to deactivate the change: \documentclass{article} \usepackage{tikz}% \usetikzlibrary{fpu} \begin{document} \begin{tikzpicture}[scale=0.3] \pgfmathsetcounter{section}{Mod(4,8)} %works \pgfkeys{/pgf/fpu=true} \pgfkeys{/...

1

For parallel and equal-length arrows I would normally go with tikz-cd: % arara: pdflatex \documentclass{article} \usepackage{tkz-berge} \setlength{\textwidth}{16cm} % maybe use the package geometry for such things. 16 cm do not fit in article... \usepackage{tikz-cd} \tikzset{% ,VertexStyle/.style = {% ,shape = circle ,inner sep = 0pt ...

1

It seems that the tkz-berge package has no provisions for two labels per node. But one can use tikz commands to add more of them, using e.g. a command \extralabel[optional distance]{angle}{new label}{node name} defined as \newcommand\extralabel[4][0mm]{\node[label={[label distance=#1]#2:#3}] at (#4){};} In your code: \documentclass{standalone} \...

1

You can temporarily disable the automatic labeling with \SetVertexNoLabel before drawing the vertices, then activate it again with \SetVertexLabel after, and then use \Vertex[Node]{u} etc. The Node option is necessary to indicate that u and v are referring to the already defined references u and v created with \Vertices. MWE: \documentclass[border=2mm]{...

Only top voted, non community-wiki answers of a minimum length are eligible