Hollyway updates; hopefully fix bugs with insetbib searching of bib file.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@735 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jean-Marc Lasgouttes 2000-05-17 13:40:40 +00:00
parent 9f509a6816
commit a4163d8238
7 changed files with 128 additions and 154 deletions

View File

@ -1,3 +1,20 @@
2000-05-17 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
* src/debug.C (showTags): enlarge the first column, now that we
have 6-digits debug codes.
* lib/layouts/hollywood.layout:
* lib/tex/hollywood.cls:
* lib/tex/brodway.cls:
* lib/layouts/brodway.layout: more commands and fewer
environments. Preambles moved in the .cls files. Broadway now has
more options on scene numbering and less whitespace (from Garst)
* src/insets/insetbib.C (getKeys): make sure that we are in the
document directory, in case the bib file is there.
* src/insets/insetbib.C (Latex): revert bogus change.
2000-05-16 Juergen Vigna <jug@sad.it> 2000-05-16 Juergen Vigna <jug@sad.it>
* src/insets/insettabular.C (UnlockInsetInInset): Changes to update * src/insets/insettabular.C (UnlockInsetInInset): Changes to update

View File

@ -22,25 +22,6 @@ DefaultFont
Color None Color None
EndFont EndFont
Preamble
\usepackage{fancyhdr}
\usepackage{extramarks}
\usepackage{ifthen}
\usepackage{lastpage}
\pagestyle{fancy}
\newcommand{\TheAuthor}{}
\newcommand{\Author}[1]{\renewcommand{\TheAuthor}{#1}}
\newcommand{\TheTitle}{}
\newcommand{\Title}[1]{\renewcommand{\TheTitle}{#1}}
\rhead{\thepage}
\lhead{\TheTitle}
\chead{\TheAuthor}
\cfoot{}
% We do not want any hyphenation
\sloppy
EndPreamble
# Standard style definition (I kept this one to provide a general case) # Standard style definition (I kept this one to provide a general case)
Style Standard Style Standard
@ -75,48 +56,51 @@ EndFont
End End
Style ACT Style ACT
Margin Dynamic Margin Static
LatexType Environment LatexType Command
LatexName act LatexName act
ParIndent "" ParIndent ""
ParSkip 0.8 ParSkip 0.8
TopSep 1.0 TopSep 1.0
KeepEmpty 1 # KeepEmpty 1
Align Center Align Center
AlignPossible Center AlignPossible Center
LabelType Counter_Chapter LabelType Counter_Chapter
LabelString "ACT " LabelString "ACT "
End End
Style ACT*
Margin Dynamic Style SCENE
LatexType Paragraph Margin Static
LatexName dummy LatexType Command
LatexName scene
ParIndent "" ParIndent ""
ParSkip 0.8 ParSkip 0.8
TopSep 1.0 TopSep 1.0
# KeepEmpty 1
Align Center Align Center
AlignPossible Center AlignPossible Center
LabelType No_Label LabelType Counter_Section
LabelString "SCENE "
End End
Style SCENE Style SCENE*
Margin Dynamic Margin Dynamic
LatexType Environment LatexType Command
LatexName scene LatexName scenestar
ParIndent "" ParIndent ""
ParSkip 0.8 ParSkip 0.8
TopSep 1.0 TopSep 1.0
KeepEmpty 1 KeepEmpty 1
Align Center Align Center
AlignPossible Center AlignPossible Center
LabelType Static # Counter_EnumI LabelType Static
LabelString "SCENE " LabelString "SCENE "
End End
Style AT_RISE: Style AT_RISE:
Margin Dynamic Margin Dynamic
LatexType Environment LatexType Command
LatexName atrise LatexName atrise
ParIndent "" ParIndent ""
ParSkip 0.8 ParSkip 0.8
@ -187,9 +171,9 @@ Style Dialogue
End End
Style CURTAIN Style CURTAIN
Margin Dynamic Margin Static
LatexType Paragraph LatexType Command
LatexName dummy LatexName curtain
ParIndent "" ParIndent ""
ParSkip 0.8 ParSkip 0.8
TopSep 1.0 TopSep 1.0

View File

@ -34,33 +34,6 @@ DefaultFont
Color None Color None
EndFont EndFont
Preamble
\usepackage{fancyhdr}
\usepackage{extramarks}
\usepackage{ifthen}
\usepackage{lastpage}
\pagestyle{fancy}
% This stuff is for a shooting script
% \lhead{\ifthenelse{ \not \value{page} = 1}{CONTINUED:}{}}
% \rfoot{\ifthenelse{ \not \value{page}=\pageref{LastPage}}{(CONT'D)}
% {\ifthenelse{\value{page}=\pageref{LastPage}}{(END)}{}}}
% This is what we want for a spec script
\rhead{\thepage.}
\cfoot{}
% \renewcommand{\headrulewitdh}{0pt}
% This one is needed to get real adobe courier, but you can use
% cmtt which is also correct
\renewcommand{\familydefault}{pcr}
% This is to negate the effect of the ~ that LyX adds everywhere
\let~=\space
% this protects you against the fact that TeX does not want to
% hyphenate in typewriter font. It is possible to enable
% hyphenation, but I do not remember how.
% That's good because we -do not- want any hyphenation.
\sloppy
EndPreamble
# Standard style definition (I kept this one to provide a general case) # Standard style definition (I kept this one to provide a general case)
Style Standard Style Standard
@ -91,9 +64,9 @@ End
# FADE_IN: and FADE_OUT: usually stand alone. If you want a more complicated # FADE_IN: and FADE_OUT: usually stand alone. If you want a more complicated
# FADE_IN e.g. FADE_IN on STELLA:, use the Narrative Style. # FADE_IN e.g. FADE_IN on STELLA:, use the Narrative Style.
Style FADE_IN: Style FADE_IN:
Margin Dynamic Margin Static
LatexType Environment LatexType Environment
LatexName fadein LatexName flushleft
ParIndent "" ParIndent ""
ParSkip 0.8 ParSkip 0.8
TopSep 1.0 TopSep 1.0
@ -111,8 +84,8 @@ End
# - DAY, or - NIGHT or similar to define lighting. # - DAY, or - NIGHT or similar to define lighting.
Style INT. Style INT.
Margin Dynamic Margin Dynamic
LatexType Environment LatexType Command
LatexName interior LatexName interiorshot
ParIndent "" ParIndent ""
ParSkip 0.8 ParSkip 0.8
TopSep 1.0 TopSep 1.0
@ -124,8 +97,8 @@ End
Style EXT. Style EXT.
Margin Dynamic Margin Dynamic
LatexType Environment LatexType Command
LatexName exterior LatexName exteriorshot
ParIndent "" ParIndent ""
ParSkip 0.8 ParSkip 0.8
TopSep 1.0 TopSep 1.0
@ -135,20 +108,6 @@ Style EXT.
LabelString "EXT. " LabelString "EXT. "
End End
# Dialogue style definition. Actor dialog
Style Dialogue
Margin Static
LatexType Environment
LatexName dialogue
LeftMargin MMMMMMMMMMMM
RightMargin MMMMMMMMMMMM
ParSkip 0.0
TopSep 0.0
BottomSep 0.0
Align Left
AlignPossible Left
LabelType No_Label
End
# Speaker style definition, identifies speaker ALL CAPS # Speaker style definition, identifies speaker ALL CAPS
Style Speaker Style Speaker
Margin Static Margin Static
@ -190,6 +149,21 @@ EndFont
End End
# Dialogue style definition. Actor dialog
Style Dialogue
Margin Static
LatexType Environment
LatexName dialogue
LeftMargin MMMMMMMMMMMM
RightMargin MMMMMMMMMMMM
ParSkip 0.0
TopSep 0.0
BottomSep 0.0
Align Left
AlignPossible Left
LabelType No_Label
End
# Transition style definition ALL CAPS # Transition style definition ALL CAPS
Style Transition Style Transition
Margin Static Margin Static
@ -205,7 +179,7 @@ End
Style FADE_OUT: Style FADE_OUT:
Margin Dynamic Margin Dynamic
LatexType Environment LatexType Command
LatexName fadeout LatexName fadeout
ParIndent "" ParIndent ""
ParSkip 0.8 ParSkip 0.8

View File

@ -1,16 +1,11 @@
%% Author: Garst R. Reese reese@isn.net %% Author: Garst R. Reese reese@isn.net
%% This is file `broadway.cls', which provides the current %% This is file `broadway.cls', which provides a format for writing
%% preferred format for submission of "spec" scripts %% plays.
%% It is a pretty dull and uninteresting format, but it sells
%% Derived from report.cls. There is probably still a lot of stuff %% Derived from report.cls. There is probably still a lot of stuff
%% that could be deleted. %% that could be deleted.
\NeedsTeXFormat{LaTeX2e} \NeedsTeXFormat{LaTeX2e}
\ProvidesClass{broadway} [1999/02/09 v1.0 uses broadway.layout] \ProvidesClass{broadway} [1999/02/09 v1.0 uses broadway.layout]
\newcounter{act}
%\newcounter{scene}[act]
\renewcommand{\ref}[1]{#1} \renewcommand{\ref}[1]{#1}
\renewcommand{\theact}{\Roman{act}}
%\renewcommand{\thescene}{SCENE\arabic{scene}}
\newcommand\@ptsize{} \newcommand\@ptsize{}
\newif\if@restonecol \newif\if@restonecol
\newif\if@titlepage \newif\if@titlepage
@ -112,10 +107,6 @@
\@beginparpenalty -\@lowpenalty \@beginparpenalty -\@lowpenalty
\@endparpenalty -\@lowpenalty \@endparpenalty -\@lowpenalty
\@itempenalty -\@lowpenalty \@itempenalty -\@lowpenalty
%\renewcommand\theenumi{\@arabic\c@enumi}
%\newcommand\labelenumi{SCENE\theenumi.}
%\renewcommand\p@enumii{\theenumi}
%\newcommand\labelitemi{\textbullet}
\newenvironment{titlepage} \newenvironment{titlepage}
{% {%
\if@twocolumn \if@twocolumn
@ -166,30 +157,21 @@
\else \else
\onecolumn \onecolumn
\fi \fi
\usepackage{fancyhdr}
\newenvironment{atrise}% \usepackage{extramarks}
{\filbreak \usepackage{ifthen}
\begin{list}{}{% \usepackage{lastpage}
\leftmargin \rightmargin} \pagestyle{fancy}
\item[]AT RISE:\ignorespaces} \lhead{\TheTitle}
{\unskip \end{list}} \chead{\TheAuthor}
\cfoot{}
\newenvironment{scene}% \rhead{\thepage}
{\filbreak % We do not want any hyphenation
\stepcounter{scene} \sloppy
\begin{center}{}{% \newcommand{\TheAuthor}{}
\center} \newcommand{\Author}[1]{\renewcommand{\TheAuthor}{#1}}
\item[]SCENE \ignorespaces} \newcommand{\TheTitle}{}
{\unskip \end{center}} \newcommand{\Title}[1]{\renewcommand{\TheTitle}{#1}}
\newenvironment{act}%
{\filbreak
\stepcounter{act}
%\setcounter{scene}{0}
\begin{center}{}{%
\center}
\item[]ACT \theact \ignorespaces}
{\unskip \end{center}}
\newenvironment{dialogue}% \newenvironment{dialogue}%
{\raggedright {\raggedright
@ -199,7 +181,7 @@
\setlength{\parsep}{0mm} \setlength{\parsep}{0mm}
\setlength{\topsep}{0mm}} \setlength{\topsep}{0mm}}
\item[] \ignorespaces} \item[] \ignorespaces}
{\unskip \end{list}} {\unskip \end{list}}%
\newenvironment{narrative}% \newenvironment{narrative}%
{\raggedright {\raggedright
@ -219,6 +201,7 @@
\center \center
\setlength{\parsep}{0mm} \setlength{\parsep}{0mm}
\setlength{\topsep}{2mm}} \setlength{\topsep}{2mm}}
\vspace{-24bp}
\item[] \ignorespaces} \item[] \ignorespaces}
{\unskip \end{center}} {\unskip \end{center}}
@ -226,10 +209,22 @@
{\fontshape{it}\selectfont{} {\fontshape{it}\selectfont{}
\begin{center}{}{% \begin{center}{}{%
\center \center
\vspace{-30bp}
\setlength{\parsep}{0mm} \setlength{\parsep}{0mm}
\setlength{\topsep}{0mm}} \setlength{\topsep}{0mm}}
\item[](\ignorespaces} \item[](\ignorespaces}
{\unskip)\end{center}} {\unskip )\end{center}}
\newcounter{actctr}
\newcounter{scenectr}[actctr]
\renewcommand{\theactctr}{\Roman{actctr}}
\renewcommand{\thescenectr}{\arabic{scenectr}}
\providecommand{\atrise}{\par\raggedright AT RISE: }%
\providecommand{\scenestar}{\filbreak\par\centering SCENE }%
\providecommand{\scene}{%
\filbreak\par\stepcounter{scenectr}\centering SCENE \thescenectr}%
\providecommand{\act}{%
\stepcounter{actctr}\filbreak\setcounter{scenectr}{0}\par\centering ACT \theactctr\par}%
\providecommand{\curtain}{\filbreak\par\centering CURTAIN \par}%
\endinput \endinput
%% %%

View File

@ -151,26 +151,35 @@
\else \else
\onecolumn \onecolumn
\fi \fi
\newenvironment{fadein}% \usepackage{fancyhdr}
{\begin{list}{}{% \usepackage{extramarks}
\leftmargin \rightmargin} \usepackage{ifthen}
\item[]FADE IN:\ignorespaces} \usepackage{lastpage}
{\unskip \end{list}} \pagestyle{fancy}
% This stuff is for a shooting script
% \lhead{\ifthenelse{ \not \value{page} = 1}{CONTINUED:}{}}
% \rfoot{\ifthenelse{ \not \value{page}=\pageref{LastPage}}{(CONT'D)}
% {\ifthenelse{\value{page}=\pageref{LastPage}}{(END)}{}}}
\newenvironment{interior}%
{\filbreak
\begin{list}{}{%
\leftmargin \rightmargin}
\item[]INT. \ignorespaces}
{\unskip \end{list}}
\newenvironment{exterior}%
{filbreak
\begin{list}{}{%
\leftmargin \rightmargin}
\item[]EXT. \ignorespaces}
{\unskip \end{list}}
% This is what we want for a spec script
\rhead{\thepage.}
\cfoot{}
% \renewcommand{\headrulewitdh}{0pt}
% This one is needed to get real adobe courier, but you can use
% cmtt which is also correct
\renewcommand{\familydefault}{pcr}
% This is to negate the effect of the ~ that LyX adds everywhere
\let~=\space
% this protects you against the fact that TeX does not want to
% hyphenate in typewriter font. It is possible to enable
% hyphenation, but I do not remember how.
% That's good because we -do not- want any hyphenation.
\sloppy
\newcommand{\fadein}{\filbreak\raggedright\par FADE IN: }%
\newcommand{\fadeout}{\filbreak\raggedright\par FADE OUT }%
\newcommand{\interiorshot}{\filbreak\raggedright\par INT. }%
\newcommand{\exteriorshot}{\filbreak\raggedright\par EXT. }%
\newenvironment{dialogue}% \newenvironment{dialogue}%
{\raggedright {\raggedright
\begin{list}{}{% \begin{list}{}{%
@ -209,12 +218,7 @@
\item[](\ignorespaces} \item[](\ignorespaces}
{\unskip)\end{list}} {\unskip)\end{list}}
\newenvironment{fadeout}%
{\filbreak
\begin{list}{}{%
\leftmargin \rightmargin}
\item[]FADE OUT: \ignorespaces}
{\unskip \end{list}}
\endinput \endinput

View File

@ -27,6 +27,7 @@ struct error_item {
}; };
static error_item errorTags[] = { static error_item errorTags[] = {
{ Debug::NONE, "none", "No debugging message"},
{ Debug::INFO, "info", "General information"}, { Debug::INFO, "info", "General information"},
{ Debug::INIT, "init", "Program initialisation"}, { Debug::INIT, "init", "Program initialisation"},
{ Debug::KEY, "key", "Keyboard events handling"}, { Debug::KEY, "key", "Keyboard events handling"},
@ -35,7 +36,6 @@ static error_item errorTags[] = {
{ Debug::LYXRC, "lyxrc", "Configuration files reading"}, { Debug::LYXRC, "lyxrc", "Configuration files reading"},
{ Debug::KBMAP, "kbmap", "Custom keyboard definition"}, { Debug::KBMAP, "kbmap", "Custom keyboard definition"},
{ Debug::LATEX, "latex", "LaTeX generation/execution"}, { Debug::LATEX, "latex", "LaTeX generation/execution"},
{ Debug::DEPEND, "depend", "Dependency information"},
{ Debug::MATHED, "mathed", "Math editor"}, { Debug::MATHED, "mathed", "Math editor"},
{ Debug::FONT, "font", "Font handling"}, { Debug::FONT, "font", "Font handling"},
{ Debug::TCLASS, "tclass", "Textclass files reading"}, { Debug::TCLASS, "tclass", "Textclass files reading"},
@ -44,8 +44,8 @@ static error_item errorTags[] = {
{ Debug::ROFF, "roff", "Keep *roff temporary files"}, { Debug::ROFF, "roff", "Keep *roff temporary files"},
{ Debug::ACTION, "action", "User commands"}, { Debug::ACTION, "action", "User commands"},
{ Debug::LYXLEX, "lyxlex", "The LyX Lexxer"}, { Debug::LYXLEX, "lyxlex", "The LyX Lexxer"},
{ Debug::DEPEND, "depend", "Dependency information"},
{ Debug::INSETS, "insets", "LyX Insets"}, { Debug::INSETS, "insets", "LyX Insets"},
{ Debug::NONE, "none", "No debugging message"},
{ Debug::ANY, "any", "All debugging messages"} { Debug::ANY, "any", "All debugging messages"}
}; };
@ -94,7 +94,7 @@ void Debug::showLevel(ostream & o, Debug::type level)
void Debug::showTags(ostream & os) void Debug::showTags(ostream & os)
{ {
for (int i = 0 ; i < numErrorTags ; ++i) for (int i = 0 ; i < numErrorTags ; ++i)
os << setw(5) << errorTags[i].level os << setw(7) << errorTags[i].level
<< setw(10) << errorTags[i].name << setw(10) << errorTags[i].name
<< " " << errorTags[i].desc << '\n'; << " " << errorTags[i].desc << '\n';
os.flush(); os.flush();

View File

@ -18,6 +18,7 @@
#include "bibforms.h" #include "bibforms.h"
#include "lyxtext.h" #include "lyxtext.h"
#include "support/filetools.h" #include "support/filetools.h"
#include "support/path.h"
using std::ostream; using std::ostream;
using std::ifstream; using std::ifstream;
@ -339,13 +340,10 @@ int InsetBibtex::Latex(ostream & os,
string db_in = getContents(); string db_in = getContents();
db_in = split(db_in, adb, ','); db_in = split(db_in, adb, ',');
while(!adb.empty()) { while(!adb.empty()) {
if (!owner->niceFile) { if (!owner->niceFile &&
string fname IsFileReadable(MakeAbsPath(adb, owner->filepath)+".bib"))
= findtexfile(ChangeExtension(adb, "bib"), adb = MakeAbsPath(adb, owner->filepath);
"bib");
if (!fname.empty())
adb = ChangeExtension(fname, string());
}
db_out += adb; db_out += adb;
db_out += ','; db_out += ',';
db_in= split(db_in, adb,','); db_in= split(db_in, adb,',');
@ -379,6 +377,8 @@ string InsetBibtex::getKeys(char delim)
// owner = current_view->buffer(); // owner = current_view->buffer();
//} //}
Path p(owner->filepath);
string tmp, keys; string tmp, keys;
string bibfiles = getContents(); string bibfiles = getContents();
bibfiles = split(bibfiles, tmp, ','); bibfiles = split(bibfiles, tmp, ',');