Re: biblatex usepackage location in the preamble

2019-01-28 Thread Daniel

On 2019-01-28 19:50, Baris Erkus wrote:

  It does compiling, but the replacement did not work.

I think, the \AtBeginDocument{...}  macro places the contents right 
after the \begin{document}, but not in the preamble. However, the 
\DefineBibliographyStrings{...} and similar BibLaTeX commands are placed 
in the preamble according to Section 3.9 of BibLaTeX manual. Maybe this 
is the reason it does not do the replacement (?).


I have also tried to compile a LaTeX file where I place this block to 
the beginning of the document right after \begin{document} and it gives 
error that this has to be placed in the preamble (no LyX involved).


I further tested the case on LaTeX again, where the above block wrapped 
with \AtBeginDocument{...} in the preamble, but before loading biblatex; 
it compiles, but it does not do the replacement (no LyX involved).


So, is there a workaround for this in LyX, am I missing smtg?

(TBH, this was not my original problem. I was trying to use BibLaTeX for 
a Turkish document, only to find out BibLaTeX does not have Turkish 
support yet :< )


If I read the documentations for \AtBeginDocument correctly, it places 
the macro just before \begin{document}. Is your .tex test file working 
as expected when you move your macro manually to whatever position you 
think it should be moved? If not then the problem might be the macro 
rather than LyX.


Daniel



Re: Bold lower case Greek letters in Times Roman font

2019-01-28 Thread list_email


> On Jan 28, 2019, at 7:21 AM, Paul A. Rubin  wrote:
> 
> On 1/28/19 2:59 AM, list_em...@icloud.com wrote:
>>> On Jan 27, 2019, at 6:07 PM, Paul A. Rubin  wrote:
>>> 
>>> On 1/27/19 7:09 PM, list_em...@icloud.com wrote:
 Am I correct in thinking that the Times Roman font has no bold lower case 
 Greek characters?
 
 Jerry
>>> I don't think it's a font issue so much as a LaTeX issue: 
>>> https://tex.stackexchange.com/questions/595/how-can-i-get-bold-math-symbols.
>>> 
>>> Paul
>>> 
>> Yes, I read that page before posting and am having good results with the 
>> eighth idea on that page--"Use the command \boldsymbol{YOUR_SYMBOL}”--BUT 
>> NOT WITH TIMES ROMAN. I am using Utopia in the body of my paper with the 
>> Fourier math font and boldsymbol _works_ for that (those) font(s). However, 
>> I expect that at some point I might have to switch to Times Roman for 
>> journal publication and boldsymbol _does_not_work then. I think I read that 
>> this (bold Greek or bold lower-case Greek) can be a problem with some fonts 
>> and I’m concerned that Times Roman is one of them.
>> 
>> Jerry
> Works for me with Times Roman. In the attached LyX file, note the use of 
> Times Roman as the math font (font settings) and the inclusion of the 'bm' 
> package (preamble settings). The PDF file shows the difference between bold 
> and ordinary weight. It might not be as much as I would like on some symbols 
> (the omegas are a trifle close for my taste), but the bold symbols are 
> definitely heavier than the non-bold symbols.
> 
> Paul
> 
> 

Thanks, Paul. Interestingly, I get the same results without the bm package but 
by using \boldsymbol on the Times Roman (New TX) mathfont.

Jerry

Re: Bold lower case Greek letters in Times Roman font

2019-01-28 Thread list_email


> On Jan 28, 2019, at 5:45 AM, Guenter Milde  wrote:
> 
> On 2019-01-28, list_em...@icloud.com wrote:
> 
>>> On Jan 27, 2019, at 6:07 PM, Paul A. Rubin  wrote:
> 
>>> On 1/27/19 7:09 PM, list_em...@icloud.com wrote:
> 
 Am I correct in thinking that the Times Roman font has no bold lower
 case Greek characters?
