Generaluse newcommand with include

General information and discussion about TeXnicCenter
Post Reply
Robbeblue
Posts: 1
Joined: Tue Apr 21, 2015 2:10 pm

use newcommand with include

Post by Robbeblue »

Hi,

I'm using TexnicCenter 2.02 and writes my thesis with it.

However, I tried to use:

Code: Select all

\documentclass[a4paper]{srcbook} 
\usepackage{amsmath} 
\newcommand{\pathchp}{chapters}
\begin{document} 
include{\pathchp/introduction}
\end{document}
There is no problem in compiling it.
But in the file browser (in my case on the left side within TeXnicCenter) the file tree is not correct.

It should be like that (would be the case if I don't use the command \pathchp):
projectname
->chapters
-->introduction
mainfilename

But is:
projectname
->pathchp
-->introduction (in red color, since introduction.tex is not in a folder named pathchp)
mainfilename

I'm doing it wrong? Or should I do it in another way?

regarts,
Robert

Recommended reading 2024:

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

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

use newcommand with include

Post by Johannes_B »

Hi and welcome,

please check out the Ticket section over at the TeXniccenter project on sourceforge. Somebody might have asked something like that before.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
Post Reply