![Floats in ConTeXt: Ändern des Beschriftungsnamens und Funktionieren des \input-Befehls](https://rvso.com/image/281590/Floats%20in%20ConTeXt%3A%20%C3%84ndern%20des%20Beschriftungsnamens%20und%20Funktionieren%20des%20%5Cinput-Befehls.png)
Ich habe einen neuen Float für Logikschaltungen definiert, genannt logigram
:
\definefloat [logigram] [logigrams]
Ich nutze die Modi von ConTeXt (d. h. bedingte Verarbeitung) und erstelle parallel eine französische und eine englische Version meines Dokuments:
\starttext
\startmode [english]
\placelogigram [right] {Logigram of a negation} {\input negation.tikz}
The logic circuit of a negation is the opposite logigram.
\stopmode
\starmode [french]
\placelogigram [right] {Logigramme d'une négation} {\input negation.tikz}
Le circuit logique d'une négation est le logigramme ci-contre.
\stopmode
\stoptext
Jetzt möchte ich \placelogigram
den Standardbeschriftungsnamen „Logigram“ auf Englisch, aber „Logigramme“ auf Französisch erstellen.
Mir ist auch aufgefallen, dass ConTeXt mein Tikz-Bild nicht finden kann, negation.tikz.tex
wenn der Befehl \input
darin verwendet wird \placelogigram
. Dies ist die Datei negation.tikz.tex
:
%\usemodule [tikz]
%\usetikzlibrary [circuits.logic.US]
\starttikzpicture [circuit logic US]
\node [not gate, point down, draw] at (0, 0) (notGate) {};
\draw (notGate.input) -- ++(up:0.5) node [above] {$\phi$};
\draw (notGate.output) -- ++(down:0.5);
\stoptikzpicture
Vielen Dank im Voraus für jede Hilfe.
Antwort1
Festlegen von Französisch als Sprache beim Kompilieren im french
Modus:
\startmode [french]
\language [french]
\setcharacterspacing [frenchpunctuation]
\mainlanguage [french]
\stopmode
und ändern:
\definefloat [logigram] [logigrams]
Zu:
\definefloat [logigram] [logigrams]
\setuplabeltext [fr] [logigram=Logigramme~]
löst das Problem mit dem Untertitelnamen.
Ich habe \startplacelogigram ... \stopplacelogigram
anstelle von verwendet, \placelogigram
um Folgendes zu erhalten \input
:
\startmode [english]
\startplacelogigram [location=right, title={Logigram of a negation.}]
\input negation.tikz
\stopplacelogigram
The logic circuit of a negation is the opposite logigram.
\stopmode
\startmode [french]
\startplacelogigram [location=right, title={Logigramme d'une négation.}]
\input negation.tikz
\stopplacelogigram
Le circuit logique d'une négation est le logigramme ci-contre.
\stopmode
BEARBEITEN. Wie in den Kommentaren angegeben, \startplacelogigram ... \stopplacelogigram
verwenden Sie zur Vermeidung \input filename \relax
oder \ReadFile {filename}
anstelle von \input filename
.