Skip to content

Commit

Permalink
Use fonts which are shipped with TeXmacs and don't try hard to find T…
Browse files Browse the repository at this point in the history
…eX system
  • Loading branch information
vdhoeven committed Aug 27, 2011
1 parent 8c9f15c commit 4c9c2a8
Show file tree
Hide file tree
Showing 17 changed files with 102 additions and 426 deletions.
31 changes: 5 additions & 26 deletions COMPILE
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,12 @@ Compiling GNU TeXmacs

Before you compile GNU TeXmacs on your system, you have to make
sure that the other programs on which GNU TeXmacs depends,
namely TeX and Guile Scheme (from the Gnome project)
have been installed correctly. You can do this by checking
whether the latex and guile binaries exists in your path
such as Guile Scheme, FreeType 2, libiconv, etc.
Configuration will fail if one if these dependencies are missing.

which latex
which guile

If one of these commands yields an error message,
then look at the webpage doc/html/web/Dependencies.html.
There are also a certain number of optional dependencies,
which may depend on your operating system, such as aspell,
ImageMagick, or netpbm.

2. Compile, install and run.

Expand Down Expand Up @@ -152,23 +149,5 @@ Appendix C: Possible problems
files and/or 'rm src/Objects/*' in order to be sure that the
object files are rebuilt.

* You have problems with the font system from TeX when running.
Solution: get a version of TeX with 'kpsepath',
'MakeTeXPK' and 'MakeTeXTFM'.

