From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/15426 Path: main.gmane.org!not-for-mail From: =?ISO-8859-15?Q?Peter_M=FCnster?= Newsgroups: gmane.comp.tex.context Subject: \hyphenatedfile Date: Sat, 19 Jun 2004 17:21:36 +0200 (CEST) Sender: ntg-context-admin@ntg.nl Message-ID: Reply-To: ntg-context@ntg.nl NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=ISO-8859-15 Content-Transfer-Encoding: 8BIT X-Trace: sea.gmane.org 1087658780 26716 80.91.224.253 (19 Jun 2004 15:26:20 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 19 Jun 2004 15:26:20 +0000 (UTC) Original-X-From: ntg-context-admin@ntg.nl Sat Jun 19 17:26:12 2004 Return-path: Original-Received: from ref.vet.uu.nl ([131.211.172.13] helo=ref.ntg.nl) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1BbhjP-0005qG-00 for ; Sat, 19 Jun 2004 17:26:11 +0200 Original-Received: from ref.ntg.nl (localhost.localdomain [127.0.0.1]) by ref.ntg.nl (Postfix) with ESMTP id C67BA10AFA; Sat, 19 Jun 2004 17:26:07 +0200 (MEST) Original-Received: from postfix4-1.free.fr (postfix4-1.free.fr [213.228.0.62]) by ref.ntg.nl (Postfix) with ESMTP id 5541B10ACF for ; Sat, 19 Jun 2004 17:23:33 +0200 (MEST) Original-Received: from gaston.free.fr (rennes-1-62-147-97-207.dial.proxad.net [62.147.97.207]) by postfix4-1.free.fr (Postfix) with ESMTP id 019F714248C for ; Sat, 19 Jun 2004 17:23:32 +0200 (CEST) Original-Received: by gaston.free.fr (Postfix, from userid 500) id EA74C13C074; Sat, 19 Jun 2004 17:21:36 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by gaston.free.fr (Postfix) with ESMTP id E61D314807D for ; Sat, 19 Jun 2004 17:21:36 +0200 (CEST) X-X-Sender: peter@gaston.free.fr Original-To: ConTeXt list Errors-To: ntg-context-admin@ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.0.13 Precedence: bulk X-Reply-To: ntg-context@ntg.nl List-Help: List-Post: List-Subscribe: , List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.comp.tex.context:15426 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:15426 Hello, I try to build a macro, that prints special characters as \type and hyphenates as \hyphenatedfile. I can use now : and ;, but the characters ?, !, # and \ are still not working, and spaces are lost. Could someone help please? Here are my tries: file env.tex: \startenvironment env \useencoding[ffr] \mainlanguage[fr] \unprotect \def\reactivateLostActivations{\catcode`:=\@@active\catcode`;=\@@active} \appendtoks\reactivateLostActivations\to\everystarttext \bgroup \catcode`;=12 \catcode`?=12 \catcode`!=12 \gdef\cleanedupSemicolon{;} \gdef\cleanedupQuestmark{?} \gdef\cleanedupExclamark{!} \catcode`\;=\@@active \catcode`?=\@@active \catcode`!=\@@active \gdef\protectChars{\let;\cleanedupSemicolon % \let?\cleanedupQuestmark \let!\cleanedupExclamark % does not work \protectlabels} \egroup \protect \def\File#1{{\tt\protectChars\hyphenatedfile{#1}}} %\let\File\typ % does not work %\let\File\type % does not work \stopenvironment file test.tex: \environment env \starttext bla: bla? bla! bla; bla, this works now. \hskip10cm \File{lost space/file with;strange:charac?ters~/ < and > /end!} % And it would be nice, if I could use the following characters too: % ?, !, # and \ \stoptext In fact, I'm looking for something like this: \documentclass[frenchb]{article} \usepackage[latin1]{inputenc} \usepackage{listings,babel} \lstset{breaklines=true,basicstyle=\ttfamily} \begin{document} \hsize8cm\noindent \lstinline{hööah:aloh/aa?lha llol!loh%lloh#allhal\lohhll;ohohal~loll ohalölo} \end{document} Perhaps, it could be possbible to port listings.sty to ConTeXt? Greetings, Peter -- http://pmrb.free.fr/contact/ _____________________________________ FilmSearch engine: http://f-s.sf.net/