2014 dxdy logo

Научный форум dxdy

Математика, Физика, Computer Science, Machine Learning, LaTeX, Механика и Техника, Химия,
Биология и Медицина, Экономика и Финансовая Математика, Гуманитарные науки




 
 переносы и выравнивание по центру
Сообщение23.06.2015, 20:34 
Пишу статью. При большом количестве авторов не происходит переноса на следующую строку и они вылезают за поля.
То есть такая конфигурация:
Код:
\title{Title of the Paper}
\author{\textbf{Name I. Author1}, Name I. Author2}
{Department, University, Country}                                               
{author@e.mail}                                 
\coauthor{Name I. Coauthor}                   
{Institute, University, Country}                 
{coauthor@e.mail }


Каким образом подключить авто перенос?

 
 
 
 Re: переносы и выравнивание по центру
Сообщение23.06.2015, 20:49 
1. Latex-код принято вставлять через подсветку синтаксиса Латех.
2. Сформируйте, пожалуйста, минимально рабочий пример, где были бы видны все проблемы, и который можно было бы просто скопипастить из предоставленного кода.

 
 
 
 Re: переносы и выравнивание по центру
Сообщение23.06.2015, 21:24 
код: [ скачать ] [ спрятать ]
Используется синтаксис LaTeX
\documentclass{procDDs}
                                                  % load packages only if necessary

\title{Title of the Paper
(if long, it will be automatically split into several lines)}

\author{\textbf{Ivanov}, Petrov,Petrov,Petrov,Petrov,Petrov,Petrov,Petrov,Petrov,
PetrovPetrov,Petrov,Petrov,Petrov,Petrov}
{Department, University, Country}                
                                                  % lecturer given in bold
{author@e.mail}                                   % e-mail of lecturer
%
%                                                 % it is important not to have
%                                                 % blank lines between the
%                                                 % \author and \coauthor
%
\coauthor{Sidorov}                       % Co-author(s) with
{Institute, University, Country}                  % another affiliation
{coauthor@e.mail }                                               % use such line
                                                  % if e-mail none available

\begin {document}

\maketitle

\index{Author1, I.I.}                              % write this for each author
\index{Author2, I.I.}                              % to generate the index
\index{Coauthor, I.I.}                             %


\end {document}
 


procDDs выглядит так:
код: [ скачать ] [ спрятать ]
Используется синтаксис LaTeX
%% Class file for the Proceedings of DDs
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
\ProvidesClass{procDDs}[2008/20/09 Days on Diffraction Proceedings Class]
\newif\ifHyperRefs \HyperRefsfalse
\DeclareOption{HyperRefs}{\HyperRefstrue}
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}}
\ProcessOptions\relax
\LoadClass[10pt,twocolumn,twoside,a4paper]{article}
% Load styles
\let\OVER\over
\usepackage{multicol}
\usepackage{amssymb}
\usepackage{amsfonts, latexsym}
\usepackage{amsmath}
\usepackage{makeidx}
\usepackage[dvips]{graphicx}
\renewcommand{\over}{\OVER}
\makeindex
%%
\newcommand{\SEPARATE}{}


%% Reset margins and text grid (Добавил headers)
\advance\voffset -1cm
\advance\hoffset 5mm% !!!!!
\textwidth=\paperwidth
\advance\textwidth -2in
\columnwidth \textwidth \advance\columnwidth -\columnsep
\divide\columnwidth \tw@
\oddsidemargin \z@
\evensidemargin \z@
\advance \textheight \footskip \footskip \z@
\topmargin \paperheight \advance\topmargin -\textheight
\divide\topmargin \tw@ \advance\topmargin -1in

%% Заголовки и авторы
\global\let\@author\@empty
\global\let\@authora\@empty
\global\let\@authorb\@empty
\global\let\@authorc\@empty
\global\let\@authord\@empty
\global\let\@Author\@empty
\global\let\@Authora\@empty
\global\let\@Authorb\@empty
\global\let\@Authorc\@empty
\global\let\@Authord\@empty

