Guest User

Untitled

a guest
Oct 17th, 2017
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.51 KB | None | 0 0
  1. usepackage{algorithm,algpseudocode}
  2. usepackage{etoolbox}
  3. usepackage{tocloft}
  4.  
  5. patchcmd{listof}% <cmd>
  6. {float@listhead}% <search>
  7. {@namedef{l@#1}{l@figure}float@listhead}% <replace>
  8. {}{}% <success><failure>
  9.  
  10. pretofigure{%
  11. ifnumvalue{figure}=0addtocontents{lof}{{bfseries Chapter thechaptervskip10pt}}fi
  12. }
  13. pretotable{%
  14. ifnumvalue{table}=0addtocontents{lot}{{bfseries Chapter thechaptervskip10pt}}fi
  15. }
  16. pretoalgorithm{%
  17. ifnumvalue{algorithm}=0addtocontents{loa}{{bfseries Chapter thechaptervskip10pt}}fi
  18. }
  19.  
  20. cftsetindents{figure}{0em}{3.5em}
  21. cftsetindents{table}{0em}{3.5em}
  22.  
  23. %% LyX 2.2.1 created this file. For more info, see http://www.lyx.org/.
  24. %% Do not edit unless you really know what you are doing.
  25. documentclass[12pt,english]{extreport}
  26. usepackage{mathpazo}
  27. usepackage{berasans}
  28. renewcommand{ttdefault}{cmtl}
  29. renewcommand{familydefault}{sfdefault}
  30. usepackage[T1]{fontenc}
  31. usepackage[latin9]{luainputenc}
  32. usepackage[a4paper]{geometry}
  33. geometry{verbose,tmargin=2.5cm,bmargin=2.5cm,lmargin=3cm,rmargin=2cm}
  34. setcounter{secnumdepth}{3}
  35. setcounter{tocdepth}{3}
  36. usepackage{babel}
  37. usepackage{array}
  38. usepackage{longtable}
  39. usepackage{varioref}
  40. usepackage{float}
  41. usepackage{textcomp}
  42. usepackage{multirow}
  43. usepackage{amstext}
  44. usepackage{graphicx}
  45. usepackage{setspace}
  46. onehalfspacing
  47.  
  48. makeatletter
  49.  
  50. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LyX specific LaTeX commands.
  51. %% Because html converters don't know tabularnewline
  52. providecommand{tabularnewline}{\}
  53. floatstyle{ruled}
  54. newfloat{algorithm}{tbp}{loa}[chapter]
  55. providecommand{algorithmname}{Algorithm}
  56. floatname{algorithm}{protectalgorithmname}
  57.  
  58. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.
  59. usepackage{algorithm,algpseudocode}
  60. usepackage{etoolbox}
  61. usepackage{tocloft}
  62.  
  63.  
  64. %letl@tablel@figure
  65.  
  66. patchcmd{listof}% <cmd>
  67. {float@listhead}% <search>
  68. {@namedef{l@#1}{l@figure}float@listhead}% <replace>
  69. {}{}% <success><failure>
  70.  
  71. pretofigure{%
  72. ifnumvalue{figure}=0addtocontents{lof}{{bfseries Chapter thechaptervskip10pt}}fi
  73. }
  74. pretotable{%
  75. ifnumvalue{table}=0addtocontents{lot}{{bfseries Chapter thechaptervskip10pt}}fi
  76. }
  77. pretoalgorithm{%
  78. ifnumvalue{algorithm}=0addtocontents{loa}{{bfseries Chapter thechaptervskip10pt}}fi
  79. }
  80.  
  81. cftsetindents{figure}{0em}{3.5em}
  82. cftsetindents{table}{0em}{3.5em}
  83.  
  84. @ifundefined{showcaptionsetup}{}{%
  85. PassOptionsToPackage{caption=false}{subfig}}
  86. usepackage{subfig}
  87. AtBeginDocument{
  88. deflabelitemii{(circ)}
  89. }
  90.  
  91. makeatother
  92.  
  93. begin{document}
  94.  
  95. tableofcontents{}
  96.  
  97. pagebreak{}
  98.  
  99. listoffigures{}
  100.  
  101. pagebreak{}
  102.  
  103. listof{algorithm}{List of Algorithms}
  104.  
  105. pagebreak{}
  106.  
  107. chapter{Background}
  108.  
  109. begin{figure}[H]
  110. caption{Fig1}
  111. end{figure}
  112.  
  113.  
  114. chapter{System Design}
  115.  
  116. begin{figure}[H]
  117. caption{Fig2}
  118. end{figure}
  119.  
  120. begin{algorithm}[H]
  121. begin{algorithmic}[1] If{$x < mu$} State{$hat{x} leftarrow 0$} Else{ } State{$hat{x} leftarrow x$} EndIf end{algorithmic}caption{Custom Zero Minus Means Algorithm}
  122. end{algorithm}
  123.  
  124. end{document}
  125.  
  126. usepackage[titles]{tocloft}
  127.  
  128. pretofigure{%
  129. ifnumvalue{figure}=0addtocontents{lof}{{noindentbfseries Chapter thechaptervskip10pt}}fi
  130. }
  131. pretotable{%
  132. ifnumvalue{table}=0addtocontents{lot}{{noindentbfseries Chapter thechaptervskip10pt}}fi
  133. }
  134. pretoalgorithm{%
  135. ifnumvalue{algorithm}=0addtocontents{loa}{{noindentbfseries Chapter thechaptervskip10pt}}fi
  136. }
  137.  
  138. documentclass[12pt,english]{extreport}
  139. usepackage{mathpazo}
  140. usepackage{berasans}
  141. renewcommand{ttdefault}{cmtl}
  142. renewcommand{familydefault}{sfdefault}
  143. usepackage[T1]{fontenc}
  144. usepackage[latin9]{luainputenc}
  145. usepackage[a4paper]{geometry}
  146. geometry{verbose,tmargin=2.5cm,bmargin=2.5cm,lmargin=3cm,rmargin=2cm}
  147. setcounter{secnumdepth}{3}
  148. setcounter{tocdepth}{3}
  149. usepackage{babel}
  150. usepackage{array}
  151. usepackage{longtable}
  152. usepackage{varioref}
  153. usepackage{float}
  154. usepackage{textcomp}
  155. usepackage{multirow}
  156. usepackage{amstext}
  157. usepackage{graphicx}
  158. usepackage{setspace}
  159. onehalfspacing
  160.  
  161. makeatletter
  162.  
  163. %%%%%%%%%%%%%%%%%%%%%%%%%%%% LyX specific LaTeX commands.
  164. % Because html converters don't know tabularnewline
  165. providecommand{tabularnewline}{\}
  166. floatstyle{ruled}
  167. newfloat{algorithm}{tbp}{loa}[chapter]
  168. providecommand{algorithmname}{Algorithm}
  169. floatname{algorithm}{protectalgorithmname}
  170.  
  171. %%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.
  172. usepackage{algorithm,algpseudocode}
  173. usepackage{etoolbox}
  174. usepackage{tocbasic}
  175.  
  176. DeclareTOCStyleEntry[
  177. indent=0pt,
  178. numwidth=3.5em,
  179. onstarthigherlevel=vskip10ptLastTOCLevelWasLower
  180. ]{tocline}{figure}
  181. DeclareTOCStyleEntry[
  182. level=0,
  183. beforeskip=10pt,
  184. indent=0pt,
  185. numwidth=0pt,
  186. entryformat=textbf,
  187. linefill=hfill,
  188. pagenumberformat=@gobble
  189. ]{tocline}{chapterinlistof}
  190.  
  191. patchcmd{listof}% <cmd>
  192. {float@listhead}% <search>
  193. {@namedef{l@#1}{l@figure}float@listhead}% <replace>
  194. {}{}% <success><failure>
  195.  
  196. pretofigure{%
  197. ifnumvalue{figure}=0addcontentsline{lof}{chapterinlistof}{Chapter thechapter}fi
  198. }
  199. pretotable{%
  200. ifnumvalue{table}=0addcontentsline{lot}{chapterinlistof}{Chapter thechapter}fi
  201. }
  202. pretoalgorithm{%
  203. ifnumvalue{algorithm}=0addcontentsline{loa}{chapterinlistof}{Chapter thechapter}fi
  204. }
  205.  
  206. @ifundefined{showcaptionsetup}{}{%
  207. PassOptionsToPackage{caption=false}{subfig}}
  208. usepackage{subfig}
  209. AtBeginDocument{
  210. deflabelitemii{(circ)}
  211. }
  212. makeatother
  213.  
  214. begin{document}
  215. tableofcontents
  216. listoffigures
  217. listof{algorithm}{List of Algorithms}
  218. chapter{Background}
  219. begin{figure}[H]
  220. caption{Fig1}
  221. end{figure}
  222. chapter{System Design}
  223. begin{figure}[H]
  224. caption{Fig2}
  225. end{figure}
  226. begin{figure}[H]
  227. caption{Fig3}
  228. end{figure}
  229. begin{algorithm}[H]
  230. begin{algorithmic}[1] If{$x < mu$} State{$hat{x} leftarrow 0$} Else{ } State{$hat{x} leftarrow x$} EndIf end{algorithmic}caption{Custom Zero Minus Means Algorithm}
  231. end{algorithm}
  232. end{document}
Add Comment
Please, Sign In to add comment