Skip to content

Commit

Permalink
latex -> lualatex
Browse files Browse the repository at this point in the history
  • Loading branch information
DamienCassou committed Sep 18, 2014
1 parent ada4087 commit 6101cf6
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 27 deletions.
5 changes: 5 additions & 0 deletions .dir-locals.el
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
;;; Directory Local Variables
;;; See Info node `(emacs) Directory Variables' for more information.

((latex-mode
(TeX-engine . luatex)))
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,4 @@ files/
/EnterprisePharo.tex
stderr
stdout
/book-result/
Binary file added _support/latex/FiraMono-Regular.otf
Binary file not shown.
Binary file added _support/latex/FiraSans-Regular.otf
Binary file not shown.
18 changes: 5 additions & 13 deletions _support/latex/common.tex
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,11 @@
% Allows book to be generated in multiple formats.
%=============================================================
%:Packages
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc} %%%%%% really important to get the code directly in the text!
\usepackage{lmodern}
%\usepackage[scaled=0.85]{bookmanx} % needs another scale factor if used with \renewcommand{\sfdefault}{cmbr}
\usepackage{palatino}
\usepackage[scaled=0.9]{helvet}
\usepackage{fontspec}
\setmainfont{FiraSans-Regular}[Path = ../_support/latex/, Extension = .otf]
\setmonofont{FiraMono-Regular}[Path = ../_support/latex/, Extension = .otf]
\setsansfont{FiraSans-Regular}[Path = ../_support/latex/, Extension = .otf]

\usepackage[protrusion,expansion=false]{microtype}
\usepackage{graphicx}
\usepackage{theorem}
Expand Down Expand Up @@ -599,13 +598,6 @@
\setlength{\methodindent}{0.2cm}
\settowidth{\methodwordlength}{\ M\'ethode\ }
%=============================================================
%:Smalltalk macros
%\newcommand{\sep}{{$\gg$}}
\newcommand{\sep}{\mbox{>>}}
\newcommand{\self}{\lct{self}\xspace}
\newcommand{\super}{\lct{super}\xspace}
\newcommand{\nil}{\lct{nil}\xspace}
%=============================================================
% be less conservative about float placement
% these commands are from http://www.tex.ac.uk/cgi-bin/texfaq2html?label=floats
\renewcommand{\topfraction}{.9}
Expand Down
16 changes: 8 additions & 8 deletions _support/templates/book.latex.template
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,18 @@
vmargin={.75in,1in},
ignoreheadfoot
]{geometry}
\input{_support/latex/common.tex}
\input{../_support/latex/common.tex}
\setboolean{lulu}{true}
%=================================================================
% Add the path for the figures of each chapter here:
\graphicspath{
{figures/}
{Copyright/}
{Zinc/}
{PillarChap/}
{Zinc-HTTP/}
{Zinc-Encoding-Meta/}
{Zinc-REST/}
{../figures/}
{../Copyright/}
{../Zinc/}
{../PillarChap/}
{../Zinc-HTTP/}
{../Zinc-Encoding-Meta/}
{../Zinc-REST/}
}
%=================================================================
\let\wholebook=\relax
Expand Down
11 changes: 6 additions & 5 deletions compile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ function pillar_one() {
function mypdflatex() {
pillar_file="$1"

echo "Compiling PDF..."
pdflatex -halt-on-error -file-line-error -interaction batchmode "$pillar_file" 2>&1 1>/dev/null
echo "Compiling PDF from $pillar_file..."
lualatex --file-line-error --interaction=batchmode "\input" "$pillar_file" 2>&1 1>/dev/null
ret=$?
if [[ $ret -ne 0 ]]; then
cat $pillar_file.log
Expand Down Expand Up @@ -68,12 +68,12 @@ function compile_latex_book() {
echo =========================================================
echo COMPILING Book
echo =========================================================

produce_pdf . EnterprisePharo
cd book-result
produce_pdf . EnterprisePharo
}

function latex_enabled() {
hash pdflatex 2>/dev/null
hash lualatex 2>/dev/null
}

if [[ $# -eq 1 ]]; then
Expand All @@ -89,6 +89,7 @@ else
pillar_all
if latex_enabled; then
compile_chapters
mkdir -p book-result
compile_latex_book
fi
fi
Expand Down
2 changes: 1 addition & 1 deletion pillar.conf
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"LaTeX whole book" : {
"outputType" : #latex,
"template" : "_support/templates/book.latex.template",
"outputFile" : "EnterprisePharo.tex"
"outputFile" : "book-result/EnterprisePharo.tex"
},
"HTML by chapter" : {
"outputType" : #html,
Expand Down

0 comments on commit 6101cf6

Please sign in to comment.