J'ai un mini projet avec cette arborescence :

 tree mwe-polyglossia
.
├── Makefile
├── mwe-polyglossia.tex
└── tmp/

En ligne de commande, la commande lualatex génèré sans souci le fichier PDF dans le répertoire ./tmp.

$ /usr/bin/lualatex --shell-escape -interaction=nonstopmode -output-directory ./tmp mwe-polyglossia
...
Output written on mwe-polyglossia.pdf (2 pages, 54228 bytes).
Transcript written on mwe-polyglossia.log.

En revanche, la commande make retourne une erreur dès que la tâche lualatex se termine. En conséquent, les tâches suivantes ne sont pas exécutées.

$ make
Clean...
rm -R -d ./tmp
Launch...
mkdir -p ./tmp
LuaLaTeX...
/usr/bin/lualatex --shell-escape -interaction=nonstopmode -output-directory ./tmp mwe-polyglossia > /dev/null
make: *** [mwe-polyglossia.mk:11 : lualatex] Erreur 1

Vous l'avez compris ... je cherche à supprimer cette erreur. :)

Le fichier Makefile

# Makefile for the MWE packagePolyglossia.

all: clean init lualatex out

init:
    @echo "Launch..."
    mkdir -p ./tmp

lualatex:
    @echo "LuaLaTeX..."
    /usr/bin/lualatex --shell-escape -interaction=nonstopmode -output-directory ./tmp mwe-polyglossia > /dev/null

out:
    @echo "Out..."
    mv ./tmp/mwe-polyglossia.pdf ./

clean:
    @echo "Clean..."
    rm -R -d ./tmp

Le fichier Latex :

\documentclass{article}%

\usepackage{geometry}%
\geometry{top=1.5cm, bottom=1.5cm, left=1.0cm, right=1.0cm}%
\usepackage{mwe}%
%
% Languages
\usepackage{polyglossia}%
\setmainlanguage{english}%
\setotherlanguages{french,hindi,sanskrit,greek,thai}%
%
% Quotes and quotations
\usepackage[autostyle=true]{csquotes}%
%
% Linguistic
\RequirePackage{gb4e}
\noautomath
\RequirePackage{cgloss4e}
%
% Main serif font for English (Latin alphabet) text
\setmainfont{Noto Serif}
\setsansfont{Noto Sans}
\setmonofont{Noto Mono}
%
% define fonts for other languages
\newfontfamily\devanagarifont[Script=Devanagari]{Noto Serif Devanagari}
\newfontfamily\greekfont[Script=Greek]{GFS Artemisia}
\newfontfamily\thaifont[Script=Thai]{Noto Serif Thai}
%
% Paragraph
\setlength{\parindent}{0em}%
\setlength{\parskip}{1em}
%
\title{How to Write Multilingual Text with Different Scripts in \LaTeX{} using Polyglossia}
\author{Lim Lian Tze}
\date{\today}
%
\begin{document}
%
\tableofcontents%
%
\section{Quotes}

\begin{exe}\ex
  \gll It was all very well to say \enquote{Drink me,}\ldots \\
  \\\vspace{-\baselineskip}
  \glt C’est bien facile à dire \enquote{Buvez-moi,}\ldots
\end{exe}

British English

\selectlanguage[variant=uk]{english}
It was all very well to say \enquote{Drink me,}
but the wise little Alice was not going to do that in a hurry. 
\enquote{No, I’ll look first,} she said, 
\enquote{and see whether it’s marked \enquote{poison} or not.} 
— Chapter 1, Down the Rabbit-Hole

American English

\selectlanguage[variant=us]{english}
It was all very well to say \enquote{Drink me,}
but the wise little Alice was not going to do that in a hurry. 
\enquote{No, I’ll look first,} she said, 
\enquote{and see whether it’s marked \enquote{poison} or not.} 
— Chapter 1, Down the Rabbit-Hole

Canadian English

\selectlanguage[variant=canadian]{english}
It was all very well to say \enquote{Drink me,}
but the wise little Alice was not going to do that in a hurry. 
\enquote{No, I’ll look first,} she said, 
\enquote{and see whether it’s marked \enquote{poison} or not.} 
— Chapter 1, Down the Rabbit-Hole

Australian English

\selectlanguage[variant=australian]{english}
It was all very well to say \enquote{Drink me,}
but the wise little Alice was not going to do that in a hurry. 
\enquote{No, I’ll look first,} she said, 
\enquote{and see whether it’s marked \enquote{poison} or not.} 
— Chapter 1, Down the Rabbit-Hole
%

French French

\selectlanguage[variant=french]{french}
C’est bien facile à dire \enquote{Buvez-moi,}
mais Alice était trop fine pour obéir à l’aveuglette. 
\enquote{Examinons d’abord,} dit-elle, 
\enquote{et voyons s’il y a écrit dessus \enquote{Poison} ou non.}

\section{Some languages}

\subsection{Hindi}

Here's some Hindi:

