Skip to content

Commit a2f93d6

Browse files
committed
Generate separate bibliographies
1 parent 177a951 commit a2f93d6

File tree

5 files changed

+14
-17
lines changed

5 files changed

+14
-17
lines changed

usersguide-sphinx/interface.mos

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
s := "
1+
loadString("
22
function trim
33
input String s;
44
output String o;
@@ -20,19 +20,18 @@ protected
2020
algorithm
2121
out := \"\\n.. _\" + strs[end] + \" :\\n\\n\" + strs[end] + \"\\n\" + sum(\"^\" for c in 1:stringLength(strs[end])) + \"\\n\";
2222
out := out + sum(\"\" + trim(l) + \"\\n\" for l in OpenModelica.Scripting.strtok(OpenModelica.Scripting.getClassComment(cl), \"\\n\"));
23-
OpenModelica.Scripting.writeFile(\"interface.inc.tmp\", doc1, false);
23+
OpenModelica.Scripting.writeFile(\"tmp/interface.inc.tmp\", doc1, false);
2424
// Disable wrapping in order to fix some modelica:// links
25-
OpenModelica.Scripting.system(\"pandoc --no-wrap -t rst -f html -o interface.inc.tmp.rst interface.inc.tmp\");
26-
OpenModelica.Scripting.system(\"sed -i= 's,`\\\\([^`]*\\\\) <modelica://OpenModelica.Scripting.\\\\([A-Za-z0-9_-]*\\\\)>`__,:ref:`\\\\1 <\\\\2>`,g' interface.inc.tmp.rst\");
27-
out := out + \"\\n\" + sum(\"\" + l + \"\\n\" for l in OpenModelica.Scripting.stringSplit(OpenModelica.Scripting.readFile(\"interface.inc.tmp.rst\"), \"\\n\")) + \" \\n\";
25+
OpenModelica.Scripting.system(\"pandoc --no-wrap -t rst -f html -o tmp/interface.inc.tmp.rst tmp/interface.inc.tmp\");
26+
OpenModelica.Scripting.system(\"sed -i= 's,`\\\\([^`]*\\\\) <modelica://OpenModelica.Scripting.\\\\([A-Za-z0-9_-]*\\\\)>`__,:ref:`\\\\1 <\\\\2>`,g' tmp/interface.inc.tmp.rst\");
27+
out := out + \"\\n\" + sum(\"\" + l + \"\\n\" for l in OpenModelica.Scripting.stringSplit(OpenModelica.Scripting.readFile(\"tmp/interface.inc.tmp.rst\"), \"\\n\")) + \" \\n\";
2828
s := OpenModelica.Scripting.list(cl, interfaceOnly=true);
2929
if stringLength(s) > 0 then
3030
out := out + \"\\n.. code-block :: modelica\\n\\n\";
3131
out := out + sum(\" \" + l + \"\\n\" for l in OpenModelica.Scripting.strtok(s, \"\\n\")) + \" \\n\";
3232
end if;
3333
end reSTInterface;
34-
";
35-
loadString(s);
34+
");
3635
getErrorString();
3736

3837
writeFile("interface.inc", sum(reSTInterface(cl) for cl guard isFunction(cl) and not isPartial(cl) and not regexBool(typeNameString(cl), "Internal") in getClassNames(OpenModelica.Scripting, sort=true, recursive=true)));getErrorString();

usersguide-sphinx/source/conclusion.rst

Lines changed: 0 additions & 9 deletions
This file was deleted.

usersguide-sphinx/source/index.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ Contents:
2626
ompython
2727
scripting_api
2828
faq
29-
conclusion
3029

3130
.. toctree::
3231
:maxdepth: 1

usersguide-sphinx/source/omnotebook.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -849,3 +849,7 @@ September 18-19, 2003.
849849
.. |WYSIWYG| replace:: :abbr:`WYSIWYG (What-You-See-Is-What-You-Get)`
850850

851851
.. omc-reset ::
852+
853+
.. bibliography:: openmodelica.bib extrarefs.bib
854+
:cited:
855+
:filter: docname in docnames

usersguide-sphinx/source/optimization.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -560,3 +560,7 @@ Window Regions in OMOptim GUI
560560
:height: 12pt
561561

562562
.. omc-reset ::
563+
564+
.. bibliography:: openmodelica.bib extrarefs.bib
565+
:cited:
566+
:filter: docname in docnames

0 commit comments

Comments
 (0)