
Source (link to git-repo or to original if based on someone elses unmodified work): Add the source-code for this project on opencode.net
Cirkuit is a KDE4 application to generate publication-ready figures. It was born as a KDE frontend for the Circuit macros by Dwight Aplevich, but it now supports different backends. Cirkuit builds a live preview of the source code and can export the resulting images in several formats (EPS, PDF, PNG, SVG, ...).
Circuit Macros is a set of macros for drawing high-quality line diagrams to include in TeX, LaTeX, or similar documents. Check this page by Alan Robert Clark to see some nice examples.
In addition to Circuit Macros, the TikZ and Gnuplot backends are currently supported. Some examples generated with TikZ can be found here. The CircuiTikz extension, which allows to draw electrical networks, is also supported (but it has to be installed separately).
Requirements
------------
To run this application you need to have the following applications installed:
* latex (with PSTricks, TikZ and preview packages)
* dpic
* m4
* gs
* dvips
* pdf2svg
On Debian-based systems (e.g. Ubuntu/Kubuntu) type the following command to install the required apps:
sudo apt-get install texlive-latex-base texlive-latex-recommended texlive-pstricks texlive-base-bin texlive-extra-utils preview-latex-style m4 ghostscript pdf2svg
At the moment, there is no package for dpic, so you will need to compile from source, or select gpic as the default pic interpreter in Cirkuit settings.
To build Cirkuit you need cmake and the KDE4 and Qt4 dev packages. To install them on Debian-based systems, type
sudo apt-get install cmake kdelibs5-dev libqt4-dev libpoppler-qt4-dev
To build the application, follow the usual KDE4/CMake procedure:
tar xzvf cirkuit-0.4.tar.gz
cd cirkuit-0.4
mkdir build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=`kde4-config --prefix`
make
sudo make install
Visit the application homepage: http://wwwu.uni-klu.ac.at/magostin/cirkuit.html
The project is now hosted on git.kde.org: http://projects.kde.org/cirkuit
Please submit bugs/wishes to http://bugs.kde.org
9 years ago
- 0.4.3
Compatible with KDE SC < 4.7
Improved notifications
Minor bugfixes
- 0.4.2
More informative messages
Fixed wrong reassignment of Save and Save as actions
Fixed bug in upload dialog
- 0.4.1
Include translations in the release
Fixed a crash that could occur on startup
Bugfixes by Laurent Montel (mainly memory leaks)
Other bugfixes
- 0.4
New backend system (heavily inspired by Cantor)
New template system with GHNS (Get Hot New Stuff) support
Added Get Hot New Stuff support
Configurable keyboard shortcuts and toolbars
Much improved preview widget with variable zoom levels
Manuals and examples of each backend can be accessed in the main interface
Improved multi-threading -> Cirkuit generates the previews faster
Improved parsing of log files and error handling
Increased usage of K* instead of Q* classes for a better
Improved integration with the KDE environment
Redesigned configuration dialog
Other bug fixes / improvements
- 0.3.2
Switch from QProcess to KProcess
Download of remote data the KDE way with KIO
Fixed a bug when opening the Circuit Macros manual and examples
- 0.3.1.1
Integration with bugs.kde.org
- 0.3.1
Added possiblity to export to TeX source
Can export to GIF
Fixed a bug that caused wrong syntax highlighting detection in Kate
Correct escaping of mathematical expressions in Gnuplot
Fixed a bug that prevented the user to overwrite an exported file even when the user has confirmed that he wants to overwrite it
Fixed compilation issues
Improved localization
Various minor bugfixes
- 0.3
A lot of new features, pointing out just the most important ones
Multi-thread support
Full Gnuplot support (Lua terminal needed)
Support for different pic interpreters
Support for custom document templates
Improved handling of mime types
Improved error handling
Added more options in the settings
- 0.2.2
Fixed failed configuration of Circuit Macros
- 0.2.1
Experimental support for Gnuplot epslatex terminal
Fixed bug in generation of TikZ previews
Should be compatible with KDE 4.2
- 0.2
Improved text editor, now based on the Kate part
Support for syntax highlighting
Preview generated directly from PDF with LibPoppler
Reworked preview generation
Improved handling of error messages
Added TikZ support
Added CircuiTikz support
- 0.1.2
Faster preview generation
Export to SVG
Line number visualization
Fixed cutting of figures when exporting to EPS/PDF
Fixed CMakeLists.txt
Various bug fixes
- 0.1.1
Fixed a bug which prevented the generation of the preview
Improved auto-configuration of the macros
- 0.1
Initial version
9 years ago
- 0.4.3
Compatible with KDE SC < 4.7
Improved notifications
Minor bugfixes
- 0.4.2
More informative messages
Fixed wrong reassignment of Save and Save as actions
Fixed bug in upload dialog
- 0.4.1
Include translations in the release
Fixed a crash that could occur on startup
Bugfixes by Laurent Montel (mainly memory leaks)
Other bugfixes
- 0.4
New backend system (heavily inspired by Cantor)
New template system with GHNS (Get Hot New Stuff) support
Added Get Hot New Stuff support
Configurable keyboard shortcuts and toolbars
Much improved preview widget with variable zoom levels
Manuals and examples of each backend can be accessed in the main interface
Improved multi-threading -> Cirkuit generates the previews faster
Improved parsing of log files and error handling
Increased usage of K* instead of Q* classes for a better
Improved integration with the KDE environment
Redesigned configuration dialog
Other bug fixes / improvements
- 0.3.2
Switch from QProcess to KProcess
Download of remote data the KDE way with KIO
Fixed a bug when opening the Circuit Macros manual and examples
- 0.3.1.1
Integration with bugs.kde.org
- 0.3.1
Added possiblity to export to TeX source
Can export to GIF
Fixed a bug that caused wrong syntax highlighting detection in Kate
Correct escaping of mathematical expressions in Gnuplot
Fixed a bug that prevented the user to overwrite an exported file even when the user has confirmed that he wants to overwrite it
Fixed compilation issues
Improved localization
Various minor bugfixes
- 0.3
A lot of new features, pointing out just the most important ones
Multi-thread support
Full Gnuplot support (Lua terminal needed)
Support for different pic interpreters
Support for custom document templates
Improved handling of mime types
Improved error handling
Added more options in the settings
- 0.2.2
Fixed failed configuration of Circuit Macros
- 0.2.1
Experimental support for Gnuplot epslatex terminal
Fixed bug in generation of TikZ previews
Should be compatible with KDE 4.2
- 0.2
Improved text editor, now based on the Kate part
Support for syntax highlighting
Preview generated directly from PDF with LibPoppler
Reworked preview generation
Improved handling of error messages
Added TikZ support
Added CircuiTikz support
- 0.1.2
Faster preview generation
Export to SVG
Line number visualization
Fixed cutting of figures when exporting to EPS/PDF
Fixed CMakeLists.txt
Various bug fixes
- 0.1.1
Fixed a bug which prevented the generation of the preview
Improved auto-configuration of the macros
- 0.1
Initial version
panmerge
7 years ago
I would appreciate a lot to have some help on this issue
Report
BruceDawk
8 years ago
Those are the only errors that are showing up, would you be able to recommend what settings to play with to get this to work?
Report
BruceDawk
8 years ago
I installed Cirkuit but I am unable to render a preview, for the following M4 code I get the following errors.
.PS
cct_init
linethick = 1;
blen = dimen_/2
Z: dot
Z1: Z+(0,-blen*1.3)
line right_ blen*2/3
ebox(right_ dimen_); llabel(,"$\underline{Z}_X$")
line right_ blen*2/3
A: dot
A1: A+(1.5*dimen_,dimen_)
A2: A+(1.5*dimen_,-dimen_)
Z2: A+(0,-blen*1.3)
ebox(from A to A1); llabel("$\underline{Z}_X$")
dot
ebox(from A to A2); llabel(,,"$\underline{Z}_X$")
dot
line from Z1 to Z2
B: dot
move to Z1
dot
B1: B+(1.5*dimen_,dimen_)
B2: B+(1.5*dimen_,-dimen_)
line from B to B2
dot
line from B to B1
dot
move to Z+(-0.1,0)
arrow to Z1+(-0.1,0)
move to A1+(0.1,0)
arrow to B1+(0.1,0)
move to A2+(0.1,0)
arrow to B2+(0.1,0)
move to Z1+(-1.5*blen,blen*9/14)
"Tor 1"
move to B1+(1.5*blen,blen*9/14)
"Tor 2"
move to B2+(1.5*blen,blen*9/14)
"Tor 3"
.PE
[latex]
warning: \uput{2.5bp}[u](0.416667,0.05){$\underline{Z}_X$}: Unrecognized variable construct `$\'.
warning: \uput{2.5bp}[u](0.416667,0.05){$\underline{Z}_X$}: Unrecognized variable construct `$}'.
warning: \uput{2.5bp}[ul](1.083333,0.25){$\underline{Z}_X$}: Unrecognized variable construct `$\'.
warning: \uput{2.5bp}[ul](1.083333,0.25){$\underline{Z}_X$}: Unrecognized variable construct `$}'.
warning: \uput{2.5bp}[ur](1.333333,-0.25){$\underline{Z}_X$}: Unrecognized variable construct `$\'.
warning: \uput{2.5bp}[ur](1.333333,-0.25){$\underline{Z}_X$}: Unrecognized variable construct `$}'.
Guidance would be appreciated
Report
matteo81
8 years ago
Anyway, you can try removing the "$ and $" since they are not needed inside a llabel. But most likely, you have other issues with your installation ...
Report
Gallaecio
8 years ago
For some reason, the build of Cirkuit we have in Chakra is not working well, although it compiles just fine.
When you run a sample (I tried with one downloaded with the integrated GHNS), you get the following message on the window:
“Unable to generate a preview for the current input”
Also, on the terminal:
[gallaecio@afonsox ~]$ cirkuit
cirkuit(13537)/kdeui (kdelibs): Attempt to use QAction "show_live_preview" with KXMLGUIFactory!
cirkuit(13537)/kdeui (kdelibs): Attempt to use QAction "show_log_view" with KXMLGUIFactory!
cirkuit(13537): Program not found!!
Any idea of what might be causing this?
Report
agostinelli
8 years ago
I guess there is a missing dependency. Probably you do not have 'dpic' installed, but I would need to inspect the log file to verify it. It is available in the AUR in Arch Linux. You could also try to change the interpreter in the settings and switch to gpic. Ensure also that you have latex (or pdflatex if you use TikZ) and m4 installed on your system.
Matteo
Report
Gallaecio
8 years ago
How can I access the logs?
Report
matteo81
8 years ago
Report
Gallaecio
8 years ago
http://paste.chakra-project.org/1229
Just in case, I am opening this example:
http://kde-files.org/content/show.php/Biquad?content=146691
Report
matteo81
8 years ago
- Go to /tmp/kde-{yourusername}/cirkuit/build and launch dvips (or dvipdf) on the latest dvi file (you can also find the filename in the log.. it was XM1522.dvi in the log you pasted). Does it produce a valid ps/pdf file? Do you get an error message?
- In Settings->Configure Cirkuit->Circuit Macros->Pic interpreter switch to dpic+TikZ and then regenerate the plot
Thanks for the time you are spending in finding this bug. I hope we can hunt it down soon :)
Report
matteo81
8 years ago
If you want to dig deeper, you could try to launch 'dvips -E' and 'epstopdf' on the output DVI file (in the temp directory), since this is exactly the workflow used by Cirkuit.
By the way, when you generate the preview with Cirkuit, do you get the eps and pdf files in your temp dir or the dvi only? If only the dvi is there, then there must be something wrong in the conversion DVI->EPS->PDF ...
Report
Gallaecio
8 years ago
Both the .ps and .pdf files generated using dvips and dvipdf respectively on the tmp file render OK in Okular.
Your hint on the settings also works. With dpic + TikZ the perview works nicely :)
Any idea of why could this be? I did nothing fancy to build dpic ( http://gitorious.org/chakra-packages/apps/blobs/master/dpic/PKGBUILD )
Report
agkdb
9 years ago
Additional lines in cm_latex.ckt
\usepackage{sansmath,lmodern} and in the documents section \sffamily\sansmath
Extra package sansmath must be installed.
Andrew
Report
agkdb
9 years ago
/home/andrew/cirkuit-0.4.2/src/mainwindow.cpp:51:26: fatal error: KMessageWidget: No such file or directory
Am I right in thinking that KMessageWidget is not available in kubuntu 11.04 - or is there something else I need to install?
Andrew.
Report
matteo81
9 years ago
please download the new release (0.4.3). It should be compatible with kdelibs < 4.7.
Version 0.4.2 required at least kdelibs-4.7 which probably is not available in your distribution.
Report
orestes1965
10 years ago
/home/orestes/dev/cirkuit/src/widgets/templatechoosedialog.cpp: In member function ‘void TemplateChooseDialog::uploadTemplate()’:
/home/orestes/dev/cirkuit/src/widgets/templatechoosedialog.cpp:156: error: ‘class KNS3::UploadDialog’ has no member named ‘setDescription’
make[2]: *** [src/widgets/CMakeFiles/cirkuitwidgets.dir/templatechoosedialog.o] Error 1
make[1]: *** [src/widgets/CMakeFiles/cirkuitwidgets.dir/all] Error 2
make: *** [all] Error 2
Report
jamesgreenlinux
10 years ago
I use Cirkuit on kubuntu at home, but presently at my parents for xmas so am attempting to install cirkuit on "andLinux" (www.andlinux.org/) I know latex m4 dpic etc are fine and working, and I'm fairly sure that texlive the kde-devel and Qt dependencies are satisfied but...
during make the following results
Scanning dependencies of target cirkuit
[ 23%] Building CXX object src/CMakeFiles/cirkuit.dir/cirkuit_automoc.o
[ 28%] Building CXX object src/CMakeFiles/cirkuit.dir/main.o
[ 33%] Building CXX object src/CMakeFiles/cirkuit.dir/mainwindow.o
/home/james/cirkuit-0.3.1.1/src/mainwindow.cpp: In member function 'void MainWindow::exportFile()':
/home/james/cirkuit-0.3.1.1/src/mainwindow.cpp:266: error: 'class KMimeType' has no member named 'mainExtension'
make[2]: *** [src/CMakeFiles/cirkuit.dir/mainwindow.o] Error 1
make[1]: *** [src/CMakeFiles/cirkuit.dir/all] Error 2
make: *** [all] Error 2
you can see the full Knosole output at http://www.iceamplifiers.co.uk/cirkuit/output.txt
I freely admit that I have no idea at all... any help greatly appreciated.
James
Report
matteo81
10 years ago
Thanks for reporting this. After looking at the documentation, it appears that I am using a function (KMimeType::mainExtension) introduced in KDE SC 4.3 and you have installed version 4.2, so that's what causing the problem.
Are you able to upgrade KDE to a more recent version?
Matteo
Report
jamesgreenlinux
10 years ago
You are indeed correct, I'm on 4.2.2.
I'm new to andLinux, no idea if upgrade is possible, but I don't see why it wouldn't be.
I'll post my progress here.
Many Thanks,
James
Report
orestes1965
10 years ago
Problem was lack of "#include <QImage>" on top of "graphicsgenerator.h"
Thanks for your software.
Report
matteo81
10 years ago
Report
orestes1965
10 years ago
Perhaps a Qt issue? Lucid have Qt 4.6.2 and Maverick have Qt 4.7.0
Report
Hmpf
10 years ago
Report
losty
10 years ago
I will continue to be up to date with the latest versions of Cirkuit.
Quote:sudo add-apt-repository ppa:lostis/stable
sudo apt-get update
sudo apt-get install cirkuit
feel free and have fun
- Thomas B. -
Report
losty
9 years ago
Report