** This is source code repo for www.opcode.eu.org **
Copyright (c) 2003-2019 Robert Ryszard Paciorek <rrp@opcode.eu.org>
To jest wolny i otwarty dokument/oprogramowanie. Redystrybucja,
użytkowanie i/lub modyfikacja SĄ DOZWOLONE na warunkach licencji MIT.
This is free and open document/software. Redistribution, use
and/or modify ARE PERMITTED under the terms of the MIT license.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
To build pdf booklets and xhtml files from this repo you must install dependencies:
- run
make initin main dir of this repo - download and install Libraries and tools for free EDA suites (gEDA/gschem and pcb-rnd) from https://bitbucket.org/OpCode-eu-org/eda-libs with its dependencies:
git clone https://bitbucket.org/OpCode-eu-org/eda-libs && cd eda-libssudo make installDependenciesmake installLibs; sudo make installTools
- run
sudo make installDependenciesin main dir of this repo
NOTE: Steps 2.2 and 3 are dedicated for Debian based system (installDependencies targets use apt for software installation).
On non-Debian system see Makefile (in this repo main dir and in eda-libs repo main dir) for list of needed software and install it manually.
To compile the tex toolkit, several packages are necessary (on Debian Buster)
texlive-xetex
texlive-luatex
texlive-latex-base
texlive-latex-recommended
texlive-latex-extra
texlive-font-utils
fonts-symbola
poppler-utils:amd64 0.71.0-5 -> 0.48.0-2+deb9u2 (this had to be manually downgraded and put on hold)
python3-pygments
pdftk
make
wkhtmltopdf
geda-gschem (need also symbols and tools from [https://bitbucket.org/OpCode-eu-org/eda-libs](eda-libs) repo)
ps2eps
ghostscript
pdf2svg
inkscape
netpbm
Those packages will be installed automatically (with apt) when run installDependencies make target during the procedure described above.
- To build all the files use
make all(in a given subdirectory or in the root directory). - To build a single PDF file run the command
make filenamein a directory with its sources, wherenameis the name of the file without extension, e.g. for a fileaaa.pdfbuilt fromdir/aaa.texit will becd dir && make aaa. - To build a teacher version add the suffix
--teacherto the filename, e.g.make aaa - teacher - To force a file rebuild (ignoring make dependency tracking) add
VERBOSE=1to the command, e.g.make aaa VERBOSE=1 - The output files are located in the
output-wwwdirectory
It is only possible for XML sources and is identical to building PDF documents from LaTeX sources.
A PDF document is also built based on the conversion (printout) of XHTML to PDF using wkhtmltopdf.
Source directories (e.g. booklets) can also (besides .tex, .xml files) contain:
extra-tex-filesdirectory for additional files used by LaTeX (e.g. pictures or LaTeX files)- in LaTeX files you should refer to them without the name of this directory – e.g. to the file
extra-tex-files/abc/xyz.jpgviaabc/xyz.jpgorabc/xyz
- in LaTeX files you should refer to them without the name of this directory – e.g. to the file
extra-web-filesdirectory for additional files used in XML / XHTML (e.g. images)- in XML files you should refer to them without the name of this directory – e.g. to the file
extra-tex-files/abc/xyz.jpgviaabc/xyz.jpg
- in XML files you should refer to them without the name of this directory – e.g. to the file
images-srcdirectory for source versions of images that will be automatically converted to formats supported by LaTeX or WWW- supported are:
- vector graphics
.svg(LaTeX only, convert to pdf) - [gEDA] (http://www.geda-project.org/) schemas
.sch(convert to pdf for LaTeX or svg for XHTML)
- vector graphics
- in LaTeX files you should refer to them with replacing the directory name with
imgand omitting the extension – e.g. to the fileimages-src/abc/xyz.schviaabc/xyz - in XML files you should refer to them with replacing the directory name with
imgand replacing the extension with.svg- e.g. to the fileimages-src/abc/xyz.schviaabc/xyz.svg
- supported are:
Makefilefile for specify dependencies of the output file on files fromextra-tex-filesandimages-srcdirectories should be specified- for example: when content in
aaa.texused files from images-src/abcdirectory andextra-tex-files/xyz.png file, it would be:
$(OUTDIR)/aaa.pdf: extra-tex-files/xyz.png $(call img4tex_from_src,abc/*) - omitting dependencies from
images-srcwill result in failure to perform the conversion and inaccessibility of these files while building the LaTeX file - omitting dependencies from
extra-tex-filesorextra-web-fileswill only cause make not to rebuild the script after modifying these files
- for example: when content in