0

I have submitted the code for the reference

\documentclass[11pt,a4paper,oneside]{article}
\usepackage{latexsym}

\usepackage[english]{babel} \usepackage{amsmath} \usepackage{amssymb,gensymb} \usepackage{tikz}

%\usepackage{subfig} %\usepackage{graphicx} %\usepackage[dvips]{graphicx}

%\usepackage{subfigure}

% % % % % % % % % % % % % % % % % % % % % % % %added package \usepackage{multirow,array, amsmath, caption, booktabs,amssymb} \usepackage{epstopdf} \usepackage{caption} \usepackage{subcaption} \usepackage{url, lipsum} \usepackage{hhline} \usepackage[colorlinks=true,backref=true,linkcolor={black},anchorcolor={black},citecolor={black},urlcolor={blue},breaklinks=true]{hyperref} \usepackage{blindtext} % % % % % % % % % % % % % % % % % % % % % % % \usepackage[boxed,lined,linesnumbered]{algorithm2e} \graphicspath{ {Images/} } \linespread{1.1} \usepackage[top=.8in, bottom=.8in, left=0.8in, right=0.8in]{geometry} \newcolumntype{C}[1]{>{\centering\arraybackslash}m{#1}} \newcolumntype{L}[1]{>{\raggedright\arraybackslash}m{#1}} \newcolumntype{R}[1]{>{\raggedleft\arraybackslash}m{#1}} \newcommand\myrule{\par\smallskip\hrule\medskip} \usetikzlibrary{decorations.pathmorphing,trees, decorations.markings, arrows, arrows.meta,positioning, shapes.arrows,shadows.blur} \def\etal{\textit{et~al.}} \def\eg{\textit{e.g.}} \def\ie{\textit{i.e.}} \def\etc{\textit{etc.}} %%%%%%%%%%%%%Road Map%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \usepackage{tikz,pgfgantt} \usepackage[inline]{enumitem} \usepackage{xcolor} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \renewenvironment{abstract} {\par\noindent\textbf{\abstractname \newline}\ \ignorespaces} {\par\medskip} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \newcommand{\nodetextx}[2]{$i_{#2}$} \newcommand{\nodetextz}[2]{$o_#2$} \newcommand{\nodetexth}[2]{$h_{#1,#2}$} \makeatletter \define@key{layer}{layercolor} {\def\nnlayercolor{#1}} \makeatother

\tikzstyle{hiddencl}=[neuron, fill=\nnlayercolor, draw=black] \newcommand{\hiddenlayercolor}[1][] { \layer[bias=true,nodeclass={hiddencl},#1] }

\tikzstyle{inputcl}=[neuron, fill=\nnlayercolor, draw=black] \newcommand{\inputlayercolor}[1][] { \layer[bias=true,nodeclass={inputcl},#1] }

\tikzstyle{outputcl}=[neuron, fill=\nnlayercolor, draw=black] \newcommand{\outputlayercolor}[1][] { \layer[bias=true,nodeclass={outputcl},#1] } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{document} \pagestyle{plain} \sloppy

\begin{figure} \centering \usetikzlibrary{arrows.meta, calc, fit, positioning} \tikzset{block11/.style={fill=yellow!20,draw, thick, text width=11cm,align=justify,inner sep=0.6cm}, font={\fontsize{45pt}{12}\selectfont}, line/.style={-latex}} \tikzset{block1/.style={fill=yellow!20,draw, thick, text width=9cm,align=center,inner sep=0.6cm}, font={\fontsize{45pt}{12}\selectfont}, line/.style={-latex}} \tikzset{block2/.style={fill=yellow!20,draw, thick, text width=9cm,align=left,inner sep=0.4cm}, font={\fontsize{45pt}{12}\selectfont}, line/.style={-latex}} \tikzset{block/.style={fill=blue!15,draw, thick, text width=10cm,align=center,minimum width=11cm,minimum height = 4cm},font={\fontsize{45pt}{12}\selectfont},
line/.style={-latex}} \tikzset{blocks/.style={fill=yellow!20,draw, thick, text width=11cm,align=center,inner sep=0.8cm}, font={\fontsize{45pt}{12}\selectfont}, line/.style={-latex}}

%\newcommand{\midarrow}{\tikz \draw[-triangle 90] (0,0) -- +(-.1,0);} \resizebox{\columnwidth}{!}{ \begin{tikzpicture}

\node[ellipse, draw,text width=15cm,fill=red!15,text centered,font={\fontsize{45pt}{12}\selectfont}] (w1) at (-3,9) {\textbf{XYZ} \ \vspace{0.6cm} \textit{``qwerty werwe \[0.4cm] quiet Guard?"} }; \node[ellipse, draw,minimum width = 30cm, minimum height = 15cm,fill=red!15,font={\fontsize{45pt}{12}\selectfont}] (w2) at (-3,-15) {}; \node[minimum width = 1cm, minimum height = 0.5cm,text centered,font={\fontsize{45pt}{12}}] (p) at (-3,-9) {\textbf{Output}}; \node[block1] (q) at (-9,-12) {\textit{Bran}, \textbf{\textt{wrerw}}}; \node[block1,right=of q] (r) {\textit{haue}, \textbf{\textt{dfs}}}; \node[block1,below=of r]at (-9,-13) (s) {\textit{you}, \textbf{\textt{sdf}}}; \node[block1,right= of s] (t) {\textit{bad}, \textbf{\textt{vdxv}}}; \node[block1,below= of t] at (-9,-16) (u) {\textit{quiet}, \textbf{\textt{dsf}}}; \node[block1,right=of u] (v) {\textit{Guard}, \textbf{\textt{sdf}}}; \node[rectangle, draw,minimum width =15cm, minimum height =14cm] (ik) at (30,8) {}; \node[minimum width = 1cm, minimum height = 0.5cm,text centered,font={\fontsize{100pt}{12}\selectfont}] (a) at (30,14) { \textbf{Process}}; \node[blocks] (b) at (30,10) {\textit{fsdfsde \[0.4cm] you sdf \[0.2cm] sdf?}}; \node[blocks] (c) at (30,4) {\textit{wsd sdf u \[0.4cm] dsfsdfsd sdfsd}}; \node[rectangle, draw,minimum width =27cm, minimum height =22cm] (jk) at (31.14,-16) {}; \node[minimum width = 1cm, minimum height = 0.5cm,text centered,font={\fontsize{45pt}{12}\selectfont}] (d) at (30,-6.4) {\textbf{Word egdf}}; \node[block11] (d) at (24.5,-10.28) {\textit{df} = [-0.106,\[0.4cm] 0.789, -0.130]}; \node[block11,right=of d] (e) {\textit{fdf} = [-0.211, \[0.4cm]-0.094, -0.246]}; \node[block11,below=of e]at (24.5,-13) (f) {\textit{you} = [0.277, \[0.4cm]-0.049,-0.477]}; \node[block11,right= of f] (g) {\textit{df} = [-0.014, \[0.4cm]0.387, -0.348]}; \node[block11,below= of g] at (24.5,-19.5) (h) {\textit{dfd} = [0.184, \[0.3cm]-0.025, -0.600]}; \node[block11,right=of h] (i) {\textit{Guardfd} = [0.211, \[0.3cm]-0.324, -0.230]}; \node[rectangle, draw,minimum width =15cm, minimum height =35cm] (lk) at (60,-5) {}; \node[minimum width = 5cm, minimum height = 0.5cm,text centered,font={\fontsize{45pt}{12}\selectfont}] (j) at (60,11) {\textbf{dfgh}}; \node[block] (k) at (60,7) {fgh}; \node[block] (l) at (60, 1) {Bi-hjhn}; \node[block] (m) at (60,-5) {uyi}; \node[block] (n) at (60,-11) {yuir}; \node[block] (o) at (60,-17) {tyui}; \node[rectangle, draw,minimum width =52cm, minimum height =45cm] (oo) at (43,-5) {}; \draw[->, arrowhead=0.3in, line width=6pt] (w1) -- (17,9); \draw[->, arrowhead=0.3in, line width=6pt] (30,1) -- (30,-5); \draw[->, arrowhead=0.3in, line width=6pt] (jk) -- (52.5,-15.7);

\begin{scope}[very thick, every node/.style={sloped,allow upside down}] \draw -, arrowhead=0.3in, line width=6pt-- node {\midarrow} (60,-30); \draw[-, arrowhead=0.3in, line width=6pt] (60,-30)-- node {\midarrow} (60,-22.5); %\draw (4,2)-- node {\midarrow} (-4,2); \draw[<-, arrowhead=0.3in, line width=6pt] (-3.5,-22.5)-- node {\midarrow} (-3.5,-30); \end{scope} \end{tikzpicture}} \caption{\textcolor{blue}{Drawere}} \label{fig:Draweer} \end{figure}

\end{document}

output of the code

avi007
  • 85
  • 3
    This is... way too much code. Maybe reduce it to a minimal working example? – user202729 Jul 18 '22 at 05:34
  • Also, post your actual code, backslash-[ won't compile in LaTeX. – user202729 Jul 18 '22 at 05:35
  • I have used overleaf to compile it. And I am trying to increase the font size of the text present in the respective nodes. – avi007 Jul 18 '22 at 05:40
  • 1
    Basic syntax: \node at (0,0) {\Large text};. Besides, there are some syntax such as font={\fontsize{45pt}{12}} that might interfere with what you want to edit. And, please, read about MWEs and also good practices for TikZ. It is quite messy to read a code with too many commands, and also unrelated packages and commands. – FHZ Jul 18 '22 at 06:47
  • Don't scale picture. Rather define smaller nodes. – Zarko Jul 18 '22 at 06:50
  • \fontsize{45pt}{12} means letters 45pt (1.5cm) tall on lines that are 12pt apart. Do you really mean that??? – David Carlisle Jul 18 '22 at 07:59
  • Yes. after writing \fontsize{45pt}{12} the letter size are not increasing. – avi007 Jul 18 '22 at 09:15
  • @FHZ yes I will make the corrections – avi007 Jul 18 '22 at 09:17
  • Note that almost all opening and closing square brackets have a backslash before them. I don't know why this is, but it prevents proper compilation of your code if not parsed beforehand. – Jasper Habicht Jul 18 '22 at 09:36
  • @JasperHabicht I have made the correction kindly check it now – avi007 Jul 18 '22 at 09:41
  • The arrowhead option is deprecated code from the arrows.meta library. Instead of ->, arrowhead=0.3in , you probably want to use -{>[width=0.3in]}. Instead of \textt{}, you probably mean \texttt{}. The macro \midarrow is not defined, since you commented out its defintion. Once you remove the \resizebox wrapper, you will see, that the text in the nodes is indeed as large as you want it to be. – Jasper Habicht Jul 18 '22 at 09:48
  • @JasperHabicht, the \resizebox is used to fit the diagram in different places. Can you please help me with the running code so it will be easier for me? – avi007 Jul 18 '22 at 09:52
  • With \resizebox, the image is scaled down. Therefore the font won't be as large as you state. But the \fontsize declaration works pretty well, which you can see if you remove one of those which will render the text in a much smaller font size. How should I help you? – Jasper Habicht Jul 18 '22 at 09:54

1 Answers1

2

The problem you face lies it the fact that the picture you defined using TikZ is huge and you try to scale it down using \resizebox which also will decrease the font size. You try to counter this behavior by increasing the font size. However, LaTeX doesn't allow you to increase the font size arbitrarily.

The best way to solve this would be to create a drawing with TikZ that uses relative (unitless) dimensions and therefore is scalable. Alas, since the tikzpicture you provide is already defined in a way that uses absolute dimensions, this surely would be a lot of work.

In order to provide a quick solution, you should load the pacakge anyfontsize which allows you to use \fontsize with any font size you want, even those that are not officially provided by the font you use.

Apart from that, there are still a lot of strange things in your code.

  1. The \fontsize macro takes two arguments which are already parsed as pt. Therefore you can just integers here.
  2. Instead of \textt{}, you probably want to write \texttt[}.
  3. The option arrowhead is a deprecated option of the arrows.meta package. You should use -{>[width=0.3in]} instead of ->, arrowhead=0.3in.
  4. The macro \midarrow is not defined, since you commented it out in your code.

I corrected the above things, removed all the packages that are unnecessary for this example and added the TikZ library shapes but left the code untouched otherwise:

\documentclass[11pt,a4paper,oneside]{article}

\usepackage{anyfontsize} \usepackage{tikz}

\usetikzlibrary{decorations.pathmorphing,trees, decorations.markings, arrows, arrows.meta,positioning, shapes.arrows,shadows.blur, shapes}

\tikzstyle{hiddencl}=[neuron, fill=\nnlayercolor, draw=black] \newcommand{\hiddenlayercolor}[1][] { \layer[bias=true,nodeclass={hiddencl},#1] }

\tikzstyle{inputcl}=[neuron, fill=\nnlayercolor, draw=black] \newcommand{\inputlayercolor}[1][] { \layer[bias=true,nodeclass={inputcl},#1] }

\tikzstyle{outputcl}=[neuron, fill=\nnlayercolor, draw=black] \newcommand{\outputlayercolor}[1][] { \layer[bias=true,nodeclass={outputcl},#1] } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{document} \pagestyle{plain} \sloppy

\begin{figure} \centering \usetikzlibrary{arrows.meta, calc, fit, positioning} \tikzset{block11/.style={fill=yellow!20,draw, thick, text width=11cm,align=justify,inner sep=0.6cm}, font={\fontsize{45}{12}\selectfont}, line/.style={-latex}} \tikzset{block1/.style={fill=yellow!20,draw, thick, text width=9cm,align=center,inner sep=0.6cm}, font={\fontsize{45}{12}\selectfont}, line/.style={-latex}} \tikzset{block2/.style={fill=yellow!20,draw, thick, text width=9cm,align=left,inner sep=0.4cm}, font={\fontsize{45}{12}\selectfont}, line/.style={-latex}} \tikzset{block/.style={fill=blue!15,draw, thick, text width=10cm,align=center,minimum width=11cm,minimum height = 4cm},font={\fontsize{45}{12}\selectfont},
line/.style={-latex}} \tikzset{blocks/.style={fill=yellow!20,draw, thick, text width=11cm,align=center,inner sep=0.8cm}, font={\fontsize{45}{12}\selectfont}, line/.style={-latex}}

\newcommand{\midarrow}{\tikz \draw[-triangle 90] (0,0) -- +(-.1,0);} \resizebox{\columnwidth}{!}{ \begin{tikzpicture}

\node[ellipse, draw,text width=15cm,fill=red!15,text centered,font={\fontsize{45}{12}\selectfont}] (w1) at (-3,9) {\textbf{XYZ} \ \vspace{0.6cm} \textit{``qwerty werwe \[0.4cm] quiet Guard?"} }; \node[ellipse, draw,minimum width = 30cm, minimum height = 15cm,fill=red!15,font={\fontsize{45}{12}\selectfont}] (w2) at (-3,-15) {}; \node[minimum width = 1cm, minimum height = 0.5cm,text centered,font={\fontsize{45}{12}}] (p) at (-3,-9) {\textbf{Output}}; \node[block1] (q) at (-9,-12) {\textit{Bran}, \textbf{\texttt{wrerw}}}; \node[block1,right=of q] (r) {\textit{haue}, \textbf{\texttt{dfs}}}; \node[block1,below=of r]at (-9,-13) (s) {\textit{you}, \textbf{\texttt{sdf}}}; \node[block1,right= of s] (t) {\textit{bad}, \textbf{\texttt{vdxv}}}; \node[block1,below= of t] at (-9,-16) (u) {\textit{quiet}, \textbf{\texttt{dsf}}}; \node[block1,right=of u] (v) {\textit{Guard}, \textbf{\texttt{sdf}}}; \node[rectangle, draw,minimum width =15cm, minimum height =14cm] (ik) at (30,8) {}; \node[minimum width = 1cm, minimum height = 0.5cm,text centered,font={\fontsize{100}{12}\selectfont}] (a) at (30,14) { \textbf{Process}}; \node[blocks] (b) at (30,10) {\textit{fsdfsde \[0.4cm] you sdf \[0.2cm] sdf?}}; \node[blocks] (c) at (30,4) {\textit{wsd sdf u \[0.4cm] dsfsdfsd sdfsd}}; \node[rectangle, draw,minimum width =27cm, minimum height =22cm] (jk) at (31.14,-16) {}; \node[minimum width = 1cm, minimum height = 0.5cm,text centered,font={\fontsize{45}{12}\selectfont}] (d) at (30,-6.4) {\textbf{Word egdf}}; \node[block11] (d) at (24.5,-10.28) {\textit{df} = [-0.106,\[0.4cm] 0.789, -0.130]}; \node[block11,right=of d] (e) {\textit{fdf} = [-0.211, \[0.4cm]-0.094, -0.246]}; \node[block11,below=of e]at (24.5,-13) (f) {\textit{you} = [0.277, \[0.4cm]-0.049,-0.477]}; \node[block11,right= of f] (g) {\textit{df} = [-0.014, \[0.4cm]0.387, -0.348]}; \node[block11,below= of g] at (24.5,-19.5) (h) {\textit{dfd} = [0.184, \[0.3cm]-0.025, -0.600]}; \node[block11,right=of h] (i) {\textit{Guardfd} = [0.211, \[0.3cm]-0.324, -0.230]}; \node[rectangle, draw,minimum width =15cm, minimum height =35cm] (lk) at (60,-5) {}; \node[minimum width = 5cm, minimum height = 0.5cm,text centered,font={\fontsize{45}{12}\selectfont}] (j) at (60,11) {\textbf{dfgh}}; \node[block] (k) at (60,7) {fgh}; \node[block] (l) at (60, 1) {Bi-hjhn}; \node[block] (m) at (60,-5) {uyi}; \node[block] (n) at (60,-11) {yuir}; \node[block] (o) at (60,-17) {tyui}; \node[rectangle, draw,minimum width =52cm, minimum height =45cm] (oo) at (43,-5) {}; \draw[-{>[width=0.3in]}, line width=6pt] (w1) -- (17,9); \draw[-{>[width=0.3in]}, line width=6pt] (30,1) -- (30,-5); \draw[-{>[width=0.3in]}, line width=6pt] (jk) -- (52.5,-15.7);

\begin{scope}[very thick, every node/.style={sloped,allow upside down}] \draw -, line width=6pt-- node {\midarrow} (60,-30); \draw[-, line width=6pt] (60,-30)-- node {\midarrow} (60,-22.5); %\draw (4,2)-- node {\midarrow} (-4,2); \draw[{<[width=0.3in]}-, line width=6pt] (-3.5,-22.5)-- node {\midarrow} (-3.5,-30); \end{scope} \end{tikzpicture}} \caption{\textcolor{blue}{Drawere}} \label{fig:Draweer} \end{figure}

\end{document}

enter image description here