* TeXmacs runs fine, but certain fonts are not displayed correctly.
Solution: This problem may have several causes:
o You use a recent version (>= 7.3) of RedHat Linux or
one of its clones. On such systems, the installation of
TeTeX is bugged and you need to change some permissions
in order to allow font generation by Metafont.
As root, type
chmod -R a+rw /var/lib/texmf/*
o You do not use a standard TeX/LaTeX distribution, such as TeTeX
(standard distributions come with scripts for generating fonts,
such as 'mktextfm' or 'MakeTeXTFM'). You may either install
a more standard TeX/LaTeX distribution, or download some
pregenerated fonts from texmacs.org.

* If you encounter other problems, or if our fixes don't work, then please
contact us at contact@texmacs.org.
77 changes: 2 additions & 75 deletions Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -212,8 +212,6 @@ BUNDLE_DMG = ../distr/TeXmacs.dmg
BUNDLE_CONTENTS = $(BUNDLE_APP)/Contents
BUNDLE_RESOURCES = $(BUNDLE_CONTENTS)/Resources
BUNDLE_TEXMACS = $(BUNDLE_RESOURCES)/share/TeXmacs
BUNDLE_FONTS = TeXmacs-windows-fonts-1.0-noarch.tar.gz
BUNDLE_EXTRA_FONTS = TeXmacs-extra-fonts-1.0-noarch.tar.gz

BUNDLE_MAIN: TEXMACS
$(MKDIR) ../distr
Expand Down Expand Up @@ -246,18 +244,6 @@ BUNDLE_MAIN: TEXMACS
$(CHMOD) 755 $(BUNDLE_TEXMACS)/progs/ice-9
$(CHMOD) 755 $(BUNDLE_TEXMACS)/progs/ice-9/debugger 2>/dev/null || :
$(CHMOD) 755 $(BUNDLE_TEXMACS)/progs/ice-9/debugging 2>/dev/null || :
if [ -f ../distr/$(BUNDLE_FONTS) ] ; then \
$(CP) ../distr/$(BUNDLE_FONTS) $(BUNDLE_TEXMACS) ; \
cd $(BUNDLE_TEXMACS) ; \
tar -zxf $(BUNDLE_FONTS); \
$(RM) $(BUNDLE_FONTS) ; \
fi
if [ -f ../distr/$(BUNDLE_EXTRA_FONTS) ] ; then \
$(CP) ../distr/$(BUNDLE_EXTRA_FONTS) $(BUNDLE_TEXMACS) ; \
cd $(BUNDLE_TEXMACS) ; \
tar -zxf $(BUNDLE_EXTRA_FONTS); \
$(RM) $(BUNDLE_EXTRA_FONTS) ; \
fi
# $(CP) /opt/local/bin/gs $(BUNDLE_RESOURCES)/bin
# $(CP) /opt/local/bin/ps2pdf $(BUNDLE_RESOURCES)/bin
# cp -R -f /opt/local/share/ghostscript $(BUNDLE_RESOURCES)/share
Expand Down Expand Up @@ -293,8 +279,7 @@ BUNDLE_LIBS:
BUNDLE: BUNDLE_MAIN
$(BUNDLE_SRC)/bundle-libs.sh $(BUNDLE_CONTENTS)/MacOS/TeXmacs
# $(BUNDLE_SRC)/deploy.sh $(BUNDLE_APP) $(BUNDLE_SRC)



DISKIMAGE: BUNDLE
$(RM) $(BUNDLE_DMG)
hdiutil create -srcfolder $(BUNDLE_APP) $(BUNDLE_DMG)
Expand All @@ -309,7 +294,6 @@ DISKIMAGE: BUNDLE
WIN_BUNDLE_SRC = misc/windows
WIN_BUNDLE_DIR = ../distr/TeXmacs-Windows
WIN_BUNDLE_BIN_DIR = $(WIN_BUNDLE_DIR)/bin
WIN_BUNDLE_FONTS = TeXmacs-windows-fonts-1.0-noarch.tar.gz

## WARNING: the following path list needs to be adapted manually
DLLPATH = $(PATH)
Expand All @@ -333,12 +317,6 @@ WIN_BUNDLE_MAIN: TEXMACS
export GUILE_LOAD_PATH; \
for I in $$GUILE_LOAD_PATH ; do $(CP) $$I $(WIN_BUNDLE_DIR)/progs/ ; done
find $(WIN_BUNDLE_DIR)/progs/ice-9 -type f -exec $(CHMOD) 644 {} \;
if [ -f ../distr/$(BUNDLE_FONTS) ] ; then \
$(CP) ../distr/$(BUNDLE_FONTS) $(WIN_BUNDLE_DIR) ; \
cd $(WIN_BUNDLE_DIR) ; \
tar -zxf $(BUNDLE_FONTS); \
$(RM) $(BUNDLE_FONTS) ; \
fi
# $(CP) /opt/local/bin/gs $(BUNDLE_RESOURCES)/bin
# $(CP) /opt/local/bin/ps2pdf $(BUNDLE_RESOURCES)/bin
# cp -R -f /opt/local/share/ghostscript $(BUNDLE_RESOURCES)/share
Expand All @@ -364,7 +342,6 @@ WIN_BUNDLE: WIN_BUNDLE_MAIN WIN_BUNDLE_LIBS

DEBIAN_BUNDLE_SRC = misc/debian
DEBIAN_BUNDLE_DIR = ../distr/TeXmacs-Debian
DEBIAN_BUNDLE_FONTS = TeXmacs-windows-fonts-1.0-noarch.tar.gz

DEBIAN_BUNDLE:
$(MKDIR) ../distr
Expand All @@ -373,16 +350,8 @@ DEBIAN_BUNDLE:
$(MKDIR) $(DEBIAN_BUNDLE_DIR)/$(tmdeb)
#$(MKDIR) $(DEBIAN_BUNDLE_DIR)/$(tmdeb)/debian
$(CP) -a * $(DEBIAN_BUNDLE_DIR)/$(tmdeb)/.

# Moving doc
$(CP) -ar ../doc/* $(DEBIAN_BUNDLE_DIR)/$(tmdeb)/TeXmacs/doc/.

# Moving fonts
if [ -f ../$(DEBIAN_BUNDLE_FONTS) ] ; then \
cd $(DEBIAN_BUNDLE_DIR)/$(tmdeb)/TeXmacs ; \
tar -zxf ../../../../$(DEBIAN_BUNDLE_FONTS); \
fi

$(RM) -r $(DEBIAN_BUNDLE_DIR)/.svn
$(RM) -r $(DEBIAN_BUNDLE_DIR)/*/.svn
$(RM) -r $(DEBIAN_BUNDLE_DIR)/*/*/.svn
Expand All @@ -392,45 +361,30 @@ DEBIAN_BUNDLE:
$(RM) -r $(DEBIAN_BUNDLE_DIR)/*/*/*/*/*/*/.svn
$(RM) -r $(DEBIAN_BUNDLE_DIR)/*/*/*/*/*/*/*/.svn
$(RM) -r $(DEBIAN_BUNDLE_DIR)/*/*/*/*/*/*/*/*/.svn

