diff --git a/.github/scripts/build-doc.sh b/.github/scripts/build-doc.sh index 12dea6b7650..758655e244e 100755 --- a/.github/scripts/build-doc.sh +++ b/.github/scripts/build-doc.sh @@ -5,7 +5,9 @@ set -x cd src ./autogen.sh -./configure --disable-check-runtime-deps --enable-build-documentation=html +./configure --disable-check-runtime-deps \ + --enable-build-documentation=html \ + --enable-build-documentation-translation make -O -j$((1+$(nproc))) manpages make -O -j$((1+$(nproc))) translateddocs make -O -j$((1+$(nproc))) docs diff --git a/.gitignore b/.gitignore index 94e742f2bd7..3d286f605e4 100644 --- a/.gitignore +++ b/.gitignore @@ -50,6 +50,8 @@ position.txt # Ignore temp files *.swp *~ +# Ignore checkref leftover output (docs/src/checkref) +.checklink.*.tmp # Ignore po4a temp files *.failed.po *-new_??.po @@ -57,3 +59,5 @@ position.txt *.*-stamp # Ignore VSCode settings .vscode/settings.json +# autoreconf cache from debian/configure +/autom4te.cache/ diff --git a/debian/configure b/debian/configure index b157af7f09e..7ee052f9674 100755 --- a/debian/configure +++ b/debian/configure @@ -110,19 +110,7 @@ elif [ -f /etc/lsb-release ]; then fi if [ -n "$ENABLE_BUILD_DOCUMENTATION" ]; then - DOC_DEPENDS="dblatex (>= 0.2.12),\n dvipng,\n fonts-dejavu,\n graphviz,\n groff,\n inkscape,\n librsvg2-bin,\n python3-lxml,\n source-highlight,\n texlive-extra-utils,\n texlive-font-utils,\n texlive-fonts-recommended,\n texlive-lang-cyrillic,\n texlive-lang-european,\n texlive-lang-french,\n texlive-lang-german,\n texlive-lang-polish,\n texlive-lang-spanish,\n texlive-latex-recommended,\n w3c-linkchecker,\n xsltproc" - - - case $DISTRIB_NAME in - Debian-9) - ;; # No xetex in Debian 9 Stretch - *) - # Not quite sure which packages is needed for xetex, but - # texlive-xetex seem like a safe choice. Need xetex to be - # able to build Chinese PDF. - DOC_DEPENDS="$DOC_DEPENDS,\n texlive-xetex" - ;; - esac + DOC_DEPENDS="asciidoctor,\n asciidoctor-pdf | ruby-asciidoctor-pdf,\n fonts-dejavu,\n fonts-noto-cjk,\n ghostscript,\n graphviz,\n librsvg2-bin,\n python3-fonttools,\n ruby-rouge,\n w3c-linkchecker" else DOC_DEPENDS='' fi diff --git a/debian/control.top.in b/debian/control.top.in index 1246fcdabfa..79f8d8fc4c9 100644 --- a/debian/control.top.in +++ b/debian/control.top.in @@ -12,12 +12,10 @@ Build-Depends: @KERNEL_HEADERS@, @MODUTILS_DEPENDS@, @EXTRA_BUILD@, - docbook-xsl , - asciidoc, - ghostscript , groff-base , imagemagick , - asciidoc-dblatex , + asciidoctor , + libunicode-linebreak-perl , autoconf, automake, bwidget (>= 1.7), diff --git a/debian/rules.in b/debian/rules.in index 9c0d295a12c..50b52e8ff63 100644 --- a/debian/rules.in +++ b/debian/rules.in @@ -33,7 +33,8 @@ export TIME:=$(shell LANG=C date --date='@$(TIMESTAMP)' '+%T') kernel_version = @KERNEL_VERSION@ configure_realtime_arg = @CONFIGURE_REALTIME_ARG@ ifeq (,$(filter nodocs,$(DEB_BUILD_OPTIONS))) -enable_build_documentation = @ENABLE_BUILD_DOCUMENTATION@ +enable_build_documentation = @ENABLE_BUILD_DOCUMENTATION@ \ + --enable-build-documentation-translation endif SRCDIR = $(CURDIR)/src DESTDIR=$(CURDIR)/debian/tmp @@ -123,9 +124,14 @@ ifeq (,$(filter nodocs,$(DEB_BUILD_OPTIONS))) dh_installdocs --doc-main-package=@MAIN_PACKAGE_NAME@ --package=linuxcnc-doc-en mv debian/linuxcnc-doc-en/usr/share/doc/@MAIN_PACKAGE_NAME@ debian/linuxcnc-doc-en/usr/share/doc/linuxcnc -# Remove files for translations created where we do not want Debian packages. - for l in ar es fr ru uk zh_CN; do \ - $(RM) -f debian/tmp/usr/share/doc/linuxcnc/LinuxCNC_*_$$l.pdf; \ +# Remove PDF files for translated locales that have no Debian package. +# The authoritative locale list lives in docs/po4a.cfg's [po4a_langs] +# line; only en and de get their own -doc package, every other locale +# in that list has its PDFs dropped from the tmp staging area. + for l in $$(sed -e's/#.*//' docs/po4a.cfg | grep '^\[po4a_langs\]' | cut -d" " -f2-); do \ + if [ "$$l" != "de" ]; then \ + $(RM) -f debian/tmp/usr/share/doc/linuxcnc/LinuxCNC_*_$$l.pdf; \ + fi; \ done $(RM) -f debian/tmp/usr/share/doc/linuxcnc/*_es.adoc else diff --git a/docs/help/tklinuxcnc.adoc b/docs/help/tklinuxcnc.adoc index 13dba0d220e..86170289922 100644 --- a/docs/help/tklinuxcnc.adoc +++ b/docs/help/tklinuxcnc.adoc @@ -3,11 +3,6 @@ = TkLinuxCNC -// Custom lang highlight -// must come after the doc title, to work around a bug in asciidoc 8.6.6 -:ini: {basebackend@docbook:'':ini} -:hal: {basebackend@docbook:'':hal} -:ngc: {basebackend@docbook:'':ngc} == Menus @@ -157,7 +152,7 @@ To change these settings, use the '@' key for Commanded/Actual, and the '#' key for Absolute/Relative. The default values can be set in the INI file, e.g., -[source,{ini}] +[source,ini] ---- [DISPLAY] POSITION_OFFSET = RELATIVE @@ -166,7 +161,7 @@ POSITION_FEEDBACK = ACTUAL or -[source,{ini}] +[source,ini] ---- [DISPLAY] POSITION_OFFSET = ABSOLUTE diff --git a/docs/html/gcode.html b/docs/html/gcode.html index c0a62e00f50..92d304f2ca8 100644 --- a/docs/html/gcode.html +++ b/docs/html/gcode.html @@ -41,6 +41,7 @@ tr.odd td { background: #d9d9d9; } tr.head td, tr.head th { background: black; color: white; } --> +
diff --git a/docs/html/index.css b/docs/html/index.css index 64412577086..e044b029dbd 100644 --- a/docs/html/index.css +++ b/docs/html/index.css @@ -13,3 +13,9 @@ p { margin-top: 0em; margin-bottom: 0em; } +summary { + margin-top: 0.65em; + margin-bottom: 0.15em; + font-family: sans-serif; + cursor: pointer; +} diff --git a/docs/html/linuxcnc.css b/docs/html/linuxcnc.css index aeb046f1c43..d9cf981f413 100644 --- a/docs/html/linuxcnc.css +++ b/docs/html/linuxcnc.css @@ -1,11 +1,18 @@ -:target { background: #DEF !important; } +:target { background: #DEF !important; } +body { margin: 1em 5% 1em 5%; } tt {font-family: "Courier New", Courier, monospace; font-size: 0.95em;} pre { font-family: monospace !important; } +h1, h2, h3, h4, h5, h6 { font-family: Arial, Helvetica, sans-serif; } h1, h2 { background: #c0c0f0; padding-left: 0.5em;} +h3, h4, h5, h6 { background: #DEF; padding-left: 0.5em; } h2 { padding-top: 0.35em; padding-bottom:0.15em;} h1, h2, h3, h4, h5 { border-bottom: 2px solid #8080c0; color: black; } + +@media (max-width: 768px) { + body { margin: 0.5em 2% 0.5em 2%; } +} div.nav { float: right; background: #ffffff; } -dt { font-weight: bold; } +dt { font-weight: bold; color: #527bbd; margin-top: 0.5em; } pre { margin-left: 4ex; auto; color: black; padding: 1ex; } div.float { text-align: center; margin: 2ex; padding: 1ex; } div.float span.caption { display: block; margin: 1em; } @@ -28,8 +35,16 @@ table.tableblock { border-collapse: collapse; margin-left: auto; margin-right: a .clist { -moz-column-width: 40ex; -moz-column-gap: 4ex } .nclist { -moz-column-width: 20ex; -moz-column-gap: 4ex } .nclist li { list-style-type: none; text-indent: -.5ex; } +#toctitle { + font-family: Arial, Helvetica, sans-serif; + color: #527bbd; + font-size: 1.1em; + font-weight: bold; + margin-top: 1em; + margin-bottom: 0.3em; +} .toc li { list-style-type: none; } -.toc li a { display: block; border: 1px solid transparent; text-indent: -1ex; } +.toc li a { border: 1px solid transparent; text-indent: -1ex; } /* AsciiDoc stuff */ div.note { diff --git a/docs/man/images/Images_info.adoc b/docs/man/images/Images_info.adoc index 1359fdfd124..b8461c51656 100644 --- a/docs/man/images/Images_info.adoc +++ b/docs/man/images/Images_info.adoc @@ -57,4 +57,4 @@ ASCII art diagrams can be drawn e.g., with link:https://asciiflow.com/[asciiflow │ │ ──┤is-on off├── └───────────┘ ----- \ No newline at end of file +---- diff --git a/docs/po4a.cfg b/docs/po4a.cfg index 64d10d967a9..7550a595cac 100644 --- a/docs/po4a.cfg +++ b/docs/po4a.cfg @@ -14,7 +14,7 @@ [po4a_paths] po/documentation.pot $lang:po/$lang.po [po4a_alias:AsciiDoc_def] AsciiDoc opt:"--keep 0 --option 'entry=lang' --option 'tablecells'" -[po4a_alias:man_def] man opt:"--keep 0 -o groff_code=translate -o inline=URL -o untranslated=FF,FU" +[po4a_alias:man_def] man opt:"--keep 0 -o groff_code=translate -o inline=URL,MTO -o untranslated=FF,FU,als -o unknown_macros=untranslated" [po4a_alias:xhtml_def] xhtml opt:"--keep 0" # Should stay at 0 percent to make sure the imported python script is @@ -128,6 +128,7 @@ [type: AsciiDoc_def] src/hal/general-ref.adoc $lang:src/$lang/hal/general-ref.adoc [type: AsciiDoc_def] src/hal/hal-examples.adoc $lang:src/$lang/hal/hal-examples.adoc [type: AsciiDoc_def] src/hal/halmodule.adoc $lang:src/$lang/hal/halmodule.adoc +[type: AsciiDoc_def] src/hal/halscope.adoc $lang:src/$lang/hal/halscope.adoc [type: AsciiDoc_def] src/hal/halshow.adoc $lang:src/$lang/hal/halshow.adoc [type: AsciiDoc_def] src/hal/haltcl.adoc $lang:src/$lang/hal/haltcl.adoc [type: AsciiDoc_def] src/hal/halui-examples.adoc $lang:src/$lang/hal/halui-examples.adoc @@ -360,9 +361,6 @@ [type: AsciiDoc_def] src/plasma/plasma-cnc-primer.adoc $lang:src/$lang/plasma/plasma-cnc-primer.adoc [type: AsciiDoc_def] src/plasma/qtplasmac.adoc $lang:src/$lang/plasma/qtplasmac.adoc [type: AsciiDoc_def] src/remap/remap.adoc $lang:src/$lang/remap/remap.adoc -[type: AsciiDoc_def] src/source-highlight/hal-demo.adoc $lang:src/$lang/source-highlight/hal-demo.adoc -[type: AsciiDoc_def] src/source-highlight/ini-demo.adoc $lang:src/$lang/source-highlight/ini-demo.adoc -[type: AsciiDoc_def] src/source-highlight/ngc-demo.adoc $lang:src/$lang/source-highlight/ngc-demo.adoc [type: AsciiDoc_def] src/tooldatabase/tooldatabase.adoc $lang:src/$lang/tooldatabase/tooldatabase.adoc [type: AsciiDoc_def] src/user/starting-linuxcnc.adoc $lang:src/$lang/user/starting-linuxcnc.adoc [type: AsciiDoc_def] src/user/user-concepts.adoc $lang:src/$lang/user/user-concepts.adoc diff --git a/docs/src/.gitignore b/docs/src/.gitignore index 0fd226d123b..9c221e4a4c3 100644 --- a/docs/src/.gitignore +++ b/docs/src/.gitignore @@ -31,3 +31,4 @@ vi/* zh_CN/* index_*.tmpl man/man1/linuxcnc.1.adoc +rouge-*.css diff --git a/docs/src/Submakefile b/docs/src/Submakefile index b62c9d5546f..59f6f65e379 100644 --- a/docs/src/Submakefile +++ b/docs/src/Submakefile @@ -1,4 +1,4 @@ -.PHONY: docs docclean checkref checkref_en checkref_ar checkref_de checkref_es checkref_fr checkref_nb checkref_ru checkref_sv checkref_ta checkref_tr checkref_uk checkref_zh_CN +.PHONY: docs docclean checkref .PHONY: pdfdocs htmldocs install-doc install-doc-pdf install-doc-html SHELL=/bin/bash @@ -6,6 +6,13 @@ SHELL=/bin/bash # To make linuxcnc-checklink widely available export PATH:=$(BASEPWD)/../scripts:$(PATH) +# Ruby (asciidoctor / asciidoctor-pdf) reads source files in the locale's +# default external encoding. Containerised builds often inherit POSIX/C, +# which makes Ruby treat every UTF-8 byte > 0x7f as an invalid sequence +# and abort on the first non-ASCII character. Force UTF-8. +export LANG := C.UTF-8 +export LC_ALL := C.UTF-8 + # Optional helper to convert to uppercase for variable names like $(DOC_TARGETS_HTML_SV) # GNU make doesn’t have built-in uppercase, so define one: uc = $(shell echo $(1) | tr '[:lower:]' '[:upper:]') @@ -25,8 +32,7 @@ SRCDIR=../src DOC_DIR=../docs DOC_SRCDIR=../docs/src -LOC_HL_DIR=../docs/src/source-highlight -LOC_LANG_MAP=$(LOC_HL_DIR)/local/lang.map +ASCIIDOCTOR_DEFAULT_CSS := $(shell ruby -e 'require "asciidoctor"; print Asciidoctor::DATA_DIR' 2>/dev/null)/stylesheets/asciidoctor-default.css # The following line determines for the Makefile what languages should be addressed. # Edit the file po4a.cfg in this source tree to adjust. @@ -235,13 +241,38 @@ else PO4A_VERBOSE = endif -$(DOC_DIR)/po/documentation.pot: $(addprefix $(DOC_SRCDIR)/, $(DOC_SRCS_EN)) +# components_gen.adoc is referenced as a translation master in po4a.cfg +# (so each language has its own translated copy in $@
-$(DOC_SRCDIR)/%.pdf: $(DOC_SRCDIR)/%.adoc svgs_made_from_dots .adoc-images-stamp
+# PDF rule. Uses asciidoctor-pdf with our xref + image preprocessor
+# extensions and the LinuxCNC theme. The xref-root attribute is set
+# to the directory of the source file so each language tree gets
+# its own anchor index (Master_*.adoc under DOC_SRCDIR for English,
+# DOC_SRCDIR/
-
HAL (Hardware Abstraction Layer)
Glossary, Copyright, History & Overview
For more information about man pages see the Linux FAQ
-
diff --git a/docs/src/ladder/classic-ladder.adoc b/docs/src/ladder/classic-ladder.adoc index 3501ab11739..6b2f9455aa8 100644 --- a/docs/src/ladder/classic-ladder.adoc +++ b/docs/src/ladder/classic-ladder.adoc @@ -4,12 +4,6 @@ [[cha:cl-programming]] = ClassicLadder Programming -// Custom lang highlight -// must come after the doc title, to work around a bug in asciidoc 8.6.6 -:ini: {basebackend@docbook:'':ini} -:hal: {basebackend@docbook:'':hal} -:ngc: {basebackend@docbook:'':ngc} - (((ClassicLadder Programming,CL Programming))) == Ladder Concepts @@ -58,7 +52,7 @@ Loading the ClassicLadder real time module (classicladder_rt) is possible from a The first line loads real time the ClassicLadder module. The second line adds the function classicladder.0.refresh to the servo thread. This line makes ClassicLadder update at the servo thread rate. -[source,{hal}] +[source,hal] ---- loadrt classicladder_rt addf classicladder.0.refresh servo-thread @@ -109,7 +103,7 @@ numS32in and numS32out control how many HAL signed integers (+- integer range) p For example (you don't need all of these to change just a few): -[source,{hal}] +[source,hal] ---- loadrt classicladder_rt numRungs=12 numBits=100 numWords=10 numTimers=10 numMonostables=10 numCounters=10 numPhysInputs=10 @@ -119,7 +113,7 @@ numS32in=5 numS32out=5 To load the default number of objects: -[source,{hal}] +[source,hal] ---- loadrt classicladder_rt ---- @@ -131,7 +125,7 @@ If you used the Stepper Config Wizard place any ClassicLadder HAL commands in th To load the non-realtime module: -[source,{hal}] +[source,hal] ---- loadusr classicladder ---- @@ -140,7 +134,7 @@ NOTE: Only one .clp file can be loaded. If you need to divide your ladder then u To load a ladder file: -[source,{hal}] +[source,hal] ---- loadusr classicladder myladder.clp ---- @@ -156,7 +150,7 @@ ClassicLadder Loading Options To use ClassicLadder with HAL without EMC: -[source,{hal}] +[source,hal] ---- loadusr -w classicladder ---- @@ -904,14 +898,14 @@ This is done by adding a couple of lines to the custom.hal file. This line loads the real time module: -[source,{hal}] +[source,hal] ---- loadrt classicladder_rt ---- This line adds the ClassicLadder function to the servo thread: -[source,{hal}] +[source,hal] ---- addf classicladder.0.refresh servo-thread ---- @@ -972,7 +966,7 @@ Again if you used the StepConf Wizard to add ClassicLadder you can skip this ste To manually add a ladder you need to add add a line to your custom.hal file that will load your ladder file. Close your LinuxCNC session and add this line to your custom.hal file. -[source,{hal}] +[source,hal] ---- loadusr -w classicladder --nogui MyLadder.clp ---- diff --git a/docs/src/ladder/ladder-examples.adoc b/docs/src/ladder/ladder-examples.adoc index 2b752c74496..6f5df9be703 100644 --- a/docs/src/ladder/ladder-examples.adoc +++ b/docs/src/ladder/ladder-examples.adoc @@ -4,11 +4,6 @@ [[cha:classicladder-examples]] = ClassicLadder Examples -// Custom lang highlight -// must come after the doc title, to work around a bug in asciidoc 8.6.6 -:ini: {basebackend@docbook:'':ini} -:hal: {basebackend@docbook:'':hal} -:ngc: {basebackend@docbook:'':ngc} == Wrapping Counter @@ -52,7 +47,7 @@ First we have to open the E-Stop loop in the main HAL file by commenting out by adding the pound sign as shown or removing the following lines. -[source,{hal}] +[source,hal] ---- # net estop-out <= iocontrol.0.user-enable-out # net estop-out => iocontrol.0.emc-enable-in @@ -61,7 +56,7 @@ following lines. Next we add ClassicLadder to our custom.hal file by adding these two lines: -[source,{hal}] +[source,hal] ---- loadrt classicladder_rt addf classicladder.0.refresh servo-thread @@ -78,7 +73,7 @@ estop.clp Now add the following line to your custom.hal file. -[source,{hal}] +[source,hal] ---- # Load the ladder loadusr classicladder --nogui estop.clp @@ -96,7 +91,7 @@ I/O assignments Next we add the following lines to the custom_postgui.hal file -[source,{hal}] +[source,hal] ---- # E-Stop example using PyVCP buttons to simulate external components diff --git a/docs/src/lathe/images/control-point_es.svg b/docs/src/lathe/images/control-point_es.svg index 12b00560fcb..5292292debf 100644 --- a/docs/src/lathe/images/control-point_es.svg +++ b/docs/src/lathe/images/control-point_es.svg @@ -467,18 +467,17 @@ x="212.70099" y="89.502655" style="font-size:18px;line-height:1.5;font-family:sans-serif">Punto de Control - transparent. Painting both gives a double-box. */
+ body:is(.article,.book,.manpage) .listingblock > .content,
+ body:is(.article,.book,.manpage) .literalblock > .content {
+ background: #2a2a2a;
+ color: #f0f0f0;
+ }
+ body:is(.article,.book,.manpage) .listingblock pre,
+ body:is(.article,.book,.manpage) .literalblock pre,
+ body:is(.article,.book,.manpage) .listingblock > .content > pre[class^="highlight"],
+ body:is(.article,.book,.manpage) .listingblock > .content > pre:not(.highlight),
+ body:is(.article,.book,.manpage) .literalblock pre.highlight,
+ body:is(.article,.book,.manpage) pre.rouge {
+ background: transparent !important;
+ background-color: transparent !important;
+ color: inherit;
+ }
+
+ /* Inline code/tt only. pre code inside listingblock would
+ otherwise paint a second box inside the listing wrapper. */
+ body:is(.article,.book,.manpage) p code,
+ body:is(.article,.book,.manpage) li code,
+ body:is(.article,.book,.manpage) td code,
+ body:is(.article,.book,.manpage) tt {
+ background: #3a3a3a;
+ color: #f0f0f0;
+ padding: 1px 4px;
+ border-radius: 3px;
+ }
+ body:is(.article,.book,.manpage) pre code,
+ body:is(.article,.book,.manpage) .listingblock code,
+ body:is(.article,.book,.manpage) .literalblock code {
+ background: transparent !important;
+ padding: 0 !important;
+ color: inherit;
+ }
+
+ body:is(.article,.book,.manpage) table.tableblock,
+ body:is(.article,.book,.manpage) table.tableblock th,
+ body:is(.article,.book,.manpage) table.tableblock td {
+ border-color: #444;
+ color: #e0e0e0;
+ background: #1e1e1e;
+ }
+ body:is(.article,.book,.manpage) table.tableblock tbody tr th,
+ body:is(.article,.book,.manpage) table.tableblock tfoot tr th,
+ body:is(.article,.book,.manpage) table.tableblock thead tr th {
+ background: #2a2a2a;
+ color: #f0f0f0;
+ }
+ body:is(.article,.book,.manpage) table.tableblock tbody tr th p,
+ body:is(.article,.book,.manpage) table.tableblock tfoot tr th p {
+ color: #f0f0f0;
+ }
+ body:is(.article,.book,.manpage) table.stripes-all > * > tr,
+ body:is(.article,.book,.manpage) table.stripes-odd > * > tr:nth-of-type(odd),
+ body:is(.article,.book,.manpage) table.stripes-even > * > tr:nth-of-type(even),
+ body:is(.article,.book,.manpage) table.stripes-hover > * > tr:hover {
+ background: #2a2a2a;
+ }
+ body:is(.article,.book,.manpage) .admonitionblock > table td.content {
+ color: #d0d0d0;
+ border-left-color: #444;
+ }
+ body:is(.article,.book,.manpage) .admonitionblock > table td.icon,
+ body:is(.article,.book,.manpage) .admonitionblock > table td.icon .title {
+ color: #e06464;
+ font-weight: bold;
+ }
+
+ /* Inkscape-exported SVG figures are transparent with black strokes
+ and disappear on dark page bg. Wrap SVGs only in a white card;
+ PNGs/JPEGs usually carry their own background so leave them be. */
+ body:is(.article,.book,.manpage) .imageblock img[src$=".svg"],
+ body:is(.article,.book,.manpage) .image img[src$=".svg"] {
+ background: #fff;
+ padding: 0.5em;
+ border-radius: 4px;
+ }
+
+ /* Asciidoctor's default stylesheet sets explicit dark-on-white colors
+ on these text blocks; without an override they stay black on the
+ dark page bg and become unreadable. */
+ body:is(.article,.book,.manpage) .quoteblock,
+ body:is(.article,.book,.manpage) .quoteblock blockquote,
+ body:is(.article,.book,.manpage) .quoteblock p,
+ body:is(.article,.book,.manpage) .quoteblock dt,
+ body:is(.article,.book,.manpage) .quoteblock .hdlist1,
+ body:is(.article,.book,.manpage) .quoteblock .attribution,
+ body:is(.article,.book,.manpage) .quoteblock .attribution cite,
+ body:is(.article,.book,.manpage) .quoteblock cite,
+ body:is(.article,.book,.manpage) .verseblock,
+ body:is(.article,.book,.manpage) .verseblock pre,
+ body:is(.article,.book,.manpage) .sidebarblock,
+ body:is(.article,.book,.manpage) .exampleblock > .content,
+ body:is(.article,.book,.manpage) dt,
+ body:is(.article,.book,.manpage) .hdlist1 {
+ color: #e0e0e0;
+ }
+ body:is(.article,.book,.manpage) .sidebarblock,
+ body:is(.article,.book,.manpage) .exampleblock > .content {
+ background: #2a2a2a;
+ border-color: #444;
+ }
+ body:is(.article,.book,.manpage) .quoteblock blockquote::before {
+ color: #888;
+ }
+}
+
+
+/* ======================================================================
+ * Static landing pages (index.html / gcode.html)
+ *
+ * Mirror asciidoctor's defaults so landing pages blend with the doc
+ * pages. Asciidoctor uses Noto Serif body / Open Sans headings /
+ * #ba3925 heading color / #2156a5 links; we use the dark-blue accent
+ * in line with the doc pages.
+ * ====================================================================== */
+body:not(.article):not(.book):not(.manpage) {
+ font-family: "Noto Serif", "DejaVu Serif", Georgia, serif;
+ font-weight: 400;
+ font-style: normal;
+ line-height: 1;
+ background: #fff;
+ color: rgba(0, 0, 0, 0.85);
+ -moz-osx-font-smoothing: grayscale;
+ -webkit-font-smoothing: antialiased;
+ /* Match the asciidoctor content cap (min 95% viewport, max 100em /
+ 1600px) so the static landing pages and the doc pages line up at
+ the same width on HD screens. */
+ max-width: min(95%, 100em);
+ margin: 0 auto;
+ padding: 1em 1.5em;
+}
+/* Override index.css { body { padding-left: 50px } } */
+body:not(.article):not(.book):not(.manpage) { padding-left: 1.5em !important; }
+/* Caption acts as the page title in gcode.html; render it like
+ asciidoctor's h2. */
+body:not(.article):not(.book):not(.manpage) caption {
+ font-family: "Open Sans", "DejaVu Sans", sans-serif;
+ font-weight: 400;
+ font-style: normal;
+ font-size: 2.3125em;
+ color: #1a3a6c;
+ text-rendering: optimizeLegibility;
+ text-align: left;
+ margin: 0.5em 0;
+ caption-side: top;
+}
+body:not(.article):not(.book):not(.manpage) p,
+body:not(.article):not(.book):not(.manpage) dd {
+ font-family: inherit;
+ font-size: 1.0625em;
+ line-height: 1.6;
+ text-rendering: optimizeLegibility;
+}
+/* Link lists on index.html act as a TOC; match asciidoctor's #toc ul
+ styling (Open Sans, tight line-height). */
+body:not(.article):not(.book):not(.manpage) ul,
+body:not(.article):not(.book):not(.manpage) ol {
+ font-family: "Open Sans", "DejaVu Sans", sans-serif;
+}
+body:not(.article):not(.book):not(.manpage) li {
+ line-height: 1.3334;
+ margin-top: 0.3334em;
+}
+body:not(.article):not(.book):not(.manpage) h1,
+body:not(.article):not(.book):not(.manpage) h2,
+body:not(.article):not(.book):not(.manpage) h3,
+body:not(.article):not(.book):not(.manpage) h4,
+body:not(.article):not(.book):not(.manpage) h5,
+body:not(.article):not(.book):not(.manpage) h6 {
+ font-family: "Open Sans", "DejaVu Sans", sans-serif;
+ font-weight: 400;
+ font-style: normal;
+ color: #1a3a6c;
+ line-height: 1.2;
+ text-rendering: optimizeLegibility;
+}
+/* Sizes pulled from asciidoctor's desktop cascade. */
+body:not(.article):not(.book):not(.manpage) h2 { font-size: 2.3125em; }
+body:not(.article):not(.book):not(.manpage) h3 { font-size: 1.6875em; }
+body:not(.article):not(.book):not(.manpage) h4 { font-size: 1.4375em; }
+body:not(.article):not(.book):not(.manpage) a {
+ color: #2156a5;
+ text-decoration: none;
+}
+body:not(.article):not(.book):not(.manpage) a:hover {
+ text-decoration: underline;
+}
+body:not(.article):not(.book):not(.manpage) a:visited {
+ color: #1d4b8f;
+}
+body:not(.article):not(.book):not(.manpage) code,
+body:not(.article):not(.book):not(.manpage) pre,
+body:not(.article):not(.book):not(.manpage) tt {
+ font-family: "Droid Sans Mono", "DejaVu Sans Mono", monospace;
+}
+
+/* gcode.html table: redo to mirror asciidoctor's table look.
+ gcode.html ships hard black borders / black header inline; strip
+ the vertical rules, soften horizontals, lighten the header
+ background. !important overrides inline style="..." on the
+ section-divider rows in the static markup. */
+body:not(.article):not(.book):not(.manpage) table {
+ border-collapse: collapse;
+ border: 1px solid #dddddf !important;
+ margin: 1em auto;
+}
+body:not(.article):not(.book):not(.manpage) td,
+body:not(.article):not(.book):not(.manpage) th {
+ border: none !important;
+ border-bottom: 1px solid #dddddf !important;
+ padding: 0.5em 0.625em !important;
+ vertical-align: top;
+}
+body:not(.article):not(.book):not(.manpage) td {
+ background: #fff;
+ color: rgba(0, 0, 0, 0.85);
+}
+body:not(.article):not(.book):not(.manpage) th {
+ background: #f7f7f8;
+ color: rgba(0, 0, 0, 0.85);
+ font-weight: bold;
+ text-align: left;
+}
+body:not(.article):not(.book):not(.manpage) tr.odd td {
+ background: #f8f8f7;
+}
+body:not(.article):not(.book):not(.manpage) tr.head td,
+body:not(.article):not(.book):not(.manpage) tr.head th {
+ background: #f7f7f8;
+ color: rgba(0, 0, 0, 0.85);
+}
+/* Section divider rows in gcode.html. Two shapes appear:
+ Sec desc (Motion, Canned cycles)
+ Sec (Distance Mode, ...)
+ Paint the row background and let the cells fall through, so the
+ tint covers any colgroup column not spanned by the th/td. */
+body:not(.article):not(.book):not(.manpage) tr:has(> th:first-child:not(:only-child)),
+body:not(.article):not(.book):not(.manpage) tr:has(> th:only-child) {
+ background: #ececef;
+}
+body:not(.article):not(.book):not(.manpage) tr:has(> th:first-child:not(:only-child)) > *,
+body:not(.article):not(.book):not(.manpage) tr:has(> th:only-child) > * {
+ background: transparent !important;
+ font-weight: bold;
+}
+
+/* ======================================================================
+ * Static landing pages (dark, opt-in via system preference)
+ * ====================================================================== */
+@media (prefers-color-scheme: dark) {
+ body:not(.article):not(.book):not(.manpage) {
+ background: #1e1e1e;
+ color: #e0e0e0;
+ }
+ body:not(.article):not(.book):not(.manpage) h1,
+ body:not(.article):not(.book):not(.manpage) h2,
+ body:not(.article):not(.book):not(.manpage) h3,
+ body:not(.article):not(.book):not(.manpage) h4,
+ body:not(.article):not(.book):not(.manpage) h5,
+ body:not(.article):not(.book):not(.manpage) h6,
+ body:not(.article):not(.book):not(.manpage) caption {
+ color: #7fb8e8;
+ }
+ body:not(.article):not(.book):not(.manpage) a { color: #6fa8dc; }
+ body:not(.article):not(.book):not(.manpage) a:visited { color: #b48ead; }
+
+ body:not(.article):not(.book):not(.manpage) table {
+ border-color: #444 !important;
+ }
+ body:not(.article):not(.book):not(.manpage) td,
+ body:not(.article):not(.book):not(.manpage) th {
+ border-bottom-color: #444 !important;
+ }
+ body:not(.article):not(.book):not(.manpage) td {
+ background: #2a2a2a;
+ color: #e0e0e0;
+ }
+ body:not(.article):not(.book):not(.manpage) th {
+ background: #1a1a1a;
+ color: #f0f0f0;
+ }
+ body:not(.article):not(.book):not(.manpage) tr.odd td {
+ background: #333;
+ }
+ body:not(.article):not(.book):not(.manpage) tr.head td,
+ body:not(.article):not(.book):not(.manpage) tr.head th {
+ background: #1a1a1a;
+ color: #f0f0f0;
+ }
+ body:not(.article):not(.book):not(.manpage) tr:has(> th:first-child:not(:only-child)),
+ body:not(.article):not(.book):not(.manpage) tr:has(> th:only-child) {
+ background: #161616;
+ }
+ body:not(.article):not(.book):not(.manpage) tr:has(> th:first-child:not(:only-child)) > *,
+ body:not(.article):not(.book):not(.manpage) tr:has(> th:only-child) > * {
+ background: transparent !important;
+ color: #f0f0f0;
+ }
+}
diff --git a/docs/src/links.xslt b/docs/src/links.xslt
deleted file mode 100644
index 8fe78e5c539..00000000000
--- a/docs/src/links.xslt
+++ /dev/null
@@ -1,44 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/docs/src/links_db_gen.py b/docs/src/links_db_gen.py
deleted file mode 100755
index b32fddab62f..00000000000
--- a/docs/src/links_db_gen.py
+++ /dev/null
@@ -1,18 +0,0 @@
-#!/usr/bin/env python3
-import os, sys
-
-d = {}
-
-strip = sys.argv[1]
-
-for f in sys.argv[2:]:
- base = os.path.splitext(f)[0]
- if base.startswith(strip):
- base = base[len(strip):]
- for l in open(f):
- l = l.strip().replace(' ', '_')
- if not l:
- continue
- d[l] = base
-for k, v in list(d.items()):
- print('%s\t%s' % (k, v))
diff --git a/docs/src/man/man9/hm2_7i43.9.adoc b/docs/src/man/man9/hm2_7i43.9.adoc
index 6dad644f519..26ea33f21c0 100644
--- a/docs/src/man/man9/hm2_7i43.9.adoc
+++ b/docs/src/man/man9/hm2_7i43.9.adoc
@@ -7,7 +7,7 @@ Anything IO board with HostMot2 firmware.
== SYNOPSIS
-**loadrt hm2_7i43 [ ioaddr=**__N__[,_N_...] ] [ **ioaddr_hi=**__N__[,_N_...] ] [ **epp_wide=**__N__[,_N_...] ] [ **config="**__str[,str...]**"** ] [**debug_epp=**__N__[,_N_...] ]
+**loadrt hm2_7i43 [ ioaddr=**__N__[,_N_...] ] [ **ioaddr_hi=**__N__[,_N_...] ] [ **epp_wide=**__N__[,_N_...] ] [ pass:[config="]__str[,str...]pass:["] ] [**debug_epp=**__N__[,_N_...] ]
____
*ioaddr* [default: 0 (parport0)]::
diff --git a/docs/src/man/man9/hm2_rpspi.9.adoc b/docs/src/man/man9/hm2_rpspi.9.adoc
index 82280d76777..766864e8061 100644
--- a/docs/src/man/man9/hm2_rpspi.9.adoc
+++ b/docs/src/man/man9/hm2_rpspi.9.adoc
@@ -147,7 +147,7 @@ and the discrete SPI clock frequency (250 MHz / (2__n__) for _n_ > 1):
| 13 | 9616 | 9.615 MHz
-| 14+ | ....
+| 14+ | .... | ....
|===
The lowest selectable SPI clock frequency is 30 kHz (spiclk_rate=30) for
diff --git a/docs/src/motion/5-axis-kinematics.adoc b/docs/src/motion/5-axis-kinematics.adoc
index a30427e6682..9391f8611a9 100644
--- a/docs/src/motion/5-axis-kinematics.adoc
+++ b/docs/src/motion/5-axis-kinematics.adoc
@@ -8,12 +8,6 @@ use image:: for equation png files -- no latexmath
[[cha:5-axis-kinematics]]
= 5-Axis Kinematics
-// Custom lang highlight
-// must come after the doc title, to work around a bug in asciidoc 8.6.6
-:ini: {basebackend@docbook:'':ini}
-:hal: {basebackend@docbook:'':hal}
-:ngc: {basebackend@docbook:'':ngc}
-
(((5-Axis Kinematics)))
== Introduction
@@ -306,7 +300,7 @@ using the LinuxCNC vismach facility.
Vismach is a library of python routines to display a dynamic simulation of a CNC machine on the PC screen. The python script for a particular machine is loaded in HAL and data passed by HAL pin connections. The non-realtime vismach model is loaded by a HAL command like:
-[source,{hal}]
+[source,hal]
----
loadusr -W xyzac-trt-gui
----
@@ -329,7 +323,7 @@ image::5-axis-figures/equation__38.png[align="center"]
The required HAL connection (for xyzac-trt) is:
-[source,{hal}]
+[source,hal]
----
net :tool-offset motion.tooloffset.z xyzac-trt-kins.tool-offset
----
@@ -373,7 +367,7 @@ Once it is compiled and installed you can reference it in your config setup of
your machine. This is done in the INI file of your config directory. For
example, the common INI specificaion:
-[source,{ini}]
+[source,ini]
----
[KINS]
KINEMATICS = trivkins
@@ -381,7 +375,7 @@ KINEMATICS = trivkins
is replaced by
-[source,{ini}]
+[source,ini]
----
[KINS]
KINEMATICS = kinsname
@@ -392,7 +386,7 @@ Additional HAL pins may be created by the module for variable configuration item
such as the D~x~, D~y~, D~z~, tool-offset used in the xyzac-trt kinematics module.
These pins can be connected to a signal for dynamic control or set once with HAL connections like:
-[source,{hal}]
+[source,hal]
----
# set offset parameters
net :tool-offset motion.tooloffset.z xyzac-trt-kins.tool-offset
diff --git a/docs/src/motion/external-offsets.adoc b/docs/src/motion/external-offsets.adoc
index b304d4ebec0..9548d705a4a 100644
--- a/docs/src/motion/external-offsets.adoc
+++ b/docs/src/motion/external-offsets.adoc
@@ -4,13 +4,6 @@
[[cha:external-offsets]]
= External Axis Offsets
-
-// Custom lang highlight
-// must come after the doc title, to work around a bug in asciidoc 8.6.6
-:ini: {basebackend@docbook:'':ini}
-:hal: {basebackend@docbook:'':hal}
-:ngc: {basebackend@docbook:'':ngc}
-
(((externaloffsets)))
External axis offsets are supported during teleop (world) jogs
@@ -25,7 +18,7 @@ connected to an encoder INI component that counts pulses.
For each axis letter (*L* in xyzabcuvw):
-[source,{ini}]
+[source,ini]
----
[AXIS_L]OFFSET_AV_RATIO = value (controls accel/vel for external offsets)
----
@@ -201,7 +194,7 @@ man page for details (*$ man eoffset_per_angle*).
The external axis offset capability is enabled by adding
an '[AXIS_L]' setting for each candidate axis. For example:
-[source,{ini}]
+[source,ini]
----
[AXIS_Z]
OFFSET_AV_RATIO = 0.2
@@ -228,7 +221,7 @@ Example INI file settings to simulate the HAL pin
eoffset connections and display eoffset information for the
z axis (for identity kinematics with z==joint2):
-[source,{ini}]
+[source,ini]
----
[APPLICATIONS]
APP = sim_pin \
diff --git a/docs/src/motion/switchkins.adoc b/docs/src/motion/switchkins.adoc
index f92bf28a782..adeecb2d1cc 100644
--- a/docs/src/motion/switchkins.adoc
+++ b/docs/src/motion/switchkins.adoc
@@ -4,11 +4,6 @@
[[cha:switchable-kinematics]]
= Switchable Kinematics (switchkins)
-// Custom lang highlight
-// must come after the doc title, to work around a bug in asciidoc 8.6.6
-:ini: {basebackend@docbook:'':ini}
-:hal: {basebackend@docbook:'':hal}
-:ngc: {basebackend@docbook:'':ngc}
== Introduction
@@ -54,11 +49,11 @@ for backwards compatibility. The provided sim configs alter the
type0/type1 convention by forcing type0==identity kinematics using the
module string parameter 'sparm' with an INI file setting like:
-[source,{ini}]
+[source,ini]
----
[KINS]
KINEMATICS = xyzac-trt-kins sparm=identityfirst
-...
+# ...
----
=== Identity letter assignments
@@ -68,7 +63,7 @@ When using an *identity* kinematics type, the module parameter
arbitrary order from the set of allowed coordinate letters.
Examples:
-[source,{ini}]
+[source,ini]
----
[KINS]
JOINTS = 6
@@ -141,7 +136,7 @@ Switchkins functionality is enabled by the pin
analog output pin like motion.analog-out-03 so that it can be
set by M68 commands. Example:
-[source,{hal}]
+[source,hal]
----
net :kinstype-select <= motion.analog-out-03
net :kinstype-select => motion.switchkins-type
@@ -151,7 +146,7 @@ net :kinstype-select => motion.switchkins-type
Kinstype selection is managed using G-code sequences like:
-[source,{ngc}]
+[source,ngc]
----
...
M68 E3 Q1 ;update analog-out-03 to select kinstype 1
@@ -200,7 +195,7 @@ velocity, and acceleration for each applicable coordinate letter
specified in the configuration INI file. Example for letter L
(in the set 'XYZABCUVW'):
-[source,{ini}]
+[source,ini]
----
[AXIS_L]
MIN_LIMIT =
@@ -223,7 +218,7 @@ See the milltask manpage for more information ($ man milltask).
The relevant INI-HAL pins for a joint number (_N_) are:
-[source,{hal}]
+[source,hal]
----
ini.N.min_limit
ini.N.max_limit
@@ -233,7 +228,7 @@ ini.N.max_velocity
The relevant INI-HAL pins for an axis coordinate (_L_) are:
-[source,{hal}]
+[source,hal]
----
ini.L.min_limit
ini.L.max_limit
diff --git a/docs/src/otf2ttf.py b/docs/src/otf2ttf.py
new file mode 100644
index 00000000000..ca50214458d
--- /dev/null
+++ b/docs/src/otf2ttf.py
@@ -0,0 +1,112 @@
+#!/usr/bin/env python3
+# Build a small TrueType (glyf-based) subset of a CFF-based OTF/TTC for
+# prawn-pdf (used by asciidoctor-pdf) to embed. Debian ships
+# Noto Serif CJK only as a CFF/OTF TrueType Collection and prawn 2.4
+# (the version on bookworm) corrupts the PDF when asked to embed CFF
+# outlines directly, so we convert the curves with cu2qu first.
+#
+# Subsetting before conversion keeps the build under a second: a full
+# Noto Serif CJK face is ~65 k glyphs (~45 s convert); the docs use a
+# few hundred CJK characters at most.
+#
+# Usage:
+# otf2ttf.py [--ttc-index N] [--text-from DIR]
+#
+# Built for the docs build only. Not a general font tool.
+
+import argparse, os, re, sys, time
+from fontTools.ttLib import TTCollection, TTFont, newTable
+from fontTools.pens.ttGlyphPen import TTGlyphPen
+from fontTools.pens.cu2quPen import Cu2QuPen
+from fontTools.subset import Subsetter, Options
+
+# Characters we want available in the fallback font. Defaults to BMP CJK
+# unified ideographs + halfwidth / fullwidth forms. ASCII is excluded
+# since the base font already covers it.
+CJK_RE = re.compile(r'[ -鿿-]')
+
+
+def scan_cjk(root):
+ seen = set()
+ for dirpath, _, files in os.walk(root):
+ for f in files:
+ if not (f.endswith('.adoc') or f.endswith('.po')):
+ continue
+ try:
+ t = open(os.path.join(dirpath, f), encoding='utf-8', errors='ignore').read()
+ except OSError:
+ continue
+ seen.update(CJK_RE.findall(t))
+ return seen
+
+
+def cff_to_ttf(font):
+ glyph_set = font.getGlyphSet()
+ glyf = newTable('glyf')
+ glyf.glyphs = {}
+ glyf.glyphOrder = font.getGlyphOrder()
+ for name in font.getGlyphOrder():
+ pen = TTGlyphPen(None)
+ try:
+ glyph_set[name].draw(Cu2QuPen(pen, max_err=1.0, reverse_direction=True))
+ except Exception:
+ pass
+ glyf.glyphs[name] = pen.glyph()
+ font['glyf'] = glyf
+ for t in ('CFF ', 'CFF2', 'VORG'):
+ if t in font:
+ del font[t]
+ font['head'].indexToLocFormat = 1
+ font['loca'] = newTable('loca')
+ font.sfntVersion = '\x00\x01\x00\x00'
+
+
+def convert(src, dst, ttc_index=None, text=None):
+ t0 = time.time()
+ if ttc_index is not None:
+ font = TTCollection(src).fonts[ttc_index]
+ else:
+ font = TTFont(src)
+
+ # `is not None`, not `if text:`: an empty scan result must still subset
+ # (to notdef) rather than convert the full ~65k-glyph face (~200s).
+ if text is not None:
+ opts = Options()
+ opts.layout_features = ['*']
+ opts.notdef_outline = True
+ opts.recommended_glyphs = True
+ opts.name_IDs = ['*']
+ opts.name_legacy = True
+ opts.name_languages = ['*']
+ sub = Subsetter(options=opts)
+ sub.populate(text=text)
+ sub.subset(font)
+
+ if 'CFF ' in font or 'CFF2' in font:
+ cff_to_ttf(font)
+
+ font.save(dst)
+ print(f'{dst}: {time.time()-t0:.1f}s ({font["maxp"].numGlyphs} glyphs)')
+
+
+def main():
+ p = argparse.ArgumentParser()
+ p.add_argument('input')
+ p.add_argument('output')
+ p.add_argument('--ttc-index', type=int, default=None)
+ p.add_argument('--text-from', action='append', default=[], metavar='DIR',
+ help='directory scanned for adoc/po sources; subset output '
+ 'to characters found there. Repeatable.')
+ a = p.parse_args()
+ if a.text_from:
+ seen = set()
+ for d in a.text_from:
+ seen.update(scan_cjk(d))
+ text = ''.join(sorted(seen))
+ else:
+ text = None
+ convert(a.input, a.output, a.ttc_index, text)
+
+
+if __name__ == '__main__':
+ main()
diff --git a/docs/src/pdf-theme.yml b/docs/src/pdf-theme.yml
new file mode 100644
index 00000000000..7af6feff8d0
--- /dev/null
+++ b/docs/src/pdf-theme.yml
@@ -0,0 +1,130 @@
+# asciidoctor-pdf theme for LinuxCNC docs.
+# Approximates the look and feel of the dblatex output (emc2.sty).
+# Extends the asciidoctor-pdf "default" theme; only set overrides here.
+
+extends: default
+
+font:
+ catalog:
+ merge: true
+ DejaVu Sans Mono:
+ normal: DejaVuSansMono.ttf
+ bold: DejaVuSansMono-Bold.ttf
+ italic: DejaVuSansMono-Oblique.ttf
+ bold_italic: DejaVuSansMono-BoldOblique.ttf
+ Noto Serif CJK SC:
+ normal: NotoSerifCJKsc-Regular.ttf
+ bold: NotoSerifCJKsc-Bold.ttf
+ italic: NotoSerifCJKsc-Regular.ttf
+ bold_italic: NotoSerifCJKsc-Bold.ttf
+ fallbacks:
+ - Noto Serif CJK SC
+
+page:
+ size: A4
+ margin: [0.85in, 0.67in, 0.55in, 0.67in]
+
+base:
+ font_family: Noto Serif
+ font_size: 10
+ line_height_length: 12
+ line_height: $base_line_height_length / 10
+ font_color: 000000
+ text_align: justify
+
+heading:
+ font_family: $base_font_family
+ font_color: 000000
+ font_style: bold
+ text_align: left
+ line_height: 1.2
+ margin_top: 12
+ margin_bottom: 6
+ h1_font_size: 22
+ h2_font_size: 18
+ h3_font_size: 14
+ h4_font_size: 12
+ h5_font_size: 11
+ h6_font_size: 10
+
+title_page:
+ align: center
+ title:
+ top: 55%
+ font_size: 28
+ font_color: 000000
+ font_style: bold
+ subtitle:
+ font_size: 18
+ font_color: 000000
+ authors:
+ margin_top: 12
+ font_size: 12
+ font_color: 000000
+ revision:
+ margin_top: 12
+ font_size: 10
+ font_color: 000000
+
+header:
+ height: 0.6in
+ font_size: 9
+ font_color: 000000
+ border_width: 0.5
+ border_color: 000000
+ vertical_align: middle
+ columns: <40% =20% >40%
+ recto: &header_content
+ left:
+ content: '{document-title}'
+ center:
+ content: '{chapter-title}'
+ right:
+ content: '{page-number} / {page-count}'
+ verso: *header_content
+
+footer:
+ height: 0.4in
+ border_width: 0.5
+ border_color: 000000
+ recto: &footer_content
+ left:
+ content: ''
+ center:
+ content: ''
+ right:
+ content: ''
+ verso: *footer_content
+
+toc:
+ indent: 18
+ line_height: 1.4
+
+codespan:
+ font_family: DejaVu Sans Mono
+ font_color: B12146
+
+code:
+ font_family: DejaVu Sans Mono
+ font_size: 9
+ background_color: F5F5F5
+ border_color: DDDDDD
+ border_width: 0.5
+ border_radius: 2
+ padding: [6, 6, 6, 6]
+
+kbd:
+ font_family: DejaVu Sans Mono
+
+button:
+ font_family: DejaVu Sans Mono
+
+link:
+ font_color: 0000FF
+
+table:
+ head:
+ background_color: E8E8E8
+ border_bottom_width: 1
+ border_color: CCCCCC
+ cell_padding: 4
diff --git a/docs/src/plasma/plasma-cnc-primer.adoc b/docs/src/plasma/plasma-cnc-primer.adoc
index 7c748ea8b5f..3a5ed00ad32 100644
--- a/docs/src/plasma/plasma-cnc-primer.adoc
+++ b/docs/src/plasma/plasma-cnc-primer.adoc
@@ -4,12 +4,6 @@
[[cha:plasma-primer]]
= Plasma Cutting Primer for LinuxCNC Users
-// Custom lang highlight
-// must come after the doc title, to work around a bug in asciidoc 8.6.6
-:ini: {basebackend@docbook:'':ini}
-:hal: {basebackend@docbook:'':hal}
-:ngc: {basebackend@docbook:'':ngc}
-
(((Plasma Cutting Primer)))
== What Is Plasma?
@@ -246,7 +240,7 @@ The following HAL code can be pasted into your QtPlasmaC's custom.hal to enable
Install the correct bit file and connect the THCAD to IDX+ and IDX-.
Be sure to change the calibration settings to agree with your THCAD-5.
-[source,{hal}]
+[source,hal]
----
# --- Load the Component ---
loadrt ohmic names=ohmicsense
@@ -434,7 +428,7 @@ How this is implemented is totally arbitrary.
Lets look at how the LinuxCNC QtPlasmaC configuration does this:
.Select Material Settings in QtPlasmaC and Use the Feedrate for that Material.
-[source,{ngc}]
+[source,ngc]
----
M190 Pn
M66 P3 L3 Q1
@@ -446,7 +440,7 @@ NOTE: Users with a very large number of entries in the QtPlasmaC Materials Table
=== Enable/Disable THC Operation:
-[source,{ngc}]
+[source,ngc]
----
M62 P2 will disable THC (synchronised with motion)
M63 P2 will enable THC (synchronised with motion)
@@ -455,7 +449,7 @@ M65 P2 will enable THC (immediately)
----
.Reduce Cutting Speeds: (e.g., for hole cutting)
-[source,{ngc}]
+[source,ngc]
----
M67 E3 Q0 would set the velocity to 100% of requested~speed
M67 E3 Q40 would set the velocity to 40% of requested~speed
@@ -464,7 +458,7 @@ M67 E3 Q100 would set the velocity to 100% of requested~speed
----
.Cutter Compensation:
-[source,{ngc}]
+[source,ngc]
----
G41.1 D#<_hal[plasmac_run.kerf-width-f]> ; for left of programmed path
G42.1 D#<_hal[plasmac_run.kerf-width-f]> for right of programmed path
@@ -499,7 +493,7 @@ Example:
On a metric machine with a NEMA23 motor with a direct drive to a 5 mm ball screw, 60 mm/s maximum velocity and 700 mm/s^2^ acceleration were determined to be safe values without loss of steps.
For this machine, set the Z axis in the INI file as follows:
-[source,{ini}]
+[source,ini]
----
[AXIS_Z]
OFFSET_AV_RATIO = 0.5
@@ -509,7 +503,7 @@ MAX_ACCELERATION = 1400
The joint associated with this axis would have the velocity and acceleration variables set as follows:
-[source,{ini}]
+[source,ini]
----
[JOINT_n]
MAX_VELOCITY = 60
@@ -566,7 +560,7 @@ Assuming it is connected to a Mesa 7I76E, connect the output to the spindle enco
Make sure you have the following lines in your INI file (assuming a Mesa 7I76E):
-[source,{hal}]
+[source,hal]
----
setp hm2_7i76e.0.encoder.00.scale -1
setp hm2_7i76e.0.encoder.00.counter-mode 1
diff --git a/docs/src/plasma/qtplasmac.adoc b/docs/src/plasma/qtplasmac.adoc
index 4d609012900..7b3b17478c8 100644
--- a/docs/src/plasma/qtplasmac.adoc
+++ b/docs/src/plasma/qtplasmac.adoc
@@ -4,11 +4,6 @@
[[cha:qtplasmac]]
= QtPlasmaC
-// Custom lang highlight
-// must come after the doc title, to work around a bug in asciidoc 8.6.6
-:ini: {basebackend@docbook:'':ini}
-:hal: {basebackend@docbook:'':hal}
-:ngc: {basebackend@docbook:'':ngc}
== Preamble
@@ -373,7 +368,7 @@ To apply a low-pass filter to the arc-voltage, the user would edit the following
For example:
-[source,{hal}]
+[source,hal]
----
setp plasmac.lowpass-frequency 100
----
@@ -542,7 +537,7 @@ QtPlasmaC has some specific __.ini file variables as follows:
These variables are mandatory.
-[source,{ini}]
+[source,ini]
----
PROGRAM_EXTENSION = .ngc,.nc,.tap G-code File (*.ngc, *.nc, *.tap)
ngc = qtplasmac_gcode
@@ -555,7 +550,7 @@ tap = qtplasmac_gcode
These variables are mandatory.
-[source,{ini}]
+[source,ini]
----
RS274NGC_STARTUP_CODE = G21 G40 G49 G80 G90 G92.1 G94 G97 M52P1
SUBROUTINE_PATH = ./:../../nc_files
@@ -573,7 +568,7 @@ SEE <> FOR RS274NGC_STARTUP_CODE INFORMATI
These variables are mandatory.
-[source,{ini}]
+[source,ini]
----
HALUI = halui (required)
HALFILE = __.hal (the machine HAL file)
@@ -591,7 +586,7 @@ The user could place custom HAL commands in the custom.hal file as this file is
This variable is mandatory.
-[source,{ini}]
+[source,ini]
----
DISPLAY = qtvcp qtplasmac (use 16:9 resolution)
= qtvcp qtplasmac_9x16 (use 9:16 resolution)
@@ -603,7 +598,7 @@ link:../gui/qtvcp.html#_ini_settings[QtVCP INI Settings]
For example, the following would start a 16:9 resolution QtPlasmaC screen in full screen mode:
-[source,{ini}]
+[source,ini]
----
DISPLAY = qtvcp -f qtplasmac
----
@@ -612,7 +607,7 @@ DISPLAY = qtvcp -f qtplasmac
This variable is mandatory.
-[source,{ini}]
+[source,ini]
----
SPINDLES = 3
----
@@ -621,7 +616,7 @@ SPINDLES = 3
These variables are mandatory.
-[source,{ini}]
+[source,ini]
----
MAX_VELOCITY = double the value in the corresponding joint
MAX_ACCELERATION = double the value in the corresponding joint
@@ -632,7 +627,7 @@ OFFSET_AV_RATIO = 0.5
These variables are mandatory.
-[source,{ini}]
+[source,ini]
----
MAX_VELOCITY = double the value in the corresponding joint
MAX_ACCELERATION = double the value in the corresponding joint
@@ -643,7 +638,7 @@ OFFSET_AV_RATIO = 0.5
These variables are mandatory.
-[source,{ini}]
+[source,ini]
----
MIN_LIMIT = just below the top of the table's slats
MAX_VELOCITY = double the value in the corresponding joint
@@ -932,7 +927,7 @@ See <> for detailed informati
It is possible to hide this tab so the conversational feature cannot be used by an operator. This may be achieved either by wiring the pin to a physical key-switch or similar or it may also be set in a HAL file using the following command:
-[source,{hal}]
+[source,hal]
----
setp qtplasmac.conv_disable 1
----
@@ -950,7 +945,7 @@ This tab is used to display configuration parameters that are modified infrequen
It is possible to hide this tab so machine settings cannot be modified by unauthorized personnel. This may be achieved either by wiring the pin to a physical key-switch or similar or it may also be set in a HAL file using the following command:
-[source,{hal}]
+[source,hal]
----
setp qtplasmac.param_disable 1
----
@@ -1139,7 +1134,7 @@ This tab is used to display GUI configuration parameters, button text, and shutd
It is possible to hide this tab so machine settings cannot be modified by unauthorized personnel. This may be achieved either by wiring the pin to a physical key-switch or similar or it may also be set in a HAL file using the following command:
-[source,{hal}]
+[source,hal]
----
setp qtplasmac.settings_disable 1
----
@@ -1286,13 +1281,13 @@ If the metric user wanted to cut the G-code file using imperial material, then t
The following stanzas are the minimum recommended codes to include in the preamble and postamble of any G-code file to be run by QtPlasmaC:
Metric:
-[source,{ngc}]
+[source,ngc]
----
G21 G40 G49 G64p0.1 G80 G90 G92.1 G94 G97
----
Imperial:
-[source,{ngc}]
+[source,ngc]
----
G20 G40 G49 G64p0.004 G80 G90 G92.1 G94 G97
----
@@ -1335,14 +1330,14 @@ QtPlasmaC is able to read a material file to load all the required cut parameter
To enable to G-code file to use the cut feed rate setting from the cut parameters use the following code in the G-code file:
-[source,{ngc}]
+[source,ngc]
----
F#<_hal[plasmac.cut-feed-rate]>
----
It is possible to use the standard G-code *F* word to set the cut feed rate as follows:
-[source,{ngc}]
+[source,ngc]
----
F 1000
----
@@ -1394,7 +1389,7 @@ WARNING: It is the responsibility of the operator to ensure that the variables a
The material file uses the following format:
-[source,{ini}]
+[source,ini]
----
[MATERIAL_NUMBER_1]
NAME = name
@@ -1424,14 +1419,14 @@ After any changes have been saved, press *Reload* in the MATERIAL section of the
For manual material handling, the user would manually select the material from the materials list in the MATERIAL section of the <> before starting the G-code program.
In addition to selecting materials with materials list in the MATERIAL section of the <>, the user could use the MDI to change materials with the following command:
-[source,{ngc}]
+[source,ngc]
----
M190 Pn
----
The following code is the minimum code necessary to have a successful cut using the manual material selection method:
-[source,{ngc}]
+[source,ngc]
----
F#<_hal[plasmac.cut-feed-rate]>
M3 $0 S1
@@ -1457,7 +1452,7 @@ For automatic material handling, the codes MUST be applied in the order shown.
If a G-code program is loaded which contains one or more material change commands then the first material will be displayed in the top header of the PREVIEW WINDOW on the <> as the program is loading.
.Minimum code necessary to have a successful cut using the automatic material selection method:
-[source,{ngc}]
+[source,ngc]
----
M190 Pn
M66 P3 L3 Q1
@@ -1539,14 +1534,14 @@ Optional parameters are:
A complete example (metric):
-[source,{ngc}]
+[source,ngc]
----
(o=0, nu=2, na=5mm Mild Steel 40A, ph=3.1, pd=0.1, ch=0.75, fr=3000, mt=5, kw=0.5, th=1, ca=40, cv=110, pe=0.1, gp=5, cm=1, jh=0, jd=0)
----
A complete example (imperial):
-[source,{ngc}]
+[source,ngc]
----
(o=0, nu=2, na=0.197" Mild Steel 40A, ph=0.122, pd=0.1, ch=0.029, fr=118, mt=0.197, kw=0.020, th=1, ca=40, cv=110, pe=0.1, gp=72, cm=1, jh=0, jd=0)
----
@@ -1625,7 +1620,7 @@ To use this feature, the user must set the laser's offset from the torch center
To modify the offsets manually, the user could edit either or both the following options in the *[LASER_OFFSET]* section of the __.prefs file:
-[source,{ini}]
+[source,ini]
----
X axis = n.n
Y axis = n.n
@@ -1635,7 +1630,7 @@ where _n.n_ is distance from the center line of the torch to the laser's cross h
Additionally, the laser can be tied to any available output to turn the laser on and off via a HAL pin with the following name:
-[source,{hal}]
+[source,hal]
----
qtplasmac.laser_on
----
@@ -1685,7 +1680,7 @@ To use this feature, the user must set the camera's offset from the torch center
To modify the offsets manually, the user could edit either or both the following axes options in the *[CAMERA_OFFSET]* section of the __.prefs file:
-[source,{ini}]
+[source,ini]
----
X axis = n.n
Y axis = n.n
@@ -1732,13 +1727,13 @@ If no G64 command is found it will insert a `G64 P0.1` command which sets the pa
For a imperial config the command will be `G64 P0.004`.
.For Metric:
-[source,{ngc}]
+[source,ngc]
----
G64 P0.1
----
.For Imperial:
-[source,{ngc}]
+[source,ngc]
----
G64 P0.004
----
@@ -1753,14 +1748,14 @@ This is also a requirement for <_.prefs file:
-[source,{ini}]
+[source,ini]
----
X axis = n.n
Y axis = n.n
@@ -1995,7 +1990,7 @@ There are two ways of enabling this feature:
. Utilize the default <> to toggle between the cut types.
. Adding the following line to the G-code program before the first cut to enable *Pierce Only* mode for the current file:
-[source,{ngc}]
+[source,ngc]
----
# = 1
----
@@ -2037,14 +2032,14 @@ This is also a requirement for <> during <> section.
.Sample code for hole cutting with reduced velocity.
-[source,{ngc}]
+[source,ngc]
----
G21 (metric)
G64 P0.005
@@ -2095,7 +2090,7 @@ It is important to thoroughly understand the difference between *Synchronized wi
Sample code:
-[source,{ngc}]
+[source,ngc]
----
G21 (metric)
G64 P0.005
@@ -2153,7 +2148,7 @@ It is possible to change this value with the following command in a G-code file:
This feature can be used in addition to setting the desired hole sensing mode via the appropriate G-code parameter by setting the <> parameter in the MATERIAL frame of the <>.
.Sample code:
-[source,{ngc}]
+[source,ngc]
----
G21 (metric)
G64 P0.005
@@ -2442,7 +2437,7 @@ After the above directions are completed, the scribe may be tested manually by i
To use the scribe from G-code:
-[source,{ngc}]
+[source,ngc]
----
...
M52 P1 (enable adaptive feed)
@@ -2489,7 +2484,7 @@ For this reason, a minimal movement at a high speed is required to be programmed
An example G-code is:
-[source,{ngc}]
+[source,ngc]
----
G21 (metric)
F99999 (high feed rate)
@@ -2690,14 +2685,14 @@ If the user wishes for the generated G-code to have each code on an individual l
This will place all codes on the same line:
-[source,{ngc}]
+[source,ngc]
----
G21 G40 G49 G64p0.1 G80 G90 G92.1 G94 G97
----
This will place each code on its own line:
-[source,{ngc}]
+[source,ngc]
----
G21\nG40\nG49\nM52P1\nG64p0.1\nG80\nG90\nG92.1\nG94\nG97
----
@@ -2863,7 +2858,7 @@ __.prefs must be edited with QtPlasmaC closed or any changes will
Additionally, it is possible for *ERROR SENT TO MACHINE LOG* to flash to get the user's attention by adding or editing the following option in the *[GUI_OPTIONS]* section of the __.prefs file:
-[source,{ini}]
+[source,ini]
----
Flash error = True
----
@@ -3044,7 +3039,7 @@ This would be done with the following code in qtplasmac_custom.qss:
Custom style sheets are enabled by setting the following option in the *[GUI_OPTIONS]* section of the __.prefs file. This option must be set to the filename of the style sheet as shown below.
-[source,{ini}]
+[source,ini]
----
Custom style = the_cool_style.qss
----
@@ -3098,7 +3093,7 @@ background of conversational shape buttons
background of active camera/laser buttons +
foreground of G-code editor cursor
|color4 (#36362e) |Alt Background |background of G-code display's active line
-|color5 (#b0b0b0) |foreground of disabled buttons
+|color5 (#b0b0b0) |Disabled |foreground of disabled buttons
|===
[[plasma:default_styling]]
@@ -3138,7 +3133,7 @@ Custom code can be added in two different ways: a user command file or a user pe
A user command file is specified in the DISPLAY section of the __.ini file and contains Python code that is processed only once during startup.
-[source,{ini}]
+[source,ini]
----
USER_COMMAND_FILE = my_custom_code.py
----
@@ -3219,7 +3214,7 @@ All __.prefs file settings for the buttons are found in the *[BUTT
The text that appears on the button is set the following way:
-[source,{ini}]
+[source,ini]
----
n Name = HAL Show
----
@@ -3228,14 +3223,14 @@ Where _n_ is the button number and *HAL Show* is the text.
For text on multiple lines, split the text with a \ (backslash):
-[source,{ini}]
+[source,ini]
----
n Name = HAL\Show
----
If an ampersand is required to be displayed as text then two consecutive ampersands are required:
-[source,{ini}]
+[source,ini]
----
n Name = PIERCE&&CUT
----
@@ -3270,7 +3265,7 @@ Buttons can run the following:
To run an external command, the command is preceded by a % character.
-[source,{ini}]
+[source,ini]
----
n Code = %halshow
----
@@ -3281,7 +3276,7 @@ n Code = %halshow
To run an external Python script, the script name is preceded by a % character and it also requires a .py extension.
It is valid to use the ~ character as a shortcut for the user's home directory.
-[source,{ini}]
+[source,ini]
----
n Code = %~/user_script.py
----
@@ -3291,14 +3286,14 @@ n Code = %~/user_script.py
To run G-code, just enter the code to be run.
-[source,{ini}]
+[source,ini]
----
n Code = G0 X100
----
To run an existing subroutine.
-[source,{ini}]
+[source,ini]
----
n Code = o call
----
@@ -3306,7 +3301,7 @@ n Code = o call
__.ini file variables can be entered by using the standard LinuxCNC G-code format.
If expressions are included, then they need to be surrounded by brackets.
-[source,{ini}]
+[source,ini]
----
n Code = G0 X#<_ini[joint_0]home> Y1
n Code = G53 G0 Z[#<_ini[axis_z]max_limit> - 1.001]
@@ -3316,7 +3311,7 @@ __.prefs file variables and also __.ini variables ca
You must put a space after each *}* if there are any following characters.
If expressions are included, then they need to be surrounded by brackets.
-[source,{ini}]
+[source,ini]
----
BUTTON_n_CODE = G0 X{LASER_OFFSET X axis} Y{LASER_OFFSET Y axis}
BUTTON_n_CODE = G0 X{JOINT_0 HOME} Y1
@@ -3326,14 +3321,14 @@ BUTTON_n_CODE = G53 G0 Z[{AXIS_Z MAX_LIMIT} - 1.001]
Multiple codes can be run by separating the codes with a "\" (backslash) character.
The exception is the special commands which are required to be a single command per button.
-[source,{ini}]
+[source,ini]
----
n Code = G0 X0 Y0 \ G1 X5 \ G1 Y5
----
External commands and G-code may be mixed on the same button.
-[source,{ini}]
+[source,ini]
----
n Code = %halshow \ g0x.5y.5 \ %halmeter
----
@@ -3347,7 +3342,7 @@ The button text will alternate with each button press and the indicator light ma
It is mandatory to specify the button code in the following order: "dual-code", the first code, the alternate button text, and the second code separated by double semicolons.
If an indicator is required then optionally add ";; true" at the end.
-[source,{ini}]
+[source,ini]
----
n Code = dual-code ;; code1 ;; name1 ;; code2 ;; true
----
@@ -3360,7 +3355,7 @@ code1 and code2 both follow the rule of the preceding code explanations, <_.prefs file:
-[source,{ini}]
+[source,ini]
----
n Code = G0 X{LASER_OFFSET X axis} Y{LASER_OFFSET Y axis} \ toggle-laser
----
@@ -3441,7 +3436,7 @@ The position of the "toggle-laser" command is not important as it is always the
The following code will allow the user to use a button to pulse a HAL bit pin for a duration of 0.5 seconds:
-[source,{ini}]
+[source,ini]
----
n Code = pulse-halpin the-hal-pin-name 0.5
----
@@ -3469,7 +3464,7 @@ If the user has "View Material" selected in the GUI SETTINGS section of the <>, Pierce and Cut (default cutting mode) or Pierce Only.
-[source,{ini}]
+[source,ini]
----
n Code = cut-type
----
@@ -3519,7 +3514,7 @@ There are three methods to return to the previous coordinates:
. Press *CYCLE RESUME* - the torch will return to the original coordinates and the program will resume.
. Press *CYCLE STOP* - the torch will return to the original coordinates and the program will abort.
-[source,{ini}]
+[source,ini]
----
n Code = change-consumables X10 Y10 F1000
----
@@ -3533,7 +3528,7 @@ HAL connections to this HAL pin needs to be specified in a postgui HAL file as t
Loading a G-code program from the directory specified by the *PROGRAM_PREFIX* variable in the __.ini file (usually ~/linuxcnc/nc_files) is possible by using the following format:
-[source,{ini}]
+[source,ini]
----
n Code = load G-code.ngc
----
@@ -3541,7 +3536,7 @@ n Code = load G-code.ngc
If the user's G-code file is located in a sub-directory of the *PROGRAM_PREFIX* directory, it would be accessed by adding the sub-directory name to the beginning of the G-code file name.
Example for a sub-directory named *plasma*:
-[source,{ini}]
+[source,ini]
----
n Code = load plasma/G-code.ngc
----
@@ -3564,7 +3559,7 @@ as will pressing 'Esc' if keyboard shortcuts are enabled in the <> feature.
-[source,{ini}]
+[source,ini]
----
n Code = single-cut
----
@@ -3610,28 +3605,28 @@ The following GUI buttons and Keyboard Shortcuts (if enabled in the <>.
-[source,{ini}]
+[source,ini]
----
n Code = manual-cut
----
@@ -3655,7 +3650,7 @@ n Code = manual-cut
This allows the showing/hiding of an offset viewing screen that displays all machine offsets.
All relative offsets can be edited and the G54 ~ G59.3 work system coordinates are able to be given custom names.
-[source,{ini}]
+[source,ini]
----
n Code = offsets-view
----
@@ -3666,7 +3661,7 @@ n Code = offsets-view
This allows the loading of the last modified file in a directory.
The directory name is optional and if omitted will default to the last directory a file was loaded from.
-[source,{ini}]
+[source,ini]
----
n Code = latest-file /home/me/linuxcnc/nc_files/qtplasmac-test
----
@@ -3677,7 +3672,7 @@ n Code = latest-file /home/me/linuxcnc/nc_files/qtplasmac-test
This allows the showing/hiding of the online HTML user manual specific to the version of LinuxCNC currently running.
Note that internet access is required for this functionality.
-[source,{ini}]
+[source,ini]
----
n Code = user-manual
----
@@ -3687,7 +3682,7 @@ n Code = user-manual
This allows the toggling between joint mode and teleop mode. The machine must be on and homed for this button to be active.
-[source,{ini}]
+[source,ini]
----
n Code = toggle-joint
----
@@ -3741,7 +3736,7 @@ By default, QtPlasmaC will remove all Z motion from a loaded G-code file and add
If the user wishes to use their table with a marker, drag knife, diamond scribe, etc. mounted in the torch holder,
QtPlasmaC has the ability to retain the Z movements when executing a program by adding the following command in a G-code file:
-[source,{ngc}]
+[source,ngc]
----
# = 1
----
@@ -3843,7 +3838,7 @@ The following HAL bit output pins are always created and can be used by either t
If the user has external buttons and/or a pendant that emulates any of the program buttons, CYCLE START, CYCLE PAUSE, or CYCLE STOP
then it is possible to hide any or all of these GUI program buttons by adding the following options to the *[GUI_OPTIONS]* section of the __.prefs file:
-[source,{ini}]
+[source,ini]
----
Hide run = True
Hide pause = True
@@ -3876,7 +3871,7 @@ There are also two HAL pins that have been provided to allow the user to tune th
The following example would set the number of valid consecutive readings required to 6:
-[source,{hal}]
+[source,hal]
----
setp plasmac.arc-ok-counts 6
----
@@ -3893,7 +3888,7 @@ It is important to note that the THC will be disabled and locked at the cutting
The following code would set a delay of 0.1 seconds:
-[source,{hal}]
+[source,hal]
----
setp plasmac.arc-lost-delay 0.1
----
@@ -3913,7 +3908,7 @@ The pin for adjusting this value is named plasmac.zero-window and the default va
The following example would set the voltage window to be displayed as 0 V from -5 V to +5 V:
-[source,{hal}]
+[source,hal]
----
setp plasmac.zero-window 5
----
@@ -3928,7 +3923,7 @@ These HAL pins are:
The following example would set the number of on cycles required to 3:
-[source,{hal}]
+[source,hal]
----
setp plasmac.void-on-cycles 3
----
@@ -3948,7 +3943,7 @@ It is not recommended to use values less than 5 mm as offset overrun may cause
The following example would set the distance from Z MAX_LIMIT to 10 mm:
-[source,{hal}]
+[source,hal]
----
setp plasmac.max-offset 10
----
@@ -3958,7 +3953,7 @@ setp plasmac.max-offset 10
By default, all tabs except the <> are disabled during automated motion.
It is possible for every tab but the <> to be enabled during automated motion by setting the following HAL pin True:
-[source,{hal}]
+[source,hal]
----
setp qtplasmac.tabs_always_enabled 1
----
@@ -4012,7 +4007,7 @@ The plasmac HAL component has a HAL pin named *plasmac.state-out* which can be u
|24 m|CONSUMABLE_CHANGE_OFF |return from consumable change coordinates
|25 m|CUT_RECOVERY_ON |cut recovery is active
|26 m|CUT_RECOVERY_OFF |cut recovery is deactivated
-|27 m|DEBUG
+|27 m|DEBUG |debug state, for testing purposes only
|===
The DEBUG state is for testing purposes only and will not normally be encountered.
@@ -4040,7 +4035,7 @@ If the PM_PORT option is not set in the __.prefs file then the wid
Example showing enabling the Hypertherm PowerMax Communications on USB0:
-[source,{ini}]
+[source,ini]
----
[POWERMAX]
Port = /dev/ttyusb0
@@ -4095,7 +4090,7 @@ A moving pierce allows the torch to move during the pierce delay period. This ha
Through the use of M159 a moving pierce can be configured.
The syntax for the M159 command is as follows: +
-[source,{ngc}]
+[source,ngc]
----
M159 Pn Qn
----
@@ -4140,13 +4135,13 @@ For example:
This means that the length of the wiggle is 4 x 3 = 12 mm. At the 18 mm/s feed rate, the pierce delay needs to be approx 0.7 seconds to support the wiggle distance at pierce height.
The G-code needed invoke this behaviour is: +
-[source,{ngc}]
+[source,ngc]
----
M159 P601 Q1
----
The G-code needed to reset to standard behaviour is: +
-[source,{ngc}]
+[source,ngc]
----
M159 P609
----
@@ -4171,7 +4166,7 @@ As with wiggle pierce it is up the CAM tooling or the user to program a ramping
Below is a sample of code to setup a ramp pierce: +
-[source,{ngc}]
+[source,ngc]
----
(o=0,kw=2, ph=4, pd=1, ch=1.5, fr=490, th=1, cv=99, pe=0.3, jh=0, jd=0)
@@ -4673,7 +4668,7 @@ G-code editor is active, MDI is active. When QtPlasmaC is shut down, the Operati
If the user wishes to prevent QtPlasmaC from changing the Operating System's autorepeat settings,
enter the following option in the *[GUI_OPTIONS]* section of the __.prefs file:
-[source,{ini}]
+[source,ini]
----
Autorepeat all == True
----
@@ -4688,7 +4683,7 @@ The user must restart QtPlasmaC to disable the autorepeat feature again.
QtPlasmaC does not currently adhere to the following stanza in the __.ini file:
-[source,{ini}]
+[source,ini]
----
NO_FORCE_HOMING = 1
----
diff --git a/docs/src/remap/remap.adoc b/docs/src/remap/remap.adoc
index c0e4972606b..6c7d28855a3 100644
--- a/docs/src/remap/remap.adoc
+++ b/docs/src/remap/remap.adoc
@@ -4,9 +4,6 @@
[[cha:remap]]
= Remap Extending G-code
-:ini: {basebackend@docbook:'':ini}
-:hal: {basebackend@docbook:'':hal}
-:ngc: {basebackend@docbook:'':ngc}
== Introduction: Extending the RS274NGC Interpreter by Remapping Codes
@@ -56,7 +53,7 @@ M- and G-codes, and O-words subroutine calls have some fairly different syntax.
O-word procedures, for example, take positional parameters with a specific syntax like so:
-[source,{ngc}]
+[source,ngc]
----
o call [1.234] [4.65]
----
@@ -132,7 +129,7 @@ In the tool table, tools numbers above 10000 are wear offsets, e.g. in the tool
Here is what you need in the INI to use them:
-[source,{ini}]
+[source,ini]
----
[RS274NGC]
REMAP=T python=index_lathe_tool_with_wear
@@ -218,7 +215,7 @@ For this reason, you need to choose an appropriate modal group for your code to
To give you an idea how the pieces fit together, let's explore a fairly minimal but complete remapped code definition.
We choose an unallocated M-code and add the following option to the INI file:
-[source,{ini}]
+[source,ini]
----
[RS274NGC]
REMAP=M400 modalgroup=10 argspec=Pq ngc=myprocedure
@@ -388,7 +385,7 @@ Assume the code is defined as
and `m400.ngc` looks as follows:
-[source,{ngc}]
+[source,ngc]
----
o sub
(P is required since it is uppercase in the argspec)
@@ -413,7 +410,7 @@ Assume the code is defined as
and `m410.ngc` looks as follows:
-[source,{ngc}]
+[source,ngc]
----
o sub
(debug, [1]=#1 [2]=#2 [3]=#3)
@@ -567,7 +564,7 @@ $ echo 'import remap' >toplevel.py
Now edit ``/home/user/``__xxx__``/``__xxx__``.ini`` and add the following:
-[source,{ini}]
+[source,ini]
----
[PYTHON]
TOPLEVEL=/home/user/xxx/python/toplevel.py
@@ -734,7 +731,7 @@ You will find that most prolog functions look very similar:
Our first iteration of the O-word procedure is unexciting - just verify we got parameters right, and signal success by returning a positive value;
steps 3-5 would eventually be covered here (see <> for the variables referring to INI file settings):
-[source,{ngc}]
+[source,ngc]
----
O sub
(debug, change: current_tool=#)
@@ -788,7 +785,7 @@ However, we don't need the HAL pin wiggling anymore - all `iocontrol` is left to
This means that the corresponding `iocontrol` pins have no function any more.
Therefore, we configure `iocontrol` to immediately acknowledge a change by configuring like so:
-[source,{hal}]
+[source,hal]
----
# loop change signals when remapping M6
net tool-change-loop iocontrol.0.tool-change iocontrol.0.tool-changed
@@ -833,7 +830,7 @@ Slightly twisting a built in would look like so (in the case of `M6`):
REMAP=M6 modalgroup=6 ngc=mychange
----
-[source,{ngc}]
+[source,ngc]
----
o sub
M6 (use built in M6 behavior)
@@ -858,7 +855,7 @@ What you could do, for instance, is:
Again, the `iocontrol` tool-prepare/tool-prepared pins would be unused and replaced by `motion.*` pins, so those would pins must be looped:
-[source,{hal}]
+[source,hal]
----
# loop prepare signals when remapping T
net tool-prep-loop iocontrol.0.tool-prepare iocontrol.0.tool-prepared
@@ -900,7 +897,7 @@ def prepare_prolog(self,**words):
The minimal ngc prepare procedure again looks like so:
-[source,{ngc}]
+[source,ngc]
----
o sub
; returning a positive value to commit:
@@ -947,7 +944,7 @@ which might be used for conditional cleanup.
The reasons are defined in nml_intf/emc.hh
-[source,{ini}]
+[source,ini]
----
EMC_ABORT_TASK_EXEC_ERROR = 1,
EMC_ABORT_AUX_ESTOP = 2,
@@ -962,7 +959,7 @@ EMC_ABORT_INTERPRETER_ERROR_MDI = 10, // interpreter failed during MDI execution
EMC_ABORT_USER = 100 // user-defined abort codes start here
----
-[source,{ini}]
+[source,ini]
----
[RS274NGC]
ON_ABORT_COMMAND=O call
@@ -970,7 +967,7 @@ ON_ABORT_COMMAND=O call
The suggested on_abort procedure would look like so (adapt to your needs):
-[source,{ngc}]
+[source,ngc]
----
o sub
@@ -1021,7 +1018,7 @@ If displaying an operator error message and stopping the current program is good
use the `(abort, `____`)` feature to terminate the handler with an error message.
Note that you can substitute numbered, named, INI and HAL parameters in the text like in this example (see also `tests/interp/abort-hot-comment/test.ngc`):
-[source,{ngc}]
+[source,ngc]
----
o100 if [..] (some error condition)
(abort, Bad Things! p42=#42 q=# INI=#<_ini[a]x> pin=#<_hal[component.pin])
@@ -1074,7 +1071,7 @@ A G-code cycle as used here is meant to behave as follows:
An example: Assume you have `G84.3` defined as remapped G-code cycle with the following INI segment
(see <> for a detailed description of +cycle_prolog+ and +cycle_epilog+):
-[source,{ini}]
+[source,ini]
----
[RS274NGC]
# A cycle with an O-word procedure: G84.3
@@ -1083,7 +1080,7 @@ REMAP=G84.3 argspec=xyzabcuvwpr prolog=cycle_prolog ngc=g843 epilog=cycle_epilog
Executing the following lines:
-[source,{ngc}]
+[source,ngc]
----
g17
(1) g84.3 x1 y2 z3 r1
@@ -1148,7 +1145,7 @@ Note that the interpreter instance is available here as `this`, so you could als
Here is an approach to use an O-word subroutine to read a preference file entry and add it as a G-code parameter.
-[source,{ngc}]
+[source,ngc]
----
(filename myofile.ngc)
o sub
@@ -1431,7 +1428,7 @@ def retrieve_param(self, **words):
return INTERP_OK
----
-[source,{ngc}]
+[source,ngc]
----
o sub
(debug, call_level=#<_call_level> myname=#)
@@ -1558,7 +1555,7 @@ def _pi(self):
return 3.1415926535
----
-[source,{ngc}]
+[source,ngc]
----
# = [2 * # * #<_pi>]
----
@@ -1648,7 +1645,7 @@ and do a more thorough investigation of the block manually in order to give bett
The suggested argspec is as follows:
-[source,{ini}]
+[source,ini]
----
REMAP=G argspec=xyzabcuvwqplr prolog=cycle_prolog ngc= epilog=cycle_epilog modalgroup=1
----
@@ -2037,7 +2034,7 @@ the interpreter must be able to predict the machine position after each line of
Let's look at a simple example program which does relative moves (G91), and assume the machine starts at x=0,y=0,z=0.
Relative moves imply that the outcome of the next move relies on the position of the previous one:
-[source,{ngc}]
+[source,ngc]
----
N10 G91
N20 G0 X10 Y-5 Z20
@@ -2056,7 +2053,7 @@ and so can parse the whole program and generate canonical operations well in adv
However, complete read ahead is only possible when the interpreter can predict the position impact for *every* line in the program in advance.
Let's look at a modified example:
-[source,{ngc}]
+[source,ngc]
----
N10 G91
N20 G0 X10 Y-5 Z20
diff --git a/docs/src/source-highlight/README b/docs/src/source-highlight/README
deleted file mode 100644
index d349c21aa23..00000000000
--- a/docs/src/source-highlight/README
+++ /dev/null
@@ -1,76 +0,0 @@
-source-highlighting EMC languages in HTML documents
-===================================================
-
-I've created GNU source-highlight language definitions for G-code and
-halcmd to highlight .hal and .ngc files in asciidoc. INI file
-highlighting works out of the box. All three need a bit of trickery to
-work cleanly for both HTML and PDF.
-
-Highlighting is for HTML output only at this point in time. To have
-PDFs highlighted, the file
-/usr/share/texmf-texlive/tex/latex/listings/lstlang1.sty needs to be
-extended to deal with NGC, HAL and INI formats, and put into the build
-directory so dblatex can find it.
-
-Highlighting halcmd, INI and NGC source in HTML is now integrated into
-the documentation build process. Tcl, Python, sh etc keep working out
-of the box.
-
-NB: source-highlight's mechanisms to find .lang and .map files is
-very inflexible which is why the complete source language definition
-directory (/usr/share/source-highlight) needs to be replicated under 'local',
-and a new lang.map generated in there (all language definitions are
-relative to this directory, and include each other).
-
-Using NGC, HAL and INI file snippets in your .txt files:
-========================================================
-Copy this to the top of your txt file:
------------------ snip ----------------
-:ini: {basebackend@docbook:'':ini}
-:hal: {basebackend@docbook:'':hal}
-:ngc: {basebackend@docbook:'':ngc}
-
-// Begin a listing of INI/HAL/NGC files like so:
-//[source,{ini}]
-//[source,{hal}]
-//[source,{ngc}]
------------------ snip ----------------
-
-Adding or changing a language definition (.lang) file
-======================================================
-
-New language: just drop .lang into this directory. The
-source-highlight configuration will be rebuilt to include this
-language. then can be used in [source,{named}] listings. You
-might need a conditional like
-
-:name: {basebackend@docbook:'':name}
-
-to prevent pdflatex formatting errors.
-
-Changing a language definition: just edit the .lang file in this directory.
-
-Overruling definitions in the source-highlight standard language definitions:
-
-Copy the .lang file from /usr/share/source-highlight into
-this directory and edit as needed. The right things should happen on
-build (including a massive initial rebuild ;-)
-
-
-Building HTML examples in the this directory
-============================================
-
-To produce PDF and HTML samples, type 'make examples' .
-
-This should produce {ini-demo,hal-demo,ngc-demo}.{pdf,html} files in
-the current directory, with proper highlighting of HTML only. PDF files
-come out properly but have no highlighting.
-
---------------------------------------------
-
-I found this tool very helpful for writing GNU source-highlight .lang
-definitions:
-
-https://srchighliteide.sourceforge.net/
-
-Michael Haberler 3/2011
diff --git a/docs/src/source-highlight/Submakefile b/docs/src/source-highlight/Submakefile
deleted file mode 100644
index af2940aa047..00000000000
--- a/docs/src/source-highlight/Submakefile
+++ /dev/null
@@ -1,63 +0,0 @@
-# The source-highlight language defs and lang.map dir
-HL_DIR=/usr/share/source-highlight
-
-LOC_HL_DIR=../docs/src/source-highlight
-LOC_LANG_MAP=$(LOC_HL_DIR)/local/lang.map
-
-# Languages for which we provide our own .lang files.
-# This includes overriding languages listed in HL_DIR.
-EMCLANGS=$(wildcard $(LOC_HL_DIR)/*.lang)
-
-# Grep arg to suppress user defined langs already in lang.map
-GREPARG= $(patsubst %, -e %,$(EMCLANGS))
-
-# Examples
-SOURCE_HIGHLIGHT_PDF_TARGETS := $(patsubst %.adoc, %.pdf, $(wildcard $(LOC_HL_DIR)/*.txt))
-SOURCE_HIGHLIGHT_HTML_TARGETS := $(patsubst %.adoc, %.html ,$(wildcard $(LOC_HL_DIR)/*.txt))
-
-# Tests with HTML output without going through asciidoc
-TEST_SRCS := hal-test.hal ini-test.ini ngc-test.ngc
-TEST_TARGETS := hal-test.html ini-test.html ngc-test.html
-
-
-TARGET=$(LOC_HL_DIR)/local/lang.map
-ASCIIDOC_ARGS=-a source_highlight_dir=local -f emc-langs-source-highlight.conf
-
-$(TARGET): $(EMCLANGS) $(HL_DIR)/lang.map
-ifeq (,$(findstring lang.map,$(wildcard $(HL_DIR)/*)))#
- $(error $(HL_DIR)/lang.map does not exist - are you sure \
- the 'source-highlight' package is installed?)
-endif
- rm -rf $(LOC_HL_DIR)/local
- cp -r $(HL_DIR) $(LOC_HL_DIR)/local
- mv $(LOC_HL_DIR)/local/lang.map $(LOC_HL_DIR)/local/lang.map.dist
- cp $(LOC_HL_DIR)/*.lang $(LOC_HL_DIR)/local
- grep -v $(GREPARG) $(LOC_HL_DIR)/local/lang.map.dist >$(TARGET)
- for i in $(EMCLANGS); do \
- echo `basename $$i .lang` '=' `basename $$i` >>$(TARGET) ; \
- done
-
-examples: $(TARGET) $(SOURCE_HIGHLIGHT_HTML_TARGETS) $(SOURCE_HIGHLIGHT_PDF_TARGETS) tests
-
-
-tests: $(TARGET) $(TEST_TARGETS)
-
-
-%.html: %.ini
- source-highlight --data-dir=local --input $< --output $@
-
-%.html: %.ngc
- source-highlight --data-dir=local --input $< --output $@
-
-%.html: %.hal
- source-highlight --data-dir=local --input $< --output $@
-
-docclean: clean-source-highlight
-clean-source-highlight:
- -rm -rf local $(SOURCE_HIGHLIGHT_HTML_TARGETS) $(SOURCE_HIGHLIGHT_PDF_TARGETS) $(TEST_TARGETS)
-
-$(SOURCE_HIGHLIGHT_PDF_TARGETS): %.pdf: %.adoc
- a2x -v -f pdf $<
-
-$(SOURCE_HIGHLIGHT_HTML_TARGETS): %.html: %.adoc
- asciidoc $(ASCIIDOC_ARGS) -v $<
diff --git a/docs/src/source-highlight/emc-langs-source-highlight.conf b/docs/src/source-highlight/emc-langs-source-highlight.conf
deleted file mode 100644
index d26473ca426..00000000000
--- a/docs/src/source-highlight/emc-langs-source-highlight.conf
+++ /dev/null
@@ -1,118 +0,0 @@
-#
-# This file is modified from /etc/asciidoc/filters/source/source-highlight-filter.conf
-# and modified to support additional languages (ngc,halcmd)
-# it is passed to asciidoc as -f option
-#
-# Michael Haberler 3/2011
-#
-#-------------
-#
-# AsciiDoc source code highlight filter configuration file.
-#
-# Documented in source-highlight-filter.txt in AsciiDoc distribution
-# ./examples/website/ directory.
-#
-# HTML outputs require GNU source-highlight
-# http://www.gnu.org/software/src-highlite/source-highlight.html
-#
-
-########################
-# Source block templates
-########################
-[source-highlight-block]
-template::[listingblock]
-
-ifdef::basebackend-html[]
-[source-highlight-block]
-
-{title}
-
-|
-
-endif::basebackend-html[]
-
-# Customized listingblock block for xhtml11 to ensure valid XHTML1.1.
-ifdef::backend-xhtml11[]
-[source-highlight-block]
-
-endif::backend-xhtml11[]
-
-# Use DocBook programlisting element.
-ifdef::backend-docbook[]
-[source-highlight-block]
-{title}
-
-|
-
-{title#}
-endif::backend-docbook[]
-
-#########################
-# Source paragraph styles
-#########################
-[paradef-default]
-ifdef::basebackend-html[]
-source-style=template="source-highlight-block",presubs=(),postsubs=("callouts",),posattrs=("style","language","src_numbered","src_tab"),filter="source-highlight -f html --data-dir={source_highlight_dir} -s {language} {src_numbered?--line-number} {src_tab?--tab={src_tab}}"
-endif::basebackend-html[]
-
-ifdef::backend-xhtml11[]
-source-style=template="source-highlight-block",presubs=(),postsubs=("callouts",),posattrs=("style","language","src_numbered","src_tab"),filter="source-highlight -f xhtml --data-dir={source_highlight_dir} -s {language} {src_numbered?--line-number} {src_tab?--tab={src_tab}}"
-endif::backend-xhtml11[]
-
-ifdef::backend-docbook[]
-source-style=template="source-highlight-block",presubs=(),postsubs=("specialcharacters","callouts"),posattrs=("style","language","src_numbered","src_tab"),filter=""
-endif::backend-docbook[]
-
-#########################
-# Source block styles
-#########################
-[blockdef-listing]
-ifdef::basebackend-html[]
-source-style=template="source-highlight-block",presubs=(),postsubs=("callouts",),posattrs=("style","language","src_numbered","src_tab"),filter="source-highlight -f html --data-dir={source_highlight_dir} -s {language} {src_numbered?--line-number} {src_tab?--tab={src_tab}}"
-endif::basebackend-html[]
-
-ifdef::backend-xhtml11[]
-source-style=template="source-highlight-block",presubs=(),postsubs=("callouts",),posattrs=("style","language","src_numbered","src_tab"),filter="source-highlight -f xhtml --data-dir={source_highlight_dir} -s {language} {src_numbered?--line-number} {src_tab?--tab={src_tab}}"
-endif::backend-xhtml11[]
-
-ifdef::backend-docbook[]
-source-style=template="source-highlight-block",presubs=(),postsubs=("specialcharacters","callouts"),posattrs=("style","language","src_numbered","src_tab")
-endif::backend-docbook[]
-
-
-#
-# DEPRECATED: Pre 8.2.7 filter definition.
-#
-
-#########################
-# Source block definition
-#########################
-[blockdef-source-highlight]
-# The old ^ delimiter is for backward compatibility, may be removed from
-# in future versions.
-delimiter=(^source~{4,}$)|(^\^{4,}$)
-template=source-highlight-block
-presubs=none
-posattrs=language,src_numbered,src_tab
-
-ifndef::backend-docbook[]
-postsubs=callouts
-# GNU Source Highlight filter.
-filter=source-highlight -f {backend-xhtml11?xhtml}{backend-html4?html}{backend-docbook?docbook} -s {language} {src_numbered?--line-number} {src_tab?--tab={src_tab}}
-endif::backend-docbook[]
-
-ifdef::backend-docbook[]
-postsubs=specialcharacters,callouts
-# In the case of DocBook just pass the listing through and let the DocBook
-# toolchain handle it.
-filter=
-endif::backend-docbook[]
-
-#
-# DEPRECATED: End
-#
diff --git a/docs/src/source-highlight/hal-demo.adoc b/docs/src/source-highlight/hal-demo.adoc
deleted file mode 100644
index f7975c103c0..00000000000
--- a/docs/src/source-highlight/hal-demo.adoc
+++ /dev/null
@@ -1,47 +0,0 @@
-:lang: en
-
-= Source Highlight Filter Test
-
-// for now, PDF's can't have highlighted ini,hal or ngc files
-// for brave souls: extend /usr/share/texmf-texlive/tex/latex/listings/lstlang1.sty
-// and make it a local copy in the current directory
-// HTML works fine
-
-// these attributes must come after the document title, to work around a bug in asciidoc 8.6.6
-:ini: {basebackend@docbook:'':ini}
-:hal: {basebackend@docbook:'':hal}
-:ngc: {basebackend@docbook:'':ngc}
-
-// begin a listing of ini/hal/ngc files like so:
-//[source,{ini}]
-//[source,{hal}]
-//[source,{ngc}]
-
-Details of the filter can be found in `./doc/source-highlight-filter.txt`.
-
-[source,{hal}]
----------------------------------------------------------------------
-# note this is for highlighting demo only - there aint any use to it
-
-loadusr -W [MYSECTION]MYMODULE
-
-loadrt conv_float_s32 names=f2s32
-addf f2s32 servo-thread
-
-# in case they were linked already
-
-unlinkp motion.digital-out-01 471.11 $(envvar)
-unlinkp motion.digital-in-01 815 $VAR
-
-net tool-prep-number-f motion.0.analog-out-00 => motion.0.analog-out-00 f2s32.in [FOO]bAR
-net tool-prep-number-f motion.0.analog-out-00 => motion.0.analog-out-00 f2s32.0.in
-net tool-prep-number-f motion.0.analog-out-00 => motion.0.analog-out-00 f2s32x.0.in
-net tool-prep-number-f motion.0.analog-out-00 => motion.0.analog-out-00 motion.0.in
-net tool-prep-number-f motion.0.analog-out-00 => motion.0.analog-out-00 motion.in
-net tool-change hal_manualtoolchange.56.change <= motion.digital-out-01
-net tool-changed hal_manualtoolchange.changed motion.digital-in-01
-net tool-prep-number hal_manualtoolchange.number f2s32.out
-
-# prepare loopback
-net tool-prepare motion.digital-out-00 motion.digital-in-00
----------------------------------------------------------------------
diff --git a/docs/src/source-highlight/hal-test.hal b/docs/src/source-highlight/hal-test.hal
deleted file mode 100644
index eb71a7b3569..00000000000
--- a/docs/src/source-highlight/hal-test.hal
+++ /dev/null
@@ -1,23 +0,0 @@
-# Note: This is for highlighting demo only - there aint any use to it
-
-loadusr -W [MYSECTION]MYMODULE
-
-loadrt conv_float_s32 names=f2s32
-addf f2s32 servo-thread
-
-# in case they were linked already
-
-unlinkp motion.digital-out-01 471.11 $(envvar)
-unlinkp motion.digital-in-01 815 $VAR
-
-net tool-prep-number-f motion.0.analog-out-00 => motion.0.analog-out-00 f2s32.in [FOO]bAR
-net tool-prep-number-f motion.0.analog-out-00 => motion.0.analog-out-00 f2s32.0.in
-net tool-prep-number-f motion.0.analog-out-00 => motion.0.analog-out-00 f2s32x.0.in
-net tool-prep-number-f motion.0.analog-out-00 => motion.0.analog-out-00 motion.0.in
-net tool-prep-number-f motion.0.analog-out-00 => motion.0.analog-out-00 motion.in
-net tool-change hal_manualtoolchange.56.change <= motion.digital-out-01
-net tool-changed hal_manualtoolchange.changed motion.digital-in-01
-net tool-prep-number hal_manualtoolchange.number f2s32.out
-
-# prepare loopback
-net tool-prepare motion.digital-out-00 motion.digital-in-00
diff --git a/docs/src/source-highlight/hal.lang b/docs/src/source-highlight/hal.lang
deleted file mode 100644
index 66972c1d86f..00000000000
--- a/docs/src/source-highlight/hal.lang
+++ /dev/null
@@ -1,28 +0,0 @@
-# language HAL (EMC Hardware Abstraction Layer)
-# as documented by halcmd(1)
-# Michael Haberler 3/2011
-# a bit unsure whether 'function' and 'label' are the appropriate styles
-
-keyword = "loadrt|unloadrt|loadusr|waitusr|unloadusr|unlinkp",
- "unload|newsig|delsig|sets|stype|gets|linkps|linksp",
- "linkpp|net|unlinkp|setp|ptype|getp|addf|delf",
- "start|stop|show|item|save|source|alias|unalias|list|lock|unlock|status|help"
-
-symbol = "=>","<=","="
-
-# a pin name has a token, followed by at least one dot, and a word
-variable = '([[:alpha:]]|[_])[[:word:]]+\.([[:word:]]|[\-\.])+'
-
-# standalone token - a signal name, component name (no dots)
-function = '([[:alpha:]]|_)([[:word:]]|\-)*'
-
-# INIFILE variable
-label = '\[[[:alpha:]][[:word:]]+\][[:alpha:]][[:word:]]+'
-
-# environment variable
-label = '\$[[:alpha:]][[:word:]]+'
-label = '\$\([[:alpha:]][[:word:]]+\)'
-
-include "number.lang"
-
-comment start "#"
\ No newline at end of file
diff --git a/docs/src/source-highlight/ini-demo.adoc b/docs/src/source-highlight/ini-demo.adoc
deleted file mode 100644
index ee5657716dc..00000000000
--- a/docs/src/source-highlight/ini-demo.adoc
+++ /dev/null
@@ -1,234 +0,0 @@
-:lang: en
-
-= Source Highlight Filter Test
-
-Details of the filter can be found in `./doc/source-highlight-filter.txt`.
-
-// For now, PDF's can't have highlighted INI, HAL or ngc files.
-// For brave souls: extend /usr/share/texmf-texlive/tex/latex/listings/lstlang1.sty
-// and make it a local copy in the current directory.
-// HTML works fine.
-
-// these attributes must come after the document title, to work around a bug in asciidoc 8.6.6
-:ini: {basebackend@docbook:'':ini}
-:hal: {basebackend@docbook:'':hal}
-:ngc: {basebackend@docbook:'':ngc}
-
-// Begin a listing of INI/HAL/ngc files like so:
-//[source,{ini}]
-//[source,{hal}]
-//[source,{ngc}]
-
-[source,{ini}]
----------------------------------------------------------------------
-
-# EMC controller parameters for a simulated machine.
-
-# General note: Comments can either be preceded with a # or ; - either is
-# acceptable, although # is in keeping with most Linux config files.
-
-# General section -------------------------------------------------------------
-[EMC]
-
-# Version of this INI file
-VERSION = $Revision$
-
-# Name of machine, for use with display, etc.
-MACHINE = EMC-HAL-SIM-AXIS
-
-# Debug level, 0 means no messages. See src/emc/nml_int/emcglb.h for others
-# DEBUG = 0x7FFFFFFF
-DEBUG = 0
-
-# Sections for display options ------------------------------------------------
-[DISPLAY]
-
-# Name of display program, e.g., axis
-DISPLAY = axis
-
-# Cycle time, in seconds, that display will sleep between polls
-CYCLE_TIME = 0.100
-
-# Path to help file
-HELP_FILE = doc/help.txt
-
-# Initial display setting for position, RELATIVE or MACHINE
-POSITION_OFFSET = RELATIVE
-
-# Initial display setting for position, COMMANDED or ACTUAL
-POSITION_FEEDBACK = ACTUAL
-
-# Highest value that will be allowed for feed override, 1.0 = 100%
-MAX_FEED_OVERRIDE = 1.2
-MAX_SPINDLE_OVERRIDE = 1.0
-# Prefix to be used
-PROGRAM_PREFIX = ../../nc_files/
-
-# Introductory graphic
-INTRO_GRAPHIC = emc2.gif
-INTRO_TIME = 5
-
-EDITOR = gedit
-
-INCREMENTS = 1 mm, .01 in, .1mm, 1 mil, .1 mil, 1/8000 in
-[FILTER]
-PROGRAM_EXTENSION = .png,.gif,.jpg Grayscale Depth Image
-PROGRAM_EXTENSION = .py Python Script
-
-png = image-to-gcode
-gif = image-to-gcode
-jpg = image-to-gcode
-py = python
-
-# Task controller section -----------------------------------------------------
-[TASK]
-
-# Name of task controller program, e.g., milltask
-TASK = milltask
-
-# Cycle time, in seconds, that task controller will sleep between polls
-CYCLE_TIME = 0.001
-
-# Part program interpreter section --------------------------------------------
-[RS274NGC]
-
-# File containing interpreter variables
-PARAMETER_FILE = sim_mm.var
-
-# Motion control section ------------------------------------------------------
-[EMCMOT]
-
-EMCMOT = motmod
-
-# Timeout for comm to emcmot, in seconds
-COMM_TIMEOUT = 1.0
-
-# BASE_PERIOD is unused in this configuration but specified in core_sim.hal
-BASE_PERIOD = 0
-# Servo task period, in nano-seconds
-SERVO_PERIOD = 1000000
-
-# Hardware Abstraction Layer section --------------------------------------------------
-[HAL]
-
-# The run script first uses halcmd to execute any HALFILE
-# files, and then to execute any individual HALCMD commands.
-#
-
-# list of HAL config files to run through halcmd
-# files are executed in the order in which they appear
-HALFILE = core_sim.hal
-HALFILE = axis_manualtoolchange.hal
-HALFILE = simulated_home.hal
-#HALFILE = gamepad.hal
-
-# list of halcmd commands to execute
-# commands are executed in the order in which they appear
-#HALCMD = save neta
-
-# Single file that is executed after the GUI has started. Only supported by
-# AXIS at this time (only AXIS creates a HAL component of its own)
-#POSTGUI_HALFILE = test_postgui.hal
-
-HALUI = halui
-
-# Trajectory planner section --------------------------------------------------
-[TRAJ]
-COORDINATES = X Y Z
-LINEAR_UNITS = mm
-ANGULAR_UNITS = degree
-DEFAULT_VELOCITY = 30.48
-MAX_VELOCITY = 53.34
-DEFAULT_ACCELERATION = 508
-MAX_ACCELERATION = 508
-POSITION_FILE = position_mm.txt
-
-# Axes sections ---------------------------------------------------------------
-[AXIS_X]
-MAX_VELOCITY = 4
-MAX_ACCELERATION = 100.0
-MIN_LIMIT = -10.0
-MAX_LIMIT = 10.0
-
-[AXIS_Y]
-MAX_VELOCITY = 4
-MAX_ACCELERATION = 100.0
-MIN_LIMIT = -10.0
-MAX_LIMIT = 10.0
-
-[AXIS_Z]
-MAX_VELOCITY = 4
-MAX_ACCELERATION = 100.0
-MIN_LIMIT = -8.0
-MAX_LIMIT = 0.12
-
-# Joint sections ---------------------------------------------------------------
-
-# First joint
-[JOINT_0]
-TYPE = LINEAR
-HOME = 0.000
-MAX_VELOCITY = 30.48
-MAX_ACCELERATION = 508
-BACKLASH = 0.000
-INPUT_SCALE = 157.48
-OUTPUT_SCALE = 1.000
-MIN_LIMIT = -254
-MAX_LIMIT = 254
-FERROR = 1.27
-MIN_FERROR = .254
-HOME_OFFSET = 0.0
-HOME_SEARCH_VEL = 127
-HOME_LATCH_VEL = 25.4
-HOME_USE_INDEX = NO
-HOME_IGNORE_LIMITS = NO
-HOME_SEQUENCE = 1
-HOME_IS_SHARED = 1
-
-# Second joint
-[JOINT_1]
-TYPE = LINEAR
-HOME = 0.000
-MAX_VELOCITY = 30.48
-MAX_ACCELERATION = 508
-BACKLASH = 0.000
-INPUT_SCALE = 157.48
-OUTPUT_SCALE = 1.000
-MIN_LIMIT = -254
-MAX_LIMIT = 254
-FERROR = 1.27
-MIN_FERROR = .254
-HOME_OFFSET = 0.0
-HOME_SEARCH_VEL = 127
-HOME_LATCH_VEL = 25.4
-HOME_USE_INDEX = NO
-HOME_IGNORE_LIMITS = NO
-HOME_SEQUENCE = 1
-
-# Third joint
-[JOINT_2]
-TYPE = LINEAR
-HOME = 0.0
-MAX_VELOCITY = 30.48
-MAX_ACCELERATION = 508
-BACKLASH = 0.000
-INPUT_SCALE = 157.48
-OUTPUT_SCALE = 1.000
-MIN_LIMIT = -50.8
-MAX_LIMIT = 101.6
-FERROR = 1.27
-MIN_FERROR = .254
-HOME_OFFSET = 25.4
-HOME_SEARCH_VEL = 127
-HOME_LATCH_VEL = 25.4
-HOME_USE_INDEX = NO
-HOME_IGNORE_LIMITS = NO
-HOME_SEQUENCE = 0
-HOME_IS_SHARED = 1
-
-# section for main IO controller parameters -----------------------------------
-[EMCIO]
-# tool table file
-TOOL_TABLE = sim_mm.tbl
-TOOL_CHANGE_POSITION = 0 0 50.8
----------------------------------------------------------------------
diff --git a/docs/src/source-highlight/ini-test.ini b/docs/src/source-highlight/ini-test.ini
deleted file mode 100644
index e0fef0c4e83..00000000000
--- a/docs/src/source-highlight/ini-test.ini
+++ /dev/null
@@ -1,195 +0,0 @@
-
-# EMC controller parameters for a simulated machine.
-
-# General note: Comments can either be preceded with a # or ; - either is
-# acceptable, although # is in keeping with most Linux config files.
-
-# General section -------------------------------------------------------------
-[EMC]
-
-# Version of this INI file
-VERSION = $Revision$
-
-# Name of machine, for use with display, etc.
-MACHINE = EMC-HAL-SIM-AXIS
-
-# Debug level, 0 means no messages. See src/emc/nml_int/emcglb.h for others
-# DEBUG = 0x7FFFFFFF
-DEBUG = 0
-
-# Sections for display options ------------------------------------------------
-[DISPLAY]
-
-# Name of display program, e.g., axis
-DISPLAY = axis
-
-# Cycle time, in seconds, that display will sleep between polls
-CYCLE_TIME = 0.100
-
-# Path to help file
-HELP_FILE = doc/help.txt
-
-# Initial display setting for position, RELATIVE or MACHINE
-POSITION_OFFSET = RELATIVE
-
-# Initial display setting for position, COMMANDED or ACTUAL
-POSITION_FEEDBACK = ACTUAL
-
-# Highest value that will be allowed for feed override, 1.0 = 100%
-MAX_FEED_OVERRIDE = 1.2
-MAX_SPINDLE_OVERRIDE = 1.0
-# Prefix to be used
-PROGRAM_PREFIX = ../../nc_files/
-
-# Introductory graphic
-INTRO_GRAPHIC = emc2.gif
-INTRO_TIME = 5
-
-EDITOR = gedit
-
-INCREMENTS = 1 mm, .01 in, .1mm, 1 mil, .1 mil, 1/8000 in
-[FILTER]
-PROGRAM_EXTENSION = .png,.gif,.jpg Grayscale Depth Image
-PROGRAM_EXTENSION = .py Python Script
-
-png = image-to-gcode
-gif = image-to-gcode
-jpg = image-to-gcode
-py = python
-
-# Task controller section -----------------------------------------------------
-[TASK]
-
-# Name of task controller program, e.g., milltask
-TASK = milltask
-
-# Cycle time, in seconds, that task controller will sleep between polls
-CYCLE_TIME = 0.001
-
-# Part program interpreter section --------------------------------------------
-[RS274NGC]
-
-# File containing interpreter variables
-PARAMETER_FILE = sim_mm.var
-
-# Motion control section ------------------------------------------------------
-[EMCMOT]
-
-EMCMOT = motmod
-
-# Timeout for comm to emcmot, in seconds
-COMM_TIMEOUT = 1.0
-
-# BASE_PERIOD is unused in this configuration but specified in core_sim.hal
-BASE_PERIOD = 0
-# Servo task period, in nano-seconds
-SERVO_PERIOD = 1000000
-
-# Hardware Abstraction Layer section --------------------------------------------------
-[HAL]
-
-# The run script first uses halcmd to execute any HALFILE
-# files, and then to execute any individual HALCMD commands.
-#
-
-# list of HAL config files to run through halcmd
-# files are executed in the order in which they appear
-HALFILE = core_sim.hal
-HALFILE = axis_manualtoolchange.hal
-HALFILE = simulated_home.hal
-#HALFILE = gamepad.hal
-
-# list of halcmd commands to execute
-# commands are executed in the order in which they appear
-#HALCMD = save neta
-
-# Single file that is executed after the GUI has started. Only supported by
-# AXIS at this time (only AXIS creates a HAL component of its own)
-#POSTGUI_HALFILE = test_postgui.hal
-
-HALUI = halui
-
-# Trajectory planner section --------------------------------------------------
-[TRAJ]
-
-AXES = 3
-COORDINATES = X Y Z
-HOME = 0 0 0
-LINEAR_UNITS = mm
-ANGULAR_UNITS = degree
-DEFAULT_LINEAR_VELOCITY = 30.48
-MAX_LINEAR_VELOCITY = 53.34
-DEFAULT_LINEAR_ACCELERATION = 508
-MAX_LINEAR_ACCELERATION = 508
-POSITION_FILE = position_mm.txt
-
-# Axes sections ---------------------------------------------------------------
-
-# First axis
-[AXIS_0]
-
-TYPE = LINEAR
-HOME = 0.000
-MAX_VELOCITY = 30.48
-MAX_ACCELERATION = 508
-BACKLASH = 0.000
-INPUT_SCALE = 157.48
-OUTPUT_SCALE = 1.000
-MIN_LIMIT = -254
-MAX_LIMIT = 254
-FERROR = 1.27
-MIN_FERROR = .254
-HOME_OFFSET = 0.0
-HOME_SEARCH_VEL = 127
-HOME_LATCH_VEL = 25.4
-HOME_USE_INDEX = NO
-HOME_IGNORE_LIMITS = NO
-HOME_SEQUENCE = 1
-
-# Second axis
-[AXIS_1]
-
-TYPE = LINEAR
-HOME = 0.000
-MAX_VELOCITY = 30.48
-MAX_ACCELERATION = 508
-BACKLASH = 0.000
-INPUT_SCALE = 157.48
-OUTPUT_SCALE = 1.000
-MIN_LIMIT = -254
-MAX_LIMIT = 254
-FERROR = 1.27
-MIN_FERROR = .254
-HOME_OFFSET = 0.0
-HOME_SEARCH_VEL = 127
-HOME_LATCH_VEL = 25.4
-HOME_USE_INDEX = NO
-HOME_IGNORE_LIMITS = NO
-HOME_SEQUENCE = 1
-
-# Third axis
-[AXIS_2]
-
-TYPE = LINEAR
-HOME = 0.0
-MAX_VELOCITY = 30.48
-MAX_ACCELERATION = 508
-BACKLASH = 0.000
-INPUT_SCALE = 157.48
-OUTPUT_SCALE = 1.000
-MIN_LIMIT = -50.8
-MAX_LIMIT = 101.6
-FERROR = 1.27
-MIN_FERROR = .254
-HOME_OFFSET = 25.4
-HOME_SEARCH_VEL = 127
-HOME_LATCH_VEL = 25.4
-HOME_USE_INDEX = NO
-HOME_IGNORE_LIMITS = NO
-HOME_SEQUENCE = 0
-
-# section for main IO controller parameters -----------------------------------
-[EMCIO]
-# tool table file
-TOOL_TABLE = sim_mm.tbl
-TOOL_CHANGE_POSITION = 0 0 50.8
diff --git a/docs/src/source-highlight/ini.lang b/docs/src/source-highlight/ini.lang
deleted file mode 100644
index ce231a51004..00000000000
--- a/docs/src/source-highlight/ini.lang
+++ /dev/null
@@ -1,15 +0,0 @@
-# simpleminded INI filter for source-highlight 2.4
-#
-comment start "#"
-section start '\[.*\]'
-
-
-state keyword start '[^="\[]+' begin
- function = "="
- variable = '.+'
-end
-
-
-include "number.lang"
-include "symbols.lang"
-include "c_string.lang"
diff --git a/docs/src/source-highlight/ngc-demo.adoc b/docs/src/source-highlight/ngc-demo.adoc
deleted file mode 100644
index 21466d38e32..00000000000
--- a/docs/src/source-highlight/ngc-demo.adoc
+++ /dev/null
@@ -1,118 +0,0 @@
-:lang: en
-
-= Source Highlight Filter Test
-
-// For now, PDF's can't have highlighted INI, HAL or NGC files.
-// For brave souls: extend /usr/share/texmf-texlive/tex/latex/listings/lstlang1.sty
-// and make it a local copy in the current directory.
-// HTML works fine.
-
-// These attributes must come after the document title, to work around a bug in asciidoc 8.6.6.
-:ini: {basebackend@docbook:'':ini}
-:hal: {basebackend@docbook:'':hal}
-:ngc: {basebackend@docbook:'':ngc}
-
-// Begin a listing of INI/HAL/NGC files like so:
-//[source,{ini}]
-//[source,{hal}]
-//[source,{ngc}]
-
-Details of the filter can be found in `./doc/source-highlight-filter.txt`.
-
-[source,{ngc}]
----------------------------------------------------------------------
-; G-code highlighting stresstest - useless otherwise
-;
-# = 0
-G0 (Rapid to start) X1 Y1
-G0 X1 Y1 (Rapid to start; but don't forget the coolant)
-M2 ; End of program.
-M66 P1 L3 Q[#]
-M66 P1 L3 Q[# + [#4711]]
-M66 P1 L3 Q#
-M66 P1 L3 Q#3
-M66 P1 L3 Q#5999
-G5 X23.5 a 19.2
-(debug, foo!)
-(Debug, some text and a substitution: #23 and some more thereafter)
-(DEBUG, #<_a_param>)
-(DEBUG, #)
-
-G0 G53 Z0 X[#19]
-G 3 0
-G00
-G01
-G 0 1
-G3 0
-G30
-G53
-G5 3
-G 5 3
-G0
-G1
-;
-; To activate, incantate as follows in the INI file:
-;
-; [RS274NGC]
-; # Remap M6 to a named O-word subroutine.
-; # The tool number currently loaded (in spindle) is passed as parameter #1
-; M6_COMMAND=ocall
-;
-;
-N4711 O sub
-;
-;
-N 0815 # = 0
-# = 0
-# = 0
-
-#4711 = 8.15
-
-; number of seconds to wait for 'tool-changed' equivalent
-# = 9999
-;
-(DEBUG, executing M6 O-word sub, tool=#1)
-;
-O if [#] EQ 0
- M5
-O endif
-
-O if [#] NE 0
- G0 G53 Z0
-O endif
-
-O if [#] NE 0
- G30
-O endif
-
-; Set analog output pin #2 to signal the pocket number.
-; iocontrol.tool-number becomes motion.analog-out-02.
-M68 E2 Q[#1]
-(DEBUG, set current tool number on motion.analog-out-02: #1)
-;
-; Assert the equivalent of the iocontrol.tool-change pin,
-; which is now motion.digital-out-01.
-M64 P1
-(DEBUG, motion.digital-out-01 set high, waiting for motion.digital-in-01)
-;
-; Wait for the equivalent of the iocontrol.tool-changed pin to go high.
-; We use motion.digital-in-01.
-;
-M66 P1 L3 Q#
-;
-O if [#5399] EQ -1
- (DEBUG, timeout waiting for motion.digital-in-01 to become true: #5399 )
-O else
- (DEBUG, motion.digital-in-01 became true: #5399)
-O endif
-
-; Retract iocontrol.tool-change equivalent.
-(DEBUG, deasserting motion.digital-out-01)
-;
-M65 P1
-;
-(DEBUG, done with M6 sub)
-;
-O endsub
-m2
----------------------------------------------------------------------
diff --git a/docs/src/source-highlight/ngc-test.ngc b/docs/src/source-highlight/ngc-test.ngc
deleted file mode 100644
index 360e27243d2..00000000000
--- a/docs/src/source-highlight/ngc-test.ngc
+++ /dev/null
@@ -1,94 +0,0 @@
-; G-code highlighting stresstest - useless otherwise
-;
-# = 0
-G0 (Rapid to start) X1 Y1
-G0 X1 Y1 (Rapid to start; but don't forget the coolant)
-M2 ; End of program.
-M66 P1 L3 Q[#]
-M66 P1 L3 Q[# + [#4711]]
-M66 P1 L3 Q#
-M66 P1 L3 Q#3
-M66 P1 L3 Q#5999
-G5 X23.5 a 19.2
-(debug, foo!)
-(Debug, some text and a substitution: #23 and some more thereafter)
-(DEBUG, #<_a_param>)
-(DEBUG, #)
-
-G0 G53 Z0 X[#19]
-G 3 0
-G00
-G01
-G 0 1
-G3 0
-G30
-G53
-G5 3
-G 5 3
-G0
-G1
-;
-; To activate, incantate as follows in the INI file:
-;
-; [RS274NGC]
-; # remap M6 to a named oword subroutine.
-; # the tool number currently loaded (in spindle) is passed as parameter #1
-; M6_COMMAND=ocall
-;
-;
-N4711 O sub
-;
-;
-N 0815 # = 0
-# = 0
-# = 0
-
-#4711 = 8.15
-
-; number of seconds to wait for 'tool-changed' equivalent
-# = 9999
-;
-(DEBUG, executing M6 O-word sub, tool=#1)
-;
-O if [#] EQ 0
- M5
-O endif
-
-O if [#] NE 0
- G0 G53 Z0
-O endif
-
-O if [#] NE 0
- G30
-O endif
-
-; Set analog output pin #2 to signal the pocket number.
-; iocontrol.tool-number becomes motion.analog-out-02.
-M68 E2 Q[#1]
-(DEBUG, set current tool number on motion.analog-out-02: #1)
-;
-; Assert the equivalent of the iocontrol.tool-change pin,
-; which is now motion.digital-out-01.
-M64 P1
-(DEBUG, motion.digital-out-01 set high, waiting for motion.digital-in-01)
-;
-; Wait for the equivalent of the iocontrol.tool-changed pin to go high.
-; We use motion.digital-in-01.
-;
-M66 P1 L3 Q#
-;
-O if [#5399] EQ -1
- (DEBUG, timeout waiting for motion.digital-in-01 to become true: #5399 )
-O else
- (DEBUG, motion.digital-in-01 became true: #5399)
-O endif
-
-; Retract iocontrol.tool-change equivalent.
-(DEBUG, deasserting motion.digital-out-01)
-;
-M65 P1
-;
-(DEBUG, done with M6 sub)
-;
-O endsub
-m2
diff --git a/docs/src/source-highlight/ngc.lang b/docs/src/source-highlight/ngc.lang
deleted file mode 100644
index 6fbd5b6cfec..00000000000
--- a/docs/src/source-highlight/ngc.lang
+++ /dev/null
@@ -1,99 +0,0 @@
-# ngc.lang - RS274 G-Code formatting (EMC flavour)
-#
-# Michael Haberler 3/2011
-#
-# Originally based on the Highlight-mode file for gedit,
-# written by Jan Van Gilsen .
-# Installation instructions can be found at:
-# http://wiki.linuxcnc.org/cgi-bin/emcinfo.pl?Highlighting_In_Gedit
-# Version : 0.3
-# Last Edit : 10Th Nov 2007, by Jan Van Gilsen
-# Comment : Added probing and rigid tapping G-codes (new in 2.2)
-# This file is used for the syntax highlighting in the HTML output of the documentation.
-
-
-environment comment delim '\([dD][eE][bB][uU][gG],' ")" begin
- variable = '#([0-9]{4})'
- variable = '#[0-9][0-9]?'
- variable = '#<([^\>]+)>'
-end
-comment delim "(" ")"
-comment start ";"
-
-ignore = 'axes'
-
-# Numbered parameters (#5xxx)
-variable = '#([0-9]{4})'
-
-# Function parameter - #1 .. #30
-variable = '#[0-9][0-9]?'
-
-# Named parameters
-variable = '#<([^\>]+)>'
-
-# Math functions and boolean logic
-function = "cos|tan|asin|acos|atan|exp|ln|sqrt|fup|fix|abs|or",
- "xor|and|mod|gt|lt|ge|le|eq|ne|exists"
- nonsensitive
-
-# Operators
-function = '(([\/|\=\+\*])|(\])|(\[))'
-
-# Line numbers
-comment = '^[n|N]([ |\t]*[0-9]){1,5}'
-
-# O-word lines and their keywords
-preproc = '[ \t]*[o|O](([ \t]*[0-9])+|<([[:alpha:]]|_)([[:word:]]|\-)+>)[ \t]*',
- '(sub|endsub|while|endwhile|if|else|endif|do|call|break|continue|return|repeat|endrepeat|elseif)'
-
-# G-codes
-vardef GCODE = '[g|G]([ \t]*[0])*[ \t]*'
-keyword = $GCODE + '1[ \t]*[07-9]'
-keyword = $GCODE + '2[ \t]*[018]'
-keyword = $GCODE + '3[ \t]*[03]'
-keyword = $GCODE + '3[ \t]*3[ \t]*.[ \t]*1'
-keyword = $GCODE + '3[ \t]*8[ \t]*.[ \t]*[2-5]*'
-keyword = $GCODE + '4[ \t]*[1-3][ \t]*.[ \t]*1'
-keyword = $GCODE + '4[ \t]*[0-39]'
-keyword = $GCODE + '5[ \t]*[2-9]'
-keyword = $GCODE + '6[ \t]*[14]'
-keyword = $GCODE + '6[ \t]*.[ \t]*1'
-keyword = $GCODE + '7[ \t]*[013467]'
-keyword = $GCODE + '7[ \t]*.[ \t]*[12]*'
-keyword = $GCODE + '8[ \t]*[0-9]'
-keyword = $GCODE + '9[ \t]*[0-46-9]'
-keyword = $GCODE + '9[ \t]*2[ \t]*.[ \t]*[1-3]'
-keyword = $GCODE + '[0-5|7-8]'
-
-
-# M-Codes
-vardef MCODE = '[m|M]([ \t]*[0])*[ \t]*'
-keyword = $MCODE + '1[ \t]*[0-9][ \t]*[1-9]'
-keyword = $MCODE + '1[ \t]*[1-9][ \t]*0'
-keyword = $MCODE + '3[ \t]*0'
-keyword = $MCODE + '5[ \t]*[0-3]'
-keyword = $MCODE + '6[ \t]*0'
-keyword = $MCODE + '6[ \t]*[0-9]'
-keyword = $MCODE + '7[ \t]*[0-3]'
-keyword = $MCODE + '9[ \t]*[8-9]'
-keyword = $MCODE + '[0-9]'
-
-# Feeds & speeds
-keyword = '[f|F|s|S]([ \t]*[0-9])*[ \t]*[.]?([ \t]*[0-9])*'
-
-# T, H
-keyword = '[t|T|h|H]([ \t]*[0-9])*'
-
-# Coordinates & arguments; trailing number/expression/params formatted separately
-atom = '[x|X|y|Y|z|Z|a|A|b|B|c|C|e|E|u|U|v|V|w|W|h|H|i|I|j|J|k|K|p|P|q|Q|r|R|l|L](\s*)?'
-
-
-# * A number consists of (1) an optional plus or minus sign,
-# followed by (2) zero to many digits, followed, possibly,
-# by (3) one decimal point,
-# followed by (4) zero to many digits - provided that there is at least one digit somewhere in the number.
-#
-# * There are two kinds of numbers: integers and decimals. An integer does not have a decimal point in it; a decimal does.
-# * Numbers may have any number of digits, subject to the limitation on line length. Only about seventeen significant figures will be retained, however (enough for all known applications).
-# * A non-zero number with no sign as the first character is assumed to be positive.
-number = '[+-]?([[:digit:]]*\.)?[[:digit:]]+'
diff --git a/docs/src/tooldatabase/tooldatabase.adoc b/docs/src/tooldatabase/tooldatabase.adoc
index eb61b621187..0fab0191b21 100644
--- a/docs/src/tooldatabase/tooldatabase.adoc
+++ b/docs/src/tooldatabase/tooldatabase.adoc
@@ -4,12 +4,6 @@
[[cha:tooldatabase]]
= Tool Database Interface
-// Custom lang highlight
-// must come after the doc title, to work around a bug in asciidoc 8.6.6
-:ini: {basebackend@docbook:'':ini}
-:hal: {basebackend@docbook:'':hal}
-:ngc: {basebackend@docbook:'':ngc}
-
Tool data is conventionally described by a tool table file specified by an inifile setting: [EMCIO]TOOL_TABLE=tooltable_filename.
A tool table file consists of a text line for each available tool describing the tool's parameters, see <>.
@@ -21,7 +15,7 @@ The tool database interface provides an alternative method for obtaining tool da
INI file settings enable the (optional) operation of a user-provided tool database program:
-[source,{ini}]
+[source,ini]
----
[EMCIO]
DB_PROGRAM = db_program [args]
diff --git a/docs/src/user/user-concepts.adoc b/docs/src/user/user-concepts.adoc
index 17388dc502a..0ca5dd88867 100644
--- a/docs/src/user/user-concepts.adoc
+++ b/docs/src/user/user-concepts.adoc
@@ -4,12 +4,6 @@
[[cha:important-user-concepts]]
= Important User Concepts
-// Custom lang highlight
-// must come after the doc title, to work around a bug in asciidoc 8.6.6
-:ini: {basebackend@docbook:'':ini}
-:hal: {basebackend@docbook:'':hal}
-:ngc: {basebackend@docbook:'':ngc}
-
(((User Concepts)))
This chapter covers important user concepts that should be understood before attempting to run a CNC machine with G-code.
@@ -27,7 +21,7 @@ Trajectory planning, in general, is the means by which LinuxCNC follows the path
A G-code program can never be fully obeyed.
For example, imagine you specify as a single-line program the following move:
-[source,{ngc}]
+[source,ngc]
----
G1 X1 F10 (G1 is linear move, X1 is the destination, F10 is the speed)
----
diff --git a/docs/src/xhtml11-head-foot.conf b/docs/src/xhtml11-head-foot.conf
deleted file mode 100644
index 4d102198e77..00000000000
--- a/docs/src/xhtml11-head-foot.conf
+++ /dev/null
@@ -1,156 +0,0 @@
-#
-# xhtml11-head-foot.conf
-#
-# Redefinition of man-page header and footer html
-#
-# From: xhtml11.conf
-# Asciidoc configuration file.
-# xhtml11 backend, generates XHTML 1.1 conformant markup.
-#
-
-[header]
-
-
-
-
-
-
-{title}
-{title%}{doctitle=}
-ifdef::linkcss[]
-
-ifdef::quirks[]
-
-endif::quirks[]
-ifeval::["{source-highlighter}"=="pygments"]
-
-endif::[]
-
-# DEPRECATED: 'pygments' attribute.
-ifdef::pygments[]
-
-ifdef::toc2[]
-
-endif::linkcss[]
-ifndef::linkcss[]
-
-endif::linkcss[]
-ifndef::disable-javascript[]
-ifdef::linkcss[]
-
-
-
-endif::linkcss[]
-ifndef::linkcss[]
-
-endif::linkcss[]
-endif::disable-javascript[]
-ifdef::asciimath[]
-ifdef::linkcss[]
-
-endif::linkcss[]
-ifndef::linkcss[]
-
-endif::linkcss[]
-endif::asciimath[]
-ifdef::latexmath[]
-ifdef::linkcss[]
-
-endif::linkcss[]
-ifndef::linkcss[]
-
-endif::linkcss[]
-endif::latexmath[]
-ifdef::mathjax[]
-
-
-endif::mathjax[]
-{docinfo1,docinfo2#}{include:{docdir}/docinfo.html}
-{docinfo,docinfo2#}{include:{docdir}/{docname}-docinfo.html}
-template::[docinfo]
-
-
-# Article, book header.
-ifndef::doctype-manpage[]
-
-ifndef::notitle[{doctitle}
]
-ifdef::doctitle[]
-
-<{email}>
-version {revnumber}{revdate?,}
-{revdate}
-
{revremark}
-endif::doctitle[]
-{toc,toc2#}{toc-placement$auto:}{template:toc}
-
-endif::doctype-manpage[]
-# Man page header.
-ifdef::doctype-manpage[]
-
-
-{doctitle}
-
-{toc,toc2#}{toc-placement$auto:}{template:toc}
-{manname-title}
-
-{manname} -
- {manpurpose}
-
-
-
-endif::doctype-manpage[]
-
-
-[footer]
-
-{disable-javascript%
}
-
-
-
diff --git a/docs/src/xhtml11-latexmath.conf b/docs/src/xhtml11-latexmath.conf
deleted file mode 100644
index 48d2a191084..00000000000
--- a/docs/src/xhtml11-latexmath.conf
+++ /dev/null
@@ -1,14 +0,0 @@
-# Cover latexmath in elements with specific class names
-[latexmath-inlinemacro]
-
-{passtext}
-
-
-[latexmath-blockmacro]
-
-
-{title}
-
-{passtext}
-
-
diff --git a/docs/src/xhtml11-links.conf b/docs/src/xhtml11-links.conf
deleted file mode 100644
index 516e6b66958..00000000000
--- a/docs/src/xhtml11-links.conf
+++ /dev/null
@@ -1,6 +0,0 @@
-# xref:id[text]
-[xref-inlinemacro]
-{0=[{target}]}
-# <>
-[xref2-inlinemacro]
-{2=[{1}]}
diff --git a/docs/src/xhtml11.conf b/docs/src/xhtml11.conf
deleted file mode 100644
index 6e8a5315352..00000000000
--- a/docs/src/xhtml11.conf
+++ /dev/null
@@ -1,27 +0,0 @@
-include::attribute-colon.conf[]
-include::xhtml11-links.conf[]
-include::xhtml11-latexmath.conf[]
-
-[table]
-
-
-{caption={table-caption} {counter:table-number}. }{title}
-{colspecs}
-{headrows#}
-{headrows}
-{headrows#}
-{footrows#}
-{footrows}
-{footrows#}
-
-{bodyrows}
-
-
-
diff --git a/scripts/inkscape b/scripts/inkscape
deleted file mode 100755
index 44cdc1c119c..00000000000
--- a/scripts/inkscape
+++ /dev/null
@@ -1,96 +0,0 @@
-#!/bin/bash
-# Shim that intercepts the inkscape calls made by dblatex during the
-# LinuxCNC docs build and forwards them to rsvg-convert. Avoids the noisy
-# Pango/GtkRecentManager warnings that headless Inkscape prints on every
-# SVG conversion (see issue #4040). Handles both dblatex syntaxes:
-# new (Inkscape 1.x): inkscape -D --export-filename=OUT IN
-# old (Inkscape 0.x): inkscape -z -D --export-png=OUT IN
-# (also --export-pdf=, --export-eps=)
-# Falls back to the real inkscape whenever the args do not match the
-# expected pattern, when rsvg-convert is missing, or when
-# LINUXCNC_DOCS_NO_RSVG is set.
-
-set -u
-
-real_inkscape() {
- # Find the next `inkscape` on PATH after stripping the directory holding
- # this shim, so we do not recurse into ourselves.
- local self_dir
- self_dir=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)
- local stripped_path
- stripped_path=$(printf '%s' "$PATH" | tr ':' '\n' \
- | grep -vxF "$self_dir" | paste -sd:)
- PATH="$stripped_path" exec inkscape "$@"
-}
-
-# Escape hatch.
-if [ -n "${LINUXCNC_DOCS_NO_RSVG:-}" ]; then
- real_inkscape "$@"
-fi
-
-# rsvg-convert must be available.
-if ! command -v rsvg-convert >/dev/null 2>&1; then
- real_inkscape "$@"
-fi
-
-# Parse the dblatex call pattern. Accepted flags:
-# -D, -d, -z, --without-gui (ignored: pose/area/legacy GUI suppression)
-# --export-filename=OUT (Inkscape 1.x)
-# --export-png=OUT (Inkscape 0.x)
-# --export-pdf=OUT (Inkscape 0.x)
-# --export-eps=OUT (Inkscape 0.x)
-# One positional input. Anything else falls through to real inkscape.
-out=""
-in=""
-fmt=""
-saw_unknown=0
-for arg in "$@"; do
- case "$arg" in
- -D|-d|-z|--without-gui)
- ;;
- --export-filename=*)
- out="${arg#--export-filename=}"
- ;;
- --export-png=*)
- out="${arg#--export-png=}"
- fmt=png
- ;;
- --export-pdf=*)
- out="${arg#--export-pdf=}"
- fmt=pdf
- ;;
- --export-eps=*)
- out="${arg#--export-eps=}"
- fmt=eps
- ;;
- -*)
- saw_unknown=1
- ;;
- *)
- if [ -n "$in" ]; then
- saw_unknown=1
- else
- in="$arg"
- fi
- ;;
- esac
-done
-
-if [ "$saw_unknown" = 1 ] || [ -z "$in" ] || [ -z "$out" ]; then
- real_inkscape "$@"
-fi
-
-# If format not yet set (new-syntax --export-filename), infer from extension.
-if [ -z "$fmt" ]; then
- case "$out" in
- *.pdf) fmt=pdf ;;
- *.png) fmt=png ;;
- *.eps) fmt=eps ;;
- *.svg) fmt=svg ;;
- *) real_inkscape "$@" ;;
- esac
-fi
-
-if ! rsvg-convert -f "$fmt" -o "$out" "$in"; then
- real_inkscape "$@"
-fi
diff --git a/src/Makefile.inc.in b/src/Makefile.inc.in
index 223062d996a..848adcbd285 100644
--- a/src/Makefile.inc.in
+++ b/src/Makefile.inc.in
@@ -127,10 +127,11 @@ BUILD_DOCS = @BUILD_DOCS@
BUILD_DOCS_PDF = @BUILD_DOCS_PDF@
BUILD_DOCS_HTML = @BUILD_DOCS_HTML@
BUILD_DOCS_TRANSLATED = @BUILD_DOCS_TRANSLATED@
+NOTOCJK_REGULAR_TTC = @NOTOCJK_REGULAR_TTC@
+NOTOCJK_BOLD_TTC = @NOTOCJK_BOLD_TTC@
PYTHON = @PYTHON@
TCLSH = @TCLSH@
EMC2_TCL_LIB_DIR = @EMC2_TCL_LIB_DIR@
-A2X_LATEX_ENCODING = @A2X_LATEX_ENCODING@
HAVE_LIBMODBUS3 = @HAVE_LIBMODBUS3@
LIBMODBUS_LIBS = @LIBMODBUS_LIBS@
diff --git a/src/configure.ac b/src/configure.ac
index f294f68b895..3d00a98eb54 100644
--- a/src/configure.ac
+++ b/src/configure.ac
@@ -1061,130 +1061,167 @@ AC_ARG_ENABLE(build-documentation,
AC_MSG_RESULT([no])
])
-# Programs required for building all documentation
+# Programs required for building documentation. Missing PDF-only
+# tools or an invalid CJK font are a hard error whenever PDF was
+# requested (BUILD_DOCS_PDF=yes -- i.e. anything except
+# --enable-build-documentation=html). =html itself warn-and-disables
+# only the missing PDF tools; users who want PDF best-effort can pass
+# =html and rebuild after installing the missing tools.
if ( test "$BUILD_DOCS" = "yes" ) ; then
- AC_PATH_PROG(ASCIIDOC,asciidoc,"none")
- if ( test "none" = "$ASCIIDOC" ) ; then
- AC_MSG_WARN([no AsciiDoc, documentation cannot be built])
- BUILD_DOCS=no
- fi
-
- AC_PATH_PROG(A2X,a2x,"none")
- if ( test "none" = "$A2X" ) ; then
- AC_MSG_WARN([no a2x, documentation cannot be built])
- BUILD_DOCS=no
- fi
-
- AC_MSG_CHECKING([whether to specify latex.encoding])
- temp_asciidoc=`mktemp --suffix=.txt`
- cat > $temp_asciidoc < /dev/null 2>&1;
- then
- A2X_LATEX_ENCODING="-P latex.encoding=utf8"
- AC_MSG_RESULT(yes)
- else
- A2X_LATEX_ENCODING=""
- AC_MSG_RESULT(no)
- fi
- AC_SUBST(A2X_LATEX_ENCODING)
- rm -f $temp_asciidoc ${temp_asciidoc%.txt}.pdf
-
- AC_PATH_PROG(DBLATEX,dblatex,"none")
- if ( test "none" = "$DBLATEX" ) ; then
- AC_MSG_WARN([no dblatex, documentation cannot be built])
+ AC_PATH_PROG(ASCIIDOCTOR,asciidoctor,"none")
+ if ( test "none" = "$ASCIIDOCTOR" ) ; then
+ AC_MSG_WARN([no asciidoctor, documentation cannot be built
+install with "sudo apt-get install asciidoctor"])
BUILD_DOCS=no
+ BUILD_DOCS_PDF=no
+ BUILD_DOCS_HTML=no
fi
if ( test "$BUILD_DOCS" = "yes" ) ; then
- AC_MSG_CHECKING([dblatex version])
- set -- `dblatex --version`; DBLATEX_VER=$3
- set -- `echo $DBLATEX_VER | sed 's/[[.-]]/ /g'`
- micro=`echo $3 | sed 's/\([[0-9]]*\).*/\1/g'`
-
- if test $1 -eq 0 -a \( $2 -lt 2 -o \( $2 -eq 2 -a ${micro:-0} -lt 12 \) \); then
- AC_MSG_WARN([dblatex version $DBLATEX_VER less than 0.2.12.
-Documentation cannot be built.])
- BUILD_DOCS=no
- else
- AC_MSG_RESULT([$DBLATEX_VER])
- fi
- fi
-
- if ( test "$BUILD_DOCS" = "yes" ) ; then
- AC_PATH_PROG(SOURCE_HIGHLIGHT,source-highlight,"none")
- if ( test "none" = "$SOURCE_HIGHLIGHT" ) ; then
- AC_MSG_WARN([no source-highlight, documentation cannot be built])
+ AC_PATH_PROG(GS,gs,"none")
+ if ( test "none" = "$GS" ) ; then
+ AC_MSG_WARN([no gs, documentation cannot be built
+install with "sudo apt-get install ghostscript"])
BUILD_DOCS=no
+ BUILD_DOCS_PDF=no
+ BUILD_DOCS_HTML=no
fi
fi
if ( test "$BUILD_DOCS" = "yes" ) ; then
- AC_PATH_PROG(CONVERT,convert,"none")
- if ( test "none" = "$CONVERT" ) ; then
- AC_MSG_WARN([no convert, documentation cannot be built])
+ AC_PATH_PROG(RSVG_CONVERT,rsvg-convert,"none")
+ if ( test "none" = "$RSVG_CONVERT" ) ; then
+ AC_MSG_WARN([no rsvg-convert, documentation cannot be built
+install with "sudo apt-get install librsvg2-bin"])
BUILD_DOCS=no
+ BUILD_DOCS_PDF=no
+ BUILD_DOCS_HTML=no
fi
fi
+ # Rouge is required by the custom rouge_hal / rouge_ngc / rouge_ini
+ # extensions loaded by every asciidoctor invocation; without it the
+ # build dies with "cannot load such file -- rouge" deep in the make
+ # log (reported by bertho on Fedora 43 where ruby-rouge wasn't a
+ # transitive dep of asciidoctor).
if ( test "$BUILD_DOCS" = "yes" ) ; then
- AC_PATH_PROG(GS,gs,"none")
- if ( test "none" = "$GS" ) ; then
- AC_MSG_WARN([no gs, documentation cannot be built])
+ AC_MSG_CHECKING([for ruby rouge gem])
+ if ruby -e 'require "rouge"' 2>/dev/null ; then
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no])
+ AC_MSG_WARN([no ruby rouge, documentation cannot be built
+install with "sudo apt-get install ruby-rouge" on Debian / Ubuntu,
+"sudo dnf install rubygem-rouge" on Fedora, or "gem install rouge"])
BUILD_DOCS=no
+ BUILD_DOCS_PDF=no
+ BUILD_DOCS_HTML=no
fi
fi
fi
# Programs required only for building the PDF documentation
if ( test "$BUILD_DOCS_PDF" = "yes" ) ; then
- AC_PATH_PROG(PDFLATEX,pdflatex,"none")
- if ( test "none" = "$PDFLATEX" ) ; then
- AC_MSG_WARN([no pdflatex, PDF documentation cannot be built])
- BUILD_DOCS=no
+ AC_PATH_PROG(ASCIIDOCTOR_PDF,asciidoctor-pdf,"none")
+ if ( test "none" = "$ASCIIDOCTOR_PDF" ) ; then
+ AC_MSG_ERROR([no asciidoctor-pdf, PDF documentation cannot be built
+install with "sudo apt-get install asciidoctor-pdf" (Debian sid/trixie)
+or "sudo apt-get install ruby-asciidoctor-pdf" (Debian bookworm)])
fi
-fi
-# Programs required only for building the HTML documentation
-if ( test "$BUILD_DOCS_HTML" = "yes" ) ; then
- AC_PATH_PROG(XSLTPROC,xsltproc,"none")
- if ( test "none" = "$XSLTPROC" ) ; then
- AC_MSG_WARN([no xsltproc, HTML documentation cannot be built])
- BUILD_DOCS=no
+ # fontTools (python3-fonttools) is used by otf2ttf.py to convert the
+ # CFF/OTF NotoSerifCJK .ttc into a TrueType the prawn PDF engine can
+ # embed.
+ if ( test "$BUILD_DOCS_PDF" = "yes" ) ; then
+ AC_MSG_CHECKING([for python3 fontTools module])
+ if python3 -c 'import fontTools' 2>/dev/null ; then
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no])
+ AC_MSG_WARN([no python3 fontTools, PDF documentation cannot be built
+install with "sudo apt-get install python3-fonttools"])
+ BUILD_DOCS_PDF=no
+ fi
fi
- AC_PATH_PROG(DVIPNG,dvipng,"none")
- if ( test "none" = "$DVIPNG" ) ; then
- AC_MSG_WARN([no dvipng, HTML documentation cannot be built])
- BUILD_DOCS=no
+ if ( test "$BUILD_DOCS_PDF" = "yes" ) ; then
+ # NotoSerifCJK is the fallback font that asciidoctor-pdf reaches
+ # for when a glyph (zh_CN, Japanese, Korean) is missing from the
+ # base text font. We need the .ttc TrueType Collection, because
+ # otf2ttf.py picks index 2 (SC) out of it. Probe via fontconfig
+ # first, then load through python+fontTools to validate, because
+ # some distros ship a file named .ttc that is not actually a
+ # TrueType Collection (otf2ttf would die mid-build on it). Probe
+ # failure warn-and-disables PDF on the default =Y path so other
+ # docs still build; explicit =pdf is treated as a hard error.
+ cjk_disable_pdf_reason=""
+ AC_MSG_CHECKING([for NotoSerifCJK Regular .ttc])
+ NOTOCJK_REGULAR_TTC="`fc-match --format='%{file}' 'Noto Serif CJK SC:style=Regular' 2>/dev/null`"
+ case "$NOTOCJK_REGULAR_TTC" in
+ *.ttc) test -r "$NOTOCJK_REGULAR_TTC" || NOTOCJK_REGULAR_TTC="" ;;
+ *) NOTOCJK_REGULAR_TTC="" ;;
+ esac
+ if test -z "$NOTOCJK_REGULAR_TTC" ; then
+ AC_MSG_RESULT([no])
+ cjk_disable_pdf_reason="no NotoSerifCJK Regular TrueType Collection found via fc-match"
+ else
+ AC_MSG_RESULT([$NOTOCJK_REGULAR_TTC])
fi
- AC_MSG_CHECKING([for HTML support in groff])
- if ! groff -Thtml < /dev/null > /dev/null 2>&1 ; then
- AC_MSG_WARN([no groff -Thtml, HTML documentation cannot be built])
- BUILD_DOCS=no
- else
- AC_MSG_RESULT(yes)
+ if test -z "$cjk_disable_pdf_reason" ; then
+ AC_MSG_CHECKING([for NotoSerifCJK Bold .ttc])
+ NOTOCJK_BOLD_TTC="`fc-match --format='%{file}' 'Noto Serif CJK SC:style=Bold' 2>/dev/null`"
+ case "$NOTOCJK_BOLD_TTC" in
+ *.ttc) test -r "$NOTOCJK_BOLD_TTC" || NOTOCJK_BOLD_TTC="" ;;
+ *) NOTOCJK_BOLD_TTC="" ;;
+ esac
+ if test -z "$NOTOCJK_BOLD_TTC" ; then
+ AC_MSG_RESULT([no])
+ cjk_disable_pdf_reason="no NotoSerifCJK Bold TrueType Collection found via fc-match"
+ else
+ AC_MSG_RESULT([$NOTOCJK_BOLD_TTC])
+ fi
+ fi
+
+ if test -z "$cjk_disable_pdf_reason" ; then
+ AC_MSG_CHECKING([that NotoSerifCJK .ttc loads as a TrueType Collection])
+ if python3 -c 'import sys; from fontTools.ttLib import TTCollection; TTCollection(sys.argv[[1]]).fonts[[2]]; TTCollection(sys.argv[[2]]).fonts[[2]]' "$NOTOCJK_REGULAR_TTC" "$NOTOCJK_BOLD_TTC" 2>/dev/null ; then
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no])
+ cjk_disable_pdf_reason="NotoSerifCJK file at $NOTOCJK_REGULAR_TTC is not a valid TrueType Collection (index 2 unavailable)"
+ fi
+ fi
+
+ if test -n "$cjk_disable_pdf_reason" ; then
+ AC_MSG_ERROR([$cjk_disable_pdf_reason, PDF documentation cannot be built
+install with "sudo apt-get install fonts-noto-cjk" on Debian / Ubuntu,
+"sudo pacman -S noto-fonts-cjk" on Arch, or
+"sudo dnf install google-noto-sans-cjk-fonts google-noto-serif-cjk-fonts" on Fedora.
+fontconfig also picks up user installs under ~/.fonts; run "fc-cache -f" after copying the .ttc there.
+For a fully custom path, set the var directly:
+ ./configure NOTOCJK_REGULAR_TTC=/path/to/NotoSerifCJK-Regular.ttc \
+ NOTOCJK_BOLD_TTC=/path/to/NotoSerifCJK-Bold.ttc])
fi
+ AC_SUBST(NOTOCJK_REGULAR_TTC)
+ AC_SUBST(NOTOCJK_BOLD_TTC)
+ fi
+fi
+# Programs required only for building the HTML documentation
+if ( test "$BUILD_DOCS_HTML" = "yes" ) ; then
AC_PATH_PROG(CHECKLINK,checklink,"none")
if ( test "none" = "$CHECKLINK" ) ; then
- AC_MSG_WARN([no checklink, HTML documentation cannot be built
+ AC_MSG_WARN([no checklink, HTML documentation cannot be built
install with "sudo apt-get install w3c-linkchecker"])
- BUILD_DOCS=no
+ BUILD_DOCS_HTML=no
fi
fi
AC_ARG_ENABLE(build-documentation-translation,
AS_HELP_STRING(
- [--disable-build-documentation-translation],
- [Disable building documentation in languages other than English.]
+ [--enable-build-documentation-translation],
+ [Also build translated documentation (po4a, ~5 min extra wall time). Default off.]
),
[
case "$enableval" in
@@ -1200,37 +1237,26 @@ AC_ARG_ENABLE(build-documentation-translation,
BUILD_DOCS_TRANSLATED_EXPLICIT=not_set
])
-if ( test "$BUILD_DOCS" = "yes" && test "$BUILD_DOCS_TRANSLATED_EXPLICIT" != "no") ; then
+BUILD_DOCS_TRANSLATED=no
+if ( test "$BUILD_DOCS" = "yes" && test "$BUILD_DOCS_TRANSLATED_EXPLICIT" = "yes") ; then
AC_PATH_PROG(PO4A, po4a, "none")
- BUILD_DOCS_TRANSLATED=yes
if test $PO4A = "none"
then
- if test "$BUILD_DOCS_TRANSLATED_EXPLICIT" = "not_set"
- then
- AC_MSG_WARN([po4a not found, not building translated docs])
- else
- AC_MSG_ERROR([po4a not found, not building translated docs])
- fi
- BUILD_DOCS_TRANSLATED=no
+ AC_MSG_ERROR([po4a not found, cannot build translated docs])
else
- # Version 0.35 support asciidoc without tables
- # Version 0.56 support the tablecells asciidoc option
- # Version 0.62 correctly write UTF-8 into translated adocs
- # Version 0.65 support grouping several doc files into different POTs
- # Version 0.66 handle empty table cells in asciidoc
- # Version 0.67 handle enforced linbreaks
+ # Version 0.67 handles enforced linebreaks correctly
V=$(po4a --version| awk '/po4a version/ {print $3}')
if dpkg --compare-versions 0.67 gt "$V"; then
- if test "$BUILD_DOCS_TRANSLATED_EXPLICIT" = "not_set"
- then
- AC_MSG_WARN([po4a version too old, need version 0.67 or newer, not building translated docs])
- else
- AC_MSG_ERROR([po4a version too old, need version 0.67 or newer, not building translated docs])
- fi
- BUILD_DOCS_TRANSLATED=no
+ AC_MSG_ERROR([po4a version too old, need version 0.67 or newer to build translated docs])
fi
+ BUILD_DOCS_TRANSLATED=yes
fi
fi
+if test "$BUILD_DOCS" = "yes" && test "$BUILD_DOCS_TRANSLATED" = "no" ; then
+ DOC_LANGS=$(sed -e's/#.*//' "$srcdir/../docs/po4a.cfg" 2>/dev/null | grep '^\[po4a_langs\]' | cut -d" " -f2-)
+ DOC_LANGS=$(echo $DOC_LANGS | tr ' ' '/')
+ AC_MSG_NOTICE([documentation will be built for English only; pass --enable-build-documentation-translation to also build ${DOC_LANGS:-translations}])
+fi
AC_SUBST(BUILD_DOCS)
AC_SUBST(BUILD_DOCS_PDF)
AC_SUBST(BUILD_DOCS_HTML)
diff --git a/src/hal/components/lut5.comp b/src/hal/components/lut5.comp
index 7ba0aa3d066..755fd763134 100644
--- a/src/hal/components/lut5.comp
+++ b/src/hal/components/lut5.comp
@@ -46,7 +46,7 @@ be *FALSE*.
^h|Bit 2
^h|Bit 1
^h|Bit 0
-2+^h|Weight
+^h|Weight
|0|0|0|0|0|0x00000001
|0|0|0|0|1|0x00000002