Tag Info

New answers tagged

2

here you go :) \begin{algorithm} \caption{Calculating Score}\label{euclid} \begin{algorithmic}[1] \Procedure{CheckBetaamplitude}{} \State $i \gets find(absolute()<maxamp)$ \State $n \gets length(i)$ \State $s(1) \gets n/length()$ \State $i \gets find(absolute()<maxamp)$ \State $n \gets length(i)$ \State $s(2) ...


3

Here is a very similar display. \documentclass[10pt,conference]{IEEEtran} \usepackage{amsmath} \usepackage{algorithm} \usepackage[noend]{algpseudocode} \newcommand{\sfunction}[1]{\textsf{\textsc{#1}}} \algrenewcommand\algorithmicforall{\textbf{foreach}} \algrenewcommand\algorithmicindent{.8em} \title{Example} \author{John Doe} \begin{document} \maketitle ...


3

The procedure environment is a special form of the algorithm environment. Passing the option procnumbered to algorithm2e numbers procedures using the same counter as algorithms: \documentclass{article} \usepackage[procnumbered,ruled]{algorithm2e} \begin{document} \begin{procedure} \caption{myproc()} This is a procedure \end{procedure} ...


4

Below I provide \nonumSTATE to set a regular \STATE without the numbering. Also, \BEGININDENT...\ENDINDENT is an environment that indents its contents. \documentclass{article} \usepackage[utf8]{inputenc} \usepackage{algorithm,algorithmic} \makeatletter \newcommand{\nonumSTATE}{\item[]} \newcommand{\BEGININDENT}{\begin{ALC@g}} ...


1

You have missed the \usepackage{fontspec} \setmainfont{Hoefler Text} parts of the preamble at that link. Although I don't have that font on my system, if I substitute a font I do have, I get no errors with TL2014 on Windows 7. This requires either XeLaTeX or LuaLaTeX to compile. \documentclass[11pt]{article} \usepackage{algorithm} \usepackage{algorithmicx} ...


4

My example shows how to do this task without any LaTeX packages. Suppose, we have the file names.csv in the format shown in Kumars answer. % in preamble: \newread\infile \def\printletters #1 {\bgroup \endlinechar=-1 \openin\infile=#1 \read\infile to\tmp \printlettersA } \def\printlettersA{\ifeof\infile \egroup \else \read\infile to\tmp ...


2

Shamelessly parasitic on Harish Kumar's data, this solution uses textmerg for the merge: \documentclass[a4paper]{article} \usepackage[T1]{fontenc} \usepackage{textmerg}% \usepackage{filecontents} \begin{filecontents*}{names.dat} Mr Sreeram P. 12 Mr Rajaram K. 20 Mr Dhanraj Julien 35 Ms Lalitha S. ...


8

Here is a starting point using datatool. I won't discuss the design of the check (layout) as it is a candidate for a separate question. \documentclass{article} \usepackage[a4paper,textheight=5in,left=1in,right=1in]{geometry} %% 5in only for demo \usepackage{xcolor}% \usepackage{adjustbox} % \usepackage{filecontents} \begin{filecontents*}{names.csv} ...


10

In the source code of the algpseudocode package, look for the definitions of the macros used for typesetting functions and procedures: \algdef{SE}[PROCEDURE]{Procedure}{EndProcedure}% [2]{\algorithmicprocedure\ \textproc{#1}\ifthenelse{\equal{#2}{}}{}{(#2)}}% {\algorithmicend\ \algorithmicprocedure}% \algdef{SE}[FUNCTION]{Function}{EndFunction}% ...



Top 50 recent answers are included