-
Notifications
You must be signed in to change notification settings - Fork 0
A fork of Dwight Aplevich's dpic https://gitlab.com/aplevich/dpic
tim-tx/dpic
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Dpic is an implementation of the pic "little language" for creating line drawings and illustrations for documents, web pages, and other uses. Copying: The files in this distribution are copyright (c) 2018, J. D. Aplevich, and are distributed under the licence at the end of this file, except for the file dpic-doc.pdf, which is subject to the Creative Commons attribution licence version 3.0 http://creativecommons.org/licenses/by/3.0/. Unix installation: Type `./configure' to generate a Makefile, then `make' to compile the sources. Type `make install' or, if necessary, `sudo make install' to install the executable in /usr/bin, a man page in /usr/share/man/man1, and dpic-doc.pdf in /usr/share/dpic. To install the executable only, type `make installdpic' and to install the documents only, type `make installdocs'. The configure script attempts to identify whether specific compiler options are required to process C but not all compilers have identical options or libraries so you may have to change the Makefile by hand accordingly. You might also look at the file Makefile.default, and use it instead. Web-server installation: You probably should disable the sh and copy commands in dpic for security reasons. Uncomment the SAFEMODE definition in Makefile or invoke ./configure above as ./configure --enable-safemode. If you do not do this, the -z command-line option has the same effect (see below). Installation on a non-unix PC: If you do not wish to compile the program, copy dpic.exe from the distribution Windows directory into your folder of executable files. Note that this version will search for files using PC format for the file path; that is, with backslash separators. Otherwise, commands equivalent to the following should do the trick: gcc -O -c dpic.c gcc -O -c p2clib.c gcc -o dpic dpic.o p2clib.o -lm Dpic usage: dpic [option] infile > outfile or cat infile | dpic [option] > outfile Options: (none) LaTeX picture output (limited font-based drawing capability) -d basic PDF output, no automatic string formatting -e pict2e output -f Postscript output, strings in psfrag format -g TikZ-pgf output -h write this message and quit -m mfpic output (see mfpic documentation) -p PSTricks output (see PSTricks documentation) -r raw Postscript output, no automatic string formatting -s MetaPost output (for compatibility) -t eepicemu output (slightly less limited than LaTeX output) -v svg output -x xfig 3.2 output (for wysiwyg drawing) -z safe mode (sh and copy disabled) Testing: Test the installation by typing dpic -p quick.pic > quick.tex or dpic -g quick.pic > quick.tex (if you want to test the TikZ-pgf output) which produces the input for the following test LaTeX file: \documentclass{article} \usepackage{pstricks} % or \usepackage{tikz} \begin{document} \begin{figure}[hbt] \begin{center} \input quick \caption{Customized caption for the figure} \end{center} \label{Symbolic label} \end{figure} \end{document} You can also do the tests in the examples directory (see below for the distribution directory structure). |-doc------ | |-examples-|-sources- | dpic-DATE-| |-Pgen----|-src-- | | |-src------|-p2c-----|-src-- | |-pascal--|-test- |-tables-- Typing "make" in the pascal directory converts the proto-pascal in the src directory to pascal that is compatible either with GNU pascal (gpc) or with Free Pascal (fpc) and compiles the source, placing the executable and the required tables in the pascal/test directory. Bugs: If you discover a bug, please check that your version is the latest. Feel free to send bug reports. Dpic has been relatively solid but, by definition, it hasn't been tested for all possible illegal input, and the distribution has undergone changes for portability, simplicity, and to include the pascal source. The distributed version is tested using pascal compilers and gcc on cygwin32 and cygwin64 machines. When inconsistencies between dpic and gpic are found, I usually check to see whether dpic should be changed to conform but there are small deliberate differences. Error and warning messages are not identical. Other exceptions can be found in the file dpic-doc.pdf. Version: The version of dpic is the date the source was created, printed as a comment in dpic output. Source: The source code was originally written and maintained in Pascal to run on IBM VM/CMS and DEC VMS operating systems, but it has been moved several times over the years and has evolved considerably. The Pascal is translated to C by P2C, then changed to simplify reading and compilation and to run on a variety of platforms. Proto-Pascal source files are included here in the src directory. Selected lines are uncommented automatically for translation to C or for Pascal compilation. GNU pascal and Free Pascal are supported currently. A parser generator such as the ubiquitous yacc was not readily available when dpic was first written so a different tool was employed. If source files in the src directory are changed, the Makefile compiles, as necessary, the pascal to C translator and the parser generator with its output filters and runs them to produce new files in the formats requred. These tools are included here for the sole purpose of generating dpic C source. ------------------------------------------------------------------- BSD Licence: Copyright (c) 2018, J. D. Aplevich All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------
About
A fork of Dwight Aplevich's dpic https://gitlab.com/aplevich/dpic
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published