Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
dynare
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Dóra Kocsis
dynare
Commits
5feea2fc
Commit
5feea2fc
authored
7 years ago
by
Sébastien Villemot
Browse files
Options
Downloads
Patches
Plain Diff
Update macro-processor slides (new @#include variant).
parent
a779a644
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
doc/macroprocessor/macroprocessor.tex
+38
-28
38 additions, 28 deletions
doc/macroprocessor/macroprocessor.tex
with
38 additions
and
28 deletions
doc/macroprocessor/macroprocessor.tex
+
38
−
28
View file @
5feea2fc
...
@@ -8,12 +8,11 @@
...
@@ -8,12 +8,11 @@
\usetheme
{
Boadilla
}
\usetheme
{
Boadilla
}
\title
{
The Dynare Macro-processor
}
\title
{
The Dynare Macro-processor
}
\subtitle
{
Dynare Summer School 201
5
}
\subtitle
{
Dynare Summer School 201
7
}
\author
{
Sébastien Villemot
}
\author
{
Sébastien Villemot
}
%\pgfdeclareimage[height=0.6cm]{logo}{logo-ofce}
%\pgfdeclareimage[height=0.6cm]{logo}{logo-ofce}
%\institute[OFCE]{\pgfuseimage{logo}}
\institute
{
OFCE
}
\institute
{
OFCE
}
\date
{
June
9
, 201
5
}
\date
{
June
13
, 201
7
}
\AtBeginSection
[]
\AtBeginSection
[]
{
{
...
@@ -91,30 +90,6 @@
...
@@ -91,30 +90,6 @@
\end{itemize}
\end{itemize}
\end{frame}
\end{frame}
\begin{frame}
[fragile=singleslide]
\frametitle
{
Inclusion directive
}
\begin{itemize}
\item
This directive simply includes the content of another file at the place where it is inserted.
\begin{block}
{
Syntax
}
\verb
+
@#include "
+
\textit
{
filename
}
\verb
+
"
+
\end{block}
\begin{block}
{
Example
}
\begin{verbatim}
@#include "modelcomponent.mod"
\end{verbatim}
\end{block}
\item
Exactly equivalent to a copy/paste of the content of the included file
\item
Note that it is possible to nest includes (
\textit
{
i.e.
}
to include a file from an included file)
\item
Since Dynare 4.5, the filename can be given by a macro-variable (see below).
Useful in loops.
\begin{block}
{
Example with variable
}
\begin{verbatim}
@#define fname = "modelcomponent.mod"
@#include fname
\end{verbatim}
\end{block}
\end{itemize}
\end{frame}
\begin{frame}
\begin{frame}
\frametitle
{
Variables
}
\frametitle
{
Variables
}
...
@@ -219,6 +194,41 @@ end;
...
@@ -219,6 +194,41 @@ end;
\end{block}
\end{block}
\end{frame}
\end{frame}
\begin{frame}
[fragile=singleslide]
\frametitle
{
Inclusion directive (1/2)
}
\begin{itemize}
\item
This directive simply includes the content of another file at the place where it is inserted.
\begin{block}
{
Syntax
}
\verb
+
@#include "
+
\textit
{
filename
}
\verb
+
"
+
\end{block}
\begin{block}
{
Example
}
\begin{verbatim}
@#include "modelcomponent.mod"
\end{verbatim}
\end{block}
\item
Exactly equivalent to a copy/paste of the content of the included file
\item
Note that it is possible to nest includes (
\textit
{
i.e.
}
to include a
file from an included file)
\end{itemize}
\end{frame}
\begin{frame}
[fragile=singleslide]
\frametitle
{
Inclusion directive (2/2)
}
\begin{itemize}
\item
The filename can be given by a macro-variable (useful in loops):
\begin{block}
{
Example with variable
}
\begin{verbatim}
@#define fname = "modelcomponent.mod"
@#include fname
\end{verbatim}
\end{block}
\item
Files to include are searched for in current directory. Other directories can
be added with
\texttt
{
@includepath
}
directive,
\texttt
{
-I
}
command line option or
\texttt
{
[paths]
}
section in config file.
\end{itemize}
\end{frame}
\begin{frame}
[fragile=singleslide]
\begin{frame}
[fragile=singleslide]
\frametitle
{
Loop directive
}
\frametitle
{
Loop directive
}
\begin{block}
{
Syntax
}
\begin{block}
{
Syntax
}
...
@@ -604,7 +614,7 @@ rhos = [ 0.8, 0.9, 1];
...
@@ -604,7 +614,7 @@ rhos = [ 0.8, 0.9, 1];
\ccbysa
\ccbysa
\column
{
0.71
\textwidth
}
\column
{
0.71
\textwidth
}
\tiny
\tiny
Copyright © 2008--201
5
Dynare Team
\\
Copyright © 2008--201
7
Dynare Team
\\
Licence:
\href
{
http://creativecommons.org/licenses/by-sa/4.0/
}{
Creative
Licence:
\href
{
http://creativecommons.org/licenses/by-sa/4.0/
}{
Creative
Commons Attribution-ShareAlike 4.0
}
Commons Attribution-ShareAlike 4.0
}
\end{columns}
\end{columns}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment