GeneralUsing outline without sections

General information and discussion about TeXnicCenter
Post Reply
guest

Using outline without sections

Post by guest »

So if I want to navigate through a big document how can I get things showing up in my outline without actually having \section{sectionname} within the document?

So say I have this:

Code: Select all

\begin{document}
 
\begin{question}{1}
\begin{problem}{(a)}

\end{problem}
\end{question}
% ..... more stuff

\begin{question}{9}
%... more content
\end{question}

\end{document}

How can I insert some kinda tag within each question that lets me find it in the texniccenter outline?

Recommended reading 2024:

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

NEW: TikZ book now 40% off at Amazon.com for a short time.

User avatar
cgnieder
Site Moderator
Posts: 2000
Joined: Sat Apr 16, 2011 7:27 pm

Using outline without sections

Post by cgnieder »

Neither the {question} nor the {problem} environments are standard environments. How/where are they defined (meaning: please post a complete Infominimal working example).

I don't understand what you mean by outline. The table of contents? PDF bookmarks?

Regards
site moderator & package author
MartinC
Posts: 153
Joined: Wed Jan 17, 2007 10:09 pm

Re: Using outline without sections

Post by MartinC »

They won't appear in the outline but they should appear in the "Environments" tab.
User avatar
cgnieder
Site Moderator
Posts: 2000
Joined: Sat Apr 16, 2011 7:27 pm

Using outline without sections

Post by cgnieder »

MartinC wrote:They won't appear in the outline but they should appear in the "Environments" tab.
I have not the least idea what you are talking about... is this some editor specific thing?
site moderator & package author
guest

Using outline without sections

Post by guest »

Yeah, they do appear in the environments tab, but it's not ordered and doesn't tell me which question number it is.

Here's a minimal working code example:

Code: Select all

\documentclass[12pt]{article}
 
\usepackage[margin=1in]{geometry} 
\usepackage{amsmath,amsthm,amssymb}
 
\newcommand{\N}{\mathbb{N}}
\newcommand{\Z}{\mathbb{Z}}
 
\newenvironment{problem}[2][Problem]{\begin{trivlist} 
\item[\hskip \labelsep {\bfseries #1} \hskip \labelsep {\bfseries #2.}]}{\end{trivlist}}

\newenvironment{question}[2][Question]{\begin{trivlist}
\item[\hskip \labelsep {\bfseries #1}\hskip \labelsep {\bfseries #2.}]}{\end{trivlist}}


\begin{document}
 
\begin{question}{1} 
\begin{problem}{(a)}
%... lalalala lots of text here
\end{problem}
\end{question}
%.... many more questions

\begin{question}{9} 
%Would be cool to have a reference to "Question 9" so I can just click it in the content toolbar and jump straight to here rather than search through the .tex file
\begin{problem}{(a)}
%... lalalala lots of text here
\end{problem}
\end{question}

\end{document}
Post Reply