1

When I am trying the example from the tkz-euclide document on overleaf, I find that some of the commands are undefined, here's the example and undefined command is \tkzDefPointOnCircle.

\begin{tikzpicture}
\tkzDefPoints{0/0/A,4/0/B,0.8/3/C}
\tkzDefPointOnCircle[angle=90,center=B,radius=1 cm]
\tkzGetPoint{I}
\tkzDrawCircle[R,teal](B,1cm)
\tkzDrawPoint[teal](I)
\tkzDefCircle[circum](A,B,C)
\tkzGetPoint{G} \tkzGetLength{rG}
\tkzDefPointOnCircle[angle=30,center=G,radius=\rG pt]
\tkzGetPoint{J}
\tkzDrawPoints(A,B,C)
\tkzDrawCircle(G,J)
\tkzDrawPoint(G)
\tkzDrawPoint[red](J)
\end{tikzpicture}

Then I went online and find the command is defined in tkz-obj-eu-points.tex file of the tkz-euclide package. So I tried some different commands.

It turns out that all commands and environments defined in .tex file of tkz-euclide cannot be used in overleaf. Here is list, from tkz-euclide 3.02c.

☞ tkz-euclide.sty

☞ tkz-obj-eu-angles.tex

☞ tkz-obj-eu-arcs.tex

☞ tkz-obj-eu-circles.tex

☞ tkz-obj-eu-compass.tex

☞ tkz-obj-eu-draw-circles.tex

☞ tkz-obj-eu-draw-lines.tex

☞ tkz-obj-eu-draw-polygons.tex

☞ tkz-obj-eu-lines.tex

☞ tkz-obj-eu-points-by.tex

☞ tkz-obj-eu-points-rnd.tex

☞ tkz-obj-eu-points-with.tex

☞ tkz-obj-eu-points.tex

☞ tkz-obj-eu-polygons.tex

☞ tkz-obj-eu-protractor.tex

☞ tkz-obj-eu-sectors.tex

Does anyone know how to add those packages into overleaf tex environemnt?

Thank you so much for helping.

I have include tkz-base package.

And the tkz-euclide package.

and I have try to add the command \usetkzobj{all}.

The MWE is

In .cls file

\LoadClass[12pt, a4paper]{book}
% Those packages are using for other purposes.
% But I am not sure if some of these will cause the issue.
\RequirePackage[utf8]{inputenc}
\RequirePackage[T1]{fontenc}
\RequirePackage{titlesec}
\RequirePackage{color}
\RequirePackage{multicol}
\RequirePackage[many]{tcolorbox}
\RequirePackage{multicol}
\RequirePackage{wasysym}
\RequirePackage{amssymb}
\RequirePackage{ulem}
\RequirePackage[left=2cm,right=2cm,top=2cm,bottom=2cm]{geometry} 
\RequirePackage{xcolor}
% Those packages are related to the problem
%\RequirePackage{tikz}    % tkz-euclide loads tkz-bse and tikz
%\RequirePackage{tkz-base} %
\RequirePackage{tkz-euclide}

In .tex file

\documentclass{blockLaTeX}

\begin{document}

\maketitle

\chapter{Hyperbolic geometry}

\section{Belfram-Klein model}

\subsection{Interpretation}

\begin{tikzpicture}
\tkzDefPoints{0/0/A,4/0/B,0.8/3/C}
\tkzDefPointOnCircle[angle=90,center=B,radius=1 cm] % undefined control sequence.
\tkzGetPoint{I} % Package pgf Error: No shape named tkzPointResult is known.
\tkzDrawCircle[R,teal](B,1cm) % Package pgf keys Error.
\tkzDrawPoint[teal](I)
\tkzDefCircle[circum](A,B,C)
\tkzGetPoint{G} \tkzGetLength{rG}
\tkzDefPointOnCircle[angle=30,center=G,radius=\rG pt] % undefined control sequence.
\tkzGetPoint{J}
\tkzDrawPoints(A,B,C)
\tkzDrawCircle(G,J)
\tkzDrawPoint(G)
\tkzDrawPoint[red](J) % Package pgf keys Error.
\end{tikzpicture}

\end{document}
5
  • 1
    no you don't need \usetkzobj{all} with the version 3.02. Sorry but I can't help you with overleaf. Can you give your preamble in your question ? The list of files is not helpful. It would be better to give which macro is not defined? – Alain Matthes Mar 2 '20 at 20:26
  • Well, I tried to remove it, but it is not helping. I think it would be helpful if you could tell me a method to include .tex file into .cls file. I am using my own .cls and I don't want to make it mess. – Zizheng Yang Mar 2 '20 at 20:30
  • 1
    Welcome to TeX.SX! Can you please expand the code snippet that you have posted to a full minimal working example. It is much easier to help you if we can start with some compilable code that illustrates your problem. A MWE should start with a \documentclass command, include any necessary packages and be as small as possible to demonstrate your problem. At the moment we have to guess what packages etc you are using before we can compile your code. If you expand to a ful MWE I'll have a look at it in overleaf for you. – user30471 Mar 2 '20 at 20:33
  • I have updated the question, can you take a look, thank you very much. – Zizheng Yang Mar 2 '20 at 20:44
  • I am not sure, it seems that the server of Overleaf does not have those file, how do I add them my self? Thanks a lot. – Zizheng Yang Mar 2 '20 at 20:52
3

It's not a problem with tkz-euclide but with Overleaf not providing the latest version of the package.

\documentclass[12pt, a4paper]{book}
\usepackage{float}  % figure wont float anymore
\usepackage{tkz-euclide}
\usepackage{xcolor}
\usepackage{geometry}
\geometry{paperwidth=21cm,paperheight=29.7cm, body={18cm,25.7cm}, top=2.5cm, left=1.5cm}
\usepackage{hyperref}
\usepackage{caption}
\captionsetup[figure]{labelsep=space}

\begin{document}

\chapter{Hyperbolic geometry}

\section{Belfram-Klein model}

\subsection{Interpretation}

\begin{tikzpicture}
\tkzDefPoints{0/0/A,4/0/B,0.8/3/C}
\tkzDefPointOnCircle[angle=90,center=B,radius=1 cm] % undefined control sequence.
\tkzGetPoint{I} % Package pgf Error: No shape named tkzPointResult is known.
\tkzDrawCircle[R,teal](B,1cm) % Package pgf keys Error.
\tkzDrawPoint[teal](I)
\tkzDefCircle[circum](A,B,C)
\tkzGetPoint{G} \tkzGetLength{rG}
\tkzDefPointOnCircle[angle=30,center=G,radius=\rG pt] % undefined control sequence.
\tkzGetPoint{J}
\tkzDrawPoints(A,B,C)
\tkzDrawCircle(G,J)
\tkzDrawPoint(G)
\tkzDrawPoint[red](J) % Package pgf keys Error.
\end{tikzpicture}

\end{document}

enter image description here

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.