
答案1
正如提到的類似的報價這裡。 CLS文件使用文檔類文章。似乎最簡單的方法是為您的論文設定本地aaltothesis.layout
文件,但尚未工作:下面記錄了錯誤。另一種選擇是將其放在下面/Applications/LyX.app/Contents/Resources/layouts/
,但到目前為止至少在我的 OSX Lyx 中不起作用。
Aaltothesis.cls 自訂文件類別載入許多選項
\documentclass[english,12pt,a4paper,pdftex,elec,utf8]{aaltothesis}
其中一些(例如 inputenc)會自動載入到 Lyx 中:現在需要了解如何在 Lyx 中載入自訂文件類別。
建設中。
OS X 中的步驟
- 根據Aalto CLS 檔案中的
article
行編寫 Lyx 佈局:\DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}}%
$ cd /; find . -iname "article.layout"
./Applications/LyX.app/Contents/Resources/layouts/article.layout
我們需要透過先更改行來自訂此佈局
\DeclareLaTeXClass{Article (Standard Class)}
這樣#% Do not delete the line below; configure depends on this # \DeclareLaTeXClass[aaltothesis]{Aalto Math dept} # \DeclareCategory{Articles} # Article textclass definition file. Taken from initial LyX source code # Author : Matthias Ettrich <[email protected]> # Transposed by Pascal André <[email protected]> # Heavily modifed and enhanced by serveral developers. Format 49 Input stdclass.inc SecNumDepth 3 TocDepth 3 NoStyle Chapter NoCounter chapter NoStyle Chapter* Style Part Align Left AlignPossible Left TopSep 2 BottomSep 1.5 Font Size Larger EndFont End Style Part* Align Left AlignPossible Left TopSep 2 BottomSep 1.5 Font Size Larger EndFont End Provides inputec 1
使用舊的 aaltothesis.sty 文件,
\usepackage[sci]{aaltothesis}
例如這裡或使用新的類別文件,\documentclass[sci,parameters]{aaltothesis}
但問題是它在 Lyx 中並不完全簡單。…
嘗試錯誤
6 月 8 日:所有試驗尚未發揮作用。我的朋友告訴我,ELEC 模板應該\documentclass[english,12pt,a4paper,pdftex]{report} \usepackage[sci]{aaltothesis}
在序言中以這種方式使用(請參閱試驗 3)。我遇到了奇怪的 Inputenc 錯誤,加載了兩次東西,還無法看出是什麼原因造成的。
步驟 3 的試驗 1(尚未運行,使用本地佈局跳過它):如果 LaTex 找不到 *.layout 文件,則使用本地佈局
將*.layout
檔案移至本機目錄
哪裡變得新犯錯由於從 Report 文檔類別變更為 Aaltothesis-article 文檔類別(尚未工作)。
試驗2本地目錄中僅包含文字testing aaltothesis.layout
和 aaltothesis.cls 的文檔,並使用 aaltothesis.layout 作為本地版本
到哪裡去呃找不到“aaltologo.sty”“LaTeX 錯誤:未找到檔案‘aaltologo.sty’。”所以複製aaltologo.sty
來自這裡到您的本地目錄。
我有空的序言並出現下一個錯誤。
試用3前言與(老的:aaltothesis.sty pkg 已改為 CLS)
\documentclass[english,12pt,a4paper,pdftex]{report}
\usepackage[sci]{aaltothesis}
但錯了
這樣
\usepackage
{amsmath}
The package inputenc has already been loaded with options:
[utf8,]
There has now been an attempt to load it with options
[latin9]
Adding the global options:
utf8,,latin9
to your \documentclass declaration may fix this.
Try typing <return> to proceed.
這裡有一個奇怪的數學錯誤。我嘗試了更改LyX: Document Settings > Math Options > Load automatically ALL to Do Not Load ALL
但相同的錯誤
此更改並沒有改變錯誤。是什麼導致 LyX 中的內容被載入兩次?
試用4序言與(老的:aaltothesis.sty 已改為 CLS)
\usepackage[sci,utf8]{aaltothesis}
並註解掉 inputenc 的所有行(Lyx 預設使用 latin9 載入 Inputenc這)
哪裡缺少一個神秘文件aaltothesis.sty
,這是什麼?僅具有aaltothesis.layout
(生成的)、、aaltologo.sty
-aaltothesis.cls
想法,如何/在哪裡獲得這個aaltothesis.sty
?
TRIAL 5 [我發現的BUG,補丁如下]空的序言,嘗試在Class options
應該使用的地方使用 aaltothesis.cls 但無論有還是沒有sci
我都變得很奇怪Missing number, treated as zero
sci
sci
日誌中更接近的位置(若要在 Lyx 中讀取日誌,請參閱這裡)
現在我不確定了。
帶有補丁 I 的試用版 6 [BUG II 已發現]第一次編譯時僅使用hello world
但沒有巨集工作,例如\department{...}
第 164-171 行周圍的「警告」和「失控」爭論在哪裡?聊天這裡。我在這裡嘗試了不同的設置,例如\value{page}
、\thepage
、\arabic{page}
,\arabic{\value{page}}
但最後出現相同的警告 - 在此之前沒有其他錯誤。這是否會導致事情失敗,從而無法\degreeprogram
正確讀取下一個命令?
[2016年6月9日更新]mvim指出第770-773行有一些不符的},aaltothesis.cls中比{少了2塊},chat這裡。
有關當前錯誤的完整日誌這裡,未解決。
全域設定(非必要)
使檔案全域可用移動 CLS 檔案 texmf 資料夾以使其可用
$ cp *.cls ~/Library/texmf/
我應該將自己的 .sty 或 .cls 檔案放在哪裡,以使它們可供我的所有 .tex 檔案使用?Tools/Reconfigure
並重新啟動 Lyx,然後Document/Settings/Document Class
選擇 Aalto 課程 [此處出錯,也許需要重新啟動電腦...? ]
設定
另類佈局(來自標準文章article.layout的混音)其中名稱更改為
aaltothesis
文章的佈局並Provides inputenc 1
在最後一行添加替代論.cls(在使用article的地方,因此article.layout被選為預設值,對吧?)複製到這裡如果 aaltothesis.cls 的連結過期
尖端
- 為了快速調試:
Lyx > Document Settings > Local Layout
Aaltothesis.cls 中的錯誤
我。“類別將計數器設定為 \thepage,這是類別中的一個錯誤 --\thepage 可以是文本,因此不應該用於設定計數器。”
大衛的解決方案
use \value{page} not \thepage
二. TRIAL 6 發現了神秘的Runaway argument
警告,我們發現該aaltothesis.cls
文件的大括號比左括號多了 2 個。失控的爭論開始於第一個 bug 附近,\thepage
而不是\value{page}