On Wed, Feb 10, 2021 at 05:11:04AM +0100, Latex wrote:
> Dear Enrico,
> 
> Thank you very much again!

You're welcome!

> We ran the lyx template and found there was a compile bug warning.
> Please see the attached picture.
> 
> But if we run our latex template firstly, lyx template can be compiled
> normally. Why is that? I saw it can't identify .eps picture directly,
> right? Or what's wrong with our operation for lyx?

Sorry, it was an oversight on my part. I first ran pdflatex on the latex
template and thus was not aware of the problem. When a postscript file
is included, pdflatex launches epstopdf to convert it. So it executes
the command "epstopdf ----outfile=Definitions/logo-orcid-eps-converted-to.pdf
Definitions/logo-orcid.eps" and then includes the converted graphics.

However, LyX typesets the document by making a copy of all required
files to a temporary directory, so that the document directory is not
polluted. Of course, LyX can only copy the files it is aware of, i.e.,
the ones that are inserted by using the GUI. The files included by the
class cannot be copied because they are unknown. Anyway, LyX accounts
for that by including the document directory to the TEXINPUTS
environment variable used by TeX. In this way, TeX can find all required
files.

Unfortunately, epstopdf is an external program that does not follow the
same rules as TeX for finding the required files and thus it fails.
The simplest way for dealing with this is not specifying the extension
of the graphics to be included and provide all formats that can be
included by a given TeX backend. For example, if a latex document
contains \includegraphics{foo} and the files foo.eps and foo.pdf are
provided, then the dvi backend will use foo.eps and the pdf backend will
use foo.pdf, without the need of any conversion.

So, what I have done is removing all .eps extensions from mdpi.cls and
providing the necessary .pdf formats. In the attached archive you can
find only the files that I modified or added. Other than the .pdf files
and the modified mdpi.cls file, you can also find a new .layout file
with the correction of a small glitch and new template.lyx where I
simply added instructions on how to obtain the various \citeXXX variants
for citations. I am also attaching a diff showing what has changed.

> And another question is about the argument in our latex template.
> \documentclass[journal,article,submit,moreauthors,pdftex]{Definitions/mdpi} 
> 
> In the command, all arguments in square brackets can be changed. Such
> as "submit“ can be changed to "accept", "journal" can be changed to a
> designated journal name, others are same.
> When the arguments has been changed, they can produce a different
> format pdf file. If we need to change them, how to modify lyx
> template? or .layout file?

The class options can be found in
Document → Settings → Document Class → Custom
and can be easily changed there. Essentially, here you have all the
arguments that go in the square brackets of \documentclass.

Sorry for the inconvenience

-- 
Enrico

<<attachment: MDPI_lyxtemplate_additions.zip>>

Only in new/Definitions: logo-ccby.pdf
Only in new/Definitions: logo-mdpi.pdf
Only in new/Definitions: logo-orcid.pdf
diff -urp old/Definitions/mdpi.cls new/Definitions/mdpi.cls
--- old/Definitions/mdpi.cls    2021-01-18 08:59:24.000000000 +0100
+++ new/Definitions/mdpi.cls    2021-02-10 15:30:13.425267100 +0100
@@ -529,7 +529,7 @@
 
 %% ORCID
 % Make Orcid icon
