Document ClassesIssues with adding comments and “losing floats” with svjour3

Information and discussion about specific document classes and how to create your own document classes.
Post Reply
cheesesofnazareth
Posts: 8
Joined: Mon May 10, 2021 2:11 pm

Issues with adding comments and “losing floats” with svjour3

Post by cheesesofnazareth »

I am using a svjou3 template to submit an article and I am using the Changes package to highlight changes and make comments for the reviewer. My minimal preamble looks like this:

Code: Select all

\begin{filecontents*}{example.eps}
gsave
newpath
  20 20 moveto
  20 220 lineto
  220 220 lineto
  220 20 lineto
closepath
2 setlinewidth
gsave
  .4 setgray fill
grestore
stroke
grestore
\end{filecontents*}
%
\RequirePackage{fix-cm}
%
\documentclass[smallextended]{svjour3}                  % onecolumn (second format)
%\ExecuteOptions{onesided}

%
\smartqed                                                                   % flush right qed marks, e.g. at end of proof
%
\usepackage{graphicx}
%
 \usepackage{mathptmx}                                          % use Times fonts if available on your TeX system
%
% insert here the call for the packages your document requires
%\usepackage{latexsym}
\usepackage{multirow}
\usepackage{booktabs} 
\usepackage{threeparttable}
\usepackage{csquotes}
\usepackage[textwidth=0.4\textwidth]{todonotes}
\usepackage{changes}

% Insert the name of "your journal" with
 \journalname{your jounral}
%
\begin{document}
I face two problems:
1. Placing comments: In all odd pages, the comments appear to the right-side (which is where I want it). But in the even pages, they go to the left. You may notice in the my MW preamble, I tried \ExecuteOptions{onesided} (commented out in the example), but to no avail.

I have also tried the solution given here: https://tex.stackexchange.com/questions ... o-the-left, but failed as well as it only switches comment location but not the alternation

2. After rendering my .tex, I keep getting the error Float(s) lost. I have no clue how to fix this.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
User avatar
Ijon Tichy
Posts: 640
Joined: Mon Dec 24, 2018 10:12 am

Issues with adding comments and “losing floats” with svjour3

Post by Ijon Tichy »

I don't have svjour3.cls and cannot find it on CTAN. So I can give only some general information.
  • Usually the option for single-sided is oneside not onesided. But not all classes provide single-sided documents. For example some publisher classes do not provide options for single-sided (or double-sided), because they are made only for special publications and it is not recommended to use them for anything else.
  • \ExecuteOptions is a command for class and package authors. More or less it sets the default options of a class or package. It works only inside the class or package. Users set options as optional argument of \documentclass or \usepackage. The optional argument of \documentclass is used not only to set class options, but global options. They are also passed to packages, that provide the option.
  • It is recommended to always show a Infominimal working example not only the document preamble.
  • For classes and packages, that are not available in usual TeX distributions nor at CTAN, it is recommended to provide a free download link (but always respect the license of the class/package!)
  • Lost floats are often the result of too restrictive float options. You should remove all the [h], [ht] etc. optional arguments from figure and table environments and let them float. At the end you could add some additional float restrictions only at those floats, you really need them. But you should always add option p. So don't use \begin{figure}[h] but, e.g., \begin{figure}[htp] to always allow float pages. A single \begin{figure}[h] can block all following figures, if it does not fit here! And if too much floats are blocked till the end of the chapter/document this will result in lost floats.
Sorry, but I can no longer participate here as the administrator is trampling on my wishes on one of his other platforms. :cry:
Post Reply