> 
> You can get a rich choice of mathematical symbols/characters matching
> Times Roman (including bold Greek letters) with the selection "Times
> Roman (New TX)" in Document>Settings>Fonts>Maths.
> 
> For text, you can use the Times lookalike "Artemisia" from the Greek Font
> Societey, e.g. via http://ctan.org/pkg/substitutefont
> with the following preamble code
> 
> \usepackage{substitutefont}
> % Serif
> \usepackage[scaled=0.97]{newtxtext}
> \substitutefont{LGR}{\rmdefault}{artemisia}
> % Sans
> % \substitutefont{LGR}{\sfdefault}{neohellenic}
> \substitutefont{LGR}{\sfdefault}{maksf}
> % Monospaced
> \substitutefont{LGR}{\ttdefault}{cmtt}  % CB fonts
> 
> 
> Günter
> 
Oh, thanks. I didn’t think of that (Times Roman (New TX)). That is a useful 
workaround. Surely publishers have a different workaround if in fact Times 
Roman is deficient. I just wonder if this workaround is compatible with their 
workaround, if any. I didn’t try your Artemisia suggestion yet but I see that 
you are the maintainer, so thanks for that. It does look like a nice font 
although it is not a Times lookalike to my eyes.

Jerry



Re: biblatex usepackage location in the preamble

2019-01-28 Thread Baris Erkus
On 28-Jan-19 7:46 PM, Jürgen Spitzmüller wrote:
Am Mo., 28. Jan. 2019 um 16:40 Uhr schrieb Baris Erkus 
mailto:bariser...@hotmail.com>>:

I observed that if biblatex is selected for the bibliography style, the 
\usepackage[*options*]{biblatex} is placed right before the \begin{document}, 
but not after the \documentclass, where usually packages are called.

Yes, because biblatex must be loaded after babel (or polyglossia), and this, in 
turn, must be loaded late.
Thanks Jürgen. This one I understand. However, this requirement does not call 
for loading babel+biblatex right before the \begin{document}; they can still be 
placed right after other packages loaded after \documentclass. The examples on 
BibLaTeX, I sqw SE or other web pages loads BibLaTeX in the block after 
\documentclass, but late.

If I want to place some code in the preamble that requires the biblatex 
package, then these codes appear before the \usepackage[*options*]{biblatex} 
line, and they do not work.

For example I wanted to replace "et al.", "and", "Bibliography (title)" with 
their Turkish counterparts by simply placing the following code to the preamble:

\DefineBibliographyStrings{english}{%
  references = {{Kaynaklar}},
  and = {ve},
  andothers ={ve diğerleri},
}

but it does not work.

You need to embrace such definitions in \AtBeginDocument{...}. See
https://wiki.lyx.org/BibTeX/Biblatex#toc2

HTH,
Jürgen


 It does compiling, but the replacement did not work.

I think, the \AtBeginDocument{...}  macro places the contents right after the 
\begin{document}, but not in the preamble. However, the 
\DefineBibliographyStrings{...} and similar BibLaTeX commands are placed in the 
preamble according to Section 3.9 of BibLaTeX manual. Maybe this is the reason 
it does not do the replacement (?).

I have also tried to compile a LaTeX file where I place this block to the 
beginning of the document right after \begin{document} and it gives error that 
this has to be placed in the preamble (no LyX involved).

I further tested the case on LaTeX again, where the above block wrapped with 
\AtBeginDocument{...} in the preamble, but before loading biblatex; it 
compiles, but it does not do the replacement (no LyX involved).

So, is there a workaround for this in LyX, am I missing smtg?

(TBH, this was not my original problem. I was trying to use BibLaTeX for a 
Turkish document, only to find out BibLaTeX does not have Turkish support yet 
:< )

Baris

--
↓↓
Please bottom-post. Start your reply here:
%% LyX 2.3.2-2 created this file.  For more info, see http://www.lyx.org/.
%% Do not edit unless you really know what you are doing.
\documentclass[english]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}


\AtBeginDocument{%
\DefineBibliographyStrings{english}{%
  references = {{Kaynaklar}},
  and = {ve},
  andothers ={ve diğerleri},
}
}


\usepackage{babel}
\usepackage[style=authoryear,maxcitenames=2]{biblatex}

\addbibresource{test.bib}

\begin{document}

Testing \parencite{Nagarajaiah1991} Testing \parencite{AtikAbrahamson2010}

\printbibliography

\end{document}


newfile1-biblatex-2.lyx
Description: newfile1-biblatex-2.lyx


Re: biblatex usepackage location in the preamble

2019-01-28 Thread Jürgen Spitzmüller
Am Mo., 28. Jan. 2019 um 16:40 Uhr schrieb Baris Erkus <
bariser...@hotmail.com>:

> I observed that if biblatex is selected for the bibliography style, the
> \usepackage[*options*]{biblatex} is placed right before the
> \begin{document}, but not after the \documentclass, where usually packages
> are called.
>
Yes, because biblatex must be loaded after babel (or polyglossia), and
this, in turn, must be loaded late.

