Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

In texmaker, I create document_setting.tex for input some document attribution like the author, publisher, some attribution in acknowledgements. And then input document_setting in master document report.tex.

Here is a command for a new variable, in gayaan.sty I write:

\newcommand{\var}[2]{\newcommand{#1}{#2}}
\newcommand{\Var}[2]{\newcommand{#1}{\uppercase{#2}}} 

In document_setting.tex :

\Var{\titling}{Analisis dan Penghitungan Tingkat Kemiskinan}
\var{\subdir}{Subdirectorate of Constraction Statistics}
\var{\nopublication}{05340.1002}

In report.tex :

\documentclass{memoir}
\usepackage{gayaan}
\usepackage{lipsum}

\input{document_setting}

\begin{document}

\textbf{\Large{\titling}}
\subdir 
\nopublication

\chapter{Introduction}
\lipsum[5]
\section{example}
\lipsum[5]

\end{document}

And the result is success, but I can't do this in Lyx. Does anyone know how to do it in lyx? Create something like document-setting.tex?

share|improve this question
add comment

1 Answer

up vote 3 down vote accepted

You could open "Document settings" in the LyX main menu and put \input{document_setting} into the document preamble, or the corresponding code lines.

share|improve this answer
    
yes, I have tried it, last week I get an error message when tried with the same solution. this is my solution : insert child document in master document. child document as document-setting. and define new variabel in document preamble lyx. when I need to write the value of the parameter in another child document, I just write the parameter. I don't know why it just running well now. Thanks Stefan :-) –  Verly Sep 12 '11 at 12:35
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.