os01 icon indicating copy to clipboard operation
os01 copied to clipboard

Provide instructions to build the book from source

Open acehreli opened this issue 8 years ago • 9 comments

Perhaps a Makefile that includes the command to build the pdf...

Thanks, Ali

acehreli avatar Feb 16 '17 08:02 acehreli

You can build it from Lyx by pressing the icon that is a pair of eyes in the left-most side of the toolbar. Lyx should automatically download necessary packages and build it.

tuhdo avatar Feb 16 '17 11:02 tuhdo

Hi all, when I build it from Lyx, I get this Warning which conducts the building failed:

----------------------------------------
LyX's automatic index sorting algorithm faced
problems with the entry 'fetch – decode – execute'.
Please specify the sorting of this entry manually, as
explained in the User Guide.
Warning: Index sorting failed
----------------------------------------

And I find there are two indexes named 'fetch – decode – execute'. Is it a bug?

fno2010 avatar Mar 03 '17 13:03 fno2010

It seems like a compatible problem with latest Lyx. However, the output PDF remains the same.

tuhdo avatar Mar 03 '17 13:03 tuhdo

Yes, I'm using the latest Lyx. But this warning makes building failed:

This is pdfTeX, Version 3.14159265-2.6-1.40.17 (TeX Live 2016/Arch Linux) (preloaded format=pdflatex)
 restricted \write18 enabled.
entering extended mode
(./Operating_System_From_0_to_1.tex
LaTeX2e <2016/03/31> patch level 3
Babel <3.9r> and hyphenation patterns for 83 language(s) loaded.

Systemcall.cpp (291): Systemcall: 'pdflatex  "Operating_System_From_0_to_1.tex"' finished with exit code 1

I cannot get the output PDF...

fno2010 avatar Mar 03 '17 13:03 fno2010

You can try to export the file into a plain Latex file (File -> Export -> LaTeX(pdflatex) and run pdflatex manually. If it still does not build, I guess it is because of missing packages.

tuhdo avatar Mar 03 '17 13:03 tuhdo

Now I can export a plain latex file. But pdflatex got this error:

...
ABD: EveryShipout initializing macros
(/usr/share/texmf-dist/tex/latex/lm/t1lmss.fd) [1{/var/lib/texmf/fonts/map/pdft
ex/updmap/pdftex.map}] [2] (/usr/share/texmf-dist/tex/latex/psnfss/t1pzc.fd)

LaTeX Font Warning: Font shape `T1/pzc/bx/it' undefined
(Font)              using `T1/pzc/m/n' instead on input line 301.

[1] [2]

LaTeX Font Warning: Font shape `T1/pzc/bx/n' undefined
(Font)              using `T1/pzc/m/n' instead on input line 306.

pdfTeX warning (ext4): destination with the same identifier (name{page.i}) has
been already used, duplicate ignored
<to be read again>
                   \relax
l.344
       [1
! pdfTeX error (font expansion): auto expansion is only possible with scalable
fonts.
\AtBegShi@Output ...ipout \box \AtBeginShipoutBox
                                                  \fi \fi
l.344

!  ==> Fatal error occurred, no output PDF file produced!
Transcript written on "Operating System From 0 to 1.log".

It seems that I'm missing some font?

fno2010 avatar Mar 03 '17 14:03 fno2010

Lyx is too hard to use. I prefer CLI. 😂

fno2010 avatar Mar 04 '17 06:03 fno2010

Hmm my Ubuntu in a VM compiled the plain Latex file fine. Perhaps you should install all the latex packages, e.g. texlive-full.

tuhdo avatar Mar 04 '17 06:03 tuhdo

Maybe it only doesn't work on my Linux distribution... I can build it on Mac OSX, although get some warnings.

I'm trying to build a Makefile for it. It should be very simple. This Makefile works well on my OSX:

.SUFFIXES: .pdf .tex .lyx

DIR = book_src
FILE = Operating\\\ System\\\ From\\\ 0\\\ to\\\ 1
LYX = $(DIR)/$(FILE).lyx
TEX = $(DIR)/$(FILE).tex
TARGET = $(DIR)/$(FILE).pdf

$(FILE): $(TEX)
	cd $(DIR) \
	&& pdflatex $@ \
	&& bibtex $@ \
	&& pdflatex $@ \
	&& pdflatex $@

$(TEX): $(LYX)
	lyx -e pdflatex $<

$(LYX):
	echo $@

all: $(FILE)

clean:
	rm -f book_src/*.{tex,aux,bbl,blg,idx,log,toc,synctex.gz}

But it seems that there are some missing dependencies on Linux. (at least on my archlinux...)

fno2010 avatar Mar 04 '17 13:03 fno2010