cd $(DEBIAN_BUNDLE_DIR)/$(tmdeb); make distclean
cd $(DEBIAN_BUNDLE_DIR); tar -czf $(tmdeb).tar.gz $(tmdeb)
cd $(DEBIAN_BUNDLE_DIR); tar -czf $(tmdebb).orig.tar.gz $(tmdeb)

# Moving Debian files
cd $(DEBIAN_BUNDLE_DIR)/$(tmdeb);
$(MKDIR) $(DEBIAN_BUNDLE_DIR)/$(tmdeb)/debian ;
$(CP) $(DEBIAN_BUNDLE_SRC)/* $(DEBIAN_BUNDLE_DIR)/$(tmdeb)/debian
cd $(DEBIAN_BUNDLE_DIR)/$(tmdeb); debuild -us -uc





###############################################################################
# Make a bundle for Fedora
###############################################################################

FEDORA_BUNDLE_SRC = misc/fedora
FEDORA_BUNDLE_DIR = ../distr/TeXmacs-Fedora
FEDORA_BUNDLE_FONTS = TeXmacs-windows-fonts-1.0-noarch.tar.gz

FEDORA_BUNDLE:
$(MKDIR) ../distr
$(RM) -r $(FEDORA_BUNDLE_DIR)
$(MKDIR) $(FEDORA_BUNDLE_DIR)
$(MKDIR) $(FEDORA_BUNDLE_DIR)/$(tmdeb)
$(CP) -a * $(FEDORA_BUNDLE_DIR)/$(tmdeb)/.

# Moving doc
$(CP) -ar ../doc/* $(FEDORA_BUNDLE_DIR)/$(tmdeb)/TeXmacs/doc/.

# Moving fonts
if [ -f ../$(FEDORA_BUNDLE_FONTS) ] ; then \
cd $(FEDORA_BUNDLE_DIR)/$(tmdeb)/TeXmacs ; \
tar -zxf ../../../../$(FEDORA_BUNDLE_FONTS); \
fi

$(RM) -r $(FEDORA_BUNDLE_DIR)/.svn
$(RM) -r $(FEDORA_BUNDLE_DIR)/*/.svn
$(RM) -r $(FEDORA_BUNDLE_DIR)/*/*/.svn
Expand All @@ -440,10 +394,8 @@ FEDORA_BUNDLE:
$(RM) -r $(FEDORA_BUNDLE_DIR)/*/*/*/*/*/*/.svn
$(RM) -r $(FEDORA_BUNDLE_DIR)/*/*/*/*/*/*/*/.svn
$(RM) -r $(FEDORA_BUNDLE_DIR)/*/*/*/*/*/*/*/*/.svn

cd $(FEDORA_BUNDLE_DIR)/$(tmdeb); make distclean
cd $(FEDORA_BUNDLE_DIR); tar -czf $(tmdeb).tar.gz $(tmdeb)

# Moving Fedora files
rpmdev-setuptree;
cp $(FEDORA_BUNDLE_SRC)/texmacs.spec $(HOME)/rpmbuild/SPECS/.
Expand All @@ -459,24 +411,15 @@ FEDORA_BUNDLE:

