From 99fdc2362c54c5af10ae3994564bc09bd4848a84 Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Sun, 11 Apr 2004 22:01:17 +0000 Subject: [PATCH] (text): dump \inputencoding{} for text. --- ChangeLog | 7 +++++++ input/les-nereides.ly | 2 +- scm/output-tex.scm | 9 +++++++-- scripts/lilypond.py | 2 +- tex/lilyponddefs.tex | 1 + 5 files changed, 17 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7619a19332..40b9e3b317 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,12 @@ +2004-04-12 Han-Wen Nienhuys + + * scm/output-tex.scm (text): dump \inputencoding{} for text. + 2004-04-11 Han-Wen Nienhuys + * scripts/lilypond.py (global_latex_preamble): remove latin1 from + \usepackage{inputenc} + * lily/paper-book.cc (classic_output): don't advance Offset for TeX output. diff --git a/input/les-nereides.ly b/input/les-nereides.ly index a5f6142583..740d21aa7f 100644 --- a/input/les-nereides.ly +++ b/input/les-nereides.ly @@ -1,6 +1,6 @@ #(ly:set-option 'old-relative) \version "2.2.0" - +\encoding "latin1" \header { composer = "ARTHUR GRAY" title = "LES NÉRÉIDES" diff --git a/scm/output-tex.scm b/scm/output-tex.scm index 0bfed37745..6c080460d5 100644 --- a/scm/output-tex.scm +++ b/scm/output-tex.scm @@ -315,7 +315,9 @@ (define (text font s) (let* - ((mapping #f)) + ((mapping #f) + (input-enc-name (assoc-get 'input-name (ly:font-encoding-alist font) )) + ) ;; TODO: we'd better do this for PS only ;; LaTeX gets in the way, and we need to remap @@ -323,7 +325,10 @@ ;; (assoc-get 'char-mapping (ly:font-encoding-alist font)))) - (string-append "\\hbox{\\" (font-command font) "{}" + (string-append "\\hbox{\\" (font-command font) + (if (string? input-enc-name) + (string-append "\\inputencoding{" input-enc-name "}") + "{}") (output-tex-string (if (vector? mapping) (reencode-string mapping s) diff --git a/scripts/lilypond.py b/scripts/lilypond.py index fc9566ed4a..b8ebb636cc 100644 --- a/scripts/lilypond.py +++ b/scripts/lilypond.py @@ -401,7 +401,7 @@ def global_latex_preamble (extra): # FIXME, must (only) from lilypond-bin s += r''' -\usepackage[latin1]{inputenc} +\usepackage{inputenc} \pagestyle{empty} %%PREVIEW%%''' diff --git a/tex/lilyponddefs.tex b/tex/lilyponddefs.tex index 5869d13626..a64e8e01ef 100644 --- a/tex/lilyponddefs.tex +++ b/tex/lilyponddefs.tex @@ -56,6 +56,7 @@ \documentclass[a4paper]{article} %% safe-mode \nofiles + \usepackage{inputenc} \pagestyle{empty} \lilypondifundefined{lilypondclassic} { -- 2.39.2