atrri

Refractive indices varying with wavelength
git clone git://git.meso-star.fr/atrri.git
Log | Files | Refs | README | LICENSE

commit 07efa139b58fa7ee10de0aac7bc741942f2cc272
parent 9427f77e253856428c49a2f25642c471eb26c94a
Author: Vincent Forest <vincent.forest@meso-star.com>
Date:   Mon, 17 Oct 2022 16:42:46 +0200

Convert the man page source from asciidoc to scdoc

Diffstat:
MREADME.md | 4++--
Mcmake/CMakeLists.txt | 14++++++--------
Adoc/atrri.5.scd | 64++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Ddoc/atrri.5.txt | 69---------------------------------------------------------------------
4 files changed, 72 insertions(+), 79 deletions(-)

diff --git a/README.md b/README.md @@ -9,8 +9,8 @@ This library is compatible GNU/Linux 64-bits. It relies the [CMake](http://www.cmake.org) and the [RCMake](https://gitlab.com/vaplv/rcmake/) packages to build. It also depends on the [RSys](https://gitlab.com/vaplv/rsys/) library. It optionally depends on -the [AsciiDoc](https://asciidoc.org/) suite of tools; if available, the man -pages of the reference documentation will be generated. +[scdoc](https://sr.ht/~sircmpwn/scdoc/) which, if available, is used to +generate the man pages. First ensure that CMake is installed on your system. Then install the RCMake package as well as the aforementioned prerequisites. Finally generate the diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt @@ -88,18 +88,16 @@ endif() ################################################################################ # Man page ############################################################################### -find_program(A2X NAMES a2x a2x.py) -if(NOT A2X) +find_program(SCDOC NAMES scdoc) +if(NOT SCDOC) message(WARNING - "The `a2x' program is missing. " - "The atrri man page cannot be generated.") + "The `scdoc' program is missing. " + "The Astoria Refractive Index man page cannot be generated.") else() - set(_src ${PROJECT_SOURCE_DIR}/../doc/atrri.5.txt) - set(_txt ${CMAKE_CURRENT_BINARY_DIR}/atrri.5.txt) + set(_src ${PROJECT_SOURCE_DIR}/../doc/atrri.5.scd) add_custom_command( OUTPUT atrri.5 - COMMAND ${CMAKE_COMMAND} -E copy ${_src} ${_txt} - COMMAND ${A2X} -dmanpage -fmanpage ${_txt} + COMMAND ${SCDOC} < ${_src} > atrri.5 DEPENDS ${_src} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMENT "Buid ROFF man page atrri.5" diff --git a/doc/atrri.5.scd b/doc/atrri.5.scd @@ -0,0 +1,64 @@ +atrri(5) + +; Copyright (C) 2021 CNRS +; +; This program is free software: you can redistribute it and/or modify +; it under the terms of the GNU General Public License as published by +; the Free Software Foundation, either version 3 of the License, or +; (at your option) any later version. +; +; This program is distributed in the hope that it will be useful, +; but WITHOUT ANY WARRANTY; without even the implied warranty of +; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +; GNU General Public License for more details. +; +; You should have received a copy of the GNU General Public License +; along with this program. If not, see <http://www.gnu.org/licenses/>. + +# NAME + +atrri - AsToRia: Refractive Index + +# DESCRIPTION + +*atrri* is a plain text file format for storing a list of refractive indices +that vary spectrally. Each refractive index is defined by 3 double precision +floating point numbers: the wavelength in nanometers at which the index is +set, followed by the real part and the imaginary part of the refractive index +itself. Note that the listed refractive indices should be sorted in ascending +order relative to their wavelength. + +Characters behind the pound sign (#) are considered comments and are therefore +ignored. Empty lines, that is, lines without characters or consisting only of +spaces and tabs, are simply skipped. + +# GRAMMAR + +``` +<atrri> ::= <refractive-index> + [ <refractive-index> ... ] + +<refractive-index> ::= <wavelength> <n> <kappa> + +<wavelength> ::= <double> # In nm +<n> ::= <double> # Real part +<kappa> ::= <double> # Imaginary part +``` + +# EXAMPLE + +``` +# Wavelength in nm real part imaginary part + + 300.000011921 1.740000010 0.469999999 + 310.000002384 1.741990328 0.469004273 + 319.999992847 1.743917465 0.468010038 + 329.999983311 1.745785475 0.467014253 + 339.999973774 1.748130083 0.465993971 + 349.999964237 1.750000000 0.464985400 + 359.999954700 1.750000000 0.463959038 + 369.999945164 1.750000000 0.462961257 + 379.999935627 1.750000000 0.461990029 + 389.999926090 1.750000000 0.460981935 + 399.999916553 1.750000000 0.459957659 +``` diff --git a/doc/atrri.5.txt b/doc/atrri.5.txt @@ -1,69 +0,0 @@ -// Copyright (C) 2021 CNRS -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see <http://www.gnu.org/licenses/>. -:toc: - -atrri(5) -======= - -NAME ----- -atrri - AsToRia: Refractive Index - -DESCRIPTION ------------ - -*atrri* is a plain text file format for storing a list of refractive indices -that vary spectrally. Each refractive index is defined by 3 double precision -floating point numbers: the wavelength in nanometers at which the index is -set, followed by the real part and the imaginary part of the refractive index -itself. Note that the listed refractive indices should be sorted in ascending -order relative to their wavelength. - - -Characters behind the pound sign (#) are considered comments and are therefore -ignored. Empty lines, that is, lines without characters or consisting only of -spaces and tabs, are simply skipped. - -GRAMMAR -------- - -[verse] -------- -<atrri> ::= <refractive-index> - [ <refractive-index> ... ] - -<refractive-index> ::= <wavelength> <n> <kappa> - -<wavelength> ::= <double> # In nm -<n> ::= <double> # Real part -<kappa> ::= <double> # Imaginary part -------- - -EXAMPLE -------- - -# Wavelength in nm real part imaginary part - - 300.000011921 1.740000010 0.469999999 - 310.000002384 1.741990328 0.469004273 - 319.999992847 1.743917465 0.468010038 - 329.999983311 1.745785475 0.467014253 - 339.999973774 1.748130083 0.465993971 - 349.999964237 1.750000000 0.464985400 - 359.999954700 1.750000000 0.463959038 - 369.999945164 1.750000000 0.462961257 - 379.999935627 1.750000000 0.461990029 - 389.999926090 1.750000000 0.460981935 - 399.999916553 1.750000000 0.459957659