Commit 46b805c2 authored by Filippo Rusconi's avatar Filippo Rusconi
Browse files

Import from mineXpert2 the user manual DocBook-based infrastructure.

parent 36b6ed98
......@@ -314,9 +314,6 @@ if(NOT APPLE)
endif()
install(PROGRAMS ${CMAKE_BINARY_DIR}/src/xtpcpp DESTINATION bin)
configure_file(${CMAKE_SOURCE_DIR}/src/resources/xtandempipeline_icon.svg ${CMAKE_BINARY_DIR}/src/resources/xtpcpp.svg COPYONLY)
install(FILES ${CMAKE_BINARY_DIR}/src/resources/xtpcpp.svg DESTINATION share/icons/hicolor/scalable/apps)
## Doc config file for MAIN-@TARGET@-user-manual.xml
## The following settings are only applied when building from this DC file.
## To customize DAPS's global configuration, use the configuration file
## ~/.config/daps/dapsrc (you may have to create that file initially).
## For documentation of the settings below, see /etc/daps/config .
## MAIN file of the document, mandatory
## The MAIN file is the central DocBook XML file of your document that
## references all other DocBook XML files that may be part of your document.
## By convention, its name starts with "MAIN.".
MAIN="MAIN-user-manual.xml"
##--------------------
## Root ID, optional
## If MAIN contains a set with several books and/or articles of which you only
## want to build specific ones only, use a separate DC file for each book/
## article and set ROOTID to the id/xml:id of the respective <book>/<article>
## element of the document.
## For more information about sets, see
## https://tdg.docbook.org/tdg/5.1/set (for DocBook 5.1).
ROOTID=""
##-------------------
## Custom stylesheets, optional
## (if not defined, the DocBook stylesheets will be used)
STYLEROOT="xslt"
#FALLBACK_STYLEROOT=""
#HTML_CSS=""
#EPUB_CSS=""
##---------------------
## Profiling parameters, optional
## For elements with arch="...", condition="...", os="..." and vendor="..."
## For information about profiling, see
## http://www.sagehill.net/docbookxsl/Profiling.html .
#PROFARCH=""
#PROFCONDITION=""
#PROFOS=""
#PROFVENDOR=""
FOP_CMD_OPTIONS="-c @FOP_XCONF_DIR@/fop.xconf"
......@@ -7,7 +7,7 @@ set(CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES "/opt/local/include")
set(CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES "/opt/local/lib")
# This is used throughout all the build system files
set(TARGET Xtp++)
set(TARGET XtpCpp)
# Now that we know what is the TARGET (in the toolchain files above,
# we can compute the lowercase TARGET (used for string replacements in
......
......@@ -6,6 +6,10 @@ message("MXE (M cross environment) https://mxe.cc/")
message("Please run the configuration like this:")
message("x86_64-w64-mingw32.shared-cmake -DMXE=1 -G \"Unix Makefiles\" -DCMAKE_BUILD_TYPE=Release ../../development")
# The TARGET changes according to the plaform
# For example, it changes to XtpCpp for macOS.
SET(TARGET xtpcpp)
set(CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES /win64/mxe/usr/x86_64-w64-mingw32.shared/include)
set(CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES /win64/mxe/usr/x86_64-w64-mingw32.shared/include)
......
......@@ -5,6 +5,20 @@ message("cmake -G \"Unix Makefiles\" -DCMAKE_BUILD_TYPE=Debug ../development")
set(CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES /usr/include)
set(CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES /usr/include)
# The TARGET changes according to the plaform
# For example, it changes to XtpCpp for macOS.
# Here we want it to be lowercase, UNIX-culture,
# and it is needed for the user manual build.
SET(TARGET xtpcpp)
## Install directories
if(NOT CMAKE_INSTALL_PREFIX)
set(CMAKE_INSTALL_PREFIX /usr)
endif()
set(BIN_DIR ${CMAKE_INSTALL_PREFIX}/bin)
set(DOC_DIR ${CMAKE_INSTALL_PREFIX}/share/doc/${TARGET})
find_package(QCustomPlot REQUIRED)
# Per instructions of the lib author:
......
......@@ -6,6 +6,10 @@ message("cmake -G \"Unix Makefiles\" -DCMAKE_BUILD_TYPE=Release ../development")
set(CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES "c:/msys64/mingw64/include")
set(CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES "c:/msys64/mingw64/bin")
# The TARGET changes according to the plaform
# For example, it changes to XtpCpp for macOS.
SET(TARGET xtpcpp)
# We do not build the tests under Win10.
set (MAKE_TEST 0)
......
<?xml-model href="http://docbook.org/xml/5.0CR3/rng/docbookxi.rng"
schematypens="http://relaxng.org/ns/structure/1.0"?>
<!--
<?xml-model href="http://docbook.org/xml/5.1CR3/rng/docbook.rng"
schematypens="http://purl.oclc.org/dsdl/schematron"?>
-->
<book xmlns="http://docbook.org/ns/docbook" version="5.0"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xi="http://www.w3.org/2001/XInclude"
xml:id="book.template"
xml:lang="en">
<xi:include href="book-info.xml" xmlns:xi="http://www.w3.org/2001/XInclude">
</xi:include>
<dedication>
<para>To all the admirable people acting in the <emphasis><quote>Free
Software Movement</quote></emphasis> for a better and more ethical
computing world</para>
<para>To all the readers who helped me with this manual.</para>
</dedication>
<xi:include href="preface.xml" xmlns:xi="http://www.w3.org/2001/XInclude">
</xi:include>
<xi:include href="generalities.xml" xmlns:xi="http://www.w3.org/2001/XInclude">
</xi:include>
<xi:include href="graphical-user-interface.xml" xmlns:xi="http://www.w3.org/2001/XInclude">
</xi:include>
<xi:include href="mass-data-integrations.xml" xmlns:xi="http://www.w3.org/2001/XInclude">
</xi:include>
<xi:include href="mass-spectral-deconvolutions.xml" xmlns:xi="http://www.w3.org/2001/XInclude">
</xi:include>
<xi:include href="isotopic-cluster-computations.xml" xmlns:xi="http://www.w3.org/2001/XInclude">
</xi:include>
<xi:include href="processing-flows.xml" xmlns:xi="http://www.w3.org/2001/XInclude">
</xi:include>
<xi:include href="record-data-mining-discoveries.xml" xmlns:xi="http://www.w3.org/2001/XInclude">
</xi:include>
<xi:include href="gpl-3.0.xml" xmlns:xi="http://www.w3.org/2001/XInclude">
</xi:include>
<xi:include href="colophon.xml" xmlns:xi="http://www.w3.org/2001/XInclude">
</xi:include>
</book>
......@@ -7,8 +7,8 @@ Build-Depends: debhelper-compat (= 12),
dpkg-dev (>= 1.18.25),
cmake (>= 3.12),
qtbase5-dev,
libpappsomspp-dev (>= 0.8.24),
libpappsomspp-widget-dev (>= 0.8.24),
libpappsomspp-dev (>= 0.8.23),
libpappsomspp-widget-dev (>= 0.8.23),
libodsstream-dev,
libqt5svg5-dev,
libqcustomplot-dev,
......
......@@ -29,6 +29,14 @@ if(UNIX AND NOT APPLE)
endif()
#############################################################
###########################
# BUILD OF THE USER MANUALS
if(BUILD_USER_MANUAL)
add_subdirectory(user-manual)
endif()
message("")
message(STATUS "${BoldGreen}Finished configuration of the doc material.${ColourReset}")
......
if(BUILD_USER_MANUAL)
message("")
message(STATUS "${BoldGreen}Starting configuration for the user manual for ${CMAKE_PROJECT_NAME} ${ColourReset}")
message("")
# The version of the program needs to be set in the user manual front
# matter.
CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/CMakeStuff/user-manual-version-entity.ent.cmake.in
${CMAKE_SOURCE_DIR}/doc/user-manual/xml/user-manual-version-entity.ent @ONLY)
# The location of the main user manual config file (set fop.xconf file
# location)
set(FOP_XCONF_DIR ${CMAKE_SOURCE_DIR}/doc/user-manual)
CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/CMakeStuff/DC-user-manual.cmake.in
${CMAKE_SOURCE_DIR}/doc/user-manual/DC-user-manual @ONLY)
# Command:
# make xtpcpp-doc
# Makes use of the local Makefile file.
# Will generate HTML and PDF documentation in the build directory
# Note that TARGET needs to be lowercase. Since we build the documentation
# only on UNIX, that target is set in
# CMakeStuff/toolchains/unix-toolchain.cmake.
add_custom_target(${TARGET}-doc ALL
COMMAND make all
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
COMMENT "DocBook-based user manual documentation for ${CMAKE_PROJECT_NAME}")
install(FILES
${CMAKE_CURRENT_SOURCE_DIR}/build/user-manual/${TARGET}-doc.pdf
DESTINATION ${DOC_DIR})
install(DIRECTORY
${CMAKE_CURRENT_SOURCE_DIR}/build/user-manual/html/user-manual/
DESTINATION ${DOC_DIR}/html)
message("")
message(STATUS "${BoldGreen}Finished configuring the ${CMAKE_PROJECT_NAME} user manual.${ColourReset}")
message("")
else()
message(STATUS "User manual build skipped")
endif()
## Doc config file for MAIN-xtpcpp-user-manual.xml
## The following settings are only applied when building from this DC file.
## To customize DAPS's global configuration, use the configuration file
## ~/.config/daps/dapsrc (you may have to create that file initially).
## For documentation of the settings below, see /etc/daps/config .
## MAIN file of the document, mandatory
## The MAIN file is the central DocBook XML file of your document that
## references all other DocBook XML files that may be part of your document.
## By convention, its name starts with "MAIN.".
MAIN="MAIN-user-manual.xml"
##--------------------
## Root ID, optional
## If MAIN contains a set with several books and/or articles of which you only
## want to build specific ones only, use a separate DC file for each book/
## article and set ROOTID to the id/xml:id of the respective <book>/<article>
## element of the document.
## For more information about sets, see
## https://tdg.docbook.org/tdg/5.1/set (for DocBook 5.1).
ROOTID=""
##-------------------
## Custom stylesheets, optional
## (if not defined, the DocBook stylesheets will be used)
STYLEROOT="xslt"
#FALLBACK_STYLEROOT=""
#HTML_CSS=""
#EPUB_CSS=""
##---------------------
## Profiling parameters, optional
## For elements with arch="...", condition="...", os="..." and vendor="..."
## For information about profiling, see
## http://www.sagehill.net/docbookxsl/Profiling.html .
#PROFARCH=""
#PROFCONDITION=""
#PROFOS=""
#PROFVENDOR=""
FOP_CMD_OPTIONS="-c /home/rusconi/devel/xtpcpp/development/doc/user-manual/fop.xconf"
project=xtpcpp
topDir=$(CURDIR)
okularPid=${topDir}/okular.pid
pdfFilePath=${topDir}/build/user-manual
pdfFilePathName=${pdfFilePath}/user-manual_color_en.pdf
htmlDirPath=${topDir}/build/user-manual/html/${project}-user-manual
default: pdf_r
all: pdf html
all_f: pdf_f html_f
all_f_r: pdf_f_r html_f_r
.PHONY: reader
reader:
okular --geometry 1268x1099-0-34 $(pdfFilePathName) & echo $$! > okular.pid
# Make the pdf file without forcing without reload
pdf:
daps -d ${topDir}/DC-user-manual --verbosity=3 pdf
cp -fv ${pdfFilePathName} ${pdfFilePath}/${project}-doc.pdf
cp -fv ${pdfFilePathName} ${topDir}/${project}-doc.pdf
# Make the pdf file with forcing remaking all the targets and without reload
pdf_f:
daps --force -d ${topDir}/DC-user-manual --verbosity=3 pdf
cp -fv ${pdfFilePathName} ${pdfFilePath}/${project}-doc.pdf
cp -fv ${pdfFilePathName} ${topDir}/${project}-doc.pdf
# Reload with okular variant
pdf_r: pdf
(cd ${topDir} && qdbus org.kde.okular-$(shell cat ${okularPid}) /okular reload)
cp -fv ${pdfFilePathName} ${pdfFilePath}/${project}-doc.pdf
cp -fv ${pdfFilePathName} ${topDir}/${project}-doc.pdf
# Reload with okular variant
pdf_f_r: pdf_f
(cd ${topDir} && qdbus org.kde.okular-$(shell cat ${okularPid}) /okular reload)
cp -fv ${pdfFilePathName} ${pdfFilePath}/${project}-doc.pdf
cp -fv ${pdfFilePathName} ${topDir}/${project}-doc.pdf
html:
daps -d ${topDir}/DC-user-manual --verbosity=3 html --static
html_f: html
daps --force -d ${topDir}/DC-user-manual --verbosity=3 html --static
html_r: html
firefox-reload-page.sh
html_f_r: html_f
firefox-reload-page.sh
package_html:
daps -d ${topDir}/DC-user-manual package-html
check_dir:
echo "mkfile_path: $(mkfile_path)"
echo "current_dir: $(current_dir)"
if [ -d "xml" ];\
then \
echo "Not in a user manual top source directory.";\
exit 1;\
fi
Make verbatim stuff non proportional-typeset
Make first new chapter page more engaging
/*headings*/
h1, h2, h3, h4, h5, h6,
div.producttitle,
div.subtitle,
div.author div.author,
div.translator div.translator,
div.othercredit div.othercredit,
div.editor div.editor,
div.contrib div.contrib,
.title,
.titlepage .edition,
.titlepage .releaseinfo {
color: #336699;
}
This diff is collapsed.
body
{
-moz-border-radius:1em;
-moz-box-shadow:0 2px 20px rgba(0,0,0,0.15);
-webkit-border-radius:1em;
-webkit-box-shadow:0 2px 20px rgba(0,0,0,0.15);
background-color:#fff;
color:#333;
font-family:"DejaVu Sans","Liberation Sans",FreeSans,Arial,Helvetica,sans;
/* font-family:"liberation sans",arial,helvetica,sans-serif; */
line-height:1.65;
margin:2em auto;
padding:2em;
position:relative;
font-size:100%;
max-width:50em;
}
body div.preface,body div.glossary,body div.appendix,body div.bibliography,body div.index,body div.chapter,body div.sect1,body div.sect2,body div.sect3
{
padding-left:5pt;
padding-right:5pt;
padding-top:20pt;
}
.glossary dl dt
{
font-weight:600;
}
.glossary dl dd p
{
margin: 0 1em;
}
div.set div.titlepage .title
{
background-color:#FFF;
color:#666;
font-size:300%;
font-style:normal;
font-weight:400;
text-align:center;
}
div.preface div.sect1,div.glossary div.sect,div.appendix div.sect,div.bibliography div.sect1,div.chapter div.sect1,div.sect1 div.sect2,div.sect2 div.sect3
{
padding:0;
}
div.book div.titlepage
{
margin-top:3em;
}
div.book div.titlepage h1.title,div.book div.titlepage h1.productname,div.article div.titlepage h2.title
{
color:#65a9d7;
font-size:300%;
font-style:normal;
font-weight:400;
margin-bottom:0;
margin-top:-.5em;
text-align:center;
}
div.book div.titlepage h2.subtitle,div.article div.titlepage h3.subtitle
{
color:#65a9d7;
font-size:200%;
font-style:normal;
font-weight:400;
margin-top:0;
text-align:center;
}
div.section .title
{
text-align:left !important;
}
div.userfootercontent
{
font-size:50%;
}
div.toc p
{
font-size:100%;
margin-bottom:-.75em;
}
div.toc div.set-toc-title
{
margin-bottom:1em;
}
div.set div.toc dt >.book *,div.set div.toc dt >.book em,div.set div.toc dt >.article *
{
display:block;
font-size:larger;
font-style:normal;
margin-top:1.5em;
}
div.set div.toc dt >.article
{
display:block;
margin-left:-1em;
padding-left:0;
text-indent:0;
}
div.set div.toc dt >.part,div.book div.toc dt >.part
{
display:block;
font-size:x-large;
margin-top:1.5em;
}
div.book div.toc dt >.appendix,div.book div.toc dt >.chapter,div.book div.toc dt >.preface,div.part div.toc dt >.chapter,div.book div.toc dt >.glossary
{
display:block;
font-size:larger;
margin-top:1.25em;
}
dt > span > span.status,
dt > span > span.os,
.title > span.status,
.title > span.os
{
-moz-border-radius: 0.3em 0.3em 0.3em 0.3em;
-moz-box-shadow: 0 2px 2px rgba(0, 0, 0, 0.4);
-webkit-border-radius:.4em;
margin-left: 1em;
padding: .1em .5em;
font-size:small;
background-color:#ff8000;
color:white;
}
.title > span.os,
dt > span > span.os
{
background-color:gray;
}
.idblock, .filenameblock
{
text-align:left;
font-size:small;
color:darkgray;
}
div.list-of-examples p,div.list-of-figures p,div.list-of-tables p
{
margin-bottom:-.75em;
}
div.preface div.titlepage .title,div.appendix div.titlepage .title,div.chapter div.titlepage .title,div.glossary div.titlepage .title,div.glossary div.titlepage .title,div.bibliography div.titlepage .title,div.index div.titlepage .title
{
background-color:transparent;
color:#65a9d7;
font-size:180%;
text-align:center;
}
div.part div.titlepage h1.title
{
color:#65a9d7;
font-size:300%;
text-align:center;
}
div.abstract
{
margin-left:5ex;
margin-right:5ex;
}
div.abstract p.title
{
margin-bottom:-.5em;
}
div.abstract p
{
margin-top:.25em;
}
div.sect1 div.titlepage .title,div.sect2 div.titlepage .title,div.sect3
div.titlepage .title,div.section div.titlepage
{
color:#65a9d7;
font-style:normal;
margin-bottom:-.75em;
margin-top:.5em;
text-align:left;
}
div.sect1 div.titlepage .title, div.section div.titlepage h2.title
{
font-size:150%;
}
div.sect2 div.titlepage .title, div.section div.titlepage h3.title
{
font-size:125%;
}
div.sect3 div.titlepage .title, div.section div.titlepage h4.title
{
font-size:112%;
}
div.section div.titlepage h5.title, div.section div.titlepage h6.title
{
font-size:100%;
}
div.sect1 div.titlepage h4.title,div.sect2 div.titlepage h4.title,div.sect3 div.titlepage h4.title
{
color:#65a9d7;
font-size:medium;
}
div.sect1 >em.remark
{