Broadwood fixes from Garst; toc/ref menus fixes

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@763 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jean-Marc Lasgouttes 2000-05-22 13:20:51 +00:00
parent e33924c4eb
commit f807fe1d6c
8 changed files with 150 additions and 145 deletions

View File

@ -1,3 +1,25 @@
2000-05-22 Garst R. Reese <reese@isn.net>
* layouts/hollywood.layout, broadway.layout : move Dialogue to top
of list, change all references to Environment to Command
* tex/hollywood.cls : rewrite environments as commands, add
\uppercase to interiorshot and exteriorshot to force uppecase.
* tex/broadway.cls : rewrite environments as commands. Tweak
whitespace.
2000-05-22 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
* src/menus.C (Add_to_toc_menu): fix the code which limits the
size of items: use a constant intead of the hardcoded 40, and more
importantly do not remove the %m and %x tags added at the end.
(Add_to_refs_menu): use vector::size_type instead of
unsigned int as basic types for the variables. _Please_ do not
assume that size_t is equal to unsigned int. On an alpha, this is
unsigned long, which is _not_ the same.
* src/language.C (initL): remove language "hungarian", since it
seems that "magyar" is better.
2000-05-22 Juergen Vigna <jug@sad.it>
* src/CutAndPaste.C: hopefully fixed memory the problem defenitively!
@ -29,9 +51,7 @@
2000-05-19 Dekel Tsur <dekel@math.tau.ac.il>
* src/commandtags.h
* src/LyXAction.C
* src/lyxfunc.C (Dispatch): Added LFUN_LOFVIEW, LFUN_LOTVIEW
and LFUN_LOAVIEW

View File

@ -22,23 +22,24 @@ DefaultFont
Color None
EndFont
# Standard style definition (I kept this one to provide a general case)
Style Standard
# Dialogue style definition. Actor dialog
Style Dialogue
Margin Static
LatexType Paragraph
LatexName dummy
ParIndent ""
ParSkip 0.4
LatexType Command
LatexName dialogue
LeftMargin MMMMMMM
RightMargin MMMMMMM
Align Left
AlignPossible Block, Left, Right, Center
Labeltype No_Label
AlignPossible Left
LabelType No_Label
End
# Narrative description of Scene
Style Narrative
Margin Static
LatexType Environment
LatexType Command
LatexName narrative
ParIndent ""
ParSkip 0.8
@ -71,7 +72,7 @@ End
Style SCENE
Margin Static
Margin Dynamic
LatexType Command
LatexName scene
ParIndent ""
@ -115,7 +116,7 @@ End
# Speaker style definition, identifies speaker ALL CAPS
Style Speaker
Margin Static
LatexType Environment
LatexType Command
LatexName speaker
ParSkip 0.4
TopSep 0.4
@ -128,9 +129,10 @@ End
# The ( and ) will automatically appear on screen, so don't type any.
Style Parenthetical
Margin Static
LatexType Environment
LatexType Command
LatexName parenthetical
LeftMargin MMMMMMMMMMMMMMMMM
LeftMargin MMMMMMMMMMMMM
RightMargin MMMM
TopSep 0.0
BottomSep 0.0
ParSkip 0.0
@ -158,17 +160,6 @@ LabelFont
EndFont
End
# Dialogue style definition. Actor dialog
Style Dialogue
Margin Static
LatexType Environment
LatexName dialogue
LeftMargin MM
RightMargin MM
Align Left
AlignPossible Left
LabelType No_Label
End
Style CURTAIN
Margin Static
@ -184,6 +175,18 @@ Style CURTAIN
LabelString "CURTAIN"
End
# Standard style definition (I kept this one to provide a general case)
Style Standard
Margin Static
LatexType Paragraph
LatexName dummy
ParIndent ""
ParSkip 0.4
Align Left
AlignPossible Block, Left, Right, Center
Labeltype No_Label
End
Style Title
Margin Static
LatexType Command

View File

@ -35,23 +35,26 @@ DefaultFont
EndFont
# Standard style definition (I kept this one to provide a general case)
Style Standard
# Dialogue style definition. Actor dialog
Style Dialogue
Margin Static
LatexType Paragraph
LatexName dummy
ParIndent ""
ParSkip 0.4
LatexType Command
LatexName dialogue
LeftMargin MMMMMMMMMMMM
RightMargin MMMMMMMMMMMM
ParSkip 0.0
TopSep 0.0
BottomSep 0.0
Align Left
AlignPossible Block, Left, Right, Center
Labeltype No_Label
AlignPossible Left
LabelType No_Label
End
# Narrative description of Scene
Style Narrative
Margin Static
LatexType Environment
LatexType Command
LatexName narrative
ParIndent ""
ParSkip 0.8
@ -111,7 +114,7 @@ End
# Speaker style definition, identifies speaker ALL CAPS
Style Speaker
Margin Static
LatexType Environment
LatexType Command
LatexName speaker
LeftMargin MMMMMMMMMMMMMMMMMMMMMM
ParSkip 0.0
@ -126,7 +129,7 @@ End
# The ( and ) will automatically appear on screen, so don't type any.
Style Parenthetical
Margin Static
LatexType Environment
LatexType Command
LatexName parenthetical
LeftMargin MMMMMMMMMMMMMMMMM
TopSep 0.0
@ -149,20 +152,6 @@ EndFont
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
Style Transition
@ -188,9 +177,20 @@ Style FADE_OUT:
AlignPossible Left
KeepEmpty 1
LabelType Static
LabelString "FADE OUT: "
LabelString "FADE OUT"
End
# Standard style definition (I kept this one to provide a general case)
Style Standard
Margin Static
LatexType Paragraph
LatexName dummy
ParIndent ""
ParSkip 0.4
Align Left
AlignPossible Block, Left, Right, Center
Labeltype No_Label
End