-\newcommand{\orcidicon}{\includegraphics[width=0.32cm]{Definitions/logo-orcid.eps}}
+\newcommand{\orcidicon}{\includegraphics[width=0.32cm]{Definitions/logo-orcid}}
 
 % Define link and button for each author
 \foreach \x in {A, ..., Z}{%
@@ -634,20 +634,20 @@
                        \OR \equal{\@arttype}{Book}}{}{%
                                \ifthenelse{\equal{\@status}{submit}}{% 
                                        \hfill \href{https://www.mdpi.com}{%
-                                       
\includegraphics[height=1cm]{Definitions/logo-mdpi.eps}}%
+                                       
\includegraphics[height=1cm]{Definitions/logo-mdpi}}%
                                        }{
                                        
\href{https://www.mdpi.com/journal/\@journal}{
                                        
\includegraphics[height=1.2cm]{Definitions/\@journal-logo.eps}}%
                                        \hfill
                                        
\ifthenelse{\equal{\@journal}{proceedings}}{
                                                
\href{https://www.mdpi.com/journal/\@journal}{
-                                               
\includegraphics[height=1.2cm]{Definitions/logo-conference.eps}
+                                               
\includegraphics[height=1.2cm]{Definitions/logo-conference}
                                                \hfill}
                                                }{}
                                        
\ifthenelse{\equal{\@journal}{scipharm}}{%
-                                               
\href{https://www.mdpi.com}{\includegraphics[height=1cm]{Definitions/logo-mdpi-scipharm.eps}}%
+                                               
\href{https://www.mdpi.com}{\includegraphics[height=1cm]{Definitions/logo-mdpi-scipharm}}%
                                                }{%
-                                               
\href{https://www.mdpi.com}{\includegraphics[height=1cm]{Definitions/logo-mdpi.eps}}%
+                                               
\href{https://www.mdpi.com}{\includegraphics[height=1cm]{Definitions/logo-mdpi}}%
                                                }%
                                        }%
                                        \par
@@ -700,7 +700,7 @@
                \fontsize{7}{7}\selectfont
                \ifthenelse{\equal{\@status}{submit}}{%         
                        }{
-                       
\href{https://www.mdpi.com/\@ISSN/\@pubvolume/\@issuenum/\@articlenumber?type=check_update&version=1}{\includegraphics[height=.6cm]{Definitions/logo-updates.pdf}}\par\vspace{3pt}
+                       
\href{https://www.mdpi.com/\@ISSN/\@pubvolume/\@issuenum/\@articlenumber?type=check_update&version=1}{\includegraphics[height=.6cm]{Definitions/logo-updates}}\par\vspace{3pt}
                                }
                        \textbf{Citation: }\papercitation
                        \par\vspace{12pt}
@@ -1381,9 +1381,9 @@
                        }{%
                        \href{https://creativecommons.org/}{%
                                \ifthenelse{\equal{\@journal}{ijtpp}}{%
-                                       \includegraphics[width=2 
cm]{Definitions/logo-ccby-nc-nd.eps}%
+                                       \includegraphics[width=2 
cm]{Definitions/logo-ccby-nc-nd}%
                                        }{%
-                                       \includegraphics[width=2 
cm]{Definitions/logo-ccby.eps}
+                                       \includegraphics[width=2 
cm]{Definitions/logo-ccby}
                                        }
                                }\\
                                {\textbf{Copyright:~}\copyright \ 
{\@copyrightyear} by the \@authornum. %
@@ -1460,4 +1460,4 @@
   \newlength{\cellWidthZ}
  \newcommand{\PreserveBackslash}[1]{\let\temp=\\#1\let\\=\temp} % For table 
column setting in XML2PDF
 
-\endinput
\ No newline at end of file
+\endinput
diff -urp old/Definitions/mdpi.layout new/Definitions/mdpi.layout
--- old/Definitions/mdpi.layout 2021-02-10 01:36:22.000000000 +0100
+++ new/Definitions/mdpi.layout 2021-02-10 15:50:08.106323200 +0100
@@ -106,7 +106,6 @@ NoStyle Part*
 NoStyle Abstract
 NoStyle Right_Address
 NoStyle Subparagraph
-NoStyle Table
 
 Provides hyperref 1
 Provides natbib 1
@@ -484,7 +483,7 @@ Style Proof
   BottomSep    0.7
   ParSep       0.3
   Align                Block
-  AlignPossible        lock, Left
+  AlignPossible        Block, Left
   LabelType    Static
   LabelString  "Proof."
   EndLabelType Box
diff -urp old/template.lyx new/template.lyx
--- old/template.lyx    2021-02-10 01:37:22.000000000 +0100
+++ new/template.lyx    2021-02-10 16:51:21.063876500 +0100
@@ -185,7 +185,6 @@ Title for Citation in the Left Column
 \end_layout
 
 \begin_layout Author Orcid ID
-
 \begin_inset Argument 1
 status open
 
@@ -202,7 +201,6 @@ orcidauthorA
 \end_layout
 
 \begin_layout Author Orcid ID
-
 \begin_inset Argument 1
 status open
 
@@ -2416,7 +2414,7 @@ citeauthor{ref-journal-1a} (
 citeyear{ref-journal-1a}, 
 \backslash
 citeyear{ref-journal-1b}).
- This produces: Whittaker (1967, 1975)
+ This produces: Whittaker (1967, 1975).
 \end_layout
 
 \end_inset
@@ -2439,7 +2437,81 @@ citeyear{ref-journal-3a}, p.
 citeyear{ref-journal-3b}, p.475).
  This produces: Wong (1999, p.
  328; 2000, p.
- 475)
+ 475).
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset Note Note
+status open
+
+\begin_layout Plain Layout
+To obtain 
+\backslash
+citeauthor{} in LyX you have to choose 
+\begin_inset Quotes eld
+\end_inset
+
+Author1
+\begin_inset Quotes erd
+\end_inset
+
+ (or 
+\begin_inset Quotes eld
+\end_inset
+
+Author2
+\begin_inset Quotes erd
+\end_inset
+
+, or \SpecialChar ldots
+) in 
+\family sans
+Insert\SpecialChar menuseparator
+Citation\SpecialChar menuseparator
+Citation style
+\family default
+, as demonstrated in this citation inset: 
+\begin_inset CommandInset citation
+LatexCommand citeauthor
+key "ref-journal"
+literal "false"
+
+\end_inset
+
+ (either left- or right-click it).
+\end_layout
+
+\begin_layout Plain Layout
+To obtain 
+\backslash
+citeyear{} in LyX you have to choose 
+\begin_inset Quotes eld
+\end_inset
+
+year
+\begin_inset Quotes erd
+\end_inset
+
+ in 
+\family sans
+Insert\SpecialChar menuseparator
+Citation\SpecialChar menuseparator
+Citation style
+\family default
+, as demonstrated in this citation inset: 
+\begin_inset CommandInset citation
+LatexCommand citeyear
+key "ref-journal"
+literal "false"
+
+\end_inset
+
+ (either left- or right-click it).
 \end_layout
 
 \end_inset
@@ -2474,7 +2546,7 @@ reviewreports{
 
 \begin_layout Plain Layout
 
-%Reviewer 1 comments and authors’™response
+%Reviewer 1 comments and authors' response
 \backslash
 
 \backslash
@@ -2483,7 +2555,7 @@ reviewreports{
 
 \begin_layout Plain Layout
 
-%Reviewer 2 comments and authors’™response
+%Reviewer 2 comments and authors' response
 \backslash
 
 \backslash
@@ -2492,7 +2564,7 @@ reviewreports{
 
 \begin_layout Plain Layout
 
-%Reviewer 3 comments and authors’™response
+%Reviewer 3 comments and authors' response
 \end_layout
 
 \begin_layout Plain Layout
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel

Reply via email to