Lyx
IEEEtran
if you do want the fancy layout on a page containing \maketitle
you must issue a
\thispagestyle{fancy}
after the
\maketitle
Acmart
How to remove Author's addresses footnote in acmart?
\makeatletter
\let\@authorsaddresses\@empty
\makeatother
How to remove reference format (conference information) from the acmart template?
\settopmatter{printacmref=false}
Some Important MiKTeX Packages
These are some important packages you may need to install (missing from the original MiKTeX installation)
acmart
dblfloatfix
siggraph
ieeeconf
ieeepes
ieeetran
acmconf
acmtrans
elsarticle
elsevier
elsevier-bib
cjk
cjk-fonts
cjkpunct
cjw
listings
Latex-tools
\usepackage{array} % ( use this package so that {\centering}p{2.2cm} is effective in a table (convert from Lyx) )
\usepackage{multirow} % ( use this package so that \multirow{3}{2cm}{xx} & \multicolumn{4}... is effective in a table (convert from Lyx) )
How to add IET Electronic Letter Layout in Lyx (Windows)?
make a subdirectory of el-author under C:\Program Files\MiKTeX 2.9\tex\latex\
copy el-author.cls into directory of C:\Program Files\MiKTeX 2.9\tex\latex\el-author
create a file named el-author.layout and put it in C:\Program Files\LyX20\Resources\layouts
The contents of the .layout file:
#% Do not delete the line below; configure depends on this
# \DeclareLaTeXClass[el-author]{article (el-author)}
# Input general definitions
Input stdclass.inc
Now one only need to tell MiKTeX that you have new class in the system. Please start the program “Settings (Admin)” and press the button marked “Refresh FNDB”.
In LyX, do: Tools > Reconfigure
Restart Lyx.
You should be able to see the class as shown in the following figure.
How to add SIGCOMM class into Lyx (Windows)?
make a subdirectory of sig-alternate under C:\Program Files\MiKTeX 2.9\tex\latex\
copy sig-alternate.cls into the directory C:\Program Files\MiKTeX 2.9\tex\latex\sig-alternate
copy sig-alternate.layout file into C:\Program Files\LyX20\Resources\layouts
another layout "corp-sig-alternate.layout" that can be used for more space efficiency.
be sure to make a new directory of "C:\Program Files\MiKTeX 2.9\tex\latex\corp-sig-alternate" and put in the file "corp-sig-alternate.cls"
Now one only need to tell MiKTeX that you have new class in the system. Please start the program “Settings (Admin)” and press the button marked “Refresh FNDB”.
In LyX, do: Tools > Reconfigure
Restart Lyx.
You should be able to see the class as shown in the following figure.
Create PDF file
(with all fonts embedded in letter size, resolution of 600, please use dvipdfm --help for more options )
c:\dvipdfm -p letter -r 600 -o my_paper.pdf my_paper.dvi
More in this link "LaTeX to PDF"
Create EPS file
An easy copy-and-paste process to create EPS file from MS-Windows applications.
Another old-fashion way...
(1) Install PDFCreator, Ghostscript and Gostview
(2) print to .ps file
(3) use Gostview to convert the .ps to .eps
Balance Last Page in two-column Format
Option 1.
\usepackage{flushend}
Option 2.
include the balance package in the preamble
\usepackage{balance}
insert
\balance
somewhere in the left (1st) column of your last page.
Chinese Characters
In order to use Chinese Characters in your paper, please do the following two steps: (1) fonts (2) document setting
Make sure you install the fonts
Document setting
fonts--->CJK:bkai
language-->other:Unicode (CJK) (utf8)
Latex Preamble : \CJKencfamily{UTF8}
預設CJK-Latex的繁體中文字型分別為:[4]
bkai:楷書。 (完整)
bsmi:明體。 (完整)
gbsn:細明體。 (缺字,部份字體無法顯示)
gkai:標楷體。 (缺字,同上)
李果正老師提供的字型字型:
ftp://cle.linux.org.tw/pub2/tex/cjk/fonts/
以前用的舊設定
preamble
\usepackage{CJK}
\date {}
\pagestyle{empty}
in the document body
\CJKfamily{cwmu}
Code Listings ( C & Matlab )
Want to list source codes in your document? Please take a look!
First make sure you have the listings package in your MiKTeX
Edit an article for a quick test like this. The Matlab source code is in the same directory of your Lyx code.
You have to add the Latex preamble.
\usepackage{listings}
\usepackage{color}
\usepackage{textcomp}
\definecolor{listinggray}{gray}{0.9}
\definecolor{lbcolor}{rgb}{0.99,0.99,0.99}
\lstset{
backgroundcolor=\color{lbcolor},
numbers=left,
tabsize=4,
rulecolor=,
language=matlab,
basicstyle=\scriptsize,
upquote=true,
aboveskip={1.5\baselineskip},
columns=fixed,
showstringspaces=false,
extendedchars=true,
breaklines=true,
prebreak = \raisebox{0ex}[0ex][0ex]{\ensuremath{\hookleftarrow}},
frame=single,
showtabs=false,
showspaces=false,
showstringspaces=false,
identifierstyle=\ttfamily,
keywordstyle=\color[rgb]{0,0,1},
commentstyle=\color[rgb]{0.133,0.545,0.133},
stringstyle=\color[rgb]{0.627,0.126,0.941},
}
And finally here is the results.
You can also apply to your C source codes. (Be sure to put the lstset in your Lyx preamble)
The C preamble is listed as follows:
\usepackage{listings}
\usepackage{color}
\usepackage{textcomp}
\definecolor{listinggray}{gray}{0.9}
\definecolor{lbcolor}{rgb}{0.99,0.99,0.99}
\lstset{
backgroundcolor=\color{lbcolor},
numbers=left,
tabsize=4,
rulecolor=,
language=c,
basicstyle=\scriptsize,
upquote=true,
aboveskip={1.5\baselineskip},
columns=fixed,
showstringspaces=false,
extendedchars=true,
breaklines=true,
prebreak = \raisebox{0ex}[0ex][0ex]{\ensuremath{\hookleftarrow}},
frame=single,
showtabs=false,
showspaces=false,
showstringspaces=false,
identifierstyle=\ttfamily,
keywordstyle=\color[rgb]{0,0,1},
commentstyle=\color[rgb]{0,0.7,0},
stringstyle=\color[rgb]{1,0.44,0},
directivestyle=\color[rgb]{0.9,0,0}
}
Another C++ preamble provided by Ashish Jain
\lstset{
language=[Visual]C++,
keywordstyle=\bfseries\ttfamily\color[rgb]{0,0,1},
identifierstyle=\ttfamily,
commentstyle=\color[rgb]{0.133,0.545,0.133},
stringstyle=\ttfamily\color[rgb]{0.627,0.126,0.941},
showstringspaces=false,
basicstyle=\small,
numberstyle=\footnotesize,
numbers=left,
stepnumber=1,
numbersep=10pt,
tabsize=2,
breaklines=true,
prebreak = \raisebox{0ex}[0ex][0ex]{\ensuremath{\hookleftarrow}},
breakatwhitespace=false,
aboveskip={1.5\baselineskip},
columns=fixed,
upquote=true,
extendedchars=true,
% frame=single,
% backgroundcolor=\color{lbcolor},
}
Algorithm & Pseudo Codes with Line Numbers
Use the package algorithmic by adding the following in Documents -> Settings... -> LaTex Preamble
\usepackage{algorithmic}
And then, inside the default Algorithm float as Tex Code:
\begin{algorithmic}[1]
\STATE (example line that will be numbered) (remember to give a space after \State )
\end{algorithmic}
The optional argument to algorithmic ([1] in this case), provides the line numbered at every line. A numbering modulo 2 would be obtained using [2], and so forth.
\State provides a "regular line" (with number), while \Statex provides an unnumbered line.
Lyx Algorithms
A guide to using the Algorithm package from LyX.
https://charlesreid1.com/wiki/Lyx_Algorithms
Download LyX Algorithm-Style Layout ( http://bgu.perso.libertysurf.fr/ ) ( algo-0.3.tar.gz )
Be careful to use the "{ }" in the equation, it may break the line number sequence in the algorithm list.
Copy file of article-algo.layout and algorithm.inc into the directory of C:\Program Files (x86)\LyX 2.3\Resources\layouts
Make new directory
mkdir C:\Program Files\MiKTeX 2.9\tex\latex\algolyx
copy algolyx.sty into the directory
Now we need to tell MiKTeX that there is a new style in the system.
Please start the program “Settings (Admin)” and press the button marked “Refresh FNDB”.
Using the Algorithm Package from Arbitrary LaTeX Classes
This is easy to fix - simply add the following line to your LyX (Document Setting->Custom Layout/module)
# Use LyX algorithm definitions
Input algorithm.inc
Export from Lyx to Pdflatex
In the same directory, be sure to have the following files:
algolyx.sty
algorithm.inc
article-algo.layout
And in the .tex file, be sure to include the algolyx package
\usepackage[latin1]{inputenc}
\usepackage{algolyx}
BibTex Related
Reducing Spacing in the Bibliography
add
\usepackage{natbib}
\setlength{\bibsep}{0.0pt}
to the preamble of your document.
Newline in Reference Entry
Add \def\newblock{} in the preamble to remove the line feed in each cited reference.
Error Messages
This is BibTeX, Version 0.99d (MiKTeX 2.9)
The top-level auxiliary file: NSC-yk2012.aux
The style file: plain.bst
bibtex: Windows API error 21: 裝置未就緒。
bibtex: Data: F:/cycu/Papers/ref.bib
The error message is due to the path provided in the Lyx is hardcoded to hard drive F:. Change the path to ../../ref.bib fix the error.
Misplaced alignment tab character &
This error is due to the character '&' being placed in the .bbl file. The quick fix is to put 'I\' in front of the '&' .
\bibitem{schweller_reversible_2004}
R.~Schweller, A.~Gupta, E.~Parsons, Y.~Chen,
\href{http://portal.acm.org/citation.cfm?id=1028788.1028814I\&coll=GUIDEI\&dl=GUIDEI\&CFID=68222934I\&CFTOKEN=76090582}{Reversible
sketches for efficient and accurate change detection over network data
streams}, in: Proceedings of the 4th {ACM} {SIGCOMM} conference on Internet
measurement, {ACM}, Taormina, Sicily, Italy, 2004, pp. 207--212.
Steps to edit the Tex file exported from Lyx
(1)In Lyx, export the document in plainTex format.
(2)Edit the name for all the figures in the .tex file.
(3)Edit the \bibliography to use the .bbl file
for example,
%%\bibliography{14F__cycu_Papers_MyLibrary,15F__cycu_Papers_ref,16F__cycu_Papers_ref_data_stream,17F__cycu_Papers_main,18F__cycu_Papers_NetFPGA_Korea_erman-yoyo_netfpga_asiaws_paper}
\bibliography{change_detection_fpga_review0710}
References
ACM SIG Proceedings Templates
Alternate Author's Guide to Preparing ACM SIG Proceedings Using LaTEX2e and BibTEX
From niuty's blog Installing new templates in Lyx
From Thomas Jansson's Blog "Using listings to include code in LaTeX"
The original listings package documents.(pdf) (original FTP link)