View File

@ -173,53 +173,36 @@
\newcommand{\TheTitle}{}
\newcommand{\Title}[1]{\renewcommand{\TheTitle}{#1}}
\newenvironment{dialogue}%
\newcommand{\dialogue}[1]%
{\raggedright
\begin{list}{}{%
\setlength{\leftmargin}{.5in}
\setlength{\rightmargin}{.5in}
\setlength{\parsep}{0mm}
\setlength{\topsep}{0mm}}
\item[] \ignorespaces}
{\unskip \end{list}}%
\hspace{1in}
\parbox{4in}{#1}
}
\newenvironment{narrative}%
{\raggedright
\filbreak
\fontshape{it}\selectfont{}
\begin{list}{}{%
\setlength{\leftmargin}{0in}
\setlength{\rightmargin}{0in}
\setlength{\parsep}{2mm}
\setlength{\topsep}{2mm}}
\item[] \ignorespaces}
{\unskip \end{list}}
\newenvironment{speaker}%
\newcommand{\narrative}[1]%
{\filbreak
\begin{center}{}{%
\center
\setlength{\parsep}{0mm}
\setlength{\topsep}{2mm}}
\vspace{-24bp}
\item[] \ignorespaces}
{\unskip \end{center}}
\raggedright{#1}
}
\newcommand{\speaker}[1]%
{\filbreak
\vspace{12pt}
\hspace{2.25in}{#1}
\vspace{6pt}
}
\newcommand{\parenthetical}[1]%
{\raggedright
\hspace{1.75in}
\parbox{3in}{(#1)}
\vspace{6pt}}
\newenvironment{parenthetical}%
{\fontshape{it}\selectfont{}
\begin{center}{}{%
\center
\vspace{-30bp}
\setlength{\parsep}{0mm}
\setlength{\topsep}{0mm}}
\item[](\ignorespaces}
{\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{\atrise}[1]{\par\raggedright AT RISE: #1 }%
\providecommand{\scenestar}[1]{\filbreak\par\centering SCENE #1 }%
\providecommand{\scene}{%
\filbreak\par\stepcounter{scenectr}\centering SCENE \thescenectr}%
\providecommand{\act}{%

View File

@ -15,6 +15,10 @@
\DeclareOption{letterpaper}
{\setlength\paperheight {11in}%
\setlength\paperwidth {8.5in}}
\DeclareFontFamily{OT1}{pcr}{\hyphenchar\font=-1}
\DeclareFontShape{OT1}{pcr}{m}{n}{<12> pcrr7t}{}
\DeclareFontFamily{T1}{pcr}{\hyphenchar\font=-1}
\DeclareFontShape{T1}{pcr}{m}{n}{<12> pcrr8t}{}
\DeclareOption{12pt}{\renewcommand\@ptsize{0}}
\DeclareOption{12pt}{\renewcommand\@ptsize{1}}
\DeclareOption{12pt}{\renewcommand\@ptsize{2}}
@ -176,50 +180,38 @@
% 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{\fadein}[1]{\filbreak\raggedright\par FADE IN: \uppercase{#1}}%
\newcommand{\fadeout}{\filbreak\raggedright\par FADE OUT }%
\newcommand{\interiorshot}{\filbreak\raggedright\par INT. }%
\newcommand{\exteriorshot}{\filbreak\raggedright\par EXT. }%
\newenvironment{dialogue}%
\newcommand{\interiorshot}[1]{\filbreak\raggedright\par INT. \uppercase{#1}}%
\newcommand{\exteriorshot}[1]{\filbreak\raggedright\par EXT. \uppercase{#1}}%
\newcommand{\dialogue}[1]%
{\raggedright
\begin{list}{}{%
\setlength{\leftmargin}{1.2in}
\setlength{\rightmargin}{1.2in}
\setlength{\parsep}{0mm}
\setlength{\topsep}{0mm}}
\item[] \ignorespaces}
{\unskip \end{list}}
\hspace{1in}
\parbox{4in}{#1}
\vspace{6pt}
}
\newenvironment{narrative}%
\newcommand{\narrative}[1]%
{\filbreak
\raggedright
\begin{list}{}{%
\leftmargin \rightmargin
\setlength{\parsep}{2mm}
\setlength{\topsep}{2mm}}
\item[] \ignorespaces}
{\unskip \end{list}}
\vspace{6pt}
\raggedright{#1}
\vspace{6pt}
}
\newenvironment{speaker}%
\newcommand{\speaker}[1]%
{\filbreak
\begin{list}{}{%
\setlength{\leftmargin}{2.5in}
\setlength{\partopsep}{4mm}
\setlength{\parsep}{0mm}
\setlength{\topsep}{0mm}}
\item[] \ignorespaces}
{\unskip \end{list}}
\newenvironment{parenthetical}%
{\begin{list}{}{%
\setlength{\leftmargin}{2in}
\setlength{\parsep}{0mm}
\setlength{\topsep}{0mm}}
\item[](\ignorespaces}
{\unskip)\end{list}}
\vspace{12pt}
\hspace{2.25in}{#1}
\vspace{6pt}
}
\newcommand{\parenthetical}[1]%
{\raggedright
\hspace{1.75in}
\parbox{3in}{(#1)}
\vspace{6pt}}
\endinput
%%

View File

@ -69,7 +69,11 @@ void LangInit::initL()
{ "german", N_("German"), false },
{ "greek", N_("Greek"), false },
{ "hebrew", N_("Hebrew"), true },
{ "hungarian", N_("Hungarian"), false },
/* According to Zrubecz Laszlo <zrubi@k2.jozsef.kando.hu>,
"magyar" is better. I kept it here in case we want
to provide aliasing of languages. (JMarc)
*/
//{ "hungarian", N_("Hungarian"), false },
{ "irish", N_("Irish"), false },
{ "italian", N_("Italian"), false },
{ "lsorbian", N_("Lsorbian"), false },

View File

@ -16,7 +16,7 @@
struct Row;
/** All these variavles should be explained. Matthias?
/** All these variables should be explained. Matthias?
*/
struct LyXCursor {
///

View File

@ -1288,14 +1288,15 @@ void Add_to_toc_menu(vector<Buffer::TocItem> const & toclist,
int menu, vector<int> & menus, FL_OBJECT * ob)
{
unsigned int const max_number_of_items = 25;
unsigned int const max_item_length = 40;
if (to - from <= max_number_of_items) {
for (unsigned int i = from; i < to; ++i) {
string line(4 * max(0, toclist[i].depth - depth),' ');
line += toclist[i].str;
line += "%x";
line += tostr(i + 1);
string entry(line, 0, 40);
string entry(line, 0, max_item_length);
entry += "%x";
entry += tostr(i + 1);
fl_addtopup(menu, entry.c_str());
}
@ -1309,9 +1310,9 @@ void Add_to_toc_menu(vector<Buffer::TocItem> const & toclist,
if (new_pos == pos + 1) {
string line(4 * max(0, toclist[pos].depth - depth), ' ');
line += toclist[pos].str;
line += "%x";
line += tostr(pos + 1);
string entry(line, 0, 40);
string entry(line, 0, max_item_length);
entry += "%x";
entry += tostr(pos + 1);
fl_addtopup(menu, entry.c_str());
} else {
@ -1321,8 +1322,9 @@ void Add_to_toc_menu(vector<Buffer::TocItem> const & toclist,
depth + 1, menu2, menus,ob);
string line(4 * max(0, toclist[pos].depth - depth), ' ');
line += toclist[pos].str;
line += "%m";
string entry(line, 0, 40);
string entry(line, 0, max_item_length);
entry += "%m";
fl_addtopup(menu, entry.c_str(), menu2);
}
pos = new_pos;
@ -1394,22 +1396,23 @@ void Menus::ShowTocMenu(FL_OBJECT * ob, long)
void Add_to_refs_menu(vector<string> const & label_list, int offset,
int menu, vector<int> & menus, FL_OBJECT * ob)
{
unsigned int const max_number_of_items = 25;
unsigned int const max_number_of_items2 = 20;
typedef vector<string>::size_type size_type;
size_type const max_number_of_items = 25;
size_type const max_number_of_items2 = 20;
if (label_list.size() <= max_number_of_items)
for (unsigned int i = 0; i < label_list.size(); ++i)
for (size_type i = 0; i < label_list.size(); ++i)
fl_addtopup(menu,
(label_list[i] + "%x"
+tostr(i+offset)).c_str());
else
for (unsigned int i = 0; i < label_list.size();
for (size_type i = 0; i < label_list.size();
i += max_number_of_items2) {
unsigned int j = std::min(label_list.size(),
size_type j = std::min(label_list.size(),
i+max_number_of_items2);
int menu2 = fl_newpup(FL_ObjWin(ob));
menus.push_back(menu2);
for (unsigned int k = i; k < j; ++k)
for (size_type k = i; k < j; ++k)
fl_addtopup(menu2,
(label_list[k] + "%x"
+ tostr(k+offset)).c_str());