OFF TOPIC -- Latex Question

Polytropon freebsd at edvax.de
Tue Nov 20 06:43:38 UTC 2012


On Mon, 19 Nov 2012 15:02:51 -0500, Carmel wrote:
> I know this doesn't belong here; however I was hoping someone could
> give me a quick answer.
> 
> I have a document I am writing, actually a new set of By Laws for an
> organization. The format should be as shown here:
> 
> 		Article I
> 		  Name
> 
> Bla-bla
> 
> section 1
> 
> section 2
> 
> 		Article II
> 		  Members
> 
> 
> And so on.

Looks simple.



> I can accomplish this easily in MS Word;

No, you can't.

Means: You _can_ accomplish it in "Word", but it won't be
easy, and it won't last. :-)



> however, I have not
> been able to find a way to make Latex use "Article" as opposed to
> "Chapter" in its heading. I have to use "Article" I have Googled for
> over a day without success.

Those have predefined styles which are usually fine fof
common use. In your case, you need a custom definition.
I _may_ be possible that it already exists, but I think
you would be quicker by doing your own.



> I find it very strange that Latex doesn't
> have an "\article" definition like "\section" and "\chapter".

Because "article" first is a document class (document style),
and furthermore, it's just another "structure name" (heading).
The question could be, why is there no \subnumber or
\underparagraph? :-)



> Is there
> any way to do this or am I stuck with MS Word.

Luckily, you're not.



> BTW, I did investigate
> the "titlesec" package, but I did not see a way to accomplish it.

Sadly I'm not familiar with this package.


BUT.


What you're trying to create is something I've been requested
for typesetting a contract some years ago:

	         § 1
	    Pups und Furz

	         § 2
	  Schnarch und Dudel

So I think I can help here.


Define this in your preamble (before begin document):


\newcommand{\article}[1]{
\begin{center} {\bf Article \Roman{articlenr}\\#1} \end{center}
\addtocounter{articlenr}{1}}


You can easily put it into one line, I've made three here for
better reading.

Then _in_ your document (after begin document), _prior_ to your
first use of the \article command:


\newcounter{articlenr}
\setcounter{articlenr}{1}


And now you can use it:

\article{Name}

The name is foo.



\article{Members}

The members will be present.


And so on.


In my original document it has been called \para and \paranr
(to be used with the german word "Paragraph" and the sign §);
check if there is a _naming conflict_

If you don't need the bold font style, remove the {\bf and
the } (after \\#1) in the definition. It's dirty lower-level
hack anyway. :-)

If you need vertical spacing infront of a new paragraph
(additional space to what LaTeX puts there anyway), you
can use \vspace{1.0cm} for example - in the definition.

There is still one downside: It doesn't integrate into the
numbering scheme of \section, \subsection and so on. In my
case, I've been using the "enumerate" environment within
the articles for sectioning, which was sufficient in case
of that contract.



-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...


More information about the freebsd-questions mailing list