Skip to content

Commit

Permalink
Merge pull request #628 from JohelEGP/ref_docs
Browse files Browse the repository at this point in the history
docs(ref): document most of `mp_units.core`
  • Loading branch information
mpusz authored Dec 8, 2024
2 parents 7eab29c + ea93287 commit 6d93f73
Show file tree
Hide file tree
Showing 4 changed files with 6,659 additions and 171 deletions.
5 changes: 3 additions & 2 deletions docs/api_reference/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ include(JEGPAddStandardeseSources)

set(pdf_title "mp-units Library")
set(page_license "MIT License")
set(first_library_chapter "qties")
set(last_library_chapter "qties")
set(first_library_chapter "quantities")
set(last_library_chapter "quantities")
set(cover_title "mp-units Library Reference Documentations")
set(reply_to "\\href{${PROJECT_HOMEPAGE_URL}/discussions}{Discussions}, \\href{${PROJECT_HOMEPAGE_URL}/issues}{issues}")
jegp_add_standardese_sources(
Expand All @@ -21,6 +21,7 @@ jegp_add_standardese_sources(
# Latex commands.
[[\\href{([^}]+)}{([^}]+)};HREF(\1)(\2)]]
# Macros extensions.
[[\\txtrm;\\textrm]]
[[\\refcpp{([^}]+)};REFCPP(\1)]]
[[\\irefcpp{([^}]+)};~(REFCPP(\1))]]
[[\\refcppx{([^}]+)}{([^}]+)};REFCPPX(\1)(\2)]]
Expand Down
9 changes: 7 additions & 2 deletions docs/api_reference/src/intro.tex
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@
Available from: \url{https://wg21.link/\IsoCpp{}}
\item
The \Cpp{} Standards Committee.
P3094R5: \doccite{\tcode{std::basic_fixed_string}}.
Edited by Mateusz Pusz.
Available from: \url{https://wg21.link/P3094R5}
\item
The \Cpp{} Standards Committee.
SD-8: \doccite{Standard Library Compatibility}.
Edited by Bryce Lelbach.
Available from: \url{https://wg21.link/SD8}
Expand Down Expand Up @@ -102,11 +107,11 @@
{ll}
\topline
\hdstyle{Clause} & \hdstyle{Category} \\ \capsep
\ref{qties} & Quantities library \\
\ref{quantities} & Quantities library \\
\end{floattable}

\pnum
The quantities library\iref{qties}
The quantities library\iref{quantities}
describes components for dealing with quantities.

\rSec1[spec.mods]{Modules}
Expand Down
21 changes: 20 additions & 1 deletion docs/api_reference/src/macros_extensions.tex
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
\newcommand{\IsoCpp}{N4971}

\newcommand{\txtrm}[1]{\textnormal{\textrm{#1}}}

\newcommand{\stdconcept}[1]{#1}

\newcommand{\indexlibraryglobalexpos}[1]{\indexlibrary{#1@\exposid{#1}}}
\newcommand{\indexlibraryctorexpos}[1]{\indexlibrarymisc{#1@\exposid{#1}}{constructor}}
\newcommand{\indexlibraryexposmemberexpos}[2]{\indexlibraryboth{#1@\exposid{#1}}{#2@\exposid{#2}}}

%% Inline non-parenthesized C++ reference
\newcommand{\refcpp}[1]{\href{https://wg21.link/#1}{\IsoCpp{}, [#1]}}
\newcommand{\irefcpp}[1]{\nolinebreak[3] (\refcpp{#1})}
Expand All @@ -8,4 +16,15 @@

%% Inline IEV reference
\newcommand{\refiev}[1]{\href{https://www.electropedia.org/iev/iev.nsf/display?openform&ievref=#1}{IEC 60050, #1}}
\newcommand{\irefiev}[1]{\nolinebreak[3] (\refiev{#1})}
\ExplSyntaxOn
\NewDocumentCommand \irefiev { m } {
\clist_set:Nx \l_tmpa_clist { #1 }
\nolinebreak[3] ~ (
\clist_map_inline:Nn \l_tmpa_clist {
\clist_put_right:Nn \g_tmpa_clist { \refiev{##1} }
}
\clist_use:Nn \g_tmpa_clist { ,~ }
)
\clist_clear:N \g_tmpa_clist
}
\ExplSyntaxOff
Loading

0 comments on commit 6d93f73

Please sign in to comment.