> If I want to place some code in the preamble that requires the biblatex
> package, then these codes appear before the
> \usepackage[*options*]{biblatex} line, and they do not work.
>
> For example I wanted to replace "et al.", "and", "Bibliography (title)"
> with their Turkish counterparts by simply placing the following code to the
> preamble:
>
> \DefineBibliographyStrings{english}{%
>   references = {{Kaynaklar}},
>   and = {ve},
>   andothers ={ve diğerleri},
> }
>
> but it does not work.
>
You need to embrace such definitions in \AtBeginDocument{...}. See
https://wiki.lyx.org/BibTeX/Biblatex#toc2

HTH,
Jürgen


biblatex usepackage location in the preamble

2019-01-28 Thread Baris Erkus
Hello,

I observed that if biblatex is selected for the bibliography style, the 
\usepackage[*options*]{biblatex} is placed right before the \begin{document}, 
but not after the \documentclass, where usually packages are called.

If I want to place some code in the preamble that requires the biblatex 
package, then these codes appear before the \usepackage[*options*]{biblatex} 
line, and they do not work.

For example I wanted to replace "et al.", "and", "Bibliography (title)" with 
their Turkish counterparts by simply placing the following code to the preamble:

\DefineBibliographyStrings{english}{%
  references = {{Kaynaklar}},
  and = {ve},
  andothers ={ve diğerleri},
}

but it does not work.

I exported the LyX file into a (PDF)LaTeX file and moved the 
\usepackage[*options*]{biblatex} line after the \documentclass and before the 
new definitions, which works fine.

Is this how it's intended to be or, \usepackage[*options*]{biblatex} line 
should be placed along with the other package definitions right after the 
\documentclass ? I can make the similar observation for the babel package, BTW.

Attached is a MWE and its LaTeX preview, its export to LaTeX file, and the 
corrected LaTeX file along with the sample bib file.

BE

[cid:part1.3B97E451.0145701D@hotmail.com]

--
↓↓
Please bottom-post. Start your reply here:
%% LyX 2.3.2-2 created this file.  For more info, see http://www.lyx.org/.
%% Do not edit unless you really know what you are doing.
\documentclass[english]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}

\makeatletter
%% User specified LaTeX commands.
\DefineBibliographyStrings{english}{%
  references = {{Kaynaklar}},
  and = {ve},
  andothers ={ve diğerleri},
}

\makeatother

\usepackage{babel}
\usepackage[style=authoryear,maxcitenames=2]{biblatex}
\addbibresource{test.bib}
\begin{document}
Testing \parencite{Nagarajaiah1991} Testing \parencite{AtikAbrahamson2010}

\printbibliography

\end{document}
%% LyX 2.3.2-2 created this file.  For more info, see http://www.lyx.org/.
%% Do not edit unless you really know what you are doing.
\documentclass[english]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage[style=authoryear,maxcitenames=2]{biblatex}

\makeatletter
%% User specified LaTeX commands.
\DefineBibliographyStrings{english}{%
  references = {{Kaynaklar}},
  and = {ve},
  andothers ={ve diğerleri},
}

\makeatother

\addbibresource{test.bib}
\begin{document}
Testing \parencite{Nagarajaiah1991} Testing \parencite{AtikAbrahamson2010}

\printbibliography

\end{document}
@Article{AtikAbrahamson2010,
  author  = {Linda Al Atik and Norman Abrahamson},
  title   = {An Improved Method for Nonstationary Spectral Matching},
  journal = {Earthquake Spectra},
  year= {2010},
  volume  = {26},
  number  = {3},
  pages   = {601-617},
}

@Article{Nagarajaiah1991,
  author  = {Satish Nagarajaiah and Andrei M. Reinhorn and Michalakis C. 
Constantinou},
  title   = {Nonlinear Dynamic Analysis of 3D Base Isolated Structures},
  journal = {Journal of Structural Engineering},
  year= {1991},
  volume  = {117},
  number  = {7},
  pages   = {2035-2054},
}


newfile1-biblatex.lyx
Description: newfile1-biblatex.lyx


Re: Bold lower case Greek letters in Times Roman font

2019-01-28 Thread Paul A. Rubin

On 1/28/19 2:59 AM, list_em...@icloud.com wrote:

On Jan 27, 2019, at 6:07 PM, Paul A. Rubin  wrote:

On 1/27/19 7:09 PM, list_em...@icloud.com wrote:

Am I correct in thinking that the Times Roman font has no bold lower case Greek 
characters?

Jerry

I don't think it's a font issue so much as a LaTeX issue: 
https://tex.stackexchange.com/questions/595/how-can-i-get-bold-math-symbols.

Paul


Yes, I read that page before posting and am having good results with the eighth idea 
on that page--"Use the command \boldsymbol{YOUR_SYMBOL}”--BUT NOT WITH TIMES 
ROMAN. I am using Utopia in the body of my paper with the Fourier math font and 
boldsymbol _works_ for that (those) font(s). However, I expect that at some point I 
might have to switch to Times Roman for journal publication and boldsymbol 
_does_not_work then. I think I read that this (bold Greek or bold lower-case Greek) 
can be a problem with some fonts and I’m concerned that Times Roman is one of them.

Jerry
Works for me with Times Roman. In the attached LyX file, note the use of 
Times Roman as the math font (font settings) and the inclusion of the 
'bm' package (preamble settings). The PDF file shows the difference 
between bold and ordinary weight. It might not be as much as I would 
like on some symbols (the omegas are a trifle close for my taste), but 
the bold symbols are definitely heavier than the non-bold symbols.


Paul



boldgreek.lyx
Description: application/lyx


boldgreek.pdf
Description: Adobe PDF document


Re: Bold lower case Greek letters in Times Roman font

2019-01-28 Thread Guenter Milde
On 2019-01-28, list_em...@icloud.com wrote:

>> On Jan 27, 2019, at 6:07 PM, Paul A. Rubin  wrote:

>> On 1/27/19 7:09 PM, list_em...@icloud.com wrote:

>>> Am I correct in thinking that the Times Roman font has no bold lower
>>> case Greek characters?

You can get a rich choice of mathematical symbols/characters matching
Times Roman (including bold Greek letters) with the selection "Times
Roman (New TX)" in Document>Settings>Fonts>Maths.

For text, you can use the Times lookalike "Artemisia" from the Greek Font
Societey, e.g. via http://ctan.org/pkg/substitutefont
with the following preamble code

\usepackage{substitutefont}
% Serif
\usepackage[scaled=0.97]{newtxtext}
\substitutefont{LGR}{\rmdefault}{artemisia}
% Sans
% \substitutefont{LGR}{\sfdefault}{neohellenic}
\substitutefont{LGR}{\sfdefault}{maksf}
% Monospaced
\substitutefont{LGR}{\ttdefault}{cmtt}  % CB fonts


Günter



Re: more infos at the window bottom

2019-01-28 Thread Baris Erkus
On 28-Jan-19 11:49 AM, paolo m. wrote:
> Is it possible to get info about paragraph type, at the bottom frame of the
> lyx window?
> Currently only character type is displayed.
>
> thank you
> paolo m.
>
Do you mean paragraphs type as shown at the upper left corner? Because, 
paragraph does not have type like characters.

-- 
↓↓
Please bottom-post. Start your reply here:



more infos at the window bottom

2019-01-28 Thread paolo m.
Is it possible to get info about paragraph type, at the bottom frame of the 
lyx window?
Currently only character type is displayed.

thank you
paolo m.



Re: Bold lower case Greek letters in Times Roman font

2019-01-28 Thread list_email


> On Jan 27, 2019, at 6:07 PM, Paul A. Rubin  wrote:
> 
> On 1/27/19 7:09 PM, list_em...@icloud.com wrote:
>> Am I correct in thinking that the Times Roman font has no bold lower case 
>> Greek characters?
>> 
>> Jerry
> I don't think it's a font issue so much as a LaTeX issue: 
> https://tex.stackexchange.com/questions/595/how-can-i-get-bold-math-symbols.
> 
> Paul
> 
Yes, I read that page before posting and am having good results with the eighth 
idea on that page--"Use the command \boldsymbol{YOUR_SYMBOL}”--BUT NOT WITH 
TIMES ROMAN. I am using Utopia in the body of my paper with the Fourier math 
font and boldsymbol _works_ for that (those) font(s). However, I expect that at 
some point I might have to switch to Times Roman for journal publication and 
boldsymbol _does_not_work then. I think I read that this (bold Greek or bold 
lower-case Greek) can be a problem with some fonts and I’m concerned that Times 
Roman is one of them.

Jerry