[OS X TeX] Numerical commands

Alain Schremmer schremmer.alain at gmail.com
Fri Jul 9 00:51:18 CEST 2010


This is half off-topic:

With arrayjobx, I am defining commands such as, for instance, in 4.sty:

\newarray\IV            %4
\readarray{IV}          %Chapter 4. From Local Graphs to Global Graphs
	{% begin array
		%4-1
			CheckableItem1
		&4-2
			CheckableItem2
	[...]
		&%4-50
			CheckableItem50
	}%end array

I am using these commands as below and things work well but I was  
wondering if there might be a way to generate automatically the  
command names from the file names, for instance the command
	\IV
from the file name
	4

But the only thing I could think of, namely using
	\Roman{\jobname}
naturally does not work.

Hopeful regards
--schremmer




I use these commands in files such as

%!TEX root = ../CheckableItems-controls/\jobname.tex
%================================================
	%Row			Chapter IV
			\textbf{\finkbase}
		&	
		&	\textbf{From Loc Graphs to Global Graph}
		&	
		&	
		&	
		&	
		&	
		\\
\hhline{--------}%====================================
	%Row			Chapter IV
			\finkbase
		&	1
		&	\IV(1)
		&	
		&	\checkmark
		&	
		&	
		&	
		\\
	%Row			Chapter IV
[...]
			\finkbase
		&	50
		&	\IV(50)
		&	
		&	
		&	
		&	
		&	
		\\
		\midrule

where %!TEX root calls the file

\documentclass[11pt]{book}
	\usepackage{../StyleSheets/Preamble}
	\usepackage{../StyleSheets/CheckableItemsLists/\jobname}
\begin{document}
	\setlength\LTleft{-20mm}
	\begin{longtable}{|c|c|l|c|c|c|c|c|}
		\toprule
	%Row0
			Ch
		&	File
		&	Description
		&	Qz
		&	Hw
		&	Rt
		&	Rs
		&	Ex
		\\
		\midrule
\endfirsthead
		\midrule
	%Row0
			Ch
		&	File
		&	Description
		&	Qz
		&	Hw
		&	Rt
		&	Rs
		&	Ex
		\\
		\midrule
\endhead
		\midrule
		\multicolumn{8}{r}{\emph{Continued on next page}}
\endfoot
		\bottomrule
\endlastfoot
%================================================
\input{../CheckableItems-contents/\jobname}
%================================================
	\end{longtable}
\end{document}










  



More information about the macostex-archives mailing list