I am looking for a console-based tool that can process a simple text file containing the textual notation of a flowchart diagram and generate a PNG (or other format) file. There might also be a LaTeX package for that but, if possible, I would prefer a tool that can generate an independent PNG which I can then import in a LaTeX document as a graphic.
Tool to generate flow chart diagram from textual notation
flowchartlatex
Related Solutions
Strange, the approach you used works perfectly for me, however I get a different pdf_tex file from conversion.
b.pdf_tex
%% Creator: Inkscape inkscape 0.92.1, www.inkscape.org
%% PDF/EPS/PS + LaTeX output extension by Johan Engelen, 2010
%% Accompanies image file 'b.pdf' (pdf, eps, ps)
%%
%% To include the image in your LaTeX document, write
%% \input{<filename>.pdf_tex}
%% instead of
%% \includegraphics{<filename>.pdf}
%% To scale the image, write
%% \def\svgwidth{<desired width>}
%% \input{<filename>.pdf_tex}
%% instead of
%% \includegraphics[width=<desired width>]{<filename>.pdf}
%%
%% Images with a different path to the parent latex file can
%% be accessed with the `import' package (which may need to be
%% installed) using
%% \usepackage{import}
%% in the preamble, and then including the image with
%% \import{<path to file>}{<filename>.pdf_tex}
%% Alternatively, one can specify
%% \graphicspath{{<path to file>/}}
%%
%% For more information, please see info/svg-inkscape on CTAN:
%% http://tug.ctan.org/tex-archive/info/svg-inkscape
%%
\begingroup%
\makeatletter%
\providecommand\color[2][]{%
\errmessage{(Inkscape) Color is used for the text in Inkscape, but the package 'color.sty' is not loaded}%
\renewcommand\color[2][]{}%
}%
\providecommand\transparent[1]{%
\errmessage{(Inkscape) Transparency is used (non-zero) for the text in Inkscape, but the package 'transparent.sty' is not loaded}%
\renewcommand\transparent[1]{}%
}%
\providecommand\rotatebox[2]{#2}%
\ifx\svgwidth\undefined%
\setlength{\unitlength}{798bp}%
\ifx\svgscale\undefined%
\relax%
\else%
\setlength{\unitlength}{\unitlength * \real{\svgscale}}%
\fi%
\else%
\setlength{\unitlength}{\svgwidth}%
\fi%
\global\let\svgwidth\undefined%
\global\let\svgscale\undefined%
\makeatother%
\begin{picture}(1,0.23026316)%
\put(0,0){\includegraphics[width=\unitlength,page=1]{b.pdf}}%
\end{picture}%
\endgroup%
test.tex
\documentclass[10pt]{scrreprt}
\usepackage{graphicx}
\usepackage[T1]{fontenc}
\begin{document}
\begin{figure}
\centering
\def\svgwidth{\columnwidth}
\input{b.pdf_tex}
\end{figure}
\end{document}
My Inkscape version is
Inkscape 0.92.1 r
pdfTeX 3.14159265-2.6-1.40.17 (TeX Live 2016/Arch Linux) kpathsea version 6.2.2
I am writing this answer with the help of comment from NickD.
- In the same working folder create a separate file
foo.tex
- In the main file, where you need it imported, type in the code
\include{foo}
After compiling it, you should be able to see the imported contents from foo.tex
Best Solution
It would be cleaner to let LaTeX generate the flowchart instead of generating/importing a png file. In this way you will not have problems of resolution or undersampling and everything will be in vector format.
You can use the TikZ package of LaTeX. The site texexample.net gives the following example.