• No results found

The drac package

N/A
N/A
Protected

Academic year: 2021

Share "The drac package"

Copied!
3
0
0

Bezig met laden.... (Bekijk nu de volledige tekst)

Hele tekst

(1)

The drac package

Josselin Noirel and Yvon Henel

August 14, 2008

Abstract

This package provides \DeclareRobustActChar and \ReDeclareRobAct

Char macros.

One uses \DeclareRobustActChar as \DeclareRobustCommand but the

macro \protects the active character when it appears in a moving argument,

see ltdefns.dtx in /latex/base/.

\ReDeclareRobActChar redefines the active character, previously defined

with \DeclareRobustActChar, the way \renewcommand does for usual

com-mands.

Résumé

Ce module définit \DeclareRobustActChar et \ReDeclareRobActChar.

Vous devriez avoir obtenu, avec ce document, les fichiers drac-fr.dtx et

drac-fr.pdf qui donnent la version française de cette documentation.

Contents

1

Introduction

1

2

Usage

2

1

Introduction

When the macro appeared on fr.comp.text.tex in the thread “la question à 100 euros1”, dated

8th april 2004, its name was \DeclareRobustActiveCharacter which had the advantage to be totally descriptive but one drawback viz. it was really long. To alleviate the pains of the typist but mainly to avoid a complete mess in the index of this document, I have taken it upon myself to rename it \DeclareRobustActChar.

When reading the above mentioned thread, one can easily see that I —i. e. Yvon Henel, TEXnicien de surface— just asked for code which was provided, very friendly and efficiently, by Josselin Noirel.

I played a bit with Josselin’s code but some months later life hit me hard which would not have been a surprise if I had really understood the classical wisdom I have been educated in during my younger days. But “the light, which experience gives, is a lantern on the stern, which shines only on the waves behind us” as wrote Samuel Taylor Coleridge. Thence when Josselin, who was rather busy as a student, sent me with an email in February 2005 a second version where \ReDeclareRobActChar appeared I was in no state to benefit from it.

This document corresponds to the file drac v1, dated 2008/08/14.

1. The 100 euro question.

(2)

Then time, the great healer, did fly. . . I’m back to the world and Josselin has left for other shores.

The code exists and works. So instead of leaving it to rot somewhere on my hard disk and for I have spent somme hours to update my own packages I have decided to launch drac on the vast ocean of life. I just provide the wrapping and push the tiny thing on the nearest CTAN server.

I do suppose that one understood that I can’t promise to maintain the following code I hardly understand and that only because of the comments given by Josselin. So now is the time to let Josselin be at the helm. . . and the keyboard.

Le TEXnicien de surface

2

Usage

This command has the usual syntax of the \newcommand and friends: it accepts a

starred form depending on wether the active character accepts \long arguments

(i.e. an argument could contain a paragraph ending) or not; next comes the active

character; an optionnal number of arguments, an optionnal argument which is the

optionnal value of the first argument, and then the actual definition. Here are the

valid syntaxes:

\DeclareRobustActChar{

〈active character〉}[n]%

[

〈default value of the first argument〉]{〈definition〉}

\DeclareRobustActChar{

〈active character〉}[n]{〈definition〉}

\DeclareRobustActChar{

〈active character〉}{〈definition〉}

\DeclareRobustActChar*{

〈active character〉}[n]%

[

〈default value of the first argument〉]{〈definition〉}

\DeclareRobustActChar*{〈active character〉}[n]{〈definition〉}

\DeclareRobustActChar*{〈active character〉}{〈definition〉}

Then one will be able to use the active character in moving arguments (in the

arguments of \caption for instance) and in other cases which demand robust

commands (\protected@edef,\protected@write, and so on).

Similarly \ReDeclareRobActChar has the same syntax than \renewcommand

so here are the possible syntaxes:

\ReDeclareRobActChar{

〈active character〉}[n]%

[

〈default value of the first argument〉]{〈definition〉}

\ReDeclareRobActChar{

〈active character〉}[n]{〈definition〉}

\ReDeclareRobActChar{

〈active character〉}{〈definition〉}

\ReDeclareRobActChar*{

〈active character〉}[n]%

[〈default value of the first argument〉]{〈definition〉}

\ReDeclareRobActChar*{〈active character〉}[n]{〈definition〉}

\ReDeclareRobActChar*{〈active character〉}{〈definition〉}

(3)

Change History

v0

General: Missed to be the 1st public

version . . . 1

v0.1

General: Almost have been the 1st

public version . . . 1

Introduces \ReDeclareRobActChar

. . . 1

v1

General: First public version

. . . .

1

Referenties

GERELATEERDE DOCUMENTEN

This command produces the bar code including ISBN using information entered as the package options.. The command, however, accepts an optional argument within

Assigns a value to a LaTeX hcounteri previously initialized with \newcounter. This command is similar in concept and syntax to \setcounter except for two major differences. 1)

Note that the optional argument for the command counts the lines for the

If the list of default values is shorter than the list of test tokens, the special -NoValue- marker will be returned (as for the e-type argument).. Thus

Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive

Expands tokens following the hfunctioni, removing any token with catcode 10 (space), then sets \g_primargs_token (globally) equal to the first non-space token and calls the

L A TEX command \bar.) This macro accepts an optional argument for a

The new commands \intitlebreak and \intitlebreakvs (vs= vertical skip) are used to force a line break in the title that disappears when the title itself is re-used outside the