Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Alvarez, Gonzalo
PsimagLite
Commits
2eaf9fa5
Commit
2eaf9fa5
authored
Oct 04, 2020
by
Alvarez, Gonzalo
Browse files
doc: variable renamed
parent
0a27f23f
Changes
3
Hide whitespace changes
Inline
Side-by-side
doc/tutorial.ptex
View file @
2eaf9fa5
...
...
@@ -62,7 +62,7 @@ keywordstyle=\color{blue}\bfseries,frame=shadowbox}
\end{center}
\begin{center}
\textsc
{
Oak Ridge, 20
18
}
\textsc
{
Oak Ridge, 20
20
}
\end{center}
\end{titlepage}
...
...
@@ -98,7 +98,7 @@ Note that the \texttt{PartName} will be something descriptive
of what we are talking about there and must be
\emph
{
unique
}
.
Moreover, that part can be included in this document,
the
\cppFile
{
tutorial.ptex
}
file, by using the command
\texttt
{$
\backslash
$
ptexPast
\{
PartName
\}
}
, where you have to use
\texttt
{$
\backslash
$
ptexPast
e
}
\texttt
{
\{
PartName
\}
}
, where you have to use
the right name for
\texttt
{
PartName
}
.
This way we import documentation from each .cpp file
into this ptex file.
...
...
drivers/testInputNg.cpp
View file @
2eaf9fa5
...
...
@@ -9,7 +9,7 @@
You can go ahead an compile this example with
\begin{tiny}
\begin{verbatim}
g++ testInputNg.cpp -I ../src/ -I.. -DUSE_BOOST -L ../lib -lpsimaglite -o testInputNg
g++ testInputNg.cpp
-std=c++11 -Wall
-I ../src/ -I.. -DUSE_BOOST -L ../lib -lpsimaglite -o testInputNg
\end{verbatim}
\end{tiny}
Note that you need boost-dev or boost-devel and also you
...
...
@@ -28,17 +28,15 @@ First, note that we need two includes from PsimagLite.
PsimagLite files are usually under src, but in some
cases subdirectories are used. Here are the includes.
\begin{lstlisting}
PSIDOCCOPY InputNg_Includes
\end{lstlisting}
PSIDOC_CAPTURE
*/
/* PSIDOC_CODE_START InputNg_Includes nocapture */
#include
"InputNg.h"
#include
"InputCheckBase.h"
/* PSIDOC_CODE_END */
/* PSIDOC InputNg_MyInputCheck
There is an option to check the inputs, so that
\end{lstlisting}
InputNg has an option to check the inputs, so that
you can define the labels that you expect to find
in your program. This is optional but recommended.
For this we create a class, say \texttt{MyInputCheck},
...
...
scripts/doc.pl
View file @
2eaf9fa5
...
...
@@ -111,7 +111,7 @@ sub loadLabels
my
$nlines
=
scalar
(
@$lines
);
my
$inCodeBlock
=
0
;
my
$codeBuffer
=
"";
my
$
capture
=
1
;
my
$
modifyLater
=
1
;
for
(
my
$i
=
0
;
$i
<
$nlines
;
++
$i
)
{
$_
=
$lines
->
[
$i
];
...
...
@@ -119,7 +119,7 @@ sub loadLabels
my
$rest
=
$
1
;
chomp
(
$rest
);
(
$label
,
$additional
)
=
procPsidocName
(
$rest
);
$
capture
=
1
;
$
modifyLater
=
1
;
my
$txt
=
$labels
{"
$label
"};
if
(
defined
(
$txt
))
{
...
...
@@ -139,7 +139,7 @@ sub loadLabels
(
$label
,
$additional
)
=
procPsidocName
(
$rest
);
$label
=~
s/ //g
;
$
capture
=
(
$additional
eq
"
nocapture
")
?
0
:
1
;
$
modifyLater
=
(
$additional
eq
"
nocapture
")
?
0
:
1
;
my
$txt
=
$labels
{"
$label
"};
if
(
defined
(
$txt
))
{
...
...
@@ -162,7 +162,7 @@ sub loadLabels
}
if
(
/\*\//
)
{
if
(
$label
ne
"
!DISABLED
"
and
$
capture
)
{
if
(
$label
ne
"
!DISABLED
"
and
$
modifyLater
)
{
my
$inlabel
=
$label
.
"
::
";
$buffer
=~
s/PSIDOCCOPY \$/PSIDOCCOPY ${inlabel}/g
;
my
@temp
=
(
$buffer
);
...
...
@@ -188,7 +188,7 @@ sub loadLabels
$buffer
=
"";
$label
=
"
!DISABLED
";
$
capture
=
1
;
$
modifyLater
=
1
;
$additional
=
"";
}
elsif
(
$inCodeBlock
)
{
$codeBuffer
.=
$_
.
"
\n
";
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment