8
votes
1answer
78 views

How to use a string in an auxiliary file to update the header?

A document (typical of many) has a header which displays a timestamp in the form of a text string (“25 December 2013”). The timestamp string originates in a file "update" which is loaded with \input. ...
-1
votes
1answer
693 views

\newcommand in class - undefined control sequence

I'm trying to write a class based on article.cls and I'm having some trouble with \newcommand. Here go the complete files. Class file \NeedsTeXFormat{LaTeX2e}[1995/12/01] \ProvidesClass{NITclsD} ...
6
votes
1answer
101 views

Commands with Capital letters in their name

A topic that appear over and over is to explain the difference about commands such as \operatorname vs. \DeclareMathOperator. So far I've seen discussions about using one or the other, but no one ...
4
votes
2answers
221 views

Graphical vertical rule in tikz

I would like to make design (class), where I would like to have special type of paragraph that will have { character on left and will have height exactly same as height of whole paragraph. Also, I ...
4
votes
1answer
140 views

Class Design: Environment vs. Macro

I have seen What are the consideration when choosing either newcommand or newenvironment? but I think this is a little more specific. If it's a duplicate, then so be it. If the second part of the ...
4
votes
1answer
110 views

Create command to inline an image in a question?

How to create a command to can insert the image in a line of text question? Since I have a lot of question types made True/False, Short Answer types, Multiple choice, etc. I want the command to be ...
13
votes
3answers
1k views

Macro for Declaring Variables in Class Files

I'm designing a new LaTeX class, and trying to write a convenient helper command for declaring new 'variables' for use in the class. Specifically, say I want to use a variable called \foo. I'd like ...
25
votes
2answers
2k views

\newcommand vs \DeclareRobustCommand

I sort of understand the difference between the two. But that's not what I'm interested in—I just want to know, which one should I use? In general, when I'm creating commands in a package or class, ...
27
votes
1answer
624 views

Macro naming best practice?

Is there a preferred or generally accepted idiom for naming user defined macros? I notice that in the change from Tufte 3.5.0 to 3.5.2, for example, the names of the debugging macros have change, for ...
9
votes
3answers
198 views

Backward compatibility for command names

I have made a class file. It defines commands for use in document files. I want to change some of the command names, but I also want old document files to work without changing them. Here's an ...
6
votes
3answers
378 views

What is the difference between \myname and \my@name while writing a .cls file?

What is the difference between \myname and \my@name while writing a .cls file? Are they equivalent? Please let me know if it is necessary to post a minimal example. Edit: Let me ask my question more ...