* \hyphenatedfile
@ 2004-06-19 15:21 Peter Münster
2004-06-21 14:06 ` \hyphenatedfile Hans Hagen
0 siblings, 1 reply; 3+ messages in thread
From: Peter Münster @ 2004-06-19 15:21 UTC (permalink / raw)
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/
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: \hyphenatedfile
2004-06-19 15:21 \hyphenatedfile Peter Münster
@ 2004-06-21 14:06 ` Hans Hagen
2004-06-21 15:05 ` \hyphenatedfile Peter Münster
0 siblings, 1 reply; 3+ messages in thread
From: Hans Hagen @ 2004-06-21 14:06 UTC (permalink / raw)
Peter Münster wrote:
> <>Hello,
>
> I try to build a macro, that prints special characters as \type and
> hyphenates as \hyphenatedfile.
>
you mean something like \typ{whatever} (i.e. \type without e)
Hans
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: \hyphenatedfile
2004-06-21 14:06 ` \hyphenatedfile Hans Hagen
@ 2004-06-21 15:05 ` Peter Münster
0 siblings, 0 replies; 3+ messages in thread
From: Peter Münster @ 2004-06-21 15:05 UTC (permalink / raw)
On Mon, 21 Jun 2004, Hans Hagen wrote:
> > I try to build a macro, that prints special characters as \type and
> > hyphenates as \hyphenatedfile.
> >
> you mean something like \typ{whatever} (i.e. \type without e)
Yes, but I don't see any difference between
\starttext
\hskip10cm \typ{lost space/file with;strange:charac?ters~/ < and > /end!}
\stoptext
and
\starttext
\hskip10cm \type{lost space/file with;strange:charac?ters~/ < and > /end!}
\stoptext
Peter
--
http://pmrb.free.fr/contact/
_____________________________________
FilmSearch engine: http://f-s.sf.net/
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2004-06-21 15:05 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-06-19 15:21 \hyphenatedfile Peter Münster
2004-06-21 14:06 ` \hyphenatedfile Hans Hagen
2004-06-21 15:05 ` \hyphenatedfile Peter Münster
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).