LyX 的好莱坞文档课程

LyX 的好莱坞文档课程

我正在尝试 A4 PDF 输出并遇到以下问题:

  • 使用默认边距时,部分文本会被截断,也就是说,本应位于上一页底部的文本不会出现在下一页的顶部。我可以使用非默认边距来修复此问题,但我不知道是否有针对这些边距的推荐选项。
  • 不过,我主要担心的是,除非场景足够短,可以放在当前页面上,否则每个新场景都会从新页面开始。我可以使用 LaTeX 序言来改变这种行为,让场景始终或永远不会从新页面开始吗?
  • 我有一个不太重要的问题是,是否可以将场景标题以粗体显示,同样需要对前言进行一些编辑。

hollywood.cls可从https://www.lyx.org/trac/browser/lyxgit/lib/tex(GitHub 克隆:https://github.com/nicowilliams/lyx/tree/master/lib/tex

最小示例:

#LyX 2.2 created this file. For more info see http://www.lyx.org/
\lyxformat 508
\begin_document
\begin_header
\save_transient_properties true
\origin unavailable
\textclass hollywood
\begin_preamble
\pagenumbering{arabic}
\pagestyle{fancy}
\fancyhf{}
\rhead{}
\cfoot{\thepage}
\end_preamble
\use_default_options true
\maintain_unincluded_children false
\language british
\language_package default
\inputencoding auto
\fontencoding global
\font_roman "default" "default"
\font_sans "default" "default"
\font_typewriter "default" "default"
\font_math "auto" "auto"
\font_default_family default
\use_non_tex_fonts false
\font_sc false
\font_osf false
\font_sf_scale 100 100
\font_tt_scale 100 100
\graphics default
\default_output_format default
\output_sync 0
\bibtex_command default
\index_command default
\paperfontsize default
\spacing single
\use_hyperref false
\papersize a4paper
\use_geometry true
\use_package amsmath 1
\use_package amssymb 1
\use_package cancel 1
\use_package esint 1
\use_package mathdots 1
\use_package mathtools 1
\use_package mhchem 1
\use_package stackrel 1
\use_package stmaryrd 1
\use_package undertilde 1
\cite_engine basic
\cite_engine_type default
\biblio_style plain
\use_bibtopic false
\use_indices false
\paperorientation portrait
\suppress_date false
\justification true
\use_refstyle 1
\index Index
\shortcut idx
\color #008000
\end_index
\topmargin 2.5cm
\bottommargin 2.5cm
\footskip 1cm
\secnumdepth 3
\tocdepth 3
\paragraph_separation indent
\paragraph_indentation default
\quotes_language english
\papercolumns 1
\papersides 1
\paperpagestyle fancy
\tracking_changes false
\output_changes false
\html_math_output 0
\html_css_as_file 0
\html_be_strict false
\end_header

\begin_body

\begin_layout Scene
\noindent
Scene
\end_layout

\begin_layout Description
\noindent
Description
\end_layout

\begin_layout Dialogue
\noindent
Character 1: Dialogue
\end_layout

\begin_layout Dialogue
Character 2: When the next scene starts, it'll be on this page because it's
 short enough to fit.
\end_layout

\begin_layout Scene
\noindent
Scene 2
\end_layout

\begin_layout Dialogue
Character 2: By contrast, the next scene is so long it won't fit on this
 page, so it starts on the next one.
\end_layout

\begin_layout Scene
\noindent
Scene 3
\end_layout

\begin_layout Dialogue
Character 2: Sed ut perspiciatis unde omnis iste natus error sit voluptatem
 accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab
 illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo.
 Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit,
 sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt.
 Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur,
 adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore
 et dolore magnam aliquam quaerat voluptatem.
 Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit
 laboriosam, nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum
 iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae
 consequatur, vel illum qui dolorem eum fugiat quo voluptas nulla pariatur?
\end_layout

\begin_layout Dialogue
Character 1: Why are you saying all that?
\end_layout

\begin_layout Dialogue
Character 2: Well, it's based on a Roman-
\end_layout

\begin_layout Dialogue
Character 1: I know what lorem ipsum is.
 I mean, why are you quoting so much of it? Are you stalling?
\end_layout

\begin_layout Dialogue
Character 2: As aforementioned, this scene has to be long to demonstrate
 how page breaks work in this implementation of the Hollywood document class.
\end_layout

\begin_layout Dialogue
Character 1: Said when?
\end_layout

\begin_layout Dialogue
Character 2: Oh, that's right; you weren't in the last scene.
\end_layout

\begin_layout Description
\noindent
Character 1 reads the script's description of Scene 1.
\end_layout

\begin_layout Dialogue
Character 1: You definitely never mentioned this was about demonstrated
 what's going on with that document class.
\end_layout

\begin_layout Dialogue
Character 2: Well, I'll give you that.
\end_layout

\end_body
\end_document

答案1

我没有看到您提到的第一个问题,但对于后两个问题,我认为在文档设置中对 LaTeX 序言进行以下添加即可,以使场景从同一页面开始:

