Document ClassesMaking a macro long -- after the fact

Information and discussion about specific document classes and how to create your own document classes.
Post Reply
hendrick
Posts: 8
Joined: Mon Sep 07, 2009 3:58 pm

Making a macro long -- after the fact

Post by hendrick »

I would like to be able to change a non-\long macro into a \long macro. Here is a toy example of what I am looking to do:

Code: Select all

\def\xxx#1{{\em #1}}
\makeitlong\xxx
\xxx{This is a test\par in two paragraphs.}
(What's missing, of course, is a "\makeitlong" command.)

If you're curious, my actual situation involves using a package (namely, datatool.sty) that defines some commands as ordinary macros when when I need them to be \long macros. Of course I can create a modified version of datatool.sty (called, say, longdata.sty), but I want to share this with others without taking the responsibility of maintaining such a complicated package! I'd rather just \RequirePackage{datatool} and then change the specific commands I need, if that is possible.

Any ideas? Thank you!

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

Post Reply