CENTOS_BUNDLE_SRC = misc/centos
CENTOS_BUNDLE_DIR = ../distr/TeXmacs-Centos
CENTOS_BUNDLE_FONTS = TeXmacs-windows-fonts-1.0-noarch.tar.gz

CENTOS_BUNDLE:
$(MKDIR) ../distr
$(RM) -r $(CENTOS_BUNDLE_DIR)
$(MKDIR) $(CENTOS_BUNDLE_DIR)
$(MKDIR) $(CENTOS_BUNDLE_DIR)/$(tmdeb)
$(CP) -a * $(CENTOS_BUNDLE_DIR)/$(tmdeb)/.

# Moving doc
$(CP) -ar ../doc/* $(CENTOS_BUNDLE_DIR)/$(tmdeb)/TeXmacs/doc/.

# Moving fonts
if [ -f ../$(CENTOS_BUNDLE_FONTS) ] ; then \
cd $(CENTOS_BUNDLE_DIR)/$(tmdeb)/TeXmacs ; \
tar -zxf ../../../../$(CENTOS_BUNDLE_FONTS); \
fi

$(RM) -r $(CENTOS_BUNDLE_DIR)/.svn
$(RM) -r $(CENTOS_BUNDLE_DIR)/*/.svn
$(RM) -r $(CENTOS_BUNDLE_DIR)/*/*/.svn
Expand All @@ -486,47 +429,34 @@ CENTOS_BUNDLE:
$(RM) -r $(CENTOS_BUNDLE_DIR)/*/*/*/*/*/*/.svn
$(RM) -r $(CENTOS_BUNDLE_DIR)/*/*/*/*/*/*/*/.svn
$(RM) -r $(CENTOS_BUNDLE_DIR)/*/*/*/*/*/*/*/*/.svn

cd $(CENTOS_BUNDLE_DIR)/$(tmdeb); make distclean
cd $(CENTOS_BUNDLE_DIR); tar -czf $(tmdeb).tar.gz $(tmdeb)

# Moving Centos files
mkdir -p ~/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
if [ !-f ~/.rpmmacros ]; then \
echo '%_topdir %(echo $HOME)/rpmbuild' > ~/.rpmmacros; \
fi

cp $(CENTOS_BUNDLE_SRC)/texmacs.spec $(HOME)/rpmbuild/SPECS/.
cd $(CENTOS_BUNDLE_DIR); $(CP) $(tmdeb).tar.gz $(HOME)/rpmbuild/SOURCES/.
cd $(HOME); rpmbuild -ba rpmbuild/SPECS/texmacs.spec
$(CP) -ar $(HOME)/rpmbuild/RPMS/* $(CENTOS_BUNDLE_DIR);
$(CP) -ar $(HOME)/rpmbuild/SRPMS/* $(CENTOS_BUNDLE_DIR);

###############################################################################
# Make a bundle for CentOs
# Make a bundle for Mandriva
###############################################################################


MANDRIVA_BUNDLE_SRC = misc/mandriva
MANDRIVA_BUNDLE_DIR = ../distr/TeXmacs-Mandriva
MANDRIVA_BUNDLE_FONTS = TeXmacs-windows-fonts-1.0-noarch.tar.gz

MANDRIVA_BUNDLE:
$(MKDIR) ../distr
$(RM) -r $(MANDRIVA_BUNDLE_DIR)
$(MKDIR) $(MANDRIVA_BUNDLE_DIR)
$(MKDIR) $(MANDRIVA_BUNDLE_DIR)/$(tmdeb)
$(CP) -a * $(MANDRIVA_BUNDLE_DIR)/$(tmdeb)/.

# Moving doc
$(CP) -ar ../doc/* $(MANDRIVA_BUNDLE_DIR)/$(tmdeb)/TeXmacs/doc/.

# Moving fonts
if [ -f ../$(MANDRIVA_BUNDLE_FONTS) ] ; then \
cd $(MANDRIVA_BUNDLE_DIR)/$(tmdeb)/TeXmacs ; \
tar -zxf ../../../../$(MANDRIVA_BUNDLE_FONTS); \
fi

$(RM) -r $(MANDRIVA_BUNDLE_DIR)/.svn
$(RM) -r $(MANDRIVA_BUNDLE_DIR)/*/.svn
$(RM) -r $(MANDRIVA_BUNDLE_DIR)/*/*/.svn
Expand All @@ -536,16 +466,13 @@ MANDRIVA_BUNDLE:
$(RM) -r $(MANDRIVA_BUNDLE_DIR)/*/*/*/*/*/*/.svn
$(RM) -r $(MANDRIVA_BUNDLE_DIR)/*/*/*/*/*/*/*/.svn
$(RM) -r $(MANDRIVA_BUNDLE_DIR)/*/*/*/*/*/*/*/*/.svn