%% Hindi lorem ipsum text from http://generator.lorem-ipsum.info/_hindi
\begin{hindi}
जैसी जिम्मे ऎसाजीस दिनांक विवरण जनित बाटते भारतीय विचरविमर्श बढाता विषय वर्णित पुष्टिकर्ता किया बनाने ज्यादा लचकनहि पुर्णता 
वातावरण व्याख्या संस्क्रुति होभर चिदंश होसके अधिकार उसीएक् बीसबतेबोध अपनि हमेहो। संस्थान उपलब्धता बनाकर करने अपने प्राण 
समस्याओ बीसबतेबोध उपयोगकर्ता आशाआपस असक्षम बनाति देते बनाने सिद्धांत बीसबतेबोध ढांचामात्रुभाषा कर्य
\end{hindi}

\subsection{Sanskrit}

And here's some Sanskrit:

\begin{sanskrit}
सर्वे मानवाः स्वतन्त्राः समुत्पन्नाः वर्तन्ते अपि च, गौरवदृशा अधिकारदृशा च समानाः एव वर्तन्ते।
\end{sanskrit}

\subsection{Greek}

Here's some Greek:

%% Lorem ipsum from http://generator.lorem-ipsum.info/_greek
\begin{greek}
Οδιο διστα ιμπεδιτ φιμ ει, αδ φελ αβχορρεανθ ελωκυενθιαμ, εξ εσε εξερσι 
γυβεργρεν ηας. Ατ μει σολετ σριπτορεμ. Ιυς αλια λαβωρε θε. Σιθ κυωτ νυσκυαμ 
ιρασυνδια αν, ωμνιυμ ελιγενδι ιν πρι. Παρτεμ φερθερεμ συσιπιαντυρ εξ ιυς, ναμ 
τωλλιτ ιυφαρεθ αδφερσαριυμ εα, πρω πρωπριαε σαεφολα ιδ. Ατ πρι δολορ νυσκυαμ.
\end{greek}

\subsection{Thai}

Here's some Thai:

%% Lorem ipsum from http://lorem.in.th/
\begin{thai}
\raggedright
คอรัปชันจุ๊ยโปรดิวเซอร์ สถาปัตย์จ๊าบ แจ็กพ็อต ม้าหินอ่อน ซากุระคันถธุระ ฟีดสตาร์ท งี้ 
บอยคอตอิ่มแปร้สังโฆคำสาปแฟนซี ศิลปวัฒนธรรมไฟลท์จิ๊กโก๋กับดัก เจลพล็อตมาม่าซากุระดีลเลอร์ 
ซีนดัมพ์ แฮปปี้ เอ๊าะอุรังคธาตุซิม ฟินิกซ์เทรลเล่อร์อวอร์ด แคนยอนสมาพันธ์ ครัวซองฮัมอาข่าเอ็กซ์เพรส 
\end{thai}
%
%
\end{document}

Posée 17 Jan '23, 23:57

polymorphisme's gravatar image

polymorphisme
511822
Taux d'acceptation : 40%

Modifiée 18 Jan '23, 00:00

Que vaut $? (visible via la commande echo $?) après l'appel à lualatex? S'il n'y a pas d'erreur, ça doit être 0. En tous cas, make indique que c'est la valeur 1 qu'il récupère... d'où l'arrêt.

(20 Jan '23, 00:36) Paul Gaborit Paul%20Gaborit's gravatar image
4

Au passage, l'utilisation de latexmk est bien plus pratique pour gérer les compilations LaTeX dans un makefile.

(20 Jan '23, 00:38) Paul Gaborit Paul%20Gaborit's gravatar image

Ok, je ne savais pas que makefike et latexmk pouvaient s'utiliser ensemble. Je regarderai cette possibilité quand j'aurai un peu de temps. Merci.

(25 Jan '23, 15:07) polymorphisme polymorphisme's gravatar image

Pour "ignorer" une erreur (qui peut être légitime), il suffit de placer un - devant l'appel lualatex dans le Makefile.

Makefile va alors ignorer le code d'erreur et continuer autant que possible.

ligne 11 => -/usr/bin/lualatex ...

Cela n'élimine pas l'erreur.

Vive les makefiles ;-)

Lien permanent

Publiée 24 Jan '23, 12:29

GMR's gravatar image

GMR
265413
Taux d'acceptation : 6%

Modifiée 24 Jan '23, 13:29

denis's gravatar image

denis ♦♦
7.0k1510

Les formules de politesse et les signatures sont à éviter : celle(s) de votre contribution a (ont) été supprimée(s).

(24 Jan '23, 13:29) denis ♦♦ denis's gravatar image
Votre réponse
(dés)activer l'aperçu

Suivre cette question

Par courriel :

Une fois que vous serez enregistré, vous pourrez souscrire à n'importe quelle mise à jour ici

Par flux RSS :

Réponses

Réponses et commentaires

Bases de Markdown

  • *italique* ou _italique_
  • **gras** ou __gras__
  • Lien ::[texte](http://url.com/ "Titre ")
  • Image : ?![alt texte](/path/img.jpg "Titre ")
  • Liste numérotée : 1. Foo 2. Bar
  • Pour ajouter un passage à la ligne, ajoutez deux espaces à l'endroit où vous souhaitez que la ligne commence.
  • Les balises HTML de base sont également prises en charge.