\renewcommand{\scene}[1]%
{\vspace{4bp}
\raggedright
\par
{\bfseries\uppercase{#1}}
}%

第一页将如下所示:

top of first page of output

如果您希望每个场景都从新的一页开始,请尝试

\renewcommand{\scene}[1]%
{\clearpage
{\bfseries\uppercase{#1}}
}%

示例.lyx文件:

#LyX 2.2 created this file. For more info see http://www.lyx.org/
\lyxformat 508
\begin_document
\begin_header
\save_transient_properties true
\origin unavailable
\textclass hollywood
\begin_preamble
\pagenumbering{arabic}
\pagestyle{fancy}
\fancyhf{}
\rhead{}
\cfoot{\thepage}


\renewcommand{\scene}[1]%
{\vspace{4bp}
\raggedright
\par
{\bfseries\uppercase{#1}}
}%


% this will make each scene start on a new page
%\renewcommand{\scene}[1]%
%{\clearpage
%{\bfseries\uppercase{#1}}
%}%


#LyX 2.2 created this file. For more info see http://www.lyx.org/
\lyxformat 508
\begin_document
\begin_header
\save_transient_properties true
\origin unavailable
\textclass hollywood
\begin_preamble
\pagenumbering{arabic}
\pagestyle{fancy}
\fancyhf{}
\rhead{}
\cfoot{\thepage}


\renewcommand{\scene}[1]%
{\vspace{4bp}
\raggedright
\par
{\bfseries\uppercase{#1}}
}%


% this will make each scene start on a new page
%\renewcommand{\scene}[1]%
%{\clearpage
%{\bfseries\uppercase{#1}}
%}%
\end_preamble
\use_default_options true
\maintain_unincluded_children false
\language british
\language_package default
\inputencoding auto
\fontencoding global
\font_roman "default" "default"
\font_sans "default" "default"
\font_typewriter "default" "default"
\font_math "auto" "auto"
\font_default_family default
\use_non_tex_fonts false
\font_sc false
\font_osf false
\font_sf_scale 100 100
\font_tt_scale 100 100
\graphics default
\default_output_format default
\output_sync 0
\bibtex_command default
\index_command default
\paperfontsize default
\spacing single
\use_hyperref false
\papersize a4paper
\use_geometry true
\use_package amsmath 1
\use_package amssymb 1
\use_package cancel 1
\use_package esint 1
\use_package mathdots 1
\use_package mathtools 1
\use_package mhchem 1
\use_package stackrel 1
\use_package stmaryrd 1
\use_package undertilde 1
\cite_engine basic
\cite_engine_type default
\biblio_style plain
\use_bibtopic false
\use_indices false
\paperorientation portrait
\suppress_date false
\justification true
\use_refstyle 1
\index Index
\shortcut idx
\color #008000
\end_index
\topmargin 2.5cm
\bottommargin 2.5cm
\footskip 1cm
\secnumdepth 3
\tocdepth 3
\paragraph_separation indent
\paragraph_indentation default
\quotes_language english
\papercolumns 1
\papersides 1
\paperpagestyle fancy
\tracking_changes false
\output_changes false
\html_math_output 0
\html_css_as_file 0
\html_be_strict false
\end_header

\begin_body

\begin_layout Scene
\noindent
Scene
\end_layout

\begin_layout Description
\noindent
Description
\end_layout

\begin_layout Dialogue
\noindent
Character 1: Dialogue
\end_layout

\begin_layout Dialogue
Character 2: When the next scene starts, it'll be on this page because it's
 short enough to fit.
\end_layout

\begin_layout Scene
\noindent
Scene 2
\end_layout

\begin_layout Dialogue
Character 2: By contrast, the next scene is so long it won't fit on this
 page, so it starts on the next one.
\end_layout

\begin_layout Scene
\noindent
Scene 3
\end_layout

\begin_layout Dialogue
Character 2: Sed ut perspiciatis unde omnis iste natus error sit voluptatem
 accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab
 illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo.
 Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit,
 sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt.
 Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur,
 adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore
 et dolore magnam aliquam quaerat voluptatem.
 Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit
 laboriosam, nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum
 iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae
 consequatur, vel illum qui dolorem eum fugiat quo voluptas nulla pariatur?
\end_layout

\begin_layout Dialogue
Character 1: Why are you saying all that?
\end_layout

\begin_layout Dialogue
Character 2: Well, it's based on a Roman-
\end_layout

\begin_layout Dialogue
Character 1: I know what lorem ipsum is.
 I mean, why are you quoting so much of it? Are you stalling?
\end_layout

\begin_layout Dialogue
Character 2: As aforementioned, this scene has to be long to demonstrate
 how page breaks work in this implementation of the Hollywood document class.
\end_layout

\begin_layout Dialogue
Character 1: Said when?
\end_layout

\begin_layout Dialogue
Character 2: Oh, that's right; you weren't in the last scene.
\end_layout

\begin_layout Description
\noindent
Character 1 reads the script's description of Scene 1.
\end_layout

\begin_layout Dialogue
Character 1: You definitely never mentioned this was about demonstrated
 what's going on with that document class.
\end_layout

\begin_layout Dialogue
Character 2: Well, I'll give you that.
\end_layout

\end_body
\end_document

相关内容