cd $(MANDRIVA_BUNDLE_DIR)/$(tmdeb); make distclean
cd $(MANDRIVA_BUNDLE_DIR); tar -czf $(tmdeb).tar.gz $(tmdeb)

# Moving Mandriva files
mkdir -p ~/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
if [ !-f ~/.rpmmacros ]; then \
echo '%_topdir %(echo $HOME)/rpmbuild' > ~/.rpmmacros; \
fi

cp $(MANDRIVA_BUNDLE_SRC)/texmacs.spec $(HOME)/rpmbuild/SPECS/.
cd $(MANDRIVA_BUNDLE_DIR); $(CP) $(tmdeb).tar.gz $(HOME)/rpmbuild/SOURCES/.
cd $(HOME); rpmbuild -ba rpmbuild/SPECS/texmacs.spec
Expand Down
8 changes: 7 additions & 1 deletion TeXmacs/packages/documentation/tmdoc-markup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,9 @@

<assign|small-envbox|<macro|body|<with|color|#e8f0f0|<block|<tformat|<cwith|1|1|1|1|cell-lsep|0em>|<cwith|1|1|1|1|cell-rsep|0em>|<cwith|1|1|1|1|cell-bsep|0em>|<cwith|1|1|1|1|cell-tsep|0em>|<table|<row|<cell|<with|color|black|<arg|body>>>>>>>>>>

<assign|small-focus|<macro|body|<with|color|cyan|<block|<tformat|<cwith|1|1|1|1|cell-lsep|0em>|<cwith|1|1|1|1|cell-rsep|0em>|<cwith|1|1|1|1|cell-bsep|0em>|<cwith|1|1|1|1|cell-tsep|0em>|<table|<row|<cell|<with|color|black|<arg|body>>>>>>>>>>
<assign|small-focus|<macro|body|<with|color|cyan|<tabular|<tformat|<cwith|1|1|1|1|cell-lsep|0em>|<cwith|1|1|1|1|cell-rsep|0em>|<cwith|1|1|1|1|cell-bsep|0em>|<cwith|1|1|1|1|cell-tsep|0em>|<cwith|1|1|1|1|cell-lborder|1ln>|<cwith|1|1|1|1|cell-rborder|1ln>|<cwith|1|1|1|1|cell-bborder|1ln>|<cwith|1|1|1|1|cell-tborder|1ln>|<table|<row|<cell|<with|color|black|<arg|body>>>>>>>>>>

<assign|small-focus|<macro|body|<with|color|cyan|<resize|<block|<tformat|<cwith|1|1|1|1|cell-lsep|0em>|<cwith|1|1|1|1|cell-rsep|0em>|<cwith|1|1|1|1|cell-bsep|0em>|<cwith|1|1|1|1|cell-tsep|0em>|<table|<row|<cell|<with|color|black|<arg|body>>>>>>>|<minus|1l|1ln>|<minus|1b|1l>|<plus|1r|1ln>|<plus|1t|1ln>>>>>

