Document ClassesInclude table into environment class

Information and discussion about specific document classes and how to create your own document classes.
Post Reply
thag1987
Posts: 17
Joined: Sun Jun 14, 2015 11:19 pm

Include table into environment class

Post by thag1987 »

Hey, I have the functioning section-environment

Code: Select all

\RequirePackage[absolute,overlay]{textpos} % absolute position of text
\setlength{\TPHorizModule}{1cm} % dimension for hsize, hpos
\setlength{\TPVertModule}{1cm} % dimension for vpos

\newenvironment{name}{%
	\renewcommand{\section}[1]{%
	\par\vspace{\baselineskip}{%
	\textbf{\large##1}}}
		\begin{textblock}{10}(0.5, 15)
		\obeycr
		}{%
		\restorecr
	  	\end{textblock}
	}
and would like to replace the text with a table.

Code: Select all

\begin{table}
     	\begin{tabular}{lll} % l-columns
     		h1 & h2 & h3 \\
     		a & b\multicolumn{2}{l}{}
     	\end{tabular}
     	\end{table}
What would be the easiest way to include the table in the class above?

Thanks in advance :)
Last edited by Stefan Kottwitz on Sun Nov 22, 2015 1:18 am, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Re: Include table into environment class

Post by Johannes_B »

I am sorry, but i am completely lost. Can you explain what you are trying to do? What class are you talking about? In general, it is not a good idea to mess with a class due to copyright reasons.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
thag1987
Posts: 17
Joined: Sun Jun 14, 2015 11:19 pm

Include table into environment class

Post by thag1987 »

Hey, I'd like to put the table in the environment, so that I can reference the structure multiple times in my document later.

So that I could just input

Code: Select all

\begin{environment-name}
\section{section-name}
	{h1}{h2}{h3}
	{a}{b}
\end{environment-name}
in the document and it's defined in the class to create the table out of this.

Sorry if that's not defining the problem accurately.
Post Reply