\newlength{\TMPauthor}% Вспомогательная длина для определения пуста ли команда

% Определение \author с 3 аргументами
\global\def\author#1#2#3{\settowidth{\TMPauthor}{\@author}%
                         \ifdim\TMPauthor<1mm%
                              \gdef\@author{#1}\gdef\@affil{#2}\gdef\@email{#3}
                              \gdef\@Author{\@author}
                         \else\settowidth{\TMPauthor}{\@authora}%
                         \ifdim\TMPauthor<1mm%
                              \gdef\@authora{#1}\gdef\@affila{#2}\gdef\@emaila{#3}
                              \gdef\@Authora{\@authora}
                         \else\settowidth{\TMPauthor}{\@authorb}%
                         \ifdim\TMPauthor<1mm%
                              \gdef\@authorb{#1}\gdef\@affilb{#2}\gdef\@emailb{#3}
                              \gdef\@Authorb{\@authorb}
                         \else\settowidth{\TMPauthor}{\@authorc}%
                         \ifdim\TMPauthor<1mm%
                              \gdef\@authorc{#1}\gdef\@affilc{#2}\gdef\@emailc{#3}
                              \gdef\@Authorc{\@authorc}
                         \else
                              \gdef\@authord{#1}\gdef\@affild{#2}\gdef\@emaild{#3}
                              \gdef\@Authord{\@authord}
                         \fi\fi\fi\fi}

% Переопределили \maketitle, чтобы было можно использовать много раз
\renewcommand\maketitle{\par
  \begingroup
    \renewcommand\thefootnote{\@fnsymbol\c@footnote}%
    \def\@makefnmark{\rlap{\@textsuperscript{\normalfont\@thefnmark}}}%
    \long\def\@makefntext##1{\parindent 1em\noindent
            \hb@xt@1.8em{%
                \hss\@textsuperscript{\normalfont\@thefnmark}}##1}%
        \twocolumn[\@maketitle]%
%%%\@maketitle
  \endgroup
%<<<
%\begin{multicols}{2}
%%% Отменили переносы строки
\let\NEWLINE=\\
\let\\=\@empty
\settowidth{\TMPauthor}{\@Authora}\ifdim\TMPauthor>1mm%
        \toks2=\expandafter{\@Author}\xdef\@Author{\the\toks2, \noexpand\@Authora}\fi
\settowidth{\TMPauthor}{\@authorb}\ifdim\TMPauthor>1mm%
        \toks2=\expandafter{\@Author}\xdef\@Author{\the\toks2, \noexpand\@Authorb}\fi
\settowidth{\TMPauthor}{\@authorc}\ifdim\TMPauthor>1mm%
        \toks2=\expandafter{\@Author}\xdef\@Author{\the\toks2, \noexpand\@Authorc}\fi
\settowidth{\TMPauthor}{\@authord}\ifdim\TMPauthor>1mm%
        \toks2=\expandafter{\@Author}\xdef\@Author{\the\toks2, \noexpand\@Authord}\fi
%%% написали ссылку в toc
\addcontentsline{toc}{report}{\protect\forauthors\string{\@Author\string}\protect\\ \protect\fortitle\string{\@title\string}}%
%% mov
%%% Вернули \\
\let\\=\NEWLINE
%%% Обнулили счетчики
  \setcounter{footnote}{0}%
  \global\let\thanks\relax
  \global\let\@thanks\@empty
  \global\let\@author\@empty  \global\let\@affil\@empty  \global\let\@email\@empty
  \global\let\@authora\@empty  \global\let\@affila\@empty  \global\let\@emaila\@empty
  \global\let\@authorb\@empty  \global\let\@affilb\@empty  \global\let\@emailb\@empty
  \global\let\@authorc\@empty  \global\let\@affilc\@empty  \global\let\@emailc\@empty
  \global\let\@authord\@empty  \global\let\@affild\@empty  \global\let\@emaild\@empty
  \global\let\@Author\@empty    \global\let\@Authora\@empty
  \global\let\@Authorb\@empty  \global\let\@Authorc\@empty
  \global\let\@Authord\@empty
  \global\let\@title\@empty
}

% Формат заголовка
\long\def\@maketitle{%
  \newpage
  \null
  {\centering
  \let \footnote \thanks
    {\LARGE\bfseries \@title \par}%
    \vskip 14pt%
    {\lineskip .5em%
       {\large\underline{\@author}}\\[1mm] \@affil
       \settowidth{\TMPauthor}{\@email}\ifdim\TMPauthor > 1mm
           ; \SEPARATE \mbox{e-mail: \texttt{\@email}}\fi
\settowidth{\TMPauthor}{\@authora}
\ifdim\TMPauthor > 1mm
       \\[2mm] {\large\underline{\@authora}}\\[1mm] \@affila
       \settowidth{\TMPauthor}{\@emaila}\ifdim\TMPauthor > 1mm
           ; \mbox{e-mail: \texttt{\@emaila}}\fi
\settowidth{\TMPauthor}{\@authorb}
\ifdim\TMPauthor > 1mm
       \\[2mm] {\large\underline{\@authorb}}\\[1mm] \@affilb
       \settowidth{\TMPauthor}{\@emailb}\ifdim\TMPauthor > 1mm
           ; e-mail:~\texttt{\@emailb}\fi
%% mov "\\ email:" -> "; e-mail: "          
\settowidth{\TMPauthor}{\@authorc}
\ifdim\TMPauthor > 1mm
       \\[2mm] {\large\underline{\@authorc}}\\[1mm] \@affilc
       \settowidth{\TMPauthor}{\@emailc}\ifdim\TMPauthor > 1mm
           \\ e-mail:\texttt{\@emailc}\fi
\settowidth{\TMPauthor}{\@authord}
\ifdim\TMPauthor > 1mm
       \\[2mm] {\large\underline{\@authord}}\\[1mm] \@affild
       \settowidth{\TMPauthor}{\@emaild}\ifdim\TMPauthor > 1mm
           \\ e-mail:\texttt{\@emaild}\fi
\fi
\fi
\fi
\fi
}%
  \par}
  \vskip 14pt
}

%% Section headings
\renewcommand{\contentsname}{\centerline{\textbf{\sc CONTENTS}}}

\renewcommand\section{%
                                   \@startsection {section}{1}{\z@}%
                                   {-3.5ex \@plus -1ex \@minus -.2ex}%
                                   {2.3ex \@plus.2ex}%
                                   {\normalfont\scshape}}
\renewcommand\subsection{\@startsection{subsection}{2}{\z@}%
                                     {-3.25ex\@plus -1ex \@minus -.2ex}%
                                     {1.5ex \@plus .2ex}%
                                     {\normalfont\itshape}}
%% - "\large" by mov 21.06.2011
\renewcommand\subsubsection{\@startsection{subsubsection}{3}{\z@}%
                                     {-3ex\@plus -1ex \@minus -.2ex}%
                                     {1ex \@plus .2ex}%
                                     {\normalfont\itshape}}

%%% Redefinition of \@makecaption
%\long\def\@makecaption#1#2{\def\@capref{table}
%  \vskip\abovecaptionskip
%  \sbox\@tempboxa{#1: #2}%
%  \ifdim \wd\@tempboxa >\hsize
%    #1: #2\par
%  \else
%    \global \@minipagefalse
%    \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}%
%  \fi
%  \vskip\belowcaptionskip
%  }

% Abstract
\renewenvironment{abstract}{%
    \footnotesize\bfseries\parindent=0pt%
%    {\noindent\bf\textit{\abstractname{}} --- $\!$}
}%
    {\mdseries\par}

%% Roman subscripts
%\newcommand*{\ped}[1]{\ensuremath{_\mathrm{#1}}}

%% Reduce warning messages
\hbadness 5000 \vbadness 5000

%% DDs style
% the file name as the prefix
\newcommand{\labelprefix}{>>}
\let\LABEL\label
\let\LABELINDISPLAY\label@in@display
\renewcommand{\label}[1]{\LABEL{\labelprefix:#1}}
\renewcommand{\label@in@display}[1]{\LABELINDISPLAY{\labelprefix:#1}}
\let\REF\ref
\renewcommand{\ref}[1]{\REF{\labelprefix:#1}}
\let\PAGEREF\pageref
\renewcommand{\pageref}[1]{\PAGEREF{\labelprefix:#1}}
\let\BIBITEM\bibitem
\renewcommand{\bibitem}[1]{\BIBITEM{\labelprefix::#1}}
\def\@citex[#1]#2{%
  \let\@citea\@empty
  \@cite{\@for\@citeb:=#2\do
    {\@citea\def\@citea{,\penalty\@m\ }%
     \edef\@citeb{\expandafter\@firstofone\@citeb}%
     \if@filesw\immediate\write\@auxout{\string\citation{\labelprefix::\@citeb}}\fi
     \@ifundefined{b@\labelprefix::\@citeb}{\mbox{\reset@font\bfseries ?}%
       \G@refundefinedtrue
       \@latex@warning
         {Citation `\labelprefix::\@citeb' on page \thepage \space undefined}}%
       {\hbox{\csname b@\labelprefix::\@citeb\endcsname}}}}{#1}}

% This is to count the number of talks automatically
\newcounter{NumberOfTalks}
\newcommand{\NumberOfTalksWrite}{%
 \immediate\write\@mainaux{\noexpand\newlabel{>>:N-O-T}{{\theNumberOfTalks}{0}}}}

\newcommand{\report}[1]{\global\def\@author{\@empty}
\renewcommand{\labelprefix}{#1}%
\stepcounter{NumberOfTalks}%
\typeout{(\theNumberOfTalks) =========================== #1 =====================}%
\begingroup
\setcounter{section}{0}%
\setcounter{figure}{0}%
\setcounter{table}{0}%
\setcounter{equation}{0}%
\input{#1.prc}
%\end{multicols}
\endgroup}

% Headings
\pagestyle{myheadings}
\markboth{DAYS on DIFFRACTION \noexpand\number\year}{DAYS on DIFFRACTION \noexpand\number\year}

% Table of contents
\setcounter{tocdepth}{-2}
\newlength{\TOCspace}\setlength{\TOCspace}{2.5mm}
\newcommand{\l@report}[2]{\noindent\hspace*{0.05\textwidth}%
     \parbox[b]{0.9\textwidth}{\hspace*{-0.05\textwidth}#1
            \dotfill #2\hspace*{-0.05\textwidth}}\\[\TOCspace]}

% INDEX
\newcounter{INDEXcolumns}\setcounter{INDEXcolumns}{2}
\renewenvironment{theindex}{%
\addcontentsline{toc}{report}{\textsc{Author index}}%
\centerline{\sc Author index}%
\begin{multicols}{\theINDEXcolumns}%
\renewcommand{\item}{\par\noindent}}{\end{multicols}}

% CAPTIONS
\newcommand{\captionwidth}{0.9}
\long\def\@makecaption#1#2{%
  \vskip\abovecaptionskip
  \sbox\@tempboxa{#1: #2}%
  \ifdim \wd\@tempboxa >\captionwidth\hsize
   \centerline{\parbox{\captionwidth\hsize}{#1: #2}}
  \else
    \global \@minipagefalse
    \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}%
  \fi
  \vskip\belowcaptionskip}


% inserts of pagewidth
%\newcommand{\startWIDE}{\protect\end{multicols}\vspace*{-1.5ex}\hrule width 0.485\textwidth%
%\mbox{}\newline\vspace*{-0.5ex}}
%
%\newcommand{\stopWIDE}{\vspace*{-1.5ex}\hfill\rule{0.485\textwidth}{0.3pt}\vspace*{-1ex}\protect\begin{multicols}{2}\noindent}


% команда для переопределения авторов указываемых в оглавлении,
% используется для придания одинакового стиля (имена -> инициалы)
% должна быть использована после всех \author, но до \maketitle
%
\newcommand{\Cont}[1]{\gdef\@Author{#1}%
\global\let\@Authora\@empty%
\global\let\@Authorb\@empty%
\global\let\@Authorc\@empty%
\global\let\@Authord\@empty}


% Old commands
\newcommand{\speaker}[1]{\textbf{#1}}
\newcommand{\coauthor}[3]{\author{#1}{#2}{#3}}


\endinput
 

 
 
 
 Re: переносы и выравнивание по центру
Сообщение24.06.2015, 00:13 
Автоперенос не подключить — в шаблоне сделано подчеркивание. Насколько мне известно, оно не переносится. Придётся разбивать вручную. Можно попробовать \coauthor из шаблона внести в начале с пустыми полями организации и почты, но компилировать у меня получалось такой фокус только с ошибками. У организаторов мероприятия имеет смысл спросить, как лучше поступить с оформлением.

 
 
 
 Re: переносы и выравнивание по центру
Сообщение24.06.2015, 00:14 
Аватара пользователя
Попробуйте засунуть лишних авторов в соавторы (коих может быть много вводов).

 
 
 
 Re: переносы и выравнивание по центру
Сообщение24.06.2015, 11:47 
Lenchik в сообщении #1030235 писал(а):
Автоперенос не подключить — в шаблоне сделано подчеркивание. Насколько мне известно, оно не переносится. Придётся разбивать вручную. Можно попробовать \coauthor из шаблона внести в начале с пустыми полями организации и почты, но компилировать у меня получалось такой фокус только с ошибками. У организаторов мероприятия имеет смысл спросить, как лучше поступить с оформлением.

Спасибо за попытку!
Red_Herring в сообщении #1030236 писал(а):
Попробуйте засунуть лишних авторов в соавторы (коих может быть много вводов).

Это бы помогло, если бы все авторы и соавторы были бы из одной организации, а тут нужно, чтобы после авторов афилейшн1, после соавторов - афилейшн2 и все подчеркнуты.

 
 
 
 Re: переносы и выравнивание по центру
Сообщение24.06.2015, 12:26 
Аватара пользователя
2012 в сообщении #1030309 писал(а):
Это бы помогло, если бы все авторы и соавторы были бы из одной организации, а тут нужно, чтобы и после авторов афилейшн1, после соавторов - афилейшн2 и все подчеркнуты.



Я же написал, что соавторов линий может быть много. Хотя мне в принципе непонятно, зачем нужно изобретать собственные недоделанные классы без всякой необходимости

код: [ скачать ] [ спрятать ]
Используется синтаксис LaTeX
\documentclass{procDDs}
                                                  % load packages only if necessary

\title{Title of the Paper
(if long, it will be automatically split into several lines)}

\author{\textbf{Ivanov}, Petrov1,  Petrov2, Petrov3, Petrov4, Petrov5, Petrov6,}
{Department Shizics, University of Nowhere, Atlantida}                
                                                  % lecturer given in bold
{author@e.mail}                                   % e-mail of lecturer
%
%                                                 % it is important not to have
%                                                 % blank lines between the
%                                                 % \author and \coauthor
%
\coauthor{ Petrov7,  Petrov8, Petrov9, Petrov10, Petrov11, Petrov 12,}
{Department Shizics, University of Nowhere, Atlantida}
{author@e.mail}

\coauthor{Sidorov}                       % Co-author(s) with
{Department of Marazmatics, King Saud University, Saudy Arabia}                  % another affiliation
{coauthor@e.mail }                                               % use such line
                                                  % if e-mail none available

\coauthor{Winny The Pooh}                       % Co-author(s) with
{Institute, University, Country}                  % another affiliation
{coauthor@e.mail }                                               % use such line

\begin {document}

\maketitle

\index{Author1, I.I.}                              % write this for each author
\index{Author2, I.I.}                              % to generate the index
\index{Coauthor, I.I.}                             %


\end {document}

 
 
 
 Re: переносы и выравнивание по центру
Сообщение24.06.2015, 17:08 
Red_Herring
Благодарю.

 
 
 [ Сообщений: 8 ] 


Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group