<assign|big-envbox|<macro|body|<with|color|#e8f0f0|<block|<tformat|<cwith|1|1|1|1|cell-lsep|0em>|<cwith|1|1|1|1|cell-rsep|0em>|<cwith|1|1|1|1|cell-bsep|0em>|<cwith|1|1|1|1|cell-tsep|0em>|<twith|table-width|1par>|<twith|table-hmode|exact>|<cwith|1|1|1|1|cell-hyphen|t>|<table|<row|<\cell>
<with|color|black|<arg|body>>
Expand All @@ -213,6 +215,10 @@
<with|color|black|<arg|body>>
</cell>>>>>>>>

<assign|big-focus|<macro|body|<with|color|cyan|<resize|<block|<tformat|<cwith|1|1|1|1|cell-lsep|0em>|<cwith|1|1|1|1|cell-rsep|0em>|<cwith|1|1|1|1|cell-bsep|0em>|<cwith|1|1|1|1|cell-tsep|0em>|<twith|table-width|<minus|1par|2ln>>|<twith|table-hmode|exact>|<cwith|1|1|1|1|cell-hyphen|t>|<table|<row|<\cell>
<with|color|black|<arg|body>>
</cell>>>>>|<minus|1l|1ln>|<minus|1b|1l>|<plus|1r|1ln>|<plus|1t|1ln>>>>>

\;

<new-theorem|question|Question>
Expand Down
5 changes: 2 additions & 3 deletions TeXmacs/progs/generic/document-menu.scm
Original file line number Diff line number Diff line change
Expand Up @@ -310,9 +310,8 @@
(if (font-exists-in-tt? "DejaVuSerif")
("Dejavu" (init-env "font" "dejavu")))
("Lucida" (init-env "font" "x-lucida"))
(if (> (get-font-type) 0)
(if (font-exists-in-tt? "luxirr")
("Luxi" (init-env "font" "luxi"))))
(if (font-exists-in-tt? "luxirr")
("Luxi" (init-env "font" "luxi")))
(if (font-exists-in-tt? "STIXGeneral")
("Stix" (init-env "font" "stix")))
("Utopia" (init-env "font" "x-utopia"))
Expand Down
3 changes: 1 addition & 2 deletions TeXmacs/progs/init-texmacs.scm
Original file line number Diff line number Diff line change
Expand Up @@ -219,8 +219,7 @@
;(display "Booting fonts\n")
(use-modules (fonts fonts-ec) (fonts fonts-adobe) (fonts fonts-x)
(fonts fonts-math) (fonts fonts-foreign) (fonts fonts-misc)
(fonts fonts-composite))
(if (> (get-font-type) 0) (use-modules (fonts fonts-truetype)))
(fonts fonts-composite) (fonts fonts-truetype))
;(display* "time: " (- (texmacs-time) boot-start) "\n")

;(display "------------------------------------------------------\n")
Expand Down
19 changes: 1 addition & 18 deletions TeXmacs/progs/texmacs/texmacs/tm-print.scm
Original file line number Diff line number Diff line change
Expand Up @@ -66,28 +66,11 @@
(define (notify-printer-dpi var val)
(set-printer-dpi val))

(define notify-font-type-flag #f)
(define (notify-font-type var val)
(when notify-font-type-flag
(with font-cache "$TEXMACS_HOME_PATH/system/cache/font_cache.scm"
(system-remove (string->url font-cache)))
(set-message "Restart in order to let new font type take effect"
"font type"))
(set! notify-font-type-flag #t)
(with type
(cond ((== val "Metafont only") 0)
((== val "Metafont + Type 1") 1)
((== val "Type 1 + Metafont") 2)
((== val "Type 1 only") 3)
(else 2))
(set-font-type type)))

(define-preferences
("preview command" "default" notify-preview-command)
("printing command" "lpr" notify-printing-command)
("paper type" (get-default-paper-size) notify-paper-type)
("printer dpi" "600" notify-printer-dpi)
("font type" "Type 1 + Metafont" notify-font-type))
("printer dpi" "600" notify-printer-dpi))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Printing commands
Expand Down
Loading

0 comments on commit 4c9c2a8

Please sign in to comment.