Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
presentation
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
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
Laros
presentation
Commits
fbff0b71
Commit
fbff0b71
authored
11 years ago
by
Laros
Browse files
Options
Downloads
Patches
Plain Diff
Switched to general LaTeX Makefile, made links relative in the mkpres script.
parent
cfe2058f
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Makefile
+148
-25
148 additions, 25 deletions
Makefile
mkpres.sh
+19
-14
19 additions, 14 deletions
mkpres.sh
with
167 additions
and
39 deletions
Makefile
+
148
−
25
View file @
fbff0b71
# Makefile
# Makefile
for LaTeX documents.
#
#
LATEX
=
latex
# LaTeX core binaries.
BIBTEX
=
bibtex
TEX
:=
latex
DVIPS
=
dvips
BIBTEX
:=
bibtex
PS2PDF
=
ps2pdf14
GLOSSARY
:=
makeglossaries
GNUPLOT
=
gnuplot
PDF
=
$(
addsuffix .pdf,
$(
basename
$(
shell
grep
-l
'\\begin{document'
*
.tex
)))
# Conversion to other formats.
BIB
=
$(
addsuffix .bbl,
$(
basename
$(
shell
grep
-l
'\\nocite{\|\\cite{'
*
.tex
)))
DVIPS
:=
dvips
EPS
=
$(
addsuffix .eps,
$(
basename
$(
shell
ls
*
.gnp
)))
PS2PDF
:=
ps2pdf14
LATEX2RTF
:=
latex2rtf
LIBREOFFICE
:=
libreoffice
# Pictures.
DIA
:=
dia
CONVERT
:=
convert
GNUPLOT
:=
gnuplot
FONTSIZE
:=
20
all
:
$(EPS) $(BIB) $(PDF) clean
# Load the configuration file.
-include
config.mkc
# Find the input files.
SRC
:=
$(
basename
$(
shell
grep
-l
'\\begin{document
}
'
*
.tex
)
)
PIC
:=
$(
basename
$(
shell
ls
*
.dia
))
GNP
:=
$(
basename
$(
shell
ls
*
.gnp
))
# Output.
PDF
:=
$(
addsuffix .pdf,
$(
SRC
))
RTF
:=
$(
addsuffix .rtf,
$(
SRC
))
DOC
:=
$(
addsuffix .docx,
$(
SRC
))
# Temporary files.
TMP
:=
blg log nav out snm toc dvi aux idx vrb ps glg glo ist
PNG
:=
$(
addsuffix .png,
$(
PIC
))
TNP
:=
$(
addsuffix .tnp,
$(
GNP
))
# Semi-permanent files.
BIB
:=
$(
addsuffix .bbl,
$(
SRC
))
GLS
:=
$(
addsuffix .gls,
$(
GLS
))
EPS
:=
$(
addsuffix .eps,
$(
PIC
)
$(
GNP
))
# Do not delete the semi-permanent files automatically.
.PRECIOUS
:
$(BIB) $(GLS) $(EPS)
# Disable built-in rules.
.SUFFIXES
:
# Targets that are not associated with files.
.PHONY
:
all rtf doc clean distclean release
# Main targets
all
:
$(PDF)
rtf
:
$(RTF)
doc
:
$(DOC)
clean
:
clean
:
rm
-f
*
.blg
*
.log
*
.nav
*
.out
*
.snm
*
.toc
*
.dvi
*
.aux
*
.vrb
rm
-f
$(
foreach I,
$(
TMP
)
,
$(
addsuffix .
$I
,
$(
SRC
)))
$(
PNG
)
$(
TNP
)
distclean
:
clean
rm
-f
$(
PDF
)
$(
RTF
)
$(
DOC
)
$(
BIB
)
$(
EPS
)
release
:
all clean
release
:
all clean
distclean
:
clean
rm
-f
$(
BIB
)
$(
PDF
)
$(
EPS
)
%.aux
:
%.tex
# Picture targets.
$(
LATEX
)
$^
rm
$(
addsuffix .dvi,
$(
basename
$^
))
%.png
:
%.dia
$(
DIA
)
-e
$@
-t
png-libart
$<
%.eps
:
%.png
$(
CONVERT
)
$<
$@
%.tnp
:
%.gnp $(DEP)
echo
"set terminal postscript color eps font
\"
default,
$(
FONTSIZE
)
\"
"
>
$@
;
\
cat
$<
>>
$@
%.eps
:
%.tnp
$(
GNUPLOT
)
<
$<
>
$@
%.bbl
:
%.aux
# BibTeX targets (called recursively).
%.blg
:
%.aux
$(
BIBTEX
)
$(
basename
$^
)
$(
BIBTEX
)
$(
basename
$^
)
%.dvi
:
%.tex
%.bbl
:
%.blg
$(
LATEX
)
$^
@
$(
LATEX
)
$^
$(
LATEX
)
$^
# Glossary targets (called recursively).
%.glg
:
%.aux
$(
GLOSSARY
)
$*
%.glo
:
%.glg
@
%.ist
:
%.glg
@
%.gls
:
%.aux %.glg %.glo %.ist
@
# LaTeX build targets.
%.aux
:
%.tex $(EPS)
$(
TEX
)
$<
;
\
if
(
grep
-s
"LaTeX Warning: Citation"
$*
.log
)
;
then
\
$(
MAKE
)
$*
.bbl
;
\
$(
TEX
)
$<
;
\
fi
;
\
if
(
grep
-s
"No file
$*
.gls"
$*
.log
)
;
then
\
$(
MAKE
)
$*
.gls
;
\
fi
;
\
while
(
grep
-s
"Rerun to get cross-references right."
$*
.log
)
;
do
\
$(
TEX
)
$<
;
\
done
;
\
while
(
grep
-s
"LaTeX Warning: There were undefined references"
$*
.log
)
;
do
\
$(
TEX
)
$<
;
\
done
;
\
while
(
grep
-s
"Package rerunfilecheck Warning: File"
$*
.log
)
;
do
\
$(
TEX
)
$<
;
\
done
%.log
:
%.aux
@
%.dvi
:
%.aux
@
%.ps
:
%.dvi
%.idx
:
%.aux
$(
DVIPS
)
$^
-o
$@
@
%.nav
:
%.aux
@
%.out
:
%.aux
@
%.snm
:
%.aux
@
%.toc
:
%.aux
@
%.vrb
:
%.aux
@
%.ps
:
%.dvi %.log %.aux %.idx %.nav %.out %.snm %.toc %.vrb
$(
DVIPS
)
$<
-o
$@
# Output targets.
%.pdf
:
%.ps
%.pdf
:
%.ps
$(
PS2PDF
)
$^
$(
PS2PDF
)
$^
%.eps
:
%.gnp
%.rtf
:
%.tex %.dvi %.log %.aux %.idx %.nav %.out %.snm %.toc %.vrb
$(
GNUPLOT
)
<
$<
$(
LATEX2RTF
)
-o
$@
$<
%.docx
:
%.rtf
$(
LIBREOFFICE
)
--headless
--invisible
--convert-to
docx
$<
-o
$@
This diff is collapsed.
Click to expand it.
mkpres.sh
+
19
−
14
View file @
fbff0b71
#!/bin/sh
#!/bin/
ba
sh
if
!
[
-n
"
$1
"
]
;
then
if
!
[
-n
"
$1
"
]
;
then
echo
"Usage:
$0
<directory>"
echo
"Usage:
$0
<directory>"
...
@@ -10,17 +10,22 @@ if [ -e $1 ]; then
...
@@ -10,17 +10,22 @@ if [ -e $1 ]; then
exit
exit
fi
fi
here
=
`
pwd
`
mkdir
$1
mkdir
$1
ln
-s
$here
/lumc_logo.eps
$1
/
ln
-s
$here
/lumc_logo_small.eps
$1
/
source
=
$(
cd
$1
;
pwd
)
ln
-s
$here
/ul_logo.eps
$1
/
target
=
$(
pwd
)
ln
-s
$here
/lgtc_logo.eps
$1
/
ln
-s
$here
/nbic_logo.eps
$1
/
common_part
=
$source
ln
-s
$here
/nwo_logo_en.eps
$1
/
back
=
ln
-s
$here
/ngi_logo.eps
$1
/
while
[
"
${
target
#
$common_part
}
"
=
"
${
target
}
"
]
;
do
ln
-s
$here
/gen2phen_logo.eps
$1
/
common_part
=
$(
dirname
$common_part
)
ln
-s
$here
/Makefile
$1
/
back
=
"../
${
back
}
"
ln
-s
$here
/beamerthemelumc.sty
$1
/
done
cp
presentation.tex
$1
/
cp
presentation.tex
$1
links
=
$(
ls
Makefile
*
.eps
*
.sty
)
cd
$1
for
i
in
$links
;
do
ln
-s
${
back
}${
target
#
$common_part
/
}
/
${
i
}
done
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