Commit cde272a9 authored by Benoit Rat's avatar Benoit Rat

doc: clean-up Makefile, templates, etc.

parent 4b6271e1
*.*\#
\#*
.\#*
*.*~
*~
*.wlf
modelsim.ini
transcript
......
~
pdf/
tex/
*.aux
*.log
*.out
*.pdf
*.tex
*.toc
SRC=$(wildcard *.mkd)
PDF=$(addprefix pdfs/, $(SRC:.mkd=.pdf))
TEX=$(SRC:.mkd=.tex)
OPTIONS=-f markdown --toc --number-sections --smart
########################################################################
## Makefile to generate multiple document from the same markdown file
## using pandoc software:
##
## References:
##
## Authors:
## - Benoit Rat (Seven Solutions, www.sevensols.com)
##
## GNU Lesser General Public License Usage
## This file may be used under the terms of the GNU Lesser
## General Public License version 2.1 as published by the Free Software
## Foundation and appearing in the file LICENSE.LGPL included in the
## packaging of this file. Please review the following information to
## ensure the GNU Lesser General Public License version 2.1 requirements
## will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
########################################################################
## Obtaining the proper file
SRC=$(wildcard *.md)
PDF=$(addprefix pdf/, $(SRC:.md=.pdf))
TEX=$(SRC:.md=.tex)
## Pandoc arguments
OPTIONS=-f markdown --toc --number-sections --smart --reference-links
TEMPLATE=pandoc.latex
......@@ -10,28 +31,31 @@ ifneq "$(TEMPLATE)" ""
TEMPLATEARG=--template=$(TEMPLATE)
endif
#--highlight-style=pygments (the default), kate, monochrome, espresso, haddock, and tango
#-V highlight-bg=true
## Main targets
all: $(PDF)
tex: $(TEX)
pdf: $(PDF)
#--highlight-style=pygments (the default), kate, monochrome, espresso, haddock, and tango
#-V highlight-bg=true
## Special targets to create directory
DIR_%:
mkdir -p $(subst DIR_,,$@)
pdfs/%.pdf: %.mkd Makefile $(TEMPLATE)
@echo "$(dir $@) $< $^ $(PDF)"
pdf/%.pdf: %.md Makefile $(TEMPLATE) DIR_pdf
pandoc $(OPTIONS) --latex-engine=xelatex --highlight-style=haddock $(TEMPLATEARG) \
-V lang=english -V fontsize=11pt -V documentclass=article -V bg-color=238,245,240 -o $@ $<
%.tex: %.mkd Makefile $(TEMPLATE)
%.tex: %.md Makefile $(TEMPLATE)
@echo "$(dir $@) $< $^ $(TEX)"
pandoc $(OPTIONS) --highlight-style=haddock $(TEMPLATEARG) \
-V lang=english -V fontsize=11pt -V documentclass=article -o $@ $(@:.tex=.mkd)
test: test.mkd Makefile $(TEMPLATE)
pandoc $(OPTIONS) --latex-engine=xelatex --highlight-style=haddock $(TEMPLATEARG) \
-V lang=english -V fontsize=11pt -V documentclass=article -o $@.pdf $@.mkd
-V lang=english -V fontsize=11pt -V documentclass=article -o $@ $<
.PHONY: clean
clean:
rm -f pdfs/*.pdf *~ *.tex *.log
rm -f pdf/*.pdf *~ *.tex *.log
This diff is collapsed.
% readme
% Javier Díaz, UGR-7S
% 21 Jun. 2012
Required software
=========================
First install
sudo apt-get install texlive-xetex
sudo apt-get install texlive-xetex
Document compilation
=====================
use make command or
pandoc --toc -o wr-nic.pdf wr-nic.mkd
Additional info
=====================
Find peripherals register map from wbgen2 tool on file NIC_peripheral_registers.tar.gz.
Problems?
------------
Check latex tools are installed and use command texhash
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment