Template talk:Hanging indent

From Wikisource
Jump to navigation Jump to search

In many of these circumstances if one of the parameters is optional, it would be at the end, rather than at the start (in case someone forgets and look how it looks in the examples). Better practice is to have mandatory before optional. May I suggest that as it is this way around that we look to enable a name for the mandatory parameter, text= or t= billinghurst (talk) 15:46, 28 December 2009 (UTC)[reply]

Glitch? = sign causes template to fail[edit]

I've noticed that when I use {{hi}} on lines that have an equal sign (=) in them, all the text within the template collapses to {{{1}}} unless the equal sign is replaced with <nowiki>=</nowiki>. Thus the template apparently reads the symbol as a part of the syntax rather than a character.
As an example, entering

{{hi|Lorem ipsum dolor sit amet, consectetur = dipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.}} 

results in:

{{{1}}}


Is this a known issue? Can it be fixed? Thanks. Animalparty (talk) 23:39, 12 March 2015 (UTC)[reply]

@Animalparty: Regrettably you have discovered for yourself an inherent "feature" of the wiki - syntax. Yes, it is a known issue (it also affects all templates; e.g. {{box|this won't=work}} produces the clearly incorrect

{{{1}}}

.

There are three main methods for getting around this fundamental issue (in addition to your own method above which is quite acceptable). Neither, regrettably, is particularly pretty or memorable and both involve being super-aware of embedded "=" signs:

  1. Substitute "=" with either &#61; or &#x3D; thus {{hi|Lorem ipsum dolor sit amet, consectetur = dipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.}} results in
    Lorem ipsum dolor sit amet, consectetur = dipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
  2. Substitute "=" with {{=}}; thus {{hi|Lorem ipsum dolor sit amet, consectetur {{=}} dipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.}} results in
    Lorem ipsum dolor sit amet, consectetur = dipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
  3. Finally (and although this is the simplest it really looks ugly and is difficult to explain) prefix the offending "="-including text with the string "1="; thus {{hi|1=Lorem ipsum dolor sit amet, consectetur = dipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.}} results in
    Lorem ipsum dolor sit amet, consectetur = dipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

Hope one of these approaches proves useful to you

—Preceding unsigned comment added by 121.217.225.156 (talk)